@mechane-ai/elements 0.65.0 → 0.68.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 +21 -10
- package/dist/ai.js +288 -205
- package/dist/{article-BrUa4Wz1.js → article-Ni152e-v.js} +107 -92
- package/dist/article.js +1 -1
- package/dist/catalog.json +151 -34
- package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-6Iz03F1i.js} +1 -1
- package/dist/{cells-X8SVrZBc.js → cells-BRI8LpMU.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/plot.js +16 -15
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
- package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
- package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-jaQvOctJ.js} +4 -4
- package/dist/{embedding-map-BqDEmy88.js → embedding-map-DnZL1kvY.js} +8 -8
- package/dist/feedback.js +1 -1
- package/dist/figure-format-BVb7yFCA.js +46 -0
- package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-96zFqsWz.js} +22 -21
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
- package/dist/forms.js +2 -2
- package/dist/{image-grid-Dpyqxgwy.js → image-grid-B6fdmE9c.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +15 -15
- package/dist/kits/interpretability.js +49 -45
- package/dist/kits/operations.js +81 -80
- package/dist/kits/research.js +776 -499
- package/dist/kits/training.js +108 -107
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/markdown-JeuBeMDZ.js +293 -0
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
- package/dist/navigation.js +3 -3
- package/dist/packages/ai/src/index.d.ts +2 -0
- package/dist/packages/ai/src/message-reactions.d.ts +51 -0
- package/dist/packages/ai/src/message.d.ts +3 -1
- package/dist/packages/charts/src/plot/index.d.ts +2 -0
- package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
- package/dist/packages/charts/src/plot/spatial-layer.d.ts +32 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
- package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
- package/dist/packages/collections/src/card-columns.d.ts +30 -0
- package/dist/packages/collections/src/collection-page.d.ts +43 -0
- package/dist/packages/collections/src/column-card.d.ts +15 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
- package/dist/packages/collections/src/data-table.d.ts +2 -2
- package/dist/packages/collections/src/index.d.ts +5 -0
- package/dist/packages/collections/src/table-query.d.ts +9 -1
- package/dist/packages/feedback/src/feedback.d.ts +0 -4
- package/dist/packages/feedback/src/index.d.ts +1 -1
- package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +7 -2
- package/dist/packages/kits/src/research/motion-clip.d.ts +41 -0
- package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
- package/dist/packages/kits/src/research/motion-figure.d.ts +9 -0
- package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
- package/dist/packages/kits/src/research/motion-scene.d.ts +22 -0
- package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
- package/dist/{param-CwT1RvUS.js → param-Dk92C-K1.js} +2 -2
- package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
- package/dist/plot-CpTwLIYN.js +101 -0
- package/dist/{plot-layout-CvkeUuG6.js → plot-layout-1MG72ZWn.js} +175 -124
- package/dist/{plot-surface-yy37R4vs.js → plot-surface-8-FZI94y.js} +1 -1
- package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C18o1yEY.js} +1 -1
- package/dist/{scene-BRhI8XSy.js → scene-B8dppj5V.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-BMOCaa8R.js → slope-chart-CELflRJd.js} +5 -5
- package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
- package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
- package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
- package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
- package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
- package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
- package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
- package/dist/styles2.css +33 -1
- package/dist/{time-series-CTNVqoUQ.js → time-series-DtAtGoT_.js} +9 -9
- package/dist/{timeline-DrsDtEIW.js → timeline-CzianQir.js} +5 -5
- package/dist/{token-heatmap-DddArdH8.js → token-heatmap-m6oaMwkK.js} +274 -289
- package/dist/{token-predictions-CBykmPID.js → token-predictions-CpGVjOIs.js} +4 -4
- package/dist/{transport-r1QgELf8.js → transport-DQ1yzsQl.js} +5 -5
- package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-D9ekymCQ.js} +5 -5
- package/dist/{treemap-DgmEw_mr.js → treemap-DT8q65LQ.js} +5 -5
- package/dist/{use-tween-BWf44Jy4.js → use-tween-DbXVZBR8.js} +1 -1
- package/dist/{violin-plot-BYJnv6sG.js → violin-plot-83HSjnQM.js} +4 -4
- package/dist/visible-motion-D6NwjGNz.js +24 -0
- package/dist/{waterfall-BNseqMas.js → waterfall-DmApvdrY.js} +5 -5
- package/package.json +1 -1
- package/recipes/recorded-motion.tsx +14 -0
- package/recipes/searchable-collection.tsx +74 -76
- package/skills/extend-elements/SKILL.md +2 -1
- package/skills/review-elements/SKILL.md +15 -7
- package/skills/review-explainer/SKILL.md +4 -0
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +20 -0
- package/skills/use-elements/SKILL.md +10 -6
- package/skills/use-elements/references/collections.md +59 -12
- package/skills/use-elements/references/conversations.md +32 -0
- package/skills/use-elements/references/editorial-restraint.md +17 -29
- package/skills/use-elements/references/figures.md +6 -2
- package/skills/use-elements/references/kits.md +23 -0
- package/skills/use-elements/references/workspace.md +5 -5
- package/skills/write-explainer/SKILL.md +5 -0
- package/dist/figure-format-B8kRZMlo.js +0 -36
- package/dist/markdown--nfaDoR1.js +0 -313
- package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { t as e } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
2
|
+
import { t } from "./visible-motion-D6NwjGNz.js";
|
|
3
|
+
import { t as n } from "./code-block-DbW_t9U4.js";
|
|
4
|
+
import { n as r, t as i } from "./content-link-BN4NPp0u.js";
|
|
5
|
+
import { t as a } from "./viewer-styles-DsFYri4K.js";
|
|
6
|
+
import * as o from "@stylexjs/stylex";
|
|
7
|
+
import { Children as s, createContext as c, createElement as l, memo as u, useContext as d, useMemo as f } from "react";
|
|
8
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
import { Block as g, Streamdown as _, defaultRehypePlugins as v, defaultRemarkPlugins as y, useIsCodeFenceIncomplete as b } from "streamdown";
|
|
10
|
+
// packages/content/src/markdown/markdown-options.ts
|
|
11
|
+
var x = /* @__PURE__ */ new Set(["href", "src"]), S = {
|
|
12
|
+
rehypePlugins: Object.entries(v).filter(([e]) => e === "sanitize").map(([, e]) => e),
|
|
13
|
+
remarkPlugins: Object.values(y),
|
|
14
|
+
skipHtml: !0,
|
|
15
|
+
urlTransform: (e, t) => {
|
|
16
|
+
if (x.has(t)) return r(e);
|
|
17
|
+
}
|
|
18
|
+
}, C = {
|
|
19
|
+
root: {
|
|
20
|
+
k7Eaqz: "xeuugli",
|
|
21
|
+
kMwMTN: "xbixft",
|
|
22
|
+
kMv6JI: "x1hz01jw",
|
|
23
|
+
khiITx: "xvmahel",
|
|
24
|
+
kGuDYH: "xtqrqnz",
|
|
25
|
+
kLWn49: "x1ytb0s6",
|
|
26
|
+
k63SB2: "xj57cvi",
|
|
27
|
+
kHjlTd: "xj0a0fe",
|
|
28
|
+
$$css: !0
|
|
29
|
+
},
|
|
30
|
+
block: {
|
|
31
|
+
keoZOQ: "xyrmp21 x14l7nz5",
|
|
32
|
+
k1K539: "x1jfksii xzboxd6",
|
|
33
|
+
$$css: !0
|
|
34
|
+
},
|
|
35
|
+
heading: {
|
|
36
|
+
keoZOQ: "x1m1vpj6 x14l7nz5",
|
|
37
|
+
k1K539: "x1jfksii xzboxd6",
|
|
38
|
+
k63SB2: "x1b5ytql",
|
|
39
|
+
$$css: !0
|
|
40
|
+
},
|
|
41
|
+
title: {
|
|
42
|
+
kGuDYH: "x1i2cqwi",
|
|
43
|
+
kLWn49: "x4fansv",
|
|
44
|
+
$$css: !0
|
|
45
|
+
},
|
|
46
|
+
section: {
|
|
47
|
+
kGuDYH: "x12myhf4",
|
|
48
|
+
kLWn49: "x1778rvt",
|
|
49
|
+
$$css: !0
|
|
50
|
+
},
|
|
51
|
+
minor: {
|
|
52
|
+
kGuDYH: "xtqrqnz",
|
|
53
|
+
kLWn49: "x1778rvt",
|
|
54
|
+
$$css: !0
|
|
55
|
+
},
|
|
56
|
+
tableRegion: {
|
|
57
|
+
k7Eaqz: "xeuugli",
|
|
58
|
+
ks0D6T: "x193iq5w",
|
|
59
|
+
kXHlph: "xw2csxc",
|
|
60
|
+
kMzoRj: "xmkeg23",
|
|
61
|
+
kt9PQ7: "x1qhh985",
|
|
62
|
+
ksu8eU: "x1y0btm7",
|
|
63
|
+
kVAM5u: "x1ey3b81",
|
|
64
|
+
$$css: !0
|
|
65
|
+
},
|
|
66
|
+
strong: {
|
|
67
|
+
k63SB2: "x1b5ytql",
|
|
68
|
+
$$css: !0
|
|
69
|
+
},
|
|
70
|
+
muted: {
|
|
71
|
+
kMwMTN: "x153jb6y",
|
|
72
|
+
$$css: !0
|
|
73
|
+
}
|
|
74
|
+
}, w = {
|
|
75
|
+
default: null,
|
|
76
|
+
muted: C.muted
|
|
77
|
+
}, T = {
|
|
78
|
+
regular: null,
|
|
79
|
+
strong: C.strong
|
|
80
|
+
}, E = c(1), D = {
|
|
81
|
+
animation: "fadeIn",
|
|
82
|
+
duration: 160,
|
|
83
|
+
stagger: 14,
|
|
84
|
+
maxBacklogMs: 100
|
|
85
|
+
}, O = /* @__PURE__ */ new Set(["string", "number"]);
|
|
86
|
+
function k(e) {
|
|
87
|
+
return O.has(typeof e);
|
|
88
|
+
}
|
|
89
|
+
function A({ children: e, className: t }) {
|
|
90
|
+
let r = b(), i = typeof t == "string" ? /(?:^|\s)language-([^\s]+)/u.exec(t) : null, a = i === null ? void 0 : i[1], o = s.toArray(e);
|
|
91
|
+
return o.every(k) ? /* @__PURE__ */ m("div", {
|
|
92
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
93
|
+
children: /* @__PURE__ */ m(n, {
|
|
94
|
+
code: o.join(""),
|
|
95
|
+
language: a,
|
|
96
|
+
isStreaming: r
|
|
97
|
+
})
|
|
98
|
+
}) : /* @__PURE__ */ m("code", {
|
|
99
|
+
className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
|
|
100
|
+
children: e
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function j({ level: e, children: t, id: n }) {
|
|
104
|
+
let r = d(E), i = `h${Math.min(e + r - 1, 6)}`, a = e === 1 ? C.title : e === 2 ? C.section : C.minor;
|
|
105
|
+
return l(i, {
|
|
106
|
+
id: n,
|
|
107
|
+
...o.props(C.heading, a)
|
|
108
|
+
}, t);
|
|
109
|
+
}
|
|
110
|
+
function M({ children: t }) {
|
|
111
|
+
let n = e();
|
|
112
|
+
return /* @__PURE__ */ m("div", {
|
|
113
|
+
ref: n.ref,
|
|
114
|
+
role: "region",
|
|
115
|
+
"aria-label": "Markdown table",
|
|
116
|
+
tabIndex: n.tabIndex,
|
|
117
|
+
...o.props(a.scrollRegion, C.block, C.tableRegion),
|
|
118
|
+
children: /* @__PURE__ */ m("table", {
|
|
119
|
+
className: "xh8yej3 x1mwwwfo xss6m8b x1yc453h x1h4wwuj x1778rvt",
|
|
120
|
+
children: t
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
var N = c(void 0);
|
|
125
|
+
function P(e) {
|
|
126
|
+
let t = d(N);
|
|
127
|
+
return t === void 0 ? /* @__PURE__ */ m(i, {
|
|
128
|
+
href: e.href,
|
|
129
|
+
title: e.title,
|
|
130
|
+
children: e.children
|
|
131
|
+
}) : t(e);
|
|
132
|
+
}
|
|
133
|
+
var F = {
|
|
134
|
+
h1: (e) => /* @__PURE__ */ m(j, {
|
|
135
|
+
...e,
|
|
136
|
+
level: 1
|
|
137
|
+
}),
|
|
138
|
+
h2: (e) => /* @__PURE__ */ m(j, {
|
|
139
|
+
...e,
|
|
140
|
+
level: 2
|
|
141
|
+
}),
|
|
142
|
+
h3: (e) => /* @__PURE__ */ m(j, {
|
|
143
|
+
...e,
|
|
144
|
+
level: 3
|
|
145
|
+
}),
|
|
146
|
+
h4: (e) => /* @__PURE__ */ m(j, {
|
|
147
|
+
...e,
|
|
148
|
+
level: 4
|
|
149
|
+
}),
|
|
150
|
+
h5: (e) => /* @__PURE__ */ m(j, {
|
|
151
|
+
...e,
|
|
152
|
+
level: 5
|
|
153
|
+
}),
|
|
154
|
+
h6: (e) => /* @__PURE__ */ m(j, {
|
|
155
|
+
...e,
|
|
156
|
+
level: 6
|
|
157
|
+
}),
|
|
158
|
+
p: ({ children: e }) => /* @__PURE__ */ m("p", {
|
|
159
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6",
|
|
160
|
+
children: e
|
|
161
|
+
}),
|
|
162
|
+
ul: ({ children: e }) => /* @__PURE__ */ m("ul", {
|
|
163
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
|
|
164
|
+
children: e
|
|
165
|
+
}),
|
|
166
|
+
ol: ({ children: e, start: t }) => /* @__PURE__ */ m("ol", {
|
|
167
|
+
start: t,
|
|
168
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 x1sbza1b",
|
|
169
|
+
children: e
|
|
170
|
+
}),
|
|
171
|
+
li: ({ children: e }) => /* @__PURE__ */ m("li", {
|
|
172
|
+
className: "x1vblts3 xnkn1qj",
|
|
173
|
+
children: e
|
|
174
|
+
}),
|
|
175
|
+
blockquote: ({ children: e }) => /* @__PURE__ */ m("blockquote", {
|
|
176
|
+
className: "xyrmp21 x14l7nz5 x1jfksii xzboxd6 xrxpjvj x1umj4g3 xyumdvf x1t7ytsu x97x49r x153jb6y",
|
|
177
|
+
children: e
|
|
178
|
+
}),
|
|
179
|
+
code: ({ children: e, className: t }) => /* @__PURE__ */ m(A, {
|
|
180
|
+
className: t,
|
|
181
|
+
children: e
|
|
182
|
+
}),
|
|
183
|
+
inlineCode: ({ children: e }) => /* @__PURE__ */ m("code", {
|
|
184
|
+
className: "xiard35 xy8obcc x1r7kqkb x1ok0vyi x10dazmo x14w6jbu x17etxam",
|
|
185
|
+
children: e
|
|
186
|
+
}),
|
|
187
|
+
a: ({ href: e, children: t, title: n }) => /* @__PURE__ */ m(P, {
|
|
188
|
+
kind: "link",
|
|
189
|
+
href: e,
|
|
190
|
+
title: n,
|
|
191
|
+
children: t
|
|
192
|
+
}),
|
|
193
|
+
img: ({ src: e, alt: t, title: n }) => /* @__PURE__ */ m(P, {
|
|
194
|
+
kind: "image",
|
|
195
|
+
href: typeof e == "string" ? e : void 0,
|
|
196
|
+
title: n,
|
|
197
|
+
children: t !== void 0 && t.length > 0 ? `Open image: ${t}` : "Open image"
|
|
198
|
+
}),
|
|
199
|
+
table: ({ children: e }) => /* @__PURE__ */ m(M, { children: e }),
|
|
200
|
+
thead: ({ children: e }) => /* @__PURE__ */ m("thead", { children: e }),
|
|
201
|
+
tbody: ({ children: e }) => /* @__PURE__ */ m("tbody", { children: e }),
|
|
202
|
+
tr: ({ children: e }) => /* @__PURE__ */ m("tr", { children: e }),
|
|
203
|
+
th: ({ children: e }) => /* @__PURE__ */ m("th", {
|
|
204
|
+
scope: "col",
|
|
205
|
+
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h x153jb6y xk4h15q x1r7kqkb",
|
|
206
|
+
children: e
|
|
207
|
+
}),
|
|
208
|
+
td: ({ children: e }) => /* @__PURE__ */ m("td", {
|
|
209
|
+
className: "xn9t2bk x1doqdfy xso031l x1q0q8m5 x1qndepd x16dsc37 x1yc453h",
|
|
210
|
+
children: e
|
|
211
|
+
}),
|
|
212
|
+
input: ({ checked: e }) => /* @__PURE__ */ m("input", {
|
|
213
|
+
type: "checkbox",
|
|
214
|
+
checked: e ?? !1,
|
|
215
|
+
disabled: !0,
|
|
216
|
+
"aria-label": "Task item",
|
|
217
|
+
className: "x1bzlxqo x6e7ywc"
|
|
218
|
+
}),
|
|
219
|
+
hr: () => /* @__PURE__ */ m("hr", { className: "xhff0hu xc342km x178xt8z x13fuv20 xhjagg4" }),
|
|
220
|
+
strong: ({ children: e }) => /* @__PURE__ */ m("strong", {
|
|
221
|
+
className: "x1b5ytql",
|
|
222
|
+
children: e
|
|
223
|
+
}),
|
|
224
|
+
em: ({ children: e }) => /* @__PURE__ */ m("em", {
|
|
225
|
+
className: "x1k4tb9n",
|
|
226
|
+
children: e
|
|
227
|
+
}),
|
|
228
|
+
del: ({ children: e }) => /* @__PURE__ */ m("del", {
|
|
229
|
+
className: "x5lhwog",
|
|
230
|
+
children: e
|
|
231
|
+
})
|
|
232
|
+
}, I = /* @__PURE__ */ "p.span.h1.h2.h3.h4.h5.h6.ul.ol.li.blockquote.pre.code.a.img.table.thead.tbody.tr.th.td.input.hr.strong.em.del.br.sup.sub.section".split("."), L = u(({ children: e, isStreaming: n = !1, label: r, headingLevel: i = 1, tone: a = "default", weight: s = "regular", renderLink: c, remarkPlugins: l }) => {
|
|
233
|
+
let { ref: u, isActive: d } = t(n), p = f(() => [...S.remarkPlugins ?? [], ...l ?? []], [l]);
|
|
234
|
+
return /* @__PURE__ */ m(N, {
|
|
235
|
+
value: c,
|
|
236
|
+
children: /* @__PURE__ */ m(E, {
|
|
237
|
+
value: i,
|
|
238
|
+
children: /* @__PURE__ */ m("div", {
|
|
239
|
+
ref: u,
|
|
240
|
+
"data-streamdown-paused": n && !d ? "" : void 0,
|
|
241
|
+
children: /* @__PURE__ */ m(_, {
|
|
242
|
+
...S,
|
|
243
|
+
remarkPlugins: p,
|
|
244
|
+
...o.props(C.root, w[a], T[s]),
|
|
245
|
+
"aria-label": r,
|
|
246
|
+
components: F,
|
|
247
|
+
mode: n ? "streaming" : "static",
|
|
248
|
+
isAnimating: n,
|
|
249
|
+
animated: n ? D : !1,
|
|
250
|
+
controls: !1,
|
|
251
|
+
linkSafety: { enabled: !1 },
|
|
252
|
+
allowedElements: I,
|
|
253
|
+
children: e
|
|
254
|
+
})
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
// packages/content/src/markdown/markdown-preview.tsx
|
|
260
|
+
function R({ children: e }) {
|
|
261
|
+
return /* @__PURE__ */ h(p, { children: [e, " "] });
|
|
262
|
+
}
|
|
263
|
+
var z = {
|
|
264
|
+
p: R,
|
|
265
|
+
li: R,
|
|
266
|
+
h1: R,
|
|
267
|
+
h2: R,
|
|
268
|
+
h3: R,
|
|
269
|
+
h4: R,
|
|
270
|
+
h5: R,
|
|
271
|
+
h6: R,
|
|
272
|
+
blockquote: R,
|
|
273
|
+
pre: R,
|
|
274
|
+
code: ({ children: e }) => /* @__PURE__ */ m(p, { children: e }),
|
|
275
|
+
th: R,
|
|
276
|
+
td: R,
|
|
277
|
+
br: () => /* @__PURE__ */ m(p, { children: " " }),
|
|
278
|
+
img: ({ alt: e }) => /* @__PURE__ */ m(p, { children: e })
|
|
279
|
+
};
|
|
280
|
+
function B({ children: e }) {
|
|
281
|
+
return /* @__PURE__ */ m(g, {
|
|
282
|
+
...S,
|
|
283
|
+
content: e,
|
|
284
|
+
components: z,
|
|
285
|
+
allowedElements: Object.keys(z),
|
|
286
|
+
unwrapDisallowed: !0,
|
|
287
|
+
shouldParseIncompleteMarkdown: !1,
|
|
288
|
+
shouldNormalizeHtmlIndentation: !1,
|
|
289
|
+
isIncomplete: !1,
|
|
290
|
+
index: 0
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
export { L as n, B as t };
|
package/dist/mdx.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-
|
|
2
|
-
import { n as se, t as ce } from "./param-
|
|
3
|
-
import { a as l, i as u, n as d, o as f, t as p } from "./transport-
|
|
4
|
-
import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-
|
|
5
|
-
import { t as R } from "./code-block-
|
|
6
|
-
import { t as z } from "./content-link-
|
|
1
|
+
import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-Ni152e-v.js";
|
|
2
|
+
import { n as se, t as ce } from "./param-Dk92C-K1.js";
|
|
3
|
+
import { a as l, i as u, n as d, o as f, t as p } from "./transport-DQ1yzsQl.js";
|
|
4
|
+
import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-B8dppj5V.js";
|
|
5
|
+
import { t as R } from "./code-block-DbW_t9U4.js";
|
|
6
|
+
import { t as z } from "./content-link-BN4NPp0u.js";
|
|
7
7
|
import * as B from "@stylexjs/stylex";
|
|
8
8
|
import { mergeProps as V } from "@ui-sdk/react/primitive";
|
|
9
9
|
import { Children as H, isValidElement as U, useSyncExternalStore as W } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CommandPalette, n as ShortcutHint, r as useCommandShortcuts } from "../commands-
|
|
1
|
+
export { t as CommandPalette, n as ShortcutHint, r as useCommandShortcuts } from "../commands-C7Zrp-tG.js";
|
package/dist/navigation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as e } from "./src-
|
|
2
|
-
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./src-
|
|
3
|
-
import { n as s, t as c } from "./navigation-
|
|
1
|
+
import { M as e } from "./src-Bkov5TTa.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./src-Dlh99sPD.js";
|
|
3
|
+
import { n as s, t as c } from "./navigation-CTnYtVD8.js";
|
|
4
4
|
export { c as Breadcrumb, o as ContentTabs, s as Kbd, n as PageNavigation, t as PageNavigationPlaceholder, e as RouteLink, a as SkipLink, r as Tabs, i as isCurrentPageClick };
|
|
@@ -8,6 +8,8 @@ export type { ConversationRootProps, ConversationViewportProps, ConversationCont
|
|
|
8
8
|
export { Conversation } from './conversation.tsx';
|
|
9
9
|
export type { MessageKind, MessageSpeakerTone, MessageProps, MessageAttachmentProps } from './message.tsx';
|
|
10
10
|
export { Message, MessageAttachment } from './message.tsx';
|
|
11
|
+
export type { MessageReaction, MessageReactionsLabels, MessageReactionsProps, ReactionChoice, ReactionNameDetails, ReactionToggleDetails, } from './message-reactions.tsx';
|
|
12
|
+
export { MessageReactions } from './message-reactions.tsx';
|
|
11
13
|
export type { MessageActionProps } from './message-action.tsx';
|
|
12
14
|
export { MessageAction } from './message-action.tsx';
|
|
13
15
|
export type { MessageBoundaryProps } from './message-boundary.tsx';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** A reaction that has at least one person behind it. */
|
|
3
|
+
export type MessageReaction = {
|
|
4
|
+
readonly emoji: string;
|
|
5
|
+
/** The emoji in words, such as "thumbs up". Screen readers announce it instead of the glyph. */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly count: number;
|
|
8
|
+
/** Whether the viewer is one of the people who reacted. */
|
|
9
|
+
readonly isReacted: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** One emoji the viewer may add, from the list the application supplies. */
|
|
12
|
+
export type ReactionChoice = {
|
|
13
|
+
readonly emoji: string;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
};
|
|
16
|
+
/** The request to react or to withdraw a reaction. The application records it and supplies new counts. */
|
|
17
|
+
export type ReactionToggleDetails = {
|
|
18
|
+
readonly emoji: string;
|
|
19
|
+
/** Whether the viewer asks to be among the people who reacted. */
|
|
20
|
+
readonly isReacted: boolean;
|
|
21
|
+
};
|
|
22
|
+
export type ReactionNameDetails = {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly count: string;
|
|
25
|
+
};
|
|
26
|
+
export type MessageReactionsLabels = {
|
|
27
|
+
/** Names the row of reactions. */
|
|
28
|
+
readonly reactions: string;
|
|
29
|
+
/** Names the control that opens the list of emoji to add. */
|
|
30
|
+
readonly addReaction: string;
|
|
31
|
+
/** Names a reaction's button from its emoji name and formatted count. Its pressed state is announced separately. */
|
|
32
|
+
readonly reactionName: (details: ReactionNameDetails) => string;
|
|
33
|
+
};
|
|
34
|
+
export type MessageReactionsProps = {
|
|
35
|
+
/** The reactions that exist, in display order. */
|
|
36
|
+
readonly reactions: ReadonlyArray<MessageReaction>;
|
|
37
|
+
/** The emoji the add control offers. The application supplies the list; Elements ships none. */
|
|
38
|
+
readonly choices: ReadonlyArray<ReactionChoice>;
|
|
39
|
+
/** Formats each count. */
|
|
40
|
+
readonly locale: string;
|
|
41
|
+
readonly onReactionToggle: (details: ReactionToggleDetails) => void;
|
|
42
|
+
/** Stops reacting, such as for a viewer without permission. Counts stay visible. */
|
|
43
|
+
readonly isDisabled?: boolean;
|
|
44
|
+
readonly labels?: Partial<MessageReactionsLabels> | undefined;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Reaction chips and an add control, for the `reactions` slot of `Message`. Each chip toggles and the add control picks
|
|
48
|
+
* from the supplied emoji, and both report `onReactionToggle`. Nothing changes until the application supplies new
|
|
49
|
+
* `reactions`.
|
|
50
|
+
*/
|
|
51
|
+
export declare function MessageReactions({ reactions, choices, locale, onReactionToggle, isDisabled, labels, }: MessageReactionsProps): ReactNode;
|
|
@@ -11,6 +11,8 @@ export type MessageProps = {
|
|
|
11
11
|
readonly avatar?: ReactNode;
|
|
12
12
|
readonly actions?: ReactNode;
|
|
13
13
|
readonly attachments?: ReactNode;
|
|
14
|
+
/** A `MessageReactions` row. It stays visible, unlike `actions`, which appear on hover where a pointer hovers. */
|
|
15
|
+
readonly reactions?: ReactNode;
|
|
14
16
|
readonly variant?: 'default' | 'chat';
|
|
15
17
|
/** Optional compact inline pill badge naming the speaker role in a multi-agent thread, e.g. `"Coordinator"`. */
|
|
16
18
|
readonly speaker?: string | undefined;
|
|
@@ -25,5 +27,5 @@ export type MessageAttachmentProps = {
|
|
|
25
27
|
readonly href?: string;
|
|
26
28
|
readonly actions?: ReactNode;
|
|
27
29
|
};
|
|
28
|
-
export declare function Message({ author, children, id, kind, meta, avatar, actions, attachments, variant, speaker, speakerTone, quote, }: MessageProps): ReactNode;
|
|
30
|
+
export declare function Message({ author, children, id, kind, meta, avatar, actions, attachments, reactions, variant, speaker, speakerTone, quote, }: MessageProps): ReactNode;
|
|
29
31
|
export declare function MessageAttachment({ name, description, href, actions }: MessageAttachmentProps): ReactNode;
|
|
@@ -47,3 +47,5 @@ export type { BandScale, BandScaleInput, ContinuousScale, ContinuousScaleInput }
|
|
|
47
47
|
export { bandScale, columnExtent, continuousScale, isFiniteDomain, outsideDomain, scaleDomainError } from './scale.ts';
|
|
48
48
|
export type { TickInput, TimeTickInput } from './ticks.ts';
|
|
49
49
|
export { linearTicks, logTicks, scaleTicks, symlogTicks, timeTicks } from './ticks.ts';
|
|
50
|
+
export { SpatialLayer } from './spatial-layer.tsx';
|
|
51
|
+
export type { SpatialLayerProps } from './spatial-layer.tsx';
|
|
@@ -209,7 +209,7 @@ export type TimeAxisTicksInput = {
|
|
|
209
209
|
/**
|
|
210
210
|
* The ticks of a time axis: instants on round clock steps in the format's zone, at least three on an axis longer than
|
|
211
211
|
* 120 pixels. When two ticks would read alike, such as two midnights written "00:00", the labels gain the date, then
|
|
212
|
-
* the year, then
|
|
213
|
-
* supplied.
|
|
212
|
+
* the year, seconds, then the offset for a repeated clock hour. Fields the format sets itself stay as it sets them, and
|
|
213
|
+
* a function format is used as supplied.
|
|
214
214
|
*/
|
|
215
215
|
export declare function timeAxisTicks({ domain, length, timeFormat, locale, timeZone }: TimeAxisTicksInput): AxisTicks;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChartTone } from '../../../foundations/src/chart-tones.ts';
|
|
3
|
+
import type { SymbolShape } from './plot-marks.tsx';
|
|
4
|
+
type Bounds = readonly [number, number, number, number];
|
|
5
|
+
export type SpatialLayerProps = {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly origin?: {
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
readonly bounds: Bounds;
|
|
13
|
+
readonly locale: string;
|
|
14
|
+
readonly isDense: boolean;
|
|
15
|
+
readonly isCompact?: boolean;
|
|
16
|
+
readonly tone: ChartTone;
|
|
17
|
+
readonly shape: SymbolShape;
|
|
18
|
+
readonly regions: ReadonlyArray<{
|
|
19
|
+
readonly label: string;
|
|
20
|
+
readonly bounds: Bounds;
|
|
21
|
+
}>;
|
|
22
|
+
readonly points: ReadonlyArray<{
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly x: number;
|
|
25
|
+
readonly y: number;
|
|
26
|
+
readonly trail: ReadonlyArray<readonly [number, number]>;
|
|
27
|
+
}>;
|
|
28
|
+
readonly selected?: string | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
/** A fixed camera in screen coordinates. Preserve distances on both axes and clip paths outside the camera. */
|
|
31
|
+
export declare function SpatialLayer({ label, bounds, regions, points, tone, shape, selected, origin, locale, isDense, isCompact, }: SpatialLayerProps): ReactNode;
|
|
32
|
+
export {};
|
|
@@ -23,8 +23,8 @@ export type TimeTickInput = {
|
|
|
23
23
|
/** The first and last instant, in milliseconds since the epoch. */
|
|
24
24
|
readonly domain: NumericDomain;
|
|
25
25
|
readonly count: number;
|
|
26
|
-
/**
|
|
27
|
-
readonly zoneOffset: number;
|
|
26
|
+
/** Milliseconds ahead of UTC, either fixed or evaluated at each instant across clock changes. */
|
|
27
|
+
readonly zoneOffset: number | ((timestamp: number) => number);
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Instants on round clock steps in the reader's zone: seconds, minutes, hours or days. Spans of months and years fall
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** What a card shows. The application maps its own record onto this shape. */
|
|
3
|
+
export type CardSummary = {
|
|
4
|
+
/** The card's name, which also names its move control. */
|
|
5
|
+
readonly title: string;
|
|
6
|
+
/** Makes the title a link to the record. Leave it out when the title is plain text. */
|
|
7
|
+
readonly href?: string | undefined;
|
|
8
|
+
/** An owner avatar or another small mark before the title. */
|
|
9
|
+
readonly leading?: ReactNode;
|
|
10
|
+
/** A `Badge` or `Status` for the record's state. */
|
|
11
|
+
readonly status?: ReactNode;
|
|
12
|
+
/** Quiet supporting text such as an owner name or a `Timestamp`. */
|
|
13
|
+
readonly meta?: ReactNode;
|
|
14
|
+
/** The record's own buttons or links, drawn in a row at the foot of the card. */
|
|
15
|
+
readonly actions?: ReactNode;
|
|
16
|
+
/** The column ids this card may move to. Left out offers every other column; an empty list offers none. */
|
|
17
|
+
readonly moveTargets?: ReadonlyArray<string> | undefined;
|
|
18
|
+
};
|
|
19
|
+
/** One named column with its records in the order to show them. */
|
|
20
|
+
export type CardColumn<Item> = {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly title: string;
|
|
23
|
+
readonly items: ReadonlyArray<Item>;
|
|
24
|
+
/** Replaces the shared empty text for this column. */
|
|
25
|
+
readonly empty?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
/** The request to move a card. Elements changes nothing: the application moves the record and supplies new columns. */
|
|
28
|
+
export type CardMoveDetails<Item> = {
|
|
29
|
+
readonly item: Item;
|
|
30
|
+
readonly fromColumnId: string;
|
|
31
|
+
readonly toColumnId: string;
|
|
32
|
+
};
|
|
33
|
+
/** Whether the supplied columns are current. A pending or failed read never shows a false empty column. */
|
|
34
|
+
export type CardColumnsStatus = 'ready' | 'pending' | 'failed';
|
|
35
|
+
export type CardColumnsLabels = {
|
|
36
|
+
/** Starts each card's move control name, followed by the card title. */
|
|
37
|
+
readonly moveCard: string;
|
|
38
|
+
/** Names the list of destination columns in a card's move menu. */
|
|
39
|
+
readonly moveTo: string;
|
|
40
|
+
readonly empty: string;
|
|
41
|
+
readonly loading: string;
|
|
42
|
+
readonly failed: string;
|
|
43
|
+
};
|
|
44
|
+
export declare const defaultLabels: {
|
|
45
|
+
readonly moveCard: 'Move';
|
|
46
|
+
readonly moveTo: 'Move to';
|
|
47
|
+
readonly empty: 'No cards';
|
|
48
|
+
readonly loading: 'Loading';
|
|
49
|
+
readonly failed: 'Could not load';
|
|
50
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CardColumn, CardColumnsLabels, CardColumnsStatus, CardMoveDetails, CardSummary } from './card-columns-model.ts';
|
|
3
|
+
type ColumnHeight = 'bounded' | 'fill';
|
|
4
|
+
export type CardColumnsProps<Item> = {
|
|
5
|
+
/** Names the whole board, such as "Tasks by state". */
|
|
6
|
+
readonly label: string;
|
|
7
|
+
/** The columns in display order, each with its records in display order. The application filters and sorts. */
|
|
8
|
+
readonly columns: ReadonlyArray<CardColumn<Item>>;
|
|
9
|
+
readonly getCardId: (item: Item) => string;
|
|
10
|
+
/** Maps a record onto what its card shows. */
|
|
11
|
+
readonly getCard: (item: Item) => CardSummary;
|
|
12
|
+
/** Formats each column's count. */
|
|
13
|
+
readonly locale: string;
|
|
14
|
+
/**
|
|
15
|
+
* Reports the request to move a card to another column. Leave it out for a read-only board, which draws no move
|
|
16
|
+
* controls. The application changes the record and supplies the new columns.
|
|
17
|
+
*/
|
|
18
|
+
readonly onMoveCard?: ((details: CardMoveDetails<Item>) => void) | undefined;
|
|
19
|
+
/** `bounded` caps each column's height and scrolls its cards. `fill` takes the height of the parent. */
|
|
20
|
+
readonly columnHeight?: ColumnHeight;
|
|
21
|
+
readonly status?: CardColumnsStatus;
|
|
22
|
+
readonly labels?: Partial<CardColumnsLabels> | undefined;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Cards in named columns, such as work by state, with an optional keyboard-accessible move menu on each card. The
|
|
26
|
+
* application owns the records, their order, who may move a card and the result of a move. Use `DataTable` to compare
|
|
27
|
+
* records across shared columns.
|
|
28
|
+
*/
|
|
29
|
+
export declare function CardColumns<Item>({ label, columns, status, columnHeight, labels, ...columnProps }: CardColumnsProps<Item>): ReactNode;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { PageLayout } from '../../layout/src/index.ts';
|
|
3
|
+
import type { OptionalSelection, SortProperties, TableRowsProps } from './data-table-rows.tsx';
|
|
4
|
+
import type { ControlledTableQuery, LocalTableQuery } from './table-query.tsx';
|
|
5
|
+
/** Retain rows, including an empty result, only while the same dataset remains authorized. */
|
|
6
|
+
export type CollectionRead<Row> = {
|
|
7
|
+
readonly state: 'ready';
|
|
8
|
+
readonly rows: ReadonlyArray<Row>;
|
|
9
|
+
} | {
|
|
10
|
+
readonly state: 'pending';
|
|
11
|
+
readonly rows?: ReadonlyArray<Row>;
|
|
12
|
+
} | {
|
|
13
|
+
readonly state: 'failed';
|
|
14
|
+
readonly failure: ReactNode;
|
|
15
|
+
readonly rows?: ReadonlyArray<Row>;
|
|
16
|
+
};
|
|
17
|
+
type QueryProps<Row> = {
|
|
18
|
+
readonly query: LocalTableQuery<Row>;
|
|
19
|
+
readonly pagination?: never;
|
|
20
|
+
readonly onEndReached?: never;
|
|
21
|
+
} | ({
|
|
22
|
+
readonly query: ControlledTableQuery;
|
|
23
|
+
} & Pick<TableRowsProps<Row>, 'pagination' | 'onEndReached'>);
|
|
24
|
+
type CollectionProps<Row> = SortProperties<Row> & OptionalSelection<Row> & QueryProps<Row> & Pick<TableRowsProps<Row>, 'getRowId' | 'empty' | 'filteredEmpty' | 'rowAction' | 'activeRowId' | 'focusRowId' | 'onRowHighlightChange' | 'hideHeaders' | 'rowSizing' | 'window' | 'footer' | 'endContent'> & {
|
|
25
|
+
readonly title: string;
|
|
26
|
+
readonly caption?: string;
|
|
27
|
+
readonly read: CollectionRead<Row>;
|
|
28
|
+
readonly actions?: ReactNode;
|
|
29
|
+
/** Approximate the initial page size when reserving the cold read's row geometry. */
|
|
30
|
+
readonly placeholderRows?: number;
|
|
31
|
+
};
|
|
32
|
+
export type CollectionPageProps<Row> = CollectionProps<Row> & {
|
|
33
|
+
readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
|
|
34
|
+
};
|
|
35
|
+
export type CollectionSectionProps<Row> = CollectionProps<Row> & {
|
|
36
|
+
readonly id?: string;
|
|
37
|
+
readonly meta?: ReactNode;
|
|
38
|
+
};
|
|
39
|
+
/** A full-width primary list with its query in the page title. Supply controlled values for server-paged data. */
|
|
40
|
+
export declare function CollectionPage<Row extends object>({ navigation, ...props }: CollectionPageProps<Row>): ReactNode;
|
|
41
|
+
/** A full-width collection within a record or tab. Its title, query controls and rows share one geometry owner. */
|
|
42
|
+
export declare function CollectionSection<Row extends object>({ id, meta, ...props }: CollectionSectionProps<Row>): ReactNode;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { CardColumnsLabels, CardSummary } from './card-columns-model.ts';
|
|
3
|
+
type Destination = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
};
|
|
7
|
+
type ColumnCardProps = {
|
|
8
|
+
readonly summary: CardSummary;
|
|
9
|
+
readonly destinations: ReadonlyArray<Destination>;
|
|
10
|
+
readonly labels: CardColumnsLabels;
|
|
11
|
+
readonly onMove: (toColumnId: string) => void;
|
|
12
|
+
};
|
|
13
|
+
/** One card in a column. The move menu lists the supplied destinations and reports the choice. */
|
|
14
|
+
export declare function ColumnCard({ summary, destinations, labels, onMove }: ColumnCardProps): ReactNode;
|
|
15
|
+
export {};
|
|
@@ -51,6 +51,8 @@ export type DataTableColumnLayout = {
|
|
|
51
51
|
readonly role: DataTableColumnRole;
|
|
52
52
|
readonly width?: number;
|
|
53
53
|
readonly isSecondary?: boolean;
|
|
54
|
+
/** Match rich cell geometry on the first read, such as a label with a second line. */
|
|
55
|
+
readonly placeholder?: ReactNode;
|
|
54
56
|
};
|
|
55
57
|
export type DataTableColumn<Row> = DataTableColumnLayout & {
|
|
56
58
|
readonly cell: (row: Row) => ReactNode;
|
|
@@ -7,7 +7,7 @@ export type DataTableWindow = {
|
|
|
7
7
|
readonly height: number | 'fill';
|
|
8
8
|
readonly estimatedRowHeight?: number;
|
|
9
9
|
};
|
|
10
|
-
type SortProperties<Row> = {
|
|
10
|
+
export type SortProperties<Row> = {
|
|
11
11
|
readonly columns: ReadonlyArray<DataTableColumn<Row>>;
|
|
12
12
|
readonly sort: DataTableSort | undefined;
|
|
13
13
|
readonly onSortChange: (sort: DataTableSort | undefined, details: DataTableSortDetails) => void;
|
|
@@ -23,7 +23,7 @@ type SelectionProperties<Row> = {
|
|
|
23
23
|
readonly onSelectionChange: (selectedIds: ReadonlySet<string>, details: DataTableSelectionDetails) => void;
|
|
24
24
|
readonly selectionLabel: (row: Row) => string;
|
|
25
25
|
};
|
|
26
|
-
type OptionalSelection<Row> = SelectionProperties<Row> | {
|
|
26
|
+
export type OptionalSelection<Row> = SelectionProperties<Row> | {
|
|
27
27
|
readonly selectedIds?: never;
|
|
28
28
|
readonly onSelectionChange?: never;
|
|
29
29
|
readonly selectionLabel?: never;
|
|
@@ -48,7 +48,8 @@ export type TableRowsProps<Row> = SortProperties<Row> & OptionalSelection<Row> &
|
|
|
48
48
|
readonly pagination?: CollectionPaginationProps;
|
|
49
49
|
readonly resultStatus?: TableResultStatus;
|
|
50
50
|
};
|
|
51
|
-
export declare function TableRows<Row extends object>({ rows, columns: suppliedColumns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, onRowHighlightChange, hideCaption, hideHeaders, rowSizing, window, endContent, onEndReached, footer, pagination, resultStatus, isPlaceholder, }: TableRowsProps<Row> & {
|
|
51
|
+
export declare function TableRows<Row extends object>({ rows, columns: suppliedColumns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, onRowHighlightChange, hideCaption, hideHeaders, rowSizing, window, endContent, onEndReached, footer, pagination, resultStatus, isPlaceholder, hasSelectionColumn, }: TableRowsProps<Row> & {
|
|
52
52
|
isPlaceholder?: boolean;
|
|
53
|
+
hasSelectionColumn?: boolean;
|
|
53
54
|
}): ReactNode;
|
|
54
55
|
export {};
|