@mechane-ai/elements 0.44.0 → 0.46.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/README.md +48 -18
- package/bin/mechane-elements-catalog.mjs +42 -4
- package/dist/ai.js +268 -202
- package/dist/catalog.json +95 -31
- package/dist/categorical-values-BXi-rJuv.js +74 -0
- package/dist/chart-cursor-1mFd48Jc.js +23 -0
- package/dist/chart-data-CIJVWCYt.js +21 -0
- package/dist/chart-frame-BaxKn_MB.js +236 -0
- package/dist/{chart-input-B6_HXFDP.js → chart-input-Bm82_9Rd.js} +2 -2
- package/dist/chart-theme-4zprJ3rW.js +404 -0
- package/dist/charts/cartesian.js +1624 -1442
- package/dist/charts/distribution.js +486 -409
- package/dist/charts/graph.js +383 -358
- package/dist/charts/hierarchy.js +103 -94
- package/dist/charts/matrix.js +340 -333
- package/dist/charts/timeline.js +167 -134
- package/dist/charts.js +3 -3
- package/dist/{code-block-Cpfr7B6a.js → code-block-DioAM2bZ.js} +67 -52
- package/dist/collections.js +1648 -1188
- package/dist/{constants.stylex-CaVa9yGN.js → constants.stylex-CqhVl0uU.js} +9 -9
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +67 -66
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +3 -3
- package/dist/{content-link-CGeFFb9F.js → content-link-NWuHp5rC.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/csp.js +6 -11
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +274 -214
- package/dist/{forms-DeU0Tiv3.js → forms-CEbwzlRR.js} +50 -41
- package/dist/forms.js +3 -3
- package/dist/index.js +1 -1
- package/dist/layout.js +207 -207
- package/dist/navigation.js +4 -3
- package/dist/packages/ai/src/conversation.d.ts +2 -0
- package/dist/packages/ai/src/prompt-input.d.ts +7 -2
- package/dist/packages/charts/src/cartesian/composition-bars.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/index.d.ts +3 -2
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +8 -2
- package/dist/packages/charts/src/cartesian/time-series.d.ts +11 -1
- package/dist/packages/charts/src/categorical-values.d.ts +14 -9
- package/dist/packages/charts/src/chart-frame.d.ts +7 -9
- package/dist/packages/charts/src/chart-inspection.d.ts +1 -2
- package/dist/packages/charts/src/chart-range.d.ts +33 -0
- package/dist/packages/charts/src/chart-rows.d.ts +20 -0
- package/dist/packages/charts/src/chart-theme.d.ts +25 -1
- package/dist/packages/charts/src/chart.d.ts +81 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +6 -4
- package/dist/packages/charts/src/index.d.ts +2 -1
- package/dist/packages/charts/src/matrix/matrix-strip.d.ts +3 -3
- package/dist/packages/charts/src/plot-width.d.ts +0 -1
- package/dist/packages/charts/src/timeline/index.d.ts +1 -1
- package/dist/packages/charts/src/timeline/waterfall.d.ts +6 -2
- package/dist/packages/collections/src/collection-controls.d.ts +5 -1
- package/dist/packages/collections/src/collection-filters.d.ts +4 -1
- package/dist/packages/collections/src/control-toolbar.d.ts +13 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +78 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +54 -0
- package/dist/packages/collections/src/data-table-styles.d.ts +340 -0
- package/dist/packages/collections/src/data-table-text.d.ts +13 -0
- package/dist/packages/collections/src/data-table-trigger.d.ts +23 -0
- package/dist/packages/collections/src/data-table.d.ts +3 -85
- package/dist/packages/collections/src/index.d.ts +11 -6
- package/dist/packages/collections/src/query-controls.d.ts +6 -2
- package/dist/packages/collections/src/table-results.d.ts +47 -13
- package/dist/packages/collections/src/timeline.d.ts +1 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +2 -1
- package/dist/packages/collections/src/use-table-window.d.ts +25 -0
- package/dist/packages/content/src/viewer.d.ts +8 -0
- package/dist/packages/core/src/disclosure.d.ts +9 -1
- package/dist/packages/core/src/index.d.ts +1 -0
- package/dist/packages/core/src/route-link.d.ts +11 -0
- package/dist/packages/forms/src/dates/date-inputs.d.ts +3 -1
- package/dist/packages/forms/src/file-picker.d.ts +15 -0
- package/dist/packages/forms/src/form-controls.d.ts +1 -6
- package/dist/packages/forms/src/forms.d.ts +4 -1
- package/dist/packages/forms/src/index.d.ts +4 -2
- package/dist/packages/forms/src/selection.d.ts +14 -0
- package/dist/packages/foundations/src/chart-tones.d.ts +5 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +7 -2
- package/dist/packages/navigation/src/index.d.ts +1 -1
- package/dist/{pierre-diff-B3tD3-6z.js → pierre-diff-DlvjyuJn.js} +1 -1
- package/dist/plot-width-v2c_rA20.js +63 -0
- package/dist/{src-gqEebHEa.js → src-1EHkSFS-.js} +395 -274
- package/dist/{src-DBNncL7_.js → src-BPTDJqt0.js} +48 -68
- package/dist/src-CGc_hjxJ.js +409 -0
- package/dist/{src-DcW_gMX8.js → src-CpdJlDhO.js} +480 -362
- package/dist/{src-CDp1JtwC.js → src-DVHlknB6.js} +135 -120
- package/dist/styles2.css +167 -132
- package/dist/tokens.js +1 -1
- package/package.json +1 -4
- package/packages/foundations/src/constants.stylex.ts +9 -9
- package/packages/foundations/src/tokens.stylex.ts +9 -9
- package/skills/extend-elements/SKILL.md +74 -0
- package/skills/review-elements/SKILL.md +76 -0
- package/skills/upgrade-elements/SKILL.md +34 -0
- package/skills/upgrade-elements/references/releases.md +58 -0
- package/skills/use-elements/SKILL.md +64 -13
- package/skills/use-elements/references/agent.md +57 -0
- package/skills/use-elements/references/charts.md +63 -0
- package/skills/use-elements/references/collections.md +89 -0
- package/skills/use-elements/references/conversations.md +47 -0
- package/skills/use-elements/references/forms.md +81 -0
- package/skills/use-elements/references/reports.md +6 -4
- package/skills/use-elements/references/styling.md +70 -0
- package/skills/use-elements/references/workspace.md +3 -3
- package/dist/categorical-values-ByvFLaNE.js +0 -59
- package/dist/chart-frame-Bcd9Tpt5.js +0 -251
- package/dist/chart-navigation-BAbb5PV9.js +0 -154
- package/dist/header-styles-COxCYFZx.js +0 -90
- package/dist/packages/charts/src/chart-navigation.d.ts +0 -39
- package/dist/packages/charts/src/chart-surface.d.ts +0 -27
- package/dist/packages/navigation/src/route-link.d.ts +0 -2
- package/dist/plot-width-8cXdAjoD.js +0 -96
- package/dist/src-Bk7M67zy.js +0 -396
|
@@ -1,31 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
1
|
+
import { j as e, u as t } from "./src-CpdJlDhO.js";
|
|
2
|
+
import * as n from "@stylexjs/stylex";
|
|
3
|
+
import { mergeProps as r } from "@ui-sdk/react/primitive";
|
|
4
4
|
import { Children as i, useState as a } from "react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import { Tabs as l, TabsList as u, TabsPanel as d, TabsTab as f } from "@ui-sdk/react/tabs";
|
|
8
|
-
// packages/navigation/src/route-link.tsx
|
|
9
|
-
function p({ current: e }) {
|
|
10
|
-
return { current: e ?? null };
|
|
11
|
-
}
|
|
12
|
-
var m = c({
|
|
13
|
-
name: "navigation-link",
|
|
14
|
-
options: { current: "value" },
|
|
15
|
-
state: p,
|
|
16
|
-
sync: p,
|
|
17
|
-
controlled: ["current"],
|
|
18
|
-
api: () => ({}),
|
|
19
|
-
slots: (e) => ({ root: e({}) })
|
|
20
|
-
}), h = n(m, { root: "a" });
|
|
21
|
-
function g(e) {
|
|
22
|
-
return e.href === void 0 ? /* @__PURE__ */ o("a", { ...e }) : /* @__PURE__ */ o(h.Root, {
|
|
23
|
-
current: e["aria-current"],
|
|
24
|
-
render: /* @__PURE__ */ o("a", { ...e })
|
|
25
|
-
});
|
|
26
|
-
}
|
|
6
|
+
import { Tabs as c, TabsList as l, TabsPanel as u, TabsTab as d } from "@ui-sdk/react/tabs";
|
|
27
7
|
// packages/navigation/src/tab-styles.ts
|
|
28
|
-
var
|
|
8
|
+
var f = {
|
|
29
9
|
list: {
|
|
30
10
|
k1xSpc: "x78zum5",
|
|
31
11
|
kOIVth: "xxhr3t",
|
|
@@ -91,7 +71,7 @@ var _ = {
|
|
|
91
71
|
kiEn40: "x1bqaal",
|
|
92
72
|
$$css: !0
|
|
93
73
|
}
|
|
94
|
-
},
|
|
74
|
+
}, p = {
|
|
95
75
|
navigation: {
|
|
96
76
|
kt9PQ7: "x1qhh985",
|
|
97
77
|
kUk6DE: "x12lumcd",
|
|
@@ -110,93 +90,93 @@ var _ = {
|
|
|
110
90
|
$$css: !0
|
|
111
91
|
}
|
|
112
92
|
};
|
|
113
|
-
function
|
|
93
|
+
function m({ items: e, actions: r }) {
|
|
114
94
|
return /* @__PURE__ */ s("div", {
|
|
115
95
|
"aria-hidden": !0,
|
|
116
96
|
inert: !0,
|
|
117
97
|
className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd",
|
|
118
98
|
children: [/* @__PURE__ */ o("div", {
|
|
119
|
-
...
|
|
120
|
-
children:
|
|
121
|
-
...
|
|
99
|
+
...n.props(f.list, p.navigation),
|
|
100
|
+
children: e.map((e) => /* @__PURE__ */ o("span", {
|
|
101
|
+
...n.props(f.item),
|
|
122
102
|
children: e.label
|
|
123
103
|
}, e.id))
|
|
124
104
|
}), i.toArray(r).length > 0 && /* @__PURE__ */ o("div", {
|
|
125
|
-
...
|
|
105
|
+
...n.props(t.row, p.actions),
|
|
126
106
|
children: r
|
|
127
107
|
})]
|
|
128
108
|
});
|
|
129
109
|
}
|
|
130
|
-
function
|
|
110
|
+
function h({ items: r, selectedId: a, onNavigate: c, label: l = "Page sections", actions: u }) {
|
|
131
111
|
return /* @__PURE__ */ s("div", {
|
|
132
112
|
className: "x78zum5 x1a02dak x1qjc9v5 xeuugli x2lah0s xso031l x1q0q8m5 x1qndepd",
|
|
133
113
|
children: [/* @__PURE__ */ o("nav", {
|
|
134
|
-
"aria-label":
|
|
135
|
-
...
|
|
136
|
-
children:
|
|
137
|
-
href:
|
|
138
|
-
"aria-current":
|
|
139
|
-
...
|
|
140
|
-
onClick: (
|
|
141
|
-
if (
|
|
142
|
-
let n =
|
|
143
|
-
n || r || (
|
|
114
|
+
"aria-label": l,
|
|
115
|
+
...n.props(f.list, p.navigation),
|
|
116
|
+
children: r.map((t) => /* @__PURE__ */ o(e, {
|
|
117
|
+
href: t.href,
|
|
118
|
+
"aria-current": t.id === a ? "page" : void 0,
|
|
119
|
+
...n.props(f.item),
|
|
120
|
+
onClick: (e) => {
|
|
121
|
+
if (c === void 0 || e.defaultPrevented || e.button !== 0) return;
|
|
122
|
+
let n = e.metaKey || e.ctrlKey, r = e.shiftKey || e.altKey;
|
|
123
|
+
n || r || (e.preventDefault(), c(t));
|
|
144
124
|
},
|
|
145
|
-
children:
|
|
146
|
-
},
|
|
147
|
-
}), i.toArray(
|
|
148
|
-
...
|
|
149
|
-
children:
|
|
125
|
+
children: t.label
|
|
126
|
+
}, t.id))
|
|
127
|
+
}), i.toArray(u).length > 0 && /* @__PURE__ */ o("div", {
|
|
128
|
+
...n.props(t.row, p.actions),
|
|
129
|
+
children: u
|
|
150
130
|
})]
|
|
151
131
|
});
|
|
152
132
|
}
|
|
153
133
|
// packages/navigation/src/skip-link.tsx
|
|
154
|
-
function
|
|
134
|
+
function g(e) {
|
|
155
135
|
return /* @__PURE__ */ o("a", { ...r({ className: "xixxii4 x1ridm32 x12hha37 x1b4oyad x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
|
|
156
136
|
}
|
|
157
137
|
// packages/navigation/src/tabs.tsx
|
|
158
|
-
function
|
|
159
|
-
return /* @__PURE__ */ o(
|
|
138
|
+
function _(e) {
|
|
139
|
+
return /* @__PURE__ */ o(c, { ...r({ className: "x1hz01jw xj57cvi xtqrqnz x1778rvt xbixft xvmahel xeuugli xsg5m96 x7bu0ch x18eqmq0" }, e) });
|
|
160
140
|
}
|
|
161
|
-
function
|
|
162
|
-
return /* @__PURE__ */ o(
|
|
141
|
+
function v(e) {
|
|
142
|
+
return /* @__PURE__ */ o(l, { ...r(n.props(f.list), e) });
|
|
163
143
|
}
|
|
164
|
-
function
|
|
165
|
-
return /* @__PURE__ */ o(
|
|
144
|
+
function y({ value: e, ...t }) {
|
|
145
|
+
return /* @__PURE__ */ o(d, {
|
|
166
146
|
value: e,
|
|
167
|
-
...r(
|
|
147
|
+
...r(n.props(f.item), t)
|
|
168
148
|
});
|
|
169
149
|
}
|
|
170
|
-
function
|
|
171
|
-
return /* @__PURE__ */ o(
|
|
150
|
+
function b({ value: e, ...t }) {
|
|
151
|
+
return /* @__PURE__ */ o(u, {
|
|
172
152
|
value: e,
|
|
173
153
|
...r({ className: "x1o3kwql xeuugli x1k57tk5 xcqfl4l xwqq6z6 x13qnu6 x9v5kkp x19rmrnh x7s97pk" }, t)
|
|
174
154
|
});
|
|
175
155
|
}
|
|
176
|
-
var
|
|
177
|
-
Root:
|
|
178
|
-
List:
|
|
179
|
-
Tab:
|
|
180
|
-
Panel:
|
|
156
|
+
var x = {
|
|
157
|
+
Root: _,
|
|
158
|
+
List: v,
|
|
159
|
+
Tab: y,
|
|
160
|
+
Panel: b
|
|
181
161
|
};
|
|
182
162
|
// packages/navigation/src/content-tabs.tsx
|
|
183
|
-
function
|
|
163
|
+
function S(e) {
|
|
184
164
|
let [t, n] = a(e.defaultSelectedId ?? e.items[0]?.id), r = e.items.find((e) => e.id === t) ?? e.items[0];
|
|
185
|
-
return /* @__PURE__ */ s(
|
|
165
|
+
return /* @__PURE__ */ s(x.Root, {
|
|
186
166
|
value: r?.id ?? null,
|
|
187
167
|
onValueChange: (e) => n(e ?? void 0),
|
|
188
168
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
|
|
189
|
-
children: [/* @__PURE__ */ o(
|
|
169
|
+
children: [/* @__PURE__ */ o(x.List, {
|
|
190
170
|
"aria-label": e.label,
|
|
191
|
-
children: e.items.map((e) => /* @__PURE__ */ o(
|
|
171
|
+
children: e.items.map((e) => /* @__PURE__ */ o(x.Tab, {
|
|
192
172
|
value: e.id,
|
|
193
173
|
children: e.label
|
|
194
174
|
}, e.id))
|
|
195
|
-
}), r !== void 0 && /* @__PURE__ */ o(
|
|
175
|
+
}), r !== void 0 && /* @__PURE__ */ o(x.Panel, {
|
|
196
176
|
value: r.id,
|
|
197
177
|
className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j x1odjw0f xexx8yu",
|
|
198
178
|
children: r.content
|
|
199
179
|
}, r.id)]
|
|
200
180
|
});
|
|
201
181
|
}
|
|
202
|
-
export {
|
|
182
|
+
export { m as a, h as i, x as n, g as r, S as t };
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { T as e, k as t, v as n, y as r } from "./src-CpdJlDhO.js";
|
|
2
|
+
import { t as i } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
3
|
+
import { t as a } from "./viewer-styles-DsFYri4K.js";
|
|
4
|
+
import { i as o, t as s } from "./code-block-DioAM2bZ.js";
|
|
5
|
+
import { t as c } from "./content-link-NWuHp5rC.js";
|
|
6
|
+
import * as l from "@stylexjs/stylex";
|
|
7
|
+
import { useCallback as u, useLayoutEffect as d, useRef as f, useState as p, useSyncExternalStore as m } from "react";
|
|
8
|
+
import { createStickToBottom as h } from "@ui-sdk/core";
|
|
9
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
10
|
+
import { Check as v, Circle as y, CircleDashed as b, CircleHelp as x, Clock as S, X as C } from "lucide-react";
|
|
11
|
+
import w from "strip-ansi";
|
|
12
|
+
// packages/content/src/json-viewer.tsx
|
|
13
|
+
var T = { body: {
|
|
14
|
+
kmVPX3: "x1mvvolr",
|
|
15
|
+
kVQacm: "xysyzu8",
|
|
16
|
+
kskxy: "x1phlbz0",
|
|
17
|
+
kMv6JI: "xiard35",
|
|
18
|
+
kGuDYH: "xy8obcc",
|
|
19
|
+
$$css: !0
|
|
20
|
+
} }, E = 500;
|
|
21
|
+
function D({ value: e, name: t, path: r, depth: i, maxDepth: a, maxEntries: o }) {
|
|
22
|
+
if (typeof e != "object" || !e) {
|
|
23
|
+
let n = JSON.stringify(e), r = n.length > E;
|
|
24
|
+
return /* @__PURE__ */ _("div", {
|
|
25
|
+
className: "xeuugli x126k92a xj0a0fe",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ _("span", {
|
|
28
|
+
className: "x153jb6y",
|
|
29
|
+
children: [t, ": "]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ g("span", {
|
|
32
|
+
...{
|
|
33
|
+
0: { className: "xbixft" },
|
|
34
|
+
1: { className: "x7ixh4y" }
|
|
35
|
+
}[typeof e == "string" | 0],
|
|
36
|
+
children: n.slice(0, E)
|
|
37
|
+
}),
|
|
38
|
+
r && /* @__PURE__ */ g("span", {
|
|
39
|
+
className: "x153jb6y x1hz01jw",
|
|
40
|
+
children: "… (value truncated)"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
let s = Object.entries(e), c = Array.isArray(e) ? `${s.length} items` : `${s.length} fields`;
|
|
46
|
+
return i >= a ? /* @__PURE__ */ _("div", {
|
|
47
|
+
className: "xeuugli x126k92a xj0a0fe",
|
|
48
|
+
children: [/* @__PURE__ */ _("span", {
|
|
49
|
+
className: "x153jb6y",
|
|
50
|
+
children: [t, ": "]
|
|
51
|
+
}), /* @__PURE__ */ _("span", {
|
|
52
|
+
className: "x153jb6y x1hz01jw",
|
|
53
|
+
children: [c, " · depth limit"]
|
|
54
|
+
})]
|
|
55
|
+
}) : /* @__PURE__ */ _(n.Root, {
|
|
56
|
+
defaultOpen: i === 0,
|
|
57
|
+
className: "xeuugli x126k92a xj0a0fe",
|
|
58
|
+
children: [/* @__PURE__ */ g(n.Trigger, {
|
|
59
|
+
variant: "inline",
|
|
60
|
+
children: /* @__PURE__ */ _("span", {
|
|
61
|
+
className: "xiard35 xy8obcc",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ _("span", {
|
|
64
|
+
className: "x153jb6y",
|
|
65
|
+
children: [t, ": "]
|
|
66
|
+
}),
|
|
67
|
+
Array.isArray(e) ? "[]" : "{}",
|
|
68
|
+
" ",
|
|
69
|
+
/* @__PURE__ */ g("span", {
|
|
70
|
+
className: "x153jb6y x1hz01jw",
|
|
71
|
+
children: c
|
|
72
|
+
})
|
|
73
|
+
]
|
|
74
|
+
})
|
|
75
|
+
}), /* @__PURE__ */ g(n.Panel, { children: /* @__PURE__ */ _("div", {
|
|
76
|
+
className: "xo02m6d xpilrb4 x1t7ytsu x97x49r xa1dmyi xiard35 xy8obcc",
|
|
77
|
+
children: [s.slice(0, o).map(([e, t]) => {
|
|
78
|
+
let n = `${r}/${e.replaceAll("~", "~0").replaceAll("/", "~1")}`;
|
|
79
|
+
return /* @__PURE__ */ g(D, {
|
|
80
|
+
name: JSON.stringify(e),
|
|
81
|
+
path: n,
|
|
82
|
+
value: t,
|
|
83
|
+
depth: i + 1,
|
|
84
|
+
maxDepth: a,
|
|
85
|
+
maxEntries: o
|
|
86
|
+
}, n);
|
|
87
|
+
}), s.length > o && /* @__PURE__ */ _("div", {
|
|
88
|
+
className: "x153jb6y x1hz01jw",
|
|
89
|
+
children: [s.length - o, " more entries · copy to inspect the complete value"]
|
|
90
|
+
})]
|
|
91
|
+
}) })]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function O({ value: e, label: t, maxDepth: n = 6, maxEntries: s = 50 }) {
|
|
95
|
+
let c = i(), d = u(() => JSON.stringify(e, null, 2), [e]);
|
|
96
|
+
return /* @__PURE__ */ _(o, {
|
|
97
|
+
kind: "json",
|
|
98
|
+
"aria-label": t,
|
|
99
|
+
...l.props(a.root),
|
|
100
|
+
children: [/* @__PURE__ */ _("div", {
|
|
101
|
+
...l.props(a.header),
|
|
102
|
+
children: [/* @__PURE__ */ g("span", {
|
|
103
|
+
...l.props(a.label),
|
|
104
|
+
children: t
|
|
105
|
+
}), /* @__PURE__ */ g(r, {
|
|
106
|
+
label: t,
|
|
107
|
+
value: d,
|
|
108
|
+
children: "Copy JSON"
|
|
109
|
+
})]
|
|
110
|
+
}), /* @__PURE__ */ g("div", {
|
|
111
|
+
ref: c.ref,
|
|
112
|
+
role: "region",
|
|
113
|
+
"aria-label": `${t} fields`,
|
|
114
|
+
tabIndex: c.tabIndex,
|
|
115
|
+
...l.props(a.scrollRegion, T.body),
|
|
116
|
+
children: /* @__PURE__ */ g(D, {
|
|
117
|
+
name: "root",
|
|
118
|
+
path: "",
|
|
119
|
+
value: e,
|
|
120
|
+
depth: 0,
|
|
121
|
+
maxDepth: Math.max(1, n),
|
|
122
|
+
maxEntries: Math.max(1, s)
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
// packages/content/src/log-viewer.tsx
|
|
128
|
+
var k = {
|
|
129
|
+
kVQacm: "xysyzu8",
|
|
130
|
+
kmVPX3: "x1mvvolr",
|
|
131
|
+
kogj98: "x1ghz6dp",
|
|
132
|
+
kMv6JI: "xiard35",
|
|
133
|
+
kGuDYH: "xy8obcc",
|
|
134
|
+
kLWn49: "x1778rvt",
|
|
135
|
+
khDVqt: "x126k92a",
|
|
136
|
+
kHjlTd: "xj0a0fe",
|
|
137
|
+
kKi2Bq: "xeq4nuv",
|
|
138
|
+
$$css: !0
|
|
139
|
+
}, A = {
|
|
140
|
+
output: (e) => [
|
|
141
|
+
k,
|
|
142
|
+
{
|
|
143
|
+
kskxy: e == null ? e : "x1jols5v",
|
|
144
|
+
$$css: !0
|
|
145
|
+
},
|
|
146
|
+
{ "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
147
|
+
],
|
|
148
|
+
notice: {
|
|
149
|
+
kt9PQ7: "xso031l",
|
|
150
|
+
kfdmCh: "x1q0q8m5",
|
|
151
|
+
kL6WhQ: "x1qndepd",
|
|
152
|
+
$$css: !0
|
|
153
|
+
}
|
|
154
|
+
}, j = 2e5;
|
|
155
|
+
function M({ output: t, label: n, variant: s = "default", maxLines: c = 500, maxHeight: u = 320, isRunning: v = !1 }) {
|
|
156
|
+
let y = i(), b = y.viewport, x = f(!1), [S] = p(() => {
|
|
157
|
+
let e = h();
|
|
158
|
+
return {
|
|
159
|
+
...e,
|
|
160
|
+
subscribe: (t) => e.subscribe(t),
|
|
161
|
+
read: () => e.get()
|
|
162
|
+
};
|
|
163
|
+
}), { following: C } = m(S.subscribe, S.read, S.read), T = w(t), E = T.slice(-2e5).split("\n"), D = E.slice(-Math.max(1, c)), O = E.length - D.length, k = s === "embedded", M = v && (!k || !C);
|
|
164
|
+
return d(() => {
|
|
165
|
+
let e = b.current;
|
|
166
|
+
return e === null ? void 0 : S.connect(e);
|
|
167
|
+
}, [S, b]), d(() => {
|
|
168
|
+
!v && x.current && (x.current = !1, b.current?.focus({ preventScroll: !0 }));
|
|
169
|
+
}, [v]), /* @__PURE__ */ _(o, {
|
|
170
|
+
kind: "log",
|
|
171
|
+
"aria-label": n,
|
|
172
|
+
...l.props(a.root, k && a.embedded),
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ _("div", {
|
|
175
|
+
...l.props(a.header, k && a.embeddedHeader),
|
|
176
|
+
children: [/* @__PURE__ */ _("span", {
|
|
177
|
+
...l.props(a.label),
|
|
178
|
+
children: [n, v && !k && " · running"]
|
|
179
|
+
}), /* @__PURE__ */ _("div", {
|
|
180
|
+
...l.props(a.actions),
|
|
181
|
+
children: [M && /* @__PURE__ */ g(e, {
|
|
182
|
+
variant: "ghost",
|
|
183
|
+
onClick: () => {
|
|
184
|
+
C ? S.release() : S.scrollToBottom();
|
|
185
|
+
},
|
|
186
|
+
onFocus: () => {
|
|
187
|
+
x.current = !0;
|
|
188
|
+
},
|
|
189
|
+
onBlur: () => {
|
|
190
|
+
x.current = !1;
|
|
191
|
+
},
|
|
192
|
+
children: C ? "Pause following" : "Follow output"
|
|
193
|
+
}), /* @__PURE__ */ g(r, {
|
|
194
|
+
value: t,
|
|
195
|
+
label: n,
|
|
196
|
+
display: k ? "icon" : "value",
|
|
197
|
+
children: "Copy"
|
|
198
|
+
})]
|
|
199
|
+
})]
|
|
200
|
+
}),
|
|
201
|
+
O > 0 && /* @__PURE__ */ _("div", {
|
|
202
|
+
...l.props(a.note, A.notice),
|
|
203
|
+
children: [O, " earlier lines omitted from this view. Copy includes the supplied output."]
|
|
204
|
+
}),
|
|
205
|
+
T.length > j && /* @__PURE__ */ g("div", {
|
|
206
|
+
...l.props(a.note, A.notice),
|
|
207
|
+
children: "Preview limited to the last 200,000 characters. Copy includes the supplied output."
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ g("pre", {
|
|
210
|
+
ref: y.ref,
|
|
211
|
+
role: "region",
|
|
212
|
+
"aria-label": `${n} output`,
|
|
213
|
+
tabIndex: y.tabIndex,
|
|
214
|
+
...l.props(a.scrollRegion, A.output(u)),
|
|
215
|
+
children: /* @__PURE__ */ g("span", {
|
|
216
|
+
className: "x1lliihq",
|
|
217
|
+
children: T.length === 0 ? "No output recorded." : D.join("\n")
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
]
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
// packages/content/src/media-viewer.tsx
|
|
224
|
+
var N = {
|
|
225
|
+
viewport: {
|
|
226
|
+
k1xSpc: "xrvj5dj",
|
|
227
|
+
kgQiWS: "x1ku5rj1",
|
|
228
|
+
kzqmXN: "xh8yej3",
|
|
229
|
+
kOBAk4: "x186iv6y",
|
|
230
|
+
kskxy: "xcwfpss",
|
|
231
|
+
k7Eaqz: "xeuugli",
|
|
232
|
+
kVQacm: "xb3r6kr",
|
|
233
|
+
kWkggS: "x1r7kqkb",
|
|
234
|
+
$$css: !0
|
|
235
|
+
},
|
|
236
|
+
placeholder: {
|
|
237
|
+
kWkggS: "x1fa40ue",
|
|
238
|
+
$$css: !0
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
function P() {
|
|
242
|
+
return /* @__PURE__ */ g("div", {
|
|
243
|
+
"aria-hidden": !0,
|
|
244
|
+
...l.props(a.root, N.viewport, N.placeholder)
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
function F({ kind: e, src: t, label: n, widthPixels: r, heightPixels: i, onError: o }) {
|
|
248
|
+
return /* @__PURE__ */ g("div", {
|
|
249
|
+
...l.props(a.root, N.viewport),
|
|
250
|
+
children: e === "image" ? /* @__PURE__ */ g("img", {
|
|
251
|
+
src: t,
|
|
252
|
+
alt: n,
|
|
253
|
+
width: r,
|
|
254
|
+
height: i,
|
|
255
|
+
onError: o,
|
|
256
|
+
className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
|
|
257
|
+
}) : /* @__PURE__ */ g("video", {
|
|
258
|
+
src: t,
|
|
259
|
+
"aria-label": n,
|
|
260
|
+
width: r,
|
|
261
|
+
height: i,
|
|
262
|
+
controls: !0,
|
|
263
|
+
muted: !0,
|
|
264
|
+
playsInline: !0,
|
|
265
|
+
preload: "metadata",
|
|
266
|
+
onError: o,
|
|
267
|
+
className: "x1lliihq xh8yej3 x5yr21d x2lwn1j x19kjcj4"
|
|
268
|
+
})
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
// packages/content/src/stack-trace.tsx
|
|
272
|
+
function I({ message: e, frames: t }) {
|
|
273
|
+
return /* @__PURE__ */ _(o, {
|
|
274
|
+
kind: "stack-trace",
|
|
275
|
+
"aria-label": "Stack trace",
|
|
276
|
+
...l.props(a.root),
|
|
277
|
+
children: [/* @__PURE__ */ g("p", {
|
|
278
|
+
className: "x1ghz6dp x1mvvolr xso031l x1q0q8m5 x1qndepd xr5kp14 xk4h15q xj0a0fe",
|
|
279
|
+
children: e
|
|
280
|
+
}), t.length === 0 ? /* @__PURE__ */ g("p", {
|
|
281
|
+
className: "x1ghz6dp x1mvvolr x153jb6y",
|
|
282
|
+
children: "No frames recorded."
|
|
283
|
+
}) : /* @__PURE__ */ g("ol", {
|
|
284
|
+
className: "x1ghz6dp x1717udv x3ct3a4",
|
|
285
|
+
children: t.map((e) => {
|
|
286
|
+
let t = [
|
|
287
|
+
e.file,
|
|
288
|
+
e.line,
|
|
289
|
+
e.column
|
|
290
|
+
].filter((e) => e !== void 0).join(":");
|
|
291
|
+
return /* @__PURE__ */ _("li", {
|
|
292
|
+
className: "x78zum5 xdt5ytf x1hnptsi xeuugli xj0a0fe x1mvvolr xso031l x1t1lzn6 x1q0q8m5 x1qndepd",
|
|
293
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g(c, {
|
|
294
|
+
href: e.href,
|
|
295
|
+
children: e.name
|
|
296
|
+
}), t.length > 0 && /* @__PURE__ */ g("span", {
|
|
297
|
+
className: "x1lliihq x153jb6y xiard35 xy8obcc xj0a0fe",
|
|
298
|
+
children: t
|
|
299
|
+
})] }), e.code !== void 0 && /* @__PURE__ */ g(s, {
|
|
300
|
+
code: e.code,
|
|
301
|
+
language: e.language,
|
|
302
|
+
filename: e.file
|
|
303
|
+
})]
|
|
304
|
+
}, e.id);
|
|
305
|
+
})
|
|
306
|
+
})]
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
// packages/content/src/trace.tsx
|
|
310
|
+
var L = {
|
|
311
|
+
pending: {
|
|
312
|
+
kMwMTN: "x153jb6y",
|
|
313
|
+
$$css: !0
|
|
314
|
+
},
|
|
315
|
+
running: {
|
|
316
|
+
kMwMTN: "xbixft",
|
|
317
|
+
$$css: !0
|
|
318
|
+
},
|
|
319
|
+
complete: {
|
|
320
|
+
kMwMTN: "x7ixh4y",
|
|
321
|
+
$$css: !0
|
|
322
|
+
},
|
|
323
|
+
failed: {
|
|
324
|
+
kMwMTN: "xr5kp14",
|
|
325
|
+
$$css: !0
|
|
326
|
+
},
|
|
327
|
+
skipped: {
|
|
328
|
+
kMwMTN: "x153jb6y",
|
|
329
|
+
$$css: !0
|
|
330
|
+
},
|
|
331
|
+
unknown: {
|
|
332
|
+
kMwMTN: "x153jb6y",
|
|
333
|
+
$$css: !0
|
|
334
|
+
}
|
|
335
|
+
}, R = {
|
|
336
|
+
pending: L.pending,
|
|
337
|
+
running: L.running,
|
|
338
|
+
complete: L.complete,
|
|
339
|
+
failed: L.failed,
|
|
340
|
+
skipped: L.skipped,
|
|
341
|
+
unknown: L.unknown
|
|
342
|
+
}, z = {
|
|
343
|
+
pending: S,
|
|
344
|
+
running: y,
|
|
345
|
+
complete: v,
|
|
346
|
+
failed: C,
|
|
347
|
+
skipped: b,
|
|
348
|
+
unknown: x
|
|
349
|
+
};
|
|
350
|
+
function B({ label: e, children: t }) {
|
|
351
|
+
return /* @__PURE__ */ g("ol", {
|
|
352
|
+
"aria-label": e,
|
|
353
|
+
className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft",
|
|
354
|
+
children: t
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function V({ label: e, children: t }) {
|
|
358
|
+
return /* @__PURE__ */ g("ol", {
|
|
359
|
+
"aria-label": e,
|
|
360
|
+
className: "x1ghz6dp x1717udv x3ct3a4 xeuugli x1hz01jw xtqrqnz x1778rvt xj57cvi xbixft x3bg4vu",
|
|
361
|
+
children: t
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function H({ id: e, label: r, status: i, statusLabel: a, description: o, detail: s, isSelected: c, onSelect: u, children: d }) {
|
|
365
|
+
let f = z[i];
|
|
366
|
+
return /* @__PURE__ */ _("li", {
|
|
367
|
+
"data-item-id": e,
|
|
368
|
+
className: "x1n2onr6 xrvj5dj x1qpdrs7 x8zbtdt x1wv5www xup0pd7",
|
|
369
|
+
children: [/* @__PURE__ */ _("div", {
|
|
370
|
+
"aria-hidden": !0,
|
|
371
|
+
className: "x78zum5 xdt5ytf x6s0dn4 xunmzkg x1lk341d",
|
|
372
|
+
children: [/* @__PURE__ */ g(f, {
|
|
373
|
+
size: 14,
|
|
374
|
+
...l.props(R[i])
|
|
375
|
+
}), /* @__PURE__ */ g("span", { className: "x1i1rx1s x1f6qilh x98rzlu x1fa40ue" })]
|
|
376
|
+
}), /* @__PURE__ */ _("div", {
|
|
377
|
+
className: "x78zum5 xdt5ytf xunmzkg xeuugli",
|
|
378
|
+
children: [
|
|
379
|
+
/* @__PURE__ */ g("div", {
|
|
380
|
+
...{
|
|
381
|
+
0: { className: "xk4h15q xj0a0fe" },
|
|
382
|
+
1: { className: "xk4h15q xj0a0fe xujl8zx xda060z" }
|
|
383
|
+
}[c === !0 | 0],
|
|
384
|
+
children: u === void 0 ? r : /* @__PURE__ */ g(t, {
|
|
385
|
+
"aria-pressed": c,
|
|
386
|
+
onClick: () => u(e),
|
|
387
|
+
children: r
|
|
388
|
+
})
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ g("span", {
|
|
391
|
+
className: "xy8obcc xas2l8k x153jb6y xj0a0fe",
|
|
392
|
+
children: a
|
|
393
|
+
}),
|
|
394
|
+
o !== void 0 && /* @__PURE__ */ g("p", {
|
|
395
|
+
className: "x1ghz6dp x153jb6y xj0a0fe",
|
|
396
|
+
children: o
|
|
397
|
+
}),
|
|
398
|
+
s !== void 0 && /* @__PURE__ */ _(n.Root, { children: [/* @__PURE__ */ g(n.Trigger, { children: "Details" }), /* @__PURE__ */ g(n.Panel, { children: s })] }),
|
|
399
|
+
d
|
|
400
|
+
]
|
|
401
|
+
})]
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
var U = {
|
|
405
|
+
Root: B,
|
|
406
|
+
Item: H,
|
|
407
|
+
Group: V
|
|
408
|
+
};
|
|
409
|
+
export { M as a, P as i, I as n, O as o, F as r, U as t };
|