@drjoshcsimmons/scl 0.1.0
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/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/components/ui/accordion/accordion.d.ts +8 -0
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion/index.d.ts +2 -0
- package/dist/components/ui/accordion/index.d.ts.map +1 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/components/ui/alert/index.d.ts +2 -0
- package/dist/components/ui/alert/index.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/index.d.ts +2 -0
- package/dist/components/ui/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +7 -0
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar/index.d.ts +2 -0
- package/dist/components/ui/avatar/index.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.d.ts +10 -0
- package/dist/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.d.ts.map +1 -0
- package/dist/components/ui/button/button.d.ts +12 -0
- package/dist/components/ui/button/button.d.ts.map +1 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.d.ts.map +1 -0
- package/dist/components/ui/card/card.d.ts +9 -0
- package/dist/components/ui/card/card.d.ts.map +1 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/card/index.d.ts.map +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.d.ts.map +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible/index.d.ts +2 -0
- package/dist/components/ui/collapsible/index.d.ts.map +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +20 -0
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +2 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts +17 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/index.d.ts +3 -0
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.d.ts.map +1 -0
- package/dist/components/ui/input/input.d.ts +5 -0
- package/dist/components/ui/input/input.d.ts.map +1 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.d.ts.map +1 -0
- package/dist/components/ui/label/label.d.ts +6 -0
- package/dist/components/ui/label/label.d.ts.map +1 -0
- package/dist/components/ui/popover/index.d.ts +2 -0
- package/dist/components/ui/popover/index.d.ts.map +1 -0
- package/dist/components/ui/popover/popover.d.ts +8 -0
- package/dist/components/ui/popover/popover.d.ts.map +1 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +19 -0
- package/dist/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group/index.d.ts +2 -0
- package/dist/components/ui/radio-group/index.d.ts.map +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/components/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select/index.d.ts +2 -0
- package/dist/components/ui/select/index.d.ts.map +1 -0
- package/dist/components/ui/select/select.d.ts +14 -0
- package/dist/components/ui/select/select.d.ts.map +1 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.d.ts.map +1 -0
- package/dist/components/ui/separator/separator.d.ts +5 -0
- package/dist/components/ui/separator/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet/index.d.ts +2 -0
- package/dist/components/ui/sheet/index.d.ts.map +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +26 -0
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.d.ts.map +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider/index.d.ts +2 -0
- package/dist/components/ui/slider/index.d.ts.map +1 -0
- package/dist/components/ui/slider/slider.d.ts +5 -0
- package/dist/components/ui/slider/slider.d.ts.map +1 -0
- package/dist/components/ui/statusline/index.d.ts +2 -0
- package/dist/components/ui/statusline/index.d.ts.map +1 -0
- package/dist/components/ui/statusline/statusline.d.ts +40 -0
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.d.ts.map +1 -0
- package/dist/components/ui/switch/switch.d.ts +5 -0
- package/dist/components/ui/switch/switch.d.ts.map +1 -0
- package/dist/components/ui/table/index.d.ts +2 -0
- package/dist/components/ui/table/index.d.ts.map +1 -0
- package/dist/components/ui/table/table.d.ts +11 -0
- package/dist/components/ui/table/table.d.ts.map +1 -0
- package/dist/components/ui/tabs/index.d.ts +2 -0
- package/dist/components/ui/tabs/index.d.ts.map +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +8 -0
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/components/ui/terminal-textarea/index.d.ts +2 -0
- package/dist/components/ui/terminal-textarea/index.d.ts.map +1 -0
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +27 -0
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.d.ts.map +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +5 -0
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -0
- package/dist/components/ui/toggle/index.d.ts +2 -0
- package/dist/components/ui/toggle/index.d.ts.map +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +13 -0
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +2 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +11 -0
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +165 -0
- package/dist/index10.js +61 -0
- package/dist/index100.js +32 -0
- package/dist/index101.js +17 -0
- package/dist/index102.js +137 -0
- package/dist/index103.js +52 -0
- package/dist/index104.js +11 -0
- package/dist/index105.js +6 -0
- package/dist/index106.js +183 -0
- package/dist/index107.js +652 -0
- package/dist/index108.js +109 -0
- package/dist/index109.js +93 -0
- package/dist/index11.js +27 -0
- package/dist/index110.js +69 -0
- package/dist/index111.js +161 -0
- package/dist/index112.js +399 -0
- package/dist/index113.js +1682 -0
- package/dist/index114.js +280 -0
- package/dist/index115.js +134 -0
- package/dist/index116.js +34 -0
- package/dist/index117.js +1613 -0
- package/dist/index118.js +300 -0
- package/dist/index119.js +637 -0
- package/dist/index12.js +7 -0
- package/dist/index120.js +146 -0
- package/dist/index121.js +23 -0
- package/dist/index122.js +11 -0
- package/dist/index123.js +40 -0
- package/dist/index124.js +20 -0
- package/dist/index125.js +8 -0
- package/dist/index126.js +14 -0
- package/dist/index127.js +208 -0
- package/dist/index128.js +24 -0
- package/dist/index129.js +402 -0
- package/dist/index13.js +100 -0
- package/dist/index130.js +1308 -0
- package/dist/index131.js +620 -0
- package/dist/index132.js +4 -0
- package/dist/index133.js +55 -0
- package/dist/index134.js +67 -0
- package/dist/index135.js +27 -0
- package/dist/index136.js +31 -0
- package/dist/index137.js +7 -0
- package/dist/index138.js +4 -0
- package/dist/index139.js +4 -0
- package/dist/index14.js +226 -0
- package/dist/index140.js +7 -0
- package/dist/index141.js +5 -0
- package/dist/index142.js +26 -0
- package/dist/index143.js +115 -0
- package/dist/index144.js +18 -0
- package/dist/index145.js +527 -0
- package/dist/index146.js +130 -0
- package/dist/index147.js +136 -0
- package/dist/index148.js +67 -0
- package/dist/index149.js +71 -0
- package/dist/index15.js +146 -0
- package/dist/index150.js +11 -0
- package/dist/index151.js +16 -0
- package/dist/index152.js +68 -0
- package/dist/index153.js +6 -0
- package/dist/index154.js +25 -0
- package/dist/index155.js +25 -0
- package/dist/index156.js +15 -0
- package/dist/index157.js +30 -0
- package/dist/index158.js +7 -0
- package/dist/index16.js +21 -0
- package/dist/index17.js +19 -0
- package/dist/index18.js +24 -0
- package/dist/index19.js +58 -0
- package/dist/index2.js +8 -0
- package/dist/index20.js +31 -0
- package/dist/index21.js +38 -0
- package/dist/index22.js +123 -0
- package/dist/index23.js +24 -0
- package/dist/index24.js +72 -0
- package/dist/index25.js +17 -0
- package/dist/index26.js +34 -0
- package/dist/index27.js +81 -0
- package/dist/index28.js +27 -0
- package/dist/index29.js +90 -0
- package/dist/index3.js +22 -0
- package/dist/index30.js +46 -0
- package/dist/index31.js +234 -0
- package/dist/index32.js +20 -0
- package/dist/index33.js +37 -0
- package/dist/index34.js +25 -0
- package/dist/index35.js +105 -0
- package/dist/index36.js +68 -0
- package/dist/index37.js +51 -0
- package/dist/index38.js +102 -0
- package/dist/index39.js +13 -0
- package/dist/index4.js +46 -0
- package/dist/index40.js +17 -0
- package/dist/index41.js +2265 -0
- package/dist/index42.js +35 -0
- package/dist/index43.js +20 -0
- package/dist/index44.js +239 -0
- package/dist/index45.js +13 -0
- package/dist/index46.js +75 -0
- package/dist/index47.js +251 -0
- package/dist/index48.js +11 -0
- package/dist/index49.js +338 -0
- package/dist/index5.js +51 -0
- package/dist/index50.js +62 -0
- package/dist/index51.js +243 -0
- package/dist/index52.js +862 -0
- package/dist/index53.js +11 -0
- package/dist/index54.js +120 -0
- package/dist/index55.js +227 -0
- package/dist/index56.js +13 -0
- package/dist/index57.js +13 -0
- package/dist/index58.js +238 -0
- package/dist/index59.js +262 -0
- package/dist/index6.js +51 -0
- package/dist/index60.js +14 -0
- package/dist/index61.js +24 -0
- package/dist/index62.js +532 -0
- package/dist/index63.js +6157 -0
- package/dist/index64.js +2635 -0
- package/dist/index65.js +300 -0
- package/dist/index66.js +674 -0
- package/dist/index67.js +832 -0
- package/dist/index68.js +27 -0
- package/dist/index69.js +330 -0
- package/dist/index7.js +42 -0
- package/dist/index70.js +4901 -0
- package/dist/index71.js +831 -0
- package/dist/index72.js +1260 -0
- package/dist/index73.js +536 -0
- package/dist/index74.js +127 -0
- package/dist/index75.js +163 -0
- package/dist/index76.js +33 -0
- package/dist/index77.js +437 -0
- package/dist/index78.js +132 -0
- package/dist/index79.js +83 -0
- package/dist/index8.js +31 -0
- package/dist/index80.js +70 -0
- package/dist/index81.js +48 -0
- package/dist/index82.js +29 -0
- package/dist/index83.js +9 -0
- package/dist/index84.js +54 -0
- package/dist/index85.js +36 -0
- package/dist/index86.js +13 -0
- package/dist/index87.js +10 -0
- package/dist/index88.js +32 -0
- package/dist/index89.js +57 -0
- package/dist/index9.js +54 -0
- package/dist/index90.js +13 -0
- package/dist/index91.js +6 -0
- package/dist/index92.js +15 -0
- package/dist/index93.js +8 -0
- package/dist/index94.js +27 -0
- package/dist/index95.js +71 -0
- package/dist/index96.js +127 -0
- package/dist/index97.js +221 -0
- package/dist/index98.js +16 -0
- package/dist/index99.js +56 -0
- package/dist/lib/utils.d.ts +14 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/tokens/animations.d.ts +174 -0
- package/dist/tokens/animations.d.ts.map +1 -0
- package/dist/tokens/colors.d.ts +92 -0
- package/dist/tokens/colors.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +403 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/shadows.d.ts +15 -0
- package/dist/tokens/shadows.d.ts.map +1 -0
- package/dist/tokens/spacing.d.ts +55 -0
- package/dist/tokens/spacing.d.ts.map +1 -0
- package/dist/tokens/typography.d.ts +80 -0
- package/dist/tokens/typography.d.ts.map +1 -0
- package/package.json +128 -0
package/dist/index68.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { parser as n } from "./index116.js";
|
|
2
|
+
import { LanguageSupport as r, LRLanguage as o, indentNodeProp as a, foldNodeProp as t, continuedIndent as e, foldInside as d } from "./index72.js";
|
|
3
|
+
const p = /* @__PURE__ */ o.define({
|
|
4
|
+
name: "json",
|
|
5
|
+
parser: /* @__PURE__ */ n.configure({
|
|
6
|
+
props: [
|
|
7
|
+
/* @__PURE__ */ a.add({
|
|
8
|
+
Object: /* @__PURE__ */ e({ except: /^\s*\}/ }),
|
|
9
|
+
Array: /* @__PURE__ */ e({ except: /^\s*\]/ })
|
|
10
|
+
}),
|
|
11
|
+
/* @__PURE__ */ t.add({
|
|
12
|
+
"Object Array": d
|
|
13
|
+
})
|
|
14
|
+
]
|
|
15
|
+
}),
|
|
16
|
+
languageData: {
|
|
17
|
+
closeBrackets: { brackets: ["[", "{", '"'] },
|
|
18
|
+
indentOnInput: /^\s*[\}\]]$/
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
function u() {
|
|
22
|
+
return new r(p);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
u as json,
|
|
26
|
+
p as jsonLanguage
|
|
27
|
+
};
|
package/dist/index69.js
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { Prec as z, EditorSelection as x, countColumn as w, EditorState as K } from "./index64.js";
|
|
2
|
+
import { keymap as _, EditorView as j } from "./index63.js";
|
|
3
|
+
import { foldService as G, LanguageSupport as N, Language as Q, defineLanguageFacet as J, syntaxTree as A, indentUnit as Y, foldNodeProp as R, indentNodeProp as Z, languageDataProp as W, LanguageDescription as D, ParseContext as ee } from "./index72.js";
|
|
4
|
+
import { CompletionContext as te } from "./index112.js";
|
|
5
|
+
import { MarkdownParser as re, parseCode as ne, parser as oe, GFM as ie, Subscript as le, Superscript as se, Emoji as fe } from "./index117.js";
|
|
6
|
+
import { html as ae, htmlCompletionSource as me } from "./index66.js";
|
|
7
|
+
import { NodeProp as ue } from "./index113.js";
|
|
8
|
+
const $ = /* @__PURE__ */ J({ commentTokens: { block: { open: "<!--", close: "-->" } } }), q = /* @__PURE__ */ new ue(), H = /* @__PURE__ */ oe.configure({
|
|
9
|
+
props: [
|
|
10
|
+
/* @__PURE__ */ R.add((r) => !r.is("Block") || r.is("Document") || P(r) != null || ce(r) ? void 0 : (n, o) => ({ from: o.doc.lineAt(n.from).to, to: n.to })),
|
|
11
|
+
/* @__PURE__ */ q.add(P),
|
|
12
|
+
/* @__PURE__ */ Z.add({
|
|
13
|
+
Document: () => null
|
|
14
|
+
}),
|
|
15
|
+
/* @__PURE__ */ W.add({
|
|
16
|
+
Document: $
|
|
17
|
+
})
|
|
18
|
+
]
|
|
19
|
+
});
|
|
20
|
+
function P(r) {
|
|
21
|
+
let n = /^(?:ATX|Setext)Heading(\d)$/.exec(r.name);
|
|
22
|
+
return n ? +n[1] : void 0;
|
|
23
|
+
}
|
|
24
|
+
function ce(r) {
|
|
25
|
+
return r.name == "OrderedList" || r.name == "BulletList";
|
|
26
|
+
}
|
|
27
|
+
function pe(r, n) {
|
|
28
|
+
let o = r;
|
|
29
|
+
for (; ; ) {
|
|
30
|
+
let t = o.nextSibling, e;
|
|
31
|
+
if (!t || (e = P(t.type)) != null && e <= n)
|
|
32
|
+
break;
|
|
33
|
+
o = t;
|
|
34
|
+
}
|
|
35
|
+
return o.to;
|
|
36
|
+
}
|
|
37
|
+
const de = /* @__PURE__ */ G.of((r, n, o) => {
|
|
38
|
+
for (let t = A(r).resolveInner(o, -1); t && !(t.from < n); t = t.parent) {
|
|
39
|
+
let e = t.type.prop(q);
|
|
40
|
+
if (e == null)
|
|
41
|
+
continue;
|
|
42
|
+
let i = pe(t, e);
|
|
43
|
+
if (i > o)
|
|
44
|
+
return { from: o, to: i };
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
});
|
|
48
|
+
function T(r) {
|
|
49
|
+
return new Q($, r, [], "markdown");
|
|
50
|
+
}
|
|
51
|
+
const he = /* @__PURE__ */ T(H), ge = /* @__PURE__ */ H.configure([ie, le, se, fe, {
|
|
52
|
+
props: [
|
|
53
|
+
/* @__PURE__ */ R.add({
|
|
54
|
+
Table: (r, n) => ({ from: n.doc.lineAt(r.from).to, to: r.to })
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}]), b = /* @__PURE__ */ T(ge);
|
|
58
|
+
function ke(r, n) {
|
|
59
|
+
return (o) => {
|
|
60
|
+
if (o && r) {
|
|
61
|
+
let t = null;
|
|
62
|
+
if (o = /\S*/.exec(o)[0], typeof r == "function" ? t = r(o) : t = D.matchLanguageName(r, o, !0), t instanceof D)
|
|
63
|
+
return t.support ? t.support.language.parser : ee.getSkippingParser(t.load());
|
|
64
|
+
if (t)
|
|
65
|
+
return t.parser;
|
|
66
|
+
}
|
|
67
|
+
return n ? n.parser : null;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
class v {
|
|
71
|
+
constructor(n, o, t, e, i, a, m) {
|
|
72
|
+
this.node = n, this.from = o, this.to = t, this.spaceBefore = e, this.spaceAfter = i, this.type = a, this.item = m;
|
|
73
|
+
}
|
|
74
|
+
blank(n, o = !0) {
|
|
75
|
+
let t = this.spaceBefore + (this.node.name == "Blockquote" ? ">" : "");
|
|
76
|
+
if (n != null) {
|
|
77
|
+
for (; t.length < n; )
|
|
78
|
+
t += " ";
|
|
79
|
+
return t;
|
|
80
|
+
} else {
|
|
81
|
+
for (let e = this.to - this.from - t.length - this.spaceAfter.length; e > 0; e--)
|
|
82
|
+
t += " ";
|
|
83
|
+
return t + (o ? this.spaceAfter : "");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
marker(n, o) {
|
|
87
|
+
let t = this.node.name == "OrderedList" ? String(+V(this.item, n)[2] + o) : "";
|
|
88
|
+
return this.spaceBefore + t + this.type + this.spaceAfter;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function U(r, n) {
|
|
92
|
+
let o = [], t = [];
|
|
93
|
+
for (let e = r; e; e = e.parent) {
|
|
94
|
+
if (e.name == "FencedCode")
|
|
95
|
+
return t;
|
|
96
|
+
(e.name == "ListItem" || e.name == "Blockquote") && o.push(e);
|
|
97
|
+
}
|
|
98
|
+
for (let e = o.length - 1; e >= 0; e--) {
|
|
99
|
+
let i = o[e], a, m = n.lineAt(i.from), s = i.from - m.from;
|
|
100
|
+
if (i.name == "Blockquote" && (a = /^ *>( ?)/.exec(m.text.slice(s))))
|
|
101
|
+
t.push(new v(i, s, s + a[0].length, "", a[1], ">", null));
|
|
102
|
+
else if (i.name == "ListItem" && i.parent.name == "OrderedList" && (a = /^( *)\d+([.)])( *)/.exec(m.text.slice(s)))) {
|
|
103
|
+
let f = a[3], l = a[0].length;
|
|
104
|
+
f.length >= 4 && (f = f.slice(0, f.length - 4), l -= 4), t.push(new v(i.parent, s, s + l, a[1], f, a[2], i));
|
|
105
|
+
} else if (i.name == "ListItem" && i.parent.name == "BulletList" && (a = /^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(m.text.slice(s)))) {
|
|
106
|
+
let f = a[4], l = a[0].length;
|
|
107
|
+
f.length > 4 && (f = f.slice(0, f.length - 4), l -= 4);
|
|
108
|
+
let u = a[2];
|
|
109
|
+
a[3] && (u += a[3].replace(/[xX]/, " ")), t.push(new v(i.parent, s, s + l, a[1], f, u, i));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return t;
|
|
113
|
+
}
|
|
114
|
+
function V(r, n) {
|
|
115
|
+
return /^(\s*)(\d+)(?=[.)])/.exec(n.sliceString(r.from, r.from + 10));
|
|
116
|
+
}
|
|
117
|
+
function I(r, n, o, t = 0) {
|
|
118
|
+
for (let e = -1, i = r; ; ) {
|
|
119
|
+
if (i.name == "ListItem") {
|
|
120
|
+
let m = V(i, n), s = +m[2];
|
|
121
|
+
if (e >= 0) {
|
|
122
|
+
if (s != e + 1)
|
|
123
|
+
return;
|
|
124
|
+
o.push({ from: i.from + m[1].length, to: i.from + m[0].length, insert: String(e + 2 + t) });
|
|
125
|
+
}
|
|
126
|
+
e = s;
|
|
127
|
+
}
|
|
128
|
+
let a = i.nextSibling;
|
|
129
|
+
if (!a)
|
|
130
|
+
break;
|
|
131
|
+
i = a;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function E(r, n) {
|
|
135
|
+
let o = /^[ \t]*/.exec(r)[0].length;
|
|
136
|
+
if (!o || n.facet(Y) != " ")
|
|
137
|
+
return r;
|
|
138
|
+
let t = w(r, 4, o), e = "";
|
|
139
|
+
for (let i = t; i > 0; )
|
|
140
|
+
i >= 4 ? (e += " ", i -= 4) : (e += " ", i--);
|
|
141
|
+
return e + r.slice(o);
|
|
142
|
+
}
|
|
143
|
+
const xe = (r = {}) => ({ state: n, dispatch: o }) => {
|
|
144
|
+
let t = A(n), { doc: e } = n, i = null, a = n.changeByRange((m) => {
|
|
145
|
+
if (!m.empty || !b.isActiveAt(n, m.from, -1) && !b.isActiveAt(n, m.from, 1))
|
|
146
|
+
return i = { range: m };
|
|
147
|
+
let s = m.from, f = e.lineAt(s), l = U(t.resolveInner(s, -1), e);
|
|
148
|
+
for (; l.length && l[l.length - 1].from > s - f.from; )
|
|
149
|
+
l.pop();
|
|
150
|
+
if (!l.length)
|
|
151
|
+
return i = { range: m };
|
|
152
|
+
let u = l[l.length - 1];
|
|
153
|
+
if (u.to - u.spaceAfter.length > s - f.from)
|
|
154
|
+
return i = { range: m };
|
|
155
|
+
let d = s >= u.to - u.spaceAfter.length && !/\S/.test(f.text.slice(u.to));
|
|
156
|
+
if (u.item && d) {
|
|
157
|
+
let p = u.node.firstChild, h = u.node.getChild("ListItem", "ListItem");
|
|
158
|
+
if (p.to >= s || h && h.to < s || f.from > 0 && !/[^\s>]/.test(e.lineAt(f.from - 1).text) || r.nonTightLists === !1) {
|
|
159
|
+
let c = l.length > 1 ? l[l.length - 2] : null, C, B = "";
|
|
160
|
+
c && c.item ? (C = f.from + c.from, B = c.marker(e, 1)) : C = f.from + (c ? c.to : 0);
|
|
161
|
+
let S = [{ from: C, to: s, insert: B }];
|
|
162
|
+
return u.node.name == "OrderedList" && I(u.item, e, S, -2), c && c.node.name == "OrderedList" && I(c.item, e, S), { range: x.cursor(C + B.length), changes: S };
|
|
163
|
+
} else {
|
|
164
|
+
let c = F(l, n, f);
|
|
165
|
+
return {
|
|
166
|
+
range: x.cursor(s + c.length + 1),
|
|
167
|
+
changes: { from: f.from, insert: c + n.lineBreak }
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (u.node.name == "Blockquote" && d && f.from) {
|
|
172
|
+
let p = e.lineAt(f.from - 1), h = />\s*$/.exec(p.text);
|
|
173
|
+
if (h && h.index == u.from) {
|
|
174
|
+
let c = n.changes([
|
|
175
|
+
{ from: p.from + h.index, to: p.to },
|
|
176
|
+
{ from: f.from + u.from, to: f.to }
|
|
177
|
+
]);
|
|
178
|
+
return { range: m.map(c), changes: c };
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
let g = [];
|
|
182
|
+
u.node.name == "OrderedList" && I(u.item, e, g);
|
|
183
|
+
let M = u.item && u.item.from < f.from, k = "";
|
|
184
|
+
if (!M || /^[\s\d.)\-+*>]*/.exec(f.text)[0].length >= u.to)
|
|
185
|
+
for (let p = 0, h = l.length - 1; p <= h; p++)
|
|
186
|
+
k += p == h && !M ? l[p].marker(e, 1) : l[p].blank(p < h ? w(f.text, 4, l[p + 1].from) - k.length : null);
|
|
187
|
+
let L = s;
|
|
188
|
+
for (; L > f.from && /\s/.test(f.text.charAt(L - f.from - 1)); )
|
|
189
|
+
L--;
|
|
190
|
+
return k = E(k, n), we(u.node, n.doc) && (k = F(l, n, f) + n.lineBreak + k), g.push({ from: L, to: s, insert: n.lineBreak + k }), { range: x.cursor(L + k.length + 1), changes: g };
|
|
191
|
+
});
|
|
192
|
+
return i ? !1 : (o(n.update(a, { scrollIntoView: !0, userEvent: "input" })), !0);
|
|
193
|
+
}, Le = /* @__PURE__ */ xe();
|
|
194
|
+
function O(r) {
|
|
195
|
+
return r.name == "QuoteMark" || r.name == "ListMark";
|
|
196
|
+
}
|
|
197
|
+
function we(r, n) {
|
|
198
|
+
if (r.name != "OrderedList" && r.name != "BulletList")
|
|
199
|
+
return !1;
|
|
200
|
+
let o = r.firstChild, t = r.getChild("ListItem", "ListItem");
|
|
201
|
+
if (!t)
|
|
202
|
+
return !1;
|
|
203
|
+
let e = n.lineAt(o.to), i = n.lineAt(t.from), a = /^[\s>]*$/.test(e.text);
|
|
204
|
+
return e.number + (a ? 0 : 1) < i.number;
|
|
205
|
+
}
|
|
206
|
+
function F(r, n, o) {
|
|
207
|
+
let t = "";
|
|
208
|
+
for (let e = 0, i = r.length - 2; e <= i; e++)
|
|
209
|
+
t += r[e].blank(e < i ? w(o.text, 4, r[e + 1].from) - t.length : null, e < i);
|
|
210
|
+
return E(t, n);
|
|
211
|
+
}
|
|
212
|
+
function Ae(r, n) {
|
|
213
|
+
let o = r.resolveInner(n, -1), t = n;
|
|
214
|
+
O(o) && (t = o.from, o = o.parent);
|
|
215
|
+
for (let e; e = o.childBefore(t); )
|
|
216
|
+
if (O(e))
|
|
217
|
+
t = e.from;
|
|
218
|
+
else if (e.name == "OrderedList" || e.name == "BulletList")
|
|
219
|
+
o = e.lastChild, t = o.to;
|
|
220
|
+
else
|
|
221
|
+
break;
|
|
222
|
+
return o;
|
|
223
|
+
}
|
|
224
|
+
const Ce = ({ state: r, dispatch: n }) => {
|
|
225
|
+
let o = A(r), t = null, e = r.changeByRange((i) => {
|
|
226
|
+
let a = i.from, { doc: m } = r;
|
|
227
|
+
if (i.empty && b.isActiveAt(r, i.from)) {
|
|
228
|
+
let s = m.lineAt(a), f = U(Ae(o, a), m);
|
|
229
|
+
if (f.length) {
|
|
230
|
+
let l = f[f.length - 1], u = l.to - l.spaceAfter.length + (l.spaceAfter ? 1 : 0);
|
|
231
|
+
if (a - s.from > u && !/\S/.test(s.text.slice(u, a - s.from)))
|
|
232
|
+
return {
|
|
233
|
+
range: x.cursor(s.from + u),
|
|
234
|
+
changes: { from: s.from + u, to: a }
|
|
235
|
+
};
|
|
236
|
+
if (a - s.from == u && // Only apply this if we're on the line that has the
|
|
237
|
+
// construct's syntax, or there's only indentation in the
|
|
238
|
+
// target range
|
|
239
|
+
(!l.item || s.from <= l.item.from || !/\S/.test(s.text.slice(0, l.to)))) {
|
|
240
|
+
let d = s.from + l.from;
|
|
241
|
+
if (l.item && l.node.from < l.item.from && /\S/.test(s.text.slice(l.from, l.to))) {
|
|
242
|
+
let g = l.blank(w(s.text, 4, l.to) - w(s.text, 4, l.from));
|
|
243
|
+
return d == s.from && (g = E(g, r)), {
|
|
244
|
+
range: x.cursor(d + g.length),
|
|
245
|
+
changes: { from: d, to: s.from + l.to, insert: g }
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
if (d < a)
|
|
249
|
+
return { range: x.cursor(d), changes: { from: d, to: a } };
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return t = { range: i };
|
|
254
|
+
});
|
|
255
|
+
return t ? !1 : (n(r.update(e, { scrollIntoView: !0, userEvent: "delete" })), !0);
|
|
256
|
+
}, be = [
|
|
257
|
+
{ key: "Enter", run: Le },
|
|
258
|
+
{ key: "Backspace", run: Ce }
|
|
259
|
+
], X = /* @__PURE__ */ ae({ matchClosingTags: !1 });
|
|
260
|
+
function Oe(r = {}) {
|
|
261
|
+
let { codeLanguages: n, defaultCodeLanguage: o, addKeymap: t = !0, base: { parser: e } = he, completeHTMLTags: i = !0, pasteURLAsLink: a = !0, htmlTagLanguage: m = X } = r;
|
|
262
|
+
if (!(e instanceof re))
|
|
263
|
+
throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");
|
|
264
|
+
let s = r.extensions ? [r.extensions] : [], f = [m.support, de], l;
|
|
265
|
+
a && f.push(Ie), o instanceof N ? (f.push(o.support), l = o.language) : o && (l = o);
|
|
266
|
+
let u = n || l ? ke(n, l) : void 0;
|
|
267
|
+
s.push(ne({ codeParser: u, htmlParser: m.language.parser })), t && f.push(z.high(_.of(be)));
|
|
268
|
+
let d = T(e.configure(s));
|
|
269
|
+
return i && f.push(d.data.of({ autocomplete: Be })), new N(d, f);
|
|
270
|
+
}
|
|
271
|
+
function Be(r) {
|
|
272
|
+
let { state: n, pos: o } = r, t = /<[:\-\.\w\u00b7-\uffff]*$/.exec(n.sliceDoc(o - 25, o));
|
|
273
|
+
if (!t)
|
|
274
|
+
return null;
|
|
275
|
+
let e = A(n).resolveInner(o, -1);
|
|
276
|
+
for (; e && !e.type.isTop; ) {
|
|
277
|
+
if (e.name == "CodeBlock" || e.name == "FencedCode" || e.name == "ProcessingInstructionBlock" || e.name == "CommentBlock" || e.name == "Link" || e.name == "Image")
|
|
278
|
+
return null;
|
|
279
|
+
e = e.parent;
|
|
280
|
+
}
|
|
281
|
+
return {
|
|
282
|
+
from: o - t[0].length,
|
|
283
|
+
to: o,
|
|
284
|
+
options: Se(),
|
|
285
|
+
validFor: /^<[:\-\.\w\u00b7-\uffff]*$/
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
let y = null;
|
|
289
|
+
function Se() {
|
|
290
|
+
if (y)
|
|
291
|
+
return y;
|
|
292
|
+
let r = me(new te(K.create({ extensions: X }), 0, !0));
|
|
293
|
+
return y = r ? r.options : [];
|
|
294
|
+
}
|
|
295
|
+
const ve = /code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i, Ie = /* @__PURE__ */ j.domEventHandlers({
|
|
296
|
+
paste: (r, n) => {
|
|
297
|
+
var o;
|
|
298
|
+
let { main: t } = n.state.selection;
|
|
299
|
+
if (t.empty)
|
|
300
|
+
return !1;
|
|
301
|
+
let e = (o = r.clipboardData) === null || o === void 0 ? void 0 : o.getData("text/plain");
|
|
302
|
+
if (!e || !/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(e) || (/^www\./.test(e) && (e = "https://" + e), !b.isActiveAt(n.state, t.from, 1)))
|
|
303
|
+
return !1;
|
|
304
|
+
let i = A(n.state), a = !1;
|
|
305
|
+
return i.iterate({
|
|
306
|
+
from: t.from,
|
|
307
|
+
to: t.to,
|
|
308
|
+
enter: (m) => {
|
|
309
|
+
(m.from > t.from || ve.test(m.name)) && (a = !0);
|
|
310
|
+
},
|
|
311
|
+
leave: (m) => {
|
|
312
|
+
m.to < t.to && (a = !0);
|
|
313
|
+
}
|
|
314
|
+
}), a ? !1 : (n.dispatch({
|
|
315
|
+
changes: [{ from: t.from, insert: "[" }, { from: t.to, insert: `](${e})` }],
|
|
316
|
+
userEvent: "input.paste",
|
|
317
|
+
scrollIntoView: !0
|
|
318
|
+
}), !0);
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
export {
|
|
322
|
+
he as commonmarkLanguage,
|
|
323
|
+
Ce as deleteMarkupBackward,
|
|
324
|
+
Le as insertNewlineContinueMarkup,
|
|
325
|
+
xe as insertNewlineContinueMarkupCommand,
|
|
326
|
+
Oe as markdown,
|
|
327
|
+
be as markdownKeymap,
|
|
328
|
+
b as markdownLanguage,
|
|
329
|
+
Ie as pasteURLAsLink
|
|
330
|
+
};
|
package/dist/index7.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { Root as s, Image as t, Fallback as m } from "./index46.js";
|
|
4
|
+
import { cn as o } from "./index2.js";
|
|
5
|
+
const d = f.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ l(
|
|
6
|
+
s,
|
|
7
|
+
{
|
|
8
|
+
ref: r,
|
|
9
|
+
className: o(
|
|
10
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border border-[#00ff00]",
|
|
11
|
+
a
|
|
12
|
+
),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
d.displayName = s.displayName;
|
|
17
|
+
const i = f.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ l(
|
|
18
|
+
t,
|
|
19
|
+
{
|
|
20
|
+
ref: r,
|
|
21
|
+
className: o("aspect-square h-full w-full", a),
|
|
22
|
+
...e
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
i.displayName = t.displayName;
|
|
26
|
+
const c = f.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ l(
|
|
27
|
+
m,
|
|
28
|
+
{
|
|
29
|
+
ref: r,
|
|
30
|
+
className: o(
|
|
31
|
+
"flex h-full w-full items-center justify-center rounded-full bg-black border border-[#00ff00] text-[#00ff00]",
|
|
32
|
+
a
|
|
33
|
+
),
|
|
34
|
+
...e
|
|
35
|
+
}
|
|
36
|
+
));
|
|
37
|
+
c.displayName = m.displayName;
|
|
38
|
+
export {
|
|
39
|
+
d as Avatar,
|
|
40
|
+
c as AvatarFallback,
|
|
41
|
+
i as AvatarImage
|
|
42
|
+
};
|