@mechane-ai/elements 0.64.0 → 0.67.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 (130) hide show
  1. package/README.md +39 -27
  2. package/dist/ai.js +285 -203
  3. package/dist/{article-BopqPz1K.js → article-anMy8fA5.js} +6 -6
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +137 -46
  6. package/dist/{categorical-values-8LA9KXhi.js → categorical-values-Bh7ZkEQn.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/comparison.js +1 -1
  9. package/dist/charts/distribution.js +1 -1
  10. package/dist/charts/figure.js +12 -12
  11. package/dist/charts/graph.js +1 -1
  12. package/dist/charts/hierarchy.js +1 -1
  13. package/dist/charts/image.js +1 -1
  14. package/dist/charts/matrix.js +1 -1
  15. package/dist/charts/plot.js +3 -3
  16. package/dist/charts/relationship.js +1 -1
  17. package/dist/charts/text.js +1 -1
  18. package/dist/charts/timeline.js +2 -2
  19. package/dist/charts/trend.js +1 -1
  20. package/dist/charts.js +2 -2
  21. package/dist/{code-block-BjQUIvvw.js → code-block-DbW_t9U4.js} +1 -1
  22. package/dist/collections.js +1 -1
  23. package/dist/{commands-BI9rWGpb.js → commands-C7Zrp-tG.js} +2 -2
  24. package/dist/content/code.js +1 -1
  25. package/dist/content/diff.js +3 -3
  26. package/dist/content/link.js +1 -1
  27. package/dist/content/markdown.js +1 -1
  28. package/dist/content/tree.js +2 -2
  29. package/dist/{content-link-C3RAJ2kP.js → content-link-BN4NPp0u.js} +1 -1
  30. package/dist/content.js +1 -1
  31. package/dist/{dates-D1v_jiva.js → dates-OTq-xU33.js} +2 -2
  32. package/dist/{dumbbell-plot-QGjFMk0X.js → dumbbell-plot-BQDGe0sQ.js} +3 -3
  33. package/dist/{embedding-map-D_RNxsCD.js → embedding-map-DmmknG7A.js} +6 -6
  34. package/dist/feedback.js +1 -1
  35. package/dist/{figure-frame-CF3298LZ.js → figure-frame-DlyNTDzh.js} +22 -21
  36. package/dist/forms/dates.js +1 -1
  37. package/dist/{forms-DlKhXUlc.js → forms-iAOjGRTO.js} +1 -1
  38. package/dist/forms.js +2 -2
  39. package/dist/{image-grid-BXsgVBnB.js → image-grid-CxEAQvTf.js} +3 -3
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +13 -13
  42. package/dist/kits/interpretability.js +47 -43
  43. package/dist/kits/operations.js +80 -79
  44. package/dist/kits/research.js +364 -520
  45. package/dist/kits/training.js +108 -107
  46. package/dist/layout.js +1 -1
  47. package/dist/lesson.js +3 -3
  48. package/dist/{markdown-B92daSMP.js → markdown-Diffqqm7.js} +2 -2
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation/commands.js +1 -1
  51. package/dist/{navigation-D3vnWiVv.js → navigation-CTnYtVD8.js} +1 -1
  52. package/dist/navigation.js +4 -4
  53. package/dist/packages/ai/src/index.d.ts +2 -0
  54. package/dist/packages/ai/src/message-reactions.d.ts +51 -0
  55. package/dist/packages/ai/src/message.d.ts +3 -1
  56. package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
  57. package/dist/packages/collections/src/card-columns.d.ts +30 -0
  58. package/dist/packages/collections/src/collection-page.d.ts +43 -0
  59. package/dist/packages/collections/src/column-card.d.ts +15 -0
  60. package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
  61. package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
  62. package/dist/packages/collections/src/data-table.d.ts +2 -2
  63. package/dist/packages/collections/src/index.d.ts +5 -0
  64. package/dist/packages/collections/src/table-query.d.ts +13 -4
  65. package/dist/packages/collections/src/use-collection-controls.d.ts +6 -0
  66. package/dist/packages/feedback/src/feedback.d.ts +0 -4
  67. package/dist/packages/feedback/src/index.d.ts +1 -1
  68. package/dist/packages/kits/src/research/index.d.ts +0 -2
  69. package/dist/packages/layout/src/app-shell.d.ts +3 -1
  70. package/dist/packages/layout/src/index.d.ts +4 -4
  71. package/dist/packages/layout/src/page-inset.d.ts +5 -0
  72. package/dist/packages/layout/src/page-layout.d.ts +4 -9
  73. package/dist/packages/layout/src/page-toolbar.d.ts +1 -2
  74. package/dist/packages/layout/src/reading-column.d.ts +4 -0
  75. package/dist/packages/layout/src/record-page.d.ts +4 -6
  76. package/dist/packages/layout/src/sidebar.d.ts +3 -1
  77. package/dist/packages/layout/src/workbench.d.ts +2 -6
  78. package/dist/packages/navigation/src/current-page-click.d.ts +3 -0
  79. package/dist/packages/navigation/src/index.d.ts +1 -0
  80. package/dist/{param-DfOYi9wL.js → param-CKr8EYxF.js} +1 -1
  81. package/dist/{pierre-diff-DP_TXXIt.js → pierre-diff-DXVIwW7o.js} +1 -1
  82. package/dist/{plot-layout-BfXmAi71.js → plot-layout-CVzSbcU7.js} +24 -23
  83. package/dist/{plot-surface-UQgDiTVe.js → plot-surface-CBhI1alw.js} +1 -1
  84. package/dist/{reference-lines-BRHB78Wb.js → reference-lines-C970JwWZ.js} +1 -1
  85. package/dist/{scene-DlVQupfw.js → scene-C3dCxckI.js} +6 -6
  86. package/dist/scene.js +1 -1
  87. package/dist/{slope-chart-CjXcvoRJ.js → slope-chart-DekEJxsy.js} +4 -4
  88. package/dist/{src-DojhQZKX.js → src-BCAelv4f.js} +376 -399
  89. package/dist/{src-BYmv3_AL.js → src-Bkov5TTa.js} +204 -191
  90. package/dist/{src-BdQGb362.js → src-BsqbWDxS.js} +4 -4
  91. package/dist/{src-DPcnDU5H.js → src-CIyuaSCi.js} +101 -107
  92. package/dist/src-Dc1t1ugL.js +2612 -0
  93. package/dist/{src-BYnmQkDq.js → src-DceyVyL0.js} +2 -2
  94. package/dist/{src-BI1xQE7D.js → src-Dlh99sPD.js} +46 -32
  95. package/dist/styles2.css +35 -41
  96. package/dist/{time-series-Dg3DZRGx.js → time-series-BSNnijxf.js} +8 -8
  97. package/dist/{timeline-C2IVroD3.js → timeline-CnxfYSIg.js} +4 -4
  98. package/dist/{token-heatmap-CZtIPU60.js → token-heatmap-CJaXo56P.js} +3 -3
  99. package/dist/{token-predictions-BJ5L-Lrm.js → token-predictions-Bi7aKPnh.js} +3 -3
  100. package/dist/{transport-D9e0H2we.js → transport-CXj0DV6o.js} +4 -4
  101. package/dist/{tree-diagram-DRAJiqjW.js → tree-diagram-BxOZsjr1.js} +4 -4
  102. package/dist/{treemap-BdELCV7E.js → treemap-B2yOAetT.js} +4 -4
  103. package/dist/{use-tween-COV8bEYL.js → use-tween-C1TWJwce.js} +1 -1
  104. package/dist/{violin-plot-DuxqWnuD.js → violin-plot-W2L_2JRo.js} +3 -3
  105. package/dist/{waterfall-D4ewGb4u.js → waterfall-Bt73N2Ng.js} +4 -4
  106. package/package.json +1 -1
  107. package/recipes/allocation-report.tsx +4 -4
  108. package/recipes/calendar-workspace.tsx +14 -10
  109. package/recipes/consequential-form.tsx +4 -4
  110. package/recipes/searchable-collection.tsx +66 -58
  111. package/recipes/sectioned-report.tsx +17 -18
  112. package/recipes/session-timeline.tsx +59 -0
  113. package/recipes/tabbed-workspace.tsx +7 -8
  114. package/recipes/workspace-files.tsx +94 -0
  115. package/recipes/workspace-report.tsx +130 -0
  116. package/skills/extend-elements/SKILL.md +21 -0
  117. package/skills/review-elements/SKILL.md +20 -13
  118. package/skills/upgrade-elements/SKILL.md +3 -1
  119. package/skills/upgrade-elements/references/releases.md +36 -0
  120. package/skills/use-elements/SKILL.md +13 -7
  121. package/skills/use-elements/references/collections.md +67 -14
  122. package/skills/use-elements/references/conversations.md +32 -0
  123. package/skills/use-elements/references/editorial-restraint.md +17 -34
  124. package/skills/use-elements/references/figures.md +6 -2
  125. package/skills/use-elements/references/reports.md +4 -1
  126. package/skills/use-elements/references/workspace.md +18 -14
  127. package/dist/packages/kits/src/research/collection-page.d.ts +0 -72
  128. package/dist/packages/layout/src/detail-page.d.ts +0 -9
  129. package/dist/packages/layout/src/page-content.d.ts +0 -5
  130. package/dist/src-P19zz_aO.js +0 -2235
@@ -1,36 +1,35 @@
1
- import { a as e } from "../dumbbell-plot-QGjFMk0X.js";
1
+ import { a as e } from "../dumbbell-plot-BQDGe0sQ.js";
2
2
  import { r as t } from "../figure-format-B8kRZMlo.js";
3
3
  import { t as n } from "../tone-scope-DKiSw-JR.js";
4
- import { c as r, i, o as a, s as o } from "../src-BYmv3_AL.js";
5
- import { m as s } from "../src-DPcnDU5H.js";
6
- import { n as c } from "../waterfall-D4ewGb4u.js";
7
- import { r as l, s as u } from "../time-series-Dg3DZRGx.js";
8
- import { i as d, r as f } from "../src-P19zz_aO.js";
4
+ import { c as r, i, o as a, s as o } from "../src-Bkov5TTa.js";
5
+ import { n as s } from "../waterfall-Bt73N2Ng.js";
6
+ import { r as c, s as l } from "../time-series-BSNnijxf.js";
7
+ import { i as u, r as d } from "../src-Dc1t1ugL.js";
9
8
  import "@stylexjs/stylex";
10
- import { useId as p } from "react";
11
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
9
+ import { useId as f } from "react";
10
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
11
  // packages/kits/src/operations/budget-board.tsx
13
- var g = {
12
+ var h = {
14
13
  empty: "No objectives are set for this service.",
15
14
  duplicateIds: "Budget rows need unique identifiers.",
16
15
  measured: "Measured",
17
16
  target: "Target"
18
17
  };
19
- function _({ groups: i, locale: o, status: c, selected: l, onSelectedChange: u, labels: d }) {
18
+ function g({ groups: o, locale: s, status: c, selected: l, onSelectedChange: u, labels: d }) {
20
19
  let f = {
21
- ...g,
20
+ ...h,
22
21
  ...d
23
- }, p = i.flatMap((e) => e.rows.map((e) => e.id));
24
- return new Set(p).size === p.length ? i.length === 0 && c !== "loading" ? /* @__PURE__ */ m(s, { children: f.empty }) : /* @__PURE__ */ m(n, {
25
- ids: p,
26
- children: /* @__PURE__ */ m("div", {
22
+ }, g = o.flatMap((e) => e.rows.map((e) => e.id));
23
+ return new Set(g).size === g.length ? o.length === 0 && c !== "loading" ? /* @__PURE__ */ p(i, { children: f.empty }) : /* @__PURE__ */ p(n, {
24
+ ids: g,
25
+ children: /* @__PURE__ */ p("div", {
27
26
  className: "xrvj5dj x1j825kq xeuugli",
28
- children: i.map((n) => /* @__PURE__ */ h("div", {
27
+ children: o.map((n) => /* @__PURE__ */ m("div", {
29
28
  className: "xrvj5dj x1n8ia3y xeuugli",
30
- children: [/* @__PURE__ */ m(e, {
29
+ children: [/* @__PURE__ */ p(e, {
31
30
  title: n.title,
32
31
  description: n.description,
33
- locale: o,
32
+ locale: s,
34
33
  status: c,
35
34
  value: n.value,
36
35
  height: "compact",
@@ -43,36 +42,36 @@ function _({ groups: i, locale: o, status: c, selected: l, onSelectedChange: u,
43
42
  target: r,
44
43
  ranges: i
45
44
  }))
46
- }), c !== "loading" && /* @__PURE__ */ m("ul", {
45
+ }), c !== "loading" && /* @__PURE__ */ p("ul", {
47
46
  "aria-label": `${n.title}: state of each objective`,
48
47
  className: "xrvj5dj xunmzkg x1ghz6dp x1717udv xe8uvvx x1hz01jw xtqrqnz x1778rvt xbixft",
49
- children: n.rows.map((e) => /* @__PURE__ */ h("li", {
48
+ children: n.rows.map((e) => /* @__PURE__ */ m("li", {
50
49
  ...{
51
50
  0: { className: "xrvj5dj xowlaxb x1y1mm1b x1hm1d26 x1pha0wt xeuugli x1hmw7ec x5g2kb4 x1ok0vyi" },
52
51
  1: { className: "xrvj5dj xowlaxb x1y1mm1b x1hm1d26 x1pha0wt xeuugli x1hmw7ec x5g2kb4 x1ok0vyi x1r7kqkb" }
53
52
  }[e.id === l | 0],
54
53
  children: [
55
- /* @__PURE__ */ h("span", {
54
+ /* @__PURE__ */ m("span", {
56
55
  className: "xeuugli xj0a0fe",
57
- children: [e.label, /* @__PURE__ */ m(r, {
56
+ children: [e.label, /* @__PURE__ */ p(r, {
58
57
  variant: "caption",
59
58
  tone: "muted",
60
59
  children: ` · ${f.measured} ${t({
61
60
  value: e.value,
62
- locale: o,
61
+ locale: s,
63
62
  format: n.value.format
64
63
  })}, ${f.target.toLowerCase()} ${t({
65
64
  value: e.target,
66
- locale: o,
65
+ locale: s,
67
66
  format: n.value.format
68
67
  })}`
69
68
  })]
70
69
  }),
71
- /* @__PURE__ */ m(a, {
70
+ /* @__PURE__ */ p(a, {
72
71
  tone: e.tone,
73
72
  children: e.state
74
73
  }),
75
- e.detail !== void 0 && /* @__PURE__ */ m("span", {
74
+ e.detail !== void 0 && /* @__PURE__ */ p("span", {
76
75
  className: "x1osaytk x153jb6y xy8obcc",
77
76
  children: e.detail
78
77
  })
@@ -81,20 +80,21 @@ function _({ groups: i, locale: o, status: c, selected: l, onSelectedChange: u,
81
80
  })]
82
81
  }, n.id))
83
82
  })
84
- }) : /* @__PURE__ */ m(s, {
85
- hasError: !0,
83
+ }) : /* @__PURE__ */ p(a, {
84
+ tone: "negative",
85
+ role: "alert",
86
86
  children: f.duplicateIds
87
87
  });
88
88
  }
89
89
  // packages/kits/src/operations/incident-timeline.tsx
90
- var v = {
90
+ var _ = {
91
91
  deploy: "Deploys",
92
92
  alert: "Alerts",
93
93
  incident: "Incidents"
94
94
  };
95
- function y({ events: e, window: t, labels: n, ...r }) {
95
+ function v({ events: e, window: t, labels: n, ...r }) {
96
96
  let i = {
97
- ...v,
97
+ ..._,
98
98
  ...n
99
99
  }, a = [
100
100
  {
@@ -113,7 +113,7 @@ function y({ events: e, window: t, labels: n, ...r }) {
113
113
  tone: "negative"
114
114
  }
115
115
  ];
116
- return /* @__PURE__ */ m(c, {
116
+ return /* @__PURE__ */ p(s, {
117
117
  ...r,
118
118
  lanes: a,
119
119
  events: e.map(({ kind: e, ...t }) => ({
@@ -124,7 +124,7 @@ function y({ events: e, window: t, labels: n, ...r }) {
124
124
  });
125
125
  }
126
126
  // packages/kits/src/operations/service-health.tsx
127
- var b = {
127
+ var y = {
128
128
  healthy: "Healthy",
129
129
  degraded: "Degraded",
130
130
  down: "Down",
@@ -133,80 +133,81 @@ var b = {
133
133
  charts: "Over time",
134
134
  trendSummary: "Recent values of the measure.",
135
135
  duplicateIds: "Indicators and chart panels each need unique identifiers."
136
- }, x = {
136
+ }, b = {
137
137
  healthy: "positive",
138
138
  degraded: "warning",
139
139
  down: "negative",
140
140
  unknown: "neutral"
141
141
  };
142
- function S(e) {
142
+ function x(e) {
143
143
  return new Set(e).size !== e.length;
144
144
  }
145
- function C({ service: e, indicators: r, charts: c, timestampUnit: g, timeFormat: _, locale: v, height: y = "compact", status: C, labels: w }) {
146
- let T = p(), E = {
147
- ...b,
148
- ...w
149
- }, D = C === "loading";
150
- if (S(r.map((e) => e.id)) || S(c.map((e) => e.id))) return /* @__PURE__ */ m(s, {
151
- hasError: !0,
152
- children: E.duplicateIds
145
+ function S({ service: e, indicators: r, charts: s, timestampUnit: h, timeFormat: g, locale: _, height: v = "compact", status: S, labels: C }) {
146
+ let w = f(), T = {
147
+ ...y,
148
+ ...C
149
+ }, E = S === "loading";
150
+ if (x(r.map((e) => e.id)) || x(s.map((e) => e.id))) return /* @__PURE__ */ p(a, {
151
+ tone: "negative",
152
+ role: "alert",
153
+ children: T.duplicateIds
153
154
  });
154
- let O = [.../* @__PURE__ */ new Set([...r.map((e) => e.id), ...c.flatMap((e) => e.series.map((e) => e.id))])];
155
- return /* @__PURE__ */ m(n, {
156
- ids: O,
157
- children: /* @__PURE__ */ h("section", {
158
- "aria-labelledby": T,
155
+ let D = [.../* @__PURE__ */ new Set([...r.map((e) => e.id), ...s.flatMap((e) => e.series.map((e) => e.id))])];
156
+ return /* @__PURE__ */ p(n, {
157
+ ids: D,
158
+ children: /* @__PURE__ */ m("section", {
159
+ "aria-labelledby": w,
159
160
  className: "xrvj5dj x1j825kq xeuugli x1hz01jw xbixft",
160
161
  children: [
161
- /* @__PURE__ */ h("header", {
162
+ /* @__PURE__ */ m("header", {
162
163
  className: "xrvj5dj xunmzkg xeuugli",
163
- children: [/* @__PURE__ */ m(o, {
164
- id: T,
164
+ children: [/* @__PURE__ */ p(o, {
165
+ id: w,
165
166
  children: e.label
166
- }), /* @__PURE__ */ h("div", {
167
+ }), /* @__PURE__ */ m("div", {
167
168
  className: "x78zum5 x1a02dak x6s0dn4 x8zbtdt x1gkm1c7",
168
- children: [/* @__PURE__ */ m(a, {
169
- tone: x[e.state],
170
- children: E[e.state]
171
- }), e.stateDetail !== void 0 && /* @__PURE__ */ m(i, { children: e.stateDetail })]
169
+ children: [/* @__PURE__ */ p(a, {
170
+ tone: b[e.state],
171
+ children: T[e.state]
172
+ }), e.stateDetail !== void 0 && /* @__PURE__ */ p(i, { children: e.stateDetail })]
172
173
  })]
173
174
  }),
174
- r.length > 0 && /* @__PURE__ */ h("div", {
175
+ r.length > 0 && /* @__PURE__ */ m("div", {
175
176
  className: "xrvj5dj x1n8ia3y xeuugli",
176
- children: [/* @__PURE__ */ m("h3", {
177
+ children: [/* @__PURE__ */ p("h3", {
177
178
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k x1b5ytql x1wjjqco",
178
- children: E.indicators
179
- }), /* @__PURE__ */ m(d, {
179
+ children: T.indicators
180
+ }), /* @__PURE__ */ p(u, {
180
181
  layout: "columns",
181
182
  children: r.map((e) => {
182
183
  let n = [e.change === void 0 ? void 0 : `${t({
183
184
  value: e.change.value,
184
- locale: v,
185
+ locale: _,
185
186
  format: e.change.format
186
187
  })} ${e.change.label}`, e.target === void 0 ? void 0 : `${e.target.label} ${t({
187
188
  value: e.target.value,
188
- locale: v,
189
+ locale: _,
189
190
  format: e.format
190
191
  })}`].filter((e) => e !== void 0).join(" · ");
191
- return D ? /* @__PURE__ */ m(f, {
192
+ return E ? /* @__PURE__ */ p(d, {
192
193
  variant: "statistic",
193
194
  label: e.label,
194
195
  isLoading: !0,
195
196
  hasDetail: !0
196
- }, e.id) : /* @__PURE__ */ m(f, {
197
+ }, e.id) : /* @__PURE__ */ p(d, {
197
198
  variant: "statistic",
198
199
  label: e.label,
199
200
  value: t({
200
201
  value: e.value,
201
- locale: v,
202
+ locale: _,
202
203
  format: e.format
203
204
  }),
204
205
  ...n === "" ? {} : { detail: n },
205
- ...e.trend === void 0 ? {} : { trend: /* @__PURE__ */ m(u, {
206
+ ...e.trend === void 0 ? {} : { trend: /* @__PURE__ */ p(l, {
206
207
  title: `${e.label} trend`,
207
- summary: E.trendSummary,
208
+ summary: T.trendSummary,
208
209
  unit: e.trend.unit,
209
- timestampUnit: g,
210
+ timestampUnit: h,
210
211
  series: {
211
212
  id: e.id,
212
213
  label: e.label,
@@ -218,22 +219,22 @@ function C({ service: e, indicators: r, charts: c, timestampUnit: g, timeFormat:
218
219
  })
219
220
  })]
220
221
  }),
221
- c.length > 0 && /* @__PURE__ */ h("div", {
222
+ s.length > 0 && /* @__PURE__ */ m("div", {
222
223
  className: "xrvj5dj x1n8ia3y xeuugli",
223
- children: [/* @__PURE__ */ m("h3", {
224
+ children: [/* @__PURE__ */ p("h3", {
224
225
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k x1b5ytql x1wjjqco",
225
- children: E.charts
226
- }), /* @__PURE__ */ m(l, {
227
- charts: c,
228
- timestampUnit: g,
229
- timeFormat: _,
230
- height: y,
231
- locale: v,
232
- status: C
226
+ children: T.charts
227
+ }), /* @__PURE__ */ p(c, {
228
+ charts: s,
229
+ timestampUnit: h,
230
+ timeFormat: g,
231
+ height: v,
232
+ locale: _,
233
+ status: S
233
234
  })]
234
235
  })
235
236
  ]
236
237
  })
237
238
  });
238
239
  }
239
- export { _ as BudgetBoard, y as IncidentTimeline, C as ServiceHealth };
240
+ export { g as BudgetBoard, v as IncidentTimeline, S as ServiceHealth };