@baishuyun/ui-base 6.38.2 → 6.38.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.
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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";
@@ -12,7 +12,7 @@ var p = [
12
12
  "react",
13
13
  "react-dom",
14
14
  "lucide-react"
15
- ], m = new Set(p), te = p.join("、"), h = [
15
+ ], m = new Set(p), h = p.join("、"), g = [
16
16
  "value",
17
17
  "onChange",
18
18
  "disabled",
@@ -21,14 +21,15 @@ var p = [
21
21
  "env",
22
22
  "widget",
23
23
  "onClick",
24
- "onRequestOptions"
25
- ], g = new Set([
24
+ "onRequestOptions",
25
+ "onAddLinkData"
26
+ ], _ = new Set([
26
27
  "script",
27
28
  "iframe",
28
29
  "object",
29
30
  "embed",
30
31
  "link"
31
- ]), _ = new Set([
32
+ ]), v = new Set([
32
33
  "loc",
33
34
  "start",
34
35
  "end",
@@ -37,70 +38,70 @@ var p = [
37
38
  "leadingComments",
38
39
  "trailingComments",
39
40
  "innerComments"
40
- ]), v = /url\(\s*['"]?\s*(?:https?:)?\/\//i, y = (e) => e?.type === "FunctionDeclaration" || e?.type === "FunctionExpression" || e?.type === "ArrowFunctionExpression";
41
- function b(e, t) {
41
+ ]), y = /url\(\s*['"]?\s*(?:https?:)?\/\//i, b = (e) => e?.type === "FunctionDeclaration" || e?.type === "FunctionExpression" || e?.type === "ArrowFunctionExpression";
42
+ function x(e, t) {
42
43
  if (!(!e || typeof e.type != "string") && t(e) !== !1) for (let n of Object.keys(e)) {
43
- if (_.has(n)) continue;
44
+ if (v.has(n)) continue;
44
45
  let r = e[n];
45
- Array.isArray(r) ? r.forEach((e) => b(e, t)) : r && typeof r == "object" && b(r, t);
46
+ Array.isArray(r) ? r.forEach((e) => x(e, t)) : r && typeof r == "object" && x(r, t);
46
47
  }
47
48
  }
48
- function x(e) {
49
+ function S(e) {
49
50
  let t = e.body.find((e) => e.type === "ExportDefaultDeclaration")?.declaration;
50
51
  if (!t) return null;
51
- if (y(t)) return t;
52
+ if (b(t)) return t;
52
53
  if (t.type !== "Identifier") return null;
53
54
  for (let n of e.body) {
54
55
  if (n.type === "FunctionDeclaration" && n.id?.name === t.name) return n;
55
56
  if (n.type === "VariableDeclaration") {
56
- let e = n.declarations.find((e) => e.id?.name === t.name && y(e.init));
57
+ let e = n.declarations.find((e) => e.id?.name === t.name && b(e.init));
57
58
  if (e) return e.init;
58
59
  }
59
60
  }
60
61
  return null;
61
62
  }
62
- var S = (e) => e.computed ? null : e.key.type === "Identifier" ? e.key.name : e.key.type === "StringLiteral" ? e.key.value : null;
63
- function C(e, t, n) {
63
+ var C = (e) => e.computed ? null : e.key.type === "Identifier" ? e.key.name : e.key.type === "StringLiteral" ? e.key.value : null;
64
+ function w(e, t, n) {
64
65
  for (let r of e.properties) {
65
66
  if (r.type === "RestElement") {
66
- n.push(`组件不能用 ...rest 收集 props,请只解构 ${h.join("、")}。`);
67
+ n.push(`组件不能用 ...rest 收集 props,请只解构 ${g.join("、")}。`);
67
68
  continue;
68
69
  }
69
- let e = S(r);
70
- e === null ? n.push("组件的 props 不能使用计算属性名。") : h.includes(e) || t.add(e);
70
+ let e = C(r);
71
+ e === null ? n.push("组件的 props 不能使用计算属性名。") : g.includes(e) || t.add(e);
71
72
  }
72
73
  }
73
- function w(e) {
74
+ function T(e) {
74
75
  let t = [], n = /* @__PURE__ */ new Set(), [r] = e.params;
75
- return e.params.length > 1 && t.push("组件只接收一个 props 参数,不能有第二个参数(如 ref)。"), r?.type === "AssignmentPattern" && (r = r.left), r?.type === "ObjectPattern" ? C(r, n, t) : r?.type === "Identifier" && b(e.body, (e) => {
76
+ return e.params.length > 1 && t.push("组件只接收一个 props 参数,不能有第二个参数(如 ref)。"), r?.type === "AssignmentPattern" && (r = r.left), r?.type === "ObjectPattern" ? w(r, n, t) : r?.type === "Identifier" && x(e.body, (e) => {
76
77
  if (e.type === "MemberExpression" && e.object?.name === r.name) {
77
78
  let r = e.computed ? null : e.property.name;
78
- return r === null ? t.push("组件不能用动态键读取 props。") : h.includes(r) || n.add(r), !1;
79
+ return r === null ? t.push("组件不能用动态键读取 props。") : g.includes(r) || n.add(r), !1;
79
80
  }
80
- return e.type === "VariableDeclarator" && e.init?.name === r.name && e.id.type === "ObjectPattern" ? (C(e.id, n, t), !1) : !0;
81
- }), n.size && t.unshift(`组件签名只能接收 ${h.join("、")},发现多余的 props:${[...n].join("、")}。平台不会传入它们,请删除。`), t;
81
+ return e.type === "VariableDeclarator" && e.init?.name === r.name && e.id.type === "ObjectPattern" ? (w(e.id, n, t), !1) : !0;
82
+ }), n.size && t.unshift(`组件签名只能接收 ${g.join("、")},发现多余的 props:${[...n].join("、")}。平台不会传入它们,请删除。`), t;
82
83
  }
83
- function T(e) {
84
+ function E(e) {
84
85
  let t = /* @__PURE__ */ new Set();
85
- return b(e, (e) => {
86
+ return x(e, (e) => {
86
87
  switch (e.type) {
87
- case "ImportDeclaration": return m.has(e.source.value) || t.add(`import "${e.source.value}"(只能 import ${te})`), !1;
88
+ case "ImportDeclaration": return m.has(e.source.value) || t.add(`import "${e.source.value}"(只能 import ${h})`), !1;
88
89
  case "Import":
89
90
  case "ImportExpression": return t.add("动态 import()"), !0;
90
91
  case "JSXOpeningElement": {
91
92
  let n = e.name?.name;
92
- return g.has(n) && t.add(`<${n}>`), !0;
93
+ return _.has(n) && t.add(`<${n}>`), !0;
93
94
  }
94
95
  case "JSXAttribute": return e.name?.name === "dangerouslySetInnerHTML" && t.add("dangerouslySetInnerHTML"), !0;
95
96
  default: return !0;
96
97
  }
97
98
  }), [...t];
98
99
  }
99
- function E(e) {
100
+ function D(e) {
100
101
  let t = [];
101
- return /@import\b/i.test(e) && t.push("CSS 中不能使用 @import。"), v.test(e) && t.push("CSS 中不能引用外部地址,图片请用内联 svg 或 data: 地址。"), t;
102
+ return /@import\b/i.test(e) && t.push("CSS 中不能使用 @import。"), y.test(e) && t.push("CSS 中不能引用外部地址,图片请用内联 svg 或 data: 地址。"), t;
102
103
  }
103
- function D(e, t = null) {
104
+ function O(e, t = null) {
104
105
  let n = [], r = null;
105
106
  try {
106
107
  r = l.packages.parser.parse(e, {
@@ -111,20 +112,20 @@ function D(e, t = null) {
111
112
  if (!(e instanceof SyntaxError)) throw e;
112
113
  }
113
114
  if (r) {
114
- let e = x(r);
115
- e && n.push(...w(e));
116
- let t = T(r);
115
+ let e = S(r);
116
+ e && n.push(...T(e));
117
+ let t = E(r);
117
118
  t.length && n.push(`不允许使用:${t.join("、")}。组件只能 import 宿主注册过的模块,也不能注入脚本和原始 HTML。`);
118
119
  }
119
- return t != null && n.push(...E(t)), n;
120
+ return t != null && n.push(...D(t)), n;
120
121
  }
121
- function O(e, t = null) {
122
- let n = D(e, t);
122
+ function k(e, t = null) {
123
+ let n = O(e, t);
123
124
  if (n.length) throw Error(`组件不符合运行时约束:\n${n.map((e) => `- ${e}`).join("\n")}`);
124
125
  }
125
126
  //#endregion
126
127
  //#region ../shared/src/ai-runtime/checkCssSyntax.ts
127
- function k(e, t = "style.css") {
128
+ function A(e, t = "style.css") {
128
129
  e?.trim() && d(u(e, {
129
130
  filename: t,
130
131
  positions: !0,
@@ -138,15 +139,15 @@ function k(e, t = "style.css") {
138
139
  }
139
140
  //#endregion
140
141
  //#region ../shared/src/ai-runtime/sourceText.ts
141
- var A = /function\s+([A-Za-z_$][\w$]*)/, j = /export\s+default\b/;
142
- function M(e) {
143
- if (!e || j.test(e)) return e;
144
- let t = e.match(A)?.[1];
142
+ var j = /function\s+([A-Za-z_$][\w$]*)/, M = /export\s+default\b/;
143
+ function N(e) {
144
+ if (!e || M.test(e)) return e;
145
+ let t = e.match(j)?.[1];
145
146
  return t ? `${e.trim()}\nexport default ${t};\n` : e;
146
147
  }
147
148
  //#endregion
148
149
  //#region ../shared/src/ai-runtime/parseSourceCode.ts
149
- var N = /<(jsx|css)>([\s\S]*?)<\/\1>/g, P = {
150
+ var P = /<(jsx|css)>([\s\S]*?)<\/\1>/g, F = {
150
151
  ast: !1,
151
152
  sourceType: "module",
152
153
  presets: [["react", {
@@ -155,10 +156,10 @@ var N = /<(jsx|css)>([\s\S]*?)<\/\1>/g, P = {
155
156
  }]],
156
157
  plugins: ["transform-modules-commonjs"]
157
158
  };
158
- function F(e) {
159
+ function I(e) {
159
160
  if (typeof e != "string" || !e.trim()) return null;
160
161
  let t = null, n = null;
161
- for (let r of e.matchAll(N)) {
162
+ for (let r of e.matchAll(P)) {
162
163
  let e = r[2].trim();
163
164
  r[1] === "jsx" && (t = e), r[1] === "css" && (n = e);
164
165
  }
@@ -167,14 +168,14 @@ function F(e) {
167
168
  css: n
168
169
  };
169
170
  }
170
- var ne = "export default function AiRuntimeField() {\n return null;\n}";
171
- function I(e, t = "ai") {
172
- let n = F(e);
171
+ var L = "export default function AiRuntimeField() {\n return null;\n}";
172
+ function R(e, t = "ai") {
173
+ let n = I(e);
173
174
  if (!n) throw Error("code 里没有可用的 <jsx> 或 <css>。");
174
- let r = M(n.jsx || ne), i = n.css ?? "";
175
- i && k(i, `${t}.css`), O(r, i || null);
175
+ let r = N(n.jsx || L), i = n.css ?? "";
176
+ i && A(i, `${t}.css`), k(r, i || null);
176
177
  let a = l.transform(r, {
177
- ...P,
178
+ ...F,
178
179
  filename: `${t}.jsx`
179
180
  });
180
181
  if (!a?.code) throw Error("Babel 没有产出可执行的代码。");
@@ -185,18 +186,18 @@ function I(e, t = "ai") {
185
186
  }
186
187
  //#endregion
187
188
  //#region ../shared/src/ai-runtime/compileCache.ts
188
- var re = 200, L = /* @__PURE__ */ new Map(), ie = Object.freeze({
189
+ var te = 200, z = /* @__PURE__ */ new Map(), ne = Object.freeze({
189
190
  ok: !1,
190
191
  code: "",
191
192
  css: "",
192
193
  error: null
193
- }), R = (e, t) => {
194
- if (typeof e != "string" || !e.trim()) return ie;
195
- let n = e, r = L.get(n);
196
- if (r) return L.delete(n), L.set(n, r), r;
194
+ }), B = (e, t) => {
195
+ if (typeof e != "string" || !e.trim()) return ne;
196
+ let n = e, r = z.get(n);
197
+ if (r) return z.delete(n), z.set(n, r), r;
197
198
  let i;
198
199
  try {
199
- let n = I(e, t);
200
+ let n = R(e, t);
200
201
  i = {
201
202
  ok: !0,
202
203
  code: n.code,
@@ -211,86 +212,86 @@ var re = 200, L = /* @__PURE__ */ new Map(), ie = Object.freeze({
211
212
  error: e
212
213
  };
213
214
  }
214
- if (L.size >= re) {
215
- let e = L.keys().next().value;
216
- e !== void 0 && L.delete(e);
215
+ if (z.size >= te) {
216
+ let e = z.keys().next().value;
217
+ e !== void 0 && z.delete(e);
217
218
  }
218
- return L.set(n, i), i;
219
- }, ae = () => {
220
- L.clear();
221
- }, z = (e, t) => {
219
+ return z.set(n, i), i;
220
+ }, re = () => {
221
+ z.clear();
222
+ }, V = (e, t) => {
222
223
  let n = {};
223
224
  for (let t of Object.keys(e)) n[t] = e[t];
224
225
  return (n.default === void 0 || n.default === null) && (n.default = t), Object.defineProperty(n, "__esModule", { value: !0 }), n;
225
- }, B = t.default || t, oe = c.default || c, se = {
226
- react: z(t, B),
227
- "react-dom": z(c, oe),
228
- "lucide-react": z(f, f)
229
- }, V = {};
226
+ }, H = t.default || t, ie = c.default || c, ae = {
227
+ react: V(t, H),
228
+ "react-dom": V(c, ie),
229
+ "lucide-react": V(f, f)
230
+ }, U = {};
230
231
  for (let e of p) {
231
- let t = se[e];
232
+ let t = ae[e];
232
233
  if (!t) throw Error(`模块 ${e} 在白名单里但没有实现。`);
233
- V[e] = t;
234
+ U[e] = t;
234
235
  }
235
- var H = Object.keys(V), ce = (e) => {
236
- let t = V[e];
236
+ var W = Object.keys(U), oe = (e) => {
237
+ let t = U[e];
237
238
  if (t) return t;
238
- throw Error(`Unknown module: ${e}(组件只能 require ${H.join("、")})`);
239
- }, U = {
239
+ throw Error(`Unknown module: ${e}(组件只能 require ${W.join("、")})`);
240
+ }, G = {
240
241
  COMPILE: 4001,
241
242
  EXECUTE: 4002,
242
243
  RENDER: 5001,
243
244
  RUNTIME: 5002
244
- }, le = new Set(Object.values(U)), W = (e, t) => {
245
+ }, se = new Set(Object.values(G)), K = (e, t) => {
245
246
  let n = e instanceof Error ? e : Error(String(e)), r = n.code;
246
- return (typeof r != "number" || !le.has(r)) && (n.code = t), n;
247
- }, G = 0, ue = (e) => (G += 1, `ai-runtime-${e}-${G}.js`), de = (e, t) => {
247
+ return (typeof r != "number" || !se.has(r)) && (n.code = t), n;
248
+ }, ce = 0, le = (e) => (ce += 1, `ai-runtime-${e}-${ce}.js`), ue = (e, t) => {
248
249
  if (!e) throw Error("没有可执行的代码。");
249
250
  let n = {}, r = `${e}\n//# sourceURL=${t}`;
250
- if (Function("require", "exports", "React", r)(ce, n, B), typeof n.default != "function") throw Error("Missing default export:组件必须默认导出一个函数。");
251
+ if (Function("require", "exports", "React", r)(oe, n, H), typeof n.default != "function") throw Error("Missing default export:组件必须默认导出一个函数。");
251
252
  return n.default;
252
- }, K = /* @__PURE__ */ new Map(), q = !1, J = /* @__PURE__ */ new WeakSet(), fe = (e) => {
253
- e && typeof e == "object" && J.add(e);
254
- }, Y = (e) => {
255
- if (e && typeof e == "object" && J.has(e)) return;
253
+ }, q = /* @__PURE__ */ new Map(), J = !1, Y = /* @__PURE__ */ new WeakSet(), de = (e) => {
254
+ e && typeof e == "object" && Y.add(e);
255
+ }, X = (e) => {
256
+ if (e && typeof e == "object" && Y.has(e)) return;
256
257
  let t = e instanceof Error ? e.stack : void 0;
257
258
  if (typeof t == "string") {
258
- for (let [n, r] of K) if (t.includes(n)) {
259
- r(W(e, U.RUNTIME));
259
+ for (let [n, r] of q) if (t.includes(n)) {
260
+ r(K(e, G.RUNTIME));
260
261
  return;
261
262
  }
262
263
  }
263
- }, pe = () => {
264
- q || typeof window > "u" || (q = !0, window.addEventListener("error", (e) => {
264
+ }, fe = () => {
265
+ J || typeof window > "u" || (J = !0, window.addEventListener("error", (e) => {
265
266
  let t = e.error || Error(e.message);
266
- queueMicrotask(() => Y(t));
267
+ queueMicrotask(() => X(t));
267
268
  }), window.addEventListener("unhandledrejection", (e) => {
268
269
  let t = e.reason;
269
- queueMicrotask(() => Y(t));
270
+ queueMicrotask(() => X(t));
270
271
  }));
271
- }, me = (e, t) => {
272
- pe(), K.set(e, t);
273
- }, he = (e) => {
274
- K.delete(e);
275
- }, 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 {
272
+ }, pe = (e, t) => {
273
+ fe(), q.set(e, t);
274
+ }, me = (e) => {
275
+ q.delete(e);
276
+ }, he = /(^|[\s,>+~(])(?::root\b|html\b|body\b)/gi, Z = (e) => typeof e != "string" || !e ? "" : e.replace(he, "$1:host"), ge = class extends n {
276
277
  state = { failed: !1 };
277
278
  static getDerivedStateFromError() {
278
279
  return { failed: !0 };
279
280
  }
280
281
  componentDidCatch(e) {
281
- fe(e), this.props.onError(W(e, U.RENDER));
282
+ de(e), this.props.onError(K(e, G.RENDER));
282
283
  }
283
284
  render() {
284
285
  return this.state.failed ? null : this.props.children;
285
286
  }
286
- }, ye = new Set([
287
+ }, _e = new Set([
287
288
  "form",
288
289
  "table",
289
290
  "card"
290
- ]), be = (e) => ({
291
- view: ye.has(e?.view) ? e?.view : "form",
291
+ ]), ve = (e) => ({
292
+ view: _e.has(e?.view) ? e?.view : "form",
292
293
  platform: e?.platform === "mobile" ? "mobile" : "pc"
293
- }), Z = new Set([
294
+ }), Q = new Set([
294
295
  "code",
295
296
  "runToken",
296
297
  "height",
@@ -305,70 +306,70 @@ var H = Object.keys(V), ce = (e) => {
305
306
  "env",
306
307
  "onChange",
307
308
  "widget"
308
- ]), Q = (e, t) => {
309
+ ]), ye = (e, t) => {
309
310
  let n = e ?? {}, r = {
310
311
  value: n.value ?? "",
311
312
  disabled: !!n.disabled,
312
313
  readOnly: !!n.readOnly,
313
314
  formData: n.formData || {},
314
- env: be(n.env),
315
+ env: ve(n.env),
315
316
  onChange: t
316
317
  };
317
318
  for (let e of Object.keys(n)) {
318
319
  let t = n[e];
319
- t === void 0 || Z.has(e) || (r[e] = t);
320
+ t === void 0 || Q.has(e) || (r[e] = t);
320
321
  }
321
322
  return n.widget && (r.widget = n.widget), r;
322
- }, xe = (e) => {
323
+ }, be = (e) => {
323
324
  let t = Object.keys(e).sort(), n = "";
324
325
  for (let r of t) {
325
326
  let t = e[r];
326
327
  typeof t == "function" ? n += `${r}:fn\0` : t !== void 0 && (typeof t != "object" || !t) && (n += `${r}:${String(t)}\0`);
327
328
  }
328
329
  return n;
329
- }, Se = (e, t) => {
330
+ }, xe = (e, t) => {
330
331
  let n = {};
331
332
  for (let r of Object.keys(e)) {
332
333
  let i = e[r];
333
- i === void 0 || Z.has(r) || (typeof i == "function" ? n[r] = (...e) => {
334
+ i === void 0 || Q.has(r) || (typeof i == "function" ? n[r] = (...e) => {
334
335
  let n = t()[r];
335
336
  return typeof n == "function" ? n(...e) : void 0;
336
337
  } : n[r] = i);
337
338
  }
338
339
  return n;
339
- }, Ce = {
340
+ }, Se = {
340
341
  ok: !1,
341
342
  error: null,
342
343
  Component: null
343
344
  };
344
- function we(t) {
345
- let n = ({ code: n, value: a, disabled: c, readOnly: l, formData: u, env: d, widget: f, runToken: p, height: m, minHeight: te, className: h, style: g, onChange: _, onError: v, ...y }) => {
346
- let b = s(null), x = s(null), S = s(null), C = s({});
347
- C.current = {
348
- onChange: _,
349
- onError: v
345
+ function Ce(t) {
346
+ let n = ({ code: n, value: c, disabled: l, readOnly: u, formData: d, env: f, widget: p, runToken: m, height: h, minHeight: g, className: _, style: v, onChange: y, onError: b, ...x }) => {
347
+ let S = s(null), C = s(null), w = s(null), T = s({});
348
+ T.current = {
349
+ onChange: y,
350
+ onError: b
350
351
  };
351
- let w = s(y);
352
- w.current = y;
353
- let T = s(null);
354
- T.current === null && (T.current = ue(t));
355
- let E = T.current, D = R(n), O = s({
352
+ let E = s(x);
353
+ E.current = x;
354
+ let D = s(null);
355
+ D.current === null && (D.current = le(t));
356
+ let O = D.current, k = B(n), A = s({
356
357
  source: void 0,
357
358
  token: void 0,
358
- result: Ce
359
+ result: Se
359
360
  });
360
- if (O.current.source !== n || O.current.token !== p) {
361
+ if (A.current.source !== n || A.current.token !== m) {
361
362
  let e;
362
- if (!D.ok) e = {
363
+ if (!k.ok) e = {
363
364
  ok: !1,
364
- error: D.error,
365
+ error: k.error,
365
366
  Component: null
366
367
  };
367
368
  else try {
368
369
  e = {
369
370
  ok: !0,
370
371
  error: null,
371
- Component: de(D.code, E)
372
+ Component: ue(k.code, O)
372
373
  };
373
374
  } catch (t) {
374
375
  e = {
@@ -377,85 +378,85 @@ function we(t) {
377
378
  Component: null
378
379
  };
379
380
  }
380
- O.current = {
381
+ A.current = {
381
382
  source: n,
382
- token: p,
383
+ token: m,
383
384
  result: e
384
385
  };
385
386
  }
386
- let k = O.current.result, A = r((e) => C.current.onChange?.(e), []), j = o(() => Se(w.current, () => w.current), [xe(y)]), M = r((e) => C.current.onError?.(e), []), N = r(() => {
387
- if (x.current) return x.current;
388
- let e = b.current;
387
+ let j = A.current.result, M = r((e) => T.current.onChange?.(e), []), N = o(() => xe(E.current, () => E.current), [be(x)]), P = r((e) => T.current.onError?.(e), []), F = r(() => {
388
+ if (C.current) return C.current;
389
+ let e = S.current;
389
390
  if (!e) return null;
390
391
  let t = e.shadowRoot || e.attachShadow({ mode: "open" }), n = document.createElement("style"), r = document.createElement("div");
391
- return r.setAttribute("data-ai-runtime-mount", ""), r.style.height = "100%", t.append(n, r), x.current = {
392
- root: ee(r, { onUncaughtError: (e) => C.current.onError?.(W(e, U.RUNTIME)) }),
392
+ return r.setAttribute("data-ai-runtime-mount", ""), r.style.height = "100%", t.append(n, r), C.current = {
393
+ root: ee(r, { onUncaughtError: (e) => T.current.onError?.(K(e, G.RUNTIME)) }),
393
394
  styleEl: n,
394
395
  mountEl: r
395
- }, x.current;
396
- }, []), P = o(() => Q({
397
- value: a,
398
- disabled: c,
399
- readOnly: l,
400
- formData: u,
401
- env: d,
402
- widget: f,
403
- ...j
404
- }, A), [
405
- a,
396
+ }, C.current;
397
+ }, []), I = o(() => ye({
398
+ value: c,
399
+ disabled: l,
400
+ readOnly: u,
401
+ formData: d,
402
+ env: f,
403
+ widget: p,
404
+ ...N
405
+ }, M), [
406
406
  c,
407
407
  l,
408
408
  u,
409
409
  d,
410
410
  f,
411
- A,
412
- j
411
+ p,
412
+ M,
413
+ N
413
414
  ]);
414
- _e(() => {
415
- let t = N();
415
+ a(() => {
416
+ let t = F();
416
417
  if (!t) return;
417
418
  let { root: n, styleEl: r } = t;
418
- if (!k.ok) {
419
- if (S.current !== k && (S.current = k, r.textContent = "", n.render(null), k.error)) {
420
- let e = D.ok ? U.EXECUTE : U.COMPILE;
421
- C.current.onError?.(W(k.error, e));
419
+ if (!j.ok) {
420
+ if (w.current !== j && (w.current = j, r.textContent = "", n.render(null), j.error)) {
421
+ let e = k.ok ? G.EXECUTE : G.COMPILE;
422
+ T.current.onError?.(K(j.error, e));
422
423
  }
423
424
  return;
424
425
  }
425
- S.current = null;
426
- let i = X(D.css);
426
+ w.current = null;
427
+ let i = Z(k.css);
427
428
  r.textContent !== i && (r.textContent = i);
428
- let a = k.Component;
429
- n.render(/* @__PURE__ */ e(ve, {
430
- onError: M,
431
- children: /* @__PURE__ */ e(a, { ...P })
429
+ let a = j.Component;
430
+ n.render(/* @__PURE__ */ e(ge, {
431
+ onError: P,
432
+ children: /* @__PURE__ */ e(a, { ...I })
432
433
  }));
433
434
  }, [
434
- D,
435
435
  k,
436
+ j,
437
+ I,
436
438
  P,
437
- M,
438
- N
439
+ F
439
440
  ]), i(() => () => {
440
- let e = x.current;
441
- x.current = null, e && (e.styleEl.remove(), e.mountEl.remove(), queueMicrotask(() => e.root.unmount()));
442
- }, []), i(() => (me(E, (e) => C.current.onError?.(e)), () => he(E)), [E]);
443
- let F = {
444
- height: m ?? "auto",
445
- minHeight: te ?? 32,
446
- ...g
441
+ let e = C.current;
442
+ C.current = null, e && (e.styleEl.remove(), e.mountEl.remove(), queueMicrotask(() => e.root.unmount()));
443
+ }, []), i(() => (pe(O, (e) => T.current.onError?.(e)), () => me(O)), [O]);
444
+ let L = {
445
+ height: h ?? "auto",
446
+ minHeight: g ?? 32,
447
+ ...v
447
448
  };
448
449
  return /* @__PURE__ */ e("div", {
449
- ref: b,
450
+ ref: S,
450
451
  "data-ai-runtime-host": "",
451
- className: h,
452
- style: F
452
+ className: _,
453
+ style: L
453
454
  });
454
455
  };
455
456
  return n.displayName = "BsyAiRuntimeContainer", n;
456
457
  }
457
458
  //#endregion
458
459
  //#region src/components/AiRuntimeContainer/index.ts
459
- var $ = we("ui-base");
460
+ var $ = Ce("ui-base");
460
461
  //#endregion
461
- export { $ as AiRuntimeContainer, $ as default, U as ERROR_CODE, H as MODULE_NAMES, O as assertFieldSource, ae as clearCompileCache, I as compileAiCode, R as compileCached, X as scopeCss, F as splitAiCode, Q as toPlainProps, D as validateFieldSource };
462
+ export { $ as AiRuntimeContainer, $ as default, G as ERROR_CODE, W as MODULE_NAMES, k as assertFieldSource, re as clearCompileCache, R as compileAiCode, B as compileCached, Z as scopeCss, I as splitAiCode, ye as toPlainProps, O as validateFieldSource };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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/cssVars-BbL_cmFM.js";
3
3
  import { t as n } from "../vendors/useLocale-DvhRopWF.js";
4
4
  import { t as r } from "../Segmented/Segmented-AHLqTK7U.js";
5
5
  import { t as i } from "../Tooltip/Tooltip-N-w19uRu.js";
6
- import { t as a } from "../DatePicker/DatePicker-MDfmIJrN.js";
6
+ import { t as a } from "../DatePicker/DatePicker-UCsuz24V.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-DvhRopWF.js";
7
7
  import "../vendors/useLatchedPopupPortalRoot-Cu3oUL9h.js";
8
8
  import "../Segmented/Segmented-AHLqTK7U.js";
9
9
  import "../Tooltip/Tooltip-N-w19uRu.js";
10
- import { n as e, r as t, t as n } from "./Calendar--OiKstox.js";
11
- import "../DatePicker/DatePicker-MDfmIJrN.js";
10
+ import { n as e, r as t, t as n } from "./Calendar-CKUgm4C9.js";
11
+ import "../DatePicker/DatePicker-UCsuz24V.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import { t as e } from "./Card-Cdb5cVMG.js";
4
4
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "./CheckBox-Ck2mN3aJ.js";
4
4
  import { t as e } from "./CheckBox-D5gtYO8N.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-BxJJFoBv.js")), M = (n) => {
51
+ }, j = m(() => import("./DatePickerPanel-cJ_j8fTc.js")), M = (n) => {
52
52
  let { children: m, picker: S = "date", theme: w, getPopupContainer: D, triggerActiveClassName: O, zIndex: M } = n, { locale: N } = i(), P = e(M), [F, I] = v(n, {
53
53
  defaultValuePropName: "defaultValue",
54
54
  valuePropName: "value",
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-DvhRopWF.js";
@@ -1,9 +1,9 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import "../Overlay/OverlayContext-CVSFoyqN.js";
4
4
  import "../vendors/useFloatingOverlay-DlLAeqUv.js";
5
5
  import "../vendors/useLocale-DvhRopWF.js";
6
6
  import "../vendors/useLatchedPopupPortalRoot-Cu3oUL9h.js";
7
- import { t as e } from "./DatePicker-MDfmIJrN.js";
7
+ import { t as e } from "./DatePicker-UCsuz24V.js";
8
8
  import "./pickerLocale-Brf7_Tnd.js";
9
9
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../vendors/LocaleContext-CsTLO_Y2.js";
3
3
  import "../vendors/useLocale-DvhRopWF.js";
4
4
  import { t as e } from "./Loading-CLUJfdln.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../Overlay/OverlayContext-CVSFoyqN.js";
4
4
  import { t as e } from "./Modal-BeDIo3CM.js";
@@ -1,3 +1,3 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import { t as e } from "./Radio-NvTetWb5.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "./style-D26azwz6.js";
3
3
  import { t as e } from "./ScrollBar-DJ6DaHDb.js";
4
4
  export { e as ScrollBar, e as default };
@@ -1,3 +1,3 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import { t as e } from "./Segmented-AHLqTK7U.js";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.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-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../Overlay/OverlayContext-CVSFoyqN.js";
3
3
  import "../vendors/useLatchedPopupPortalRoot-Cu3oUL9h.js";
4
4
  import { n as e, t } from "./Tooltip-N-w19uRu.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-Gt_7aQUl.js";
1
+ import "../vendors/version-n6IWuXnN.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import { t as e } from "../vendors/Tree-D5ZZzoPS.js";
4
4
  import "../CheckBox/CheckBox-Ck2mN3aJ.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./vendors/version-Gt_7aQUl.js";
1
+ import "./vendors/version-n6IWuXnN.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-D97QGQpV.js";
29
29
  import { t as k } from "./Loading/Loading-CLUJfdln.js";
30
30
  import "./NotFoundContent/index.js";
31
31
  import { t as A } from "./InputTag/InputTag-5NTrA5bA.js";
32
- import { t as j } from "./Calendar/Calendar--OiKstox.js";
33
- import { t as M } from "./DatePicker/DatePicker-MDfmIJrN.js";
32
+ import { t as j } from "./Calendar/Calendar-CKUgm4C9.js";
33
+ import { t as M } from "./DatePicker/DatePicker-UCsuz24V.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-B7fDob3i.js";
36
36
  import { t as J } from "./FieldCard/FieldCard-CTrNTXFc.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.38.2";
4
+ e["@baishuyun/ui-base"] = "6.38.4";
5
5
  }
6
6
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/ui-base",
3
- "version": "6.38.2",
3
+ "version": "6.38.4",
4
4
  "type": "module",
5
5
  "description": "百数云低代码平台通用组件库",
6
6
  "author": "bsy-fe team",