@mechane-ai/elements 0.4.0 → 0.5.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 (46) hide show
  1. package/README.md +41 -29
  2. package/dist/ai.js +6 -6
  3. package/dist/assets/stylex.css +92 -0
  4. package/dist/{categorical-values-cMX7Mykq.js → categorical-values-BfAEQUd0.js} +1 -1
  5. package/dist/{chart-input-qnM44oen.js → chart-input--VSrlMl-.js} +1 -1
  6. package/dist/charts/cartesian.js +49 -49
  7. package/dist/charts/distribution.js +1 -1
  8. package/dist/charts/graph.js +1 -1
  9. package/dist/charts/hierarchy.js +2 -2
  10. package/dist/charts/matrix.js +1 -1
  11. package/dist/collections.js +439 -214
  12. package/dist/content/diff.js +13 -11
  13. package/dist/content/markdown.js +151 -80
  14. package/dist/content/tree.js +1 -1
  15. package/dist/csp.js +1 -0
  16. package/dist/feedback.js +1 -1
  17. package/dist/forms.js +1 -1
  18. package/dist/layout.js +210 -136
  19. package/dist/navigation/commands.js +1 -1
  20. package/dist/navigation.js +36 -11
  21. package/dist/packages/collections/src/collection-scroll.d.ts +19 -0
  22. package/dist/packages/collections/src/data-table.d.ts +20 -3
  23. package/dist/packages/collections/src/index.d.ts +3 -1
  24. package/dist/packages/collections/src/use-end-reached.d.ts +9 -0
  25. package/dist/packages/content/src/markdown/index.d.ts +2 -0
  26. package/dist/packages/content/src/markdown/markdown-options.d.ts +2 -0
  27. package/dist/packages/content/src/markdown/markdown-preview.d.ts +5 -0
  28. package/dist/packages/content/src/markdown/markdown.d.ts +4 -1
  29. package/dist/packages/feedback/src/async-region.d.ts +17 -0
  30. package/dist/packages/feedback/src/index.d.ts +2 -0
  31. package/dist/packages/feedback/src/skeleton.d.ts +4 -3
  32. package/dist/packages/forms/src/index.d.ts +2 -0
  33. package/dist/packages/forms/src/settings-section.d.ts +7 -0
  34. package/dist/packages/foundations/src/csp/index.d.ts +2 -0
  35. package/dist/packages/layout/src/app-shell.d.ts +2 -1
  36. package/dist/packages/layout/src/frame.stylex.d.ts +2 -0
  37. package/dist/packages/layout/src/index.d.ts +2 -0
  38. package/dist/packages/layout/src/record-page.d.ts +42 -0
  39. package/dist/packages/layout/src/sidebar.d.ts +1 -0
  40. package/dist/packages/navigation/src/index.d.ts +2 -0
  41. package/dist/packages/navigation/src/page-navigation.d.ts +14 -0
  42. package/dist/{pierre-tree-qZVvI5c1.js → pierre-tree-LY7PGy-7.js} +1 -1
  43. package/dist/src-CbJTK9oP.js +360 -0
  44. package/dist/{src-CvpS9XIR.js → src-CjnbzSgq.js} +353 -336
  45. package/package.json +5 -1
  46. package/dist/src-BfvOOeA3.js +0 -272
package/dist/layout.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { a as e } from "./src-CfDf8TY8.js";
2
- import { v as t, y as n } from "./src-CbYaLvhD.js";
3
- import { mergeProps as r } from "@base-ui/react/merge-props";
2
+ import { i as t, n, v as r, y as i } from "./src-CbYaLvhD.js";
3
+ import { mergeProps as a } from "@base-ui/react/merge-props";
4
4
  import "@stylexjs/stylex";
5
- import { createContext as i, useContext as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
6
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
7
- import { PanelLeft as p, X as m } from "lucide-react";
8
- import { Group as h, Panel as g, Separator as _ } from "react-resizable-panels";
5
+ import { createContext as o, useContext as s, useEffect as c, useId as l, useRef as u, useState as d } from "react";
6
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
7
+ import { ArrowLeft as h, PanelLeft as g, X as _ } from "lucide-react";
8
+ import { Group as v, Panel as y, Separator as b } from "react-resizable-panels";
9
9
  // packages/layout/src/frame.stylex.ts
10
- var v = {
10
+ var x = {
11
11
  sidebarMobile: "@media (max-width:800px)",
12
12
  sidebarDesktopQuery: "(min-width:801px)",
13
13
  sidebarCoarse: "@media (min-width:801px) and (pointer: coarse)",
14
14
  detailMobile: "@media (max-width:720px)",
15
15
  toolbarCompact: "@container toolbar (max-width:600px)"
16
- }, y = i(null), b = {
16
+ }, S = o(null), C = {
17
17
  navigationControl: {
18
18
  kjj79g: "x1nhvcw1",
19
19
  kOIVth: "x1hnptsi",
@@ -48,47 +48,47 @@ var v = {
48
48
  $$css: !0
49
49
  }
50
50
  };
51
- function x({ header: e, footer: t, close: n, children: r }) {
52
- return /* @__PURE__ */ f(u, { children: [
53
- /* @__PURE__ */ f("div", {
51
+ function w({ header: e, footer: t, close: n, children: r }) {
52
+ return /* @__PURE__ */ m(f, { children: [
53
+ /* @__PURE__ */ m("div", {
54
54
  ...{
55
55
  0: { className: "x9f619 x78zum5 x1qjc9v5 xcn9na3 x2lah0s xeuugli xso031l x1q0q8m5 x1qndepd" },
56
56
  1: { className: "x9f619 x1qjc9v5 xcn9na3 x2lah0s xeuugli xso031l x1q0q8m5 x1qndepd x1s85apg x1rhi5y4" }
57
57
  }[e == null | 0],
58
- children: [/* @__PURE__ */ d("div", {
58
+ children: [/* @__PURE__ */ p("div", {
59
59
  className: "x78zum5 x6s0dn4 x98rzlu xeuugli",
60
60
  children: e
61
61
  }), n]
62
62
  }),
63
- /* @__PURE__ */ d("div", {
63
+ /* @__PURE__ */ p("div", {
64
64
  role: "region",
65
65
  "aria-label": "Navigation links",
66
66
  tabIndex: 0,
67
67
  className: "x98rzlu x2lwn1j x1odjw0f xish69e x7d1sxj x13qnu6 x9v5kkp x19rmrnh x1bqaal",
68
68
  children: r
69
69
  }),
70
- t != null && /* @__PURE__ */ d("div", {
70
+ t != null && /* @__PURE__ */ p("div", {
71
71
  className: "xr1yuqi x153jb6y",
72
72
  children: t
73
73
  })
74
74
  ] });
75
75
  }
76
- function S() {
77
- return /* @__PURE__ */ d(e.Close, {
78
- render: /* @__PURE__ */ d(n, {
76
+ function T() {
77
+ return /* @__PURE__ */ p(e.Close, {
78
+ render: /* @__PURE__ */ p(i, {
79
79
  variant: "ghost",
80
80
  "aria-label": "Close navigation",
81
- xstyle: b.close
81
+ xstyle: C.close
82
82
  }),
83
- children: /* @__PURE__ */ d(m, {
83
+ children: /* @__PURE__ */ p(_, {
84
84
  size: 16,
85
85
  "aria-hidden": !0
86
86
  })
87
87
  });
88
88
  }
89
- function C({ children: e, label: t = "Main" }) {
90
- let n = a(y), r = n !== null && !n.isExpanded;
91
- return /* @__PURE__ */ d("nav", {
89
+ function E({ children: e, label: t = "Main" }) {
90
+ let n = s(S), r = n !== null && !n.isExpanded;
91
+ return /* @__PURE__ */ p("nav", {
92
92
  "aria-label": t,
93
93
  ...{
94
94
  0: { className: "x78zum5 xdt5ytf xfko13i xksvo5r" },
@@ -97,29 +97,29 @@ function C({ children: e, label: t = "Main" }) {
97
97
  children: e
98
98
  });
99
99
  }
100
- function w({ children: e, icon: n, selected: r = !1, onClick: i, ...o }) {
101
- let c = a(y), l = s(), u = c !== null && !c.isExpanded;
102
- return /* @__PURE__ */ d("div", {
100
+ function D({ children: e, icon: t, selected: n = !1, onClick: i, ...a }) {
101
+ let o = s(S), c = l(), u = o !== null && !o.isExpanded;
102
+ return /* @__PURE__ */ p("div", {
103
103
  ...{
104
104
  0: { className: "x78zum5 xeuugli x1ok0vyi" },
105
105
  1: { className: "x78zum5 xeuugli x1ok0vyi x1r7kqkb" }
106
- }[!!r | 0],
107
- children: /* @__PURE__ */ f(t, {
108
- ...o,
106
+ }[!!n | 0],
107
+ children: /* @__PURE__ */ m(r, {
108
+ ...a,
109
109
  variant: "ghost",
110
- "aria-current": r ? "page" : void 0,
111
- "aria-labelledby": o["aria-labelledby"] ?? l,
112
- title: o.title ?? (typeof e == "string" ? e : void 0),
110
+ "aria-current": n ? "page" : void 0,
111
+ "aria-labelledby": a["aria-labelledby"] ?? c,
112
+ title: a.title ?? (typeof e == "string" ? e : void 0),
113
113
  onClick: (e) => {
114
- i !== void 0 && i(e), !e.defaultPrevented && c !== null && c.onNavigate();
114
+ i !== void 0 && i(e), !e.defaultPrevented && o !== null && o.onNavigate();
115
115
  },
116
- xstyle: [b.navigationControl, u && b.collapsedButton],
117
- children: [n != null && /* @__PURE__ */ d("span", {
116
+ xstyle: [C.navigationControl, u && C.collapsedButton],
117
+ children: [t != null && /* @__PURE__ */ p("span", {
118
118
  "aria-hidden": !0,
119
119
  className: "x3nfvp2 x6s0dn4 xl56j7k xtwnzbg x18utl2x x2lah0s",
120
- children: n
121
- }), /* @__PURE__ */ d("span", {
122
- id: l,
120
+ children: t
121
+ }), /* @__PURE__ */ p("span", {
122
+ id: c,
123
123
  ...{
124
124
  0: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft" },
125
125
  1: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft x1s85apg xeod2sa" }
@@ -129,45 +129,45 @@ function w({ children: e, icon: n, selected: r = !1, onClick: i, ...o }) {
129
129
  })
130
130
  });
131
131
  }
132
- function T({ children: e, icon: t, selected: n = !1, onClick: r, className: i, style: o, ...c }) {
133
- let l = a(y), u = s(), p = l !== null && !l.isExpanded, m = {
132
+ function O({ children: e, icon: t, selected: n = !1, onClick: r, className: i, style: a, ...o }) {
133
+ let c = s(S), u = l(), d = c !== null && !c.isExpanded, f = {
134
134
  0: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft xjbqb8w x1hz01jw xtqrqnz x1778rvt xo1l8bm xvmahel xdpxx8g xkrqix3 xzro8vx x13qnu6 x9v5kkp x19rmrnh x1bqaal x1nhvcw1 x1hnptsi x15rya3k x17kqdoe x1avwmir xh8yej3 xeuugli xt970qd xksvo5r" },
135
135
  2: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft xjbqb8w x1hz01jw xtqrqnz x1778rvt xo1l8bm xvmahel xdpxx8g xkrqix3 xzro8vx x13qnu6 x9v5kkp x19rmrnh x1bqaal x1hnptsi x15rya3k x17kqdoe x1avwmir xh8yej3 xeuugli xt970qd xksvo5r xl56j7k x1l31gyv" },
136
136
  1: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft x1hz01jw xtqrqnz x1778rvt xo1l8bm xvmahel xdpxx8g xkrqix3 xzro8vx x13qnu6 x9v5kkp x19rmrnh x1bqaal x1nhvcw1 x1hnptsi x15rya3k x17kqdoe x1avwmir xh8yej3 xeuugli xt970qd xksvo5r x1r7kqkb" },
137
137
  3: { className: "x9f619 x78zum5 x6s0dn4 x1ok0vyi xbixft x1hz01jw xtqrqnz x1778rvt xo1l8bm xvmahel xdpxx8g xkrqix3 xzro8vx x13qnu6 x9v5kkp x19rmrnh x1bqaal x1hnptsi x15rya3k x17kqdoe x1avwmir xh8yej3 xeuugli xt970qd xksvo5r xl56j7k x1l31gyv x1r7kqkb" }
138
- }[!!p << 1 | !!n];
139
- return /* @__PURE__ */ f("a", {
140
- ...c,
138
+ }[!!d << 1 | !!n];
139
+ return /* @__PURE__ */ m("a", {
140
+ ...o,
141
141
  "aria-current": n ? "page" : void 0,
142
- "aria-labelledby": c["aria-labelledby"] ?? u,
143
- title: c.title ?? (typeof e == "string" ? e : void 0),
142
+ "aria-labelledby": o["aria-labelledby"] ?? u,
143
+ title: o.title ?? (typeof e == "string" ? e : void 0),
144
144
  onClick: (e) => {
145
- if (r !== void 0 && r(e), l === null || e.button !== 0) return;
145
+ if (r !== void 0 && r(e), c === null || e.button !== 0) return;
146
146
  let t = e.metaKey || e.ctrlKey, n = e.shiftKey || e.altKey;
147
- t || n || l.onNavigate();
147
+ t || n || c.onNavigate();
148
148
  },
149
- className: [m.className, i].filter(Boolean).join(" "),
149
+ className: [f.className, i].filter(Boolean).join(" "),
150
150
  style: {
151
- ...m.style,
152
- ...o
151
+ ...f.style,
152
+ ...a
153
153
  },
154
- children: [t != null && /* @__PURE__ */ d("span", {
154
+ children: [t != null && /* @__PURE__ */ p("span", {
155
155
  "aria-hidden": !0,
156
156
  className: "x3nfvp2 x6s0dn4 xl56j7k xtwnzbg x18utl2x x2lah0s",
157
157
  children: t
158
- }), /* @__PURE__ */ d("span", {
158
+ }), /* @__PURE__ */ p("span", {
159
159
  id: u,
160
160
  ...{
161
161
  0: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft" },
162
162
  1: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft x1s85apg xeod2sa" }
163
- }[!!p | 0],
163
+ }[!!d | 0],
164
164
  children: e
165
165
  })]
166
166
  });
167
167
  }
168
- function E({ children: e, grow: t = !1 }) {
169
- let n = a(y), r = n !== null && !n.isExpanded;
170
- return /* @__PURE__ */ d("span", {
168
+ function k({ children: e, grow: t = !1 }) {
169
+ let n = s(S), r = n !== null && !n.isExpanded;
170
+ return /* @__PURE__ */ p("span", {
171
171
  ...{
172
172
  0: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft" },
173
173
  2: { className: "xeuugli xb3r6kr xlyipyv xuxw1ft x78zum5 x6s0dn4 x1hnptsi x98rzlu" },
@@ -177,9 +177,9 @@ function E({ children: e, grow: t = !1 }) {
177
177
  children: e
178
178
  });
179
179
  }
180
- function D({ children: e }) {
181
- let t = a(y), n = t !== null && !t.isExpanded;
182
- return /* @__PURE__ */ d("div", {
180
+ function A({ children: e }) {
181
+ let t = s(S), n = t !== null && !t.isExpanded;
182
+ return /* @__PURE__ */ p("div", {
183
183
  ...{
184
184
  0: { className: "x9f619 x78zum5 x6s0dn4 x1hnptsi x1uxtkha x11sw1hy x178xt8z x13fuv20 xhjagg4 x153jb6y xy8obcc xas2l8k xuxw1ft" },
185
185
  1: { className: "x9f619 x78zum5 x6s0dn4 x1hnptsi x1uxtkha x178xt8z x13fuv20 xhjagg4 x153jb6y xy8obcc xas2l8k xuxw1ft xl56j7k x1l31gyv xnjsko4 xn5eaz9" }
@@ -187,33 +187,34 @@ function D({ children: e }) {
187
187
  children: e
188
188
  });
189
189
  }
190
- function O() {
191
- let t = a(y);
192
- return t === null ? null : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
190
+ function j() {
191
+ let t = s(S);
192
+ return t === null ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
193
193
  className: "x9f619 x2lah0s xrlepb6 xs1s249 x32b0ac xelkwwr x78zum5 x1ykma7f",
194
- children: /* @__PURE__ */ d(n, {
194
+ children: /* @__PURE__ */ p(i, {
195
195
  ref: t.navigationToggleRef,
196
196
  variant: "ghost",
197
197
  "aria-label": t.isExpanded ? "Collapse navigation" : "Expand navigation",
198
198
  "aria-controls": t.sidebarId,
199
199
  "aria-expanded": t.isExpanded,
200
200
  onClick: t.onToggle,
201
- xstyle: b.toggle,
202
- children: /* @__PURE__ */ d(p, {
201
+ xstyle: C.toggle,
202
+ children: /* @__PURE__ */ p(g, {
203
203
  size: 16,
204
204
  "aria-hidden": !0
205
205
  })
206
206
  })
207
- }), /* @__PURE__ */ d("div", {
207
+ }), /* @__PURE__ */ p("div", {
208
208
  className: "x9f619 x2lah0s xrlepb6 xs1s249 x32b0ac xelkwwr x1s85apg x1rhi5y4",
209
- children: /* @__PURE__ */ d(e.Trigger, {
209
+ children: /* @__PURE__ */ p(e.Trigger, {
210
+ ref: t.mobileNavigationToggleRef,
210
211
  handle: t.drawerHandle,
211
- render: /* @__PURE__ */ d(n, {
212
+ render: /* @__PURE__ */ p(i, {
212
213
  variant: "ghost",
213
214
  "aria-label": "Open navigation",
214
- xstyle: b.toggle
215
+ xstyle: C.toggle
215
216
  }),
216
- children: /* @__PURE__ */ d(p, {
217
+ children: /* @__PURE__ */ p(g, {
217
218
  size: 16,
218
219
  "aria-hidden": !0
219
220
  })
@@ -221,62 +222,63 @@ function O() {
221
222
  })] });
222
223
  }
223
224
  // packages/layout/src/app-shell.tsx
224
- var k = { drawer: {
225
+ var M = { drawer: {
225
226
  kzqmXN: "x68ju84",
226
227
  ks0D6T: "x1recik0",
227
228
  $$css: !0
228
229
  } };
229
- function A({ sidebarHeader: t, sidebar: n, footer: r, children: i }) {
230
- let [a, u] = l(!0), [p, m] = l(!1), [h] = l(() => e.createHandle()), g = s(), _ = c(null);
231
- return o(() => {
232
- let e = globalThis.matchMedia(v.sidebarDesktopQuery);
230
+ function N({ sidebarHeader: t, sidebar: n, footer: r, children: i, mainId: a = "main" }) {
231
+ let [o, s] = d(!0), [f, h] = d(!1), [g] = d(() => e.createHandle()), _ = l(), v = u(null), y = u(null);
232
+ return c(() => {
233
+ let e = globalThis.matchMedia(x.sidebarDesktopQuery);
233
234
  function t() {
234
- e.matches && m(!1);
235
+ e.matches && h(!1);
235
236
  }
236
237
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
237
- }, []), /* @__PURE__ */ f(y.Provider, {
238
+ }, []), /* @__PURE__ */ m(S.Provider, {
238
239
  value: {
239
- isExpanded: a,
240
- sidebarId: g,
241
- drawerHandle: h,
242
- navigationToggleRef: _,
243
- onToggle: () => u((e) => !e),
244
- onNavigate: () => m(!1)
240
+ isExpanded: o,
241
+ sidebarId: _,
242
+ drawerHandle: g,
243
+ navigationToggleRef: v,
244
+ mobileNavigationToggleRef: y,
245
+ onToggle: () => s((e) => !e),
246
+ onNavigate: () => h(!1)
245
247
  },
246
- children: [/* @__PURE__ */ f("div", {
248
+ children: [/* @__PURE__ */ m("div", {
247
249
  className: "x9f619 x1ov3xa9 x78zum5 xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xvmahel",
248
- children: [/* @__PURE__ */ d("aside", {
249
- id: g,
250
+ children: [/* @__PURE__ */ p("aside", {
251
+ id: _,
250
252
  "aria-label": "Navigation",
251
253
  ...{
252
254
  0: { className: "x9f619 x78zum5 x1ykma7f xdt5ytf xs1s249 x32b0ac xelkwwr xpvm0e4 x7wzq59 x13vifvy xtdtrs8 x68ju84 x2lah0s x2lwn1j xeuugli" },
253
255
  1: { className: "x9f619 x78zum5 x1ykma7f xdt5ytf xs1s249 x32b0ac xelkwwr xpvm0e4 x7wzq59 x13vifvy xtdtrs8 x2lah0s x2lwn1j xeuugli xrlepb6" }
254
- }[!a | 0],
255
- children: /* @__PURE__ */ d(x, {
256
+ }[!o | 0],
257
+ children: /* @__PURE__ */ p(w, {
256
258
  header: t,
257
259
  footer: r,
258
260
  children: n
259
261
  })
260
- }), /* @__PURE__ */ d("main", {
261
- id: "main",
262
+ }), /* @__PURE__ */ p("main", {
263
+ id: a,
262
264
  tabIndex: -1,
263
265
  className: "xeuugli x98rzlu",
264
266
  children: i
265
267
  })]
266
- }), /* @__PURE__ */ d(e.Root, {
267
- handle: h,
268
- open: p,
269
- onOpenChange: m,
270
- children: /* @__PURE__ */ f(e.Portal, { children: [/* @__PURE__ */ d(e.Backdrop, {}), /* @__PURE__ */ d(e.Viewport, { children: /* @__PURE__ */ f(e.Popup, {
271
- xstyle: k.drawer,
272
- finalFocus: () => !globalThis.matchMedia(v.sidebarDesktopQuery).matches || _.current,
273
- children: [/* @__PURE__ */ d(e.Title, {
268
+ }), /* @__PURE__ */ p(e.Root, {
269
+ handle: g,
270
+ open: f,
271
+ onOpenChange: h,
272
+ children: /* @__PURE__ */ m(e.Portal, { children: [/* @__PURE__ */ p(e.Backdrop, {}), /* @__PURE__ */ p(e.Viewport, { children: /* @__PURE__ */ m(e.Popup, {
273
+ xstyle: M.drawer,
274
+ finalFocus: () => globalThis.matchMedia(x.sidebarDesktopQuery).matches ? v.current : y.current,
275
+ children: [/* @__PURE__ */ p(e.Title, {
274
276
  visuallyHidden: !0,
275
277
  children: "Navigation"
276
- }), /* @__PURE__ */ d(x, {
278
+ }), /* @__PURE__ */ p(w, {
277
279
  header: t,
278
280
  footer: r,
279
- close: /* @__PURE__ */ d(S, {}),
281
+ close: /* @__PURE__ */ p(T, {}),
280
282
  children: n
281
283
  })]
282
284
  }) })] })
@@ -284,14 +286,14 @@ function A({ sidebarHeader: t, sidebar: n, footer: r, children: i }) {
284
286
  });
285
287
  }
286
288
  // packages/layout/src/detail-page.tsx
287
- function j({ children: e }) {
288
- return /* @__PURE__ */ d("div", {
289
+ function P({ children: e }) {
290
+ return /* @__PURE__ */ p("div", {
289
291
  className: "x9f619 x13na7z x96idz6 x9g60mw xeuugli xvueqy4 xnjsko4 x10gdey3 x14y0u4g x1foqgtu x1uwsqpk x14oio8y",
290
292
  children: e
291
293
  });
292
294
  }
293
295
  // packages/layout/src/page-toolbar.tsx
294
- var M = { action: {
296
+ var F = { action: {
295
297
  kZKoxP: "x5yr21d",
296
298
  k7Eaqz: "x167izq3",
297
299
  k8WAf4: "xt970qd",
@@ -300,80 +302,152 @@ var M = { action: {
300
302
  kOIVth: "x1hnptsi",
301
303
  $$css: !0
302
304
  } };
303
- function N({ title: e, actions: t, breadcrumb: n = !1, navigation: r = !0 }) {
304
- return /* @__PURE__ */ f("header", {
305
- className: "x9f619 x78zum5 x12h1iku x14ut1dr x1qjc9v5 xcn9na3 xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x12myhf4 x1778rvt xvmahel xeuugli",
305
+ function I({ title: e, actions: t, breadcrumb: n = !1, navigation: r = !0 }) {
306
+ return /* @__PURE__ */ m("div", {
307
+ className: "x9f619 x78zum5 x12h1iku x14ut1dr x1qjc9v5 xcn9na3 x2lah0s xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x12myhf4 x1778rvt xvmahel xeuugli",
306
308
  children: [
307
- r && /* @__PURE__ */ d(O, {}),
308
- /* @__PURE__ */ d(n ? "nav" : "h1", {
309
+ r && /* @__PURE__ */ p(j, {}),
310
+ /* @__PURE__ */ p(n ? "nav" : "h1", {
311
+ tabIndex: n ? void 0 : -1,
309
312
  "aria-label": n ? "Breadcrumb" : void 0,
310
313
  className: "x78zum5 x6s0dn4 x1hnptsi x1m92p3w xeuugli xs83m0k x1ghz6dp x1qlqyl8 xo1l8bm",
311
- children: /* @__PURE__ */ d("span", {
314
+ children: /* @__PURE__ */ p("span", {
312
315
  className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
313
316
  children: e
314
317
  })
315
318
  }),
316
- t != null && /* @__PURE__ */ d("div", {
319
+ t != null && /* @__PURE__ */ p("div", {
317
320
  className: "x78zum5 x1qjc9v5 xeuugli x2lah0s x8x9d4c",
318
321
  children: t
319
322
  })
320
323
  ]
321
324
  });
322
325
  }
323
- function P({ icon: e, children: n, ...r }) {
326
+ function L({ icon: e, children: t, ...n }) {
324
327
  let i = e != null;
325
- return /* @__PURE__ */ d("div", {
328
+ return /* @__PURE__ */ p("div", {
326
329
  className: "x9f619 x78zum5 x1qjc9v5 xeuugli xe0pwq x19ypqd9 x1l3ounx",
327
- children: /* @__PURE__ */ f(t, {
328
- ...r,
330
+ children: /* @__PURE__ */ m(r, {
331
+ ...n,
329
332
  variant: "ghost",
330
333
  size: "md",
331
- "aria-label": r["aria-label"] ?? (typeof n == "string" ? n : void 0),
332
- xstyle: M.action,
333
- children: [e, i ? /* @__PURE__ */ d("span", {
334
+ "aria-label": n["aria-label"] ?? (typeof t == "string" ? t : void 0),
335
+ xstyle: F.action,
336
+ children: [e, i ? /* @__PURE__ */ p("span", {
334
337
  className: "xeuugli xb3r6kr xlyipyv xuxw1ft xt0psk2 xlllsrz",
335
- children: n
336
- }) : n]
338
+ children: t
339
+ }) : t]
340
+ })
341
+ });
342
+ }
343
+ // packages/layout/src/record-page.tsx
344
+ function R({ children: e }) {
345
+ return /* @__PURE__ */ p("div", {
346
+ className: "x78zum5 xdt5ytf xeuugli xbixft x1hz01jw xtqrqnz x1778rvt xvmahel",
347
+ children: e
348
+ });
349
+ }
350
+ function z({ backLabel: e, backHref: t, onBack: n, actions: r, navigation: i = !0 }) {
351
+ return /* @__PURE__ */ p(I, {
352
+ breadcrumb: !0,
353
+ navigation: i,
354
+ actions: r,
355
+ title: /* @__PURE__ */ m("a", {
356
+ href: t,
357
+ className: "x3nfvp2 x6s0dn4 x1hnptsi xid9utz xbixft xkrqix3 x9p3ypd x13qnu6 x9v5kkp x19rmrnh x1bqaal",
358
+ onClick: (e) => {
359
+ if (n === void 0 || e.defaultPrevented || e.button !== 0) return;
360
+ let t = e.metaKey || e.ctrlKey, r = e.shiftKey || e.altKey;
361
+ t || r || (e.preventDefault(), n());
362
+ },
363
+ children: [/* @__PURE__ */ p(h, {
364
+ size: 16,
365
+ "aria-hidden": !0
366
+ }), e]
337
367
  })
338
368
  });
339
369
  }
370
+ function B({ children: e }) {
371
+ return /* @__PURE__ */ p(P, { children: /* @__PURE__ */ p("div", {
372
+ className: "x78zum5 x1a02dak x1cy8zhl x1m6b44x xeuugli",
373
+ children: e
374
+ }) });
375
+ }
376
+ function V({ children: e }) {
377
+ return /* @__PURE__ */ p("div", {
378
+ className: "x78zum5 xdt5ytf x1ewej1i x1iyjqo2 x1j825kq xeuugli",
379
+ children: e
380
+ });
381
+ }
382
+ function H({ title: e, description: r, icon: i, titleRef: a }) {
383
+ return /* @__PURE__ */ m("header", {
384
+ className: "xrvj5dj x1n8ia3y xeuugli",
385
+ children: [/* @__PURE__ */ m("div", {
386
+ className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli",
387
+ children: [i != null && /* @__PURE__ */ p("span", {
388
+ "aria-hidden": !0,
389
+ className: "x3nfvp2 x6s0dn4 x2lah0s",
390
+ children: i
391
+ }), /* @__PURE__ */ p(n, {
392
+ ref: a,
393
+ tabIndex: -1,
394
+ children: e
395
+ })]
396
+ }), r != null && /* @__PURE__ */ p(t, { children: r })]
397
+ });
398
+ }
399
+ function U({ children: e, label: t = "Properties" }) {
400
+ return /* @__PURE__ */ p("aside", {
401
+ "aria-label": t,
402
+ className: "x78zum5 xdt5ytf x1irul0l x1iyjqo2 x1j825kq xeuugli",
403
+ children: e
404
+ });
405
+ }
406
+ var W = {
407
+ Root: R,
408
+ Toolbar: z,
409
+ Body: B,
410
+ Content: V,
411
+ Header: H,
412
+ Aside: U
413
+ };
340
414
  // packages/layout/src/resizable.tsx
341
- function F({ orientation: e = "horizontal", initialSizes: t, onSizesChange: n, disabled: i, ref: a, ...o }) {
342
- return /* @__PURE__ */ d(h, {
415
+ function G({ orientation: e = "horizontal", initialSizes: t, onSizesChange: n, disabled: r, ref: i, ...o }) {
416
+ return /* @__PURE__ */ p(v, {
343
417
  orientation: e,
344
418
  defaultLayout: t,
345
419
  onLayoutChanged: (e, t) => {
346
420
  t.isUserInteraction && n?.(e);
347
421
  },
348
- disabled: i,
349
- elementRef: a,
422
+ disabled: r,
423
+ elementRef: i,
350
424
  resizeTargetMinimumSize: {
351
425
  coarse: 44,
352
426
  fine: 12
353
427
  },
354
- ...r({ className: "xeuugli x2lwn1j xh8yej3 x5yr21d" }, o)
428
+ ...a({ className: "xeuugli x2lwn1j xh8yej3 x5yr21d" }, o)
355
429
  });
356
430
  }
357
- function I({ id: e, initialSizePercent: t, minimumSizePercent: n = 10, maximumSizePercent: i = 100, collapsible: a = !1, ref: o, ...s }) {
358
- return /* @__PURE__ */ d(g, {
431
+ function K({ id: e, initialSizePercent: t, minimumSizePercent: n = 10, maximumSizePercent: r = 100, collapsible: i = !1, ref: o, ...s }) {
432
+ return /* @__PURE__ */ p(y, {
359
433
  id: e,
360
434
  defaultSize: t === void 0 ? void 0 : `${t}%`,
361
435
  minSize: `${n}%`,
362
- maxSize: `${i}%`,
363
- collapsible: a,
436
+ maxSize: `${r}%`,
437
+ collapsible: i,
364
438
  elementRef: o,
365
- ...r({ className: "xeuugli x2lwn1j xysyzu8" }, s)
439
+ ...a({ className: "xeuugli x2lwn1j xysyzu8" }, s)
366
440
  });
367
441
  }
368
- function L({ ref: e, ...t }) {
369
- return /* @__PURE__ */ d(_, {
442
+ function q({ ref: e, ...t }) {
443
+ return /* @__PURE__ */ p(b, {
370
444
  elementRef: e,
371
- ...r({ className: "x1fa40ue x1i1rx1s xgc0pbm xir5lan xfaai28 x1rbdpqn x8wp5i9 x13qnu6 x9v5kkp x19rmrnh x13iak60" }, t)
445
+ ...a({ className: "x1fa40ue x1i1rx1s xgc0pbm xir5lan xfaai28 x1rbdpqn x8wp5i9 x13qnu6 x9v5kkp x19rmrnh x13iak60" }, t)
372
446
  });
373
447
  }
374
- var R = {
375
- Root: F,
376
- Pane: I,
377
- Handle: L
448
+ var J = {
449
+ Root: G,
450
+ Pane: K,
451
+ Handle: q
378
452
  };
379
- export { A as AppShell, j as DetailPage, C as Navigation, w as NavigationItem, T as NavigationLink, N as PageToolbar, R as Resizable, D as SidebarFooter, E as SidebarLabel, P as ToolbarAction };
453
+ export { N as AppShell, P as DetailPage, E as Navigation, D as NavigationItem, O as NavigationLink, I as PageToolbar, W as RecordPage, J as Resizable, A as SidebarFooter, k as SidebarLabel, L as ToolbarAction };
@@ -1,4 +1,4 @@
1
- import { c as e } from "../src-CvpS9XIR.js";
1
+ import { l as e } from "../src-CjnbzSgq.js";
2
2
  import { s as t } from "../src-CfDf8TY8.js";
3
3
  import { n } from "../navigation-yxK3iQXo.js";
4
4
  import "@stylexjs/stylex";
@@ -4,12 +4,37 @@ import { mergeProps as r } from "@base-ui/react/merge-props";
4
4
  import "@stylexjs/stylex";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
6
  import { Tabs as a } from "@base-ui/react/tabs";
7
+ // packages/navigation/src/page-navigation.tsx
8
+ function o({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections", embedded: a = !1 }) {
9
+ return /* @__PURE__ */ i("nav", {
10
+ "aria-label": r,
11
+ tabIndex: 0,
12
+ ...{
13
+ 0: { className: "x78zum5 x1j825kq xeuugli xw2csxc xso031l x1q0q8m5 x1qndepd x1hz01jw x12myhf4 x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal" },
14
+ 1: { className: "x78zum5 x1j825kq xeuugli xw2csxc x1q0q8m5 x1qndepd x1hz01jw x12myhf4 x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal x1qhh985" }
15
+ }[!!a | 0],
16
+ children: e.map((e) => /* @__PURE__ */ i("a", {
17
+ href: e.href,
18
+ "aria-current": e.id === t ? "page" : void 0,
19
+ ...{
20
+ 0: { className: "x9f619 x3nfvp2 x6s0dn4 x2lah0s xid9utz xn9t2bk xlxy82 x1q0q8m5 x16stqrj xkrqix3 xuxw1ft x153jb6y x1mkgjtd x13qnu6 x9v5kkp x19rmrnh x1bqaal" },
21
+ 1: { className: "x9f619 x3nfvp2 x6s0dn4 x2lah0s xid9utz xn9t2bk xlxy82 x1q0q8m5 xkrqix3 xuxw1ft x1mkgjtd x13qnu6 x9v5kkp x19rmrnh x1bqaal xbixft xdjqune" }
22
+ }[e.id === t | 0],
23
+ onClick: (t) => {
24
+ if (n === void 0 || t.defaultPrevented || t.button !== 0) return;
25
+ let r = t.metaKey || t.ctrlKey, i = t.shiftKey || t.altKey;
26
+ r || i || (t.preventDefault(), n(e.id));
27
+ },
28
+ children: e.label
29
+ }, e.id))
30
+ });
31
+ }
7
32
  // packages/navigation/src/skip-link.tsx
8
- function o(e) {
33
+ function s(e) {
9
34
  return /* @__PURE__ */ i("a", { ...r({ className: "xixxii4 x1ridm32 x12hha37 xkwijxb x174j0rr x1mvvolr x9f619 xvv7f4i x1ok0vyi xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
10
35
  }
11
36
  // packages/navigation/src/tabs.tsx
12
- function s({ className: e, style: t, ...r }) {
37
+ function c({ className: e, style: t, ...r }) {
13
38
  return /* @__PURE__ */ i(a.Root, {
14
39
  ...r,
15
40
  ...n({
@@ -19,7 +44,7 @@ function s({ className: e, style: t, ...r }) {
19
44
  })
20
45
  });
21
46
  }
22
- function c({ className: e, style: t, ...r }) {
47
+ function l({ className: e, style: t, ...r }) {
23
48
  return /* @__PURE__ */ i(a.List, {
24
49
  ...r,
25
50
  ...n({
@@ -29,7 +54,7 @@ function c({ className: e, style: t, ...r }) {
29
54
  })
30
55
  });
31
56
  }
32
- function l({ className: e, style: t, ...r }) {
57
+ function u({ className: e, style: t, ...r }) {
33
58
  return /* @__PURE__ */ i(a.Tab, {
34
59
  ...r,
35
60
  ...n({
@@ -39,7 +64,7 @@ function l({ className: e, style: t, ...r }) {
39
64
  })
40
65
  });
41
66
  }
42
- function u({ className: e, style: t, ...r }) {
67
+ function d({ className: e, style: t, ...r }) {
43
68
  return /* @__PURE__ */ i(a.Panel, {
44
69
  ...r,
45
70
  ...n({
@@ -49,10 +74,10 @@ function u({ className: e, style: t, ...r }) {
49
74
  })
50
75
  });
51
76
  }
52
- var d = {
53
- Root: s,
54
- List: c,
55
- Tab: l,
56
- Panel: u
77
+ var f = {
78
+ Root: c,
79
+ List: l,
80
+ Tab: u,
81
+ Panel: d
57
82
  };
58
- export { t as Breadcrumb, e as Kbd, o as SkipLink, d as Tabs };
83
+ export { t as Breadcrumb, e as Kbd, o as PageNavigation, s as SkipLink, f as Tabs };
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CollectionEndProps = {
3
+ readonly status: 'ready' | 'error';
4
+ readonly onLoadMore: () => void;
5
+ readonly message?: string;
6
+ } | {
7
+ readonly status: 'loading' | 'complete';
8
+ readonly onLoadMore?: never;
9
+ readonly message?: string;
10
+ };
11
+ export declare function CollectionEnd(props: CollectionEndProps): ReactNode;
12
+ export type CollectionScrollProps = {
13
+ readonly children: ReactNode;
14
+ readonly endContent?: ReactNode;
15
+ readonly onEndReached?: (() => void) | undefined;
16
+ readonly fill?: boolean;
17
+ readonly endPosition?: 'start' | 'end';
18
+ };
19
+ export declare function CollectionScroll({ children, endContent, onEndReached, fill, endPosition, }: CollectionScrollProps): ReactNode;