@baishuyun/ui-base 6.30.1 → 6.32.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.
@@ -1,19 +1,20 @@
1
- import "../vendors/version-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.js";
2
2
  import { jsx as e } from "react/jsx-runtime";
3
3
  import * as t from "react";
4
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";
5
+ import { createRoot as ee } from "react-dom/client";
6
+ import * as c from "@babel/standalone";
7
+ import { parse as l, walk as u } from "css-tree";
8
+ import * as d from "lucide-react";
9
9
  //#region ../shared/src/ai-runtime/moduleNames.ts
10
- var p = ["react", "lucide-react"], m = new Set(p), h = p.join("、"), g = [
10
+ var f = ["react", "lucide-react"], p = new Set(f), m = f.join("、"), h = [
11
11
  "value",
12
12
  "onChange",
13
13
  "disabled",
14
+ "readOnly",
14
15
  "formData",
15
- "tableMode"
16
- ], _ = new Set([
16
+ "env"
17
+ ], g = new Set([
17
18
  "fetch",
18
19
  "XMLHttpRequest",
19
20
  "WebSocket",
@@ -26,13 +27,13 @@ var p = ["react", "lucide-react"], m = new Set(p), h = p.join("、"), g = [
26
27
  "localStorage",
27
28
  "sessionStorage",
28
29
  "indexedDB"
29
- ]), v = new Set([
30
+ ]), _ = new Set([
30
31
  "script",
31
32
  "iframe",
32
33
  "object",
33
34
  "embed",
34
35
  "link"
35
- ]), y = new Set([
36
+ ]), v = new Set([
36
37
  "loc",
37
38
  "start",
38
39
  "end",
@@ -41,77 +42,77 @@ var p = ["react", "lucide-react"], m = new Set(p), h = p.join("、"), g = [
41
42
  "leadingComments",
42
43
  "trailingComments",
43
44
  "innerComments"
44
- ]), b = /url\(\s*['"]?\s*(?:https?:)?\/\//i, x = (e) => e?.type === "FunctionDeclaration" || e?.type === "FunctionExpression" || e?.type === "ArrowFunctionExpression";
45
- function S(e, t) {
45
+ ]), y = /url\(\s*['"]?\s*(?:https?:)?\/\//i, b = (e) => e?.type === "FunctionDeclaration" || e?.type === "FunctionExpression" || e?.type === "ArrowFunctionExpression";
46
+ function x(e, t) {
46
47
  if (!(!e || typeof e.type != "string") && t(e) !== !1) for (let n of Object.keys(e)) {
47
- if (y.has(n)) continue;
48
+ if (v.has(n)) continue;
48
49
  let r = e[n];
49
- Array.isArray(r) ? r.forEach((e) => S(e, t)) : r && typeof r == "object" && S(r, t);
50
+ Array.isArray(r) ? r.forEach((e) => x(e, t)) : r && typeof r == "object" && x(r, t);
50
51
  }
51
52
  }
52
- function C(e) {
53
+ function S(e) {
53
54
  let t = e.body.find((e) => e.type === "ExportDefaultDeclaration")?.declaration;
54
55
  if (!t) return null;
55
- if (x(t)) return t;
56
+ if (b(t)) return t;
56
57
  if (t.type !== "Identifier") return null;
57
58
  for (let n of e.body) {
58
59
  if (n.type === "FunctionDeclaration" && n.id?.name === t.name) return n;
59
60
  if (n.type === "VariableDeclaration") {
60
- let e = n.declarations.find((e) => e.id?.name === t.name && x(e.init));
61
+ let e = n.declarations.find((e) => e.id?.name === t.name && b(e.init));
61
62
  if (e) return e.init;
62
63
  }
63
64
  }
64
65
  return null;
65
66
  }
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) {
67
+ var C = (e) => e.computed ? null : e.key.type === "Identifier" ? e.key.name : e.key.type === "StringLiteral" ? e.key.value : null, w = (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;
68
+ function T(e, t, n) {
68
69
  for (let r of e.properties) {
69
70
  if (r.type === "RestElement") {
70
- n.push(`组件不能用 ...rest 收集 props,请只解构 ${g.join("、")}。`);
71
+ n.push(`组件不能用 ...rest 收集 props,请只解构 ${h.join("、")}。`);
71
72
  continue;
72
73
  }
73
- let e = w(r);
74
- e === null ? n.push("组件的 props 不能使用计算属性名。") : g.includes(e) || t.add(e);
74
+ let e = C(r);
75
+ e === null ? n.push("组件的 props 不能使用计算属性名。") : h.includes(e) || t.add(e);
75
76
  }
76
77
  }
77
- function D(e) {
78
+ function E(e) {
78
79
  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
+ return e.params.length > 1 && t.push("组件只接收一个 props 参数,不能有第二个参数(如 ref)。"), r?.type === "AssignmentPattern" && (r = r.left), r?.type === "ObjectPattern" ? T(r, n, t) : r?.type === "Identifier" && x(e.body, (e) => {
80
81
  if (e.type === "MemberExpression" && e.object?.name === r.name) {
81
82
  let r = e.computed ? null : e.property.name;
82
- return r === null ? t.push("组件不能用动态键读取 props。") : g.includes(r) || n.add(r), !1;
83
+ return r === null ? t.push("组件不能用动态键读取 props。") : h.includes(r) || n.add(r), !1;
83
84
  }
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;
85
+ return e.type === "VariableDeclarator" && e.init?.name === r.name && e.id.type === "ObjectPattern" ? (T(e.id, n, t), !1) : !0;
86
+ }), n.size && t.unshift(`组件签名只能接收 ${h.join("、")},发现多余的 props:${[...n].join("、")}。平台不会传入它们,请删除,需要的文案或配置直接写在组件内部。`), t;
86
87
  }
87
- function O(e) {
88
+ function D(e) {
88
89
  let t = /* @__PURE__ */ new Set(), n = (e) => {
89
90
  switch (e.type) {
90
- case "Identifier": return _.has(e.name) && t.add(e.name), !0;
91
+ case "Identifier": return g.has(e.name) && t.add(e.name), !0;
91
92
  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;
93
+ case "OptionalMemberExpression": return w(e.property) === "constructor" && t.add("constructor"), e.computed ? !0 : (x(e.object, n), !1);
94
+ case "ObjectProperty": return e.computed ? !0 : (x(e.value, n), !1);
95
+ case "ImportDeclaration": return p.has(e.source.value) || t.add(`import "${e.source.value}"(只能 import ${m})`), !1;
95
96
  case "Import":
96
97
  case "ImportExpression": return t.add("动态 import()"), !0;
97
98
  case "JSXOpeningElement": {
98
99
  let n = e.name?.name;
99
- return n === "textarea" ? t.add("<textarea>(单行文本的值不能包含换行)") : v.has(n) && t.add(`<${n}>`), !0;
100
+ return n === "textarea" ? t.add("<textarea>(单行文本的值不能包含换行)") : _.has(n) && t.add(`<${n}>`), !0;
100
101
  }
101
102
  case "JSXAttribute": return e.name?.name === "dangerouslySetInnerHTML" && t.add("dangerouslySetInnerHTML"), !0;
102
103
  default: return !0;
103
104
  }
104
105
  };
105
- return S(e, n), [...t];
106
+ return x(e, n), [...t];
106
107
  }
107
- function k(e) {
108
+ function O(e) {
108
109
  let t = [];
109
- return /@import\b/i.test(e) && t.push("CSS 中不能使用 @import。"), b.test(e) && t.push("CSS 中不能引用外部地址,图片请用内联 svg 或 data: 地址。"), t;
110
+ return /@import\b/i.test(e) && t.push("CSS 中不能使用 @import。"), y.test(e) && t.push("CSS 中不能引用外部地址,图片请用内联 svg 或 data: 地址。"), t;
110
111
  }
111
- function A(e, t = null) {
112
+ function k(e, t = null) {
112
113
  let n = [], r = null;
113
114
  try {
114
- r = l.packages.parser.parse(e, {
115
+ r = c.packages.parser.parse(e, {
115
116
  sourceType: "module",
116
117
  plugins: ["jsx"]
117
118
  }).program;
@@ -119,21 +120,21 @@ function A(e, t = null) {
119
120
  if (!(e instanceof SyntaxError)) throw e;
120
121
  }
121
122
  if (r) {
122
- let e = C(r);
123
- e && n.push(...D(e));
124
- let t = O(r);
123
+ let e = S(r);
124
+ e && n.push(...E(e));
125
+ let t = D(r);
125
126
  t.length && n.push(`不允许使用:${t.join("、")}。组件不能发起网络请求、使用 eval 或 Function,也不能读取 constructor 或注入脚本和原始 HTML。`);
126
127
  }
127
- return t != null && n.push(...k(t)), n;
128
+ return t != null && n.push(...O(t)), n;
128
129
  }
129
- function j(e, t = null) {
130
- let n = A(e, t);
130
+ function A(e, t = null) {
131
+ let n = k(e, t);
131
132
  if (n.length) throw Error(`组件不符合运行时约束:\n${n.map((e) => `- ${e}`).join("\n")}`);
132
133
  }
133
134
  //#endregion
134
135
  //#region ../shared/src/ai-runtime/checkCssSyntax.ts
135
- function M(e, t = "style.css") {
136
- e?.trim() && d(u(e, {
136
+ function j(e, t = "style.css") {
137
+ e?.trim() && u(l(e, {
137
138
  filename: t,
138
139
  positions: !0,
139
140
  onParseError(e) {
@@ -146,15 +147,15 @@ function M(e, t = "style.css") {
146
147
  }
147
148
  //#endregion
148
149
  //#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];
150
+ var M = /function\s+([A-Za-z_$][\w$]*)/, te = /export\s+default\b/;
151
+ function ne(e) {
152
+ if (!e || te.test(e)) return e;
153
+ let t = e.match(M)?.[1];
153
154
  return t ? `${e.trim()}\nexport default ${t};\n` : e;
154
155
  }
155
156
  //#endregion
156
157
  //#region ../shared/src/ai-runtime/parseSourceCode.ts
157
- var ne = /<(jsx|css)>([\s\S]*?)<\/\1>/g, re = {
158
+ var re = /<(jsx|css)>([\s\S]*?)<\/\1>/g, ie = {
158
159
  ast: !1,
159
160
  sourceType: "module",
160
161
  presets: [["react", {
@@ -163,10 +164,10 @@ var ne = /<(jsx|css)>([\s\S]*?)<\/\1>/g, re = {
163
164
  }]],
164
165
  plugins: ["transform-modules-commonjs"]
165
166
  };
166
- function P(e) {
167
+ function N(e) {
167
168
  if (typeof e != "string" || !e.trim()) return null;
168
169
  let t = null, n = null;
169
- for (let r of e.matchAll(ne)) {
170
+ for (let r of e.matchAll(re)) {
170
171
  let e = r[2].trim();
171
172
  r[1] === "jsx" && (t = e), r[1] === "css" && (n = e);
172
173
  }
@@ -175,14 +176,14 @@ function P(e) {
175
176
  css: n
176
177
  };
177
178
  }
178
- var ie = "export default function AiRuntimeField() {\n return null;\n}";
179
- function F(e, t = "ai") {
180
- let n = P(e);
179
+ var ae = "export default function AiRuntimeField() {\n return null;\n}";
180
+ function P(e, t = "ai") {
181
+ let n = N(e);
181
182
  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,
183
+ let r = ne(n.jsx || ae), i = n.css ?? "";
184
+ i && j(i, `${t}.css`), A(r, i || null);
185
+ let a = c.transform(r, {
186
+ ...ie,
186
187
  filename: `${t}.jsx`
187
188
  });
188
189
  if (!a?.code) throw Error("Babel 没有产出可执行的代码。");
@@ -193,18 +194,18 @@ function F(e, t = "ai") {
193
194
  }
194
195
  //#endregion
195
196
  //#region ../shared/src/ai-runtime/compileCache.ts
196
- var ae = 200, I = /* @__PURE__ */ new Map(), oe = Object.freeze({
197
+ var oe = 200, F = /* @__PURE__ */ new Map(), se = Object.freeze({
197
198
  ok: !1,
198
199
  code: "",
199
200
  css: "",
200
201
  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;
202
+ }), I = (e, t) => {
203
+ if (typeof e != "string" || !e.trim()) return se;
204
+ let n = F.get(e);
205
+ if (n) return F.delete(e), F.set(e, n), n;
205
206
  let r;
206
207
  try {
207
- let n = F(e, t);
208
+ let n = P(e, t);
208
209
  r = {
209
210
  ok: !0,
210
211
  code: n.code,
@@ -219,104 +220,112 @@ var ae = 200, I = /* @__PURE__ */ new Map(), oe = Object.freeze({
219
220
  error: e
220
221
  };
221
222
  }
222
- if (I.size >= ae) {
223
- let e = I.keys().next().value;
224
- e !== void 0 && I.delete(e);
223
+ if (F.size >= oe) {
224
+ let e = F.keys().next().value;
225
+ e !== void 0 && F.delete(e);
225
226
  }
226
- return I.set(e, r), r;
227
- }, se = () => {
228
- I.clear();
229
- }, R = (e, t) => {
227
+ return F.set(e, r), r;
228
+ }, ce = () => {
229
+ F.clear();
230
+ }, L = (e, t) => {
230
231
  let n = {};
231
232
  for (let t of Object.keys(e)) n[t] = e[t];
232
233
  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];
234
+ }, R = t.default || t, le = {
235
+ react: L(t, R),
236
+ "lucide-react": L(d, d)
237
+ }, z = {};
238
+ for (let e of f) {
239
+ let t = le[e];
239
240
  if (!t) throw Error(`模块 ${e} 在白名单里但没有实现。`);
240
- B[e] = t;
241
+ z[e] = t;
241
242
  }
242
- var V = Object.keys(B), H = (e) => {
243
- let t = B[e];
243
+ var B = Object.keys(z), V = (e) => {
244
+ let t = z[e];
244
245
  if (t) return t;
245
- throw Error(`Unknown module: ${e}(组件只能 require ${V.join("、")})`);
246
- }, U = {
246
+ throw Error(`Unknown module: ${e}(组件只能 require ${B.join("、")})`);
247
+ }, H = {
247
248
  COMPILE: 4001,
248
249
  EXECUTE: 4002,
249
250
  RENDER: 5001,
250
251
  RUNTIME: 5002
251
- }, W = new Set(Object.values(U)), G = (e, t) => {
252
+ }, U = new Set(Object.values(H)), W = (e, t) => {
252
253
  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) => {
254
+ return (typeof r != "number" || !U.has(r)) && (n.code = t), n;
255
+ }, G = 0, ue = (e) => (G += 1, `ai-runtime-${e}-${G}.js`), de = (e, t) => {
255
256
  if (!e) throw Error("没有可执行的代码。");
256
257
  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
+ if (Function("require", "exports", "React", r)(V, n, R), typeof n.default != "function") throw Error("Missing default export:组件必须默认导出一个函数。");
258
259
  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;
260
+ }, K = /* @__PURE__ */ new Map(), q = !1, J = /* @__PURE__ */ new WeakSet(), fe = (e) => {
261
+ e && typeof e == "object" && J.add(e);
262
+ }, Y = (e) => {
263
+ if (e && typeof e == "object" && J.has(e)) return;
263
264
  let t = e instanceof Error ? e.stack : void 0;
264
265
  if (typeof t == "string") {
265
- for (let [n, r] of q) if (t.includes(n)) {
266
- r(G(e, U.RUNTIME));
266
+ for (let [n, r] of K) if (t.includes(n)) {
267
+ r(W(e, H.RUNTIME));
267
268
  return;
268
269
  }
269
270
  }
270
- }, fe = () => {
271
- J || typeof window > "u" || (J = !0, window.addEventListener("error", (e) => {
271
+ }, pe = () => {
272
+ q || typeof window > "u" || (q = !0, window.addEventListener("error", (e) => {
272
273
  let t = e.error || Error(e.message);
273
- queueMicrotask(() => X(t));
274
+ queueMicrotask(() => Y(t));
274
275
  }), window.addEventListener("unhandledrejection", (e) => {
275
276
  let t = e.reason;
276
- queueMicrotask(() => X(t));
277
+ queueMicrotask(() => Y(t));
277
278
  }));
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 {
279
+ }, me = (e, t) => {
280
+ pe(), K.set(e, t);
281
+ }, he = (e) => {
282
+ K.delete(e);
283
+ }, ge = /(^|[\s,>+~(])(?::root\b|html\b|body\b)/gi, X = (e) => typeof e != "string" || !e ? "" : e.replace(ge, "$1:host"), _e = typeof window > "u" ? i : a, ve = class extends n {
283
284
  state = { failed: !1 };
284
285
  static getDerivedStateFromError() {
285
286
  return { failed: !0 };
286
287
  }
287
288
  componentDidCatch(e) {
288
- de(e), this.props.onError(G(e, U.RENDER));
289
+ fe(e), this.props.onError(W(e, H.RENDER));
289
290
  }
290
291
  render() {
291
292
  return this.state.failed ? null : this.props.children;
292
293
  }
293
- }, Q = (e, t) => {
294
+ }, Z = new Set([
295
+ "form",
296
+ "table",
297
+ "card"
298
+ ]), ye = (e) => ({
299
+ view: Z.has(e?.view) ? e?.view : "form",
300
+ platform: e?.platform === "mobile" ? "mobile" : "pc"
301
+ }), Q = (e, t) => {
294
302
  let n = e ?? {};
295
303
  return {
296
304
  value: n.value ?? "",
297
305
  disabled: !!n.disabled,
306
+ readOnly: !!n.readOnly,
298
307
  formData: n.formData || {},
299
- tableMode: !!n.tableMode,
308
+ env: ye(n.env),
300
309
  onChange: t
301
310
  };
302
- }, ve = {
311
+ }, be = {
303
312
  ok: !1,
304
313
  error: null,
305
314
  Component: null
306
315
  };
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 }) => {
316
+ function xe(t) {
317
+ let n = ({ code: n, value: a, disabled: c, readOnly: l, formData: u, env: d, runToken: f, height: p, minHeight: m, className: h, style: g, onChange: _, onError: v }) => {
309
318
  let y = s(null), b = s(null), x = s(null), S = s({});
310
319
  S.current = {
311
320
  onChange: _,
312
321
  onError: v
313
322
  };
314
323
  let C = s(null);
315
- C.current === null && (C.current = le(t));
316
- let w = C.current, T = L(n), E = s({
324
+ C.current === null && (C.current = ue(t));
325
+ let w = C.current, T = I(n), E = s({
317
326
  source: void 0,
318
327
  token: void 0,
319
- result: ve
328
+ result: be
320
329
  });
321
330
  if (E.current.source !== n || E.current.token !== f) {
322
331
  let e;
@@ -329,7 +338,7 @@ function ye(t) {
329
338
  e = {
330
339
  ok: !0,
331
340
  error: null,
332
- Component: ue(T.code, w)
341
+ Component: de(T.code, w)
333
342
  };
334
343
  } catch (t) {
335
344
  e = {
@@ -350,38 +359,40 @@ function ye(t) {
350
359
  if (!e) return null;
351
360
  let t = e.shadowRoot || e.attachShadow({ mode: "open" }), n = document.createElement("style"), r = document.createElement("div");
352
361
  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)) }),
362
+ root: ee(r, { onUncaughtError: (e) => S.current.onError?.(W(e, H.RUNTIME)) }),
354
363
  styleEl: n,
355
364
  mountEl: r
356
365
  }, b.current;
357
366
  }, []), j = o(() => Q({
358
367
  value: a,
359
- disabled: l,
368
+ disabled: c,
369
+ readOnly: l,
360
370
  formData: u,
361
- tableMode: d
371
+ env: d
362
372
  }, O), [
363
373
  a,
374
+ c,
364
375
  l,
365
376
  u,
366
377
  d,
367
378
  O
368
379
  ]);
369
- ge(() => {
380
+ _e(() => {
370
381
  let t = A();
371
382
  if (!t) return;
372
383
  let { root: n, styleEl: r } = t;
373
384
  if (!D.ok) {
374
385
  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));
386
+ let e = T.ok ? H.EXECUTE : H.COMPILE;
387
+ S.current.onError?.(W(D.error, e));
377
388
  }
378
389
  return;
379
390
  }
380
391
  x.current = null;
381
- let i = Z(T.css);
392
+ let i = X(T.css);
382
393
  r.textContent !== i && (r.textContent = i);
383
394
  let a = D.Component;
384
- n.render(/* @__PURE__ */ e(_e, {
395
+ n.render(/* @__PURE__ */ e(ve, {
385
396
  onError: k,
386
397
  children: /* @__PURE__ */ e(a, { ...j })
387
398
  }));
@@ -394,7 +405,7 @@ function ye(t) {
394
405
  ]), i(() => () => {
395
406
  let e = b.current;
396
407
  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]);
408
+ }, []), i(() => (me(w, (e) => S.current.onError?.(e)), () => he(w)), [w]);
398
409
  let M = {
399
410
  height: p ?? "auto",
400
411
  minHeight: m ?? 32,
@@ -413,6 +424,6 @@ function ye(t) {
413
424
  }
414
425
  //#endregion
415
426
  //#region src/components/AiRuntimeContainer/index.ts
416
- var $ = ye("ui-base");
427
+ var $ = xe("ui-base");
417
428
  //#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 };
429
+ export { $ as AiRuntimeContainer, $ as default, H as ERROR_CODE, B as MODULE_NAMES, A as assertFieldSource, ce as clearCompileCache, P as compileAiCode, I as compileCached, X as scopeCss, N as splitAiCode, Q as toPlainProps, k as validateFieldSource };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-DnvlY6qH.js";
6
+ import { t as a } from "../DatePicker/DatePicker-AFps-RkO.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-C09c_CdX.js";
11
- import "../DatePicker/DatePicker-DnvlY6qH.js";
10
+ import { n as e, r as t, t as n } from "./Calendar-BsQYjV85.js";
11
+ import "../DatePicker/DatePicker-AFps-RkO.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-CZwg0W8k.js")), M = (o) => {
51
+ }, j = m(() => import("./DatePickerPanel-BbG9Po6g.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-DnvlY6qH.js";
7
+ import { t as e } from "./DatePicker-AFps-RkO.js";
8
8
  import "./pickerLocale-Brf7_Tnd.js";
9
9
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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-Blv9zlaY.js";
1
+ import "../vendors/version-BIxonu_L.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";
@@ -1,8 +1,8 @@
1
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;
2
+ ({ code, value, disabled, readOnly, formData, env, runToken, height, minHeight, className, style, onChange, onError, }: import('../../../../shared/src/ai-runtime/index.ts').AiRuntimeContainerProps): import("react").JSX.Element;
3
3
  displayName: string;
4
4
  };
5
5
  export { AiRuntimeContainer };
6
6
  export default AiRuntimeContainer;
7
- export type { AiCodeParts, AiRuntimeContainerError, AiRuntimeContainerErrorCode, AiRuntimeContainerProps, CompiledAiCode, CompiledCacheEntry, } from '../../../../shared/src/ai-runtime/index.ts';
7
+ export type { AiCodeParts, AiRuntimeContainerError, AiRuntimeContainerErrorCode, AiRuntimeContainerProps, FieldEnv, CompiledAiCode, CompiledCacheEntry, } from '../../../../shared/src/ai-runtime/index.ts';
8
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-Blv9zlaY.js";
1
+ import "./vendors/version-BIxonu_L.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-C09c_CdX.js";
33
- import { t as M } from "./DatePicker/DatePicker-DnvlY6qH.js";
32
+ import { t as j } from "./Calendar/Calendar-BsQYjV85.js";
33
+ import { t as M } from "./DatePicker/DatePicker-AFps-RkO.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.30.1";
4
+ e["@baishuyun/ui-base"] = "6.32.0";
5
5
  }
6
6
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-base",
3
- "version": "6.30.1",
3
+ "version": "6.32.0",
4
4
  "type": "module",
5
5
  "description": "百数云低代码平台通用组件库",
6
6
  "author": "bsy-fe team",