@mechane-ai/elements 0.9.0 → 0.11.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/NOTICE +24 -0
- package/README.md +7 -1
- package/dist/ai.js +153 -133
- package/dist/{categorical-values-DYRiw5Qd.js → categorical-values-FYc43JCa.js} +4 -4
- package/dist/{chart-frame-RL1hCWBC.js → chart-frame-Bczk5sWj.js} +22 -14
- package/dist/{chart-input-Bm3ot1yD.js → chart-input-CbzVN76m.js} +2 -2
- package/dist/charts/cartesian.js +529 -450
- package/dist/charts/distribution.js +302 -261
- package/dist/charts/graph.js +137 -103
- package/dist/charts/hierarchy.js +7 -7
- package/dist/charts/matrix.js +187 -174
- package/dist/charts/timeline.js +119 -92
- package/dist/charts.js +1 -1
- package/dist/code-block-B7xzM3tD.js +180 -0
- package/dist/collections.js +319 -242
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +81 -63
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +115 -96
- package/dist/content/tree.js +43 -38
- package/dist/{content-link-BrPrpBof.js → content-link-CatGOrbo.js} +6 -2
- package/dist/content.js +172 -153
- package/dist/{assets/stylex.css → elements.css} +585 -229
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +25 -25
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +239 -192
- package/dist/navigation/commands.js +45 -42
- package/dist/{navigation-yxK3iQXo.js → navigation-D2_sGy3C.js} +2 -2
- package/dist/navigation.js +10 -10
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/conversation.d.ts +14 -2
- package/dist/packages/ai/src/index.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -0
- package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
- package/dist/packages/charts/src/chart-frame.d.ts +3 -0
- package/dist/packages/charts/src/chart-theme.d.ts +2 -1
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +22 -2
- package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -2
- package/dist/packages/collections/src/collection-scroll.d.ts +2 -1
- package/dist/packages/collections/src/index.d.ts +1 -0
- package/dist/packages/collections/src/inspector.d.ts +6 -3
- package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -1
- package/dist/packages/content/src/viewer-styles.d.ts +64 -0
- package/dist/packages/core/src/agent-avatar-glyphs.d.ts +1 -1
- package/dist/packages/core/src/index.d.ts +1 -1
- package/dist/packages/core/src/surfaces.d.ts +5 -0
- package/dist/packages/feedback/src/index.d.ts +4 -1
- package/dist/packages/feedback/src/toast.d.ts +5 -27
- package/dist/packages/forms/src/field-styles.d.ts +9 -0
- package/dist/packages/forms/src/selection-styles.d.ts +18 -2
- package/dist/packages/foundations/src/overlay-styles.d.ts +3 -1
- package/dist/packages/foundations/src/popup-styles.d.ts +7 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +9 -0
- package/dist/packages/layout/src/frame.stylex.d.ts +1 -0
- package/dist/packages/layout/src/sidebar.d.ts +3 -1
- package/dist/packages/overlays/src/alert-dialog.d.ts +5 -2
- package/dist/packages/overlays/src/dialog.d.ts +7 -3
- package/dist/pierre-diff--zsiHCCB.js +71 -0
- package/dist/pierre-theme-D9hnHv3Z.js +126 -0
- package/dist/{pierre-tree-CRk09rx7.js → pierre-tree-D47uA7lb.js} +3 -3
- package/dist/{src-Cc0Sadzr.js → src-C_heP5kL.js} +295 -221
- package/dist/src-Cs0dRc4X.js +617 -0
- package/dist/src-D05isEh_.js +1652 -0
- package/dist/src-DXsGTJgv.js +969 -0
- package/dist/tokens.js +33 -25
- package/dist/viewer-styles-CpHqp5Qv.js +70 -0
- package/package.json +2 -1
- package/packages/foundations/src/tokens.stylex.ts +55 -48
- package/styles.css +1 -1
- package/dist/code-block-B30xQKqg.js +0 -175
- package/dist/pierre-diff-CZdzgiYm.js +0 -66
- package/dist/pierre-theme-BpESNIsV.js +0 -96
- package/dist/popup-styles-CvtZDE2t.js +0 -135
- package/dist/src-CfDf8TY8.js +0 -466
- package/dist/src-DuuAmS-c.js +0 -360
- package/dist/src-elMBQ2Dh.js +0 -1087
package/dist/content/code.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CodeBlock } from "../code-block-
|
|
1
|
+
export { t as CodeBlock } from "../code-block-B7xzM3tD.js";
|
package/dist/content/diff.js
CHANGED
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { E as e, _ as t, g as n } from "../src-D05isEh_.js";
|
|
2
|
+
import { t as r } from "../code-block-B7xzM3tD.js";
|
|
3
|
+
import { t as i } from "../viewer-styles-CpHqp5Qv.js";
|
|
4
|
+
import * as a from "@stylexjs/stylex";
|
|
5
|
+
import { useEffect as o, useState as s } from "react";
|
|
6
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
7
|
// packages/content/src/diff/diff-viewer.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
return e.patch === void 0 ? /* @__PURE__ */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
var d = 5e5;
|
|
9
|
+
function f({ source: e, maxHeight: t }) {
|
|
10
|
+
return e.patch === void 0 ? /* @__PURE__ */ u("div", {
|
|
11
|
+
className: "x78zum5 xdt5ytf x1n8ia3y xeuugli",
|
|
12
|
+
children: [e.before !== null && /* @__PURE__ */ l(r, {
|
|
13
|
+
code: e.before.code,
|
|
14
|
+
language: e.before.language,
|
|
15
|
+
filename: `Before · ${e.before.name}`,
|
|
16
|
+
maxHeight: t
|
|
17
|
+
}), e.after !== null && /* @__PURE__ */ l(r, {
|
|
18
|
+
code: e.after.code,
|
|
19
|
+
language: e.after.language,
|
|
20
|
+
filename: `After · ${e.after.name}`,
|
|
21
|
+
maxHeight: t
|
|
22
|
+
})]
|
|
23
|
+
}) : /* @__PURE__ */ l(r, {
|
|
20
24
|
code: e.patch,
|
|
21
25
|
language: "diff",
|
|
22
26
|
filename: "Patch",
|
|
23
27
|
maxHeight: t
|
|
24
28
|
});
|
|
25
29
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
30
|
+
function p({ source: e, maxHeight: t }) {
|
|
31
|
+
return /* @__PURE__ */ l("div", {
|
|
28
32
|
className: "x1doqdfy",
|
|
29
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ u(n.Root, { children: [/* @__PURE__ */ l(n.Trigger, { children: "View supplied source" }), /* @__PURE__ */ l(n.Panel, { children: /* @__PURE__ */ l(f, {
|
|
30
34
|
source: e,
|
|
31
|
-
maxHeight:
|
|
35
|
+
maxHeight: t
|
|
32
36
|
}) })] })
|
|
33
37
|
});
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
let { label:
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
|
|
39
|
+
function m(n) {
|
|
40
|
+
let { label: r, layout: m = "split", wrap: h = !1, annotations: g = [], maxHeight: _ = 480, patch: v, before: y, after: b } = n, [x, S] = s(n), [C, w] = s(), [T, E] = s(!1), D = v === void 0 && y !== null && b !== null, O = y?.name === x.before?.name && y?.code === x.before?.code && y?.language === x.before?.language, k = b?.name === x.after?.name && b?.code === x.after?.code && b?.language === x.after?.language;
|
|
41
|
+
v === x.patch && O && k || S(n);
|
|
42
|
+
let A = (v === void 0 ? (y === null ? 0 : y.code.length) + (b === null ? 0 : b.code.length) : v.length) > d;
|
|
43
|
+
o(() => {
|
|
40
44
|
let e = !0;
|
|
41
45
|
async function t() {
|
|
42
|
-
if (!
|
|
43
|
-
let t = await import("../pierre-diff
|
|
44
|
-
e &&
|
|
45
|
-
source:
|
|
46
|
+
if (!A) try {
|
|
47
|
+
let t = await import("../pierre-diff--zsiHCCB.js"), n = t.prepareDiff(x);
|
|
48
|
+
e && w({
|
|
49
|
+
source: x,
|
|
46
50
|
Component: t.PierreDiff,
|
|
47
51
|
files: n
|
|
48
52
|
});
|
|
49
53
|
} catch {
|
|
50
|
-
e &&
|
|
51
|
-
source:
|
|
54
|
+
e && w({
|
|
55
|
+
source: x,
|
|
52
56
|
Component: null,
|
|
53
57
|
files: null
|
|
54
58
|
});
|
|
@@ -57,42 +61,56 @@ function d(t) {
|
|
|
57
61
|
return t(), () => {
|
|
58
62
|
e = !1;
|
|
59
63
|
};
|
|
60
|
-
}, [
|
|
61
|
-
let
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
"aria-label":
|
|
64
|
-
|
|
64
|
+
}, [x, A]);
|
|
65
|
+
let j = C !== void 0 && C.source === x ? C : void 0, M = j?.files?.length === 0;
|
|
66
|
+
return /* @__PURE__ */ u("section", {
|
|
67
|
+
"aria-label": r,
|
|
68
|
+
...a.props(i.root),
|
|
65
69
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
children: [/* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
/* @__PURE__ */ u("div", {
|
|
71
|
+
...a.props(i.header),
|
|
72
|
+
children: [/* @__PURE__ */ l("span", {
|
|
73
|
+
...a.props(i.label),
|
|
74
|
+
children: r
|
|
75
|
+
}), /* @__PURE__ */ u("div", {
|
|
76
|
+
...a.props(i.actions),
|
|
77
|
+
children: [D && /* @__PURE__ */ l(e, {
|
|
78
|
+
disabled: j === void 0 || j.Component === null,
|
|
79
|
+
onClick: () => E(!T),
|
|
80
|
+
children: T ? "Show changes only" : "Show unchanged lines"
|
|
81
|
+
}), v !== void 0 && /* @__PURE__ */ l(t, {
|
|
82
|
+
value: v,
|
|
83
|
+
label: r,
|
|
84
|
+
children: "Copy patch"
|
|
85
|
+
})]
|
|
72
86
|
})]
|
|
73
87
|
}),
|
|
74
|
-
|
|
75
|
-
files:
|
|
76
|
-
label:
|
|
77
|
-
layout:
|
|
78
|
-
wrap:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
j !== void 0 && j.Component !== null ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(j.Component, {
|
|
89
|
+
files: j.files,
|
|
90
|
+
label: r,
|
|
91
|
+
layout: m,
|
|
92
|
+
wrap: h,
|
|
93
|
+
showUnchanged: D && T,
|
|
94
|
+
annotations: g,
|
|
95
|
+
maxHeight: _
|
|
96
|
+
}), /* @__PURE__ */ l(p, {
|
|
97
|
+
source: x,
|
|
98
|
+
maxHeight: _
|
|
99
|
+
})] }) : /* @__PURE__ */ u(c, { children: [(A || j !== void 0) && /* @__PURE__ */ l("div", {
|
|
100
|
+
...a.props(i.note),
|
|
101
|
+
children: A ? "This diff exceeds the rendering limit. Supplied source is shown below." : "Diff rendering is unavailable. Supplied source is shown below."
|
|
102
|
+
}), /* @__PURE__ */ l("div", {
|
|
103
|
+
className: "x1mvvolr",
|
|
104
|
+
children: /* @__PURE__ */ l(f, {
|
|
105
|
+
source: x,
|
|
106
|
+
maxHeight: _
|
|
107
|
+
})
|
|
90
108
|
})] }),
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
M && /* @__PURE__ */ l("div", {
|
|
110
|
+
...a.props(i.note),
|
|
93
111
|
children: "No file changes in this patch."
|
|
94
112
|
})
|
|
95
113
|
]
|
|
96
114
|
});
|
|
97
115
|
}
|
|
98
|
-
export {
|
|
116
|
+
export { m as DiffViewer };
|
package/dist/content/link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ContentLink } from "../content-link-
|
|
1
|
+
export { t as ContentLink } from "../content-link-CatGOrbo.js";
|
package/dist/content/markdown.js
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import { t as e } from "../code-block-
|
|
2
|
-
import { n as t, t as n } from "../content-link-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { t as e } from "../code-block-B7xzM3tD.js";
|
|
2
|
+
import { n as t, t as n } from "../content-link-CatGOrbo.js";
|
|
3
|
+
import { t as r } from "../viewer-styles-CpHqp5Qv.js";
|
|
4
|
+
import * as i from "@stylexjs/stylex";
|
|
5
|
+
import { Children as a, createElement as o } from "react";
|
|
6
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { Block as u, Streamdown as d, defaultRehypePlugins as f, defaultRemarkPlugins as p, useIsCodeFenceIncomplete as m } from "streamdown";
|
|
7
8
|
// packages/content/src/markdown/markdown-options.ts
|
|
8
|
-
var
|
|
9
|
-
rehypePlugins: Object.entries(
|
|
10
|
-
remarkPlugins: Object.values(
|
|
9
|
+
var h = /* @__PURE__ */ new Set(["href", "src"]), g = {
|
|
10
|
+
rehypePlugins: Object.entries(f).filter(([e]) => e === "sanitize").map(([, e]) => e),
|
|
11
|
+
remarkPlugins: Object.values(p),
|
|
11
12
|
skipHtml: !0,
|
|
12
13
|
urlTransform: (e, n) => {
|
|
13
|
-
if (
|
|
14
|
+
if (h.has(n)) return t(e);
|
|
14
15
|
}
|
|
15
|
-
},
|
|
16
|
+
}, _ = {
|
|
17
|
+
block: {
|
|
18
|
+
keoZOQ: "xyrmp21 x14l7nz5",
|
|
19
|
+
k1K539: "x1jfksii xzboxd6",
|
|
20
|
+
$$css: !0
|
|
21
|
+
},
|
|
16
22
|
heading: {
|
|
17
|
-
keoZOQ: "x1m1vpj6",
|
|
18
|
-
k1K539: "x1jfksii",
|
|
19
|
-
k63SB2: "
|
|
23
|
+
keoZOQ: "x1m1vpj6 x14l7nz5",
|
|
24
|
+
k1K539: "x1jfksii xzboxd6",
|
|
25
|
+
k63SB2: "x1b5ytql",
|
|
20
26
|
$$css: !0
|
|
21
27
|
},
|
|
22
28
|
title: {
|
|
@@ -33,151 +39,164 @@ var m = /* @__PURE__ */ new Set(["href", "src"]), h = {
|
|
|
33
39
|
kGuDYH: "xtqrqnz",
|
|
34
40
|
kLWn49: "x1778rvt",
|
|
35
41
|
$$css: !0
|
|
42
|
+
},
|
|
43
|
+
tableRegion: {
|
|
44
|
+
k7Eaqz: "xeuugli",
|
|
45
|
+
ks0D6T: "x193iq5w",
|
|
46
|
+
kXHlph: "xw2csxc",
|
|
47
|
+
kMzoRj: "xmkeg23",
|
|
48
|
+
kt9PQ7: "x1qhh985",
|
|
49
|
+
ksu8eU: "x1y0btm7",
|
|
50
|
+
kVAM5u: "x1ey3b81",
|
|
51
|
+
$$css: !0
|
|
36
52
|
}
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
return
|
|
53
|
+
}, v = /* @__PURE__ */ new Set(["string", "number"]);
|
|
54
|
+
function y(e) {
|
|
55
|
+
return v.has(typeof e);
|
|
40
56
|
}
|
|
41
|
-
function
|
|
42
|
-
let r =
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
function b({ children: t, className: n }) {
|
|
58
|
+
let r = m(), i = typeof n == "string" ? /(?:^|\s)language-([^\s]+)/u.exec(n) : null, o = i === null ? void 0 : i[1], s = a.toArray(t);
|
|
59
|
+
return s.every(y) ? /* @__PURE__ */ c("div", {
|
|
60
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
61
|
+
children: /* @__PURE__ */ c(e, {
|
|
62
|
+
code: s.join(""),
|
|
63
|
+
language: o,
|
|
64
|
+
streaming: r
|
|
65
|
+
})
|
|
66
|
+
}) : /* @__PURE__ */ c("code", {
|
|
48
67
|
className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
|
|
49
68
|
children: t
|
|
50
69
|
});
|
|
51
70
|
}
|
|
52
|
-
function
|
|
53
|
-
let
|
|
54
|
-
return a
|
|
55
|
-
id:
|
|
56
|
-
...
|
|
71
|
+
function x({ level: e, headingLevel: t, children: n, id: r }) {
|
|
72
|
+
let a = `h${Math.min(e + t - 1, 6)}`, s = e === 1 ? _.title : e === 2 ? _.section : _.minor;
|
|
73
|
+
return o(a, {
|
|
74
|
+
id: r,
|
|
75
|
+
...i.props(_.heading, s)
|
|
57
76
|
}, n);
|
|
58
77
|
}
|
|
59
|
-
var
|
|
60
|
-
p: ({ children: e }) => /* @__PURE__ */
|
|
61
|
-
className: "
|
|
78
|
+
var S = {
|
|
79
|
+
p: ({ children: e }) => /* @__PURE__ */ c("p", {
|
|
80
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
62
81
|
children: e
|
|
63
82
|
}),
|
|
64
|
-
ul: ({ children: e }) => /* @__PURE__ */
|
|
65
|
-
className: "
|
|
83
|
+
ul: ({ children: e }) => /* @__PURE__ */ c("ul", {
|
|
84
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
|
|
66
85
|
children: e
|
|
67
86
|
}),
|
|
68
|
-
ol: ({ children: e, start: t }) => /* @__PURE__ */
|
|
87
|
+
ol: ({ children: e, start: t }) => /* @__PURE__ */ c("ol", {
|
|
69
88
|
start: t,
|
|
70
|
-
className: "
|
|
89
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
|
|
71
90
|
children: e
|
|
72
91
|
}),
|
|
73
|
-
li: ({ children: e }) => /* @__PURE__ */
|
|
92
|
+
li: ({ children: e }) => /* @__PURE__ */ c("li", {
|
|
74
93
|
className: "x1vblts3 xnkn1qj",
|
|
75
94
|
children: e
|
|
76
95
|
}),
|
|
77
|
-
blockquote: ({ children: e }) => /* @__PURE__ */
|
|
78
|
-
className: "
|
|
96
|
+
blockquote: ({ children: e }) => /* @__PURE__ */ c("blockquote", {
|
|
97
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 xrxpjvj x1umj4g3 xyumdvf x1t7ytsu x97x49r x153jb6y",
|
|
79
98
|
children: e
|
|
80
99
|
}),
|
|
81
|
-
code: ({ children: e, className: t }) => /* @__PURE__ */
|
|
100
|
+
code: ({ children: e, className: t }) => /* @__PURE__ */ c(b, {
|
|
82
101
|
className: t,
|
|
83
102
|
children: e
|
|
84
103
|
}),
|
|
85
|
-
inlineCode: ({ children: e }) => /* @__PURE__ */
|
|
104
|
+
inlineCode: ({ children: e }) => /* @__PURE__ */ c("code", {
|
|
86
105
|
className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
|
|
87
106
|
children: e
|
|
88
107
|
}),
|
|
89
|
-
a: ({ href: e, children: t, title: r }) => /* @__PURE__ */
|
|
108
|
+
a: ({ href: e, children: t, title: r }) => /* @__PURE__ */ c(n, {
|
|
90
109
|
href: e,
|
|
91
110
|
title: r,
|
|
92
111
|
children: t
|
|
93
112
|
}),
|
|
94
|
-
img: ({ src: e, alt: t, title: r }) => /* @__PURE__ */
|
|
113
|
+
img: ({ src: e, alt: t, title: r }) => /* @__PURE__ */ c(n, {
|
|
95
114
|
href: typeof e == "string" ? e : void 0,
|
|
96
115
|
title: r,
|
|
97
116
|
children: t !== void 0 && t.length > 0 ? `Open image: ${t}` : "Open image"
|
|
98
117
|
}),
|
|
99
|
-
table: ({ children: e }) => /* @__PURE__ */
|
|
118
|
+
table: ({ children: e }) => /* @__PURE__ */ c("div", {
|
|
100
119
|
role: "region",
|
|
101
120
|
"aria-label": "Markdown table",
|
|
102
121
|
tabIndex: 0,
|
|
103
|
-
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h x1h4wwuj",
|
|
122
|
+
...i.props(r.scrollRegion, _.block, _.tableRegion),
|
|
123
|
+
children: /* @__PURE__ */ c("table", {
|
|
124
|
+
className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h x1h4wwuj x1778rvt",
|
|
106
125
|
children: e
|
|
107
126
|
})
|
|
108
127
|
}),
|
|
109
|
-
thead: ({ children: e }) => /* @__PURE__ */
|
|
110
|
-
tbody: ({ children: e }) => /* @__PURE__ */
|
|
111
|
-
tr: ({ children: e }) => /* @__PURE__ */
|
|
112
|
-
th: ({ children: e }) => /* @__PURE__ */
|
|
128
|
+
thead: ({ children: e }) => /* @__PURE__ */ c("thead", { children: e }),
|
|
129
|
+
tbody: ({ children: e }) => /* @__PURE__ */ c("tbody", { children: e }),
|
|
130
|
+
tr: ({ children: e }) => /* @__PURE__ */ c("tr", { children: e }),
|
|
131
|
+
th: ({ children: e }) => /* @__PURE__ */ c("th", {
|
|
113
132
|
scope: "col",
|
|
114
|
-
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h x153jb6y
|
|
133
|
+
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h x153jb6y xk4h15q x1r7kqkb",
|
|
115
134
|
children: e
|
|
116
135
|
}),
|
|
117
|
-
td: ({ children: e }) => /* @__PURE__ */
|
|
136
|
+
td: ({ children: e }) => /* @__PURE__ */ c("td", {
|
|
118
137
|
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h",
|
|
119
138
|
children: e
|
|
120
139
|
}),
|
|
121
|
-
input: ({ checked: e }) => /* @__PURE__ */
|
|
140
|
+
input: ({ checked: e }) => /* @__PURE__ */ c("input", {
|
|
122
141
|
type: "checkbox",
|
|
123
142
|
checked: e ?? !1,
|
|
124
143
|
disabled: !0,
|
|
125
144
|
"aria-label": "Task item",
|
|
126
145
|
className: "x1bzlxqo x6e7ywc"
|
|
127
146
|
}),
|
|
128
|
-
hr: () => /* @__PURE__ */
|
|
129
|
-
strong: ({ children: e }) => /* @__PURE__ */
|
|
130
|
-
className: "
|
|
147
|
+
hr: () => /* @__PURE__ */ c("hr", { className: "xhff0hu xc342km x178xt8z x13fuv20 xhjagg4" }),
|
|
148
|
+
strong: ({ children: e }) => /* @__PURE__ */ c("strong", {
|
|
149
|
+
className: "x1b5ytql",
|
|
131
150
|
children: e
|
|
132
151
|
}),
|
|
133
|
-
em: ({ children: e }) => /* @__PURE__ */
|
|
152
|
+
em: ({ children: e }) => /* @__PURE__ */ c("em", {
|
|
134
153
|
className: "x1k4tb9n",
|
|
135
154
|
children: e
|
|
136
155
|
}),
|
|
137
|
-
del: ({ children: e }) => /* @__PURE__ */
|
|
156
|
+
del: ({ children: e }) => /* @__PURE__ */ c("del", {
|
|
138
157
|
className: "x5lhwog",
|
|
139
158
|
children: e
|
|
140
159
|
})
|
|
141
|
-
},
|
|
142
|
-
function
|
|
160
|
+
}, C = /* @__PURE__ */ "p.h1.h2.h3.h4.h5.h6.ul.ol.li.blockquote.pre.code.a.img.table.thead.tbody.tr.th.td.input.hr.strong.em.del.br.sup.sub.section".split(".");
|
|
161
|
+
function w({ children: e, streaming: t = !1, label: n, headingLevel: r = 1 }) {
|
|
143
162
|
let i = {
|
|
144
|
-
h1: (e) => /* @__PURE__ */
|
|
163
|
+
h1: (e) => /* @__PURE__ */ c(x, {
|
|
145
164
|
...e,
|
|
146
165
|
level: 1,
|
|
147
166
|
headingLevel: r
|
|
148
167
|
}),
|
|
149
|
-
h2: (e) => /* @__PURE__ */
|
|
168
|
+
h2: (e) => /* @__PURE__ */ c(x, {
|
|
150
169
|
...e,
|
|
151
170
|
level: 2,
|
|
152
171
|
headingLevel: r
|
|
153
172
|
}),
|
|
154
|
-
h3: (e) => /* @__PURE__ */
|
|
173
|
+
h3: (e) => /* @__PURE__ */ c(x, {
|
|
155
174
|
...e,
|
|
156
175
|
level: 3,
|
|
157
176
|
headingLevel: r
|
|
158
177
|
}),
|
|
159
|
-
h4: (e) => /* @__PURE__ */
|
|
178
|
+
h4: (e) => /* @__PURE__ */ c(x, {
|
|
160
179
|
...e,
|
|
161
180
|
level: 4,
|
|
162
181
|
headingLevel: r
|
|
163
182
|
}),
|
|
164
|
-
h5: (e) => /* @__PURE__ */
|
|
183
|
+
h5: (e) => /* @__PURE__ */ c(x, {
|
|
165
184
|
...e,
|
|
166
185
|
level: 5,
|
|
167
186
|
headingLevel: r
|
|
168
187
|
}),
|
|
169
|
-
h6: (e) => /* @__PURE__ */
|
|
188
|
+
h6: (e) => /* @__PURE__ */ c(x, {
|
|
170
189
|
...e,
|
|
171
190
|
level: 6,
|
|
172
191
|
headingLevel: r
|
|
173
192
|
})
|
|
174
193
|
};
|
|
175
|
-
return /* @__PURE__ */
|
|
176
|
-
...
|
|
177
|
-
className: "xeuugli xbixft x1hz01jw xvmahel xtqrqnz
|
|
194
|
+
return /* @__PURE__ */ c(d, {
|
|
195
|
+
...g,
|
|
196
|
+
className: "xeuugli xbixft x1hz01jw xvmahel xtqrqnz x1ytb0s6 xj57cvi xj0a0fe",
|
|
178
197
|
"aria-label": n,
|
|
179
198
|
components: {
|
|
180
|
-
...
|
|
199
|
+
...S,
|
|
181
200
|
...i
|
|
182
201
|
},
|
|
183
202
|
mode: t ? "streaming" : "static",
|
|
@@ -185,37 +204,37 @@ function C({ children: e, streaming: t = !1, label: n, headingLevel: r = 1 }) {
|
|
|
185
204
|
animated: !1,
|
|
186
205
|
controls: !1,
|
|
187
206
|
linkSafety: { enabled: !1 },
|
|
188
|
-
allowedElements:
|
|
207
|
+
allowedElements: C,
|
|
189
208
|
children: e
|
|
190
209
|
}, r);
|
|
191
210
|
}
|
|
192
211
|
// packages/content/src/markdown/markdown-preview.tsx
|
|
193
|
-
function
|
|
194
|
-
return /* @__PURE__ */
|
|
212
|
+
function T({ children: e }) {
|
|
213
|
+
return /* @__PURE__ */ l(s, { children: [e, " "] });
|
|
195
214
|
}
|
|
196
|
-
var
|
|
197
|
-
p:
|
|
198
|
-
li:
|
|
199
|
-
h1:
|
|
200
|
-
h2:
|
|
201
|
-
h3:
|
|
202
|
-
h4:
|
|
203
|
-
h5:
|
|
204
|
-
h6:
|
|
205
|
-
blockquote:
|
|
206
|
-
pre:
|
|
207
|
-
code: ({ children: e }) => /* @__PURE__ */ s
|
|
208
|
-
th:
|
|
209
|
-
td:
|
|
210
|
-
br: () => /* @__PURE__ */ s
|
|
211
|
-
img: ({ alt: e }) => /* @__PURE__ */ s
|
|
215
|
+
var E = {
|
|
216
|
+
p: T,
|
|
217
|
+
li: T,
|
|
218
|
+
h1: T,
|
|
219
|
+
h2: T,
|
|
220
|
+
h3: T,
|
|
221
|
+
h4: T,
|
|
222
|
+
h5: T,
|
|
223
|
+
h6: T,
|
|
224
|
+
blockquote: T,
|
|
225
|
+
pre: T,
|
|
226
|
+
code: ({ children: e }) => /* @__PURE__ */ c(s, { children: e }),
|
|
227
|
+
th: T,
|
|
228
|
+
td: T,
|
|
229
|
+
br: () => /* @__PURE__ */ c(s, { children: " " }),
|
|
230
|
+
img: ({ alt: e }) => /* @__PURE__ */ c(s, { children: e })
|
|
212
231
|
};
|
|
213
|
-
function
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
...
|
|
232
|
+
function D({ children: e }) {
|
|
233
|
+
return /* @__PURE__ */ c(u, {
|
|
234
|
+
...g,
|
|
216
235
|
content: e,
|
|
217
|
-
components:
|
|
218
|
-
allowedElements: Object.keys(
|
|
236
|
+
components: E,
|
|
237
|
+
allowedElements: Object.keys(E),
|
|
219
238
|
unwrapDisallowed: !0,
|
|
220
239
|
shouldParseIncompleteMarkdown: !1,
|
|
221
240
|
shouldNormalizeHtmlIndentation: !1,
|
|
@@ -223,4 +242,4 @@ function E({ children: e }) {
|
|
|
223
242
|
index: 0
|
|
224
243
|
});
|
|
225
244
|
}
|
|
226
|
-
export {
|
|
245
|
+
export { w as Markdown, D as MarkdownPreview };
|
package/dist/content/tree.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { E as e } from "../src-D05isEh_.js";
|
|
2
|
+
import { t } from "../viewer-styles-CpHqp5Qv.js";
|
|
3
|
+
import * as n from "@stylexjs/stylex";
|
|
4
|
+
import { useEffect as r, useState as i } from "react";
|
|
5
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
6
|
// packages/content/src/tree/file-tree.tsx
|
|
6
|
-
var
|
|
7
|
+
var c = 200, l = {
|
|
7
8
|
kogj98: "x1ghz6dp",
|
|
8
9
|
kmVPX3: "x69ldcm",
|
|
9
10
|
kH6xsr: "x3ct3a4",
|
|
10
11
|
kVQacm: "xysyzu8",
|
|
11
12
|
$$css: !0
|
|
12
|
-
},
|
|
13
|
-
|
|
13
|
+
}, u = { paths: (e) => [
|
|
14
|
+
l,
|
|
14
15
|
{
|
|
15
16
|
kskxy: e == null ? e : "x1jols5v",
|
|
16
17
|
$$css: !0
|
|
17
18
|
},
|
|
18
19
|
{ "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
19
20
|
] };
|
|
20
|
-
function
|
|
21
|
-
let [
|
|
21
|
+
function d(l) {
|
|
22
|
+
let [d, f] = i({
|
|
22
23
|
Component: null,
|
|
23
24
|
hasFailed: !1
|
|
24
|
-
}), { label:
|
|
25
|
-
return
|
|
25
|
+
}), { label: p, paths: m, selectedPaths: h, onSelectedPathsChange: g, height: _ = 320 } = l;
|
|
26
|
+
return r(() => {
|
|
26
27
|
let e = !0;
|
|
27
28
|
async function t() {
|
|
28
29
|
try {
|
|
29
|
-
let t = await import("../pierre-tree-
|
|
30
|
-
e &&
|
|
30
|
+
let t = await import("../pierre-tree-D47uA7lb.js");
|
|
31
|
+
e && f({
|
|
31
32
|
Component: t.PierreTree,
|
|
32
33
|
hasFailed: !1
|
|
33
34
|
});
|
|
34
35
|
} catch {
|
|
35
|
-
e &&
|
|
36
|
+
e && f({
|
|
36
37
|
Component: null,
|
|
37
38
|
hasFailed: !0
|
|
38
39
|
});
|
|
@@ -41,37 +42,41 @@ function u(c) {
|
|
|
41
42
|
return t(), () => {
|
|
42
43
|
e = !1;
|
|
43
44
|
};
|
|
44
|
-
}, []), /* @__PURE__ */
|
|
45
|
-
"aria-label":
|
|
46
|
-
|
|
47
|
-
children: [/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
children:
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
}, []), /* @__PURE__ */ s("section", {
|
|
46
|
+
"aria-label": p,
|
|
47
|
+
...n.props(t.root),
|
|
48
|
+
children: [/* @__PURE__ */ o("div", {
|
|
49
|
+
...n.props(t.header),
|
|
50
|
+
children: /* @__PURE__ */ o("span", {
|
|
51
|
+
...n.props(t.label),
|
|
52
|
+
children: p
|
|
53
|
+
})
|
|
54
|
+
}), m.length === 0 ? /* @__PURE__ */ o("p", {
|
|
55
|
+
...n.props(t.note),
|
|
52
56
|
children: "No files."
|
|
53
|
-
}) :
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
}) : d.Component === null ? /* @__PURE__ */ s(a, { children: [
|
|
58
|
+
d.hasFailed && /* @__PURE__ */ o("p", {
|
|
59
|
+
...n.props(t.note),
|
|
56
60
|
children: "Tree navigation is unavailable. Select a path below."
|
|
57
61
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
"aria-label": `${
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
/* @__PURE__ */ o("ul", {
|
|
63
|
+
"aria-label": `${p} paths`,
|
|
64
|
+
tabIndex: 0,
|
|
65
|
+
...n.props(t.scrollRegion, u.paths(_)),
|
|
66
|
+
children: m.slice(0, c).map((t) => /* @__PURE__ */ o("li", {
|
|
67
|
+
className: "x10dazmo xeuugli xj0a0fe",
|
|
68
|
+
children: /* @__PURE__ */ o(e, {
|
|
69
|
+
"aria-pressed": h.includes(t),
|
|
70
|
+
onClick: () => g([t]),
|
|
66
71
|
children: t
|
|
67
72
|
})
|
|
68
73
|
}, t))
|
|
69
74
|
}),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
children: [
|
|
75
|
+
m.length > c && /* @__PURE__ */ s("p", {
|
|
76
|
+
...n.props(t.note),
|
|
77
|
+
children: [m.length - c, " paths omitted until tree navigation loads."]
|
|
73
78
|
})
|
|
74
|
-
] }) : /* @__PURE__ */
|
|
79
|
+
] }) : /* @__PURE__ */ o(d.Component, { ...l })]
|
|
75
80
|
});
|
|
76
81
|
}
|
|
77
|
-
export {
|
|
82
|
+
export { d as FileTree };
|