@mechane-ai/elements 0.8.0 → 0.10.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.
Files changed (94) hide show
  1. package/NOTICE +24 -0
  2. package/README.md +67 -40
  3. package/dist/ai.js +274 -209
  4. package/dist/{categorical-values-dGbaZ0tp.js → categorical-values-DLRE4EEW.js} +4 -4
  5. package/dist/{chart-frame-DgPdIguO.js → chart-frame-et6f6Vhg.js} +22 -14
  6. package/dist/{chart-input-Sac4StHN.js → chart-input-CdLkFomi.js} +2 -2
  7. package/dist/charts/cartesian.js +529 -450
  8. package/dist/charts/distribution.js +302 -261
  9. package/dist/charts/graph.js +137 -103
  10. package/dist/charts/hierarchy.js +7 -7
  11. package/dist/charts/matrix.js +187 -174
  12. package/dist/charts/timeline.js +118 -92
  13. package/dist/charts.js +1 -1
  14. package/dist/code-block-D77maJBB.js +180 -0
  15. package/dist/collections.js +388 -300
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +81 -63
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +115 -96
  20. package/dist/content/tree.js +43 -38
  21. package/dist/{content-link-Dd8gapwc.js → content-link-BpSZeTNK.js} +6 -2
  22. package/dist/content.js +169 -150
  23. package/dist/{assets/stylex.css → elements.css} +862 -338
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +31 -31
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +286 -187
  29. package/dist/navigation/commands.js +45 -42
  30. package/dist/{navigation-yxK3iQXo.js → navigation-D2_sGy3C.js} +2 -2
  31. package/dist/navigation.js +10 -10
  32. package/dist/overlays.js +1 -1
  33. package/dist/packages/ai/src/conversation.d.ts +2 -1
  34. package/dist/packages/ai/src/index.d.ts +4 -0
  35. package/dist/packages/ai/src/message-action.d.ts +10 -0
  36. package/dist/packages/ai/src/message-boundary.d.ts +6 -0
  37. package/dist/packages/ai/src/message.d.ts +2 -1
  38. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -0
  39. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  40. package/dist/packages/charts/src/chart-frame.d.ts +3 -0
  41. package/dist/packages/charts/src/chart-theme.d.ts +2 -1
  42. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +22 -2
  43. package/dist/packages/collections/src/collection-scroll.d.ts +2 -1
  44. package/dist/packages/collections/src/data-table.d.ts +6 -0
  45. package/dist/packages/collections/src/index.d.ts +2 -2
  46. package/dist/packages/collections/src/timeline.d.ts +10 -3
  47. package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -1
  48. package/dist/packages/content/src/viewer-styles.d.ts +64 -0
  49. package/dist/packages/core/src/actions.d.ts +7 -0
  50. package/dist/packages/core/src/agent-avatar-glyphs.d.ts +5 -0
  51. package/dist/packages/core/src/agent-avatar.d.ts +17 -0
  52. package/dist/packages/core/src/copy-value.d.ts +2 -1
  53. package/dist/packages/core/src/index.d.ts +6 -2
  54. package/dist/packages/core/src/surfaces.d.ts +5 -0
  55. package/dist/packages/feedback/src/index.d.ts +4 -1
  56. package/dist/packages/feedback/src/toast.d.ts +5 -27
  57. package/dist/packages/forms/src/agent-avatar-picker.d.ts +8 -0
  58. package/dist/packages/forms/src/field-styles.d.ts +28 -0
  59. package/dist/packages/forms/src/forms.d.ts +2 -1
  60. package/dist/packages/forms/src/index.d.ts +2 -0
  61. package/dist/packages/forms/src/selection-styles.d.ts +18 -2
  62. package/dist/packages/foundations/src/overlay-styles.d.ts +3 -1
  63. package/dist/packages/foundations/src/popup-styles.d.ts +7 -0
  64. package/dist/packages/foundations/src/tokens.stylex.d.ts +61 -0
  65. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  66. package/dist/packages/layout/src/frame.stylex.d.ts +1 -0
  67. package/dist/packages/layout/src/index.d.ts +2 -1
  68. package/dist/packages/layout/src/page-toolbar.d.ts +3 -1
  69. package/dist/packages/layout/src/sidebar.d.ts +7 -1
  70. package/dist/packages/layout/src/view-stack.d.ts +13 -0
  71. package/dist/packages/layout/src/workbench.d.ts +5 -2
  72. package/dist/packages/overlays/src/alert-dialog.d.ts +5 -2
  73. package/dist/packages/overlays/src/dialog.d.ts +7 -3
  74. package/dist/pierre-diff--zsiHCCB.js +71 -0
  75. package/dist/pierre-theme-D9hnHv3Z.js +126 -0
  76. package/dist/{pierre-tree-DdE1boiT.js → pierre-tree-BFxEuxwb.js} +3 -3
  77. package/dist/src-Be7NLG8c.js +1242 -0
  78. package/dist/src-CBspCKfO.js +969 -0
  79. package/dist/src-Cs0dRc4X.js +617 -0
  80. package/dist/src-sU9b0oZW.js +1168 -0
  81. package/dist/theme.js +1 -1
  82. package/dist/tokens.js +69 -10
  83. package/dist/viewer-styles-CpHqp5Qv.js +70 -0
  84. package/package.json +2 -1
  85. package/packages/foundations/src/tokens.stylex.ts +61 -0
  86. package/styles.css +1 -1
  87. package/dist/code-block-BRNdtTaP.js +0 -175
  88. package/dist/pierre-diff-CZdzgiYm.js +0 -66
  89. package/dist/pierre-theme-BpESNIsV.js +0 -96
  90. package/dist/popup-styles-CvtZDE2t.js +0 -135
  91. package/dist/src-Bc5sEhdO.js +0 -680
  92. package/dist/src-CfDf8TY8.js +0 -466
  93. package/dist/src-DV0BNk1M.js +0 -360
  94. package/dist/src-Eg_ytPjv.js +0 -1107
@@ -1 +1 @@
1
- export { t as CodeBlock } from "../code-block-BRNdtTaP.js";
1
+ export { t as CodeBlock } from "../code-block-D77maJBB.js";
@@ -1,54 +1,58 @@
1
- import { g as e, h as t } from "../src-Bc5sEhdO.js";
2
- import { t as n } from "../code-block-BRNdtTaP.js";
3
- import "@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";
1
+ import { E as e, _ as t, g as n } from "../src-sU9b0oZW.js";
2
+ import { t as r } from "../code-block-D77maJBB.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 c = 5e5;
8
- function l({ source: e, maxHeight: t }) {
9
- return e.patch === void 0 ? /* @__PURE__ */ s(a, { children: [e.before !== null && /* @__PURE__ */ o(n, {
10
- code: e.before.code,
11
- language: e.before.language,
12
- filename: `Before · ${e.before.name}`,
13
- maxHeight: t
14
- }), e.after !== null && /* @__PURE__ */ o(n, {
15
- code: e.after.code,
16
- language: e.after.language,
17
- filename: `After · ${e.after.name}`,
18
- maxHeight: t
19
- })] }) : /* @__PURE__ */ o(n, {
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 u({ source: e, maxHeight: n }) {
27
- return /* @__PURE__ */ o("div", {
30
+ function p({ source: e, maxHeight: t }) {
31
+ return /* @__PURE__ */ l("div", {
28
32
  className: "x1doqdfy",
29
- children: /* @__PURE__ */ s(t.Root, { children: [/* @__PURE__ */ o(t.Trigger, { children: "View supplied source" }), /* @__PURE__ */ o(t.Panel, { children: /* @__PURE__ */ o(l, {
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: n
35
+ maxHeight: t
32
36
  }) })] })
33
37
  });
34
38
  }
35
- function d(t) {
36
- let { label: n, layout: d = "split", wrap: f = !1, annotations: p = [], maxHeight: m = 480, patch: h, before: g, after: _ } = t, [v, y] = i(t), [b, x] = i(), S = g?.name === v.before?.name && g?.code === v.before?.code && g?.language === v.before?.language, C = _?.name === v.after?.name && _?.code === v.after?.code && _?.language === v.after?.language;
37
- h === v.patch && S && C || y(t);
38
- let w = (h === void 0 ? (g === null ? 0 : g.code.length) + (_ === null ? 0 : _.code.length) : h.length) > c;
39
- r(() => {
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 (!w) try {
43
- let t = await import("../pierre-diff-CZdzgiYm.js"), n = t.prepareDiff(v);
44
- e && x({
45
- source: v,
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 && x({
51
- source: v,
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
- }, [v, w]);
61
- let T = b !== void 0 && b.source === v ? b : void 0, E = T?.files?.length === 0;
62
- return /* @__PURE__ */ s("section", {
63
- "aria-label": n,
64
- className: "xeuugli xpvm0e4 xbixft xmkeg23 x1y0btm7 x1ey3b81",
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__ */ s("div", {
67
- className: "x78zum5 x6s0dn4 x1qughib x1n8ia3y xn9t2bk x1doqdfy x1hz01jw xtqrqnz x1778rvt xso031l x1q0q8m5 x1qndepd",
68
- children: [/* @__PURE__ */ o("span", { children: n }), h !== void 0 && /* @__PURE__ */ o(e, {
69
- value: h,
70
- label: n,
71
- children: "Copy patch"
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
- T !== void 0 && T.Component !== null ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(T.Component, {
75
- files: T.files,
76
- label: n,
77
- layout: d,
78
- wrap: f,
79
- annotations: p,
80
- maxHeight: m
81
- }), /* @__PURE__ */ o(u, {
82
- source: v,
83
- maxHeight: m
84
- })] }) : /* @__PURE__ */ s(a, { children: [(w || T !== void 0) && /* @__PURE__ */ o("div", {
85
- className: "x1mvvolr x1hz01jw xy8obcc x1778rvt x153jb6y",
86
- children: w ? "This diff exceeds the rendering limit. Supplied source is shown below." : "Diff rendering is unavailable. Supplied source is shown below."
87
- }), /* @__PURE__ */ o(l, {
88
- source: v,
89
- maxHeight: m
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
- E && /* @__PURE__ */ o("div", {
92
- className: "x1mvvolr x1hz01jw xy8obcc x1778rvt x153jb6y",
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 { d as DiffViewer };
116
+ export { m as DiffViewer };
@@ -1 +1 @@
1
- export { t as ContentLink } from "../content-link-Dd8gapwc.js";
1
+ export { t as ContentLink } from "../content-link-BpSZeTNK.js";
@@ -1,22 +1,28 @@
1
- import { t as e } from "../code-block-BRNdtTaP.js";
2
- import { n as t, t as n } from "../content-link-Dd8gapwc.js";
3
- import * as r from "@stylexjs/stylex";
4
- import { Children as i, createElement as a } from "react";
5
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
- import { Block as l, Streamdown as u, defaultRehypePlugins as d, defaultRemarkPlugins as f, useIsCodeFenceIncomplete as p } from "streamdown";
1
+ import { t as e } from "../code-block-D77maJBB.js";
2
+ import { n as t, t as n } from "../content-link-BpSZeTNK.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 m = /* @__PURE__ */ new Set(["href", "src"]), h = {
9
- rehypePlugins: Object.entries(d).filter(([e]) => e === "sanitize").map(([, e]) => e),
10
- remarkPlugins: Object.values(f),
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 (m.has(n)) return t(e);
14
+ if (h.has(n)) return t(e);
14
15
  }
15
- }, g = {
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: "x1s688f",
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
- }, _ = /* @__PURE__ */ new Set(["string", "number"]);
38
- function v(e) {
39
- return _.has(typeof e);
53
+ }, v = /* @__PURE__ */ new Set(["string", "number"]);
54
+ function y(e) {
55
+ return v.has(typeof e);
40
56
  }
41
- function y({ children: t, className: n }) {
42
- let r = p(), a = typeof n == "string" ? /(?:^|\s)language-([^\s]+)/u.exec(n) : null, o = a === null ? void 0 : a[1], c = i.toArray(t);
43
- return c.every(v) ? /* @__PURE__ */ s(e, {
44
- code: c.join(""),
45
- language: o,
46
- streaming: r
47
- }) : /* @__PURE__ */ s("code", {
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 b({ level: e, headingLevel: t, children: n, id: i }) {
53
- let o = `h${Math.min(e + t - 1, 6)}`, s = e === 1 ? g.title : e === 2 ? g.section : g.minor;
54
- return a(o, {
55
- id: i,
56
- ...r.props(g.heading, s)
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 x = {
60
- p: ({ children: e }) => /* @__PURE__ */ s("p", {
61
- className: "xv06hpe",
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__ */ s("ul", {
65
- className: "xv06hpe x1sbza1b",
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__ */ s("ol", {
87
+ ol: ({ children: e, start: t }) => /* @__PURE__ */ c("ol", {
69
88
  start: t,
70
- className: "xv06hpe x1sbza1b",
89
+ className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
71
90
  children: e
72
91
  }),
73
- li: ({ children: e }) => /* @__PURE__ */ s("li", {
92
+ li: ({ children: e }) => /* @__PURE__ */ c("li", {
74
93
  className: "x1vblts3 xnkn1qj",
75
94
  children: e
76
95
  }),
77
- blockquote: ({ children: e }) => /* @__PURE__ */ s("blockquote", {
78
- className: "x1we84gm xrxpjvj x1umj4g3 xyumdvf x1t7ytsu x97x49r x153jb6y",
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__ */ s(y, {
100
+ code: ({ children: e, className: t }) => /* @__PURE__ */ c(b, {
82
101
  className: t,
83
102
  children: e
84
103
  }),
85
- inlineCode: ({ children: e }) => /* @__PURE__ */ s("code", {
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__ */ s(n, {
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__ */ s(n, {
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__ */ s("div", {
118
+ table: ({ children: e }) => /* @__PURE__ */ c("div", {
100
119
  role: "region",
101
120
  "aria-label": "Markdown table",
102
121
  tabIndex: 0,
103
- className: "xw2csxc x1we84gm xmkeg23 x1y0btm7 x1ey3b81",
104
- children: /* @__PURE__ */ s("table", {
105
- className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h",
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__ */ s("thead", { children: e }),
110
- tbody: ({ children: e }) => /* @__PURE__ */ s("tbody", { children: e }),
111
- tr: ({ children: e }) => /* @__PURE__ */ s("tr", { children: e }),
112
- th: ({ children: e }) => /* @__PURE__ */ s("th", {
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 xk50ysn x1r7kqkb",
133
+ className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h x153jb6y xk4h15q x1r7kqkb",
115
134
  children: e
116
135
  }),
117
- td: ({ children: e }) => /* @__PURE__ */ s("td", {
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__ */ s("input", {
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__ */ s("hr", { className: "xhff0hu xc342km x178xt8z x13fuv20 xhjagg4" }),
129
- strong: ({ children: e }) => /* @__PURE__ */ s("strong", {
130
- className: "x1s688f",
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__ */ s("em", {
152
+ em: ({ children: e }) => /* @__PURE__ */ c("em", {
134
153
  className: "x1k4tb9n",
135
154
  children: e
136
155
  }),
137
- del: ({ children: e }) => /* @__PURE__ */ s("del", {
156
+ del: ({ children: e }) => /* @__PURE__ */ c("del", {
138
157
  className: "x5lhwog",
139
158
  children: e
140
159
  })
141
- }, S = /* @__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(".");
142
- function C({ children: e, streaming: t = !1, label: n, headingLevel: r = 1 }) {
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__ */ s(b, {
163
+ h1: (e) => /* @__PURE__ */ c(x, {
145
164
  ...e,
146
165
  level: 1,
147
166
  headingLevel: r
148
167
  }),
149
- h2: (e) => /* @__PURE__ */ s(b, {
168
+ h2: (e) => /* @__PURE__ */ c(x, {
150
169
  ...e,
151
170
  level: 2,
152
171
  headingLevel: r
153
172
  }),
154
- h3: (e) => /* @__PURE__ */ s(b, {
173
+ h3: (e) => /* @__PURE__ */ c(x, {
155
174
  ...e,
156
175
  level: 3,
157
176
  headingLevel: r
158
177
  }),
159
- h4: (e) => /* @__PURE__ */ s(b, {
178
+ h4: (e) => /* @__PURE__ */ c(x, {
160
179
  ...e,
161
180
  level: 4,
162
181
  headingLevel: r
163
182
  }),
164
- h5: (e) => /* @__PURE__ */ s(b, {
183
+ h5: (e) => /* @__PURE__ */ c(x, {
165
184
  ...e,
166
185
  level: 5,
167
186
  headingLevel: r
168
187
  }),
169
- h6: (e) => /* @__PURE__ */ s(b, {
188
+ h6: (e) => /* @__PURE__ */ c(x, {
170
189
  ...e,
171
190
  level: 6,
172
191
  headingLevel: r
173
192
  })
174
193
  };
175
- return /* @__PURE__ */ s(u, {
176
- ...h,
177
- className: "xeuugli xbixft x1hz01jw xvmahel xtqrqnz x1778rvt xj0a0fe",
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
- ...x,
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: S,
207
+ allowedElements: C,
189
208
  children: e
190
209
  }, r);
191
210
  }
192
211
  // packages/content/src/markdown/markdown-preview.tsx
193
- function w({ children: e }) {
194
- return /* @__PURE__ */ c(o, { children: [e, " "] });
212
+ function T({ children: e }) {
213
+ return /* @__PURE__ */ l(s, { children: [e, " "] });
195
214
  }
196
- var T = {
197
- p: w,
198
- li: w,
199
- h1: w,
200
- h2: w,
201
- h3: w,
202
- h4: w,
203
- h5: w,
204
- h6: w,
205
- blockquote: w,
206
- pre: w,
207
- code: ({ children: e }) => /* @__PURE__ */ s(o, { children: e }),
208
- th: w,
209
- td: w,
210
- br: () => /* @__PURE__ */ s(o, { children: " " }),
211
- img: ({ alt: e }) => /* @__PURE__ */ s(o, { children: e })
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 E({ children: e }) {
214
- return /* @__PURE__ */ s(l, {
215
- ...h,
232
+ function D({ children: e }) {
233
+ return /* @__PURE__ */ c(u, {
234
+ ...g,
216
235
  content: e,
217
- components: T,
218
- allowedElements: Object.keys(T),
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 { C as Markdown, E as MarkdownPreview };
245
+ export { w as Markdown, D as MarkdownPreview };
@@ -1,38 +1,39 @@
1
- import { b as e } from "../src-Bc5sEhdO.js";
2
- import * as t from "@stylexjs/stylex";
3
- import { useEffect as n, useState as r } from "react";
4
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
1
+ import { E as e } from "../src-sU9b0oZW.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 s = 200, c = {
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
- }, l = { paths: (e) => [
13
- c,
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 u(c) {
21
- let [u, d] = r({
21
+ function d(l) {
22
+ let [d, f] = i({
22
23
  Component: null,
23
24
  hasFailed: !1
24
- }), { label: f, paths: p, selectedPaths: m, onSelectedPathsChange: h, height: g = 320 } = c;
25
- return n(() => {
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-DdE1boiT.js");
30
- e && d({
30
+ let t = await import("../pierre-tree-BFxEuxwb.js");
31
+ e && f({
31
32
  Component: t.PierreTree,
32
33
  hasFailed: !1
33
34
  });
34
35
  } catch {
35
- e && d({
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__ */ o("section", {
45
- "aria-label": f,
46
- className: "xeuugli xmkeg23 x1y0btm7 x1ey3b81 xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt",
47
- children: [/* @__PURE__ */ a("div", {
48
- className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd",
49
- children: f
50
- }), p.length === 0 ? /* @__PURE__ */ a("p", {
51
- className: "x1ghz6dp x1mvvolr x153jb6y",
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
- }) : u.Component === null ? /* @__PURE__ */ o(i, { children: [
54
- u.hasFailed && /* @__PURE__ */ a("p", {
55
- className: "x1ghz6dp x1mvvolr x153jb6y",
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__ */ a("ul", {
59
- "aria-label": `${f} paths`,
60
- ...t.props(l.paths(g)),
61
- children: p.slice(0, s).map((t) => /* @__PURE__ */ a("li", {
62
- className: "x10dazmo",
63
- children: /* @__PURE__ */ a(e, {
64
- "aria-pressed": m.includes(t),
65
- onClick: () => h([t]),
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
- p.length > s && /* @__PURE__ */ o("p", {
71
- className: "x1ghz6dp x1mvvolr x153jb6y",
72
- children: [p.length - s, " paths omitted until tree navigation loads."]
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__ */ a(u.Component, { ...c })]
79
+ ] }) : /* @__PURE__ */ o(d.Component, { ...l })]
75
80
  });
76
81
  }
77
- export { u as FileTree };
82
+ export { d as FileTree };