@thebase/ui 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baseui.esm.js +2 -2
- package/dist/baseui.min.css +1 -1
- package/dist/baseui.min.js +2 -2
- package/dist/baseui.registry.json +6 -7
- package/dist/icons/lucide.json +2 -2
- package/dist/runtime/milkdown/apl-2VCEVXBO.js +1 -0
- package/dist/runtime/milkdown/asciiarmor-ND4TKJ2V.js +1 -0
- package/dist/runtime/milkdown/asn1-5NCC72L6.js +1 -0
- package/dist/runtime/milkdown/asterisk-V3QQOGYS.js +1 -0
- package/dist/runtime/milkdown/block-B3H3PJID.js +1 -0
- package/dist/runtime/milkdown/brainfuck-SETQDLAI.js +1 -0
- package/dist/runtime/milkdown/chunk-373V6XMI.js +1 -0
- package/dist/runtime/milkdown/chunk-37CATSBM.js +1 -0
- package/dist/runtime/{chunk-7R75J74M.js → milkdown/chunk-3EORQGKQ.js} +1 -1
- package/dist/runtime/milkdown/chunk-6HASM4ZR.js +1 -0
- package/dist/runtime/milkdown/chunk-6RGD2KUU.js +1 -0
- package/dist/runtime/milkdown/chunk-7CVS4AGG.js +3 -0
- package/dist/runtime/milkdown/chunk-BV6CAHIM.js +4 -0
- package/dist/runtime/milkdown/chunk-CS3PHHYU.js +0 -0
- package/dist/runtime/milkdown/chunk-E6JE25ZM.js +0 -0
- package/dist/runtime/{chunk-XLIC2WFB.js → milkdown/chunk-FGZNEC46.js} +1 -1
- package/dist/runtime/milkdown/chunk-FOZORPFE.js +1 -0
- package/dist/runtime/milkdown/chunk-GAWLLGNO.js +5 -0
- package/dist/runtime/milkdown/chunk-GHRUWTEV.js +1 -0
- package/dist/runtime/milkdown/chunk-GVZW4OO4.js +1 -0
- package/dist/runtime/milkdown/chunk-HDKYYBRG.js +0 -0
- package/dist/runtime/milkdown/chunk-KJCZ4UN6.js +1 -0
- package/dist/runtime/milkdown/chunk-KXKDEYCC.js +1 -0
- package/dist/runtime/milkdown/chunk-LIY3GISO.js +13 -0
- package/dist/runtime/milkdown/chunk-MSEQNMGN.js +0 -0
- package/dist/runtime/milkdown/chunk-PSGXCQNW.js +1 -0
- package/dist/runtime/milkdown/chunk-Q5FF4VKZ.js +1 -0
- package/dist/runtime/milkdown/chunk-R7FZKCAV.js +1 -0
- package/dist/runtime/milkdown/chunk-SFCQEU26.js +1 -0
- package/dist/runtime/milkdown/chunk-SMRDMV2Q.js +1 -0
- package/dist/runtime/milkdown/chunk-TTCZLSO2.js +1 -0
- package/dist/runtime/milkdown/chunk-UBIXYWAI.js +13 -0
- package/dist/runtime/milkdown/chunk-UPNN5QP4.js +3 -0
- package/dist/runtime/{streaming-WPAF6YN6.js → milkdown/chunk-VBVMNS5A.js} +2 -2
- package/dist/runtime/milkdown/chunk-VKELS2FZ.js +41 -0
- package/dist/runtime/milkdown/chunk-VPKKXG6L.js +1 -0
- package/dist/runtime/milkdown/chunk-VYL5RGSY.js +0 -0
- package/dist/runtime/milkdown/chunk-WGUKYDQQ.js +1 -0
- package/dist/runtime/milkdown/chunk-XOIKFU3P.js +4 -0
- package/dist/runtime/milkdown/chunk-XOU65PX7.js +1 -0
- package/dist/runtime/milkdown/clike-WKR6QU6G.js +1 -0
- package/dist/runtime/milkdown/clipboard-SGEGWVIL.js +1 -0
- package/dist/runtime/milkdown/clojure-7C5XMSLE.js +1 -0
- package/dist/runtime/milkdown/cmake-VX6UCCMV.js +1 -0
- package/dist/runtime/milkdown/cobol-IUBDOVSU.js +1 -0
- package/dist/runtime/milkdown/coffeescript-OEAM3K5M.js +1 -0
- package/dist/runtime/milkdown/commonlisp-LRFHKBQZ.js +1 -0
- package/dist/runtime/milkdown/commonmark-KYRQSFY7.js +1 -0
- package/dist/runtime/milkdown/core-SZ3VAN2E.js +1 -0
- package/dist/runtime/milkdown/crystal-7XKMI75H.js +1 -0
- package/dist/runtime/milkdown/css-DTJ74K4A.js +1 -0
- package/dist/runtime/milkdown/cursor-4RIJS7XF.js +1 -0
- package/dist/runtime/milkdown/cypher-Y7ZMLKQ4.js +1 -0
- package/dist/runtime/milkdown/d-NSEMXQMQ.js +1 -0
- package/dist/runtime/milkdown/diff-BO3JC62N.js +1 -0
- package/dist/runtime/milkdown/diff-WJOHA5PX.js +1 -0
- package/dist/runtime/milkdown/dist-5HJGMMBO.js +1 -0
- package/dist/runtime/milkdown/dist-63GMFB3D.js +1 -0
- package/dist/runtime/milkdown/dist-6JDVYEX3.js +1 -0
- package/dist/runtime/milkdown/dist-7277C2KF.js +1 -0
- package/dist/runtime/milkdown/dist-EG2OA4VS.js +7 -0
- package/dist/runtime/milkdown/dist-EHUNF6M5.js +1 -0
- package/dist/runtime/milkdown/dist-I3JGQGWS.js +3 -0
- package/dist/runtime/milkdown/dist-I3LMG6JF.js +1 -0
- package/dist/runtime/milkdown/dist-IIRHY5PY.js +6 -0
- package/dist/runtime/milkdown/dist-J2KSREXK.js +1 -0
- package/dist/runtime/milkdown/dist-KY7AL6FL.js +1 -0
- package/dist/runtime/milkdown/dist-QB3U2COU.js +1 -0
- package/dist/runtime/milkdown/dist-QMASZW6X.js +1 -0
- package/dist/runtime/milkdown/dist-RS6ERIZS.js +1 -0
- package/dist/runtime/milkdown/dist-TKSPPVS4.js +1 -0
- package/dist/runtime/milkdown/dist-U6ZG6DV6.js +1 -0
- package/dist/runtime/milkdown/dist-UHXLU77N.js +1 -0
- package/dist/runtime/milkdown/dist-WNQ5J4WR.js +2 -0
- package/dist/runtime/milkdown/dist-WWUPY2DM.js +1 -0
- package/dist/runtime/milkdown/dist-X2CT5LDV.js +1 -0
- package/dist/runtime/milkdown/dist-ZBCFN6O5.js +1 -0
- package/dist/runtime/milkdown/dockerfile-NAEEVAQU.js +1 -0
- package/dist/runtime/milkdown/dtd-3HSCMPBI.js +1 -0
- package/dist/runtime/milkdown/dylan-UCUZF6KU.js +1 -0
- package/dist/runtime/milkdown/ebnf-3LHOCFAJ.js +1 -0
- package/dist/runtime/milkdown/ecl-5R3NXF6N.js +1 -0
- package/dist/runtime/milkdown/eiffel-CQ4L5MSH.js +1 -0
- package/dist/runtime/milkdown/elm-6QYNGBQ3.js +1 -0
- package/dist/runtime/milkdown/erlang-6NH23EDV.js +1 -0
- package/dist/runtime/milkdown/esm-W3C6FIFD.js +997 -0
- package/dist/runtime/milkdown/factor-MYKNDQPQ.js +1 -0
- package/dist/runtime/milkdown/fcl-ACRUXLOI.js +1 -0
- package/dist/runtime/milkdown/forth-MGVKD22I.js +1 -0
- package/dist/runtime/milkdown/fortran-Y2LH5YJY.js +1 -0
- package/dist/runtime/milkdown/gas-DGW2BQT5.js +1 -0
- package/dist/runtime/milkdown/gfm-E3RPWLDM.js +1 -0
- package/dist/runtime/milkdown/gherkin-YE56IVZ5.js +1 -0
- package/dist/runtime/milkdown/groovy-ACMNYCLF.js +1 -0
- package/dist/runtime/milkdown/haskell-MIB6HZSL.js +1 -0
- package/dist/runtime/milkdown/haxe-TANQRBYK.js +1 -0
- package/dist/runtime/milkdown/history-MXXSC4BB.js +1 -0
- package/dist/runtime/milkdown/http-QUK2BL6J.js +1 -0
- package/dist/runtime/milkdown/idl-54U6ONEE.js +1 -0
- package/dist/runtime/milkdown/indent-DPZPSW7O.js +1 -0
- package/dist/runtime/milkdown/javascript-43PROIAY.js +1 -0
- package/dist/runtime/milkdown/julia-7E2ZIO2U.js +1 -0
- package/dist/runtime/milkdown/lib-OHEPSUTR.js +1 -0
- package/dist/runtime/milkdown/lib-ULUU3LBY.js +1 -0
- package/dist/runtime/milkdown/listener-YERMSFXE.js +1 -0
- package/dist/runtime/milkdown/livescript-SUEXR7PK.js +1 -0
- package/dist/runtime/milkdown/lua-QNGITPQK.js +1 -0
- package/dist/runtime/milkdown/mathematica-HJQQXVFC.js +1 -0
- package/dist/runtime/milkdown/mbox-F6SUCJVD.js +1 -0
- package/dist/runtime/{milkdown-editor.js → milkdown/milkdown-editor.js} +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -0
- package/dist/runtime/milkdown/mirc-7S5H76VB.js +1 -0
- package/dist/runtime/milkdown/mllike-TTW7I7W4.js +1 -0
- package/dist/runtime/milkdown/model-YUHBWZ3A.js +1 -0
- package/dist/runtime/milkdown/modelica-3POMKZFY.js +1 -0
- package/dist/runtime/milkdown/mscgen-IKAT43RT.js +1 -0
- package/dist/runtime/milkdown/mumps-XZE3RMGJ.js +1 -0
- package/dist/runtime/milkdown/nginx-QCVWU6DV.js +1 -0
- package/dist/runtime/milkdown/nsis-2G5LLGBI.js +1 -0
- package/dist/runtime/milkdown/ntriples-T6AMEY2C.js +1 -0
- package/dist/runtime/milkdown/octave-64EAJHKR.js +1 -0
- package/dist/runtime/milkdown/oz-7QHCZG72.js +1 -0
- package/dist/runtime/milkdown/pascal-KWNZTZKE.js +1 -0
- package/dist/runtime/milkdown/perl-KX75FRG7.js +1 -0
- package/dist/runtime/milkdown/pig-YA2LFBUW.js +1 -0
- package/dist/runtime/milkdown/powershell-SONNWKJG.js +1 -0
- package/dist/runtime/milkdown/properties-MEUWSNZY.js +1 -0
- package/dist/runtime/milkdown/protobuf-RKCPHWGY.js +1 -0
- package/dist/runtime/milkdown/pug-VWTHDU4H.js +1 -0
- package/dist/runtime/milkdown/puppet-JMZDB2TG.js +1 -0
- package/dist/runtime/milkdown/python-GVEPBHD7.js +1 -0
- package/dist/runtime/milkdown/q-QBK3FAEX.js +1 -0
- package/dist/runtime/milkdown/r-QZYPZHNL.js +1 -0
- package/dist/runtime/milkdown/rpm-DU7TLFAI.js +1 -0
- package/dist/runtime/milkdown/ruby-DMEPZV6P.js +1 -0
- package/dist/runtime/milkdown/sas-UQCOIXSD.js +1 -0
- package/dist/runtime/milkdown/scheme-ABXYL6GU.js +1 -0
- package/dist/runtime/milkdown/shell-M3XELTMZ.js +1 -0
- package/dist/runtime/milkdown/sieve-MUKKCDBZ.js +1 -0
- package/dist/runtime/milkdown/slash-WRZAFLVA.js +1 -0
- package/dist/runtime/milkdown/smalltalk-P4FKOVAU.js +1 -0
- package/dist/runtime/milkdown/solr-HHKG4NNK.js +1 -0
- package/dist/runtime/milkdown/sparql-5YJAIBWN.js +1 -0
- package/dist/runtime/milkdown/spreadsheet-M3SEYOFV.js +1 -0
- package/dist/runtime/milkdown/sql-Z6C3KTS5.js +1 -0
- package/dist/runtime/milkdown/stex-MO67FBMF.js +1 -0
- package/dist/runtime/milkdown/streaming-ODT2C2AX.js +1 -0
- package/dist/runtime/milkdown/stylus-JEMVT3OU.js +1 -0
- package/dist/runtime/milkdown/swift-HP7RYRJA.js +1 -0
- package/dist/runtime/milkdown/tcl-WPHRLNQC.js +1 -0
- package/dist/runtime/milkdown/textile-3LZDM6IW.js +1 -0
- package/dist/runtime/milkdown/theme/common/@milkdown/kit/prose/gapcursor/style/gapcursor.css +25 -0
- package/dist/runtime/milkdown/theme/common/@milkdown/kit/prose/tables/style/tables.css +48 -0
- package/dist/runtime/milkdown/theme/common/@milkdown/kit/prose/view/style/prosemirror.css +54 -0
- package/dist/runtime/milkdown/theme/common/ai.css +446 -0
- package/dist/runtime/milkdown/theme/common/block-edit.css +131 -0
- package/dist/runtime/milkdown/theme/common/code-mirror.css +347 -0
- package/dist/runtime/milkdown/theme/common/cursor.css +22 -0
- package/dist/runtime/milkdown/theme/common/diff.css +177 -0
- package/dist/runtime/milkdown/theme/common/image-block.css +384 -0
- package/dist/runtime/milkdown/theme/common/latex.css +42 -0
- package/dist/runtime/milkdown/theme/common/link-tooltip.css +107 -0
- package/dist/runtime/milkdown/theme/common/list-item.css +50 -0
- package/dist/runtime/milkdown/theme/common/placeholder.css +11 -0
- package/dist/runtime/milkdown/theme/common/prosemirror-virtual-cursor/style/virtual-cursor.css +51 -0
- package/dist/runtime/milkdown/theme/common/prosemirror.css +1 -0
- package/dist/runtime/milkdown/theme/common/reset.css +289 -0
- package/dist/runtime/milkdown/theme/common/style.css +15 -0
- package/dist/runtime/milkdown/theme/common/table.css +219 -0
- package/dist/runtime/milkdown/theme/common/toolbar.css +50 -0
- package/dist/runtime/milkdown/theme/common/top-bar.css +152 -0
- package/dist/runtime/milkdown/tiddlywiki-LMGAXCWG.js +1 -0
- package/dist/runtime/milkdown/tiki-SC7NYLRG.js +1 -0
- package/dist/runtime/milkdown/toml-VBRI3ILD.js +1 -0
- package/dist/runtime/milkdown/tooltip-MQR7E3GN.js +1 -0
- package/dist/runtime/milkdown/troff-MZNIC3MS.js +1 -0
- package/dist/runtime/milkdown/ttcn-ZUOU74GM.js +1 -0
- package/dist/runtime/milkdown/ttcn-cfg-2JJUM5CY.js +1 -0
- package/dist/runtime/milkdown/turtle-SNBPEJHA.js +1 -0
- package/dist/runtime/milkdown/upload-4DLRUKG7.js +1 -0
- package/dist/runtime/milkdown/utils-RGFMAFOI.js +1 -0
- package/dist/runtime/milkdown/vb-U45Y75DV.js +1 -0
- package/dist/runtime/milkdown/vbscript-XTRRB36U.js +1 -0
- package/dist/runtime/milkdown/velocity-Y7TX26SP.js +1 -0
- package/dist/runtime/milkdown/verilog-IFT4S6MZ.js +1 -0
- package/dist/runtime/milkdown/vhdl-CK4X465M.js +1 -0
- package/dist/runtime/milkdown/webidl-N7XOMHHB.js +1 -0
- package/dist/runtime/milkdown/xquery-EPMIEXTW.js +1 -0
- package/dist/runtime/{chunk-6X7NT7KH.js → milkdown/y-webrtc-MVXVFPYO.js} +2 -2
- package/dist/runtime/milkdown/yacas-A74LVH45.js +1 -0
- package/dist/runtime/{yjs-SRZJJJEG.js → milkdown/yjs-L4ZX4CJ5.js} +1 -1
- package/dist/runtime/milkdown/z80-NVBCD5FV.js +1 -0
- package/docs/components/markdown.md +2 -2
- package/docs/components/text-editor.md +37 -3
- package/package.json +3 -2
- package/dist/runtime/block-N5MIBOMO.js +0 -1
- package/dist/runtime/chunk-7R5G6FRT.js +0 -1
- package/dist/runtime/chunk-EAFZBBCI.js +0 -10
- package/dist/runtime/chunk-GF2LJCG5.js +0 -1
- package/dist/runtime/chunk-HKUJH2VC.js +0 -1
- package/dist/runtime/chunk-KX3KYRT7.js +0 -1
- package/dist/runtime/chunk-OESZ7FEN.js +0 -1
- package/dist/runtime/chunk-P3WV3MLS.js +0 -35
- package/dist/runtime/chunk-URTGZHMG.js +0 -3
- package/dist/runtime/clipboard-6EHVQ6GB.js +0 -4
- package/dist/runtime/commonmark-FAT3C7WA.js +0 -1
- package/dist/runtime/core-IEFFKRMW.js +0 -1
- package/dist/runtime/cursor-3BFXMKNC.js +0 -1
- package/dist/runtime/diff-ALMDXB3Z.js +0 -1
- package/dist/runtime/gfm-JUXF3E6O.js +0 -5
- package/dist/runtime/history-OU6CQBOY.js +0 -1
- package/dist/runtime/indent-RP5Y5HNK.js +0 -1
- package/dist/runtime/lib-TTIE4EGJ.js +0 -1
- package/dist/runtime/listener-JBODN3BE.js +0 -1
- package/dist/runtime/prosemirror-text-editor.js +0 -1
- package/dist/runtime/slash-I56NP4SS.js +0 -1
- package/dist/runtime/tooltip-XDWVKIO5.js +0 -1
- package/dist/runtime/upload-MYBCHYBD.js +0 -1
- package/dist/runtime/y-webrtc-WDTQEBWZ.js +0 -1
- /package/dist/runtime/{marked.min.js → marked/marked.min.js} +0 -0
- /package/dist/runtime/{mermaid.esm.min.mjs → mermaid/mermaid.esm.min.mjs} +0 -0
- /package/dist/runtime/{chunk-23NN352E.js → milkdown/chunk-23NN352E.js} +0 -0
- /package/dist/runtime/{chunk-SGGMD6DA.js → milkdown/chunk-E5R7FPWA.js} +0 -0
- /package/dist/runtime/{chunk-MAWHENWJ.js → milkdown/chunk-KOCVWYBK.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-23NN352E.js";function t(e){for(var n={},r=e.split(" "),o=0;o<r.length;++o)n[r[o]]=!0;return n}var a=t("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),f="(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)",u="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",p=new RegExp(f),d=new RegExp(u),k=new RegExp(u+"?_"+u),s=new RegExp(u+"\\s*\\(");function l(e,n){var r;if(r=e.next(),r==='"')return n.tokenize=v,n.tokenize(e,n);if(r==="/"){if(e.eat("*"))return n.tokenize=h,n.tokenize(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}e.backUp(1);var o=e.match(/^(\w+)\s*\(/,!1);o!==null&&a.hasOwnProperty(o[1])&&n.scopes.push("bodied");var i=c(n);if(i==="bodied"&&r==="["&&n.scopes.pop(),(r==="["||r==="{"||r==="(")&&n.scopes.push(r),i=c(n),(i==="["&&r==="]"||i==="{"&&r==="}"||i==="("&&r===")")&&n.scopes.pop(),r===";")for(;i==="bodied";)n.scopes.pop(),i=c(n);return e.match(/\d+ *#/,!0,!1)?"qualifier":e.match(p,!0,!1)?"number":e.match(k,!0,!1)?"variableName.special":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(s,!0,!1)?(e.backUp(1),"variableName.function"):e.match(d,!0,!1)?"variable":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function v(e,n){for(var r,o=!1,i=!1;(r=e.next())!=null;){if(r==='"'&&!i){o=!0;break}i=!i&&r==="\\"}return o&&!i&&(n.tokenize=l),"string"}function h(e,n){for(var r,o;(o=e.next())!=null;){if(r==="*"&&o==="/"){n.tokenize=l;break}r=o}return"comment"}function c(e){var n=null;return e.scopes.length>0&&(n=e.scopes[e.scopes.length-1]),n}var b={name:"yacas",startState:function(){return{tokenize:l,scopes:[]}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},indent:function(e,n,r){if(e.tokenize!==l&&e.tokenize!==null)return null;var o=0;return(n==="]"||n==="];"||n==="}"||n==="};"||n===");")&&(o=-1),(e.scopes.length+o)*r.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{b as yacas};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as d,$a as da,Aa as E,Ab as Ea,Ba as F,Bb as Fa,Ca as G,Cb as Ga,Da as H,Db as Ha,Ea as I,Eb as Ia,Fa as J,Fb as Ja,Ga as K,Gb as Ka,Ha as L,Hb as La,Ia as M,Ib as Ma,Ja as N,Jb as Na,Ka as O,Kb as Oa,La as P,Lb as Pa,Ma as Q,Mb as Qa,Na as R,Nb as Ra,Oa as S,Ob as Sa,Pa as T,Pb as Ta,Qa as U,Qb as Ua,Ra as V,Rb as Va,Sa as W,Sb as Wa,Ta as X,Ua as Y,Va as Z,Wa as _,Xa as $,Y as a,Ya as aa,Z as b,Za as ba,_ as c,_a as ca,aa as e,ab as ea,ba as f,bb as fa,ca as g,cb as ga,da as h,db as ha,ea as i,eb as ia,fa as j,fb as ja,ga as k,gb as ka,ha as l,hb as la,ia as m,ib as ma,ja as n,jb as na,ka as o,kb as oa,la as p,lb as pa,ma as q,mb as qa,na as r,nb as ra,oa as s,ob as sa,pa as t,pb as ta,qa as u,qb as ua,ra as v,rb as va,sa as w,sb as wa,ta as x,tb as xa,ua as y,ub as ya,va as z,vb as za,wa as A,wb as Aa,xa as B,xb as Ba,ya as C,yb as Ca,za as D,zb as Da}from"./chunk-
|
|
1
|
+
import{$ as d,$a as da,Aa as E,Ab as Ea,Ba as F,Bb as Fa,Ca as G,Cb as Ga,Da as H,Db as Ha,Ea as I,Eb as Ia,Fa as J,Fb as Ja,Ga as K,Gb as Ka,Ha as L,Hb as La,Ia as M,Ib as Ma,Ja as N,Jb as Na,Ka as O,Kb as Oa,La as P,Lb as Pa,Ma as Q,Mb as Qa,Na as R,Nb as Ra,Oa as S,Ob as Sa,Pa as T,Pb as Ta,Qa as U,Qb as Ua,Ra as V,Rb as Va,Sa as W,Sb as Wa,Ta as X,Ua as Y,Va as Z,Wa as _,Xa as $,Y as a,Ya as aa,Z as b,Za as ba,_ as c,_a as ca,aa as e,ab as ea,ba as f,bb as fa,ca as g,cb as ga,da as h,db as ha,ea as i,eb as ia,fa as j,fb as ja,ga as k,gb as ka,ha as l,hb as la,ia as m,ib as ma,ja as n,jb as na,ka as o,kb as oa,la as p,lb as pa,ma as q,mb as qa,na as r,nb as ra,oa as s,ob as sa,pa as t,pb as ta,qa as u,qb as ua,ra as v,rb as va,sa as w,sb as wa,ta as x,tb as xa,ua as y,ub as ya,va as z,vb as za,wa as A,wb as Aa,xa as B,xb as Ba,ya as C,yb as Ca,za as D,zb as Da}from"./chunk-E5R7FPWA.js";import"./chunk-23NN352E.js";export{E as AbsolutePosition,a as AbstractConnector,Ka as AbstractStruct,ua as AbstractType,za as Array,Sa as ContentAny,Ma as ContentBinary,Na as ContentDeleted,Oa as ContentDoc,Pa as ContentEmbed,Qa as ContentFormat,Ra as ContentJSON,Ta as ContentString,Ua as ContentType,h as Doc,La as GC,u as ID,Va as Item,Ba as Map,A as PermanentUserData,B as RelativePosition,Wa as Skip,K as Snapshot,Ea as Text,_ as Transaction,ba as UndoManager,i as UpdateDecoderV1,j as UpdateDecoderV2,k as UpdateEncoderV1,l as UpdateEncoderV2,Ga as XmlElement,Fa as XmlFragment,Ia as XmlHook,Ja as XmlText,ya as YArrayEvent,sa as YEvent,Aa as YMapEvent,Da as YTextEvent,Ha as YXmlEvent,p as applyUpdate,o as applyUpdateV2,Ca as cleanupYTextFormatting,v as compareIDs,J as compareRelativePositions,qa as convertUpdateFormatV1ToV2,ra as convertUpdateFormatV2ToV1,I as createAbsolutePositionFromRelativePosition,e as createDeleteSet,f as createDeleteSetFromStructStore,T as createDocFromSnapshot,w as createID,D as createRelativePositionFromJSON,F as createRelativePositionFromTypeIndex,Q as createSnapshot,H as decodeRelativePosition,P as decodeSnapshot,O as decodeSnapshotV2,s as decodeStateVector,ea as decodeUpdate,fa as decodeUpdateV2,na as diffUpdate,ma as diffUpdateV2,R as emptySnapshot,G as encodeRelativePosition,N as encodeSnapshot,M as encodeSnapshotV2,r as encodeStateAsUpdate,q as encodeStateAsUpdateV2,t as encodeStateVector,ia as encodeStateVectorFromUpdate,ha as encodeStateVectorFromUpdateV2,g as equalDeleteSets,L as equalSnapshots,W as findIndexSS,x as findRootTypeKey,X as getItem,Z as getItemCleanEnd,Y as getItemCleanStart,V as getState,ta as getTypeChildren,c as isDeleted,y as isParentOf,b as iterateDeletedStructs,z as logType,ca as logUpdate,da as logUpdateV2,d as mergeDeleteSets,ga as mergeUpdates,la as mergeUpdatesV2,oa as obfuscateUpdate,pa as obfuscateUpdateV2,ka as parseUpdateMeta,ja as parseUpdateMetaV2,n as readUpdate,m as readUpdateV2,C as relativePositionToJSON,S as snapshot,U as snapshotContainsUpdate,aa as transact,$ as tryGc,va as typeListToArraySnapshot,xa as typeMapGetAllSnapshot,wa as typeMapGetSnapshot};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-23NN352E.js";function o(t){var n,l;t?(n=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,l=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(n=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,l=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var u=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,d=/^(n?[zc]|p[oe]?|m)\b/i,f=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,c=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:"z80",startState:function(){return{context:0}},token:function(e,r){if(e.column()||(r.context=0),e.eatSpace())return null;var i;if(e.eatWhile(/\w/))if(t&&e.eat(".")&&e.eatWhile(/\w/),i=e.current(),e.indentation()){if((r.context==1||r.context==4)&&u.test(i))return r.context=4,"variable";if(r.context==2&&d.test(i))return r.context=4,"variableName.special";if(n.test(i))return r.context=1,"keyword";if(l.test(i))return r.context=2,"keyword";if(r.context==4&&c.test(i))return"number";if(f.test(i))return"error"}else return e.match(c)?"number":null;else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(i=e.next())&&i!='"';)i=="\\"&&e.next();return"string"}else if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(r.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}}var a=o(!1),s=o(!0);export{s as ez80,a as z80};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Markdown
|
|
2
2
|
|
|
3
|
-
Use `b-ui="markdown"` (or the pure Owl `Markdown` component) to render Markdown or mount an editable Markdown document. Read-only parsing uses the vendored `src/runtime/marked.min.js` (marked v15). Fenced ` ```mermaid ` code blocks render as inline SVG via `src/runtime/mermaid.esm.min.mjs`. Fenced ` ```base-ui ` code blocks render as a live BaseUI preview through the page's global static runtime (`window.BaseUI`, e.g. `dist/baseui.min.js`).
|
|
3
|
+
Use `b-ui="markdown"` (or the pure Owl `Markdown` component) to render Markdown or mount an editable Markdown document. Read-only parsing uses the vendored `src/runtime/marked/marked.min.js` (marked v15). Fenced ` ```mermaid ` code blocks render as inline SVG via `src/runtime/mermaid/mermaid.esm.min.mjs`. Fenced ` ```base-ui ` code blocks render as a live BaseUI preview through the page's global static runtime (`window.BaseUI`, e.g. `dist/baseui.min.js`).
|
|
4
4
|
|
|
5
|
-
Editable mode lazy-loads `dist/runtime/milkdown-editor.js`, which bundles Milkdown, Yjs, and y-webrtc only when `b-att-editable="true"` / `editable="true"` is used. The editor runtime enables CommonMark, GFM, history, clipboard, cursor, listener, indent, upload, block handle, tooltip, slash, streaming, and diff plugins. Collaborative mode uses Milkdown's Yjs-aware collab undo/redo instead of the plain history stack.
|
|
5
|
+
Editable mode lazy-loads `dist/runtime/milkdown/milkdown-editor.js`, which bundles Milkdown, Yjs, and y-webrtc only when `b-att-editable="true"` / `editable="true"` is used. The editor runtime enables CommonMark, GFM, history, clipboard, cursor, listener, indent, upload, block handle, tooltip, slash, streaming, and diff plugins. Collaborative mode uses Milkdown's Yjs-aware collab undo/redo instead of the plain history stack.
|
|
6
6
|
|
|
7
7
|
## CDN install requirements
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Text Editor
|
|
2
2
|
|
|
3
|
-
Use `b-ui="text-editor"` (or the pure Owl `TextEditor` component) for WYSIWYG rich-text editing backed by ProseMirror. The editor runtime is lazy-loaded from `dist/runtime/
|
|
3
|
+
Use `b-ui="text-editor"` (or the pure Owl `TextEditor` component) for WYSIWYG rich-text editing backed by [Milkdown](https://milkdown.dev/) (ProseMirror + a Markdown-aware schema, via `@milkdown/kit`). The editor runtime is lazy-loaded from `dist/runtime/milkdown/milkdown-text-editor.js`, so the default BaseUI bundle stays small until an editor is actually mounted. `content`/`onChange` still deal in HTML — Milkdown's document is converted to/from HTML at the boundary, so nothing in this contract changes even though the engine now understands Markdown natively (e.g. typing a leading `#`, `**bold**`, or `1.` auto-formats as you type).
|
|
4
4
|
|
|
5
|
-
Collaborative mode uses Yjs,
|
|
5
|
+
Collaborative mode uses Yjs, `@milkdown/plugin-collab`, and y-webrtc. Use `room` / `b-att-room` to put editors in the same peer-to-peer document, `password` / `b-att-password` for y-webrtc room encryption, and `signaling` / `b-att-signaling` to override signaling servers.
|
|
6
6
|
|
|
7
7
|
## Pure Owl Component
|
|
8
8
|
|
|
@@ -61,10 +61,44 @@ Enable peer-to-peer collaborative editing with Yjs + y-webrtc:
|
|
|
61
61
|
|
|
62
62
|
## Events
|
|
63
63
|
|
|
64
|
-
- `baseui:text-editor-ready` — fired after
|
|
64
|
+
- `baseui:text-editor-ready` — fired after the Milkdown editor mounts (`detail.collaborative`, `detail.room`).
|
|
65
65
|
- `baseui:text-editor-change` — fired whenever the rich-text document emits a new HTML string (`detail.html`, `detail.previousHtml`).
|
|
66
66
|
- `baseui:text-editor-error` — fired when fetching or editor mounting fails (`detail.error`).
|
|
67
67
|
|
|
68
68
|
## Methods
|
|
69
69
|
|
|
70
70
|
Use the global runtime methods: `BaseUI.mount()`, `BaseUI.mountAll()`, and `BaseUI.destroy()`.
|
|
71
|
+
|
|
72
|
+
## Milkdown plugins included
|
|
73
|
+
|
|
74
|
+
Every editor instance registers the full set of official Milkdown plugins (`src/runtime/milkdown/milkdown-text-editor.js`), on top of the `preset-commonmark`/`preset-gfm` schema:
|
|
75
|
+
|
|
76
|
+
- `plugin-clipboard`, `plugin-cursor` (gap/drop cursor), `plugin-trailing` (always-present trailing paragraph), `plugin-listener` — editing-quality-of-life, no visible UI of their own.
|
|
77
|
+
- `plugin-history` (single-user undo/redo) or `plugin-collab` (Yjs-backed collaborative undo/redo, see below) — whichever applies to the current mode.
|
|
78
|
+
- `plugin-upload` — drag-and-drop or paste an image file and it's inserted inline as a base64 `data:` URL. No server/uploader configuration needed.
|
|
79
|
+
- `plugin-prism` — syntax highlighting for fenced code blocks (`refractor`, self-contained — JS/TS, Python, Go, Rust, SQL, YAML, JSON, Bash, and more out of the box).
|
|
80
|
+
- `@milkdown/plugin-emoji` — type `:smile:` and it's replaced with an inline Twemoji image (fetched from `cdn.jsdelivr.net` — requires network access for the glyph images).
|
|
81
|
+
- `plugin-tooltip` — a small floating hint appears on text selection (minimal placeholder today, matching the same level of integration already used by the `Markdown` component).
|
|
82
|
+
- `plugin-slash` — type `/` at the start of a line to open a filterable command menu (Paragraph, Heading 1/2, Quote, Bullet/Numbered list). Keep typing to filter, navigate with ArrowUp/ArrowDown, and pick with Enter/Tab/click; Escape dismisses it.
|
|
83
|
+
- `plugin-block` — hover a block to reveal a `::` drag handle at its left edge.
|
|
84
|
+
- `plugin-diff` / `plugin-streaming` — headless: no built-in UI, exposed on the mounted handle as `handle.diff` / `handle.streaming` (see below) for a host app to build review/AI-streaming UX on top of.
|
|
85
|
+
|
|
86
|
+
`@milkdown/plugin-indent` is intentionally **not** included — its Tab shortcut for inserting literal indentation conflicts with `preset-commonmark`'s own Tab/Shift-Tab list sink/lift keymap.
|
|
87
|
+
|
|
88
|
+
## Programmatic diff review and streaming
|
|
89
|
+
|
|
90
|
+
The object returned by `mountTextEditorRuntime()` (and stored as `editorHandle` in `text-editor.component.js`/`text-editor.js`) exposes two extra namespaces beyond `focus()`/`getHTML()`/`setHTML()`/`destroy()`:
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
// Stage a suggested revision (e.g. from an LLM) and let the user accept/reject it.
|
|
94
|
+
await editorHandle.diff.startFromHTML("<p>Revised paragraph.</p>");
|
|
95
|
+
const pending = editorHandle.diff.getPendingChanges(); // render your own accept/reject UI from this
|
|
96
|
+
editorHandle.diff.acceptChunk(0); // or .rejectChunk(0), .acceptAll(), .clear()
|
|
97
|
+
|
|
98
|
+
// Type streamed tokens into the doc live (e.g. as an LLM response arrives).
|
|
99
|
+
editorHandle.streaming.start({ insertAt: "cursor" });
|
|
100
|
+
editorHandle.streaming.pushChunk("...next token...");
|
|
101
|
+
editorHandle.streaming.end(); // or .abort()
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Both plugins ship with no visual decoration of their own — `getPendingChanges()` returns plain data for you to render, and `streaming` just mutates the document as chunks arrive. `diff.startFromMarkdown(markdown)` is also available if you already have a Markdown string instead of HTML.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thebase/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "CDN-installable Owl and Bootstrap 5 UI component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/baseui.min.js",
|
|
@@ -62,9 +62,10 @@
|
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
+
"@milkdown/crepe": "^7.22.1",
|
|
65
66
|
"@milkdown/kit": "^7.22.1",
|
|
66
67
|
"@milkdown/plugin-collab": "^7.22.1",
|
|
67
|
-
"
|
|
68
|
+
"@milkdown/plugin-emoji": "^7.22.1",
|
|
68
69
|
"y-protocols": "^1.0.7",
|
|
69
70
|
"y-webrtc": "^10.3.0",
|
|
70
71
|
"yjs": "^13.6.32"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as rt,d as nt,e as ot}from"./chunk-MAWHENWJ.js";import{b as st}from"./chunk-OESZ7FEN.js";import{e as it,g as I}from"./chunk-GF2LJCG5.js";import{E as R,J as et,Q as Y}from"./chunk-P3WV3MLS.js";import{u as V,x as Z,y as tt}from"./chunk-EAFZBBCI.js";import{f as e,g as o,h as r,i as Q}from"./chunk-23NN352E.js";function U(t,s){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...s}}),t}var mt=t=>!et(s=>s.type.name==="table")(t),X=I({filterNodes:mt},"blockConfig");U(X,{displayName:"Ctx<blockConfig>"});function pt(t,s,i){if(!t.dom.parentElement)return null;try{let a=t.posAtCoords({left:s.x,top:s.y})?.inside;if(a==null||a<0)return null;let n=t.state.doc.resolve(a),l=t.state.doc.nodeAt(a),g=t.nodeDOM(a),C=L=>{let ft=n.depth>=1&&n.index(n.depth)===0;if(!(L||ft))return;let W=n.before(n.depth);l=t.state.doc.nodeAt(W),g=t.nodeDOM(W),n=t.state.doc.resolve(W),i(n,l)||C(!0)};return C(!i(n,l)),!g||!l?null:{node:l,$pos:n,el:g}}catch{return null}}var at=R.ie&&R.ie_version<15||R.ios&&R.webkit_version<604,lt=20,x,A,m,c,E,d,u,dt,w,k,b,H,S,D,T,P,$,p,ht,kt=(ht=class{constructor(){o(this,u);o(this,x);o(this,A);o(this,m);o(this,c);o(this,E);o(this,d);o(this,k);o(this,b);o(this,H);o(this,S);o(this,D);o(this,T);o(this,P);o(this,$);o(this,p);r(this,A,()=>{if(!e(this,c))return null;let t=e(this,c),s=e(this,u,w);if(r(this,m,null),s&&V.isSelectable(t.node)){let i=V.create(s.state.doc,t.$pos.pos);return s.dispatch(s.state.tr.setSelection(i)),s.focus(),r(this,m,i),i}return null}),r(this,m,null),r(this,c,null),r(this,E,void 0),r(this,d,!1),r(this,b,()=>{var t;(t=e(this,k))==null||t.call(this,{type:"hide"}),r(this,c,null)}),r(this,H,t=>{var s;r(this,c,t),(s=e(this,k))==null||s.call(this,{type:"show",active:t})}),this.bind=(t,s)=>{r(this,x,t),r(this,k,s)},this.addEvent=t=>{t.addEventListener("mousedown",e(this,S)),t.addEventListener("mouseup",e(this,D)),t.addEventListener("dragstart",e(this,T)),t.addEventListener("dragend",e(this,P))},this.removeEvent=t=>{t.removeEventListener("mousedown",e(this,S)),t.removeEventListener("mouseup",e(this,D)),t.removeEventListener("dragstart",e(this,T)),t.removeEventListener("dragend",e(this,P))},this.unBind=()=>{r(this,k,void 0)},r(this,S,()=>{r(this,E,e(this,c)?.el.getBoundingClientRect()),e(this,A).call(this)}),r(this,D,()=>{if(!e(this,d)){requestAnimationFrame(()=>{e(this,E)&&e(this,u,w)?.focus()});return}r(this,d,!1),r(this,m,null)}),r(this,T,t=>{r(this,d,!0);let s=e(this,u,w);if(!s)return;s.dom.dataset.dragging="true";let i=e(this,m);if(t.dataTransfer&&i){let a=i.content();t.dataTransfer.effectAllowed="copyMove";let{dom:n,text:l}=s.serializeForClipboard(a);t.dataTransfer.clearData(),t.dataTransfer.setData(at?"Text":"text/html",n.innerHTML),at||t.dataTransfer.setData("text/plain",l);let g=e(this,c)?.el;g&&t.dataTransfer.setDragImage(g,0,0),s.dragging={slice:a,move:!0,node:i}}}),r(this,P,()=>{let t=e(this,u,w);if(!t)return;e(this,p).call(this,t);let s=t.dragging;window.setTimeout(()=>{t.dragging===s&&(t.dragging=null)},50)}),this.keydownCallback=t=>(e(this,b).call(this),r(this,d,!1),t.dom.dataset.dragging="false",!1),r(this,$,st((t,s)=>{if(!t.editable)return;let i=t.dom.getBoundingClientRect(),a=i.left+i.width/2;if(!(t.root.elementFromPoint(a,s.clientY)instanceof Element)){e(this,b).call(this);return}let n=e(this,u,dt);if(!n)return;let l=pt(t,{x:a,y:s.clientY},n);if(!l){e(this,b).call(this);return}e(this,H).call(this,l)},200)),this.mousemoveCallback=(t,s)=>(t.composing||!t.editable||e(this,$).call(this,t,s),!1),this.dragoverCallback=(t,s)=>{if(e(this,d)){let i=e(this,u,w)?.dom.parentElement;if(!i)return!1;let a=i.scrollHeight>i.clientHeight,n=i.getBoundingClientRect();if(a){if(i.scrollTop>0&&Math.abs(s.y-n.y)<lt)return i.scrollTop=i.scrollTop>10?i.scrollTop-10:0,!1;let l=Math.round(t.dom.getBoundingClientRect().height);if(Math.round(i.scrollTop+n.height)<l&&Math.abs(s.y-(n.height+n.y))<lt)return i.scrollTop=i.scrollTop+10,!1}}return!1},this.dragenterCallback=t=>{t.dragging&&(r(this,d,!0),t.dom.dataset.dragging="true")},this.dragleaveCallback=(t,s)=>{let i=s.clientX,a=s.clientY;(i<0||a<0||i>window.innerWidth||a>window.innerHeight)&&(r(this,c,null),e(this,p).call(this,t))},this.dropCallback=t=>(e(this,p).call(this,t),!1),this.dragendCallback=t=>{e(this,p).call(this,t)},r(this,p,t=>{r(this,d,!1),t.dom.dataset.dragging="false"})}},x=new WeakMap,A=new WeakMap,m=new WeakMap,c=new WeakMap,E=new WeakMap,d=new WeakMap,u=new WeakSet,dt=function(){try{return e(this,x)?.get(X.key).filterNodes}catch{return}},w=function(){return e(this,x)?.get(Y)},k=new WeakMap,b=new WeakMap,H=new WeakMap,S=new WeakMap,D=new WeakMap,T=new WeakMap,P=new WeakMap,$=new WeakMap,p=new WeakMap,ht),G=I(()=>new kt,"blockService"),j=I({},"blockServiceInstance");U(G,{displayName:"Ctx<blockService>"});U(j,{displayName:"Ctx<blockServiceInstance>"});var q=I({},"blockSpec");U(q,{displayName:"Ctx<blockSpec>"});var J=it(t=>{let s=new tt("MILKDOWN_BLOCK"),i=t.get(G.key)();t.set(j.key,i);let a=t.get(q.key);return new Z({key:s,...a,props:{...a.props,handleDOMEvents:{drop:n=>i.dropCallback(n),pointermove:(n,l)=>i.mousemoveCallback(n,l),keydown:n=>i.keydownCallback(n),dragover:(n,l)=>i.dragoverCallback(n,l),dragleave:(n,l)=>i.dragleaveCallback(n,l),dragenter:n=>i.dragenterCallback(n),dragend:n=>i.dragendCallback(n)}}})});U(J,{displayName:"Prose<block>"});var h,f,v,y,F,M,K,z,B,N,O,_,ut,ct,Et=(ct=class{constructor(t){o(this,_);o(this,h);o(this,f);o(this,v);o(this,y);o(this,F);o(this,M);o(this,K);o(this,z);o(this,B);o(this,N);o(this,O);r(this,y,null),r(this,M,!1),this.update=()=>{requestAnimationFrame(()=>{if(!e(this,M))try{Q(this,_,ut).call(this),r(this,M,!0)}catch{}})},this.destroy=()=>{e(this,v)?.unBind(),e(this,v)?.removeEvent(e(this,h)),e(this,h).remove()},this.show=s=>{let i=s.el,a=e(this,f).get(Y).dom,n={ctx:e(this,f),active:s,editorDom:a,blockDom:e(this,h)},l={contextElement:i,getBoundingClientRect:()=>e(this,N)?e(this,N).call(this,n):i.getBoundingClientRect()},g=[nt()];if(e(this,B)){let C=e(this,B).call(this,n),L=rt(C);g.push(L)}ot(l,e(this,h),{placement:e(this,O)?e(this,O).call(this,n):"left",middleware:[...g,...e(this,K)],...e(this,z)}).then(({x:C,y:L})=>{Object.assign(e(this,h).style,{left:`${C}px`,top:`${L}px`}),e(this,h).dataset.show="true"}).catch(console.error)},this.hide=()=>{e(this,h).dataset.show="false"},r(this,f,t.ctx),r(this,h,t.content),r(this,B,t.getOffset),r(this,N,t.getPosition),r(this,O,t.getPlacement),r(this,K,t.middleware??[]),r(this,z,t.floatingUIOptions??{}),r(this,F,t.root),this.hide()}get active(){return e(this,y)}},h=new WeakMap,f=new WeakMap,v=new WeakMap,y=new WeakMap,F=new WeakMap,M=new WeakMap,K=new WeakMap,z=new WeakMap,B=new WeakMap,N=new WeakMap,O=new WeakMap,_=new WeakSet,ut=function(){let t=e(this,f).get(Y);(e(this,F)??t.dom.parentElement??document.body).appendChild(e(this,h));let s=e(this,f).get(j.key);s.bind(e(this,f),i=>{i.type==="hide"?(this.hide(),r(this,y,null)):i.type==="show"&&(this.show(i.active),r(this,y,i.active))}),r(this,v,s),e(this,v).addEvent(e(this,h)),e(this,h).draggable=!0},ct),gt=[q,X,G,j,J];gt.key=q.key;gt.pluginKey=J.key;export{Et as BlockProvider,kt as BlockService,gt as block,X as blockConfig,J as blockPlugin,G as blockService,j as blockServiceInstance,q as blockSpec,mt as defaultNodeFilter};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u,c as y,d as O,l as $,m as L,n as M,o as C,p as A,r as b}from"./chunk-EAFZBBCI.js";var D=["ol",0],S=["ul",0],v=["li",0],J={attrs:{order:{default:1,validate:"number"}},parseDOM:[{tag:"ol",getAttrs(l){return{order:l.hasAttribute("start")?+l.getAttribute("start"):1}}}],toDOM(l){return l.attrs.order==1?D:["ol",{start:l.attrs.order},0]}},N={parseDOM:[{tag:"ul"}],toDOM(){return S}},W={parseDOM:[{tag:"li"}],toDOM(){return v},defining:!0};function E(l,e=null){return function(n,r){let{$from:t,$to:o}=n.selection,i=t.blockRange(o);if(!i)return!1;let f=r?n.tr:null;return R(f,i,l,e)?(r&&r(f.scrollIntoView()),!0):!1}}function R(l,e,n,r=null){let t=!1,o=e,i=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let d=i.resolve(e.start-2);o=new O(d,d,e.depth),e.endIndex<e.parent.childCount&&(e=new O(e.$from,i.resolve(e.$to.end(e.depth)),e.depth)),t=!0}let f=M(o,n,r,e);return f?(l&&z(l,e,f,t,n),!0):!1}function z(l,e,n,r,t){let o=u.empty;for(let s=n.length-1;s>=0;s--)o=u.from(n[s].type.create(n[s].attrs,o));l.step(new $(e.start-(r?2:0),e.end,e.start,e.end,new y(o,0,0),n.length,!0));let i=0;for(let s=0;s<n.length;s++)n[s].type==t&&(i=s+1);let f=n.length-i,d=e.start+n.length-(r?2:0),p=e.parent;for(let s=e.startIndex,c=e.endIndex,a=!0;s<c;s++,a=!1)!a&&C(l.doc,d,f)&&(l.split(d,f),d+=2*f),d+=p.child(s).nodeSize;return l}function K(l,e){return function(n,r){let{$from:t,$to:o,node:i}=n.selection;if(i&&i.isBlock||t.depth<2||!t.sameParent(o))return!1;let f=t.node(-1);if(f.type!=l)return!1;if(t.parent.content.size==0&&t.node(-1).childCount==t.indexAfter(-1)){if(t.depth==3||t.node(-3).type!=l||t.index(-2)!=t.node(-2).childCount-1)return!1;if(r){let c=u.empty,a=t.index(-1)?1:t.index(-2)?2:3;for(let x=t.depth-a;x>=t.depth-3;x--)c=u.from(t.node(x).copy(c));let m=t.indexAfter(-1)<t.node(-2).childCount?1:t.indexAfter(-2)<t.node(-3).childCount?2:3;c=c.append(u.from(l.createAndFill()));let I=t.before(t.depth-(a-1)),h=n.tr.replace(I,t.after(-m),new y(c,4-a,0)),w=-1;h.doc.nodesBetween(I,h.doc.content.size,(x,k)=>{if(w>-1)return!1;x.isTextblock&&x.content.size==0&&(w=k+1)}),w>-1&&h.setSelection(b.near(h.doc.resolve(w))),r(h.scrollIntoView())}return!0}let d=o.pos==t.end()?f.contentMatchAt(0).defaultType:null,p=n.tr.delete(t.pos,o.pos),s=d?[e?{type:l,attrs:e}:null,{type:d}]:void 0;return C(p.doc,t.pos,2,s)?(r&&r(p.split(t.pos,2,s).scrollIntoView()),!0):!1}}function q(l){return function(e,n){let{$from:r,$to:t}=e.selection,o=r.blockRange(t,i=>i.childCount>0&&i.firstChild.type==l);return o?n?r.node(o.depth-1).type==l?B(e,n,l,o):V(e,n,o):!0:!1}}function B(l,e,n,r){let t=l.tr,o=r.end,i=r.$to.end(r.depth);o<i&&(t.step(new $(o-1,i,o,i,new y(u.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new O(t.doc.resolve(r.$from.pos),t.doc.resolve(i),r.depth));let f=L(r);if(f==null)return!1;t.lift(r,f);let d=t.doc.resolve(t.mapping.map(o,-1)-1);return A(t.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&t.join(d.pos),e(t.scrollIntoView()),!0}function V(l,e,n){let r=l.tr,t=n.parent;for(let m=n.end,I=n.endIndex-1,h=n.startIndex;I>h;I--)m-=t.child(I).nodeSize,r.delete(m-1,m+1);let o=r.doc.resolve(n.start),i=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let f=n.startIndex==0,d=n.endIndex==t.childCount,p=o.node(-1),s=o.index(-1);if(!p.canReplace(s+(f?0:1),s+1,i.content.append(d?u.empty:u.from(t))))return!1;let c=o.pos,a=c+i.nodeSize;return r.step(new $(c-(f?1:0),a+(d?1:0),c+1,a-1,new y((f?u.empty:u.from(t.copy(u.empty))).append(d?u.empty:u.from(t.copy(u.empty))),f?0:1,d?0:1),f?0:1)),e(r.scrollIntoView()),!0}function H(l){return function(e,n){let{$from:r,$to:t}=e.selection,o=r.blockRange(t,p=>p.childCount>0&&p.firstChild.type==l);if(!o)return!1;let i=o.startIndex;if(i==0)return!1;let f=o.parent,d=f.child(i-1);if(d.type!=l)return!1;if(n){let p=d.lastChild&&d.lastChild.type==f.type,s=u.from(p?l.create():null),c=new y(u.from(l.create(null,u.from(f.type.create(null,s)))),p?3:1,0),a=o.start,m=o.end;n(e.tr.step(new $(a-(p?3:1),m,a,m,c,1,!0)).scrollIntoView())}return!0}}export{J as a,N as b,W as c,E as d,K as e,q as f,H as g};
|