@mechane-ai/elements 0.39.0 → 0.41.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 +11 -19
- package/README.md +49 -25
- package/dist/accessibility-P89UG9-r.js +25 -0
- package/dist/agent.js +1 -0
- package/dist/ai.js +50 -44
- package/dist/{categorical-values-BECG-J6R.js → categorical-values-DnGR_pQx.js} +3 -3
- package/dist/{chart-frame-CJFnI39T.js → chart-frame-BsyI1Zc8.js} +58 -57
- package/dist/{chart-input-DwAobO8Y.js → chart-input-r4S3-QCT.js} +2 -2
- package/dist/chart-navigation-D7OkLdSx.js +119 -0
- package/dist/charts/cartesian.js +560 -583
- package/dist/charts/distribution.js +218 -218
- package/dist/charts/graph.js +86 -85
- package/dist/charts/hierarchy.js +4 -4
- package/dist/charts/matrix.js +148 -147
- package/dist/charts/timeline.js +77 -76
- package/dist/charts.js +2 -2
- package/dist/code-block-C4K1sM9O.js +255 -0
- package/dist/collections.js +828 -607
- package/dist/constants.stylex-BILvnwUk.js +84 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +184 -77
- package/dist/{content-link-B3ObdyZY.js → content-link-CBDqSvgP.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/control-styles-D3q_Qyxi.js +179 -0
- package/dist/csp.js +14 -1
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +359 -245
- package/dist/forms-I-WMHTkr.js +139 -0
- package/dist/forms.js +3 -3
- package/dist/index.js +1 -1
- package/dist/layout.js +271 -241
- package/dist/navigation/commands.js +87 -76
- package/dist/{navigation-D2_sGy3C.js → navigation-CveMIuXI.js} +1 -1
- package/dist/navigation.js +2 -2
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/message-action.d.ts +1 -1
- package/dist/packages/charts/src/chart-navigation.d.ts +18 -2
- package/dist/packages/charts/src/chart-surface.d.ts +23 -0
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +3 -2
- package/dist/packages/collections/src/data-table.d.ts +7 -2
- package/dist/packages/collections/src/index.d.ts +4 -1
- package/dist/packages/collections/src/query-controls.d.ts +18 -0
- package/dist/packages/collections/src/table-query.d.ts +64 -0
- package/dist/packages/collections/src/use-collection-controls.d.ts +3 -8
- package/dist/packages/content/src/pierre-theme.d.ts +0 -1
- package/dist/packages/core/src/actions.d.ts +15 -13
- package/dist/packages/core/src/copy-value.d.ts +3 -2
- package/dist/packages/core/src/disclosure.d.ts +14 -11
- package/dist/packages/feedback/src/notifications.d.ts +15 -15
- package/dist/packages/feedback/src/toast.d.ts +9 -3
- package/dist/packages/forms/src/combobox.d.ts +31 -41
- package/dist/packages/forms/src/dates/event-month.d.ts +17 -0
- package/dist/packages/forms/src/dates/index.d.ts +2 -0
- package/dist/packages/forms/src/field-styles.d.ts +0 -19
- package/dist/packages/forms/src/form-controls.d.ts +26 -24
- package/dist/packages/forms/src/forms.d.ts +17 -14
- package/dist/packages/forms/src/select-control.d.ts +6 -4
- package/dist/packages/forms/src/select.d.ts +14 -18
- package/dist/packages/forms/src/selection-state.d.ts +11 -0
- package/dist/packages/forms/src/selection-styles.d.ts +3 -0
- package/dist/packages/forms/src/selection.d.ts +21 -19
- package/dist/packages/foundations/src/agent/index.d.ts +2 -0
- package/dist/packages/foundations/src/control-state.d.ts +2 -3
- package/dist/packages/foundations/src/control-styles.d.ts +19 -0
- package/dist/packages/foundations/src/csp/index.d.ts +1 -1
- package/dist/packages/foundations/src/csp/provider.d.ts +3 -0
- package/dist/packages/foundations/src/style-composition.d.ts +4 -1
- package/dist/packages/layout/src/app-shell.d.ts +12 -1
- package/dist/packages/layout/src/index.d.ts +1 -1
- package/dist/packages/layout/src/navigation-rail.d.ts +15 -2
- package/dist/packages/layout/src/resizable.d.ts +2 -2
- package/dist/packages/layout/src/sidebar.d.ts +4 -3
- package/dist/packages/navigation/src/tab-styles.d.ts +1 -1
- package/dist/packages/navigation/src/tabs.d.ts +12 -10
- package/dist/packages/overlays/src/alert-dialog.d.ts +19 -13
- package/dist/packages/overlays/src/dialog.d.ts +39 -24
- package/dist/packages/overlays/src/drawer.d.ts +16 -26
- package/dist/packages/overlays/src/menu.d.ts +37 -44
- package/dist/packages/overlays/src/overlay-root.d.ts +10 -0
- package/dist/packages/overlays/src/popover.d.ts +11 -20
- package/dist/packages/overlays/src/preview.d.ts +6 -13
- package/dist/packages/overlays/src/tooltip.d.ts +12 -15
- package/dist/{pierre-diff-CaPsfQRo.js → pierre-diff-DJ3oOfPX.js} +5 -5
- package/dist/{src-DPRmO-JY.js → src-CNV1ewzb.js} +379 -407
- package/dist/{src-CSWIG_op.js → src-CQQvXi7a.js} +58 -81
- package/dist/{src-DWjAoOyd.js → src-D2OHco8V.js} +42 -41
- package/dist/src-DfOAlAd2.js +750 -0
- package/dist/src-na2DdkKI.js +561 -0
- package/dist/{src-C-Sx37kz.js → src-s3tWwnN4.js} +361 -518
- package/dist/styles.js +3 -0
- package/dist/{elements.css → styles2.css} +195 -97
- package/dist/tokens.js +3 -1
- package/dist/{tokens.stylex-CJbIDPB9.js → tokens.stylex-dF5CACEJ.js} +13 -93
- package/package.json +8 -9
- package/skills/elements-workspace/SKILL.md +12 -0
- package/dist/accessibility-C-aIZ1Yx.js +0 -15
- package/dist/chart-navigation-CBIeNtJq.js +0 -67
- package/dist/code-block-aC0Htt4N.js +0 -184
- package/dist/forms-BQQFas9g.js +0 -118
- package/dist/foundations.css +0 -7
- package/dist/packages/content/src/tree/pierre-tree.d.ts +0 -3
- package/dist/pierre-theme-BpNaWn1x.js +0 -126
- package/dist/pierre-tree-CYCRjdGG.js +0 -106
- package/dist/src-d7EAi61b.js +0 -617
- package/dist/src-nkgFDl-g.js +0 -1171
- package/dist/style-composition-uYlczSsB.js +0 -9
- package/styles.css +0 -2
|
@@ -1,86 +1,6 @@
|
|
|
1
1
|
import "@stylexjs/stylex";
|
|
2
|
-
// packages/foundations/src/
|
|
2
|
+
// packages/foundations/src/tokens.stylex.ts
|
|
3
3
|
var e = {
|
|
4
|
-
canvas: "#191919",
|
|
5
|
-
surface: "#101010",
|
|
6
|
-
ink: "#f2f2f2",
|
|
7
|
-
inkHover: "#d6d6d6",
|
|
8
|
-
inverse: "#0a0a0a",
|
|
9
|
-
muted: "#b0b0b0",
|
|
10
|
-
faint: "#777777",
|
|
11
|
-
line: "#303030",
|
|
12
|
-
focus: "#79b3ff",
|
|
13
|
-
accent: "#8ed3b3",
|
|
14
|
-
accentSoft: "#152b22",
|
|
15
|
-
warning: "#edc479",
|
|
16
|
-
warningSoft: "#302511",
|
|
17
|
-
danger: "#f59696",
|
|
18
|
-
dangerHover: "#ffc3c3",
|
|
19
|
-
dangerSoft: "#321c1c",
|
|
20
|
-
overlay: "#00000099"
|
|
21
|
-
}, t = {
|
|
22
|
-
series1: "#86a9d3",
|
|
23
|
-
series2: "#83b69f",
|
|
24
|
-
series3: "#b49bce",
|
|
25
|
-
series4: "#cfad70",
|
|
26
|
-
series5: "#80bbc0",
|
|
27
|
-
series6: "#d39aad",
|
|
28
|
-
negative: "#e0929b",
|
|
29
|
-
positive: "#80add0",
|
|
30
|
-
missing: "#363636"
|
|
31
|
-
}, n = {
|
|
32
|
-
identity1: "#f07d75",
|
|
33
|
-
identity2: "#f09a75",
|
|
34
|
-
identity3: "#f07598",
|
|
35
|
-
identity4: "#f075bb",
|
|
36
|
-
identity5: "#f075e6",
|
|
37
|
-
identity6: "#d375f0",
|
|
38
|
-
identity7: "#b375f0",
|
|
39
|
-
identity8: "#9275f0",
|
|
40
|
-
identity9: "#7575f0",
|
|
41
|
-
identity10: "#7596f0",
|
|
42
|
-
identity11: "#75b3f0",
|
|
43
|
-
identity12: "#75cff0",
|
|
44
|
-
identity13: "#75e8f0",
|
|
45
|
-
identity14: "#75f0e3",
|
|
46
|
-
identity15: "#75f0cd",
|
|
47
|
-
identity16: "#75f0b5",
|
|
48
|
-
identity17: "#75f09c",
|
|
49
|
-
identity18: "#75f080",
|
|
50
|
-
identity19: "#8cf075",
|
|
51
|
-
identity20: "#b0f075",
|
|
52
|
-
identity21: "#d7f075",
|
|
53
|
-
identity22: "#f0e175",
|
|
54
|
-
identity23: "#f0c375",
|
|
55
|
-
identity24: "#f0a875"
|
|
56
|
-
}, r = {
|
|
57
|
-
keyword: "#c4a1e5",
|
|
58
|
-
string: "#8ed3b3",
|
|
59
|
-
comment: "#a3a3a3",
|
|
60
|
-
number: "#edc479",
|
|
61
|
-
type: "#84bce3"
|
|
62
|
-
}, i = {
|
|
63
|
-
delaySeconds: 2,
|
|
64
|
-
revealMs: 80,
|
|
65
|
-
imageRevealMs: 200,
|
|
66
|
-
placeholderMs: 120
|
|
67
|
-
}, a = { popup: "0 4px 16px #00000066" }, o = {
|
|
68
|
-
sticky: "1",
|
|
69
|
-
backdrop: "20",
|
|
70
|
-
dialog: "21",
|
|
71
|
-
popup: "30",
|
|
72
|
-
tooltip: "40",
|
|
73
|
-
skipLink: "50"
|
|
74
|
-
}, s = {
|
|
75
|
-
rowHeight: 48,
|
|
76
|
-
headerHeight: 36
|
|
77
|
-
}, c = {
|
|
78
|
-
coarsePointer: "@media (pointer: coarse)",
|
|
79
|
-
hoverPointer: "@media (hover: hover) and (pointer: fine)",
|
|
80
|
-
compactText: "@media (max-width:639px)",
|
|
81
|
-
compactTable: "@media (max-width:600px)",
|
|
82
|
-
reducedMotion: "@media (prefers-reduced-motion: reduce)"
|
|
83
|
-
}, l = {
|
|
84
4
|
canvas: "var(--x7wqmh8)",
|
|
85
5
|
surface: "var(--x13kja51)",
|
|
86
6
|
ink: "var(--x169lqhw)",
|
|
@@ -99,7 +19,7 @@ var e = {
|
|
|
99
19
|
dangerSoft: "var(--x1im53j)",
|
|
100
20
|
overlay: "var(--x1i8t5sg)",
|
|
101
21
|
__varGroupHash__: "xm90lv7"
|
|
102
|
-
},
|
|
22
|
+
}, t = {
|
|
103
23
|
series1: "var(--x1nlt3ga)",
|
|
104
24
|
series2: "var(--x5yb4il)",
|
|
105
25
|
series3: "var(--x3s82iy)",
|
|
@@ -110,7 +30,7 @@ var e = {
|
|
|
110
30
|
positive: "var(--x1l35zjm)",
|
|
111
31
|
missing: "var(--x5dm89x)",
|
|
112
32
|
__varGroupHash__: "x102x4ow"
|
|
113
|
-
},
|
|
33
|
+
}, n = {
|
|
114
34
|
identity1: "var(--xervi70)",
|
|
115
35
|
identity2: "var(--x1scgmo8)",
|
|
116
36
|
identity3: "var(--xu5wby9)",
|
|
@@ -136,14 +56,14 @@ var e = {
|
|
|
136
56
|
identity23: "var(--xh8xsxd)",
|
|
137
57
|
identity24: "var(--x9u8ejr)",
|
|
138
58
|
__varGroupHash__: "x6mvf7n"
|
|
139
|
-
},
|
|
59
|
+
}, r = {
|
|
140
60
|
keyword: "var(--x1t6rq9)",
|
|
141
61
|
string: "var(--x1pa6z6o)",
|
|
142
62
|
comment: "var(--x4crkt3)",
|
|
143
63
|
number: "var(--x1ih6ezv)",
|
|
144
64
|
type: "var(--x1gibtqd)",
|
|
145
65
|
__varGroupHash__: "x181h4q1"
|
|
146
|
-
},
|
|
66
|
+
}, i = {
|
|
147
67
|
xxs: "var(--xjighox)",
|
|
148
68
|
xs: "var(--x1xijsos)",
|
|
149
69
|
sm: "var(--xxhyxt)",
|
|
@@ -152,7 +72,7 @@ var e = {
|
|
|
152
72
|
xl: "var(--x1iwxfi2)",
|
|
153
73
|
xxl: "var(--x153fiic)",
|
|
154
74
|
__varGroupHash__: "xi13snk"
|
|
155
|
-
},
|
|
75
|
+
}, a = {
|
|
156
76
|
fontFamily: "var(--xax3y77)",
|
|
157
77
|
monoFamily: "var(--xntcpct)",
|
|
158
78
|
regularWeight: "var(--x15yhtsr)",
|
|
@@ -175,7 +95,7 @@ var e = {
|
|
|
175
95
|
compactHeadingLineHeight: "var(--x1q14agh)",
|
|
176
96
|
headingTracking: "var(--xgto76l)",
|
|
177
97
|
__varGroupHash__: "xledmcz"
|
|
178
|
-
},
|
|
98
|
+
}, o = {
|
|
179
99
|
height: "var(--x14tmdi9)",
|
|
180
100
|
compactHeight: "var(--xcmidyz)",
|
|
181
101
|
coarseTarget: "var(--x6uufy4)",
|
|
@@ -189,27 +109,27 @@ var e = {
|
|
|
189
109
|
focusWidth: "var(--xxx3t85)",
|
|
190
110
|
disabledOpacity: "var(--x9ngs59)",
|
|
191
111
|
__varGroupHash__: "x1sjug0q"
|
|
192
|
-
},
|
|
112
|
+
}, s = {
|
|
193
113
|
inset: "var(--xnv5ly4)",
|
|
194
114
|
toolbarHeight: "var(--x1m0ogk9)",
|
|
195
115
|
sectionGap: "var(--xe6nmbs)",
|
|
196
116
|
__varGroupHash__: "x1vss23x"
|
|
197
|
-
},
|
|
117
|
+
}, c = {
|
|
198
118
|
headerHeight: "var(--xfz06zf)",
|
|
199
119
|
__varGroupHash__: "xiqc376"
|
|
200
|
-
},
|
|
120
|
+
}, l = {
|
|
201
121
|
sm: "var(--x1asdyoo)",
|
|
202
122
|
md: "var(--xz1oyae)",
|
|
203
123
|
__varGroupHash__: "x1i152zt"
|
|
204
|
-
},
|
|
124
|
+
}, u = {
|
|
205
125
|
duration: "var(--xjjzqp4)",
|
|
206
126
|
easing: "var(--x5xz5r2)",
|
|
207
127
|
drawerDuration: "var(--xrmqybo)",
|
|
208
128
|
drawerEasing: "var(--xumjr7l)",
|
|
209
129
|
__varGroupHash__: "xtoz1ri"
|
|
210
|
-
},
|
|
130
|
+
}, d = {
|
|
211
131
|
popup: "var(--xfou7vv)",
|
|
212
132
|
selection: "var(--x1qr3jy8)",
|
|
213
133
|
__varGroupHash__: "x1e8hs47"
|
|
214
134
|
};
|
|
215
|
-
export {
|
|
135
|
+
export { u as a, c, r as d, a as f, o as i, d as l, t as n, s as o, e as r, l as s, n as t, i as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mechane-ai/elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Elements by Mechane — React components for applications, AI interfaces, and analytical graphics",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"skills",
|
|
14
14
|
"packages/foundations/src/constants.stylex.ts",
|
|
15
15
|
"packages/foundations/src/tokens.stylex.ts",
|
|
16
|
-
"styles.css",
|
|
17
16
|
"README.md",
|
|
18
17
|
"LICENSE",
|
|
19
18
|
"NOTICE"
|
|
@@ -119,6 +118,10 @@
|
|
|
119
118
|
"types": "./dist/packages/foundations/src/theme.d.ts",
|
|
120
119
|
"import": "./dist/theme.js"
|
|
121
120
|
},
|
|
121
|
+
"./agent": {
|
|
122
|
+
"types": "./dist/packages/foundations/src/agent/index.d.ts",
|
|
123
|
+
"import": "./dist/agent.js"
|
|
124
|
+
},
|
|
122
125
|
"./csp": {
|
|
123
126
|
"types": "./dist/packages/foundations/src/csp/index.d.ts",
|
|
124
127
|
"import": "./dist/csp.js"
|
|
@@ -129,26 +132,22 @@
|
|
|
129
132
|
},
|
|
130
133
|
"./constants.stylex": "./packages/foundations/src/constants.stylex.ts",
|
|
131
134
|
"./tokens.stylex": "./packages/foundations/src/tokens.stylex.ts",
|
|
132
|
-
"./styles.css": "./
|
|
135
|
+
"./styles.css": "./dist/styles2.css"
|
|
133
136
|
},
|
|
134
137
|
"dependencies": {
|
|
135
138
|
"@base-ui/react": "1.9.0",
|
|
136
|
-
"@daypicker/react": "10.0.2",
|
|
137
139
|
"@pierre/diffs": "1.6.4",
|
|
138
140
|
"@pierre/highlights": "0.4.0",
|
|
139
|
-
"@pierre/theme": "1.1.0",
|
|
140
|
-
"@pierre/trees": "1.0.0-beta.6",
|
|
141
141
|
"@shadcn/react": "0.3.1",
|
|
142
142
|
"@stylexjs/stylex": "0.19.1",
|
|
143
|
-
"@tanstack/react-hotkeys": "0.22.0",
|
|
144
143
|
"@tanstack/react-table": "9.3.1",
|
|
145
144
|
"@tanstack/react-virtual": "3.14.26",
|
|
145
|
+
"@ui-sdk/core": "0.1.0-beta.13",
|
|
146
|
+
"@ui-sdk/react": "0.1.0-beta.13",
|
|
146
147
|
"@visx/hierarchy": "4.0.0",
|
|
147
148
|
"@visx/scale": "4.0.0",
|
|
148
149
|
"@visx/shape": "4.0.0",
|
|
149
150
|
"lucide-react": "1.66.0",
|
|
150
|
-
"react-resizable-panels": "4.18.0",
|
|
151
|
-
"sonner": "2.0.8",
|
|
152
151
|
"streamdown": "2.7.1",
|
|
153
152
|
"strip-ansi": "7.2.0"
|
|
154
153
|
},
|
|
@@ -20,3 +20,15 @@ the toolbar. Keep drill-down on the data mark or row it explains.
|
|
|
20
20
|
Use `ToggleGroup` from `/forms` for short sets of pressed choices. For a required selection, keep the active value when
|
|
21
21
|
pressing the selected item returns an empty array. Put the group beside a native Elements field and select. Compare
|
|
22
22
|
their outer heights with a fine pointer and a coarse pointer, and check wrapping at phone width.
|
|
23
|
+
|
|
24
|
+
Use the shell's `railFooter.navigation` and `railFooter.menu` for persistent settings and account controls. Let the
|
|
25
|
+
shell space and position both groups. Put route tabs and their actions in `PageLayout.navigation`. Wrap each report
|
|
26
|
+
heading and its content in a sibling `PageSection` so scrolling advances the sticky heading while preserving the page
|
|
27
|
+
toolbar.
|
|
28
|
+
|
|
29
|
+
Give every table a query. Use local search and filter dimensions for complete finite data. Route remote search and
|
|
30
|
+
filters through the collection owner before the server takes a page. A table inside its collection's query frame reuses
|
|
31
|
+
the same controls. Record a specific reason for a static reference table or an unavailable capability.
|
|
32
|
+
|
|
33
|
+
Use `EventMonth` from `/forms/dates` for an event grid. Supply display labels per civil date and handle the selected day
|
|
34
|
+
in the caller. Use the grid across the working pane and show the selected day's actions and full agenda separately.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "@stylexjs/stylex";
|
|
2
|
-
// packages/foundations/src/accessibility.ts
|
|
3
|
-
var e = { hidden: {
|
|
4
|
-
kVAEAm: "x10l6tqk",
|
|
5
|
-
kzqmXN: "x1i1rx1s",
|
|
6
|
-
kZKoxP: "xjm9jq1",
|
|
7
|
-
kmVPX3: "x1717udv",
|
|
8
|
-
kogj98: "xkdpibf",
|
|
9
|
-
kVQacm: "xb3r6kr",
|
|
10
|
-
kz4h6p: "x1hyvwdk",
|
|
11
|
-
khDVqt: "xuxw1ft",
|
|
12
|
-
kMzoRj: "xc342km",
|
|
13
|
-
$$css: !0
|
|
14
|
-
} };
|
|
15
|
-
export { e as t };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./accessibility-C-aIZ1Yx.js";
|
|
2
|
-
import * as t from "@stylexjs/stylex";
|
|
3
|
-
import { useId as n, useState as r } from "react";
|
|
4
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
-
// packages/charts/src/chart-data.tsx
|
|
6
|
-
function o({ label: n, columns: r, rows: o }) {
|
|
7
|
-
return /* @__PURE__ */ i("div", {
|
|
8
|
-
...t.props(e.hidden),
|
|
9
|
-
children: /* @__PURE__ */ a("table", { children: [
|
|
10
|
-
/* @__PURE__ */ i("caption", { children: n }),
|
|
11
|
-
/* @__PURE__ */ i("thead", { children: /* @__PURE__ */ i("tr", { children: r.map((e) => /* @__PURE__ */ i("th", {
|
|
12
|
-
scope: "col",
|
|
13
|
-
children: e.label
|
|
14
|
-
}, e.id)) }) }),
|
|
15
|
-
/* @__PURE__ */ i("tbody", { children: o.map((e) => /* @__PURE__ */ i("tr", { children: r.map((t, n) => n === 0 ? /* @__PURE__ */ i("th", {
|
|
16
|
-
scope: "row",
|
|
17
|
-
children: e.values[n]
|
|
18
|
-
}, t.id) : /* @__PURE__ */ i("td", { children: e.values[n] }, t.id)) }, e.id)) })
|
|
19
|
-
] })
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
// packages/charts/src/chart-navigation.tsx
|
|
23
|
-
var s = /* @__PURE__ */ new Set(["Enter", " "]);
|
|
24
|
-
function c({ title: e, items: t, selection: i }) {
|
|
25
|
-
let a = n(), [o, c] = r(void 0), [l, u] = r(!1), d = Math.max(0, t.findIndex((e) => e.id === (o ?? i?.selectedId))), f = t[d];
|
|
26
|
-
function p(e) {
|
|
27
|
-
c(e), u(!0);
|
|
28
|
-
}
|
|
29
|
-
function m(e) {
|
|
30
|
-
let n = e.altKey || e.ctrlKey || e.metaKey;
|
|
31
|
-
if (e.defaultPrevented || n || t.length === 0) return;
|
|
32
|
-
let r = t.length - 1, a = {
|
|
33
|
-
ArrowLeft: -1,
|
|
34
|
-
ArrowRight: 1,
|
|
35
|
-
ArrowUp: -1,
|
|
36
|
-
ArrowDown: 1,
|
|
37
|
-
Home: -d,
|
|
38
|
-
End: r - d
|
|
39
|
-
}[e.key];
|
|
40
|
-
if (a !== void 0) {
|
|
41
|
-
e.preventDefault();
|
|
42
|
-
let n = t[Math.max(0, Math.min(r, d + a))];
|
|
43
|
-
n !== void 0 && p(n.id);
|
|
44
|
-
} else s.has(e.key) && i !== void 0 && f !== void 0 ? (e.preventDefault(), i.onSelect(f.id)) : e.key === "Escape" && (e.preventDefault(), u(!1));
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
id: a,
|
|
48
|
-
props: {
|
|
49
|
-
role: "group",
|
|
50
|
-
tabIndex: t.length > 0 ? 0 : void 0,
|
|
51
|
-
"aria-label": `${e}. Use arrow keys to inspect.${i === void 0 ? "" : " Press Enter to select."}`,
|
|
52
|
-
"aria-describedby": a,
|
|
53
|
-
onKeyDown: m,
|
|
54
|
-
onFocus: () => u(!0),
|
|
55
|
-
onBlur: (e) => {
|
|
56
|
-
e.currentTarget.contains(e.relatedTarget) || u(!1);
|
|
57
|
-
},
|
|
58
|
-
onPointerLeave: (e) => {
|
|
59
|
-
e.currentTarget.contains(document.activeElement) || u(!1);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
activeId: f?.id,
|
|
63
|
-
label: l ? f?.label : void 0,
|
|
64
|
-
inspect: p
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
export { o as n, c as t };
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { v as e } from "./src-C-Sx37kz.js";
|
|
2
|
-
import { r as t } from "./tokens.stylex-CJbIDPB9.js";
|
|
3
|
-
import { t as n } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
4
|
-
import { t as r } from "./viewer-styles-DsFYri4K.js";
|
|
5
|
-
import { t as i } from "./pierre-theme-BpNaWn1x.js";
|
|
6
|
-
import * as a from "@stylexjs/stylex";
|
|
7
|
-
import { useEffect as o, useRef as s, useState as c } from "react";
|
|
8
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
-
import { getFiletypeFromFileName as d } from "@pierre/diffs";
|
|
10
|
-
// packages/content/src/code/use-highlighted-code.ts
|
|
11
|
-
var f = 2e5, p = 4096;
|
|
12
|
-
function m(e, t) {
|
|
13
|
-
let n = s(null), [r, a] = c();
|
|
14
|
-
return o(() => () => {
|
|
15
|
-
n.current !== null && (n.current.tokenizer.dispose(), n.current = null);
|
|
16
|
-
}, []), o(() => {
|
|
17
|
-
let r = !0;
|
|
18
|
-
async function o() {
|
|
19
|
-
try {
|
|
20
|
-
let o = await import("@pierre/highlights");
|
|
21
|
-
if (!r || e.length > f || !o.isSupportedLanguage(t)) return;
|
|
22
|
-
let s = n.current, c = s !== null && s.language === t, l = c ? s : {
|
|
23
|
-
language: t,
|
|
24
|
-
source: e,
|
|
25
|
-
tokenizer: new o.LiveTokenizer({
|
|
26
|
-
code: e,
|
|
27
|
-
lang: t,
|
|
28
|
-
theme: i,
|
|
29
|
-
tokenizeMaxLineLength: p
|
|
30
|
-
})
|
|
31
|
-
};
|
|
32
|
-
if (c) {
|
|
33
|
-
if (e.startsWith(s.source)) {
|
|
34
|
-
let t = l.tokenizer.lineCount - 1, n = {
|
|
35
|
-
line: t,
|
|
36
|
-
character: l.tokenizer.getLineLength(t)
|
|
37
|
-
};
|
|
38
|
-
l.tokenizer.applyEdits([{
|
|
39
|
-
range: {
|
|
40
|
-
start: n,
|
|
41
|
-
end: n
|
|
42
|
-
},
|
|
43
|
-
newText: e.slice(s.source.length)
|
|
44
|
-
}]);
|
|
45
|
-
} else l.tokenizer.reset(e);
|
|
46
|
-
} else s !== null && s.tokenizer.dispose();
|
|
47
|
-
n.current = {
|
|
48
|
-
...l,
|
|
49
|
-
source: e
|
|
50
|
-
};
|
|
51
|
-
let u = l.tokenizer;
|
|
52
|
-
u.flush();
|
|
53
|
-
let d = Array.from({ length: u.lineCount }, (e, t) => u.getLineTokens(t).tokens);
|
|
54
|
-
a({
|
|
55
|
-
code: e,
|
|
56
|
-
language: t,
|
|
57
|
-
lines: d,
|
|
58
|
-
hasFailed: !1
|
|
59
|
-
});
|
|
60
|
-
} catch {
|
|
61
|
-
r && a({
|
|
62
|
-
code: e,
|
|
63
|
-
language: t,
|
|
64
|
-
lines: [],
|
|
65
|
-
hasFailed: !0
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return o(), () => {
|
|
70
|
-
r = !1;
|
|
71
|
-
};
|
|
72
|
-
}, [e, t]), r !== void 0 && r.code === e && r.language === t ? r : void 0;
|
|
73
|
-
}
|
|
74
|
-
// packages/content/src/code/code-block.tsx
|
|
75
|
-
var h = {
|
|
76
|
-
kVQacm: "xysyzu8",
|
|
77
|
-
k9g6sI: "x12h1iku",
|
|
78
|
-
$$css: !0
|
|
79
|
-
}, g = {
|
|
80
|
-
viewport: (e) => [
|
|
81
|
-
h,
|
|
82
|
-
{
|
|
83
|
-
kskxy: e == null ? e : "x1jols5v",
|
|
84
|
-
$$css: !0
|
|
85
|
-
},
|
|
86
|
-
{ "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
87
|
-
],
|
|
88
|
-
token: (e) => [{
|
|
89
|
-
kMwMTN: e == null ? e : "x14rh7hd",
|
|
90
|
-
$$css: !0
|
|
91
|
-
}, { "--x-color": e ?? void 0 }],
|
|
92
|
-
italic: {
|
|
93
|
-
kKX8nH: "x1k4tb9n",
|
|
94
|
-
$$css: !0
|
|
95
|
-
},
|
|
96
|
-
bold: {
|
|
97
|
-
k63SB2: "x1b5ytql",
|
|
98
|
-
$$css: !0
|
|
99
|
-
}
|
|
100
|
-
}, _ = 2e5;
|
|
101
|
-
function v({ token: e }) {
|
|
102
|
-
let n = e.fontStyle ?? 0, [r, i] = [!!(n & 1), !!(n & 2)];
|
|
103
|
-
return /* @__PURE__ */ l("span", {
|
|
104
|
-
...a.props(g.token(e.color ?? t.ink), r && g.italic, i && g.bold),
|
|
105
|
-
children: e.content
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
function y({ code: t, variant: i = "default", language: o, filename: s, isStreaming: c = !1, shouldWrap: f = !1, showLineNumbers: p = !0, selectedLines: h, annotations: y = [], maxHeight: b = 400, maxLines: x = 2e3 }) {
|
|
109
|
-
let S = o ?? (s === void 0 ? "text" : d(s)), C = m(t, S), w = n(), T = t.slice(0, _).split(/\r\n|\n|\r/u), E = T.slice(0, Math.max(1, x)).map((e, t) => ({
|
|
110
|
-
text: e,
|
|
111
|
-
line: t + 1
|
|
112
|
-
})), D = s ?? S, O = i === "embedded";
|
|
113
|
-
return /* @__PURE__ */ u("section", {
|
|
114
|
-
"aria-label": s ?? "Code",
|
|
115
|
-
...a.props(r.root, O && r.embedded),
|
|
116
|
-
children: [
|
|
117
|
-
/* @__PURE__ */ u("div", {
|
|
118
|
-
...a.props(r.header, O && r.embeddedHeader),
|
|
119
|
-
children: [/* @__PURE__ */ u("span", {
|
|
120
|
-
...a.props(r.label),
|
|
121
|
-
children: [D, c && !O && " · streaming"]
|
|
122
|
-
}), /* @__PURE__ */ l(e, {
|
|
123
|
-
label: s ?? "code",
|
|
124
|
-
value: t,
|
|
125
|
-
display: O ? "icon" : "value",
|
|
126
|
-
children: "Copy"
|
|
127
|
-
})]
|
|
128
|
-
}),
|
|
129
|
-
/* @__PURE__ */ l("div", {
|
|
130
|
-
ref: w.ref,
|
|
131
|
-
role: "region",
|
|
132
|
-
"aria-label": `${D} source`,
|
|
133
|
-
tabIndex: w.tabIndex,
|
|
134
|
-
...a.props(r.scrollRegion, g.viewport(b)),
|
|
135
|
-
children: /* @__PURE__ */ l("pre", {
|
|
136
|
-
...{
|
|
137
|
-
0: { className: "x1ghz6dp xn9t2bk xiard35 xy8obcc x1778rvt xeq4nuv xk8lq53" },
|
|
138
|
-
1: { className: "x1ghz6dp xn9t2bk xiard35 xy8obcc x1778rvt xeq4nuv xeuugli x126k92a xj0a0fe" }
|
|
139
|
-
}[!!f | 0],
|
|
140
|
-
children: /* @__PURE__ */ l("code", {
|
|
141
|
-
className: "xjb2p0i",
|
|
142
|
-
children: E.map(({ text: e, line: t }) => {
|
|
143
|
-
let n = C === void 0 ? void 0 : C.lines[t - 1], r = h !== void 0 && t >= h.start && t <= (h.end ?? h.start), i = y.find((e) => e.line === t);
|
|
144
|
-
return /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ u("span", {
|
|
145
|
-
...{
|
|
146
|
-
0: { className: "x78zum5 x16exltd" },
|
|
147
|
-
1: { className: "x78zum5 x16exltd x1r8u7ye" }
|
|
148
|
-
}[!!r | 0],
|
|
149
|
-
children: [p && /* @__PURE__ */ l("span", {
|
|
150
|
-
"aria-hidden": !0,
|
|
151
|
-
className: "x1rg5ohu x2lah0s xl3ry0p x5g2kb4 xp4054r x153jb6y x87ps6o",
|
|
152
|
-
children: t
|
|
153
|
-
}), /* @__PURE__ */ u("span", {
|
|
154
|
-
className: "x1lliihq x12lumcd x1doqdfy xeuugli",
|
|
155
|
-
children: [n === void 0 ? e : n.map((e) => /* @__PURE__ */ l(v, { token: e }, e.offset)), e.length === 0 && "\n"]
|
|
156
|
-
})]
|
|
157
|
-
}), i !== void 0 && /* @__PURE__ */ l("span", {
|
|
158
|
-
className: "x1lliihq x9f619 x7wzq59 x1o0tod xzfn7dr x1mvvolr x1r7kqkb x1hz01jw xtqrqnz x1778rvt xeaf4i8 xj0a0fe",
|
|
159
|
-
children: i.content
|
|
160
|
-
})] }, t);
|
|
161
|
-
})
|
|
162
|
-
})
|
|
163
|
-
})
|
|
164
|
-
}),
|
|
165
|
-
T.length > E.length && /* @__PURE__ */ l("div", {
|
|
166
|
-
...a.props(r.note),
|
|
167
|
-
children: "Additional lines omitted. Copy includes the complete source."
|
|
168
|
-
}),
|
|
169
|
-
t.length > _ && /* @__PURE__ */ l("div", {
|
|
170
|
-
...a.props(r.note),
|
|
171
|
-
children: "Preview limited to the first 200,000 characters. Copy includes the complete source."
|
|
172
|
-
}),
|
|
173
|
-
t.length === 0 && /* @__PURE__ */ l("div", {
|
|
174
|
-
...a.props(r.note),
|
|
175
|
-
children: "No source text."
|
|
176
|
-
}),
|
|
177
|
-
C !== void 0 && C.hasFailed && /* @__PURE__ */ l("div", {
|
|
178
|
-
...a.props(r.note),
|
|
179
|
-
children: "Syntax highlighting unavailable. The source is shown unchanged."
|
|
180
|
-
})
|
|
181
|
-
]
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
export { y as t };
|
package/dist/forms-BQQFas9g.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { A as e, N as t, j as n } from "./src-C-Sx37kz.js";
|
|
2
|
-
import { t as r } from "./style-composition-uYlczSsB.js";
|
|
3
|
-
import * as i from "@stylexjs/stylex";
|
|
4
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
-
import { Input as o } from "@base-ui/react/input";
|
|
6
|
-
import { Field as s } from "@base-ui/react/field";
|
|
7
|
-
// packages/forms/src/field-styles.ts
|
|
8
|
-
var c = {
|
|
9
|
-
error: {
|
|
10
|
-
kMwMTN: "xr5kp14",
|
|
11
|
-
kGuDYH: "xy8obcc",
|
|
12
|
-
kLWn49: "xas2l8k",
|
|
13
|
-
kHjlTd: "xj0a0fe",
|
|
14
|
-
$$css: !0
|
|
15
|
-
},
|
|
16
|
-
input: {
|
|
17
|
-
kPJHz1: "x13qnu6",
|
|
18
|
-
k7shQP: "x9v5kkp",
|
|
19
|
-
kZs9gx: "x19rmrnh",
|
|
20
|
-
kiEn40: "x13iak60",
|
|
21
|
-
kr7hW5: "x76gt29",
|
|
22
|
-
kWC4TW: "x19mxcj1",
|
|
23
|
-
kD2jPA: "x19kzkq0",
|
|
24
|
-
kYPGJ8: "x1s07b3s",
|
|
25
|
-
k8Qsv1: "xz7023x",
|
|
26
|
-
$$css: !0
|
|
27
|
-
},
|
|
28
|
-
compactTextarea: {
|
|
29
|
-
kAzted: "xseoqlg",
|
|
30
|
-
kskxy: "x1y3glee",
|
|
31
|
-
$$css: !0
|
|
32
|
-
},
|
|
33
|
-
growingTextarea: {
|
|
34
|
-
kAzted: "x2lwn1j",
|
|
35
|
-
kskxy: "xp8lc2p",
|
|
36
|
-
kOwNse: "x5f5z56",
|
|
37
|
-
kHenm0: "xtt52l0",
|
|
38
|
-
$$css: !0
|
|
39
|
-
}
|
|
40
|
-
}, l = {
|
|
41
|
-
field: { field: { $$css: !0 } }.field,
|
|
42
|
-
plain: n.plainTextarea
|
|
43
|
-
};
|
|
44
|
-
// packages/forms/src/forms.tsx
|
|
45
|
-
function u({ className: e, style: t, xstyle: o, ...c }) {
|
|
46
|
-
return /* @__PURE__ */ a(s.Root, {
|
|
47
|
-
...c,
|
|
48
|
-
...r({
|
|
49
|
-
className: e,
|
|
50
|
-
style: t,
|
|
51
|
-
styles: i.props(n.fieldRoot, o)
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
function d({ className: e, style: t, ...o }) {
|
|
56
|
-
return /* @__PURE__ */ a(s.Label, {
|
|
57
|
-
...o,
|
|
58
|
-
...r({
|
|
59
|
-
className: e,
|
|
60
|
-
style: t,
|
|
61
|
-
styles: i.props(n.label)
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
function f({ className: e, style: t, ...o }) {
|
|
66
|
-
return /* @__PURE__ */ a(s.Description, {
|
|
67
|
-
...o,
|
|
68
|
-
...r({
|
|
69
|
-
className: e,
|
|
70
|
-
style: t,
|
|
71
|
-
styles: i.props(n.description)
|
|
72
|
-
})
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function p({ className: e, style: t, ...n }) {
|
|
76
|
-
return /* @__PURE__ */ a(s.Error, {
|
|
77
|
-
...n,
|
|
78
|
-
...r({
|
|
79
|
-
className: e,
|
|
80
|
-
style: t,
|
|
81
|
-
styles: i.props(c.error)
|
|
82
|
-
})
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
var m = {
|
|
86
|
-
Root: u,
|
|
87
|
-
Label: d,
|
|
88
|
-
Description: f,
|
|
89
|
-
Error: p
|
|
90
|
-
};
|
|
91
|
-
function h({ density: s = "standard", className: l, style: u, xstyle: d, ...f }) {
|
|
92
|
-
return /* @__PURE__ */ a(o, {
|
|
93
|
-
...f,
|
|
94
|
-
...r({
|
|
95
|
-
className: l,
|
|
96
|
-
style: u,
|
|
97
|
-
styles: i.props(n.base, n.field, n.singleLineField, c.input, e[s], t[s], d)
|
|
98
|
-
})
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function g({ isCompact: e = !1, shouldGrow: t = !1, appearance: o = "field", value: u, defaultValue: d, onValueChange: f, name: p, disabled: m, readOnly: h, required: g, className: _, style: v, xstyle: y, ...b }) {
|
|
102
|
-
return /* @__PURE__ */ a(s.Control, {
|
|
103
|
-
value: u,
|
|
104
|
-
defaultValue: d,
|
|
105
|
-
onValueChange: f,
|
|
106
|
-
name: p,
|
|
107
|
-
disabled: m,
|
|
108
|
-
readOnly: h,
|
|
109
|
-
required: g,
|
|
110
|
-
render: /* @__PURE__ */ a("textarea", { ...b }),
|
|
111
|
-
...r({
|
|
112
|
-
className: _,
|
|
113
|
-
style: v,
|
|
114
|
-
styles: i.props(n.base, n.field, c.input, n.textarea, e && c.compactTextarea, t && c.growingTextarea, l[o], y)
|
|
115
|
-
})
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
export { c as i, h as n, g as r, m as t };
|
package/dist/foundations.css
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
@layer reset, priority1, priority2, priority3, priority4, priority5;
|
|
2
|
-
@import 'streamdown/styles.css' (prefers-reduced-motion: no-preference);
|
|
3
|
-
|
|
4
|
-
[data-streamdown-paused] [data-sd-animate],
|
|
5
|
-
[data-streamdown-paused] [data-sd-animate-marker]::marker {
|
|
6
|
-
animation-play-state: paused;
|
|
7
|
-
}
|