@box-kite/react 2.2.2 → 2.2.4
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 +0 -3
- package/package.json +21 -22
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +37 -26
package/README.md
CHANGED
|
@@ -20,9 +20,6 @@ version behind what it is writing against: [Built for AI](https://www.box-kite.d
|
|
|
20
20
|
[`npx @box-kite/mcp`](https://www.npmjs.com/package/@box-kite/mcp) ·
|
|
21
21
|
[generative UI](https://www.box-kite.dev/generative-ui/)
|
|
22
22
|
|
|
23
|
-
> **Renamed at 1.0.0.** This was `@cronocode/react-box`. The API is unchanged — the move is one
|
|
24
|
-
> find-and-replace, and `@cronocode/react-box@3.4.0` re-exports this package.
|
|
25
|
-
|
|
26
23
|
## Getting Started
|
|
27
24
|
|
|
28
25
|
1. Installation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box-kite/react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"pages/**"
|
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
"build:core": "vite build --config vite.core.config.ts && node scripts/postbuild-core.mjs",
|
|
77
77
|
"build:mcp": "vite build --config vite.mcp.config.ts && node scripts/postbuild-mcp.mjs",
|
|
78
78
|
"postbuild": "node scripts/postbuild.mjs",
|
|
79
|
-
"build:bridge": "node scripts/build-bridge.mjs",
|
|
80
79
|
"build:dev": "npm run build:core && vite build --mode dev",
|
|
81
80
|
"compile": "tsc --noEmit --skipLibCheck",
|
|
82
81
|
"test": "vitest run",
|
|
@@ -117,7 +116,7 @@
|
|
|
117
116
|
"./themeReveal-*"
|
|
118
117
|
],
|
|
119
118
|
"gzip": true,
|
|
120
|
-
"limit": "37.
|
|
119
|
+
"limit": "37.64 KB"
|
|
121
120
|
},
|
|
122
121
|
{
|
|
123
122
|
"name": "Box in a Server Component (react-server entry)",
|
|
@@ -129,7 +128,7 @@
|
|
|
129
128
|
"./themeReveal-*"
|
|
130
129
|
],
|
|
131
130
|
"gzip": true,
|
|
132
|
-
"limit": "35.
|
|
131
|
+
"limit": "35.73 KB"
|
|
133
132
|
},
|
|
134
133
|
{
|
|
135
134
|
"name": "Behavior primitives (a11y entry)",
|
|
@@ -165,7 +164,7 @@
|
|
|
165
164
|
"./themeReveal-*"
|
|
166
165
|
],
|
|
167
166
|
"gzip": true,
|
|
168
|
-
"limit": "55.
|
|
167
|
+
"limit": "55.68 KB"
|
|
169
168
|
},
|
|
170
169
|
{
|
|
171
170
|
"name": "Spec renderer (spec entry)",
|
|
@@ -195,7 +194,7 @@
|
|
|
195
194
|
"name": "Core engine (@box-kite/core, no React)",
|
|
196
195
|
"path": "dist-core/core.mjs",
|
|
197
196
|
"gzip": true,
|
|
198
|
-
"limit": "36.
|
|
197
|
+
"limit": "36.95 KB",
|
|
199
198
|
"ignore": [
|
|
200
199
|
"./diagnostics-*",
|
|
201
200
|
"./themeReveal-*"
|
|
@@ -211,7 +210,7 @@
|
|
|
211
210
|
"./themeReveal-*"
|
|
212
211
|
],
|
|
213
212
|
"gzip": true,
|
|
214
|
-
"limit": "39.
|
|
213
|
+
"limit": "39.70 KB"
|
|
215
214
|
},
|
|
216
215
|
{
|
|
217
216
|
"name": "Popover",
|
|
@@ -223,7 +222,7 @@
|
|
|
223
222
|
"./themeReveal-*"
|
|
224
223
|
],
|
|
225
224
|
"gzip": true,
|
|
226
|
-
"limit": "41.
|
|
225
|
+
"limit": "41.24 KB"
|
|
227
226
|
},
|
|
228
227
|
{
|
|
229
228
|
"name": "Menu",
|
|
@@ -235,7 +234,7 @@
|
|
|
235
234
|
"./themeReveal-*"
|
|
236
235
|
],
|
|
237
236
|
"gzip": true,
|
|
238
|
-
"limit": "43.
|
|
237
|
+
"limit": "43.48 KB"
|
|
239
238
|
},
|
|
240
239
|
{
|
|
241
240
|
"name": "Accordion",
|
|
@@ -247,7 +246,7 @@
|
|
|
247
246
|
"./themeReveal-*"
|
|
248
247
|
],
|
|
249
248
|
"gzip": true,
|
|
250
|
-
"limit": "38.
|
|
249
|
+
"limit": "38.97 KB"
|
|
251
250
|
},
|
|
252
251
|
{
|
|
253
252
|
"name": "Agent",
|
|
@@ -259,7 +258,7 @@
|
|
|
259
258
|
"./themeReveal-*"
|
|
260
259
|
],
|
|
261
260
|
"gzip": true,
|
|
262
|
-
"limit": "39.
|
|
261
|
+
"limit": "39.72 KB"
|
|
263
262
|
},
|
|
264
263
|
{
|
|
265
264
|
"name": "Markdown",
|
|
@@ -271,7 +270,7 @@
|
|
|
271
270
|
"./themeReveal-*"
|
|
272
271
|
],
|
|
273
272
|
"gzip": true,
|
|
274
|
-
"limit": "38.
|
|
273
|
+
"limit": "38.21 KB"
|
|
275
274
|
},
|
|
276
275
|
{
|
|
277
276
|
"name": "Skeleton",
|
|
@@ -283,7 +282,7 @@
|
|
|
283
282
|
"./themeReveal-*"
|
|
284
283
|
],
|
|
285
284
|
"gzip": true,
|
|
286
|
-
"limit": "37.
|
|
285
|
+
"limit": "37.54 KB"
|
|
287
286
|
},
|
|
288
287
|
{
|
|
289
288
|
"name": "Tabs",
|
|
@@ -295,7 +294,7 @@
|
|
|
295
294
|
"./themeReveal-*"
|
|
296
295
|
],
|
|
297
296
|
"gzip": true,
|
|
298
|
-
"limit": "40.
|
|
297
|
+
"limit": "40.14 KB"
|
|
299
298
|
},
|
|
300
299
|
{
|
|
301
300
|
"name": "Slider",
|
|
@@ -307,7 +306,7 @@
|
|
|
307
306
|
"./themeReveal-*"
|
|
308
307
|
],
|
|
309
308
|
"gzip": true,
|
|
310
|
-
"limit": "39.
|
|
309
|
+
"limit": "39.32 KB"
|
|
311
310
|
},
|
|
312
311
|
{
|
|
313
312
|
"name": "Progress",
|
|
@@ -319,7 +318,7 @@
|
|
|
319
318
|
"./themeReveal-*"
|
|
320
319
|
],
|
|
321
320
|
"gzip": true,
|
|
322
|
-
"limit": "37.
|
|
321
|
+
"limit": "37.52 KB"
|
|
323
322
|
},
|
|
324
323
|
{
|
|
325
324
|
"name": "Toaster",
|
|
@@ -331,7 +330,7 @@
|
|
|
331
330
|
"./themeReveal-*"
|
|
332
331
|
],
|
|
333
332
|
"gzip": true,
|
|
334
|
-
"limit": "40.
|
|
333
|
+
"limit": "40.92 KB"
|
|
335
334
|
},
|
|
336
335
|
{
|
|
337
336
|
"name": "Combobox",
|
|
@@ -343,7 +342,7 @@
|
|
|
343
342
|
"./themeReveal-*"
|
|
344
343
|
],
|
|
345
344
|
"gzip": true,
|
|
346
|
-
"limit": "46.
|
|
345
|
+
"limit": "46.75 KB"
|
|
347
346
|
},
|
|
348
347
|
{
|
|
349
348
|
"name": "Dashboard",
|
|
@@ -355,7 +354,7 @@
|
|
|
355
354
|
"./themeReveal-*"
|
|
356
355
|
],
|
|
357
356
|
"gzip": true,
|
|
358
|
-
"limit": "43.
|
|
357
|
+
"limit": "43.14 KB"
|
|
359
358
|
},
|
|
360
359
|
{
|
|
361
360
|
"name": "DataGrid",
|
|
@@ -367,7 +366,7 @@
|
|
|
367
366
|
"./themeReveal-*"
|
|
368
367
|
],
|
|
369
368
|
"gzip": true,
|
|
370
|
-
"limit": "89.
|
|
369
|
+
"limit": "89.87 KB"
|
|
371
370
|
},
|
|
372
371
|
{
|
|
373
372
|
"name": "DataGrid export, the chunk fetched on the first press",
|
|
@@ -391,7 +390,7 @@
|
|
|
391
390
|
"./themeReveal-*"
|
|
392
391
|
],
|
|
393
392
|
"gzip": true,
|
|
394
|
-
"limit": "120.
|
|
393
|
+
"limit": "120.60 KB"
|
|
395
394
|
}
|
|
396
395
|
],
|
|
397
396
|
"repository": {
|
|
@@ -431,7 +430,7 @@
|
|
|
431
430
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
432
431
|
},
|
|
433
432
|
"dependencies": {
|
|
434
|
-
"@box-kite/core": "2.2.
|
|
433
|
+
"@box-kite/core": "2.2.4",
|
|
435
434
|
"csstype": "^3.2.3",
|
|
436
435
|
"use-sync-external-store": "^1.6.0"
|
|
437
436
|
},
|
package/react-shared.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime.cjs");let t=require("react");t=e.t(t,1);let n=require("@box-kite/core");function r({classNames:e,styleElements:t},r){return{className:(0,n.classNames)(e,r).join(` `),styles:t}}var i=parseInt(t.default.version,10)>=19;function a(e,n){let r=i?t=>e(t,t.ref??null):(0,t.forwardRef)(e),a=(0,t.memo)(r);return r.displayName=n,a.displayName=n,a}var o={selected:`aria-selected`},s;(function(e){function t(e,t,n){e!==void 0&&e!=null&&(n[o[t]??t]=Array.isArray(e)?e[0]:e)}e.assignBooleanProp=t})(s||={});var c=s;function l(e,t){let r=e,{props:i,className:a,disabled:o,required:s,checked:l,selected:u}=r,d={...i,className:(0,n.classNames)(t,a).join(` `)};return c.assignBooleanProp(o,`disabled`,d),c.assignBooleanProp(s,`required`,d),c.assignBooleanProp(l,`checked`,d),c.assignBooleanProp(u,`selected`,d),`style`in r&&(d.style=r.style),`id`in r&&(d.id=r.id),d}var u=parseInt(t.default.version,10)>=19,d=!1;function f(e){if(e?.length)return
|
|
1
|
+
const e=require("./rolldown-runtime.cjs");let t=require("react");t=e.t(t,1);let n=require("@box-kite/core");function r({classNames:e,styleElements:t},r){return{className:(0,n.classNames)(e,r).join(` `),styles:t}}var i=parseInt(t.default.version,10)>=19;function a(e,n){let r=i?t=>e(t,t.ref??null):(0,t.forwardRef)(e),a=(0,t.memo)(r);return r.displayName=n,a.displayName=n,a}var o={selected:`aria-selected`},s;(function(e){function t(e,t,n){e!==void 0&&e!=null&&(n[o[t]??t]=Array.isArray(e)?e[0]:e)}e.assignBooleanProp=t})(s||={});var c=s;function l(e,t){let r=e,{props:i,className:a,disabled:o,required:s,checked:l,selected:u}=r,d={...i,className:(0,n.classNames)(t,a).join(` `)};return c.assignBooleanProp(o,`disabled`,d),c.assignBooleanProp(s,`required`,d),c.assignBooleanProp(l,`checked`,d),c.assignBooleanProp(u,`selected`,d),`style`in r&&(d.style=r.style),`id`in r&&(d.id=r.id),d}var u=parseInt(t.default.version,10)>=19,d=!1,f=new WeakMap,p=new WeakMap;function m(e){let n=f.get(e);if(!n){let{href:r,css:i,precedence:a}=e;n=t.default.createElement(`style`,{key:r,href:r,precedence:a,dangerouslySetInnerHTML:{__html:i}}),f.set(e,n)}return n}function h(e){if(!e?.length)return;!u&&!d&&(d=!0,console.warn(`[box-kite] Box.configure({ sink: 'element' }) needs React 19 to hoist and dedupe its <style> elements; React ${t.default.version} will render them inline. Use the default sink instead.`));let n=p.get(e);return n||(n=e.map(m),p.set(e,n)),n}function g(e,t){let{classNames:r,signature:i,styleElements:a}=(0,n.getDefaultEngine)().resolveClassNames(e,t);return{classNames:r,signature:i,styleElements:h(a)}}var _=`__boxAttributesInProps`;function v(e){return e[_]=!0,e}function y(e){return typeof e==`function`||typeof e==`object`&&e?e[_]===!0:!1}var b=[`role`,`aria-label`,`aria-labelledby`,`aria-hidden`];function x(e,t){if(e!==void 0)return{role:`img`,"aria-label":e};if(!(t&&b.some(e=>e in t)))return{"aria-hidden":!0}}var S;(function(e){function t(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.capitalize=t})(S||={});var C=S,w;(function(e){function t(e,t,n){let r={...e},i=r.props||{};return t.forEach(e=>{e in r&&(i[e]=r[e],delete r[e])}),n&&Object.entries(n).forEach(([e,t])=>{i[e]=t}),r.props=i,r}e.buildProps=t;function n(e){return!!e&&typeof e==`object`}e.isObject=n;function r(e,t){return e in t}e.isKeyOf=r})(w||={});var T=w,E=[`sky-500`,`emerald-500`,`amber-500`,`violet-500`,`rose-500`,`cyan-500`],D=[`sky-400`,`emerald-400`,`amber-400`,`violet-400`,`rose-400`,`cyan-400`];function O(e){return e.reduce((e,t,n)=>(e[`chart-${n+1}`]=t,e),{})}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return h}});
|
package/react-shared.mjs
CHANGED
|
@@ -35,59 +35,70 @@ function d(e, t) {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/react/styleElements.ts
|
|
38
|
-
var f = parseInt(e.version, 10) >= 19, p = !1;
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
href: t
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
var f = parseInt(e.version, 10) >= 19, p = !1, m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
|
|
39
|
+
function g(t) {
|
|
40
|
+
let n = m.get(t);
|
|
41
|
+
if (!n) {
|
|
42
|
+
let { href: r, css: i, precedence: a } = t;
|
|
43
|
+
n = e.createElement("style", {
|
|
44
|
+
key: r,
|
|
45
|
+
href: r,
|
|
46
|
+
precedence: a,
|
|
47
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
48
|
+
}), m.set(t, n);
|
|
49
|
+
}
|
|
50
|
+
return n;
|
|
51
|
+
}
|
|
52
|
+
function _(t) {
|
|
53
|
+
if (!t?.length) return;
|
|
54
|
+
!f && !p && (p = !0, console.warn(`[box-kite] Box.configure({ sink: 'element' }) needs React 19 to hoist and dedupe its <style> elements; React ${e.version} will render them inline. Use the default sink instead.`));
|
|
55
|
+
let n = h.get(t);
|
|
56
|
+
return n || (n = t.map(g), h.set(t, n)), n;
|
|
46
57
|
}
|
|
47
58
|
//#endregion
|
|
48
59
|
//#region src/react/resolveStyles.ts
|
|
49
|
-
function
|
|
60
|
+
function v(e, t) {
|
|
50
61
|
let { classNames: n, signature: r, styleElements: a } = i().resolveClassNames(e, t);
|
|
51
62
|
return {
|
|
52
63
|
classNames: n,
|
|
53
64
|
signature: r,
|
|
54
|
-
styleElements:
|
|
65
|
+
styleElements: _(a)
|
|
55
66
|
};
|
|
56
67
|
}
|
|
57
68
|
//#endregion
|
|
58
69
|
//#region src/react/svg/attributesInProps.ts
|
|
59
|
-
var
|
|
60
|
-
function
|
|
61
|
-
return e[
|
|
70
|
+
var y = "__boxAttributesInProps";
|
|
71
|
+
function b(e) {
|
|
72
|
+
return e[y] = !0, e;
|
|
62
73
|
}
|
|
63
|
-
function
|
|
64
|
-
return typeof e == "function" || typeof e == "object" && e ? e[
|
|
74
|
+
function x(e) {
|
|
75
|
+
return typeof e == "function" || typeof e == "object" && e ? e[y] === !0 : !1;
|
|
65
76
|
}
|
|
66
77
|
//#endregion
|
|
67
78
|
//#region src/react/svg/svgNaming.ts
|
|
68
|
-
var
|
|
79
|
+
var S = [
|
|
69
80
|
"role",
|
|
70
81
|
"aria-label",
|
|
71
82
|
"aria-labelledby",
|
|
72
83
|
"aria-hidden"
|
|
73
84
|
];
|
|
74
|
-
function
|
|
85
|
+
function C(e, t) {
|
|
75
86
|
if (e !== void 0) return {
|
|
76
87
|
role: "img",
|
|
77
88
|
"aria-label": e
|
|
78
89
|
};
|
|
79
|
-
if (!(t &&
|
|
90
|
+
if (!(t && S.some((e) => e in t))) return { "aria-hidden": !0 };
|
|
80
91
|
}
|
|
81
92
|
//#endregion
|
|
82
93
|
//#region src/utils/string/stringUtils.ts
|
|
83
|
-
var
|
|
94
|
+
var w;
|
|
84
95
|
(function(e) {
|
|
85
96
|
function t(e) {
|
|
86
97
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
87
98
|
}
|
|
88
99
|
e.capitalize = t;
|
|
89
|
-
})(
|
|
90
|
-
var
|
|
100
|
+
})(w ||= {});
|
|
101
|
+
var T = w, E;
|
|
91
102
|
(function(e) {
|
|
92
103
|
function t(e, t, n) {
|
|
93
104
|
let r = { ...e }, i = r.props || {};
|
|
@@ -106,15 +117,15 @@ var S = x, C;
|
|
|
106
117
|
return e in t;
|
|
107
118
|
}
|
|
108
119
|
e.isKeyOf = r;
|
|
109
|
-
})(
|
|
110
|
-
var
|
|
120
|
+
})(E ||= {});
|
|
121
|
+
var D = E, O = [
|
|
111
122
|
"sky-500",
|
|
112
123
|
"emerald-500",
|
|
113
124
|
"amber-500",
|
|
114
125
|
"violet-500",
|
|
115
126
|
"rose-500",
|
|
116
127
|
"cyan-500"
|
|
117
|
-
],
|
|
128
|
+
], k = [
|
|
118
129
|
"sky-400",
|
|
119
130
|
"emerald-400",
|
|
120
131
|
"amber-400",
|
|
@@ -122,8 +133,8 @@ var w = C, T = [
|
|
|
122
133
|
"rose-400",
|
|
123
134
|
"cyan-400"
|
|
124
135
|
];
|
|
125
|
-
function
|
|
136
|
+
function A(e) {
|
|
126
137
|
return e.reduce((e, t, n) => (e[`chart-${n + 1}`] = t, e), {});
|
|
127
138
|
}
|
|
128
139
|
//#endregion
|
|
129
|
-
export {
|
|
140
|
+
export { T as a, b as c, d, s as f, D as i, v as l, O as n, C as o, a as p, A as r, x as s, k as t, _ as u };
|