@baishuyun/ui-base 6.29.2 → 6.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,418 @@
1
+ import "../vendors/version-Blv9zlaY.js";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import * as t from "react";
4
+ import { Component as n, useCallback as r, useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s } from "react";
5
+ import { createRoot as c } from "react-dom/client";
6
+ import * as l from "@babel/standalone";
7
+ import { parse as u, walk as d } from "css-tree";
8
+ import * as f from "lucide-react";
9
+ //#region ../shared/src/ai-runtime/moduleNames.ts
10
+ var p = ["react", "lucide-react"], m = new Set(p), h = p.join("、"), g = [
11
+ "value",
12
+ "onChange",
13
+ "disabled",
14
+ "formData",
15
+ "tableMode"
16
+ ], _ = new Set([
17
+ "fetch",
18
+ "XMLHttpRequest",
19
+ "WebSocket",
20
+ "EventSource",
21
+ "eval",
22
+ "Function",
23
+ "globalThis",
24
+ "self",
25
+ "window",
26
+ "localStorage",
27
+ "sessionStorage",
28
+ "indexedDB"
29
+ ]), v = new Set([
30
+ "script",
31
+ "iframe",
32
+ "object",
33
+ "embed",
34
+ "link"
35
+ ]), y = new Set([
36
+ "loc",
37
+ "start",
38
+ "end",
39
+ "extra",
40
+ "range",
41
+ "leadingComments",
42
+ "trailingComments",
43
+ "innerComments"
44
+ ]), b = /url\(\s*['"]?\s*(?:https?:)?\/\//i, x = (e) => e?.type === "FunctionDeclaration" || e?.type === "FunctionExpression" || e?.type === "ArrowFunctionExpression";
45
+ function S(e, t) {
46
+ if (!(!e || typeof e.type != "string") && t(e) !== !1) for (let n of Object.keys(e)) {
47
+ if (y.has(n)) continue;
48
+ let r = e[n];
49
+ Array.isArray(r) ? r.forEach((e) => S(e, t)) : r && typeof r == "object" && S(r, t);
50
+ }
51
+ }
52
+ function C(e) {
53
+ let t = e.body.find((e) => e.type === "ExportDefaultDeclaration")?.declaration;
54
+ if (!t) return null;
55
+ if (x(t)) return t;
56
+ if (t.type !== "Identifier") return null;
57
+ for (let n of e.body) {
58
+ if (n.type === "FunctionDeclaration" && n.id?.name === t.name) return n;
59
+ if (n.type === "VariableDeclaration") {
60
+ let e = n.declarations.find((e) => e.id?.name === t.name && x(e.init));
61
+ if (e) return e.init;
62
+ }
63
+ }
64
+ return null;
65
+ }
66
+ var w = (e) => e.computed ? null : e.key.type === "Identifier" ? e.key.name : e.key.type === "StringLiteral" ? e.key.value : null, T = (e) => e ? e.type === "Identifier" ? e.name : e.type === "StringLiteral" ? e.value : e.type === "TemplateLiteral" && e.expressions.length === 0 ? e.quasis[0]?.value?.cooked ?? null : null : null;
67
+ function E(e, t, n) {
68
+ for (let r of e.properties) {
69
+ if (r.type === "RestElement") {
70
+ n.push(`组件不能用 ...rest 收集 props,请只解构 ${g.join("、")}。`);
71
+ continue;
72
+ }
73
+ let e = w(r);
74
+ e === null ? n.push("组件的 props 不能使用计算属性名。") : g.includes(e) || t.add(e);
75
+ }
76
+ }
77
+ function D(e) {
78
+ let t = [], n = /* @__PURE__ */ new Set(), [r] = e.params;
79
+ return e.params.length > 1 && t.push("组件只接收一个 props 参数,不能有第二个参数(如 ref)。"), r?.type === "AssignmentPattern" && (r = r.left), r?.type === "ObjectPattern" ? E(r, n, t) : r?.type === "Identifier" && S(e.body, (e) => {
80
+ if (e.type === "MemberExpression" && e.object?.name === r.name) {
81
+ let r = e.computed ? null : e.property.name;
82
+ return r === null ? t.push("组件不能用动态键读取 props。") : g.includes(r) || n.add(r), !1;
83
+ }
84
+ return e.type === "VariableDeclarator" && e.init?.name === r.name && e.id.type === "ObjectPattern" ? (E(e.id, n, t), !1) : !0;
85
+ }), n.size && t.unshift(`组件签名只能接收 ${g.join("、")},发现多余的 props:${[...n].join("、")}。平台不会传入它们,请删除,需要的文案或配置直接写在组件内部。`), t;
86
+ }
87
+ function O(e) {
88
+ let t = /* @__PURE__ */ new Set(), n = (e) => {
89
+ switch (e.type) {
90
+ case "Identifier": return _.has(e.name) && t.add(e.name), !0;
91
+ case "MemberExpression":
92
+ case "OptionalMemberExpression": return T(e.property) === "constructor" && t.add("constructor"), e.computed ? !0 : (S(e.object, n), !1);
93
+ case "ObjectProperty": return e.computed ? !0 : (S(e.value, n), !1);
94
+ case "ImportDeclaration": return m.has(e.source.value) || t.add(`import "${e.source.value}"(只能 import ${h})`), !1;
95
+ case "Import":
96
+ case "ImportExpression": return t.add("动态 import()"), !0;
97
+ case "JSXOpeningElement": {
98
+ let n = e.name?.name;
99
+ return n === "textarea" ? t.add("<textarea>(单行文本的值不能包含换行)") : v.has(n) && t.add(`<${n}>`), !0;
100
+ }
101
+ case "JSXAttribute": return e.name?.name === "dangerouslySetInnerHTML" && t.add("dangerouslySetInnerHTML"), !0;
102
+ default: return !0;
103
+ }
104
+ };
105
+ return S(e, n), [...t];
106
+ }
107
+ function k(e) {
108
+ let t = [];
109
+ return /@import\b/i.test(e) && t.push("CSS 中不能使用 @import。"), b.test(e) && t.push("CSS 中不能引用外部地址,图片请用内联 svg 或 data: 地址。"), t;
110
+ }
111
+ function A(e, t = null) {
112
+ let n = [], r = null;
113
+ try {
114
+ r = l.packages.parser.parse(e, {
115
+ sourceType: "module",
116
+ plugins: ["jsx"]
117
+ }).program;
118
+ } catch (e) {
119
+ if (!(e instanceof SyntaxError)) throw e;
120
+ }
121
+ if (r) {
122
+ let e = C(r);
123
+ e && n.push(...D(e));
124
+ let t = O(r);
125
+ t.length && n.push(`不允许使用:${t.join("、")}。组件不能发起网络请求、使用 eval 或 Function,也不能读取 constructor 或注入脚本和原始 HTML。`);
126
+ }
127
+ return t != null && n.push(...k(t)), n;
128
+ }
129
+ function j(e, t = null) {
130
+ let n = A(e, t);
131
+ if (n.length) throw Error(`组件不符合运行时约束:\n${n.map((e) => `- ${e}`).join("\n")}`);
132
+ }
133
+ //#endregion
134
+ //#region ../shared/src/ai-runtime/checkCssSyntax.ts
135
+ function M(e, t = "style.css") {
136
+ e?.trim() && d(u(e, {
137
+ filename: t,
138
+ positions: !0,
139
+ onParseError(e) {
140
+ throw Error(`/${t}: ${e.formattedMessage}`);
141
+ }
142
+ }), (e) => {
143
+ let n = e.value?.type === "Value" ? !e.value.children?.head : !e.value?.value?.trim();
144
+ if (e.type === "Declaration" && n) throw Error(`/${t}: 属性 "${e.property}" 未填写有效值 (${e.loc?.start?.line}:${e.loc?.start?.column})`);
145
+ });
146
+ }
147
+ //#endregion
148
+ //#region ../shared/src/ai-runtime/sourceText.ts
149
+ var N = /function\s+([A-Za-z_$][\w$]*)/, ee = /export\s+default\b/;
150
+ function te(e) {
151
+ if (!e || ee.test(e)) return e;
152
+ let t = e.match(N)?.[1];
153
+ return t ? `${e.trim()}\nexport default ${t};\n` : e;
154
+ }
155
+ //#endregion
156
+ //#region ../shared/src/ai-runtime/parseSourceCode.ts
157
+ var ne = /<(jsx|css)>([\s\S]*?)<\/\1>/g, re = {
158
+ ast: !1,
159
+ sourceType: "module",
160
+ presets: [["react", {
161
+ runtime: "classic",
162
+ development: !1
163
+ }]],
164
+ plugins: ["transform-modules-commonjs"]
165
+ };
166
+ function P(e) {
167
+ if (typeof e != "string" || !e.trim()) return null;
168
+ let t = null, n = null;
169
+ for (let r of e.matchAll(ne)) {
170
+ let e = r[2].trim();
171
+ r[1] === "jsx" && (t = e), r[1] === "css" && (n = e);
172
+ }
173
+ return t === null && n === null ? null : {
174
+ jsx: t,
175
+ css: n
176
+ };
177
+ }
178
+ var ie = "export default function AiRuntimeField() {\n return null;\n}";
179
+ function F(e, t = "ai") {
180
+ let n = P(e);
181
+ if (!n) throw Error("code 里没有可用的 <jsx> 或 <css>。");
182
+ let r = te(n.jsx || ie), i = n.css ?? "";
183
+ i && M(i, `${t}.css`), j(r, i || null);
184
+ let a = l.transform(r, {
185
+ ...re,
186
+ filename: `${t}.jsx`
187
+ });
188
+ if (!a?.code) throw Error("Babel 没有产出可执行的代码。");
189
+ return {
190
+ code: a.code,
191
+ css: i
192
+ };
193
+ }
194
+ //#endregion
195
+ //#region ../shared/src/ai-runtime/compileCache.ts
196
+ var ae = 200, I = /* @__PURE__ */ new Map(), oe = Object.freeze({
197
+ ok: !1,
198
+ code: "",
199
+ css: "",
200
+ error: null
201
+ }), L = (e, t) => {
202
+ if (typeof e != "string" || !e.trim()) return oe;
203
+ let n = I.get(e);
204
+ if (n) return I.delete(e), I.set(e, n), n;
205
+ let r;
206
+ try {
207
+ let n = F(e, t);
208
+ r = {
209
+ ok: !0,
210
+ code: n.code,
211
+ css: n.css || "",
212
+ error: null
213
+ };
214
+ } catch (e) {
215
+ r = {
216
+ ok: !1,
217
+ code: "",
218
+ css: "",
219
+ error: e
220
+ };
221
+ }
222
+ if (I.size >= ae) {
223
+ let e = I.keys().next().value;
224
+ e !== void 0 && I.delete(e);
225
+ }
226
+ return I.set(e, r), r;
227
+ }, se = () => {
228
+ I.clear();
229
+ }, R = (e, t) => {
230
+ let n = {};
231
+ for (let t of Object.keys(e)) n[t] = e[t];
232
+ return (n.default === void 0 || n.default === null) && (n.default = t), Object.defineProperty(n, "__esModule", { value: !0 }), n;
233
+ }, z = t.default || t, ce = {
234
+ react: R(t, z),
235
+ "lucide-react": R(f, f)
236
+ }, B = {};
237
+ for (let e of p) {
238
+ let t = ce[e];
239
+ if (!t) throw Error(`模块 ${e} 在白名单里但没有实现。`);
240
+ B[e] = t;
241
+ }
242
+ var V = Object.keys(B), H = (e) => {
243
+ let t = B[e];
244
+ if (t) return t;
245
+ throw Error(`Unknown module: ${e}(组件只能 require ${V.join("、")})`);
246
+ }, U = {
247
+ COMPILE: 4001,
248
+ EXECUTE: 4002,
249
+ RENDER: 5001,
250
+ RUNTIME: 5002
251
+ }, W = new Set(Object.values(U)), G = (e, t) => {
252
+ let n = e instanceof Error ? e : Error(String(e)), r = n.code;
253
+ return (typeof r != "number" || !W.has(r)) && (n.code = t), n;
254
+ }, K = 0, le = (e) => (K += 1, `ai-runtime-${e}-${K}.js`), ue = (e, t) => {
255
+ if (!e) throw Error("没有可执行的代码。");
256
+ let n = {}, r = `${e}\n//# sourceURL=${t}`;
257
+ if (Function("require", "exports", "React", r)(H, n, z), typeof n.default != "function") throw Error("Missing default export:组件必须默认导出一个函数。");
258
+ return n.default;
259
+ }, q = /* @__PURE__ */ new Map(), J = !1, Y = /* @__PURE__ */ new WeakSet(), de = (e) => {
260
+ e && typeof e == "object" && Y.add(e);
261
+ }, X = (e) => {
262
+ if (e && typeof e == "object" && Y.has(e)) return;
263
+ let t = e instanceof Error ? e.stack : void 0;
264
+ if (typeof t == "string") {
265
+ for (let [n, r] of q) if (t.includes(n)) {
266
+ r(G(e, U.RUNTIME));
267
+ return;
268
+ }
269
+ }
270
+ }, fe = () => {
271
+ J || typeof window > "u" || (J = !0, window.addEventListener("error", (e) => {
272
+ let t = e.error || Error(e.message);
273
+ queueMicrotask(() => X(t));
274
+ }), window.addEventListener("unhandledrejection", (e) => {
275
+ let t = e.reason;
276
+ queueMicrotask(() => X(t));
277
+ }));
278
+ }, pe = (e, t) => {
279
+ fe(), q.set(e, t);
280
+ }, me = (e) => {
281
+ q.delete(e);
282
+ }, he = /(^|[\s,>+~(])(?::root\b|html\b|body\b)/gi, Z = (e) => typeof e != "string" || !e ? "" : e.replace(he, "$1:host"), ge = typeof window > "u" ? i : a, _e = class extends n {
283
+ state = { failed: !1 };
284
+ static getDerivedStateFromError() {
285
+ return { failed: !0 };
286
+ }
287
+ componentDidCatch(e) {
288
+ de(e), this.props.onError(G(e, U.RENDER));
289
+ }
290
+ render() {
291
+ return this.state.failed ? null : this.props.children;
292
+ }
293
+ }, Q = (e, t) => {
294
+ let n = e ?? {};
295
+ return {
296
+ value: n.value ?? "",
297
+ disabled: !!n.disabled,
298
+ formData: n.formData || {},
299
+ tableMode: !!n.tableMode,
300
+ onChange: t
301
+ };
302
+ }, ve = {
303
+ ok: !1,
304
+ error: null,
305
+ Component: null
306
+ };
307
+ function ye(t) {
308
+ let n = ({ code: n, value: a, disabled: l, formData: u, tableMode: d, runToken: f, height: p, minHeight: m, className: h, style: g, onChange: _, onError: v }) => {
309
+ let y = s(null), b = s(null), x = s(null), S = s({});
310
+ S.current = {
311
+ onChange: _,
312
+ onError: v
313
+ };
314
+ let C = s(null);
315
+ C.current === null && (C.current = le(t));
316
+ let w = C.current, T = L(n), E = s({
317
+ source: void 0,
318
+ token: void 0,
319
+ result: ve
320
+ });
321
+ if (E.current.source !== n || E.current.token !== f) {
322
+ let e;
323
+ if (!T.ok) e = {
324
+ ok: !1,
325
+ error: T.error,
326
+ Component: null
327
+ };
328
+ else try {
329
+ e = {
330
+ ok: !0,
331
+ error: null,
332
+ Component: ue(T.code, w)
333
+ };
334
+ } catch (t) {
335
+ e = {
336
+ ok: !1,
337
+ error: t,
338
+ Component: null
339
+ };
340
+ }
341
+ E.current = {
342
+ source: n,
343
+ token: f,
344
+ result: e
345
+ };
346
+ }
347
+ let D = E.current.result, O = r((e) => S.current.onChange?.(e), []), k = r((e) => S.current.onError?.(e), []), A = r(() => {
348
+ if (b.current) return b.current;
349
+ let e = y.current;
350
+ if (!e) return null;
351
+ let t = e.shadowRoot || e.attachShadow({ mode: "open" }), n = document.createElement("style"), r = document.createElement("div");
352
+ return r.setAttribute("data-ai-runtime-mount", ""), r.style.height = "100%", t.append(n, r), b.current = {
353
+ root: c(r, { onUncaughtError: (e) => S.current.onError?.(G(e, U.RUNTIME)) }),
354
+ styleEl: n,
355
+ mountEl: r
356
+ }, b.current;
357
+ }, []), j = o(() => Q({
358
+ value: a,
359
+ disabled: l,
360
+ formData: u,
361
+ tableMode: d
362
+ }, O), [
363
+ a,
364
+ l,
365
+ u,
366
+ d,
367
+ O
368
+ ]);
369
+ ge(() => {
370
+ let t = A();
371
+ if (!t) return;
372
+ let { root: n, styleEl: r } = t;
373
+ if (!D.ok) {
374
+ if (x.current !== D && (x.current = D, r.textContent = "", n.render(null), D.error)) {
375
+ let e = T.ok ? U.EXECUTE : U.COMPILE;
376
+ S.current.onError?.(G(D.error, e));
377
+ }
378
+ return;
379
+ }
380
+ x.current = null;
381
+ let i = Z(T.css);
382
+ r.textContent !== i && (r.textContent = i);
383
+ let a = D.Component;
384
+ n.render(/* @__PURE__ */ e(_e, {
385
+ onError: k,
386
+ children: /* @__PURE__ */ e(a, { ...j })
387
+ }));
388
+ }, [
389
+ T,
390
+ D,
391
+ j,
392
+ k,
393
+ A
394
+ ]), i(() => () => {
395
+ let e = b.current;
396
+ b.current = null, e && (e.styleEl.remove(), e.mountEl.remove(), queueMicrotask(() => e.root.unmount()));
397
+ }, []), i(() => (pe(w, (e) => S.current.onError?.(e)), () => me(w)), [w]);
398
+ let M = {
399
+ height: p ?? "auto",
400
+ minHeight: m ?? 32,
401
+ overflow: "auto",
402
+ contain: "layout paint",
403
+ ...g
404
+ };
405
+ return /* @__PURE__ */ e("div", {
406
+ ref: y,
407
+ "data-ai-runtime-host": "",
408
+ className: h,
409
+ style: M
410
+ });
411
+ };
412
+ return n.displayName = "BsyAiRuntimeContainer", n;
413
+ }
414
+ //#endregion
415
+ //#region src/components/AiRuntimeContainer/index.ts
416
+ var $ = ye("ui-base");
417
+ //#endregion
418
+ export { $ as AiRuntimeContainer, $ as default, U as ERROR_CODE, V as MODULE_NAMES, j as assertFieldSource, se as clearCompileCache, F as compileAiCode, L as compileCached, Z as scopeCss, P as splitAiCode, Q as toPlainProps, A as validateFieldSource };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import "../vendors/ConfigProvider-BDmu_0qa.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -3,7 +3,7 @@ import { t } from "../vendors/useLocale-3oUjPb-k.js";
3
3
  import { t as n } from "../vendors/cssVars-UpriQzph.js";
4
4
  import { t as r } from "../Segmented/Segmented-BMwjhsZw.js";
5
5
  import { t as i } from "../Tooltip/Tooltip-N06Os8rG.js";
6
- import { t as a } from "../DatePicker/DatePicker-CRnA0EoA.js";
6
+ import { t as a } from "../DatePicker/DatePicker-DnvlY6qH.js";
7
7
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  import { memo as c, useCallback as l, useEffect as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
9
9
  import h from "clsx";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -7,7 +7,7 @@ import "../vendors/useLocale-3oUjPb-k.js";
7
7
  import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
8
8
  import "../Segmented/Segmented-BMwjhsZw.js";
9
9
  import "../Tooltip/Tooltip-N06Os8rG.js";
10
- import { n as e, r as t, t as n } from "./Calendar-MCtQbn-u.js";
11
- import "../DatePicker/DatePicker-CRnA0EoA.js";
10
+ import { n as e, r as t, t as n } from "./Calendar-C09c_CdX.js";
11
+ import "../DatePicker/DatePicker-DnvlY6qH.js";
12
12
  import "../DatePicker/pickerLocale-Brf7_Tnd.js";
13
13
  export { n as Calendar, n as default, t as resolveCalendarThemeVars, e as resolvePlatformCalendarTheme };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import { t as e } from "./Card-BT2LRubP.js";
4
4
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "./CheckBox-DOdRLFKI.js";
4
4
  import { t as e } from "./CheckBox-CtOSHKM0.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import { n as e, t } from "../vendors/ConfigProvider-BDmu_0qa.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -48,7 +48,7 @@ var w = {
48
48
  "bsy-date-picker__content": "_bsy-date-picker__content_1i2le_33",
49
49
  "bsy-date-picker__divider": "_bsy-date-picker__divider_1i2le_43",
50
50
  "bsy-date-picker__panel-loading": "_bsy-date-picker__panel-loading_1i2le_49"
51
- }, j = m(() => import("./DatePickerPanel-DFk0OP4X.js")), M = (o) => {
51
+ }, j = m(() => import("./DatePickerPanel-CZwg0W8k.js")), M = (o) => {
52
52
  let { children: m, picker: S = "date", theme: w, getPopupContainer: D, triggerActiveClassName: O, zIndex: M } = o, { locale: N } = r(), P = e(M), [F, I] = v(o, {
53
53
  defaultValuePropName: "defaultValue",
54
54
  valuePropName: "value",
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
4
  import { t } from "../vendors/useLocale-3oUjPb-k.js";
@@ -1,9 +1,9 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import "../Overlay/OverlayContext-CVSFoyqN.js";
4
4
  import "../vendors/useFloatingOverlay-B66lOL8v.js";
5
5
  import "../vendors/useLocale-3oUjPb-k.js";
6
6
  import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
7
- import { t as e } from "./DatePicker-CRnA0EoA.js";
7
+ import { t as e } from "./DatePicker-DnvlY6qH.js";
8
8
  import "./pickerLocale-Brf7_Tnd.js";
9
9
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,3 +1,3 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import { t as e } from "./Icon-CcKDWNGy.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import "../vendors/useLocale-3oUjPb-k.js";
4
4
  import { t as e } from "./Loading-Dm4i0lYd.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../Overlay/OverlayContext-CVSFoyqN.js";
4
4
  import { t as e } from "./Modal-DXH8hz96.js";
@@ -1,3 +1,3 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import { t as e } from "./NotFoundContent-DJUQ0_2D.js";
3
3
  export { e as NotFoundContent };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import { a as e, i as t, n, t as r } from "./OverlayContext-CVSFoyqN.js";
3
3
  export { r as OVERLAY_Z_BASE, n as OVERLAY_Z_STEP, t as OverlayProvider, e as useOverlayZIndex };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import { t as e } from "./Radio-C0OAW-K-.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "./style-D26azwz6.js";
3
3
  import { t as e } from "./ScrollBar-IMTuAOF5.js";
4
4
  export { e as ScrollBar, e as default };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import { t as e } from "./Segmented-BMwjhsZw.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../Icon/Icon-CcKDWNGy.js";
4
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Overlay/OverlayContext-CVSFoyqN.js";
3
3
  import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
4
4
  import { n as e, t } from "./Tooltip-N06Os8rG.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-CohiolFd.js";
1
+ import "../vendors/version-Blv9zlaY.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import { t as e } from "../vendors/Tree-f0FxoFIC.js";
4
4
  import "../CheckBox/CheckBox-DOdRLFKI.js";
@@ -0,0 +1,8 @@
1
+ declare const AiRuntimeContainer: {
2
+ ({ code, value, disabled, formData, tableMode, runToken, height, minHeight, className, style, onChange, onError, }: import('../../../../shared/src/ai-runtime/index.ts').AiRuntimeContainerProps): import("react").JSX.Element;
3
+ displayName: string;
4
+ };
5
+ export { AiRuntimeContainer };
6
+ export default AiRuntimeContainer;
7
+ export type { AiCodeParts, AiRuntimeContainerError, AiRuntimeContainerErrorCode, AiRuntimeContainerProps, CompiledAiCode, CompiledCacheEntry, } from '../../../../shared/src/ai-runtime/index.ts';
8
+ export { assertFieldSource, clearCompileCache, compileAiCode, compileCached, ERROR_CODE, MODULE_NAMES, scopeCss, splitAiCode, toPlainProps, validateFieldSource, } from '../../../../shared/src/ai-runtime/index.ts';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./vendors/version-CohiolFd.js";
1
+ import "./vendors/version-Blv9zlaY.js";
2
2
  import "./ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "./Icon/Icon-CcKDWNGy.js";
4
4
  import "./vendors/LocaleContext-CsTLO_Y2.js";
@@ -29,8 +29,8 @@ import { t as O } from "./DropDown/DropDown-B3VFy5GF.js";
29
29
  import { t as k } from "./Loading/Loading-Dm4i0lYd.js";
30
30
  import "./NotFoundContent/index.js";
31
31
  import { t as A } from "./InputTag/InputTag-C1WA6sDA.js";
32
- import { t as j } from "./Calendar/Calendar-MCtQbn-u.js";
33
- import { t as M } from "./DatePicker/DatePicker-CRnA0EoA.js";
32
+ import { t as j } from "./Calendar/Calendar-C09c_CdX.js";
33
+ import { t as M } from "./DatePicker/DatePicker-DnvlY6qH.js";
34
34
  import "./DatePicker/pickerLocale-Brf7_Tnd.js";
35
35
  import { a as N, c as P, d as F, f as I, g as L, h as R, i as z, l as B, m as V, n as H, o as U, p as W, r as G, t as K, u as q } from "./Table/Table-B8381Lni.js";
36
36
  import { t as J } from "./FieldCard/FieldCard-CCv4nLpH.js";
@@ -1,6 +1,6 @@
1
1
  //#region src/version.ts
2
2
  if (typeof window < "u") {
3
3
  let e = window.__BSY_UI__ ??= {};
4
- e["@baishuyun/ui-base"] = "6.29.2";
4
+ e["@baishuyun/ui-base"] = "6.30.1";
5
5
  }
6
6
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-base",
3
- "version": "6.29.2",
3
+ "version": "6.30.1",
4
4
  "type": "module",
5
5
  "description": "百数云低代码平台通用组件库",
6
6
  "author": "bsy-fe team",
@@ -39,6 +39,7 @@
39
39
  "@rc-component/picker": ">=1.10.0 <2.0.0",
40
40
  "antd": ">=6.0.0 <7.0.0",
41
41
  "dayjs": ">=1.11.0",
42
+ "lucide-react": ">=1.60.0",
42
43
  "motion": "^11.18.2",
43
44
  "react": ">=18.3.0",
44
45
  "react-dom": ">=18.3.0"
@@ -46,6 +47,7 @@
46
47
  "dependencies": {
47
48
  "@amap/amap-jsapi-loader": "^1.0.1",
48
49
  "@amap/amap-jsapi-types": "^0.0.15",
50
+ "@babel/standalone": "7.29.7",
49
51
  "@dnd-kit/core": "^6.3.1",
50
52
  "@dnd-kit/sortable": "^10.0.0",
51
53
  "@dnd-kit/utilities": "^3.2.2",
@@ -66,6 +68,7 @@
66
68
  "@tanstack/react-virtual": "^3.14.3",
67
69
  "ahooks": "^3.8.5",
68
70
  "clsx": "^2.1.1",
71
+ "css-tree": "^3.2.1",
69
72
  "dompurify": "^3.4.14",
70
73
  "fuse.js": "^7.1.0",
71
74
  "lexical": "0.45.0",
@@ -80,6 +83,7 @@
80
83
  "@floating-ui/react": "^0.27.16",
81
84
  "@rc-component/picker": "^1.10.0",
82
85
  "@tailwindcss/typography": "^0.5.16",
86
+ "@types/babel__standalone": "^7.1.9",
83
87
  "@types/lodash-es": "^4.17.12",
84
88
  "@types/node": "^24.3.0",
85
89
  "@types/react": "^18.3.1",
@@ -89,6 +93,7 @@
89
93
  "antd": "^6.4.2",
90
94
  "dayjs": "^1.11.13",
91
95
  "glob": "^11.0.3",
96
+ "lucide-react": "1.60.0",
92
97
  "motion": "^11.18.2",
93
98
  "postcss": "^8.5.3",
94
99
  "react": "^18.3.1",