@mechane-ai/elements 0.41.0 → 0.43.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 (92) hide show
  1. package/README.md +72 -41
  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 +1984 -0
  7. package/dist/{categorical-values-DnGR_pQx.js → categorical-values-DzhbfZ5w.js} +3 -3
  8. package/dist/{chart-frame-BsyI1Zc8.js → chart-frame-9dQQNF3F.js} +74 -22
  9. package/dist/{chart-input-r4S3-QCT.js → chart-input-DT0STflx.js} +2 -2
  10. package/dist/{chart-navigation-D7OkLdSx.js → chart-navigation-BAbb5PV9.js} +67 -32
  11. package/dist/charts/cartesian.js +1728 -559
  12. package/dist/charts/distribution.js +5 -5
  13. package/dist/charts/graph.js +443 -76
  14. package/dist/charts/hierarchy.js +5 -5
  15. package/dist/charts/matrix.js +232 -63
  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 +11 -11
  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/label-spacing-BncjePGb.js +6 -0
  33. package/dist/layout.js +275 -249
  34. package/dist/mechane-elements-catalog.mjs +4 -0
  35. package/dist/navigation.js +2 -2
  36. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +15 -3
  37. package/dist/packages/charts/src/cartesian/bar-data.d.ts +43 -0
  38. package/dist/packages/charts/src/cartesian/bar-overlays.d.ts +32 -0
  39. package/dist/packages/charts/src/cartesian/bridge-chart.d.ts +29 -0
  40. package/dist/packages/charts/src/cartesian/bridge-data.d.ts +40 -0
  41. package/dist/packages/charts/src/cartesian/index.d.ts +7 -2
  42. package/dist/packages/charts/src/cartesian/reference-lines.d.ts +34 -0
  43. package/dist/packages/charts/src/cartesian/sparkline.d.ts +10 -1
  44. package/dist/packages/charts/src/cartesian/time-series-bands.d.ts +66 -0
  45. package/dist/packages/charts/src/cartesian/time-series-data.d.ts +11 -1
  46. package/dist/packages/charts/src/cartesian/time-series-overlays.d.ts +35 -0
  47. package/dist/packages/charts/src/cartesian/time-series.d.ts +6 -1
  48. package/dist/packages/charts/src/chart-inspection.d.ts +4 -1
  49. package/dist/packages/charts/src/chart-navigation.d.ts +5 -1
  50. package/dist/packages/charts/src/chart-series-marker.d.ts +8 -1
  51. package/dist/packages/charts/src/chart-surface.d.ts +4 -0
  52. package/dist/packages/charts/src/chart-theme.d.ts +26 -0
  53. package/dist/packages/charts/src/graph/flow-diagram.d.ts +26 -0
  54. package/dist/packages/charts/src/graph/flow-layout.d.ts +70 -0
  55. package/dist/packages/charts/src/graph/index.d.ts +2 -0
  56. package/dist/packages/charts/src/index.d.ts +1 -1
  57. package/dist/packages/charts/src/label-spacing.d.ts +15 -0
  58. package/dist/packages/charts/src/matrix/matrix-cells.d.ts +4 -0
  59. package/dist/packages/charts/src/matrix/matrix-strip.d.ts +20 -0
  60. package/dist/packages/charts/src/matrix/matrix-types.d.ts +21 -0
  61. package/dist/packages/charts/src/matrix/matrix.d.ts +8 -19
  62. package/dist/packages/collections/src/collection-controls.d.ts +2 -1
  63. package/dist/packages/collections/src/data-table.d.ts +12 -8
  64. package/dist/packages/collections/src/index.d.ts +1 -0
  65. package/dist/packages/collections/src/table-results.d.ts +26 -0
  66. package/dist/packages/core/src/actions.d.ts +6 -0
  67. package/dist/packages/core/src/index.d.ts +1 -1
  68. package/dist/packages/forms/src/form-status.d.ts +7 -0
  69. package/dist/packages/forms/src/forms.d.ts +3 -1
  70. package/dist/packages/forms/src/index.d.ts +2 -0
  71. package/dist/packages/foundations/src/agent/index.d.ts +2 -2
  72. package/dist/packages/layout/src/page-context.d.ts +4 -0
  73. package/dist/packages/navigation/src/index.d.ts +1 -0
  74. package/dist/packages/navigation/src/route-link.d.ts +2 -0
  75. package/dist/{pierre-diff-DJ3oOfPX.js → pierre-diff-B3tD3-6z.js} +1 -1
  76. package/dist/{plot-width-BQQS-mw9.js → plot-width-DzCmthQW.js} +28 -0
  77. package/dist/{src-D2OHco8V.js → src-Bk7M67zy.js} +3 -3
  78. package/dist/{src-DfOAlAd2.js → src-BpvnBWrF.js} +1 -1
  79. package/dist/{src-CQQvXi7a.js → src-DBNncL7_.js} +70 -50
  80. package/dist/{src-s3tWwnN4.js → src-DcW_gMX8.js} +178 -168
  81. package/dist/{src-CNV1ewzb.js → src-gqEebHEa.js} +319 -285
  82. package/dist/styles2.css +115 -0
  83. package/package.json +9 -2
  84. package/recipes/allocation-report.tsx +115 -0
  85. package/recipes/consequential-form.tsx +132 -0
  86. package/recipes/searchable-collection.tsx +106 -0
  87. package/recipes/sectioned-report.tsx +58 -0
  88. package/recipes/tabbed-workspace.tsx +84 -0
  89. package/skills/extend-elements/SKILL.md +28 -0
  90. package/skills/use-elements/SKILL.md +36 -0
  91. package/skills/{elements-presentation/SKILL.md → use-elements/references/reports.md} +0 -6
  92. package/skills/{elements-workspace/SKILL.md → use-elements/references/workspace.md} +0 -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",
@@ -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";
@@ -0,0 +1,6 @@
1
+ // packages/charts/src/label-spacing.ts
2
+ function e({ positions: e, gap: t, start: n, end: r }) {
3
+ let i = e.length - 1, a = e.map((r, i) => Math.max(n + i * t, ...e.slice(0, i + 1).map((e, n) => e + (i - n) * t))), o = a.map((e, n) => Math.min(r - (i - n) * t, ...a.slice(n).map((e, n) => e - n * t)));
4
+ return o.map((e, r) => Math.max(n + r * t, ...o.slice(0, r + 1).map((e, n) => e + (r - n) * t)));
5
+ }
6
+ export { e as t };