@mechane-ai/elements 0.13.0 → 0.14.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.
- package/README.md +36 -12
- package/dist/ai.js +19 -19
- package/dist/{categorical-values-DwobbjBq.js → categorical-values-BnWfIPlv.js} +3 -3
- package/dist/{chart-frame-DAxsgMyl.js → chart-frame-Dm8UNfYD.js} +6 -6
- package/dist/{chart-input-B0snxbMH.js → chart-input-ceiMZYI-.js} +3 -3
- package/dist/charts/cartesian.js +16 -16
- package/dist/charts/distribution.js +6 -6
- package/dist/charts/graph.js +5 -5
- package/dist/charts/hierarchy.js +3 -3
- package/dist/charts/matrix.js +13 -13
- package/dist/charts/timeline.js +30 -30
- package/dist/charts.js +1 -1
- package/dist/{code-block-VwrOHz5j.js → code-block-D07N6mYS.js} +4 -4
- package/dist/collections.js +330 -394
- package/dist/constants.stylex-bbdiv1fD.js +83 -0
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +5 -5
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +4 -4
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-Oj-MtNYi.js → content-link-CEx2s1MU.js} +1 -1
- package/dist/content.js +5 -5
- package/dist/elements.css +65 -106
- package/dist/feedback.js +1 -1
- package/dist/forms/dates.js +21 -21
- package/dist/forms.js +1 -1
- package/dist/index.js +1 -1
- package/dist/layout.js +22 -22
- package/dist/navigation/commands.js +6 -6
- package/dist/navigation.js +7 -7
- package/dist/overlays.js +1 -1
- package/dist/packages/ai/src/approval.d.ts +1 -1
- package/dist/packages/ai/src/conversation.d.ts +4 -4
- package/dist/packages/ai/src/prompt-input.d.ts +7 -7
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/time-series.d.ts +2 -2
- package/dist/packages/charts/src/chart-frame.d.ts +2 -2
- package/dist/packages/collections/src/collection-controls.d.ts +8 -7
- package/dist/packages/collections/src/collection-scroll.d.ts +2 -2
- package/dist/packages/collections/src/data-table.d.ts +6 -6
- package/dist/packages/collections/src/index.d.ts +2 -3
- package/dist/packages/content/src/code/code-block.d.ts +4 -4
- package/dist/packages/content/src/diff/diff-source.d.ts +1 -1
- package/dist/packages/content/src/diff/pierre-diff.d.ts +2 -2
- package/dist/packages/content/src/markdown/markdown.d.ts +2 -2
- package/dist/packages/content/src/trace.d.ts +3 -3
- package/dist/packages/core/src/actions.d.ts +2 -2
- package/dist/packages/core/src/surfaces.d.ts +6 -6
- package/dist/packages/core/src/text.d.ts +2 -2
- package/dist/packages/feedback/src/async-region.d.ts +5 -3
- package/dist/packages/feedback/src/control-placeholders.d.ts +5 -5
- package/dist/packages/feedback/src/feedback.d.ts +2 -2
- package/dist/packages/forms/src/form-actions.d.ts +2 -2
- package/dist/packages/forms/src/forms.d.ts +2 -2
- package/dist/packages/forms/src/selection-styles.d.ts +1 -1
- package/dist/packages/foundations/src/constants.stylex.d.ts +90 -0
- package/dist/packages/foundations/src/tokens.d.ts +2 -0
- package/dist/packages/foundations/src/tokens.stylex.d.ts +0 -90
- package/dist/packages/layout/src/app-shell.d.ts +2 -2
- package/dist/packages/layout/src/page-toolbar.d.ts +3 -3
- package/dist/packages/layout/src/record-page.d.ts +2 -2
- package/dist/packages/layout/src/resizable.d.ts +2 -2
- package/dist/packages/layout/src/sidebar.d.ts +6 -6
- package/dist/packages/layout/src/view-stack.d.ts +2 -2
- package/dist/packages/layout/src/workbench.d.ts +2 -2
- package/dist/packages/navigation/src/commands/command.d.ts +3 -3
- package/dist/packages/navigation/src/page-navigation.d.ts +4 -4
- package/dist/packages/overlays/src/drawer.d.ts +2 -2
- package/dist/{pierre-diff-sUAU-xeL.js → pierre-diff-C_j0nxwS.js} +2 -2
- package/dist/pierre-theme-BUeJim8s.js +127 -0
- package/dist/{pierre-tree-Db1yaDM2.js → pierre-tree-CBBDlJ_Y.js} +4 -4
- package/dist/{src-DMsnWyru.js → src-BkXlN6aZ.js} +28 -28
- package/dist/{src-B0UTwpOz.js → src-C9GQP3px.js} +42 -41
- package/dist/{src-BNlyCwOr.js → src-CyJd2qSZ.js} +27 -27
- package/dist/{src-CVlgjAlw.js → src-d7EAi61b.js} +9 -9
- package/dist/theme.js +1 -1
- package/dist/tokens.js +3 -207
- package/dist/tokens.stylex-DTHHFbyl.js +128 -0
- package/package.json +4 -2
- package/packages/foundations/src/constants.stylex.ts +91 -0
- package/packages/foundations/src/tokens.stylex.ts +0 -90
- package/dist/packages/collections/src/table.d.ts +0 -17
- package/dist/pierre-theme-CBAncKdH.js +0 -126
package/dist/charts/timeline.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as e } from "../src-
|
|
2
|
-
import { n as t, t as n } from "../chart-input-
|
|
1
|
+
import { c as e } from "../src-CyJd2qSZ.js";
|
|
2
|
+
import { n as t, t as n } from "../chart-input-ceiMZYI-.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
|
-
},
|
|
29
|
-
neutral:
|
|
30
|
-
positive:
|
|
31
|
-
negative:
|
|
32
|
-
},
|
|
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
|
-
],
|
|
37
|
-
function
|
|
38
|
-
let w =
|
|
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:
|
|
41
|
+
end: c
|
|
42
42
|
});
|
|
43
43
|
if (w !== void 0) return /* @__PURE__ */ i(n, {
|
|
44
|
-
title:
|
|
44
|
+
title: p,
|
|
45
45
|
message: w
|
|
46
46
|
});
|
|
47
|
-
let T =
|
|
48
|
-
domain: [s,
|
|
49
|
-
range: [0, T === 0 ? 0 :
|
|
50
|
-
}), D = T > 0 ?
|
|
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":
|
|
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 =
|
|
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
|
|
99
|
-
1: { className: "xrvj5dj x13sfnbj x1prkh4w x6s0dn4 x1gkm1c7 x1y1mm1b xh8yej3 x9f619 x1doqdfy xn9t2bk x1wiwyrm xc342km xso031l x1q0q8m5 x1qndepd xbixft x1hz01jw x1yc453h x1ypdohk x1t137rt
|
|
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(
|
|
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 *
|
|
129
|
-
x2: `${e *
|
|
128
|
+
x1: `${e * f}%`,
|
|
129
|
+
x2: `${e * f}%`,
|
|
130
130
|
y1: "0",
|
|
131
131
|
y2: "18",
|
|
132
132
|
className: "x13hfdr1"
|
|
133
|
-
}, e)), /* @__PURE__ */ i(
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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 {
|
|
225
|
+
export { p as Waterfall };
|
package/dist/charts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as ChartFrame, i as ChartLegend } from "./chart-frame-
|
|
1
|
+
export { r as ChartFrame, i as ChartLegend } from "./chart-frame-Dm8UNfYD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as e } from "./src-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as e } from "./src-CyJd2qSZ.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-
|
|
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,
|
|
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
|