PageSourceSearch

https://pika.page/assets/@tiptap--extension-horizontal-rule-bb74d9…220a0f1a3d31977538c1f267b15e2044ea45ecb1.js

js pika.page collected 2026-10-03 21:39:14 UTC 1,488 bytes, 4 lines download raw bytes

1// @tiptap/[email protected] downloaded from https://ga.jspm.io/npm:@tiptap/[email protected]/dist/index.js
2
3import{Node as e,nodeInputRule as t,canInsertNode as n,isNodeSelection as r,mergeAttributes as i}from"@tiptap/core";import{TextSelection as a,NodeSelection as o}from"@tiptap/pm/state";const s=e.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,i(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!n(t,t.schema.nodes[this.name]))return!1;let{selection:i}=t,{$to:s}=i,c=e();return r(i)?c.insertContentAt(s.pos,{type:this.name}):c.insertContent({type:this.name}),c.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(a.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(o.create(t.doc,n.pos)):t.setSelection(a.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,o=i==null?void 0:i.create();o&&(t.insert(r,o),t.setSelection(a.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[t({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.t
3ype})]}});var c=s;export{s as HorizontalRule,c as default};
4

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.