var o=globalThis.__LEPTOS_TIPTAP_BRIDGE__;if(o==null||o.modules==null)throw new Error("leptos-tiptap bridge bindings are unavailable");var t=o.modules["@tiptap/core"];if(t==null)throw new Error('leptos-tiptap bridge module "@tiptap/core" is unavailable');var k=t.CommandManager,b=t.Editor,y=t.Extension,h=t.InputRule,E=t.Mark,s=t.Node,R=t.NodePos,f=t.NodeView,A=t.PasteRule,T=t.Tracker,P=t.callOrReturn,C=t.canInsertNode,S=t.combineTransactionSteps,N=t.createChainableState,B=t.createDocument,O=t.createNodeFromContent,w=t.createStyleTag,M=t.defaultBlockAt,v=t.deleteProps,I=t.elementFromString,F=t.escapeForRegEx,D=t.extensions,L=t.findChildren,j=t.findChildrenInRange,K=t.findDuplicates,H=t.findParentNode,q=t.findParentNodeClosestToPos,G=t.fromString,z=t.generateHTML,J=t.generateJSON,U=t.generateText,V=t.getAttributes,Y=t.getAttributesFromExtensions,$=t.getChangedRanges,Q=t.getDebugJSON,W=t.getExtensionField,X=t.getHTMLFromFragment,Z=t.getMarkAttributes,tt=t.getMarkRange,et=t.getMarkType,nt=t.getMarksBetween,ot=t.getNodeAtPosition,it=t.getNodeAttributes,rt=t.getNodeType,st=t.getRenderedAttributes,lt=t.getSchema,at=t.getSchemaByResolvedExtensions,pt=t.getSchemaTypeByName,dt=t.getSchemaTypeNameByName,ut=t.getSplittedAttributes,ct=t.getText,gt=t.getTextBetween,_t=t.getTextContentFromNodes,xt=t.getTextSerializersFromSchema,mt=t.injectExtensionAttributesToParseRule,kt=t.inputRulesPlugin,bt=t.isActive,yt=t.isAtEndOfNode,ht=t.isAtStartOfNode,Et=t.isEmptyObject,Rt=t.isExtensionRulesEnabled,ft=t.isFunction,At=t.isList,Tt=t.isMacOS,Pt=t.isMarkActive,Ct=t.isNodeActive,St=t.isNodeEmpty,Nt=t.isNodeSelection,Bt=t.isNumber,Ot=t.isPlainObject,wt=t.isRegExp,Mt=t.isSafari,vt=t.isString,It=t.isTextSelection,Ft=t.isiOS,Dt=t.markInputRule,Lt=t.markPasteRule,l=t.mergeAttributes,jt=t.mergeDeep,Kt=t.minMax,Ht=t.nodeInputRule,qt=t.nodePasteRule,Gt=t.objectIncludes,zt=t.pasteRulesPlugin,Jt=t.posToDOMRect,Ut=t.removeDuplicates,Vt=t.resolveFocusPosition,Yt=t.rewriteUnknownContent,$t=t.selectionToInsertionEnd,Qt=t.splitExtensions,Wt=t.textInputRule,Xt=t.textPasteRule,Zt=t.textblockTypeInputRule,i=t.wrappingInputRule;var _="listItem",a="textStyle",p=/^\s*([-+*])\s$/,d=s.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",l(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:n})=>this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_,this.editor.getAttributes(a)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=i({find:p,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=i({find:p,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(a),editor:this.editor})),[e]}});var u="__LEPTOS_TIPTAP_BRIDGE__";function x(){let e=globalThis,n=e[u];if(n!=null)return n;let r={modules:{},registerExtension:()=>{throw new Error("leptos-tiptap bridge runtime is not initialized")}};return e[u]=r,r}function c(){return x()}function g(e){c().registerExtension(e)}var m={name:"bullet_list",create:()=>d,commands:{toggle_bullet_list:e=>e.chain().focus().toggleBulletList().run()},selection_keys:["bullet_list"],selection_state:e=>({bullet_list:e.isActive("bulletList")})};function ae(){g(m)}export{ae as register_bullet_list};
