@milkdown/crepe 7.3.3

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.
Files changed (241) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/lib/apl-p0IPP13W.js +76 -0
  4. package/lib/asciiarmor-lJsBxlJJ.js +34 -0
  5. package/lib/asn1-Q9v1zIy5.js +102 -0
  6. package/lib/asterisk-foNkeTjy.js +273 -0
  7. package/lib/brainfuck-0XqyXpNS.js +35 -0
  8. package/lib/clike-ak6Z6Yhe.js +639 -0
  9. package/lib/clojure-iYO8U8Sg.js +810 -0
  10. package/lib/clsx-7d8NmkQq.js +21 -0
  11. package/lib/cmake-SVzjkxV_.js +28 -0
  12. package/lib/cobol-APHEnAOX.js +74 -0
  13. package/lib/coffeescript-KqQa0SYG.js +182 -0
  14. package/lib/commonlisp-bwqNqR5V.js +79 -0
  15. package/lib/core/crepe.d.ts +21 -0
  16. package/lib/core/crepe.d.ts.map +1 -0
  17. package/lib/core/index.d.ts +3 -0
  18. package/lib/core/index.d.ts.map +1 -0
  19. package/lib/core/slice.d.ts +12 -0
  20. package/lib/core/slice.d.ts.map +1 -0
  21. package/lib/crystal-BViWuDpA.js +217 -0
  22. package/lib/css-KHXHXfXg.js +1572 -0
  23. package/lib/cypher-XpTt4zQ3.js +69 -0
  24. package/lib/d-fLig6yqY.js +139 -0
  25. package/lib/diff-WoKGLpy6.js +18 -0
  26. package/lib/dockerfile-u6f6Vw2s.js +194 -0
  27. package/lib/dtd-SIJRUW6K.js +91 -0
  28. package/lib/dylan-4HCLhpWP.js +238 -0
  29. package/lib/ebnf-h_0lged5.js +77 -0
  30. package/lib/ecl-Lf4FF0lf.js +133 -0
  31. package/lib/eiffel-qlw8KUyf.js +112 -0
  32. package/lib/elm-QRnB3zXs.js +108 -0
  33. package/lib/erlang-fyVKb7eK.js +488 -0
  34. package/lib/factor-BEeN4upY.js +65 -0
  35. package/lib/fcl-lRek3hEb.js +106 -0
  36. package/lib/feature/block-edit/handle/component.d.ts +9 -0
  37. package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
  38. package/lib/feature/block-edit/handle/index.d.ts +12 -0
  39. package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
  40. package/lib/feature/block-edit/index.d.ts +3 -0
  41. package/lib/feature/block-edit/index.d.ts.map +1 -0
  42. package/lib/feature/block-edit/menu/component.d.ts +14 -0
  43. package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
  44. package/lib/feature/block-edit/menu/config.d.ts +21 -0
  45. package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
  46. package/lib/feature/block-edit/menu/icons.d.ts +14 -0
  47. package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
  48. package/lib/feature/block-edit/menu/index.d.ts +9 -0
  49. package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
  50. package/lib/feature/code-mirror/index.d.ts +3 -0
  51. package/lib/feature/code-mirror/index.d.ts.map +1 -0
  52. package/lib/feature/gap-cursor/index.d.ts +3 -0
  53. package/lib/feature/gap-cursor/index.d.ts.map +1 -0
  54. package/lib/feature/image-block/index.d.ts +3 -0
  55. package/lib/feature/image-block/index.d.ts.map +1 -0
  56. package/lib/feature/index.d.ts +18 -0
  57. package/lib/feature/index.d.ts.map +1 -0
  58. package/lib/feature/link-tooltip/consts.d.ts +5 -0
  59. package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
  60. package/lib/feature/link-tooltip/index.d.ts +3 -0
  61. package/lib/feature/link-tooltip/index.d.ts.map +1 -0
  62. package/lib/feature/list-item/consts.d.ts +2 -0
  63. package/lib/feature/list-item/consts.d.ts.map +1 -0
  64. package/lib/feature/list-item/index.d.ts +3 -0
  65. package/lib/feature/list-item/index.d.ts.map +1 -0
  66. package/lib/feature/placeholder/index.d.ts +10 -0
  67. package/lib/feature/placeholder/index.d.ts.map +1 -0
  68. package/lib/feature/shared.d.ts +3 -0
  69. package/lib/feature/shared.d.ts.map +1 -0
  70. package/lib/feature/toolbar/component.d.ts +13 -0
  71. package/lib/feature/toolbar/component.d.ts.map +1 -0
  72. package/lib/feature/toolbar/consts.d.ts +5 -0
  73. package/lib/feature/toolbar/consts.d.ts.map +1 -0
  74. package/lib/feature/toolbar/index.d.ts +3 -0
  75. package/lib/feature/toolbar/index.d.ts.map +1 -0
  76. package/lib/forth-ua2bRd8T.js +60 -0
  77. package/lib/fortran-WnF7znuN.js +443 -0
  78. package/lib/gas-wowve1o7.js +183 -0
  79. package/lib/gherkin-m7GIChu3.js +34 -0
  80. package/lib/go-th443Dhb.js +158 -0
  81. package/lib/groovy-tR4RiZnc.js +161 -0
  82. package/lib/haskell-jxVBofv5.js +375 -0
  83. package/lib/haxe-kWPI2tq3.js +390 -0
  84. package/lib/hooks-82sqkbtE.js +21 -0
  85. package/lib/http-3GIFWUlG.js +45 -0
  86. package/lib/icons-HYkfuR-O.js +50 -0
  87. package/lib/idl-PvpMZg-l.js +947 -0
  88. package/lib/index-0RbcZMbq.js +8 -0
  89. package/lib/index-4afXjFMY.js +517 -0
  90. package/lib/index-7MeyepDG.js +78 -0
  91. package/lib/index-7QgQq3x3.js +551 -0
  92. package/lib/index-7pgP6qYs.js +107 -0
  93. package/lib/index-8DvtgRVa.js +19511 -0
  94. package/lib/index-8Gg-jEP4.js +288 -0
  95. package/lib/index-8S8qcncB.js +507 -0
  96. package/lib/index-9A_GmGh4.js +1039 -0
  97. package/lib/index-EJJfYLzA.js +928 -0
  98. package/lib/index-Eg39w5kL.js +984 -0
  99. package/lib/index-FIk_7oPb.js +168 -0
  100. package/lib/index-LlbrXb_n.js +368 -0
  101. package/lib/index-MovKtgMG.js +121 -0
  102. package/lib/index-N9GtIS4X.js +64 -0
  103. package/lib/index-Pwn25-kf.js +8 -0
  104. package/lib/index-SdFSDosa.js +1295 -0
  105. package/lib/index-W5Th22-Z.js +1744 -0
  106. package/lib/index-XiXSFLmI.js +20975 -0
  107. package/lib/index-bknOViGv.js +47 -0
  108. package/lib/index-bkuIUPFS.js +275 -0
  109. package/lib/index-jPA8J9Eo.js +8 -0
  110. package/lib/index-lsG76a9s.js +552 -0
  111. package/lib/index-oTRzPo3B.js +146 -0
  112. package/lib/index-rrf6_6DC.js +317 -0
  113. package/lib/index-vJbZIHYF.js +81 -0
  114. package/lib/index-vPRh55CO.js +137 -0
  115. package/lib/index-vxy63hib.js +323 -0
  116. package/lib/index-wn1_LgCS.js +99 -0
  117. package/lib/index-xHADmDT3.js +12 -0
  118. package/lib/index-yt2EpMtv.js +141 -0
  119. package/lib/index.d.ts +4 -0
  120. package/lib/index.d.ts.map +1 -0
  121. package/lib/index.es.js +7 -0
  122. package/lib/javascript-8ZHqHagw.js +758 -0
  123. package/lib/jinja2-vsOFe0qD.js +154 -0
  124. package/lib/julia-dlp_pbN1.js +241 -0
  125. package/lib/livescript-Gf5R-LT6.js +273 -0
  126. package/lib/lua-c5Y_JsBp.js +221 -0
  127. package/lib/mathematica-iiGTGmUs.js +35 -0
  128. package/lib/mbox-ZJh86H8B.js +78 -0
  129. package/lib/meta-tAGyVRPE.js +511 -0
  130. package/lib/mirc-i0qkCa0y.js +73 -0
  131. package/lib/mllike-Dy551fZW.js +275 -0
  132. package/lib/modelica-n6tGqUT9.js +94 -0
  133. package/lib/mscgen-aKSbB7D9.js +104 -0
  134. package/lib/mumps-lNiKA6sp.js +25 -0
  135. package/lib/nginx--YmuCfDj.js +93 -0
  136. package/lib/nsis-zhS8iA09.js +62 -0
  137. package/lib/ntriples-E3jQl3MC.js +79 -0
  138. package/lib/octave-EQvkGIeG.js +144 -0
  139. package/lib/oz-W2cpqFf6.js +152 -0
  140. package/lib/pascal-lCh6ouNZ.js +79 -0
  141. package/lib/perl-PxEQBX0B.js +915 -0
  142. package/lib/pig-Y_bNcrzS.js +56 -0
  143. package/lib/powershell-GaQP-TZr.js +249 -0
  144. package/lib/properties-mbRyn54L.js +26 -0
  145. package/lib/prosemirror-noTDkx-k.js +4 -0
  146. package/lib/protobuf-8CJideyJ.js +49 -0
  147. package/lib/puppet-ABBaChNZ.js +45 -0
  148. package/lib/python-sKdHg3Ka.js +321 -0
  149. package/lib/q-_1yG40Nm.js +89 -0
  150. package/lib/r-Ziz56bHT.js +108 -0
  151. package/lib/rpm-ORjGOHaQ.js +57 -0
  152. package/lib/ruby-jlbYq0dT.js +233 -0
  153. package/lib/sas-2n7xeUuO.js +107 -0
  154. package/lib/schema-tKk3m1fu.js +62 -0
  155. package/lib/scheme-XCs-NPeU.js +126 -0
  156. package/lib/shell-0_1Um7Dq.js +184 -0
  157. package/lib/sieve-7uyJD1x1.js +73 -0
  158. package/lib/simple-mode--HIzBxba.js +95 -0
  159. package/lib/smalltalk-PEFzrlQ-.js +48 -0
  160. package/lib/solr-BLBaHahN.js +41 -0
  161. package/lib/sparql-4F9ZWf1b.js +204 -0
  162. package/lib/spreadsheet-SGSo6blj.js +49 -0
  163. package/lib/sql-tebLBzN0.js +291 -0
  164. package/lib/stex-SFJcFGOO.js +130 -0
  165. package/lib/stylus-rwwWYWFm.js +256 -0
  166. package/lib/swift-eorJ0tCv.js +238 -0
  167. package/lib/tcl-IwXMB8U4.js +82 -0
  168. package/lib/textile-ok2VyjwC.js +299 -0
  169. package/lib/theme/classic/index.d.ts +3 -0
  170. package/lib/theme/classic/index.d.ts.map +1 -0
  171. package/lib/theme/classic-dark/index.d.ts +3 -0
  172. package/lib/theme/classic-dark/index.d.ts.map +1 -0
  173. package/lib/theme/headless/index.d.ts +3 -0
  174. package/lib/theme/headless/index.d.ts.map +1 -0
  175. package/lib/theme/index.d.ts +8 -0
  176. package/lib/theme/index.d.ts.map +1 -0
  177. package/lib/theme/shared.d.ts +3 -0
  178. package/lib/theme/shared.d.ts.map +1 -0
  179. package/lib/tiddlywiki-DLhz8_pc.js +156 -0
  180. package/lib/tiki-DFAqFElY.js +183 -0
  181. package/lib/tippy.esm-MZ2vxByW.js +1813 -0
  182. package/lib/toml-ryxpTZEV.js +49 -0
  183. package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
  184. package/lib/troff-ZzZyvNct.js +36 -0
  185. package/lib/ttcn-6gvkqqpW.js +136 -0
  186. package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
  187. package/lib/turtle-10ofr5au.js +87 -0
  188. package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
  189. package/lib/utils/index.d.ts +4 -0
  190. package/lib/utils/index.d.ts.map +1 -0
  191. package/lib/vb-a6n6fzrD.js +74 -0
  192. package/lib/vbscript-dgvo8jPt.js +324 -0
  193. package/lib/velocity-CBncCrwO.js +97 -0
  194. package/lib/verilog-KlcACt6C.js +271 -0
  195. package/lib/vhdl-NMd7Gf35.js +117 -0
  196. package/lib/webidl-z1UE5DN_.js +160 -0
  197. package/lib/xquery-hDt5jWTp.js +431 -0
  198. package/lib/yacas-ftgh_qwr.js +74 -0
  199. package/lib/yaml-DnNTfjXK.js +53 -0
  200. package/lib/z80-dA1PqWe1.js +62 -0
  201. package/package.json +87 -0
  202. package/src/core/crepe.ts +98 -0
  203. package/src/core/index.ts +4 -0
  204. package/src/core/slice.ts +44 -0
  205. package/src/feature/block-edit/handle/component.ts +68 -0
  206. package/src/feature/block-edit/handle/index.ts +81 -0
  207. package/src/feature/block-edit/index.ts +17 -0
  208. package/src/feature/block-edit/menu/component.ts +210 -0
  209. package/src/feature/block-edit/menu/config.ts +335 -0
  210. package/src/feature/block-edit/menu/icons.ts +171 -0
  211. package/src/feature/block-edit/menu/index.ts +113 -0
  212. package/src/feature/block-edit/style.css +126 -0
  213. package/src/feature/code-mirror/index.ts +60 -0
  214. package/src/feature/code-mirror/style.css +159 -0
  215. package/src/feature/gap-cursor/index.ts +31 -0
  216. package/src/feature/image-block/index.ts +59 -0
  217. package/src/feature/image-block/style.css +215 -0
  218. package/src/feature/index.ts +66 -0
  219. package/src/feature/link-tooltip/consts.ts +47 -0
  220. package/src/feature/link-tooltip/index.ts +22 -0
  221. package/src/feature/link-tooltip/style.css +107 -0
  222. package/src/feature/list-item/consts.ts +15 -0
  223. package/src/feature/list-item/index.ts +30 -0
  224. package/src/feature/list-item/style.css +23 -0
  225. package/src/feature/placeholder/index.ts +87 -0
  226. package/src/feature/placeholder/style.css +9 -0
  227. package/src/feature/shared.ts +4 -0
  228. package/src/feature/toolbar/component.ts +101 -0
  229. package/src/feature/toolbar/consts.ts +26 -0
  230. package/src/feature/toolbar/index.ts +92 -0
  231. package/src/feature/toolbar/style.css +37 -0
  232. package/src/index.ts +5 -0
  233. package/src/theme/classic/index.ts +12 -0
  234. package/src/theme/classic/style.css +192 -0
  235. package/src/theme/classic-dark/index.ts +12 -0
  236. package/src/theme/classic-dark/style.css +197 -0
  237. package/src/theme/headless/index.ts +9 -0
  238. package/src/theme/index.ts +26 -0
  239. package/src/theme/shared.ts +4 -0
  240. package/src/utils/index.ts +12 -0
  241. package/src/vite-env.d.ts +2 -0
@@ -0,0 +1,511 @@
1
+ const $ = Symbol.for("atomico.hooks");
2
+ globalThis[$] = globalThis[$] || {};
3
+ let A = globalThis[$];
4
+ const st = Symbol.for("Atomico.suspense"), G = Symbol.for("Atomico.effect"), J = Symbol.for("Atomico.layoutEffect"), et = Symbol.for("Atomico.insertionEffect"), k = (s, t, o) => {
5
+ const { i: e, hooks: n } = A.c, r = n[e] = n[e] || {};
6
+ return r.value = s(r.value), r.effect = t, r.tag = o, A.c.i++, n[e].value;
7
+ }, Lt = (s) => k((t = { current: s }) => t), wt = () => k((s = { current: A.c.host }) => s), Ft = () => A.c.update, ot = (s, t, o = 0) => {
8
+ let e = {}, n = !1;
9
+ const r = () => n, f = (i, u) => {
10
+ for (const h in e) {
11
+ const a = e[h];
12
+ a.effect && a.tag === i && (a.value = a.effect(a.value, u));
13
+ }
14
+ };
15
+ return { load: (i) => {
16
+ A.c = { host: t, hooks: e, update: s, i: 0, id: o };
17
+ let u;
18
+ try {
19
+ n = !1, u = i();
20
+ } catch (h) {
21
+ if (h !== st)
22
+ throw h;
23
+ n = !0;
24
+ } finally {
25
+ A.c = null;
26
+ }
27
+ return u;
28
+ }, cleanEffects: (i) => (f(et, i), () => (f(J, i), () => {
29
+ f(G, i), i && (e = {});
30
+ })), isSuspense: r };
31
+ };
32
+ function nt(s, t) {
33
+ const o = s.length;
34
+ if (o !== t.length)
35
+ return !1;
36
+ for (let e = 0; e < o; e++)
37
+ if (s[e] !== t[e])
38
+ return !1;
39
+ return !0;
40
+ }
41
+ const N = (s) => typeof s == "function", y = (s) => typeof s == "object", { isArray: rt } = Array, Y = (s) => "hydrate" in ((s == null ? void 0 : s.dataset) || {});
42
+ function q(s, t) {
43
+ let o;
44
+ const e = (n) => {
45
+ let { length: r } = n;
46
+ for (let f = 0; f < r; f++) {
47
+ const l = n[f];
48
+ if (l && Array.isArray(l))
49
+ e(l);
50
+ else {
51
+ const c = typeof l;
52
+ if (l == null || c === "function" || c === "boolean")
53
+ continue;
54
+ c === "string" || c === "number" ? (o == null && (o = ""), o += l) : (o != null && (t(o), o = null), t(l));
55
+ }
56
+ }
57
+ };
58
+ e(s), o != null && t(o);
59
+ }
60
+ class K {
61
+ /**
62
+ *
63
+ * @param {HTMLElement} target
64
+ * @param {string} message
65
+ * @param {string} value
66
+ */
67
+ constructor(t, o, e) {
68
+ this.message = o, this.target = t, this.value = e;
69
+ }
70
+ }
71
+ class it extends K {
72
+ }
73
+ class ct extends K {
74
+ }
75
+ const T = "Custom", F = null, ft = { true: 1, "": 1, 1: 1 };
76
+ function lt(s, t, o, e, n) {
77
+ const {
78
+ type: r,
79
+ reflect: f,
80
+ event: l,
81
+ value: c,
82
+ attr: i = ut(t)
83
+ } = (o == null ? void 0 : o.name) != T && y(o) && o != F ? o : { type: o }, u = (r == null ? void 0 : r.name) === T && r.map, h = !(r == Function || u || r == F), a = c != null, m = a && r != Boolean;
84
+ Object.defineProperty(s, t, {
85
+ configurable: !0,
86
+ /**
87
+ * @this {import("dom").AtomicoThisInternal}
88
+ * @param {any} newValue
89
+ */
90
+ set(b) {
91
+ const E = this[t];
92
+ m && b == null && (b = c);
93
+ const { error: S, value: p } = (u ? pt : Et)(
94
+ r,
95
+ h && N(b) ? b(E) : b
96
+ );
97
+ if (S && p != null)
98
+ throw new it(
99
+ this,
100
+ `The value defined for prop '${t}' must be of type '${r.name}'`,
101
+ p
102
+ );
103
+ E != p && (this._props[t] = p ?? void 0, this.update(), l && at(this, l), this.updated.then(() => {
104
+ f && (this._ignoreAttr = i, ht(this, r, i, this[t]), this._ignoreAttr = null);
105
+ }));
106
+ },
107
+ /**
108
+ * @this {import("dom").AtomicoThisInternal}
109
+ */
110
+ get() {
111
+ return this._props[t];
112
+ }
113
+ }), a && (n[t] = c), e[i] = { prop: t, type: r };
114
+ }
115
+ const at = (s, { type: t, base: o = CustomEvent, ...e }) => s.dispatchEvent(new o(t, e)), ut = (s) => s.replace(/([A-Z])/g, "-$1").toLowerCase(), ht = (s, t, o, e) => e == null || t == Boolean && !e ? s.removeAttribute(o) : s.setAttribute(
116
+ o,
117
+ (t == null ? void 0 : t.name) === T && (t != null && t.serialize) ? t == null ? void 0 : t.serialize(e) : y(e) ? JSON.stringify(e) : t == Boolean ? "" : e
118
+ ), mt = (s, t) => s == Boolean ? !!ft[t] : s == Number ? Number(t) : s == String ? t : s == Array || s == Object ? JSON.parse(t) : s.name == T ? t : (
119
+ // TODO: If when defining reflect the prop can also be of type string?
120
+ new s(t)
121
+ ), pt = ({ map: s }, t) => {
122
+ try {
123
+ return { value: s(t), error: !1 };
124
+ } catch {
125
+ return { value: t, error: !0 };
126
+ }
127
+ }, Et = (s, t) => s == null || t == null ? { value: t, error: !1 } : s != String && t === "" ? { value: void 0, error: !1 } : s == Object || s == Array || s == Symbol ? { value: t, error: {}.toString.call(t) !== `[object ${s.name}]` } : t instanceof s ? { value: t, error: s == Number && Number.isNaN(t.valueOf()) } : s == String || s == Number || s == Boolean ? {
128
+ value: t,
129
+ error: s == Number ? typeof t != "number" ? !0 : Number.isNaN(t) : s == String ? typeof t != "string" : typeof t != "boolean"
130
+ } : { value: t, error: !0 };
131
+ let bt = 0;
132
+ const St = (s) => {
133
+ var o;
134
+ const t = ((o = (s == null ? void 0 : s.dataset) || {}) == null ? void 0 : o.hydrate) || "";
135
+ return t || "c" + bt++;
136
+ }, Bt = (s, t) => {
137
+ const o = {}, e = {}, { props: n, styles: r, name: f } = s, l = (f[0] || "").toUpperCase() + f.slice(1);
138
+ return {
139
+ [l]: class extends (t || HTMLElement) {
140
+ constructor() {
141
+ super(), this._setup(), this._render = () => s({ ...this._props });
142
+ for (const i in e)
143
+ this[i] = e[i];
144
+ }
145
+ /**
146
+ * @returns {import("core").Sheets}
147
+ */
148
+ static get styles() {
149
+ return [super.styles, r];
150
+ }
151
+ async _setup() {
152
+ if (this._props)
153
+ return;
154
+ this._props = {};
155
+ let i, u;
156
+ this.mounted = new Promise(
157
+ (E) => this.mount = () => {
158
+ E(), i != this.parentNode && (this.update(), i = this.parentNode);
159
+ }
160
+ ), this.unmounted = new Promise(
161
+ (E) => this.unmount = () => {
162
+ E(), u = u || i, (u != i || !this.isConnected) && (h.cleanEffects(!0)()(), u = i);
163
+ }
164
+ ), this.symbolId = this.symbolId || Symbol();
165
+ const h = ot(
166
+ () => this.update(),
167
+ this,
168
+ St(this)
169
+ );
170
+ let a, m = !0;
171
+ const b = Y(this);
172
+ this.update = () => (a || (a = !0, this.updated = (this.updated || this.mounted).then(() => {
173
+ try {
174
+ const E = h.load(this._render), S = h.cleanEffects();
175
+ return E && E.render(
176
+ this,
177
+ this.symbolId,
178
+ b
179
+ ), a = !1, m && !h.isSuspense() && (m = !1, !b && Nt(this)), S();
180
+ } finally {
181
+ a = !1;
182
+ }
183
+ }).then(
184
+ /**
185
+ * @param {import("internal/hooks.js").CleanUseEffects} [cleanUseEffect]
186
+ */
187
+ (E) => {
188
+ E && E();
189
+ }
190
+ )), this.updated), this.update();
191
+ }
192
+ connectedCallback() {
193
+ this.mount(), super.connectedCallback && super.connectedCallback();
194
+ }
195
+ async disconnectedCallback() {
196
+ super.disconnectedCallback && super.disconnectedCallback(), await this.mounted, this.unmount();
197
+ }
198
+ /**
199
+ * @this {import("dom").AtomicoThisInternal}
200
+ * @param {string} attr
201
+ * @param {(string|null)} oldValue
202
+ * @param {(string|null)} value
203
+ */
204
+ attributeChangedCallback(i, u, h) {
205
+ if (o[i]) {
206
+ if (i === this._ignoreAttr || u === h)
207
+ return;
208
+ const { prop: a, type: m } = o[i];
209
+ try {
210
+ this[a] = mt(m, h);
211
+ } catch {
212
+ throw new ct(
213
+ this,
214
+ `The value defined as attr '${i}' cannot be parsed by type '${m.name}'`,
215
+ h
216
+ );
217
+ }
218
+ } else
219
+ super.attributeChangedCallback(i, u, h);
220
+ }
221
+ static get props() {
222
+ return { ...super.props, ...n };
223
+ }
224
+ static get observedAttributes() {
225
+ const i = super.observedAttributes || [];
226
+ for (const u in n)
227
+ lt(
228
+ this.prototype,
229
+ u,
230
+ n[u],
231
+ o,
232
+ e
233
+ );
234
+ return Object.keys(o).concat(i);
235
+ }
236
+ }
237
+ }[l];
238
+ };
239
+ function Nt(s) {
240
+ const { styles: t } = s.constructor, { shadowRoot: o } = s;
241
+ if (o && t.length) {
242
+ const e = [];
243
+ q(t, (n) => {
244
+ n && (n instanceof Element ? o.appendChild(n.cloneNode(!0)) : e.push(n));
245
+ }), e.length && (o.adoptedStyleSheets = e);
246
+ }
247
+ }
248
+ const W = (s) => (t, o) => {
249
+ k(
250
+ /**
251
+ * Clean the effect hook
252
+ * @type {import("internal/hooks").CollectorEffect}
253
+ */
254
+ ([e, n] = []) => ((n || !n) && (n && nt(n, o) ? e = e || !0 : (N(e) && e(), e = null)), [e, o]),
255
+ /**
256
+ * @returns {any}
257
+ */
258
+ ([e, n], r) => r ? (N(e) && e(), []) : [e || t(), n],
259
+ s
260
+ );
261
+ }, Ht = W(J), Ut = W(G), D = Symbol.for("atomico/options");
262
+ globalThis[D] = globalThis[D] || {
263
+ sheet: !!document.adoptedStyleSheets
264
+ };
265
+ const gt = globalThis[D], At = {
266
+ checked: 1,
267
+ value: 1,
268
+ selected: 1
269
+ }, Pt = {
270
+ list: 1,
271
+ type: 1,
272
+ size: 1,
273
+ form: 1,
274
+ width: 1,
275
+ height: 1,
276
+ src: 1,
277
+ href: 1,
278
+ slot: 1
279
+ }, yt = {
280
+ shadowDom: 1,
281
+ staticNode: 1,
282
+ cloneNode: 1,
283
+ children: 1,
284
+ key: 1
285
+ }, O = {}, I = [], B = document;
286
+ class M extends Text {
287
+ }
288
+ const L = Symbol.for, _t = L("Atomico.ID"), w = L("Atomico.$$"), R = L("Atomico.REF"), dt = () => {
289
+ };
290
+ function Ot(s, t, o) {
291
+ return Z(this, s, t, o);
292
+ }
293
+ const X = (s, t, ...o) => {
294
+ const e = t || O;
295
+ let { children: n } = e;
296
+ if (n = n ?? (o.length ? o : I), s === dt)
297
+ return n;
298
+ const r = s ? s instanceof Node ? 1 : (
299
+ //@ts-ignore
300
+ s.prototype instanceof HTMLElement && 2
301
+ ) : 0;
302
+ if (r === !1 && s instanceof Function)
303
+ return s(
304
+ n != I ? { children: n, ...e } : e
305
+ );
306
+ const f = gt.render || Ot;
307
+ return {
308
+ $$: w,
309
+ type: s,
310
+ props: e,
311
+ children: n,
312
+ key: e.key,
313
+ // key for lists by keys
314
+ // define if the node declares its shadowDom
315
+ shadow: e.shadowDom,
316
+ // allows renderings to run only once
317
+ static: e.staticNode,
318
+ // defines whether the type is a childNode `1` or a constructor `2`
319
+ raw: r,
320
+ // defines whether to use the second parameter for document.createElement
321
+ is: e.is,
322
+ // clone the node if it comes from a reference
323
+ clone: e.cloneNode,
324
+ render: f
325
+ };
326
+ };
327
+ function Z(s, t, o = _t, e, n) {
328
+ let r;
329
+ if (t && t[o] && t[o].vnode == s || s.$$ != w)
330
+ return t;
331
+ (s || !t) && (n = n || s.type == "svg", r = s.type != "host" && (s.raw == 1 ? (t && s.clone ? t[R] : t) != s.type : s.raw == 2 ? !(t instanceof s.type) : t ? t[R] || t.localName != s.type : !t), r && s.type != null && (s.raw == 1 && s.clone ? (e = !0, t = s.type.cloneNode(!0), t[R] = s.type) : t = s.raw == 1 ? s.type : s.raw == 2 ? new s.type() : n ? B.createElementNS(
332
+ "http://www.w3.org/2000/svg",
333
+ s.type
334
+ ) : B.createElement(
335
+ s.type,
336
+ s.is ? { is: s.is } : void 0
337
+ )));
338
+ const f = t[o] ? t[o] : O, { vnode: l = O, cycle: c = 0 } = f;
339
+ let { fragment: i, handlers: u } = f;
340
+ const { children: h = I, props: a = O } = l;
341
+ if (u = r ? {} : u || {}, s.static && !r)
342
+ return t;
343
+ if (s.shadow && !t.shadowRoot && // @ts-ignore
344
+ t.attachShadow({ mode: "open", ...s.shadow }), s.props != a && Rt(t, a, s.props, u, n), s.children !== h) {
345
+ const m = s.shadow ? t.shadowRoot : t;
346
+ i = Ct(
347
+ s.children,
348
+ /**
349
+ * @todo for hydration use attribute and send childNodes
350
+ */
351
+ i,
352
+ m,
353
+ o,
354
+ // add support to foreignObject, children will escape from svg
355
+ !c && e,
356
+ n && s.type == "foreignObject" ? !1 : n
357
+ );
358
+ }
359
+ return t[o] = { vnode: s, handlers: u, fragment: i, cycle: c + 1 }, t;
360
+ }
361
+ function Tt(s, t) {
362
+ const o = new M(""), e = new M("");
363
+ let n;
364
+ if (s[t ? "prepend" : "append"](o), t) {
365
+ let { firstElementChild: r } = s;
366
+ for (; r; ) {
367
+ if (Y(r)) {
368
+ n = r;
369
+ break;
370
+ }
371
+ r = r.nextElementSibling;
372
+ }
373
+ }
374
+ return n ? s.insertBefore(e, n) : s.append(e), {
375
+ markStart: o,
376
+ markEnd: e
377
+ };
378
+ }
379
+ function Ct(s, t, o, e, n, r) {
380
+ s = s == null ? null : rt(s) ? s : [s];
381
+ const f = t || Tt(o, n), { markStart: l, markEnd: c, keyes: i } = f;
382
+ let u;
383
+ const h = i && /* @__PURE__ */ new Set();
384
+ let a = l;
385
+ if (s && q(s, (m) => {
386
+ if (typeof m == "object" && m.$$ != w)
387
+ return;
388
+ const b = m.$$ && m.key, E = i && b != null && i.get(b);
389
+ a != c && a === E ? h.delete(a) : a = a == c ? c : a.nextSibling;
390
+ const S = i ? E : a;
391
+ let p = S;
392
+ if (m.$$)
393
+ p = Z(m, S, e, n, r);
394
+ else {
395
+ const C = m + "";
396
+ !(p instanceof Text) || p instanceof M ? p = new Text(C) : p.data != C && (p.data = C);
397
+ }
398
+ p != a && (i && h.delete(p), !S || i ? (o.insertBefore(p, a), i && a != c && h.add(a)) : S == c ? o.insertBefore(p, c) : (o.replaceChild(p, S), a = p)), b != null && (u = u || /* @__PURE__ */ new Map(), u.set(b, p));
399
+ }), a = a == c ? c : a.nextSibling, t && a != c)
400
+ for (; a != c; ) {
401
+ const m = a;
402
+ a = a.nextSibling, m.remove();
403
+ }
404
+ return h && h.forEach((m) => m.remove()), f.keyes = u, f;
405
+ }
406
+ function Rt(s, t, o, e, n) {
407
+ for (const r in t)
408
+ !(r in o) && H(s, r, t[r], null, n, e);
409
+ for (const r in o)
410
+ H(s, r, t[r], o[r], n, e);
411
+ }
412
+ function H(s, t, o, e, n, r) {
413
+ if (t = t == "class" && !n ? "className" : t, o = o ?? null, e = e ?? null, t in s && At[t] && (o = s[t]), !(e === o || yt[t] || t[0] == "_"))
414
+ if (t[0] == "o" && t[1] == "n" && (N(e) || N(o)))
415
+ $t(s, t.slice(2), e, r);
416
+ else if (t == "ref")
417
+ e && (N(e) ? e(s) : e.current = s);
418
+ else if (t == "style") {
419
+ const { style: f } = s;
420
+ o = o || "", e = e || "";
421
+ const l = y(o), c = y(e);
422
+ if (l)
423
+ for (const i in o)
424
+ if (c)
425
+ !(i in e) && U(f, i, null);
426
+ else
427
+ break;
428
+ if (c)
429
+ for (const i in e) {
430
+ const u = e[i];
431
+ l && o[i] === u || U(f, i, u);
432
+ }
433
+ else
434
+ f.cssText = e;
435
+ } else {
436
+ const f = t[0] == "$" ? t.slice(1) : t;
437
+ f === t && (!n && !Pt[t] && t in s || N(e) || N(o)) ? s[t] = e ?? "" : e == null ? s.removeAttribute(f) : s.setAttribute(
438
+ f,
439
+ y(e) ? JSON.stringify(e) : e
440
+ );
441
+ }
442
+ }
443
+ function $t(s, t, o, e) {
444
+ if (e.handleEvent || (e.handleEvent = (n) => e[n.type].call(s, n)), o) {
445
+ if (!e[t]) {
446
+ const n = o.capture || o.once || o.passive ? Object.assign({}, o) : null;
447
+ s.addEventListener(t, e, n);
448
+ }
449
+ e[t] = o;
450
+ } else
451
+ e[t] && (s.removeEventListener(t, e), delete e[t]);
452
+ }
453
+ function U(s, t, o) {
454
+ let e = "setProperty";
455
+ o == null && (e = "removeProperty", o = null), ~t.indexOf("-") ? s[e](t, o) : s[t] = o;
456
+ }
457
+ X("host", { style: "display: contents" });
458
+ const Dt = 0, g = 1, _ = 2, d = 3, z = 4, P = 5, j = 6, Q = 0, It = 2, v = 3, x = 4, V = P, Mt = j, tt = (s, t, o, e) => {
459
+ let n;
460
+ t[0] = 0;
461
+ for (let r = 1; r < t.length; r++) {
462
+ const f = t[r++], l = t[r] ? (t[0] |= f ? 1 : 2, o[t[r++]]) : t[++r];
463
+ f === v ? e[0] = l : f === x ? e[1] = Object.assign(e[1] || {}, l) : f === V ? (e[1] = e[1] || {})[t[++r]] = l : f === Mt ? e[1][t[++r]] += l + "" : f ? (n = s.apply(l, tt(s, l, o, ["", null])), e.push(n), l[0] ? t[0] |= 2 : (t[r - 2] = Q, t[r] = n)) : e.push(l);
464
+ }
465
+ return e;
466
+ }, jt = function(s) {
467
+ let t = g, o = "", e = "", n = [0], r, f;
468
+ const l = (c) => {
469
+ t === g && (c || (o = o.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? n.push(Q, c, o) : t === d && (c || o) ? (n.push(v, c, o), t = _) : t === _ && o === "..." && c ? n.push(x, c, 0) : t === _ && o && !c ? n.push(V, 0, !0, o) : t >= P && ((o || !c && t === P) && (n.push(t, 0, o, f), t = j), c && (n.push(t, c, 0, f), t = j)), o = "";
470
+ };
471
+ for (let c = 0; c < s.length; c++) {
472
+ c && (t === g && l(), l(c));
473
+ for (let i = 0; i < s[c].length; i++)
474
+ r = s[c][i], t === g ? r === "<" ? (l(), n = [n], t = d) : o += r : t === z ? o === "--" && r === ">" ? (t = g, o = "") : o = r + o[0] : e ? r === e ? e = "" : o += r : r === '"' || r === "'" ? e = r : r === ">" ? (l(), t = g) : t && (r === "=" ? (t = P, f = o, o = "") : r === "/" && (t < P || s[c][i + 1] === ">") ? (l(), t === d && (n = n[0]), t = n, (n = n[0]).push(It, 0, t), t = Dt) : r === " " || r === " " || r === `
475
+ ` || r === "\r" ? (l(), t = _) : o += r), t === d && o === "!--" && (t = z, n = n[0]);
476
+ }
477
+ return l(), n;
478
+ }, kt = /* @__PURE__ */ new Map();
479
+ function zt(s) {
480
+ let t = kt;
481
+ return t = tt(
482
+ X,
483
+ t.get(s) || (t.set(s, t = jt(s)), t),
484
+ arguments,
485
+ []
486
+ ), t.length > 1 ? t : t[0];
487
+ }
488
+ function Gt(s, t) {
489
+ return Object.assign(s, {
490
+ meta: {
491
+ package: "@milkdown/components",
492
+ ...t
493
+ }
494
+ }), s;
495
+ }
496
+ export {
497
+ B as $,
498
+ Ut as a,
499
+ Ht as b,
500
+ Bt as c,
501
+ X as d,
502
+ wt as e,
503
+ Ft as f,
504
+ k as g,
505
+ zt as h,
506
+ nt as i,
507
+ N as j,
508
+ gt as o,
509
+ Lt as u,
510
+ Gt as w
511
+ };
@@ -0,0 +1,73 @@
1
+ function n(e) {
2
+ for (var $ = {}, r = e.split(" "), i = 0; i < r.length; ++i)
3
+ $[r[i]] = !0;
4
+ return $;
5
+ }
6
+ var a = n("$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"), s = n("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item"), l = n("if elseif else and not or eq ne in ni for foreach while switch"), c = /[+\-*&%=<>!?^\/\|]/;
7
+ function d(e, $, r) {
8
+ return $.tokenize = r, r(e, $);
9
+ }
10
+ function o(e, $) {
11
+ var r = $.beforeParams;
12
+ $.beforeParams = !1;
13
+ var i = e.next();
14
+ if (/[\[\]{}\(\),\.]/.test(i))
15
+ return i == "(" && r ? $.inParams = !0 : i == ")" && ($.inParams = !1), null;
16
+ if (/\d/.test(i))
17
+ return e.eatWhile(/[\w\.]/), "number";
18
+ if (i == "\\")
19
+ return e.eat("\\"), e.eat(/./), "number";
20
+ if (i == "/" && e.eat("*"))
21
+ return d(e, $, m);
22
+ if (i == ";" && e.match(/ *\( *\(/))
23
+ return d(e, $, p);
24
+ if (i == ";" && !$.inParams)
25
+ return e.skipToEnd(), "comment";
26
+ if (i == '"')
27
+ return e.eat(/"/), "keyword";
28
+ if (i == "$")
29
+ return e.eatWhile(/[$_a-z0-9A-Z\.:]/), a && a.propertyIsEnumerable(e.current().toLowerCase()) ? "keyword" : ($.beforeParams = !0, "builtin");
30
+ if (i == "%")
31
+ return e.eatWhile(/[^,\s()]/), $.beforeParams = !0, "string";
32
+ if (c.test(i))
33
+ return e.eatWhile(c), "operator";
34
+ e.eatWhile(/[\w\$_{}]/);
35
+ var t = e.current().toLowerCase();
36
+ return s && s.propertyIsEnumerable(t) ? "keyword" : l && l.propertyIsEnumerable(t) ? ($.beforeParams = !0, "keyword") : null;
37
+ }
38
+ function m(e, $) {
39
+ for (var r = !1, i; i = e.next(); ) {
40
+ if (i == "/" && r) {
41
+ $.tokenize = o;
42
+ break;
43
+ }
44
+ r = i == "*";
45
+ }
46
+ return "comment";
47
+ }
48
+ function p(e, $) {
49
+ for (var r = 0, i; i = e.next(); ) {
50
+ if (i == ";" && r == 2) {
51
+ $.tokenize = o;
52
+ break;
53
+ }
54
+ i == ")" ? r++ : i != " " && (r = 0);
55
+ }
56
+ return "meta";
57
+ }
58
+ const u = {
59
+ name: "mirc",
60
+ startState: function() {
61
+ return {
62
+ tokenize: o,
63
+ beforeParams: !1,
64
+ inParams: !1
65
+ };
66
+ },
67
+ token: function(e, $) {
68
+ return e.eatSpace() ? null : $.tokenize(e, $);
69
+ }
70
+ };
71
+ export {
72
+ u as mirc
73
+ };