@mechane-ai/elements 0.40.0 → 0.42.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 (68) hide show
  1. package/README.md +41 -10
  2. package/bin/catalog.d.mts +17 -0
  3. package/bin/mechane-elements-catalog.mjs +60 -0
  4. package/dist/agent.js +1 -1
  5. package/dist/ai.js +23 -23
  6. package/dist/catalog.json +1896 -0
  7. package/dist/{categorical-values-DnGR_pQx.js → categorical-values-B6lGI7BH.js} +3 -3
  8. package/dist/{chart-frame-BsyI1Zc8.js → chart-frame-D0enjyj9.js} +1 -1
  9. package/dist/{chart-input-r4S3-QCT.js → chart-input-D4_Awave.js} +2 -2
  10. package/dist/{chart-navigation-D7OkLdSx.js → chart-navigation-D4-pdgpj.js} +12 -1
  11. package/dist/charts/cartesian.js +263 -243
  12. package/dist/charts/distribution.js +4 -4
  13. package/dist/charts/graph.js +4 -4
  14. package/dist/charts/hierarchy.js +4 -4
  15. package/dist/charts/matrix.js +4 -4
  16. package/dist/charts/timeline.js +3 -3
  17. package/dist/charts.js +2 -2
  18. package/dist/{code-block-C4K1sM9O.js → code-block-Cpfr7B6a.js} +1 -1
  19. package/dist/collections.js +475 -354
  20. package/dist/content/code.js +1 -1
  21. package/dist/content/diff.js +3 -3
  22. package/dist/content/link.js +1 -1
  23. package/dist/content/markdown.js +2 -2
  24. package/dist/content/tree.js +2 -2
  25. package/dist/{content-link-CBDqSvgP.js → content-link-CGeFFb9F.js} +1 -1
  26. package/dist/content.js +1 -1
  27. package/dist/feedback.js +1 -1
  28. package/dist/forms/dates.js +89 -12
  29. package/dist/{forms-I-WMHTkr.js → forms-DeU0Tiv3.js} +6 -2
  30. package/dist/forms.js +3 -3
  31. package/dist/index.js +1 -1
  32. package/dist/layout.js +275 -249
  33. package/dist/mechane-elements-catalog.mjs +4 -0
  34. package/dist/navigation.js +2 -2
  35. package/dist/packages/charts/src/chart-inspection.d.ts +1 -0
  36. package/dist/packages/charts/src/chart-navigation.d.ts +2 -0
  37. package/dist/packages/charts/src/chart-surface.d.ts +2 -0
  38. package/dist/packages/collections/src/collection-controls.d.ts +2 -1
  39. package/dist/packages/collections/src/data-table.d.ts +12 -8
  40. package/dist/packages/collections/src/index.d.ts +1 -0
  41. package/dist/packages/collections/src/table-results.d.ts +26 -0
  42. package/dist/packages/core/src/actions.d.ts +6 -0
  43. package/dist/packages/core/src/index.d.ts +1 -1
  44. package/dist/packages/forms/src/dates/event-month.d.ts +17 -0
  45. package/dist/packages/forms/src/dates/index.d.ts +2 -0
  46. package/dist/packages/forms/src/form-status.d.ts +7 -0
  47. package/dist/packages/forms/src/forms.d.ts +3 -1
  48. package/dist/packages/forms/src/index.d.ts +2 -0
  49. package/dist/packages/foundations/src/agent/index.d.ts +2 -2
  50. package/dist/packages/layout/src/page-context.d.ts +4 -0
  51. package/dist/packages/navigation/src/index.d.ts +1 -0
  52. package/dist/packages/navigation/src/route-link.d.ts +2 -0
  53. package/dist/{pierre-diff-DJ3oOfPX.js → pierre-diff-B3tD3-6z.js} +1 -1
  54. package/dist/{src-D2OHco8V.js → src-Bk7M67zy.js} +3 -3
  55. package/dist/{src-DfOAlAd2.js → src-BpvnBWrF.js} +1 -1
  56. package/dist/{src-CQQvXi7a.js → src-DBNncL7_.js} +70 -50
  57. package/dist/{src-s3tWwnN4.js → src-DcW_gMX8.js} +178 -168
  58. package/dist/{src-CNV1ewzb.js → src-gqEebHEa.js} +319 -285
  59. package/dist/styles2.css +18 -0
  60. package/package.json +9 -2
  61. package/recipes/consequential-form.tsx +132 -0
  62. package/recipes/searchable-collection.tsx +106 -0
  63. package/recipes/sectioned-report.tsx +58 -0
  64. package/recipes/tabbed-workspace.tsx +84 -0
  65. package/skills/extend-elements/SKILL.md +28 -0
  66. package/skills/use-elements/SKILL.md +36 -0
  67. package/skills/{elements-presentation/SKILL.md → use-elements/references/reports.md} +0 -6
  68. package/skills/{elements-workspace/SKILL.md → use-elements/references/workspace.md} +3 -6
@@ -1 +1 @@
1
- export { t as CodeBlock } from "../code-block-C4K1sM9O.js";
1
+ export { t as CodeBlock } from "../code-block-Cpfr7B6a.js";
@@ -1,5 +1,5 @@
1
- import { D as e, _ as t, v as n } from "../src-s3tWwnN4.js";
2
- import { t as r } from "../code-block-C4K1sM9O.js";
1
+ import { O as e, _ as t, v as n } from "../src-DcW_gMX8.js";
2
+ import { t as r } from "../code-block-Cpfr7B6a.js";
3
3
  import { t as i } from "../viewer-styles-DsFYri4K.js";
4
4
  import * as a from "@stylexjs/stylex";
5
5
  import { useEffect as o, useState as s } from "react";
@@ -44,7 +44,7 @@ function m(t) {
44
44
  let e = !0;
45
45
  async function t() {
46
46
  if (!A) try {
47
- let t = await import("../pierre-diff-DJ3oOfPX.js"), n = t.prepareDiff(x);
47
+ let t = await import("../pierre-diff-B3tD3-6z.js"), n = t.prepareDiff(x);
48
48
  e && w({
49
49
  source: x,
50
50
  Component: t.PierreDiff,
@@ -1 +1 @@
1
- export { t as ContentLink } from "../content-link-CBDqSvgP.js";
1
+ export { t as ContentLink } from "../content-link-CGeFFb9F.js";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../use-scroll-tab-index-Dxpdh4W7.js";
2
2
  import { t } from "../visible-motion-1GcUaEi4.js";
3
- import { t as n } from "../code-block-C4K1sM9O.js";
4
- import { n as r, t as i } from "../content-link-CBDqSvgP.js";
3
+ import { t as n } from "../code-block-Cpfr7B6a.js";
4
+ import { n as r, t as i } from "../content-link-CGeFFb9F.js";
5
5
  import { t as a } from "../viewer-styles-DsFYri4K.js";
6
6
  import * as o from "@stylexjs/stylex";
7
7
  import { Children as s, createContext as c, createElement as l, memo as u, useContext as d } from "react";
@@ -1,5 +1,5 @@
1
- import { c as e } from "../src-s3tWwnN4.js";
2
- import { n as t } from "../forms-I-WMHTkr.js";
1
+ import { c as e } from "../src-DcW_gMX8.js";
2
+ import { n as t } from "../forms-DeU0Tiv3.js";
3
3
  import { t as n } from "../constants.stylex-BILvnwUk.js";
4
4
  import { u as r } from "../tokens.stylex-dF5CACEJ.js";
5
5
  import { t as i } from "../viewer-styles-DsFYri4K.js";
@@ -1,4 +1,4 @@
1
- import { O as e } from "./src-s3tWwnN4.js";
1
+ import { k as e } from "./src-DcW_gMX8.js";
2
2
  import "@stylexjs/stylex";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  // packages/content/src/content-link.tsx
package/dist/content.js CHANGED
@@ -1 +1 @@
1
- export { o as JsonViewer, a as LogViewer, r as MediaViewer, i as MediaViewerPlaceholder, n as StackTrace, t as Trace } from "./src-D2OHco8V.js";
1
+ export { o as JsonViewer, a as LogViewer, r as MediaViewer, i as MediaViewerPlaceholder, n as StackTrace, t as Trace } from "./src-Bk7M67zy.js";
package/dist/feedback.js CHANGED
@@ -1 +1 @@
1
- export { t as AsyncRegion, l as ButtonPlaceholder, n as ContentReveal, m as EmptyState, u as FieldPlaceholder, r as LoadingScope, o as Meter, h as Notice, s as Progress, d as Skeleton, f as SkeletonText, p as Spinner, i as Toaster, a as toast } from "./src-DfOAlAd2.js";
1
+ export { t as AsyncRegion, l as ButtonPlaceholder, n as ContentReveal, m as EmptyState, u as FieldPlaceholder, r as LoadingScope, o as Meter, h as Notice, s as Progress, d as Skeleton, f as SkeletonText, p as Spinner, i as Toaster, a as toast } from "./src-BpvnBWrF.js";
@@ -1,5 +1,5 @@
1
- import { n as e, t } from "../forms-I-WMHTkr.js";
2
- import { D as n, T as r, w as i } from "../src-s3tWwnN4.js";
1
+ import { n as e, t } from "../forms-DeU0Tiv3.js";
2
+ import { E as n, O as r, w as i } from "../src-DcW_gMX8.js";
3
3
  import { r as a } from "../src-na2DdkKI.js";
4
4
  import * as o from "@stylexjs/stylex";
5
5
  import { useEffect as s, useId as c, useLayoutEffect as l, useRef as u, useState as d } from "react";
@@ -292,10 +292,10 @@ function z({ children: e }) {
292
292
  });
293
293
  }
294
294
  // packages/forms/src/dates/picker-popover.tsx
295
- function B({ label: e, value: t, onValueChange: r, formatValue: o, validateValue: s, presets: l = [], density: u = "standard", disabled: f, isClearable: g = !0, timeZone: _, children: v }) {
295
+ function B({ label: e, value: t, onValueChange: n, formatValue: o, validateValue: s, presets: l = [], density: u = "standard", disabled: f, isClearable: g = !0, timeZone: _, children: v }) {
296
296
  let [y, b] = d(!1), [x, S] = d(t), C = c(), w = x === void 0 ? void 0 : s(x);
297
297
  function T(e) {
298
- r(e), b(!1);
298
+ n(e), b(!1);
299
299
  }
300
300
  return /* @__PURE__ */ m(a.Root, {
301
301
  open: y,
@@ -348,7 +348,7 @@ function B({ label: e, value: t, onValueChange: r, formatValue: o, validateValue
348
348
  }), /* @__PURE__ */ m("div", {
349
349
  className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi",
350
350
  children: [
351
- g && /* @__PURE__ */ p(n, {
351
+ g && /* @__PURE__ */ p(r, {
352
352
  disabled: t === void 0,
353
353
  onClick: () => T(void 0),
354
354
  children: "Clear"
@@ -484,7 +484,7 @@ function W(e, t, n) {
484
484
  };
485
485
  return t !== void 0 && S(r) < S(t) ? t : n !== void 0 && S(r) > S(n) ? n : r;
486
486
  }
487
- function G({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMonth: c, minimum: l, maximum: f }) {
487
+ function G({ label: e, selection: t, onSelect: r, locale: a, today: o, initialMonth: c, minimum: l, maximum: f }) {
488
488
  let h = W(c, l, f), [v, y] = d(h.year), [b, x] = d(h), C = u(/* @__PURE__ */ new Map()), w = u(!1);
489
489
  s(() => {
490
490
  w.current && (w.current = !1, C.current.get(b.month)?.focus());
@@ -518,7 +518,7 @@ function G({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMo
518
518
  children: [/* @__PURE__ */ m("div", {
519
519
  className: "x78zum5 x6s0dn4 x1qughib x1hnptsi",
520
520
  children: [
521
- /* @__PURE__ */ p(r, {
521
+ /* @__PURE__ */ p(n, {
522
522
  "aria-label": "Previous year",
523
523
  disabled: v <= (l?.year ?? 1),
524
524
  onClick: () => E(v - 1),
@@ -529,7 +529,7 @@ function G({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMo
529
529
  className: "xk4h15q xss6m8b",
530
530
  children: v
531
531
  }),
532
- /* @__PURE__ */ p(r, {
532
+ /* @__PURE__ */ p(n, {
533
533
  "aria-label": "Next year",
534
534
  disabled: v >= (f?.year ?? 9999),
535
535
  onClick: () => E(v + 1),
@@ -540,10 +540,10 @@ function G({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMo
540
540
  role: "group",
541
541
  "aria-label": e,
542
542
  className: "xrvj5dj x185a7wo xunmzkg",
543
- children: Array.from({ length: 12 }, (e, r) => {
543
+ children: Array.from({ length: 12 }, (e, n) => {
544
544
  let s = {
545
545
  year: v,
546
- month: r + 1
546
+ month: n + 1
547
547
  }, c = S(s), u = t === void 0 ? void 0 : S(t.from), d = t?.to === void 0 ? void 0 : S(t.to), m = c === u || c === d, h = u !== void 0 && d !== void 0 && c > u && c < d, g = l !== void 0 && c < S(l), _ = f !== void 0 && c > S(f), y = g || _;
548
548
  return /* @__PURE__ */ p(i, {
549
549
  variant: m || h ? "solid" : "ghost",
@@ -557,7 +557,7 @@ function G({ label: e, selection: t, onSelect: n, locale: a, today: o, initialMo
557
557
  },
558
558
  onFocus: () => x(s),
559
559
  onKeyDown: (e) => T(e, s),
560
- onClick: () => n(s),
560
+ onClick: () => r(s),
561
561
  xstyle: U.month,
562
562
  children: new Intl.DateTimeFormat(a, {
563
563
  month: "short",
@@ -670,4 +670,81 @@ function q({ label: e, value: t, onValueChange: n, formatValue: r, presets: i, v
670
670
  })] })
671
671
  });
672
672
  }
673
- export { F as Calendar, V as DatePicker, H as DateRangePicker, K as MonthPicker, q as MonthRangePicker, D as addCalendarDays, O as addCalendarMonths, T as parseCalendarDate, E as parseCalendarMonth, C as serializeCalendarDate, w as serializeCalendarMonth };
673
+ // packages/forms/src/dates/event-month.tsx
674
+ var J = 2;
675
+ function Y({ label: e, locale: t, timeZone: n, today: r, selected: i, weekStartsOn: a = 1, itemsByDate: o, onSelect: s }) {
676
+ let c = C(i), l = C(r);
677
+ function u(e) {
678
+ let t = T(e);
679
+ t !== void 0 && s(t);
680
+ }
681
+ return /* @__PURE__ */ p(v.Calendar, {
682
+ "aria-label": e,
683
+ mode: "single",
684
+ locale: t,
685
+ timeZone: n,
686
+ today: l,
687
+ month: w(i),
688
+ value: c,
689
+ weekStartsOn: a,
690
+ weekdayFormat: "short",
691
+ showOutsideDays: !0,
692
+ onValueChange: (e) => {
693
+ typeof e == "string" && u(e);
694
+ },
695
+ onFocusedChange: (e, t) => {
696
+ t.reason === "list-navigation" && u(e);
697
+ },
698
+ children: /* @__PURE__ */ m(v.CalendarGrid, {
699
+ className: "xh8yej3 x140o2bo x1mwwwfo x1y0btm7 xmkeg23 x1ey3b81 xpvm0e4 xbixft",
700
+ children: [/* @__PURE__ */ p(v.CalendarWeekdays, { children: (e) => /* @__PURE__ */ p(v.CalendarWeekday, {
701
+ index: e,
702
+ className: "xn9t2bk x14w6jbu x153jb6y x2b8uid xy8obcc xk4h15q"
703
+ }) }), /* @__PURE__ */ p(v.CalendarWeeks, { children: (e) => {
704
+ let n = T(e.date);
705
+ if (n === void 0) return null;
706
+ let r = o.get(e.date) ?? [], a = r.length - J, s = r.slice(0, J), u = [
707
+ k(n, t),
708
+ ...s.map((e) => e.label),
709
+ a > 0 && `+${a} more`
710
+ ].filter(Boolean).join(", ");
711
+ return /* @__PURE__ */ p(v.CalendarDay, {
712
+ value: e.date,
713
+ "aria-label": u,
714
+ ...{
715
+ 0: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk xpvm0e4 xif5pkx x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2" },
716
+ 2: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x153jb6y x1r7kqkb" },
717
+ 1: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x1r8u7ye" },
718
+ 3: { className: "x1y0btm7 xmkeg23 x1ey3b81 x16dsc37 x1ypdohk x1t137rt x9v5kkp x12ei19c xx9gdjd x2ssjo2 x153jb6y x1r8u7ye" }
719
+ }[(n.month !== i.month) << 1 | e.date === c],
720
+ children: /* @__PURE__ */ m("div", {
721
+ className: "xrvj5dj x10ukxgv xunmzkg xefclja x13wpdut x1s01oa9",
722
+ "aria-hidden": "true",
723
+ children: [
724
+ /* @__PURE__ */ p("span", {
725
+ ...{
726
+ 0: { className: "x1lqcxt8 x14w6jbu xy8obcc x1ok0vyi" },
727
+ 1: { className: "x1lqcxt8 x14w6jbu xy8obcc x1ok0vyi x7ixh4y x1r8u7ye xtjd4bd" }
728
+ }[e.date === l | 0],
729
+ children: n.day
730
+ }),
731
+ s.map((e) => /* @__PURE__ */ p("span", {
732
+ className: "x1lliihq xb3r6kr xlyipyv xuxw1ft x14w6jbu xy8obcc x1r7kqkb x1ok0vyi",
733
+ children: e.label
734
+ }, e.id)),
735
+ a > 0 && /* @__PURE__ */ m("span", {
736
+ className: "xy8obcc x153jb6y xuxw1ft xb3r6kr",
737
+ children: [
738
+ "+",
739
+ a,
740
+ " more"
741
+ ]
742
+ })
743
+ ]
744
+ })
745
+ });
746
+ } })]
747
+ })
748
+ });
749
+ }
750
+ export { F as Calendar, V as DatePicker, H as DateRangePicker, Y as EventMonth, K as MonthPicker, q as MonthRangePicker, D as addCalendarDays, O as addCalendarMonths, T as parseCalendarDate, E as parseCalendarMonth, C as serializeCalendarDate, w as serializeCalendarMonth };
@@ -31,9 +31,13 @@ var p = {
31
31
  plain: n.plainTextarea
32
32
  };
33
33
  // packages/forms/src/forms.tsx
34
- function h({ className: e, style: t, xstyle: s, ...c }) {
34
+ function h({ className: e, style: t, xstyle: s, isSensitive: c = !1, ...l }) {
35
35
  return /* @__PURE__ */ a(o, {
36
- ...c,
36
+ ...l,
37
+ ...c && {
38
+ "data-agent-hidden": "",
39
+ "data-agent-secret": ""
40
+ },
37
41
  ...r({
38
42
  className: e,
39
43
  style: t,
package/dist/forms.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./src-CNV1ewzb.js";
2
- import { i as g, n as _, t as v } from "./forms-I-WMHTkr.js";
3
- export { a as AgentAvatarPicker, f as Checkbox, i as Combobox, v as Field, h as Fieldset, n as FilePicker, s as FormActions, _ as Input, r as InputGroup, d as NumberField, o as RadioGroup, t as Select, p as SelectControl, l as SettingsRow, m as SettingsSection, c as Slider, e as Switch, g as Textarea, u as ToggleGroup };
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./src-gqEebHEa.js";
2
+ import { i as _, n as v, t as y } from "./forms-DeU0Tiv3.js";
3
+ export { a as AgentAvatarPicker, p as Checkbox, e as Combobox, y as Field, r as Fieldset, i as FilePicker, g as FormActions, c as FormStatus, v as Input, f as InputGroup, l as NumberField, s as RadioGroup, n as Select, m as SelectControl, u as SettingsRow, h as SettingsSection, o as Slider, t as Switch, _ as Textarea, d as ToggleGroup };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { g as Accordion, y as AgentAvatar, C as Avatar, t as Badge, w as Button, _ as Collapsible, u as Columns, v as CopyValue, d as Divider, n as Heading, T as IconButton, E as IconLink, r as Identifier, i as Muted, f as Panel, a as Prose, p as Row, l as SectionHeading, m as Stack, o as Status, s as Subheading, h as SurfaceLink, c as Text, D as TextButton, O as TextLink, b as agentAppearance, x as agentAvatarColors, S as agentAvatarShapes } from "./src-s3tWwnN4.js";
1
+ export { g as Accordion, y as AgentAvatar, C as Avatar, t as Badge, w as Button, _ as Collapsible, u as Columns, T as ConfirmButton, v as CopyValue, d as Divider, n as Heading, E as IconButton, D as IconLink, r as Identifier, i as Muted, f as Panel, a as Prose, p as Row, l as SectionHeading, m as Stack, o as Status, s as Subheading, h as SurfaceLink, c as Text, O as TextButton, k as TextLink, b as agentAppearance, x as agentAvatarColors, S as agentAvatarShapes } from "./src-DcW_gMX8.js";