@box-kite/react 2.0.0 → 2.1.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/.claude/rules/box-kite-rules.md +16 -0
- package/.claude/skills/box-kite/SKILL.md +16 -0
- package/.claude/skills/box-kite/references/components.md +8 -3
- package/.claude/skills/box-kite/references/patterns.md +23 -0
- package/.cursor/rules/box-kite.mdc +16 -0
- package/AGENTS.md +19 -0
- package/BOX_AI_CONTEXT.md +562 -1
- package/BOX_KITE_AI_CONTEXT.md +562 -1
- package/README.md +39 -7
- package/catalog.cjs +1 -0
- package/catalog.d.ts +8 -0
- package/catalog.mjs +2333 -0
- package/client.cjs +1 -1
- package/client.mjs +40 -42
- package/components/agent.cjs +1 -0
- package/components/agent.d.ts +215 -0
- package/components/agent.mjs +405 -0
- package/components/chart.d.ts +1 -0
- package/components/dashboard.cjs +1 -0
- package/components/dashboard.d.ts +121 -0
- package/components/dashboard.mjs +690 -0
- package/components/dataGrid/components/dataGridBody.d.ts +2 -1
- package/components/dataGrid/components/dataGridDetailRow.d.ts +13 -2
- package/components/dataGrid/components/dataGridGroupRow.d.ts +13 -2
- package/components/dataGrid/components/dataGridRow.d.ts +13 -2
- package/components/dataGrid/contracts/dataGridContract.d.ts +66 -2
- package/components/dataGrid/models/cellModel.d.ts +3 -0
- package/components/dataGrid/models/editModel.d.ts +27 -0
- package/components/dataGrid/models/exportModel.d.ts +2 -1
- package/components/dataGrid/models/gridModel.d.ts +3 -0
- package/components/dataGrid/models/rangeModel.d.ts +119 -0
- package/components/dataGrid/models/viewportModel.d.ts +23 -2
- package/components/dataGrid/useGridNavigation.d.ts +10 -2
- package/components/dataGrid.cjs +4 -1
- package/components/dataGrid.d.ts +3 -0
- package/components/dataGrid.mjs +1056 -765
- package/components/markdown.cjs +1 -0
- package/components/markdown.d.ts +55 -0
- package/components/markdown.mjs +179 -0
- package/components/semantics.d.ts +29 -29
- package/components/skeleton.cjs +1 -0
- package/components/skeleton.d.ts +34 -0
- package/components/skeleton.mjs +25 -0
- package/dashboardSchema.cjs +1 -0
- package/dashboardSchema.mjs +78 -0
- package/docs/a11y.md +2 -3
- package/docs/catalog.md +451 -0
- package/docs/components.md +4 -0
- package/docs/index.md +3 -0
- package/docs/interop.md +237 -0
- package/docs/mcp.md +69 -0
- package/docs/props.md +3 -3
- package/interop.cjs +1 -0
- package/interop.d.ts +51 -0
- package/interop.mjs +454 -0
- package/mcp/src/data.d.ts +88 -0
- package/mcp/src/data.test.d.ts +1 -0
- package/mcp/src/engine.d.ts +23 -0
- package/mcp/src/index.d.ts +1 -0
- package/mcp/src/search.d.ts +26 -0
- package/mcp/src/search.test.d.ts +1 -0
- package/mcp/src/server.d.ts +18 -0
- package/mcp/src/server.test.d.ts +1 -0
- package/mcp/src/styles.d.ts +27 -0
- package/mcp/src/styles.test.d.ts +1 -0
- package/mcp/src/tools.d.ts +18 -0
- package/mcp/src/vocabulary.d.ts +41 -0
- package/package.json +124 -17
- package/react/spec/renderSpec.d.ts +51 -0
- package/react/spec/specBoundary.d.ts +25 -0
- package/react/spec/specRegistry.d.ts +42 -0
- package/react/spec/specRenderer.d.ts +10 -0
- package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +22 -0
- package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +13 -0
- package/registry/blocks/data-grid/invoice-rows.d.ts +15 -0
- package/registry/blocks/data-grid/invoices-grid.d.ts +1 -0
- package/registry/blocks/settings-form/settings-form.d.ts +17 -0
- package/spec.cjs +2 -0
- package/spec.d.ts +12 -0
- package/spec.mjs +382 -0
- package/specData.cjs +1 -0
- package/specData.mjs +69 -0
- package/specDefs.cjs +1 -0
- package/specDefs.mjs +33 -0
- package/specSchema.cjs +1 -0
- package/specSchema.mjs +88 -0
- package/utils/agent/agentUtils.d.ts +81 -0
- package/utils/catalog/catalogContracts.d.ts +19 -0
- package/utils/catalog/catalogManifest.d.ts +8 -0
- package/utils/dashboard/dashboardSchema.d.ts +18 -0
- package/utils/dashboard/dashboardUtils.d.ts +97 -0
- package/utils/interop/a2uiInterop.d.ts +82 -0
- package/utils/interop/assistantUiInterop.d.ts +34 -0
- package/utils/interop/toolInterop.d.ts +30 -0
- package/utils/spec/specData.d.ts +19 -0
- package/utils/spec/specDefs.d.ts +11 -0
- package/utils/spec/specProps.d.ts +15 -0
- package/utils/spec/specSchema.d.ts +23 -0
- package/utils/spec/specTypes.d.ts +71 -0
- package/utils/spec/specValidate.d.ts +10 -0
package/spec.mjs
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as e } from "./effects.mjs";
|
|
3
|
+
import { t } from "./specSchema.mjs";
|
|
4
|
+
import { t as n } from "./specData.mjs";
|
|
5
|
+
import { Component as r, Fragment as i, createElement as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
7
|
+
//#region src/utils/spec/specValidate.ts
|
|
8
|
+
var u;
|
|
9
|
+
(function(e) {
|
|
10
|
+
let t = [
|
|
11
|
+
"__proto__",
|
|
12
|
+
"constructor",
|
|
13
|
+
"prototype"
|
|
14
|
+
], n = /* @__PURE__ */ new Map();
|
|
15
|
+
function r(e) {
|
|
16
|
+
if (!n.has(e)) try {
|
|
17
|
+
n.set(e, new RegExp(e));
|
|
18
|
+
} catch {
|
|
19
|
+
n.set(e, null);
|
|
20
|
+
}
|
|
21
|
+
return n.get(e) ?? null;
|
|
22
|
+
}
|
|
23
|
+
function i(e) {
|
|
24
|
+
return !t.includes(e);
|
|
25
|
+
}
|
|
26
|
+
e.isSafeKey = i;
|
|
27
|
+
function a(e) {
|
|
28
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
29
|
+
}
|
|
30
|
+
e.isPlainObject = a;
|
|
31
|
+
function o(e, t) {
|
|
32
|
+
if (!e.$ref) return e;
|
|
33
|
+
let n = e.$ref.startsWith("#/$defs/") ? e.$ref.slice(8) : null, r = n ? t.$defs?.[n] : void 0;
|
|
34
|
+
return r ? o(r, t) : null;
|
|
35
|
+
}
|
|
36
|
+
function s(e, t, n) {
|
|
37
|
+
return !a(t) || e.required?.some((e) => !(e in t)) ? !1 : Object.keys(t).every((r) => {
|
|
38
|
+
let a = e.properties?.[r];
|
|
39
|
+
return a ? i(r) && c(a, t[r], n) : e.additionalProperties !== !1 && i(r);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function c(e, t, n = e) {
|
|
43
|
+
let i = o(e, n);
|
|
44
|
+
if (!i) return !1;
|
|
45
|
+
if (i.anyOf) return i.anyOf.some((e) => c(e, t, n));
|
|
46
|
+
if (i.enum && !i.enum.includes(t)) return !1;
|
|
47
|
+
switch (i.type) {
|
|
48
|
+
case "string": return typeof t == "string" ? !i.pattern || (r(i.pattern)?.test(t) ?? !1) : !1;
|
|
49
|
+
case "number": return typeof t == "number" && Number.isFinite(t);
|
|
50
|
+
case "integer": return typeof t == "number" && Number.isInteger(t);
|
|
51
|
+
case "boolean": return typeof t == "boolean";
|
|
52
|
+
case "array": return Array.isArray(t) && (!i.items || t.every((e) => c(i.items, e, n)));
|
|
53
|
+
case "object": return s(i, t, n);
|
|
54
|
+
default: return t !== void 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
e.matches = c;
|
|
58
|
+
})(u ||= {});
|
|
59
|
+
var d = u, f;
|
|
60
|
+
(function(e) {
|
|
61
|
+
function t(e) {
|
|
62
|
+
let t = JSON.stringify(e) ?? "undefined";
|
|
63
|
+
return t.length > 40 ? `${t.slice(0, 39)}…` : t;
|
|
64
|
+
}
|
|
65
|
+
function r(e, t) {
|
|
66
|
+
return typeof e == "string" ? { action: e } : !d.isPlainObject(e) || typeof e.action != "string" ? null : {
|
|
67
|
+
action: e.action,
|
|
68
|
+
payload: n.deep(e.payload, t)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function i(e, i, a, o) {
|
|
72
|
+
let s = typeof e.type == "string" ? e.type : void 0, c = [], l = {}, u = {}, f = i.props, p = f?.properties;
|
|
73
|
+
if (d.isPlainObject(e.props)) for (let [r, i] of Object.entries(e.props)) {
|
|
74
|
+
let e = `${o}.props.${r}`;
|
|
75
|
+
if (!d.isSafeKey(r)) {
|
|
76
|
+
c.push({
|
|
77
|
+
code: "unknown-prop",
|
|
78
|
+
path: e,
|
|
79
|
+
component: s,
|
|
80
|
+
prop: r,
|
|
81
|
+
message: `${r} is not a prop a spec can set.`
|
|
82
|
+
});
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
let u = p?.[r];
|
|
86
|
+
if (!u && (!f || f.additionalProperties === !1)) {
|
|
87
|
+
c.push({
|
|
88
|
+
code: "unknown-prop",
|
|
89
|
+
path: e,
|
|
90
|
+
component: s,
|
|
91
|
+
prop: r,
|
|
92
|
+
message: `${s ?? "The component"} has no ${r} prop.`
|
|
93
|
+
});
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
let m = null, h = n.deep(i, a, (e) => {
|
|
97
|
+
m ??= e;
|
|
98
|
+
});
|
|
99
|
+
if (m) {
|
|
100
|
+
c.push({
|
|
101
|
+
code: "unresolved-data",
|
|
102
|
+
path: e,
|
|
103
|
+
component: s,
|
|
104
|
+
prop: r,
|
|
105
|
+
message: `${m} resolved to nothing.`
|
|
106
|
+
});
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (u && !d.matches(u, h, f)) {
|
|
110
|
+
c.push({
|
|
111
|
+
code: "invalid-prop",
|
|
112
|
+
path: e,
|
|
113
|
+
component: s,
|
|
114
|
+
prop: r,
|
|
115
|
+
message: `${t(h)} is not a value ${r} takes.`
|
|
116
|
+
});
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
l[r] = h;
|
|
120
|
+
}
|
|
121
|
+
if (d.isPlainObject(e.on)) for (let [t, n] of Object.entries(e.on)) {
|
|
122
|
+
let e = `${o}.on.${t}`, l = i.events.includes(t) ? r(n, a) : null;
|
|
123
|
+
if (!l) {
|
|
124
|
+
c.push({
|
|
125
|
+
code: "unknown-event",
|
|
126
|
+
path: e,
|
|
127
|
+
component: s,
|
|
128
|
+
prop: t,
|
|
129
|
+
message: `${s ?? "The component"} has no ${t} event.`
|
|
130
|
+
});
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
u[t] = l;
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
props: l,
|
|
137
|
+
actions: u,
|
|
138
|
+
issues: c,
|
|
139
|
+
missing: (f?.required ?? []).filter((e) => !(e in l))
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
e.resolve = i;
|
|
143
|
+
})(f ||= {});
|
|
144
|
+
var p = f, m = class extends r {
|
|
145
|
+
state = {
|
|
146
|
+
message: null,
|
|
147
|
+
resetKey: this.props.resetKey
|
|
148
|
+
};
|
|
149
|
+
static getDerivedStateFromProps(e, t) {
|
|
150
|
+
return e.resetKey === t.resetKey ? null : {
|
|
151
|
+
message: null,
|
|
152
|
+
resetKey: e.resetKey
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
static getDerivedStateFromError(e) {
|
|
156
|
+
return { message: e instanceof Error ? e.message : String(e) };
|
|
157
|
+
}
|
|
158
|
+
componentDidCatch(e) {
|
|
159
|
+
this.props.onError?.(this.issue(e instanceof Error ? e.message : String(e)));
|
|
160
|
+
}
|
|
161
|
+
issue(e) {
|
|
162
|
+
return {
|
|
163
|
+
code: "render-error",
|
|
164
|
+
path: this.props.path,
|
|
165
|
+
component: this.props.component,
|
|
166
|
+
message: e
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
render() {
|
|
170
|
+
return this.state.message === null ? this.props.children : this.props.fallback(this.issue(this.state.message));
|
|
171
|
+
}
|
|
172
|
+
}, h = 1e3, g = 32;
|
|
173
|
+
function _(e, t) {
|
|
174
|
+
e.issues.push(t);
|
|
175
|
+
}
|
|
176
|
+
function v(e, t, n) {
|
|
177
|
+
_(e, t);
|
|
178
|
+
let r = e.fallback(t);
|
|
179
|
+
return n === void 0 || r == null ? r ?? null : a(i, { key: n }, r);
|
|
180
|
+
}
|
|
181
|
+
function y(e, t, r, i, a) {
|
|
182
|
+
if (e == null || typeof e == "boolean") return null;
|
|
183
|
+
if (typeof e == "string" || typeof e == "number") return e;
|
|
184
|
+
if (Array.isArray(e)) return e.map((e, n) => y(e, t, r, `${i}.${n}`, a));
|
|
185
|
+
if (n.isRef(e)) {
|
|
186
|
+
let a = n.resolve(e, r);
|
|
187
|
+
return a.found ? a.value === null || a.value === void 0 || typeof a.value == "boolean" ? null : typeof a.value == "string" || typeof a.value == "number" ? a.value : (_(t, {
|
|
188
|
+
code: "invalid-child",
|
|
189
|
+
path: i,
|
|
190
|
+
message: `${n.pathOf(e)} is not text.`
|
|
191
|
+
}), null) : (_(t, {
|
|
192
|
+
code: "unresolved-data",
|
|
193
|
+
path: i,
|
|
194
|
+
message: `${n.pathOf(e)} resolved to nothing.`
|
|
195
|
+
}), null);
|
|
196
|
+
}
|
|
197
|
+
return d.isPlainObject(e) ? "type" in e ? typeof e.type == "string" ? e.type === "" ? null : x(e, t, r, i, a, e.type) : (_(t, {
|
|
198
|
+
code: "invalid-child",
|
|
199
|
+
path: i,
|
|
200
|
+
message: "A node names its component in `type`."
|
|
201
|
+
}), null) : null : (_(t, {
|
|
202
|
+
code: "invalid-child",
|
|
203
|
+
path: i,
|
|
204
|
+
message: "A child is a node, text, or a reference to text."
|
|
205
|
+
}), null);
|
|
206
|
+
}
|
|
207
|
+
function b(e, t, r, i, a, o) {
|
|
208
|
+
let s = e.repeat;
|
|
209
|
+
if (!n.isRef(s)) return v(t, {
|
|
210
|
+
code: "invalid-repeat",
|
|
211
|
+
path: `${i}.repeat`,
|
|
212
|
+
component: o,
|
|
213
|
+
message: "A repeat is a reference to an array."
|
|
214
|
+
});
|
|
215
|
+
let c = n.resolve(s, r);
|
|
216
|
+
if (!c.found) return _(t, {
|
|
217
|
+
code: "unresolved-data",
|
|
218
|
+
path: `${i}.repeat`,
|
|
219
|
+
component: o,
|
|
220
|
+
message: `${n.pathOf(s)} resolved to nothing.`
|
|
221
|
+
}), null;
|
|
222
|
+
if (!Array.isArray(c.value)) return v(t, {
|
|
223
|
+
code: "invalid-repeat",
|
|
224
|
+
path: `${i}.repeat`,
|
|
225
|
+
component: o,
|
|
226
|
+
message: `${n.pathOf(s)} is not an array.`
|
|
227
|
+
});
|
|
228
|
+
let l = typeof e.key == "string" ? e.key : i;
|
|
229
|
+
return c.value.map((n, s) => S(e, t, {
|
|
230
|
+
data: r.data,
|
|
231
|
+
item: n,
|
|
232
|
+
index: s,
|
|
233
|
+
repeating: !0
|
|
234
|
+
}, i, a, o, `${l}#${s}`));
|
|
235
|
+
}
|
|
236
|
+
function x(e, t, n, r, i, a) {
|
|
237
|
+
return i > t.maxDepth ? v(t, {
|
|
238
|
+
code: "too-deep",
|
|
239
|
+
path: r,
|
|
240
|
+
component: a,
|
|
241
|
+
message: `Nested deeper than the ${t.maxDepth} levels allowed.`
|
|
242
|
+
}) : e.repeat === void 0 ? S(e, t, n, r, i, a, typeof e.key == "string" ? e.key : r) : b(e, t, n, r, i, a);
|
|
243
|
+
}
|
|
244
|
+
function S(e, t, n, r, i, o, s) {
|
|
245
|
+
if (t.nodes += 1, t.nodes > t.maxNodes) return t.overflowed || (t.overflowed = !0, _(t, {
|
|
246
|
+
code: "too-many-nodes",
|
|
247
|
+
path: r,
|
|
248
|
+
component: o,
|
|
249
|
+
message: `More than the ${t.maxNodes} nodes allowed.`
|
|
250
|
+
})), null;
|
|
251
|
+
let c = t.registry.get(o);
|
|
252
|
+
if (!c) return v(t, {
|
|
253
|
+
code: "unknown-component",
|
|
254
|
+
path: r,
|
|
255
|
+
component: o,
|
|
256
|
+
message: `${o} is not a component this app allows.`
|
|
257
|
+
}, s);
|
|
258
|
+
let u = p.resolve(e, c, n, r), f = { ...u.props };
|
|
259
|
+
t.issues.push(...u.issues);
|
|
260
|
+
let h = t.memory?.get(`${r}:${o}`);
|
|
261
|
+
if (u.missing.length) {
|
|
262
|
+
if (!(h && u.missing.every((e) => e in h))) {
|
|
263
|
+
let e = u.missing.join(", ");
|
|
264
|
+
return v(t, {
|
|
265
|
+
code: "missing-prop",
|
|
266
|
+
path: r,
|
|
267
|
+
component: o,
|
|
268
|
+
prop: u.missing[0],
|
|
269
|
+
message: `${o} cannot render without ${e}.`
|
|
270
|
+
}, s);
|
|
271
|
+
}
|
|
272
|
+
for (let e of u.missing) f[e] = h[e];
|
|
273
|
+
}
|
|
274
|
+
if (t.memory) {
|
|
275
|
+
let e = c.props?.required ?? [];
|
|
276
|
+
e.length && t.memory.set(`${r}:${o}`, Object.fromEntries(e.map((e) => [e, f[e]])));
|
|
277
|
+
}
|
|
278
|
+
for (let [e, n] of Object.entries(u.actions)) f[e] = (...i) => t.onAction?.(n.action, {
|
|
279
|
+
payload: n.payload,
|
|
280
|
+
args: i,
|
|
281
|
+
prop: e,
|
|
282
|
+
component: o,
|
|
283
|
+
path: r
|
|
284
|
+
});
|
|
285
|
+
if (e.children !== void 0 && (c.slots.includes("default") ? f.children = y(e.children, t, n, `${r}.children`, i + 1) : _(t, {
|
|
286
|
+
code: "unknown-slot",
|
|
287
|
+
path: `${r}.children`,
|
|
288
|
+
component: o,
|
|
289
|
+
message: `${o} takes no children.`
|
|
290
|
+
})), d.isPlainObject(e.slots)) for (let [a, s] of Object.entries(e.slots)) {
|
|
291
|
+
let e = `${r}.slots.${a}`;
|
|
292
|
+
if (!d.isSafeKey(a) || !c.slots.includes(a)) {
|
|
293
|
+
_(t, {
|
|
294
|
+
code: "unknown-slot",
|
|
295
|
+
path: e,
|
|
296
|
+
component: o,
|
|
297
|
+
message: `${o} has no ${a} slot.`
|
|
298
|
+
});
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
f[a === "default" ? "children" : a] = y(s, t, n, e, i + 1);
|
|
302
|
+
}
|
|
303
|
+
return /* @__PURE__ */ l(m, {
|
|
304
|
+
path: r,
|
|
305
|
+
component: o,
|
|
306
|
+
resetKey: t.resetKey,
|
|
307
|
+
fallback: t.fallback,
|
|
308
|
+
onError: t.onError,
|
|
309
|
+
children: a(c.component, f)
|
|
310
|
+
}, s);
|
|
311
|
+
}
|
|
312
|
+
function C(e, t) {
|
|
313
|
+
let n = {
|
|
314
|
+
registry: t.registry,
|
|
315
|
+
data: t.data,
|
|
316
|
+
onAction: t.onAction,
|
|
317
|
+
onError: t.onError,
|
|
318
|
+
fallback: t.fallback ?? (() => null),
|
|
319
|
+
maxNodes: t.maxNodes ?? h,
|
|
320
|
+
maxDepth: t.maxDepth ?? g,
|
|
321
|
+
resetKey: t.resetKey,
|
|
322
|
+
memory: t.memory,
|
|
323
|
+
issues: [],
|
|
324
|
+
nodes: 0,
|
|
325
|
+
overflowed: !1
|
|
326
|
+
};
|
|
327
|
+
return {
|
|
328
|
+
element: y(e, n, { data: t.data }, "spec", 0),
|
|
329
|
+
issues: n.issues
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/react/spec/specRenderer.tsx
|
|
334
|
+
function w(t) {
|
|
335
|
+
let n = s(t);
|
|
336
|
+
return e(() => {
|
|
337
|
+
n.current = t;
|
|
338
|
+
}), n;
|
|
339
|
+
}
|
|
340
|
+
function T({ spec: e, onIssues: t, ...n }) {
|
|
341
|
+
let [r] = c(() => /* @__PURE__ */ new Map()), { element: i, issues: a } = C(e, {
|
|
342
|
+
...n,
|
|
343
|
+
memory: r,
|
|
344
|
+
resetKey: e,
|
|
345
|
+
onError: (e) => t?.([e])
|
|
346
|
+
}), s = w(t), l = w(a), u = a.map((e) => `${e.code} ${e.path} ${e.message}`).join("\n");
|
|
347
|
+
return o(() => {
|
|
348
|
+
s.current?.(l.current);
|
|
349
|
+
}, [
|
|
350
|
+
u,
|
|
351
|
+
l,
|
|
352
|
+
s
|
|
353
|
+
]), i;
|
|
354
|
+
}
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region src/react/spec/specRegistry.ts
|
|
357
|
+
function E(e) {
|
|
358
|
+
return typeof e == "object" && !!e && "component" in e;
|
|
359
|
+
}
|
|
360
|
+
function D(e, t, n) {
|
|
361
|
+
let r = E(t) ? t : { component: t }, i = n?.components[e];
|
|
362
|
+
return {
|
|
363
|
+
component: r.component,
|
|
364
|
+
props: r.props ?? i?.props,
|
|
365
|
+
slots: r.slots ?? i?.slots ?? ["default"],
|
|
366
|
+
events: r.events ?? i?.events ?? [],
|
|
367
|
+
description: r.description ?? i?.description
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
function O(e) {
|
|
371
|
+
let t = Object.keys(e.components), n = new Map(t.map((t) => [t, D(t, e.components[t], e.catalog)]));
|
|
372
|
+
return {
|
|
373
|
+
names: t,
|
|
374
|
+
components: Object.fromEntries([...n].map(([e, { component: t, ...n }]) => [e, n])),
|
|
375
|
+
get: (e) => n.get(e)
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/spec.ts
|
|
380
|
+
var k = d.matches;
|
|
381
|
+
//#endregion
|
|
382
|
+
export { T as SpecRenderer, T as default, O as createSpecRegistry, k as matchesSchema, C as renderSpec, t as specSchema };
|
package/specData.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e;(function(e){function t(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.keys(e);if(t.length!==1)return!1;let n=e;return t[0]===`$data`?typeof n.$data==`string`:t[0]===`$item`?typeof n.$item==`string`:t[0]===`$index`&&n.$index===!0}e.isRef=t;function n(e){return e===``||e===`.`||e===`/`?[]:e.startsWith(`/`)?e.slice(1).split(`/`):e.split(`.`)}function r(e,t){if(Array.isArray(e)){let n=/^\d+$/.test(t)?Number(t):-1;return n>=0&&n<e.length?{value:e[n],found:!0}:{value:void 0,found:!1}}return typeof e==`object`&&e&&Object.hasOwn(e,t)?{value:e[t],found:!0}:{value:void 0,found:!1}}function i(e,t){if(`$index`in e)return t.repeating?{value:t.index,found:!0}:{value:void 0,found:!1};let i=`$item`in e?e.$item:e.$data,a=`$item`in e?t.item:t.data;return`$item`in e&&!t.repeating?{value:void 0,found:!1}:n(i).reduce((e,t)=>e.found?r(e.value,t):e,{value:a,found:!0})}e.resolve=i;function a(e){return`$index`in e?`$index`:`$item`in e?`$item ${e.$item}`:`$data ${e.$data}`}e.pathOf=a;function o(e,n,r,s=0){if(!(s>16)){if(t(e)){let t=i(e,n);return t.found||r?.(a(e)),t.value}return Array.isArray(e)?e.map(e=>o(e,n,r,s+1)):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,o(t,n,r,s+1)])):e}}e.deep=o})(e||={});var t=e;Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
package/specData.mjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region src/utils/spec/specData.ts
|
|
2
|
+
var e;
|
|
3
|
+
(function(e) {
|
|
4
|
+
function t(e) {
|
|
5
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return !1;
|
|
6
|
+
let t = Object.keys(e);
|
|
7
|
+
if (t.length !== 1) return !1;
|
|
8
|
+
let n = e;
|
|
9
|
+
return t[0] === "$data" ? typeof n.$data == "string" : t[0] === "$item" ? typeof n.$item == "string" : t[0] === "$index" && n.$index === !0;
|
|
10
|
+
}
|
|
11
|
+
e.isRef = t;
|
|
12
|
+
function n(e) {
|
|
13
|
+
return e === "" || e === "." || e === "/" ? [] : e.startsWith("/") ? e.slice(1).split("/") : e.split(".");
|
|
14
|
+
}
|
|
15
|
+
function r(e, t) {
|
|
16
|
+
if (Array.isArray(e)) {
|
|
17
|
+
let n = /^\d+$/.test(t) ? Number(t) : -1;
|
|
18
|
+
return n >= 0 && n < e.length ? {
|
|
19
|
+
value: e[n],
|
|
20
|
+
found: !0
|
|
21
|
+
} : {
|
|
22
|
+
value: void 0,
|
|
23
|
+
found: !1
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return typeof e == "object" && e && Object.hasOwn(e, t) ? {
|
|
27
|
+
value: e[t],
|
|
28
|
+
found: !0
|
|
29
|
+
} : {
|
|
30
|
+
value: void 0,
|
|
31
|
+
found: !1
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function i(e, t) {
|
|
35
|
+
if ("$index" in e) return t.repeating ? {
|
|
36
|
+
value: t.index,
|
|
37
|
+
found: !0
|
|
38
|
+
} : {
|
|
39
|
+
value: void 0,
|
|
40
|
+
found: !1
|
|
41
|
+
};
|
|
42
|
+
let i = "$item" in e ? e.$item : e.$data, a = "$item" in e ? t.item : t.data;
|
|
43
|
+
return "$item" in e && !t.repeating ? {
|
|
44
|
+
value: void 0,
|
|
45
|
+
found: !1
|
|
46
|
+
} : n(i).reduce((e, t) => e.found ? r(e.value, t) : e, {
|
|
47
|
+
value: a,
|
|
48
|
+
found: !0
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
e.resolve = i;
|
|
52
|
+
function a(e) {
|
|
53
|
+
return "$index" in e ? "$index" : "$item" in e ? `$item ${e.$item}` : `$data ${e.$data}`;
|
|
54
|
+
}
|
|
55
|
+
e.pathOf = a;
|
|
56
|
+
function o(e, n, r, s = 0) {
|
|
57
|
+
if (!(s > 16)) {
|
|
58
|
+
if (t(e)) {
|
|
59
|
+
let t = i(e, n);
|
|
60
|
+
return t.found || r?.(a(e)), t.value;
|
|
61
|
+
}
|
|
62
|
+
return Array.isArray(e) ? e.map((e) => o(e, n, r, s + 1)) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, o(t, n, r, s + 1)])) : e;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
e.deep = o;
|
|
66
|
+
})(e ||= {});
|
|
67
|
+
var t = e;
|
|
68
|
+
//#endregion
|
|
69
|
+
export { t };
|
package/specDefs.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e;(function(e){function t(e,n){let r={...e};if(r.$ref?.startsWith(`#/$defs/`)){let e=n[r.$ref.slice(8)];e&&(r.$ref=`#/$defs/${e}`)}return r.anyOf&&=r.anyOf.map(e=>t(e,n)),r.items&&=t(r.items,n),r.properties&&=Object.fromEntries(Object.entries(r.properties).map(([e,r])=>[e,t(r,n)])),r}function n(e,n){let{$defs:r,...i}=e;if(!r)return i;let a={};for(let[e,t]of Object.entries(r)){let r=n[e];if(!r){n[e]=t;continue}if(JSON.stringify(r)===JSON.stringify(t))continue;let i=2;for(;n[`${e}${i}`]&&JSON.stringify(n[`${e}${i}`])!==JSON.stringify(t);)i+=1;n[`${e}${i}`]=t,a[e]=`${e}${i}`}return Object.keys(a).length?t(i,a):i}e.hoist=n})(e||={});var t=e;Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
package/specDefs.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/utils/spec/specDefs.ts
|
|
2
|
+
var e;
|
|
3
|
+
(function(e) {
|
|
4
|
+
function t(e, n) {
|
|
5
|
+
let r = { ...e };
|
|
6
|
+
if (r.$ref?.startsWith("#/$defs/")) {
|
|
7
|
+
let e = n[r.$ref.slice(8)];
|
|
8
|
+
e && (r.$ref = `#/$defs/${e}`);
|
|
9
|
+
}
|
|
10
|
+
return r.anyOf &&= r.anyOf.map((e) => t(e, n)), r.items &&= t(r.items, n), r.properties &&= Object.fromEntries(Object.entries(r.properties).map(([e, r]) => [e, t(r, n)])), r;
|
|
11
|
+
}
|
|
12
|
+
function n(e, n) {
|
|
13
|
+
let { $defs: r, ...i } = e;
|
|
14
|
+
if (!r) return i;
|
|
15
|
+
let a = {};
|
|
16
|
+
for (let [e, t] of Object.entries(r)) {
|
|
17
|
+
let r = n[e];
|
|
18
|
+
if (!r) {
|
|
19
|
+
n[e] = t;
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (JSON.stringify(r) === JSON.stringify(t)) continue;
|
|
23
|
+
let i = 2;
|
|
24
|
+
for (; n[`${e}${i}`] && JSON.stringify(n[`${e}${i}`]) !== JSON.stringify(t);) i += 1;
|
|
25
|
+
n[`${e}${i}`] = t, a[e] = `${e}${i}`;
|
|
26
|
+
}
|
|
27
|
+
return Object.keys(a).length ? t(i, a) : i;
|
|
28
|
+
}
|
|
29
|
+
e.hoist = n;
|
|
30
|
+
})(e ||= {});
|
|
31
|
+
var t = e;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { t };
|
package/specSchema.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./specDefs.cjs");var t=`default`,n=`#/$defs/node`,r=`#/$defs/children`,i=`#/$defs/reference`,a=`#/$defs/action`;function o(e){return e.properties?{...e,properties:Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,{anyOf:[t,{$ref:i}]}]))}:e}function s(n,s,c,l){let u=s.slots??[`default`],d=u.filter(e=>e!==t),f=s.events??[],p=s.props&&Object.keys(s.props.properties??{}).length?e.t.hoist(s.props,c):null,m={type:{type:`string`,enum:[n]}};return p&&(m.props=l?o(p):p),u.includes(`default`)&&(m.children={$ref:r}),d.length&&(m.slots={type:`object`,properties:Object.fromEntries(d.map(e=>[e,{$ref:r}])),additionalProperties:!1}),f.length&&(m.on={type:`object`,properties:Object.fromEntries(f.map(e=>[e,{$ref:a}])),additionalProperties:!1}),l&&(m.repeat={$ref:i}),m.key={type:`string`},{...s.description?{description:s.description}:{},type:`object`,properties:m,required:p?.required?.length?[`type`,`props`]:[`type`],additionalProperties:!1}}var c={description:`A value read from the data the view is rendered against, rather than written into the spec.`,anyOf:[{type:`object`,properties:{$data:{type:`string`}},required:[`$data`],additionalProperties:!1},{type:`object`,properties:{$item:{type:`string`}},required:[`$item`],additionalProperties:!1},{type:`object`,properties:{$index:{type:`boolean`,enum:[!0]}},required:[`$index`],additionalProperties:!1}]},l={description:`What to tell the host when this happens. The host decides what it does; the spec never can.`,anyOf:[{type:`string`},{type:`object`,properties:{action:{type:`string`},payload:{type:`object`}},required:[`action`],additionalProperties:!1}]};function u(e,t={}){let r=t.bindings===!0,a=Object.keys(e.components),o={};o.node={anyOf:a.map(e=>({$ref:`#/$defs/${e}`}))},o.children={type:`array`,items:{anyOf:[{type:`string`},{type:`number`},{$ref:n},...r?[{$ref:i}]:[]]}},r&&(o.reference=c),a.some(t=>e.components[t].events?.length)&&(o.action=l);for(let e of a)o[e]={};for(let t of a)o[t]=s(t,e.components[t],o,r);return{description:`A user interface, as a tree of components the application allows.`,$defs:o,anyOf:(t.root?a.filter(e=>t.root.includes(e)):a).map(e=>({$ref:`#/$defs/${e}`}))}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
|
package/specSchema.mjs
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { t as e } from "./specDefs.mjs";
|
|
2
|
+
//#region src/utils/spec/specTypes.ts
|
|
3
|
+
var t = "default", n = "#/$defs/node", r = "#/$defs/children", i = "#/$defs/reference", a = "#/$defs/action";
|
|
4
|
+
function o(e) {
|
|
5
|
+
return e.properties ? {
|
|
6
|
+
...e,
|
|
7
|
+
properties: Object.fromEntries(Object.entries(e.properties).map(([e, t]) => [e, { anyOf: [t, { $ref: i }] }]))
|
|
8
|
+
} : e;
|
|
9
|
+
}
|
|
10
|
+
function s(n, s, c, l) {
|
|
11
|
+
let u = s.slots ?? ["default"], d = u.filter((e) => e !== t), f = s.events ?? [], p = s.props && Object.keys(s.props.properties ?? {}).length ? e.hoist(s.props, c) : null, m = { type: {
|
|
12
|
+
type: "string",
|
|
13
|
+
enum: [n]
|
|
14
|
+
} };
|
|
15
|
+
return p && (m.props = l ? o(p) : p), u.includes("default") && (m.children = { $ref: r }), d.length && (m.slots = {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: Object.fromEntries(d.map((e) => [e, { $ref: r }])),
|
|
18
|
+
additionalProperties: !1
|
|
19
|
+
}), f.length && (m.on = {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: Object.fromEntries(f.map((e) => [e, { $ref: a }])),
|
|
22
|
+
additionalProperties: !1
|
|
23
|
+
}), l && (m.repeat = { $ref: i }), m.key = { type: "string" }, {
|
|
24
|
+
...s.description ? { description: s.description } : {},
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: m,
|
|
27
|
+
required: p?.required?.length ? ["type", "props"] : ["type"],
|
|
28
|
+
additionalProperties: !1
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
var c = {
|
|
32
|
+
description: "A value read from the data the view is rendered against, rather than written into the spec.",
|
|
33
|
+
anyOf: [
|
|
34
|
+
{
|
|
35
|
+
type: "object",
|
|
36
|
+
properties: { $data: { type: "string" } },
|
|
37
|
+
required: ["$data"],
|
|
38
|
+
additionalProperties: !1
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: { $item: { type: "string" } },
|
|
43
|
+
required: ["$item"],
|
|
44
|
+
additionalProperties: !1
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: { $index: {
|
|
49
|
+
type: "boolean",
|
|
50
|
+
enum: [!0]
|
|
51
|
+
} },
|
|
52
|
+
required: ["$index"],
|
|
53
|
+
additionalProperties: !1
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}, l = {
|
|
57
|
+
description: "What to tell the host when this happens. The host decides what it does; the spec never can.",
|
|
58
|
+
anyOf: [{ type: "string" }, {
|
|
59
|
+
type: "object",
|
|
60
|
+
properties: {
|
|
61
|
+
action: { type: "string" },
|
|
62
|
+
payload: { type: "object" }
|
|
63
|
+
},
|
|
64
|
+
required: ["action"],
|
|
65
|
+
additionalProperties: !1
|
|
66
|
+
}]
|
|
67
|
+
};
|
|
68
|
+
function u(e, t = {}) {
|
|
69
|
+
let r = t.bindings === !0, a = Object.keys(e.components), o = {};
|
|
70
|
+
o.node = { anyOf: a.map((e) => ({ $ref: `#/$defs/${e}` })) }, o.children = {
|
|
71
|
+
type: "array",
|
|
72
|
+
items: { anyOf: [
|
|
73
|
+
{ type: "string" },
|
|
74
|
+
{ type: "number" },
|
|
75
|
+
{ $ref: n },
|
|
76
|
+
...r ? [{ $ref: i }] : []
|
|
77
|
+
] }
|
|
78
|
+
}, r && (o.reference = c), a.some((t) => e.components[t].events?.length) && (o.action = l);
|
|
79
|
+
for (let e of a) o[e] = {};
|
|
80
|
+
for (let t of a) o[t] = s(t, e.components[t], o, r);
|
|
81
|
+
return {
|
|
82
|
+
description: "A user interface, as a tree of components the application allows.",
|
|
83
|
+
$defs: o,
|
|
84
|
+
anyOf: (t.root ? a.filter((e) => t.root.includes(e)) : a).map((e) => ({ $ref: `#/$defs/${e}` }))
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { t as n, u as t };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The model behind the agent chrome — `<ToolCallCard>`, `<ApprovalCard>`, `<Reasoning>` and
|
|
3
|
+
* `<StreamingText>`. Four judgements, none of which needs React: what a status is *called*, how long a
|
|
4
|
+
* thought took in words, how a value a model invented becomes text that is safe to put on a page, and
|
|
5
|
+
* which part of a message arrived since the last render.
|
|
6
|
+
*
|
|
7
|
+
* The third is the reason this file exists. A tool's arguments are whatever the model produced —
|
|
8
|
+
* possibly circular, possibly a `BigInt`, possibly a megabyte — and `JSON.stringify` answers those three
|
|
9
|
+
* with a throw, a throw and a frozen tab. Components render, models decide.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Where a tool call is. The four states every agent runtime reports under its own spelling: AI SDK's
|
|
13
|
+
* `input-streaming`/`input-available`/`output-available`/`output-error`, and the plainer words the card
|
|
14
|
+
* shows. Declared out here rather than inside the namespace so a prop naming it resolves to its values —
|
|
15
|
+
* a catalog that printed the alias would constrain nothing.
|
|
16
|
+
*/
|
|
17
|
+
export type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';
|
|
18
|
+
/** What was decided about an action the agent asked permission for. `null` is "not yet". */
|
|
19
|
+
export type ApprovalDecision = 'approved' | 'rejected';
|
|
20
|
+
declare namespace AgentUtils {
|
|
21
|
+
function statusLabel(status: ToolCallStatus): string;
|
|
22
|
+
function decisionLabel(decision: ApprovalDecision): string;
|
|
23
|
+
/**
|
|
24
|
+
* How much of a value the card will show. Past this the text is cut and a line says how much was left —
|
|
25
|
+
* a model that returned a 4 MB tool result should cost a scroll bar, not the frame it is painted in.
|
|
26
|
+
*/
|
|
27
|
+
const VALUE_LIMIT = 20000;
|
|
28
|
+
interface FormattedValue {
|
|
29
|
+
text: string;
|
|
30
|
+
/** How many characters were cut, or `0`. The card says so rather than showing text that stops. */
|
|
31
|
+
truncated: number;
|
|
32
|
+
}
|
|
33
|
+
/** A tool's input, output or error as text, capped. The one place a model's own data becomes a page. */
|
|
34
|
+
function formatValue(value: unknown, limit?: number): FormattedValue;
|
|
35
|
+
/** Whether there is anything to show at all — `null` and `undefined` are absence, `0` and `''` are not. */
|
|
36
|
+
function hasValue(value: unknown): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* A count with its thousands grouped, done here rather than with `toLocaleString`: the number lands in
|
|
39
|
+
* prerendered HTML, and a separator that differs between the server's locale and the reader's is a
|
|
40
|
+
* hydration mismatch nobody would look for.
|
|
41
|
+
*/
|
|
42
|
+
function formatCount(value: number): string;
|
|
43
|
+
/**
|
|
44
|
+
* How long a thought took, in the units a reader thinks in: milliseconds under a second, then seconds,
|
|
45
|
+
* then minutes and seconds. Rounded down for the minutes so "1m 0s" is a minute rather than two.
|
|
46
|
+
*/
|
|
47
|
+
function formatDuration(milliseconds: number): string;
|
|
48
|
+
/**
|
|
49
|
+
* One run of text that arrived together, and the identity React keys it by. Keys are never reused, so a
|
|
50
|
+
* run that is still fading is never handed a different run's text half way through its entrance.
|
|
51
|
+
*/
|
|
52
|
+
interface StreamSegment {
|
|
53
|
+
key: number;
|
|
54
|
+
text: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A streaming message between two renders: the text that has settled, and the last few runs to arrive,
|
|
58
|
+
* which are the ones still fading in.
|
|
59
|
+
*/
|
|
60
|
+
interface StreamState {
|
|
61
|
+
settled: string;
|
|
62
|
+
segments: readonly StreamSegment[];
|
|
63
|
+
/** Monotone, and carried across a reset — a key a fading run still holds is never handed out twice. */
|
|
64
|
+
nextKey: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* How many runs stay animated at once. The rest settle, so a message of any length is one text node plus
|
|
68
|
+
* this many spans — the reason the entrance costs the same at the first token and the ten-thousandth.
|
|
69
|
+
*/
|
|
70
|
+
const STREAM_WINDOW = 8;
|
|
71
|
+
/** A message that is already whole: all of it settled, none of it animating. */
|
|
72
|
+
function initialStream(text: string): StreamState;
|
|
73
|
+
/** Everything on the page, settled and still arriving. */
|
|
74
|
+
function streamText(state: StreamState): string;
|
|
75
|
+
/**
|
|
76
|
+
* The next state for the text as it now stands. Pure, and keyed on the text itself rather than on a
|
|
77
|
+
* counter, so advancing twice with the same message is the same as advancing once.
|
|
78
|
+
*/
|
|
79
|
+
function advanceStream(state: StreamState, text: string, window?: number): StreamState;
|
|
80
|
+
}
|
|
81
|
+
export default AgentUtils;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CatalogContract } from '@box-kite/core';
|
|
2
|
+
/**
|
|
3
|
+
* The props that are a *shape* rather than a value — a grid's columns, a dashboard's layout — as the JSON
|
|
4
|
+
* Schema a generated spec is judged against. Written here rather than extracted because the manifest maps
|
|
5
|
+
* types, and half of each of these shapes is React: a `Cell` renderer, an `onCellEdit`, a `ReactNode`. A
|
|
6
|
+
* mapping has to drop such a prop whole, which is what left the catalog able to place a dashboard and not
|
|
7
|
+
* to say what was in it — `<DataGrid>` arrived with no `def` at all, and `def` is required.
|
|
8
|
+
*
|
|
9
|
+
* Every key is typed against the interface it mirrors, so a prop renamed in the component is a compile
|
|
10
|
+
* error here rather than a constraint that silently stops matching anything.
|
|
11
|
+
*/
|
|
12
|
+
declare namespace CatalogContracts {
|
|
13
|
+
/**
|
|
14
|
+
* Component name → the props of it a manifest entry cannot describe. Merged over the generated entry, so
|
|
15
|
+
* a prop that appears in both is this one: the curated shape is the narrower of the two by construction.
|
|
16
|
+
*/
|
|
17
|
+
const CONTRACTS: Record<string, CatalogContract>;
|
|
18
|
+
}
|
|
19
|
+
export default CatalogContracts;
|