@mechane-ai/elements 0.13.0 → 0.14.1

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 (83) hide show
  1. package/README.md +36 -12
  2. package/dist/ai.js +19 -19
  3. package/dist/{categorical-values-DwobbjBq.js → categorical-values-l5YTG9G3.js} +3 -3
  4. package/dist/{chart-frame-DAxsgMyl.js → chart-frame-Bf1l_7-R.js} +6 -6
  5. package/dist/{chart-input-B0snxbMH.js → chart-input-fBuRm0Lc.js} +3 -3
  6. package/dist/charts/cartesian.js +16 -16
  7. package/dist/charts/distribution.js +6 -6
  8. package/dist/charts/graph.js +5 -5
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +13 -13
  11. package/dist/charts/timeline.js +30 -30
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-VwrOHz5j.js → code-block-DB42-a0M.js} +4 -4
  14. package/dist/collections.js +330 -394
  15. package/dist/constants.stylex-bbdiv1fD.js +83 -0
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +5 -5
  18. package/dist/content/link.js +1 -1
  19. package/dist/content/markdown.js +4 -4
  20. package/dist/content/tree.js +2 -2
  21. package/dist/{content-link-Oj-MtNYi.js → content-link-rdxJ94P8.js} +1 -1
  22. package/dist/content.js +5 -5
  23. package/dist/elements.css +73 -106
  24. package/dist/feedback.js +1 -1
  25. package/dist/forms/dates.js +21 -21
  26. package/dist/forms.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/layout.js +22 -22
  29. package/dist/navigation/commands.js +6 -6
  30. package/dist/navigation.js +7 -7
  31. package/dist/overlays.js +1 -1
  32. package/dist/packages/ai/src/approval.d.ts +1 -1
  33. package/dist/packages/ai/src/conversation.d.ts +4 -4
  34. package/dist/packages/ai/src/prompt-input.d.ts +7 -7
  35. package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
  36. package/dist/packages/charts/src/cartesian/time-series.d.ts +2 -2
  37. package/dist/packages/charts/src/chart-frame.d.ts +2 -2
  38. package/dist/packages/collections/src/collection-controls.d.ts +8 -7
  39. package/dist/packages/collections/src/collection-scroll.d.ts +2 -2
  40. package/dist/packages/collections/src/data-table.d.ts +6 -6
  41. package/dist/packages/collections/src/index.d.ts +2 -3
  42. package/dist/packages/content/src/code/code-block.d.ts +4 -4
  43. package/dist/packages/content/src/diff/diff-source.d.ts +1 -1
  44. package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -2
  45. package/dist/packages/content/src/markdown/markdown.d.ts +2 -2
  46. package/dist/packages/content/src/trace.d.ts +3 -3
  47. package/dist/packages/core/src/actions.d.ts +2 -2
  48. package/dist/packages/core/src/surfaces.d.ts +6 -6
  49. package/dist/packages/core/src/text.d.ts +2 -2
  50. package/dist/packages/feedback/src/async-region.d.ts +5 -3
  51. package/dist/packages/feedback/src/control-placeholders.d.ts +5 -5
  52. package/dist/packages/feedback/src/feedback.d.ts +2 -2
  53. package/dist/packages/forms/src/form-actions.d.ts +2 -2
  54. package/dist/packages/forms/src/forms.d.ts +2 -2
  55. package/dist/packages/forms/src/selection-styles.d.ts +1 -1
  56. package/dist/packages/foundations/src/constants.stylex.d.ts +90 -0
  57. package/dist/packages/foundations/src/tokens.d.ts +2 -0
  58. package/dist/packages/foundations/src/tokens.stylex.d.ts +0 -90
  59. package/dist/packages/layout/src/app-shell.d.ts +2 -2
  60. package/dist/packages/layout/src/page-toolbar.d.ts +3 -3
  61. package/dist/packages/layout/src/record-page.d.ts +2 -2
  62. package/dist/packages/layout/src/resizable.d.ts +2 -2
  63. package/dist/packages/layout/src/sidebar.d.ts +6 -6
  64. package/dist/packages/layout/src/view-stack.d.ts +2 -2
  65. package/dist/packages/layout/src/workbench.d.ts +2 -2
  66. package/dist/packages/navigation/src/commands/command.d.ts +3 -3
  67. package/dist/packages/navigation/src/page-navigation.d.ts +4 -4
  68. package/dist/packages/overlays/src/drawer.d.ts +2 -2
  69. package/dist/{pierre-diff-sUAU-xeL.js → pierre-diff-C_j0nxwS.js} +2 -2
  70. package/dist/pierre-theme-BUeJim8s.js +127 -0
  71. package/dist/{pierre-tree-Db1yaDM2.js → pierre-tree-BaIVTNmG.js} +4 -4
  72. package/dist/{src-B0UTwpOz.js → src-BVsyKLQ8.js} +42 -41
  73. package/dist/{src-BNlyCwOr.js → src-BXh4g2VY.js} +36 -35
  74. package/dist/{src-DMsnWyru.js → src-R0kgHFPZ.js} +28 -28
  75. package/dist/{src-CVlgjAlw.js → src-d7EAi61b.js} +9 -9
  76. package/dist/theme.js +1 -1
  77. package/dist/tokens.js +3 -207
  78. package/dist/tokens.stylex-DTHHFbyl.js +128 -0
  79. package/package.json +4 -2
  80. package/packages/foundations/src/constants.stylex.ts +91 -0
  81. package/packages/foundations/src/tokens.stylex.ts +0 -90
  82. package/dist/packages/collections/src/table.d.ts +0 -17
  83. package/dist/pierre-theme-CBAncKdH.js +0 -126
@@ -1,11 +1,11 @@
1
- import { c as e } from "../src-BNlyCwOr.js";
2
- import { n as t, t as n } from "../chart-input-B0snxbMH.js";
1
+ import { c as e } from "../src-BXh4g2VY.js";
2
+ import { n as t, t as n } from "../chart-input-fBuRm0Lc.js";
3
3
  import * as r from "@stylexjs/stylex";
4
4
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  import { scaleLinear as o } from "@visx/scale";
6
6
  import { Bar as s } from "@visx/shape";
7
7
  // packages/charts/src/timeline/waterfall.tsx
8
- var c = {
8
+ var c = 5, l = {
9
9
  plot: {
10
10
  k7Eaqz: "xeuugli",
11
11
  kUOVxO: "xl4o6ss",
@@ -25,32 +25,32 @@ var c = {
25
25
  kMwMTN: "xr5kp14",
26
26
  $$css: !0
27
27
  }
28
- }, l = {
29
- neutral: c.neutral,
30
- positive: c.positive,
31
- negative: c.negative
32
- }, u = [
28
+ }, u = {
29
+ neutral: l.neutral,
30
+ positive: l.positive,
31
+ negative: l.negative
32
+ }, d = [
33
33
  0,
34
34
  .5,
35
35
  1
36
- ], d = 100;
37
- function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v, emptyLabel: y, selectedId: b, selectedRef: x, onSelect: S, formatOffset: C }) {
38
- let w = p({
36
+ ], f = 100;
37
+ function p({ items: t, start: s, end: c, label: p, rowLabel: _, summaryLabel: v, emptyLabel: y, selectedId: b, selectedRef: x, onSelect: S, formatOffset: C }) {
38
+ let w = m({
39
39
  items: t,
40
40
  start: s,
41
- end: f
41
+ end: c
42
42
  });
43
43
  if (w !== void 0) return /* @__PURE__ */ i(n, {
44
- title: g,
44
+ title: p,
45
45
  message: w
46
46
  });
47
- let T = f - s, E = o({
48
- domain: [s, f],
49
- range: [0, T === 0 ? 0 : d]
50
- }), D = T > 0 ? u : [0], O = t.some((e) => e.geometry.kind !== "unavailable");
47
+ let T = c - s, E = o({
48
+ domain: [s, c],
49
+ range: [0, T === 0 ? 0 : f]
50
+ }), D = T > 0 ? d : [0], O = t.some((e) => e.geometry.kind !== "unavailable");
51
51
  return /* @__PURE__ */ a("div", {
52
52
  role: "group",
53
- "aria-label": g,
53
+ "aria-label": p,
54
54
  className: "xeuugli x1hz01jw x12h1iku",
55
55
  children: [
56
56
  /* @__PURE__ */ a("div", {
@@ -83,7 +83,7 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
83
83
  })
84
84
  }),
85
85
  t.map((t) => {
86
- let n = h({
86
+ let n = g({
87
87
  geometry: t.geometry,
88
88
  start: s,
89
89
  formatOffset: C
@@ -95,8 +95,8 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
95
95
  "aria-label": `${t.label} · ${t.detail} · ${t.summary} · ${n}`,
96
96
  onClick: () => S(t.id),
97
97
  ...{
98
- 0: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6" },
99
- 1: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xzro8vx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 x1r7kqkb xh3r7i3" }
98
+ 0: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xpvm0e4 xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6" },
99
+ 1: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt xif5pkx x1ecmtor x19rmrnh x9v5kkp x13qnu6 x1bqaal x1t1lzn6 x1r7kqkb xh3r7i3" }
100
100
  }[b === t.id | 0],
101
101
  children: [
102
102
  /* @__PURE__ */ a("span", {
@@ -116,7 +116,7 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
116
116
  }),
117
117
  /* @__PURE__ */ i("span", {
118
118
  title: n,
119
- ...r.props(c.plot, l[t.tone]),
119
+ ...r.props(l.plot, u[t.tone]),
120
120
  children: t.geometry.kind === "unavailable" ? /* @__PURE__ */ i(e, {
121
121
  variant: "caption",
122
122
  tone: "muted",
@@ -125,12 +125,12 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
125
125
  "aria-hidden": !0,
126
126
  className: "x1lliihq xh8yej3 xmix8c7 x1rea2x4",
127
127
  children: [D.map((e) => /* @__PURE__ */ i("line", {
128
- x1: `${e * d}%`,
129
- x2: `${e * d}%`,
128
+ x1: `${e * f}%`,
129
+ x2: `${e * f}%`,
130
130
  y1: "0",
131
131
  y2: "18",
132
132
  className: "x13hfdr1"
133
- }, e)), /* @__PURE__ */ i(m, {
133
+ }, e)), /* @__PURE__ */ i(h, {
134
134
  geometry: t.geometry,
135
135
  scale: E
136
136
  })]
@@ -154,7 +154,7 @@ function f({ items: t, start: s, end: f, label: g, rowLabel: _, summaryLabel: v,
154
154
  ]
155
155
  });
156
156
  }
157
- function p({ items: e, start: n, end: r }) {
157
+ function m({ items: e, start: n, end: r }) {
158
158
  if (!Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(r - n) || r < n) return "The timing domain must have finite, ordered endpoints.";
159
159
  if (!t(e)) return "Timing records must have unique identifiers.";
160
160
  for (let t of e) {
@@ -166,7 +166,7 @@ function p({ items: e, start: n, end: r }) {
166
166
  if (e.kind === "point" && (!Number.isFinite(e.at) || e.at < n || e.at > r)) return "Timing points must be finite and fit inside the supplied domain.";
167
167
  }
168
168
  }
169
- function m({ geometry: e, scale: t }) {
169
+ function h({ geometry: e, scale: t }) {
170
170
  switch (e.kind) {
171
171
  case "unavailable": return null;
172
172
  case "interval": {
@@ -207,7 +207,7 @@ function m({ geometry: e, scale: t }) {
207
207
  height: 1,
208
208
  overflow: "visible",
209
209
  children: /* @__PURE__ */ i("path", {
210
- d: "M0 -5 5 0 0 5 -5 0Z",
210
+ d: `M0 -${c} ${c} 0 0 ${c} -${c} 0Z`,
211
211
  className: "x117rol3"
212
212
  })
213
213
  });
@@ -215,11 +215,11 @@ function m({ geometry: e, scale: t }) {
215
215
  }
216
216
  }
217
217
  }
218
- function h({ geometry: e, start: t, formatOffset: n }) {
218
+ function g({ geometry: e, start: t, formatOffset: n }) {
219
219
  switch (e.kind) {
220
220
  case "interval": return `Start ${n(e.start - t)}, end ${n(e.end - t)}, duration ${n(e.end - e.start)}`;
221
221
  case "point": return `At ${n(e.at - t)}`;
222
222
  case "unavailable": return "Timing unavailable";
223
223
  }
224
224
  }
225
- export { f as Waterfall };
225
+ export { p as Waterfall };
package/dist/charts.js CHANGED
@@ -1 +1 @@
1
- export { r as ChartFrame, i as ChartLegend } from "./chart-frame-DAxsgMyl.js";
1
+ export { r as ChartFrame, i as ChartLegend } from "./chart-frame-Bf1l_7-R.js";
@@ -1,7 +1,7 @@
1
- import { _ as e } from "./src-BNlyCwOr.js";
2
- import { colors as t } from "./tokens.js";
1
+ import { _ as e } from "./src-BXh4g2VY.js";
2
+ import { r as t } from "./tokens.stylex-DTHHFbyl.js";
3
3
  import { t as n } from "./viewer-styles-CpHqp5Qv.js";
4
- import { t as r } from "./pierre-theme-CBAncKdH.js";
4
+ import { t as r } from "./pierre-theme-BUeJim8s.js";
5
5
  import * as i from "@stylexjs/stylex";
6
6
  import { useEffect as a, useRef as o, useState as s } from "react";
7
7
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -103,7 +103,7 @@ function g({ token: e }) {
103
103
  children: e.content
104
104
  });
105
105
  }
106
- function _({ code: t, language: r = "text", filename: a, streaming: o = !1, wrap: s = !1, lineNumbers: u = !0, selectedLines: d, annotations: p = [], maxHeight: _ = 400, maxLines: v = 2e3 }) {
106
+ function _({ code: t, language: r = "text", filename: a, isStreaming: o = !1, shouldWrap: s = !1, showLineNumbers: u = !0, selectedLines: d, annotations: p = [], maxHeight: _ = 400, maxLines: v = 2e3 }) {
107
107
  let y = f(t, r), b = t.slice(0, h).split(/\r\n|\n|\r/u), x = b.slice(0, Math.max(1, v)).map((e, t) => ({
108
108
  text: e,
109
109
  line: t + 1