@blocklet/pages-kit-inner-components 0.4.82 → 0.4.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/setting.js CHANGED
@@ -1,102 +1,102 @@
1
- import { jsx as t, jsxs as S, Fragment as J } from "react/jsx-runtime";
2
- import { t as ve, g as ie, i as Me, b as He, h as ae, E as yt, n as Ye, j as ge } from "./_chunks/state-DqChB5ys.js";
1
+ import { jsx as t, jsxs as S, Fragment as H } from "react/jsx-runtime";
2
+ import { t as ye, g as ne, i as _e, b as Je, h as de, E as yt, n as $e, j as ve } from "./_chunks/state-DqChB5ys.js";
3
3
  import ee from "@arcblock/ux/lib/Empty";
4
4
  import { useLocaleContext as N } from "@arcblock/ux/lib/Locale/context";
5
- import { CodeEditor as xe } from "@blocklet/code-editor";
5
+ import { CodeEditor as ge } from "@blocklet/code-editor";
6
6
  import vt from "@mui/icons-material/AddRounded";
7
7
  import gt from "@mui/icons-material/ArrowDownward";
8
8
  import xt from "@mui/icons-material/ArrowUpward";
9
9
  import kt from "@mui/icons-material/DeleteOutline";
10
- import { Typography as $, TextField as D, Stack as j, FormLabel as ne, Box as O, TableContainer as wt, Paper as de, Table as Le, TableHead as Ge, TableRow as oe, TableCell as le, TableBody as qe, Button as A, IconButton as ke, FormControlLabel as Qe, Switch as Xe, InputAdornment as ue, Dialog as pe, DialogTitle as we, DialogContent as Pe, DialogActions as Ie, alpha as Pt, Tooltip as Z, buttonClasses as It, Autocomplete as Ze, MenuItem as me, Divider as St, Popper as Ot } from "@mui/material";
10
+ import { Typography as J, TextField as D, Stack as j, FormLabel as oe, Box as C, TableContainer as wt, Paper as te, Table as Me, TableHead as He, TableRow as le, TableCell as se, TableBody as Ye, Button as A, IconButton as xe, FormControlLabel as Le, Switch as Ge, InputAdornment as ue, Dialog as ke, DialogTitle as qe, DialogContent as Qe, DialogActions as Xe, alpha as Pt, Tooltip as Z, buttonClasses as It, Autocomplete as Ze, MenuItem as pe, Collapse as St, Divider as Ot, Popper as Ct } from "@mui/material";
11
11
  import V from "lodash/sortBy";
12
- import { useCallback as T, useMemo as se, forwardRef as et, useState as M, useEffect as H, useImperativeHandle as tt, lazy as Ct, Suspense as jt, useRef as F, useId as zt } from "react";
13
- import { useUpdate as rt, useDebounce as Rt } from "react-use";
14
- import { styled as Dt } from "@arcblock/ux/lib/Theme";
15
- import { cx as Nt } from "@emotion/css";
16
- import { useReactive as At, useBoolean as Tt, useUpdate as Vt } from "ahooks";
17
- import Ke from "gradient-parser";
12
+ import { useCallback as T, useMemo as ce, forwardRef as et, useState as $, useEffect as M, useImperativeHandle as tt, lazy as jt, Suspense as zt, useRef as F, useId as Rt } from "react";
13
+ import { useUpdate as rt, useDebounce as Dt } from "react-use";
14
+ import { styled as Nt } from "@arcblock/ux/lib/Theme";
15
+ import { cx as At } from "@emotion/css";
16
+ import { useReactive as Tt, useBoolean as Vt, useUpdate as Et } from "ahooks";
17
+ import Ue from "gradient-parser";
18
18
  import "lodash/without";
19
- import Wt from "tinycolor2";
20
- import { red as Et, pink as Ut, purple as Bt, indigo as Kt, blue as Ft, cyan as _t, teal as Jt, green as $t, lime as Mt, yellow as Ht, amber as Yt, orange as Lt, brown as Gt, grey as qt, blueGrey as Qt } from "@mui/material/colors";
21
- import { getImageSize as he, getVideoSize as fe, UploaderButton as Se, UploaderProvider as Oe, useUploader as Xt } from "./uploader.js";
22
- import { Icon as Zt } from "@iconify-icon/react";
19
+ import Ut from "tinycolor2";
20
+ import { red as Wt, pink as Bt, purple as Kt, indigo as Ft, blue as _t, cyan as Jt, teal as $t, green as Mt, lime as Ht, yellow as Yt, amber as Lt, orange as Gt, brown as qt, grey as Qt, blueGrey as Xt } from "@mui/material/colors";
21
+ import { getImageSize as me, getVideoSize as he, UploaderButton as we, UploaderProvider as Pe, useUploader as Zt } from "./uploader.js";
22
+ import { Icon as er } from "@iconify-icon/react";
23
23
  import it from "lodash/isEmpty";
24
24
  import nt from "lodash/set";
25
- import * as be from "yaml";
26
- import { cloneDeep as er } from "lodash";
27
- import Fe from "@arcblock/ux/lib/Toast";
28
- import { CustomComponentRenderer as ot, transpileAndLoadScript as tr, getPropertiesFromCode as rr } from "@blocklet/pages-kit/components";
29
- import { unstable_useNumberInput as ir, ClickAwayListener as nr } from "@mui/base";
30
- import { VisibilityOffRounded as or, VisibilityRounded as lr, DeleteOutlineRounded as sr, DragIndicatorRounded as cr, TranslateRounded as lt, AddRounded as st, InfoRounded as ct, StarRounded as ar, SettingsRounded as at } from "@mui/icons-material";
31
- import { alpha as _e } from "@mui/material/styles";
25
+ import * as fe from "yaml";
26
+ import { cloneDeep as tr } from "lodash";
27
+ import We from "@arcblock/ux/lib/Toast";
28
+ import { CustomComponentRenderer as ot, transpileAndLoadScript as rr, getPropertiesFromCode as ir } from "@blocklet/pages-kit/components";
29
+ import { unstable_useNumberInput as nr, ClickAwayListener as or } from "@mui/base";
30
+ import { VisibilityOffRounded as lr, VisibilityRounded as sr, DeleteOutlineRounded as cr, DragIndicatorRounded as ar, TranslateRounded as lt, AddRounded as st, InfoRounded as ct, StarRounded as dr, SettingsRounded as at } from "@mui/icons-material";
31
+ import { alpha as Be } from "@mui/material/styles";
32
32
  import { getYjsValue as Y } from "@syncedstore/core";
33
- import dr from "lodash/assign";
34
- import ur from "lodash/has";
35
- import ce from "lodash/isNil";
36
- import pr from "lodash/isObject";
37
- import mr from "lodash/keyBy";
38
- import hr from "lodash/omit";
39
- import fr from "lodash/pick";
40
- import br from "lodash/reduce";
41
- import { usePopupState as Ce, bindTrigger as je, bindDialog as dt, bindPopper as yr } from "material-ui-popup-state/hooks";
42
- import { ErrorBoundary as vr } from "react-error-boundary";
43
- import { useDrop as ut, useDrag as gr } from "react-dnd";
44
- function xr({
33
+ import ur from "lodash/assign";
34
+ import pr from "lodash/has";
35
+ import ae from "lodash/isNil";
36
+ import mr from "lodash/isObject";
37
+ import hr from "lodash/keyBy";
38
+ import fr from "lodash/omit";
39
+ import br from "lodash/pick";
40
+ import yr from "lodash/reduce";
41
+ import { usePopupState as Ie, bindTrigger as Se, bindDialog as dt, bindPopper as vr } from "material-ui-popup-state/hooks";
42
+ import { ErrorBoundary as gr } from "react-error-boundary";
43
+ import { useDrop as ut, useDrag as xr } from "react-dnd";
44
+ function kr({
45
45
  onClick: e,
46
46
  disabled: r,
47
47
  sx: n,
48
48
  ...i
49
49
  }) {
50
- return /* @__PURE__ */ t(ke, { size: "small", color: "warning", variant: "outlined", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(kt, { fontSize: "small" }) });
50
+ return /* @__PURE__ */ t(xe, { size: "small", color: "warning", variant: "outlined", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(kt, { fontSize: "small" }) });
51
51
  }
52
- function kr({
52
+ function wr({
53
53
  onClick: e,
54
54
  disabled: r,
55
55
  sx: n,
56
56
  ...i
57
57
  }) {
58
- return /* @__PURE__ */ t(ke, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(xt, { fontSize: "small" }) });
58
+ return /* @__PURE__ */ t(xe, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(xt, { fontSize: "small" }) });
59
59
  }
60
- function wr({
60
+ function Pr({
61
61
  onClick: e,
62
62
  disabled: r,
63
63
  sx: n,
64
64
  ...i
65
65
  }) {
66
- return /* @__PURE__ */ t(ke, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(gt, { fontSize: "small" }) });
66
+ return /* @__PURE__ */ t(xe, { size: "small", color: "primary", disabled: r, onClick: e, ...i, children: /* @__PURE__ */ t(gt, { fontSize: "small" }) });
67
67
  }
68
- function Pr({
68
+ function Ir({
69
69
  label: e,
70
70
  value: r,
71
71
  onChange: n,
72
72
  disabled: i = !1,
73
73
  itemLabel: d = "",
74
- emptyHeight: m = 40,
75
- property: c,
76
- renderItem: p,
74
+ emptyHeight: p = 40,
75
+ property: a,
76
+ renderItem: m,
77
77
  ...k
78
78
  }) {
79
79
  const { t: y, locale: g } = N(), h = rt(), o = T(
80
80
  (v) => {
81
- n(ve(v, c.type));
81
+ n(ye(v, a.type));
82
82
  },
83
- [n, c.type]
84
- ), s = se(() => Array.isArray(r) ? r : [], [r]), l = T(() => {
83
+ [n, a.type]
84
+ ), s = ce(() => Array.isArray(r) ? r : [], [r]), l = T(() => {
85
85
  const v = [...s, ""];
86
86
  o(v), h();
87
87
  }, [s, o, h]), u = T(() => {
88
- if (!c || !c.subProperties)
88
+ if (!a || !a.subProperties)
89
89
  return l();
90
90
  const v = {};
91
- V(Object.values(c.subProperties), "index").forEach(({ data: R }) => {
92
- var E, U;
91
+ V(Object.values(a.subProperties), "index").forEach(({ data: R }) => {
92
+ var U, W;
93
93
  if (!R.key) return;
94
- const W = ((U = (E = R.locales) == null ? void 0 : E[g]) == null ? void 0 : U.defaultValue) ?? "";
95
- v[R.key] = W;
94
+ const E = ((W = (U = R.locales) == null ? void 0 : U[g]) == null ? void 0 : W.defaultValue) ?? "";
95
+ v[R.key] = E;
96
96
  });
97
97
  const z = [...s, v];
98
98
  o(z), h();
99
- }, [s, o, h, c, g, l]), f = T(
99
+ }, [s, o, h, a, g, l]), f = T(
100
100
  (v) => {
101
101
  try {
102
102
  const I = JSON.parse(v);
@@ -112,7 +112,7 @@ function Pr({
112
112
  o(I), h();
113
113
  },
114
114
  [s, o, h]
115
- ), a = T(
115
+ ), c = T(
116
116
  (v) => {
117
117
  if (v <= 0) return;
118
118
  const I = [...s], z = I[v];
@@ -132,14 +132,14 @@ function Pr({
132
132
  z[v] = I, o(z);
133
133
  },
134
134
  [s, o]
135
- ), P = c && c.subProperties && Object.keys(c.subProperties).length > 0, C = se(() => [
135
+ ), P = a && a.subProperties && Object.keys(a.subProperties).length > 0, O = ce(() => [
136
136
  {
137
137
  field: "index",
138
138
  headerName: "#",
139
139
  width: 40,
140
140
  align: "center",
141
141
  renderCell: ({ index: v }) => /* @__PURE__ */ t(
142
- $,
142
+ J,
143
143
  {
144
144
  variant: "body1",
145
145
  sx: {
@@ -159,10 +159,10 @@ function Pr({
159
159
  {
160
160
  field: "content",
161
161
  headerName: "",
162
- renderCell: ({ row: v, index: I }) => p && P ? p({
162
+ renderCell: ({ row: v, index: I }) => m && P ? m({
163
163
  item: v,
164
164
  index: I,
165
- property: c,
165
+ property: a,
166
166
  onChange: (z) => b(I, z)
167
167
  }) : /* @__PURE__ */ t(
168
168
  D,
@@ -184,35 +184,35 @@ function Pr({
184
184
  // 增加宽度以容纳更多按钮
185
185
  align: "center",
186
186
  renderCell: ({ index: v }) => /* @__PURE__ */ S(j, { direction: "column", spacing: 0.25, children: [
187
- /* @__PURE__ */ t(kr, { disabled: i || v === 0, onClick: () => a(v) }),
187
+ /* @__PURE__ */ t(wr, { disabled: i || v === 0, onClick: () => c(v) }),
188
188
  /* @__PURE__ */ t(
189
- wr,
189
+ Pr,
190
190
  {
191
191
  disabled: i || v === s.length - 1,
192
192
  onClick: () => x(v)
193
193
  }
194
194
  ),
195
- /* @__PURE__ */ t(xr, { disabled: i, onClick: () => w(v) })
195
+ /* @__PURE__ */ t(kr, { disabled: i, onClick: () => w(v) })
196
196
  ] })
197
197
  }
198
198
  ], [
199
- p,
199
+ m,
200
200
  P,
201
- c,
201
+ a,
202
202
  b,
203
203
  d,
204
204
  y,
205
205
  i,
206
206
  k,
207
207
  w,
208
- a,
208
+ c,
209
209
  x,
210
210
  s.length
211
211
  ]);
212
212
  return P ? /* @__PURE__ */ S(j, { width: "100%", gap: 1, children: [
213
- e && /* @__PURE__ */ t(ne, { children: e }),
214
- s.length > 0 ? /* @__PURE__ */ t(wt, { component: de, variant: "outlined", sx: { borderRadius: 1, mb: 1 }, children: /* @__PURE__ */ S(
215
- Le,
213
+ e && /* @__PURE__ */ t(oe, { children: e }),
214
+ s.length > 0 ? /* @__PURE__ */ t(wt, { component: te, variant: "outlined", sx: { borderRadius: 1, mb: 1 }, children: /* @__PURE__ */ S(
215
+ Me,
216
216
  {
217
217
  size: "small",
218
218
  sx: {
@@ -229,8 +229,8 @@ function Pr({
229
229
  borderCollapse: "collapse"
230
230
  },
231
231
  children: [
232
- /* @__PURE__ */ t(Ge, { sx: { display: "none" }, children: /* @__PURE__ */ t(oe, { children: C.map((v) => /* @__PURE__ */ t(
233
- le,
232
+ /* @__PURE__ */ t(He, { sx: { display: "none" }, children: /* @__PURE__ */ t(le, { children: O.map((v) => /* @__PURE__ */ t(
233
+ se,
234
234
  {
235
235
  width: v.width,
236
236
  align: v.align || "left",
@@ -239,8 +239,8 @@ function Pr({
239
239
  },
240
240
  v.field
241
241
  )) }) }),
242
- /* @__PURE__ */ t(qe, { children: s.map((v, I, z) => /* @__PURE__ */ t(
243
- oe,
242
+ /* @__PURE__ */ t(Ye, { children: s.map((v, I, z) => /* @__PURE__ */ t(
243
+ le,
244
244
  {
245
245
  sx: {
246
246
  borderBottom: I < z.length - 1 ? "1px solid" : "none",
@@ -249,8 +249,8 @@ function Pr({
249
249
  backgroundColor: "action.hover"
250
250
  }
251
251
  },
252
- children: C.map((R) => /* @__PURE__ */ t(
253
- le,
252
+ children: O.map((R) => /* @__PURE__ */ t(
253
+ se,
254
254
  {
255
255
  width: R.width,
256
256
  align: R.align || "left",
@@ -260,7 +260,7 @@ function Pr({
260
260
  children: R.renderCell({
261
261
  row: v,
262
262
  index: I,
263
- onChange: (W) => b(I, W)
263
+ onChange: (E) => b(I, E)
264
264
  })
265
265
  },
266
266
  `${I}-${R.field}`
@@ -270,7 +270,7 @@ function Pr({
270
270
  )) })
271
271
  ]
272
272
  }
273
- ) }) : /* @__PURE__ */ t(ee, { style: { fontSize: 12, height: m }, children: y("maker.properties.arrayEmpty") }),
273
+ ) }) : /* @__PURE__ */ t(ee, { style: { fontSize: 12, height: p }, children: y("maker.properties.arrayEmpty") }),
274
274
  /* @__PURE__ */ t(
275
275
  A,
276
276
  {
@@ -284,45 +284,45 @@ function Pr({
284
284
  }
285
285
  )
286
286
  ] }) : /* @__PURE__ */ S(j, { width: "100%", gap: 1, children: [
287
- e && /* @__PURE__ */ t(ne, { children: e }),
288
- /* @__PURE__ */ t(O, { sx: { border: 1, borderColor: "divider", borderRadius: 1, minHeight: 150 }, children: /* @__PURE__ */ t(
289
- xe,
287
+ e && /* @__PURE__ */ t(oe, { children: e }),
288
+ /* @__PURE__ */ t(C, { sx: { border: 1, borderColor: "divider", borderRadius: 1, minHeight: 150 }, children: /* @__PURE__ */ t(
289
+ ge,
290
290
  {
291
- keyId: c.id,
291
+ keyId: a.id,
292
292
  locale: g,
293
293
  language: "json",
294
294
  value: JSON.stringify(s, null, 2),
295
295
  onChange: (v) => f(v || "")
296
296
  },
297
- c.id
297
+ a.id
298
298
  ) })
299
299
  ] });
300
300
  }
301
- Et[300], Ut[300], Bt[300], // deepPurple['300'],
302
- Kt[300], Ft[300], // lightBlue['300'],
303
- _t[300], Jt[300], $t[300], // lightGreen['300'],
304
- Mt[300], Ht[300], Yt[300], Lt[300], // deepOrange['300'],
305
- Gt[300], qt[300], Qt[300];
306
- const Ir = et(function({ showMarkdown: r, markdown: n, onMarkdownChange: i, showUploader: d, value: m, meta: c, onChange: p, ...k }, y) {
307
- const [g, h] = M("");
308
- H(() => {
309
- h(m || "");
310
- }, [m, h]);
301
+ Wt[300], Bt[300], Kt[300], // deepPurple['300'],
302
+ Ft[300], _t[300], // lightBlue['300'],
303
+ Jt[300], $t[300], Mt[300], // lightGreen['300'],
304
+ Ht[300], Yt[300], Lt[300], Gt[300], // deepOrange['300'],
305
+ qt[300], Qt[300], Xt[300];
306
+ const Sr = et(function({ showMarkdown: r, markdown: n, onMarkdownChange: i, showUploader: d, value: p, meta: a, onChange: m, ...k }, y) {
307
+ const [g, h] = $("");
308
+ M(() => {
309
+ h(p || "");
310
+ }, [p, h]);
311
311
  const o = async () => {
312
- if (g !== m) {
313
- const l = ie(g);
312
+ if (g !== p) {
313
+ const l = ne(g);
314
314
  if (!l) {
315
- p(g, void 0);
315
+ m(g, void 0);
316
316
  return;
317
317
  }
318
- const u = await he(l).catch(() => fe(l)).catch(() => {
318
+ const u = await me(l).catch(() => he(l)).catch(() => {
319
319
  });
320
- p(g, { ...u, filename: g });
320
+ m(g, { ...u, filename: g });
321
321
  }
322
322
  };
323
- Rt(
323
+ Dt(
324
324
  () => {
325
- g !== m && p(g);
325
+ g !== p && m(g);
326
326
  },
327
327
  300,
328
328
  [g]
@@ -333,14 +333,14 @@ const Ir = et(function({ showMarkdown: r, markdown: n, onMarkdownChange: i, show
333
333
  return d && (s.InputProps = {
334
334
  sx: { pr: 0 },
335
335
  endAdornment: /* @__PURE__ */ t(ue, { position: "end", sx: { mx: 0.5 }, children: /* @__PURE__ */ t(
336
- Se,
336
+ we,
337
337
  {
338
338
  onChange: async ({ response: l }) => {
339
- var a;
340
- const u = (a = l == null ? void 0 : l.data) == null ? void 0 : a.filename, f = ie(u) || "";
339
+ var c;
340
+ const u = (c = l == null ? void 0 : l.data) == null ? void 0 : c.filename, f = ne(u) || "";
341
341
  let w = {};
342
- f && (w = await he(f).catch(() => fe(f)).catch(() => {
343
- })), p(u, {
342
+ f && (w = await me(f).catch(() => he(f)).catch(() => {
343
+ })), m(u, {
344
344
  ...w,
345
345
  filename: u
346
346
  });
@@ -355,15 +355,15 @@ const Ir = et(function({ showMarkdown: r, markdown: n, onMarkdownChange: i, show
355
355
  ...k,
356
356
  label: /* @__PURE__ */ S(j, { direction: "row", spacing: 1, alignItems: "center", children: [
357
357
  k.label,
358
- r && /* @__PURE__ */ S(J, { children: [
358
+ r && /* @__PURE__ */ S(H, { children: [
359
359
  " (",
360
360
  /* @__PURE__ */ t(
361
- Qe,
361
+ Le,
362
362
  {
363
363
  checked: n,
364
- label: /* @__PURE__ */ t(O, { component: Zt, icon: "tabler:markdown", sx: { verticalAlign: "middle" } }),
364
+ label: /* @__PURE__ */ t(C, { component: er, icon: "tabler:markdown", sx: { verticalAlign: "middle" } }),
365
365
  labelPlacement: "start",
366
- control: /* @__PURE__ */ t(Xe, { size: "small" }),
366
+ control: /* @__PURE__ */ t(Ge, { size: "small" }),
367
367
  sx: { ml: 0.25, pr: 1 },
368
368
  onChange: (l, u) => i == null ? void 0 : i(u)
369
369
  }
@@ -380,36 +380,36 @@ const Ir = et(function({ showMarkdown: r, markdown: n, onMarkdownChange: i, show
380
380
  }
381
381
  }
382
382
  );
383
- }), Sr = Ct(() => import("react-best-gradient-color-picker"));
384
- function Or(e) {
383
+ }), Or = jt(() => import("react-best-gradient-color-picker"));
384
+ function Cr(e) {
385
385
  try {
386
- const n = Ke.parse(e).map((d) => {
387
- const m = d.colorStops.map((c) => {
388
- if (c.type !== "rgba") {
389
- const p = Wt(c.value).toRgb();
386
+ const n = Ue.parse(e).map((d) => {
387
+ const p = d.colorStops.map((a) => {
388
+ if (a.type !== "rgba") {
389
+ const m = Ut(a.value).toRgb();
390
390
  return {
391
- ...c,
392
- value: [p.r, p.g, p.b, p.a],
391
+ ...a,
392
+ value: [m.r, m.g, m.b, m.a],
393
393
  type: "rgba"
394
394
  };
395
395
  }
396
- return c;
396
+ return a;
397
397
  });
398
398
  return {
399
399
  ...d,
400
- colorStops: m
400
+ colorStops: p
401
401
  };
402
402
  });
403
- return Ke.stringify(n);
403
+ return Ue.stringify(n);
404
404
  } catch {
405
- return He(e) ? e : "";
405
+ return Je(e) ? e : "";
406
406
  }
407
407
  }
408
- function Cr({ color: e, sx: r = {}, ...n }) {
409
- He(e);
408
+ function jr({ color: e, sx: r = {}, ...n }) {
409
+ Je(e);
410
410
  const i = {};
411
- return Me(e) ? i.backgroundImage = e : i.backgroundColor = e, /* @__PURE__ */ t(
412
- O,
411
+ return _e(e) ? i.backgroundImage = e : i.backgroundColor = e, /* @__PURE__ */ t(
412
+ C,
413
413
  {
414
414
  sx: {
415
415
  ...r,
@@ -428,14 +428,14 @@ function Cr({ color: e, sx: r = {}, ...n }) {
428
428
  }
429
429
  );
430
430
  }
431
- const jr = et(function({ onSave: r }, n) {
432
- const i = At({
431
+ const zr = et(function({ onSave: r }, n) {
432
+ const i = Tt({
433
433
  value: ""
434
- }), { t: d } = N(), m = {};
435
- i.value ? Me(i.value) ? m.backgroundImage = i.value : m.backgroundColor = i.value : m.border = "1px solid #ccc";
436
- const [c, { setFalse: p, setTrue: k }] = Tt(!1), y = T(() => {
437
- p();
438
- }, [p]), g = () => {
434
+ }), { t: d } = N(), p = {};
435
+ i.value ? _e(i.value) ? p.backgroundImage = i.value : p.backgroundColor = i.value : p.border = "1px solid #ccc";
436
+ const [a, { setFalse: m, setTrue: k }] = Vt(!1), y = T(() => {
437
+ m();
438
+ }, [m]), g = () => {
439
439
  r({ value: i.value }, y);
440
440
  };
441
441
  return tt(n, () => ({
@@ -445,16 +445,16 @@ const jr = et(function({ onSave: r }, n) {
445
445
  close() {
446
446
  y();
447
447
  }
448
- })), /* @__PURE__ */ S(pe, { open: c, onClose: y, hideBackdrop: !0, children: [
449
- /* @__PURE__ */ t(we, { children: d("maker.configBackground") }),
450
- /* @__PURE__ */ t(Pe, { sx: { width: 600 }, children: /* @__PURE__ */ S(O, { width: "100%", display: "flex", children: [
451
- /* @__PURE__ */ t(O, { flex: 1, mr: 1, sx: m, children: !i.value && /* @__PURE__ */ t(ee, { children: d("error.notConfig") }) }),
452
- /* @__PURE__ */ t(jt, { children: /* @__PURE__ */ t(
453
- Sr,
448
+ })), /* @__PURE__ */ S(ke, { open: a, onClose: y, hideBackdrop: !0, children: [
449
+ /* @__PURE__ */ t(qe, { children: d("maker.configBackground") }),
450
+ /* @__PURE__ */ t(Qe, { sx: { width: 600 }, children: /* @__PURE__ */ S(C, { width: "100%", display: "flex", children: [
451
+ /* @__PURE__ */ t(C, { flex: 1, mr: 1, sx: p, children: !i.value && /* @__PURE__ */ t(ee, { children: d("error.notConfig") }) }),
452
+ /* @__PURE__ */ t(zt, { children: /* @__PURE__ */ t(
453
+ Or,
454
454
  {
455
455
  width: 200,
456
456
  height: 200,
457
- value: Or(i.value),
457
+ value: Cr(i.value),
458
458
  onChange: (h) => {
459
459
  i.value = h;
460
460
  },
@@ -465,13 +465,13 @@ const jr = et(function({ onSave: r }, n) {
465
465
  }
466
466
  ) })
467
467
  ] }) }),
468
- /* @__PURE__ */ S(Ie, { children: [
468
+ /* @__PURE__ */ S(Xe, { children: [
469
469
  /* @__PURE__ */ t(A, { variant: "outlined", size: "small", onClick: y, children: d("common.cancel") }),
470
470
  /* @__PURE__ */ t(A, { variant: "contained", size: "small", onClick: g, children: d("maker.save") })
471
471
  ] })
472
472
  ] });
473
473
  });
474
- Dt(O)`
474
+ Nt(C)`
475
475
  .color-item {
476
476
  position: relative;
477
477
  }
@@ -492,22 +492,22 @@ Dt(O)`
492
492
  right: 0;
493
493
  }
494
494
  `;
495
- function zr({
495
+ function Rr({
496
496
  value: e,
497
497
  onChange: r,
498
498
  ...n
499
499
  }) {
500
500
  const i = F(null);
501
- return /* @__PURE__ */ S(J, { children: [
501
+ return /* @__PURE__ */ S(H, { children: [
502
502
  /* @__PURE__ */ t(
503
- Ir,
503
+ Sr,
504
504
  {
505
505
  ...n,
506
506
  value: e,
507
507
  onChange: r,
508
508
  InputProps: {
509
509
  endAdornment: /* @__PURE__ */ t(ue, { position: "end", children: /* @__PURE__ */ t(
510
- Cr,
510
+ jr,
511
511
  {
512
512
  color: e ?? "",
513
513
  style: { width: "1.5rem", height: "1.5rem", padding: 0 },
@@ -521,25 +521,25 @@ function zr({
521
521
  }
522
522
  ),
523
523
  /* @__PURE__ */ t(
524
- jr,
524
+ zr,
525
525
  {
526
526
  ref: i,
527
- onSave: ({ value: d }, m) => {
528
- r(d), m();
527
+ onSave: ({ value: d }, p) => {
528
+ r(d), p();
529
529
  }
530
530
  }
531
531
  )
532
532
  ] });
533
533
  }
534
- function Rr({
534
+ function Dr({
535
535
  label: e,
536
536
  value: r,
537
537
  onChange: n,
538
538
  property: i,
539
539
  component: d,
540
- defaultLocale: m,
541
- allComponents: c,
542
- PropertyValueField: p,
540
+ defaultLocale: p,
541
+ allComponents: a,
542
+ PropertyValueField: m,
543
543
  onUpload: k
544
544
  }) {
545
545
  const { locale: y } = N(), g = F(null);
@@ -548,33 +548,33 @@ function Rr({
548
548
  (s) => s.data.visible !== !1 && s.data.key
549
549
  );
550
550
  return /* @__PURE__ */ S(j, { width: "100%", children: [
551
- /* @__PURE__ */ t(ne, { sx: { px: 0.25, py: 0.5 }, children: e }),
552
- /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(O, { sx: { position: "relative" }, children: o.map((s, l) => {
551
+ /* @__PURE__ */ t(oe, { sx: { px: 0.25, py: 0.5 }, children: e }),
552
+ /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(C, { sx: { position: "relative" }, children: o.map((s, l) => {
553
553
  const { data: u } = s, f = u.key ?? u.id, w = l === o.length - 1;
554
- let a = null;
554
+ let c = null;
555
555
  try {
556
- r && typeof r == "object" ? a = r[f] : typeof r == "string" && (a = (i.type === "yaml" ? be.parse(r || "") : JSON.parse(r || "{}"))[f]);
556
+ r && typeof r == "object" ? c = r[f] : typeof r == "string" && (c = (i.type === "yaml" ? fe.parse(r || "") : JSON.parse(r || "{}"))[f]);
557
557
  } catch {
558
558
  }
559
- a == null && (u.locales && y && u.locales[y] ? a = u.locales[y].defaultValue : u.locales && m && u.locales[m] && (a = u.locales[m].defaultValue));
559
+ c == null && (u.locales && y && u.locales[y] ? c = u.locales[y].defaultValue : u.locales && p && u.locales[p] && (c = u.locales[p].defaultValue));
560
560
  const x = (P) => {
561
561
  try {
562
- let C = {};
562
+ let O = {};
563
563
  if (typeof r == "string")
564
564
  try {
565
- C = i.type === "yaml" ? be.parse(r || "") : JSON.parse(r || "{}");
565
+ O = i.type === "yaml" ? fe.parse(r || "") : JSON.parse(r || "{}");
566
566
  } catch {
567
567
  }
568
- else typeof r == "object" && r !== null && (C = { ...r });
569
- nt(C, f, P);
570
- const v = ve(C, i.type);
568
+ else typeof r == "object" && r !== null && (O = { ...r });
569
+ nt(O, f, P);
570
+ const v = ye(O, i.type);
571
571
  n == null || n(v);
572
- } catch (C) {
573
- console.error("Error updating property:", C);
572
+ } catch (O) {
573
+ console.error("Error updating property:", O);
574
574
  }
575
575
  }, b = 8;
576
576
  return /* @__PURE__ */ S(
577
- O,
577
+ C,
578
578
  {
579
579
  sx: {
580
580
  mb: w ? 0 : 1,
@@ -584,7 +584,7 @@ function Rr({
584
584
  },
585
585
  children: [
586
586
  /* @__PURE__ */ S(
587
- O,
587
+ C,
588
588
  {
589
589
  sx: {
590
590
  position: "relative",
@@ -593,7 +593,7 @@ function Rr({
593
593
  },
594
594
  children: [
595
595
  /* @__PURE__ */ t(
596
- O,
596
+ C,
597
597
  {
598
598
  sx: {
599
599
  position: "absolute",
@@ -608,7 +608,7 @@ function Rr({
608
608
  }
609
609
  ),
610
610
  /* @__PURE__ */ t(
611
- O,
611
+ C,
612
612
  {
613
613
  sx: {
614
614
  position: "absolute",
@@ -623,7 +623,7 @@ function Rr({
623
623
  }
624
624
  ),
625
625
  !w && /* @__PURE__ */ t(
626
- O,
626
+ C,
627
627
  {
628
628
  sx: {
629
629
  position: "absolute",
@@ -641,17 +641,17 @@ function Rr({
641
641
  ]
642
642
  }
643
643
  ),
644
- /* @__PURE__ */ t(O, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ t(
645
- p,
644
+ /* @__PURE__ */ t(C, { sx: { flexGrow: 1 }, children: /* @__PURE__ */ t(
645
+ m,
646
646
  {
647
647
  component: d,
648
648
  property: u,
649
- value: a,
649
+ value: c,
650
650
  onChange: x,
651
651
  size: "small",
652
652
  fullWidth: !0,
653
- defaultLocale: m,
654
- allComponents: c
653
+ defaultLocale: p,
654
+ allComponents: a
655
655
  }
656
656
  ) })
657
657
  ]
@@ -675,7 +675,7 @@ function Rr({
675
675
  },
676
676
  children: [
677
677
  /* @__PURE__ */ t(
678
- ne,
678
+ oe,
679
679
  {
680
680
  sx: {
681
681
  position: "absolute",
@@ -687,7 +687,7 @@ function Rr({
687
687
  }
688
688
  ),
689
689
  /* @__PURE__ */ t(
690
- xe,
690
+ ge,
691
691
  {
692
692
  keyId: i.id,
693
693
  locale: y,
@@ -703,7 +703,7 @@ function Rr({
703
703
  i.id
704
704
  ),
705
705
  /* @__PURE__ */ t(
706
- O,
706
+ C,
707
707
  {
708
708
  component: "fieldset",
709
709
  sx: {
@@ -719,25 +719,25 @@ function Rr({
719
719
  px: 1,
720
720
  py: 0
721
721
  },
722
- children: /* @__PURE__ */ t(O, { component: "legend", sx: { fontSize: "0.75em" }, children: /* @__PURE__ */ t(O, { component: "span", sx: { opacity: 0 }, children: e }) })
722
+ children: /* @__PURE__ */ t(C, { component: "legend", sx: { fontSize: "0.75em" }, children: /* @__PURE__ */ t(C, { component: "span", sx: { opacity: 0 }, children: e }) })
723
723
  }
724
724
  )
725
725
  ]
726
726
  }
727
727
  ) });
728
728
  }
729
- const Je = ["string", "multiline", "json", "yaml", "component", "custom", "url"];
729
+ const Ke = ["string", "multiline", "json", "yaml", "component", "custom", "url"];
730
730
  function pt({
731
731
  disabled: e,
732
732
  list: r,
733
733
  renderItem: n,
734
734
  ...i
735
735
  }) {
736
- const d = F(null), m = zt(), c = Vt(), p = V(Object.entries(r), (s) => s[1].index).map((s) => s[0]), k = F(p), y = T(
736
+ const d = F(null), p = Rt(), a = Et(), m = V(Object.entries(r), (s) => s[1].index).map((s) => s[0]), k = F(m), y = T(
737
737
  (s) => {
738
- k.current = s, c();
738
+ k.current = s, a();
739
739
  },
740
- [c]
740
+ [a]
741
741
  ), g = T(
742
742
  ({ index: s }, { index: l }) => {
743
743
  const u = [...k.current];
@@ -745,11 +745,11 @@ function pt({
745
745
  },
746
746
  [y]
747
747
  );
748
- H(() => {
749
- y(p);
750
- }, [p.join("-")]);
748
+ M(() => {
749
+ y(m);
750
+ }, [m.join("-")]);
751
751
  const [{ isOver: h }, o] = ut({
752
- accept: m,
752
+ accept: p,
753
753
  collect: (s) => ({
754
754
  isOver: s.isOver()
755
755
  }),
@@ -758,8 +758,8 @@ function pt({
758
758
  var u;
759
759
  const s = () => {
760
760
  k.current.forEach((f, w) => {
761
- const a = r[f];
762
- a && (a.index = w);
761
+ const c = r[f];
762
+ c && (c.index = w);
763
763
  });
764
764
  }, l = (u = Y(r)) == null ? void 0 : u.doc;
765
765
  l ? l.transact(() => {
@@ -767,12 +767,12 @@ function pt({
767
767
  }) : s();
768
768
  }
769
769
  });
770
- return H(() => {
771
- h || y(p);
772
- }, [h]), o(d), /* @__PURE__ */ t(O, { ...i, ref: d, className: Nt(h && "isDragging"), children: k.current.map((s, l) => /* @__PURE__ */ t(
773
- Dr,
770
+ return M(() => {
771
+ h || y(m);
772
+ }, [h]), o(d), /* @__PURE__ */ t(C, { ...i, ref: d, className: At(h && "isDragging"), children: k.current.map((s, l) => /* @__PURE__ */ t(
773
+ Nr,
774
774
  {
775
- type: m,
775
+ type: p,
776
776
  disabled: e,
777
777
  id: s,
778
778
  index: l,
@@ -786,16 +786,16 @@ function pt({
786
786
  s
787
787
  )) });
788
788
  }
789
- function Dr({
789
+ function Nr({
790
790
  disabled: e,
791
791
  id: r,
792
792
  index: n,
793
793
  type: i,
794
794
  children: d,
795
- itemIndex: m,
796
- move: c
795
+ itemIndex: p,
796
+ move: a
797
797
  }) {
798
- const p = F(), [{ isDragging: k }, y, g] = gr({
798
+ const m = F(), [{ isDragging: k }, y, g] = xr({
799
799
  type: i,
800
800
  item: () => ({ id: r }),
801
801
  canDrag: () => !e,
@@ -805,47 +805,47 @@ function Dr({
805
805
  canDrop: () => !e,
806
806
  hover(o, s) {
807
807
  var b;
808
- if (!p.current)
808
+ if (!m.current)
809
809
  return;
810
- const l = m(o.id), u = n;
810
+ const l = p(o.id), u = n;
811
811
  if (l === u)
812
812
  return;
813
- const f = (b = p.current) == null ? void 0 : b.getBoundingClientRect(), w = (f.bottom - f.top) / 2, x = s.getClientOffset().y - f.top;
814
- l < u && x < w || l > u && x > w || c({ id: o.id, index: l }, { id: r, index: n });
813
+ const f = (b = m.current) == null ? void 0 : b.getBoundingClientRect(), w = (f.bottom - f.top) / 2, x = s.getClientOffset().y - f.top;
814
+ l < u && x < w || l > u && x > w || a({ id: o.id, index: l }, { id: r, index: n });
815
815
  }
816
816
  });
817
817
  return typeof d == "function" ? d({
818
818
  isDragging: k,
819
819
  drag: y,
820
- drop: (o) => (p.current = o, h(o)),
820
+ drop: (o) => (m.current = o, h(o)),
821
821
  preview: g
822
- }) : (y(h(g(p))), /* @__PURE__ */ t(O, { ref: p, children: d }));
822
+ }) : (y(h(g(m))), /* @__PURE__ */ t(C, { ref: m, children: d }));
823
823
  }
824
- function Nr({
824
+ function Ar({
825
825
  drop: e,
826
826
  preview: r,
827
827
  drag: n,
828
828
  disabled: i,
829
829
  isDragging: d,
830
- children: m,
831
- onDelete: c,
832
- onVisibilityChange: p,
830
+ children: p,
831
+ onDelete: a,
832
+ onVisibilityChange: m,
833
833
  visible: k = !0,
834
834
  actions: y,
835
835
  alwaysShowActions: g = !1
836
836
  }) {
837
837
  const { t: h } = N();
838
838
  return /* @__PURE__ */ t(
839
- O,
839
+ C,
840
840
  {
841
841
  ref: e,
842
842
  sx: {
843
843
  ":hover .hover-visible": { maxWidth: "100%" },
844
844
  opacity: k ? 1 : 0.5
845
845
  },
846
- children: /* @__PURE__ */ S(O, { sx: { position: "relative" }, children: [
846
+ children: /* @__PURE__ */ S(C, { sx: { position: "relative" }, children: [
847
847
  /* @__PURE__ */ t(
848
- O,
848
+ C,
849
849
  {
850
850
  ref: r,
851
851
  sx: {
@@ -855,11 +855,11 @@ function Nr({
855
855
  opacity: 0.9999
856
856
  // NOTE: make preview effective
857
857
  },
858
- children: m
858
+ children: p
859
859
  }
860
860
  ),
861
861
  !i && /* @__PURE__ */ t(
862
- O,
862
+ C,
863
863
  {
864
864
  className: g ? "" : "hover-visible",
865
865
  sx: {
@@ -887,9 +887,9 @@ function Nr({
887
887
  },
888
888
  children: [
889
889
  y,
890
- p && /* @__PURE__ */ t(Z, { title: h(k ? "hideParameter" : "showParameter"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(A, { onClick: () => p(!k), children: k ? /* @__PURE__ */ t(or, { sx: { fontSize: "1.25rem", color: "grey.500" } }) : /* @__PURE__ */ t(lr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
891
- c && /* @__PURE__ */ t(Z, { title: h("delete"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(A, { onClick: c, children: /* @__PURE__ */ t(sr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
892
- /* @__PURE__ */ t(Z, { title: h("dragSort"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(A, { ref: n, children: /* @__PURE__ */ t(cr, { sx: { color: "grey.500" } }) }) })
890
+ m && /* @__PURE__ */ t(Z, { title: h(k ? "hideParameter" : "showParameter"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(A, { onClick: () => m(!k), children: k ? /* @__PURE__ */ t(lr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) : /* @__PURE__ */ t(sr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
891
+ a && /* @__PURE__ */ t(Z, { title: h("delete"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(A, { onClick: a, children: /* @__PURE__ */ t(cr, { sx: { fontSize: "1.25rem", color: "grey.500" } }) }) }),
892
+ /* @__PURE__ */ t(Z, { title: h("dragSort"), disableInteractive: !0, placement: "top", children: /* @__PURE__ */ t(A, { ref: n, children: /* @__PURE__ */ t(ar, { sx: { color: "grey.500" } }) }) })
893
893
  ]
894
894
  }
895
895
  )
@@ -899,12 +899,12 @@ function Nr({
899
899
  }
900
900
  );
901
901
  }
902
- function Ar({
902
+ function Tr({
903
903
  label: e,
904
904
  value: r,
905
905
  onChange: n
906
906
  }) {
907
- const [i, d] = M(!1);
907
+ const [i, d] = $(!1);
908
908
  return /* @__PURE__ */ S(j, { gap: 1, children: [
909
909
  /* @__PURE__ */ t(
910
910
  D,
@@ -912,15 +912,15 @@ function Ar({
912
912
  label: e,
913
913
  size: "small",
914
914
  value: r,
915
- onChange: (m) => n == null ? void 0 : n(m.target.value),
915
+ onChange: (p) => n == null ? void 0 : n(p.target.value),
916
916
  InputProps: {
917
917
  endAdornment: /* @__PURE__ */ t(
918
- Se,
918
+ we,
919
919
  {
920
- onChange: ({ response: m }) => {
921
- var p;
922
- const c = (p = m == null ? void 0 : m.data) == null ? void 0 : p.filename;
923
- c && (n == null || n(c));
920
+ onChange: ({ response: p }) => {
921
+ var m;
922
+ const a = (m = p == null ? void 0 : p.data) == null ? void 0 : m.filename;
923
+ a && (n == null || n(a));
924
924
  }
925
925
  }
926
926
  )
@@ -928,11 +928,11 @@ function Ar({
928
928
  }
929
929
  ),
930
930
  r && /* @__PURE__ */ t(
931
- O,
931
+ C,
932
932
  {
933
933
  component: "img",
934
934
  sx: { objectFit: "contain", borderRadius: 1, cursor: "pointer" },
935
- src: ie(r),
935
+ src: ne(r),
936
936
  alt: e,
937
937
  maxWidth: 100,
938
938
  maxHeight: 100,
@@ -940,20 +940,20 @@ function Ar({
940
940
  onClick: () => d(!0)
941
941
  }
942
942
  ),
943
- /* @__PURE__ */ t(pe, { open: i, onClose: () => d(!1), children: /* @__PURE__ */ t(O, { component: "img", sx: { objectFit: "contain" }, src: ie(r), alt: e }) })
943
+ /* @__PURE__ */ t(ke, { open: i, onClose: () => d(!1), children: /* @__PURE__ */ t(C, { component: "img", sx: { objectFit: "contain" }, src: ne(r), alt: e }) })
944
944
  ] });
945
945
  }
946
- function ye(e, r = "") {
947
- return br(
946
+ function be(e, r = "") {
947
+ return yr(
948
948
  e,
949
949
  (n, i, d) => {
950
- const m = r ? `${r}.${d}` : d;
951
- return pr(i) ? dr(n, ye(i, m)) : n[m] = i, n;
950
+ const p = r ? `${r}.${d}` : d;
951
+ return mr(i) ? ur(n, be(i, p)) : n[p] = i, n;
952
952
  },
953
953
  {}
954
954
  );
955
955
  }
956
- const Tr = [
956
+ const Vr = [
957
957
  { value: "string", label: "Text" },
958
958
  { value: "multiline", label: "Text (Multiline)" },
959
959
  { value: "number", label: "Number" },
@@ -967,46 +967,46 @@ const Tr = [
967
967
  { value: "component", label: "Component" },
968
968
  { value: "custom", label: "Custom (Render by a Component)" }
969
969
  ];
970
- function re(e, r, n) {
970
+ function ie(e, r, n) {
971
971
  return !e || !n ? !1 : Object.values(e).some(({ data: i }) => i.id !== r && i.key === n);
972
972
  }
973
973
  function mt(e, r) {
974
974
  var n;
975
975
  return !e || !r ? !1 : ((n = e[r]) == null ? void 0 : n.data.visible) ?? !0;
976
976
  }
977
- function Vi({ componentId: e }) {
977
+ function Ei({ componentId: e }) {
978
978
  const {
979
979
  state: { components: r }
980
- } = ae(), n = r[e], i = n == null ? void 0 : n.data;
981
- return i ? /* @__PURE__ */ t(j, { maxHeight: "100%", overflow: "auto", children: /* @__PURE__ */ t(O, { p: 2, children: /* @__PURE__ */ t(vr, { FallbackComponent: yt, resetKeys: [e], children: /* @__PURE__ */ t(Vr, { value: i }) }) }) }) : null;
980
+ } = de(), n = r[e], i = n == null ? void 0 : n.data;
981
+ return i ? /* @__PURE__ */ t(j, { maxHeight: "100%", overflow: "auto", children: /* @__PURE__ */ t(C, { p: 2, children: /* @__PURE__ */ t(gr, { FallbackComponent: yt, resetKeys: [e], children: /* @__PURE__ */ t(Er, { value: i }) }) }) }) : null;
982
982
  }
983
- function Vr({ value: e }) {
983
+ function Er({ value: e }) {
984
984
  var k, y, g;
985
985
  const { t: r } = N(), {
986
986
  localState: { currentLocale: n, componentDebugProps: i },
987
987
  state: {
988
988
  config: { defaultLocale: d }
989
989
  },
990
- localActions: { setComponentDebugProps: m }
991
- } = ae(), c = Y(e).doc, p = ge();
990
+ localActions: { setComponentDebugProps: p }
991
+ } = de(), a = Y(e).doc, m = ve();
992
992
  return /* @__PURE__ */ t(j, { height: "100%", children: /* @__PURE__ */ S(j, { gap: 2, children: [
993
- /* @__PURE__ */ t(Wr, { config: e }),
993
+ /* @__PURE__ */ t(Ur, { config: e }),
994
994
  /* @__PURE__ */ t(
995
- Ur,
995
+ Br,
996
996
  {
997
997
  config: e,
998
998
  currentLocale: n,
999
999
  defaultLocale: d,
1000
- allComponents: p,
1000
+ allComponents: m,
1001
1001
  onUpdateConfig: (h) => {
1002
- c.transact(() => {
1002
+ a.transact(() => {
1003
1003
  h(e);
1004
1004
  });
1005
1005
  }
1006
1006
  }
1007
1007
  ),
1008
1008
  /* @__PURE__ */ S(j, { gap: 2, direction: "row", justifyContent: "space-between", alignItems: "center", children: [
1009
- /* @__PURE__ */ t($, { variant: "subtitle1", children: r("renderer") }),
1009
+ /* @__PURE__ */ t(J, { variant: "subtitle1", children: r("renderer") }),
1010
1010
  /* @__PURE__ */ S(
1011
1011
  D,
1012
1012
  {
@@ -1016,28 +1016,28 @@ function Vr({ value: e }) {
1016
1016
  SelectProps: { autoWidth: !0 },
1017
1017
  value: ((k = e.renderer) == null ? void 0 : k.type) || "react-component",
1018
1018
  onChange: (h) => {
1019
- c.transact(() => {
1019
+ a.transact(() => {
1020
1020
  const o = h.target.value;
1021
1021
  e.renderer ?? (e.renderer = { type: o }), e.renderer.type = o;
1022
1022
  });
1023
1023
  },
1024
1024
  children: [
1025
- /* @__PURE__ */ t(me, { value: "react-component", children: "React Component" }),
1026
- /* @__PURE__ */ t(me, { value: "component", children: "Custom Component" })
1025
+ /* @__PURE__ */ t(pe, { value: "react-component", children: "React Component" }),
1026
+ /* @__PURE__ */ t(pe, { value: "component", children: "Custom Component" })
1027
1027
  ]
1028
1028
  }
1029
1029
  )
1030
1030
  ] }),
1031
- ((y = e.renderer) == null ? void 0 : y.type) === "component" ? /* @__PURE__ */ t(Hr, { value: e }) : ((g = e.renderer) == null ? void 0 : g.type) === "react-component" ? /* @__PURE__ */ t(Mr, { value: e }) : null,
1031
+ ((y = e.renderer) == null ? void 0 : y.type) === "component" ? /* @__PURE__ */ t(Yr, { value: e }) : ((g = e.renderer) == null ? void 0 : g.type) === "react-component" ? /* @__PURE__ */ t(Hr, { value: e }) : null,
1032
1032
  /* @__PURE__ */ t(
1033
1033
  bt,
1034
1034
  {
1035
1035
  config: e,
1036
1036
  currentLocale: n,
1037
1037
  defaultLocale: d,
1038
- allComponents: p,
1038
+ allComponents: m,
1039
1039
  onChange: ({ key: h, value: o }) => {
1040
- m({
1040
+ p({
1041
1041
  [h]: o.value
1042
1042
  });
1043
1043
  },
@@ -1048,10 +1048,10 @@ function Vr({ value: e }) {
1048
1048
  )
1049
1049
  ] }) });
1050
1050
  }
1051
- function Wr({ config: e }) {
1051
+ function Ur({ config: e }) {
1052
1052
  const { t: r } = N();
1053
- return /* @__PURE__ */ t(Oe, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
1054
- /* @__PURE__ */ t($, { variant: "subtitle1", children: r("basicInfo") }),
1053
+ return /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
1054
+ /* @__PURE__ */ t(J, { variant: "subtitle1", children: r("basicInfo") }),
1055
1055
  /* @__PURE__ */ t(
1056
1056
  D,
1057
1057
  {
@@ -1087,7 +1087,7 @@ function Wr({ config: e }) {
1087
1087
  }
1088
1088
  ),
1089
1089
  /* @__PURE__ */ t(
1090
- Ar,
1090
+ Tr,
1091
1091
  {
1092
1092
  label: r("previewImage"),
1093
1093
  value: e.previewImage || "",
@@ -1102,24 +1102,24 @@ function ht({
1102
1102
  visible: n,
1103
1103
  config: i,
1104
1104
  currentLocale: d,
1105
- defaultLocale: m,
1106
- allComponents: c,
1107
- onUpdateConfig: p
1105
+ defaultLocale: p,
1106
+ allComponents: a,
1107
+ onUpdateConfig: m
1108
1108
  }) {
1109
1109
  var g, h, o, s, l, u;
1110
- const { t: k } = N(), y = se(() => e.type === "json" || e.type === "yaml" || e.type === "array" ? Fr : _, [e.type]);
1110
+ const { t: k } = N(), y = ce(() => e.type === "json" || e.type === "yaml" || e.type === "array" ? _r : _, [e.type]);
1111
1111
  return /* @__PURE__ */ t(
1112
- Nr,
1112
+ Ar,
1113
1113
  {
1114
1114
  preview: r.preview,
1115
1115
  drop: r.drop,
1116
1116
  drag: r.drag,
1117
1117
  isDragging: r.isDragging,
1118
1118
  onDelete: () => {
1119
- p((f) => {
1119
+ m((f) => {
1120
1120
  if (f.properties) {
1121
- const a = Object.entries(f.properties).sort(([, b], [, P]) => b.index - P.index);
1122
- delete f.properties[e.id], a.filter(([b]) => b !== e.id).forEach(([, b], P) => {
1121
+ const c = Object.entries(f.properties).sort(([, b], [, P]) => b.index - P.index);
1122
+ delete f.properties[e.id], c.filter(([b]) => b !== e.id).forEach(([, b], P) => {
1123
1123
  b.index = P;
1124
1124
  });
1125
1125
  }
@@ -1127,9 +1127,9 @@ function ht({
1127
1127
  },
1128
1128
  visible: n,
1129
1129
  onVisibilityChange: (f) => {
1130
- p((w) => {
1131
- const a = w.properties[e.id].data;
1132
- a.visible = f;
1130
+ m((w) => {
1131
+ const c = w.properties[e.id].data;
1132
+ c.visible = f;
1133
1133
  });
1134
1134
  },
1135
1135
  alwaysShowActions: !0,
@@ -1144,24 +1144,24 @@ function ht({
1144
1144
  width: "calc(100% - 80px - 8px)",
1145
1145
  flex: 1,
1146
1146
  "& .MuiOutlinedInput-root": {
1147
- borderColor: e.key ? re(i.properties, e.id, e.key) ? "warning.main" : void 0 : "error.main"
1147
+ borderColor: e.key ? ie(i.properties, e.id, e.key) ? "warning.main" : void 0 : "error.main"
1148
1148
  },
1149
1149
  "& .MuiFormLabel-root": {
1150
- color: e.key ? re(i.properties, e.id, e.key) ? "warning.main" : "text.secondary" : "error.main"
1150
+ color: e.key ? ie(i.properties, e.id, e.key) ? "warning.main" : "text.secondary" : "error.main"
1151
1151
  },
1152
1152
  "& .MuiFormLabel-root.Mui-focused": {
1153
- color: e.key ? re(i.properties, e.id, e.key) ? "warning.main" : "primary.main" : "error.main"
1153
+ color: e.key ? ie(i.properties, e.id, e.key) ? "warning.main" : "primary.main" : "error.main"
1154
1154
  }
1155
1155
  },
1156
1156
  value: e.key || "",
1157
1157
  onChange: (f) => {
1158
- p((w) => {
1159
- const a = w.properties[e.id].data;
1160
- a.key = f.target.value.trim();
1158
+ m((w) => {
1159
+ const c = w.properties[e.id].data;
1160
+ c.key = f.target.value.trim();
1161
1161
  });
1162
1162
  },
1163
1163
  InputProps: {
1164
- endAdornment: !e.key || e.key && re(i.properties, e.id, e.key) ? /* @__PURE__ */ t(
1164
+ endAdornment: !e.key || e.key && ie(i.properties, e.id, e.key) ? /* @__PURE__ */ t(
1165
1165
  ue,
1166
1166
  {
1167
1167
  position: "end",
@@ -1190,12 +1190,12 @@ function ht({
1190
1190
  label: k("label"),
1191
1191
  size: "small",
1192
1192
  sx: { flex: 1 },
1193
- value: (((h = (g = e.locales) == null ? void 0 : g[d]) == null ? void 0 : h.name) ?? ((s = (o = e.locales) == null ? void 0 : o[m]) == null ? void 0 : s.name)) || "",
1193
+ value: (((h = (g = e.locales) == null ? void 0 : g[d]) == null ? void 0 : h.name) ?? ((s = (o = e.locales) == null ? void 0 : o[p]) == null ? void 0 : s.name)) || "",
1194
1194
  onChange: (f) => {
1195
- p((w) => {
1195
+ m((w) => {
1196
1196
  var x;
1197
- const a = w.properties[e.id].data;
1198
- a.locales ?? (a.locales = {}), (x = a.locales)[d] ?? (x[d] = {}), a.locales[d].name = f.target.value;
1197
+ const c = w.properties[e.id].data;
1198
+ c.locales ?? (c.locales = {}), (x = c.locales)[d] ?? (x[d] = {}), c.locales[d].name = f.target.value;
1199
1199
  });
1200
1200
  }
1201
1201
  }
@@ -1209,16 +1209,16 @@ function ht({
1209
1209
  sx: { flex: 1 },
1210
1210
  value: e.type === "string" && e.multiline ? "multiline" : e.type || "string",
1211
1211
  onChange: (f) => {
1212
- p((w) => {
1213
- const a = w.properties[e.id].data;
1214
- if (a.locales)
1215
- for (const b of Object.keys(a.locales))
1216
- a.locales[b].defaultValue = void 0;
1212
+ m((w) => {
1213
+ const c = w.properties[e.id].data;
1214
+ if (c.locales)
1215
+ for (const b of Object.keys(c.locales))
1216
+ c.locales[b].defaultValue = void 0;
1217
1217
  const x = f.target.value;
1218
- x === "multiline" ? (a.type = "string", a.multiline = !0) : (typeof a.multiline < "u" && delete a.multiline, a.type = x);
1218
+ x === "multiline" ? (c.type = "string", c.multiline = !0) : (typeof c.multiline < "u" && delete c.multiline, c.type = x);
1219
1219
  });
1220
1220
  },
1221
- children: Tr.map((f) => /* @__PURE__ */ t(me, { value: f.value, children: f.label }, f.value))
1221
+ children: Vr.map((f) => /* @__PURE__ */ t(pe, { value: f.value, children: f.label }, f.value))
1222
1222
  }
1223
1223
  )
1224
1224
  ] }),
@@ -1226,8 +1226,8 @@ function ht({
1226
1226
  /* @__PURE__ */ t(
1227
1227
  y,
1228
1228
  {
1229
- allComponents: c,
1230
- defaultLocale: m,
1229
+ allComponents: a,
1230
+ defaultLocale: p,
1231
1231
  component: i,
1232
1232
  property: e,
1233
1233
  label: k("defaultValue"),
@@ -1235,13 +1235,13 @@ function ht({
1235
1235
  fullWidth: !0,
1236
1236
  value: (u = (l = e.locales) == null ? void 0 : l[d]) == null ? void 0 : u.defaultValue,
1237
1237
  onChange: (f, w) => {
1238
- p((a) => {
1238
+ m((c) => {
1239
1239
  var b;
1240
- const x = a.properties[e.id].data;
1240
+ const x = c.properties[e.id].data;
1241
1241
  if (w != null && w.forceUpdateProperty) {
1242
- const P = ye(x), C = ye(f);
1243
- Object.keys(C).forEach((v) => {
1244
- P[v] || nt(x, v, C[v]);
1242
+ const P = be(x), O = be(f);
1243
+ Object.keys(O).forEach((v) => {
1244
+ P[v] || nt(x, v, O[v]);
1245
1245
  });
1246
1246
  } else
1247
1247
  x.locales ?? (x.locales = {}), (b = x.locales)[d] ?? (b[d] = {}), x.locales[d].defaultValue = f;
@@ -1249,40 +1249,40 @@ function ht({
1249
1249
  }
1250
1250
  }
1251
1251
  ),
1252
- e.type === "custom" ? /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(Br, { property: e, allComponents: c }) }) : null
1252
+ e.type === "custom" ? /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(Kr, { property: e, allComponents: a }) }) : null
1253
1253
  ] })
1254
1254
  ] })
1255
1255
  }
1256
1256
  );
1257
1257
  }
1258
- function Er(e, r) {
1259
- const [n, i] = M(0);
1260
- return H(() => {
1261
- const m = setTimeout(() => {
1258
+ function Wr(e, r) {
1259
+ const [n, i] = $(0);
1260
+ return M(() => {
1261
+ const p = setTimeout(() => {
1262
1262
  if (e.current) {
1263
- let c = e.current.parentElement, p = 0;
1264
- for (; c; )
1265
- c.classList.contains("property-container") && p++, c = c.parentElement;
1266
- i(p);
1263
+ let a = e.current.parentElement, m = 0;
1264
+ for (; a; )
1265
+ a.classList.contains("property-container") && m++, a = a.parentElement;
1266
+ i(m);
1267
1267
  }
1268
1268
  }, 100);
1269
- return () => clearTimeout(m);
1269
+ return () => clearTimeout(p);
1270
1270
  }, [e, r]), n;
1271
1271
  }
1272
- function Ur({
1272
+ function Br({
1273
1273
  config: e,
1274
1274
  currentLocale: r,
1275
1275
  defaultLocale: n,
1276
1276
  allComponents: i,
1277
1277
  onUpdateConfig: d,
1278
- useI18nEditor: m = !0
1278
+ useI18nEditor: p = !0
1279
1279
  }) {
1280
- const { t: c } = N(), p = Ce({ variant: "dialog" }), k = e.properties && V(Object.values(e.properties), "index");
1281
- return /* @__PURE__ */ t(Oe, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
1280
+ const { t: a } = N(), m = Ie({ variant: "dialog" }), k = e.properties && V(Object.values(e.properties), "index");
1281
+ return /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
1282
1282
  /* @__PURE__ */ S(j, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between", children: [
1283
- /* @__PURE__ */ t($, { variant: "subtitle1", children: c("properties") }),
1284
- /* @__PURE__ */ t(O, { flex: 1 }),
1285
- m && /* @__PURE__ */ t(A, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...je(p), children: /* @__PURE__ */ t(lt, { fontSize: "small" }) })
1283
+ /* @__PURE__ */ t(J, { variant: "subtitle1", children: a("properties") }),
1284
+ /* @__PURE__ */ t(C, { flex: 1 }),
1285
+ p && /* @__PURE__ */ t(A, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...Se(m), children: /* @__PURE__ */ t(lt, { fontSize: "small" }) })
1286
1286
  ] }),
1287
1287
  e.properties && Object.keys(e.properties).length > 0 ? /* @__PURE__ */ t(
1288
1288
  pt,
@@ -1293,7 +1293,7 @@ function Ur({
1293
1293
  renderItem: (y, g, h) => {
1294
1294
  const o = mt(e.properties, y.id);
1295
1295
  return /* @__PURE__ */ t(
1296
- de,
1296
+ te,
1297
1297
  {
1298
1298
  elevation: 0,
1299
1299
  className: "property-container",
@@ -1321,7 +1321,7 @@ function Ur({
1321
1321
  );
1322
1322
  }
1323
1323
  }
1324
- ) : /* @__PURE__ */ t(ee, { style: { fontSize: 12 }, children: c("maker.properties.noProperties") }),
1324
+ ) : /* @__PURE__ */ t(ee, { style: { fontSize: 12 }, children: a("maker.properties.noProperties") }),
1325
1325
  /* @__PURE__ */ t(
1326
1326
  A,
1327
1327
  {
@@ -1331,26 +1331,26 @@ function Ur({
1331
1331
  onClick: () => {
1332
1332
  d((y) => {
1333
1333
  var h;
1334
- const g = Ye();
1334
+ const g = $e();
1335
1335
  y.properties ?? (y.properties = {}), (h = y.properties)[g] ?? (h[g] = { index: (k == null ? void 0 : k.length) || 0, data: { id: g } });
1336
1336
  });
1337
1337
  },
1338
1338
  startIcon: /* @__PURE__ */ t(st, {}),
1339
- children: c("addObject", { object: c("property") })
1339
+ children: a("addObject", { object: a("property") })
1340
1340
  }
1341
1341
  ),
1342
- m && /* @__PURE__ */ t(ft, { ...dt(p), component: e })
1342
+ p && /* @__PURE__ */ t(ft, { ...dt(m), component: e })
1343
1343
  ] }) });
1344
1344
  }
1345
- function Br({
1345
+ function Kr({
1346
1346
  property: e,
1347
1347
  allComponents: r
1348
1348
  }) {
1349
- const n = Ce({ variant: "popper" });
1350
- return /* @__PURE__ */ S(J, { children: [
1351
- /* @__PURE__ */ t(A, { sx: { minWidth: 0 }, ...je(n), children: /* @__PURE__ */ t(at, { fontSize: "small" }) }),
1352
- /* @__PURE__ */ t(Ot, { ...yr(n), children: /* @__PURE__ */ t(nr, { onClickAway: n.close, children: /* @__PURE__ */ t(de, { children: /* @__PURE__ */ t(O, { width: 500, p: 2, children: /* @__PURE__ */ t(
1353
- ze,
1349
+ const n = Ie({ variant: "popper" });
1350
+ return /* @__PURE__ */ S(H, { children: [
1351
+ /* @__PURE__ */ t(A, { sx: { minWidth: 0 }, ...Se(n), children: /* @__PURE__ */ t(at, { fontSize: "small" }) }),
1352
+ /* @__PURE__ */ t(Ct, { ...vr(n), children: /* @__PURE__ */ t(or, { onClickAway: n.close, children: /* @__PURE__ */ t(te, { children: /* @__PURE__ */ t(C, { width: 500, p: 2, children: /* @__PURE__ */ t(
1353
+ Oe,
1354
1354
  {
1355
1355
  value: e.componentId,
1356
1356
  onChange: (i, d) => e.componentId = d,
@@ -1359,7 +1359,7 @@ function Br({
1359
1359
  ) }) }) }) })
1360
1360
  ] });
1361
1361
  }
1362
- function Kr({
1362
+ function Fr({
1363
1363
  value: e,
1364
1364
  valueImmutable: r,
1365
1365
  onChange: n,
@@ -1367,33 +1367,55 @@ function Kr({
1367
1367
  allComponents: d
1368
1368
  }) {
1369
1369
  var g;
1370
- const [m, c] = M(!1), { t: p, locale: k } = N(), y = typeof (e == null ? void 0 : e.componentId) == "string" ? (g = d[e.componentId]) == null ? void 0 : g.data : void 0;
1371
- return y ? /* @__PURE__ */ S(J, { children: [
1372
- /* @__PURE__ */ t(A, { sx: { minWidth: 0 }, disabled: !y, onClick: () => c(!0), children: /* @__PURE__ */ t(at, { fontSize: "small" }) }),
1373
- /* @__PURE__ */ S(pe, { open: m, onClose: () => c(!1), maxWidth: "md", fullWidth: !0, children: [
1374
- /* @__PURE__ */ t(we, { children: p("maker.properties.parameters") }),
1375
- /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ t(O, { width: "100%", p: 2, children: /* @__PURE__ */ t(
1376
- bt,
1377
- {
1378
- config: y,
1379
- currentLocale: k,
1380
- defaultLocale: i,
1381
- allComponents: d,
1382
- propertiesValue: e == null ? void 0 : e.properties,
1383
- onChange: ({ id: h, value: o }) => {
1384
- const s = er(o.value);
1385
- if (r) {
1386
- const l = JSON.parse(JSON.stringify(e));
1387
- n == null || n({ ...l, properties: { ...l.properties, [h]: { value: s } } });
1388
- } else
1389
- Y(y).doc.transact(() => {
1390
- e.properties ?? (e.properties = {}), e.properties[h] = { value: s };
1391
- });
1392
- }
1393
- }
1394
- ) }) }),
1395
- /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ t(A, { onClick: () => c(!1), children: p("close") }) })
1396
- ] })
1370
+ const [p, a] = $(!1), { t: m, locale: k } = N(), y = typeof (e == null ? void 0 : e.componentId) == "string" ? (g = d[e.componentId]) == null ? void 0 : g.data : void 0;
1371
+ return y ? /* @__PURE__ */ S(C, { sx: { width: "100%", position: "relative" }, children: [
1372
+ /* @__PURE__ */ t(
1373
+ A,
1374
+ {
1375
+ sx: { minWidth: 0 },
1376
+ disabled: !y,
1377
+ onClick: () => a(!p),
1378
+ color: p ? "primary" : "inherit",
1379
+ children: /* @__PURE__ */ t(at, { fontSize: "small" })
1380
+ }
1381
+ ),
1382
+ /* @__PURE__ */ t(St, { in: p, timeout: "auto", unmountOnExit: !0, sx: { width: "100%", zIndex: 10 }, children: /* @__PURE__ */ S(
1383
+ te,
1384
+ {
1385
+ elevation: 1,
1386
+ sx: {
1387
+ mt: 1,
1388
+ p: 2,
1389
+ borderRadius: 1,
1390
+ border: "1px solid",
1391
+ borderColor: "divider",
1392
+ width: "100%"
1393
+ },
1394
+ children: [
1395
+ /* @__PURE__ */ t(C, { width: "100%", mb: 2, children: /* @__PURE__ */ t(
1396
+ bt,
1397
+ {
1398
+ config: y,
1399
+ currentLocale: k,
1400
+ defaultLocale: i,
1401
+ allComponents: d,
1402
+ propertiesValue: e == null ? void 0 : e.properties,
1403
+ onChange: ({ id: h, value: o }) => {
1404
+ const s = tr(o.value);
1405
+ if (r) {
1406
+ const l = JSON.parse(JSON.stringify(e));
1407
+ n == null || n({ ...l, properties: { ...l.properties, [h]: { value: s } } });
1408
+ } else
1409
+ Y(y).doc.transact(() => {
1410
+ e.properties ?? (e.properties = {}), e.properties[h] = { value: s };
1411
+ });
1412
+ }
1413
+ }
1414
+ ) }),
1415
+ /* @__PURE__ */ t(A, { size: "small", onClick: () => a(!1), sx: { mt: 1 }, children: m("close") })
1416
+ ]
1417
+ }
1418
+ ) })
1397
1419
  ] }) : null;
1398
1420
  }
1399
1421
  function ft({
@@ -1405,20 +1427,20 @@ function ft({
1405
1427
  const { t: i } = N(), {
1406
1428
  state: {
1407
1429
  components: d,
1408
- supportedLocales: m,
1409
- config: { defaultLocale: c }
1430
+ supportedLocales: p,
1431
+ config: { defaultLocale: a }
1410
1432
  }
1411
- } = ae(), p = ge(), k = Y(r).doc, y = e === "properties" ? r.properties : e === "parameters" && ((h = r.renderer) == null ? void 0 : h.type) === "component" ? (o = d[r.renderer.componentId]) == null ? void 0 : o.data.properties : void 0, g = ((s = r.renderer) == null ? void 0 : s.type) === "component" ? r : void 0;
1412
- return /* @__PURE__ */ S(pe, { ...n, fullWidth: !0, maxWidth: "lg", children: [
1413
- /* @__PURE__ */ t(we, { children: i("i18nEditorTitle") }),
1414
- /* @__PURE__ */ t(Pe, { children: y && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ S(Le, { stickyHeader: !0, sx: { td: { verticalAlign: "top" } }, children: [
1415
- /* @__PURE__ */ t(Ge, { children: /* @__PURE__ */ t(oe, { children: m.map(({ locale: l, name: u }) => /* @__PURE__ */ S(le, { children: [
1433
+ } = de(), m = ve(), k = Y(r).doc, y = e === "properties" ? r.properties : e === "parameters" && ((h = r.renderer) == null ? void 0 : h.type) === "component" ? (o = d[r.renderer.componentId]) == null ? void 0 : o.data.properties : void 0, g = ((s = r.renderer) == null ? void 0 : s.type) === "component" ? r : void 0;
1434
+ return /* @__PURE__ */ S(ke, { ...n, fullWidth: !0, maxWidth: "lg", children: [
1435
+ /* @__PURE__ */ t(qe, { children: i("i18nEditorTitle") }),
1436
+ /* @__PURE__ */ t(Qe, { children: y && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ S(Me, { stickyHeader: !0, sx: { td: { verticalAlign: "top" } }, children: [
1437
+ /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(le, { children: p.map(({ locale: l, name: u }) => /* @__PURE__ */ S(se, { children: [
1416
1438
  u,
1417
- c === l && /* @__PURE__ */ t(ar, { sx: { fontSize: 12, color: "text.secondary" } })
1439
+ a === l && /* @__PURE__ */ t(dr, { sx: { fontSize: 12, color: "text.secondary" } })
1418
1440
  ] }, l)) }) }),
1419
- /* @__PURE__ */ t(qe, { children: V(Object.values(y), "index").map(({ data: l }) => /* @__PURE__ */ t(oe, { children: m.map(({ locale: u }) => {
1420
- var f, w, a, x, b, P, C, v, I, z, R, W, E, U, te, L, G, q, Q, X, Re, De, Ne, Ae, Te, Ve;
1421
- return /* @__PURE__ */ t(le, { children: /* @__PURE__ */ t(j, { gap: 1, children: e === "properties" ? /* @__PURE__ */ S(J, { children: [
1441
+ /* @__PURE__ */ t(Ye, { children: V(Object.values(y), "index").map(({ data: l }) => /* @__PURE__ */ t(le, { children: p.map(({ locale: u }) => {
1442
+ var f, w, c, x, b, P, O, v, I, z, R, E, U, W, re, L, G, q, Q, X, Ce, je, ze, Re, De, Ne;
1443
+ return /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(j, { gap: 1, children: e === "properties" ? /* @__PURE__ */ S(H, { children: [
1422
1444
  /* @__PURE__ */ t(
1423
1445
  D,
1424
1446
  {
@@ -1437,7 +1459,7 @@ function ft({
1437
1459
  {
1438
1460
  size: "small",
1439
1461
  label: i("label"),
1440
- value: (((w = (f = l.locales) == null ? void 0 : f[u]) == null ? void 0 : w.name) ?? ((x = (a = l.locales) == null ? void 0 : a[c]) == null ? void 0 : x.name)) || "",
1462
+ value: (((w = (f = l.locales) == null ? void 0 : f[u]) == null ? void 0 : w.name) ?? ((x = (c = l.locales) == null ? void 0 : c[a]) == null ? void 0 : x.name)) || "",
1441
1463
  onChange: (K) => {
1442
1464
  k.transact(() => {
1443
1465
  var B;
@@ -1446,18 +1468,18 @@ function ft({
1446
1468
  }
1447
1469
  }
1448
1470
  ),
1449
- /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(
1471
+ /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
1450
1472
  _,
1451
1473
  {
1452
- allComponents: p,
1453
- defaultLocale: c,
1474
+ allComponents: m,
1475
+ defaultLocale: a,
1454
1476
  component: r,
1455
1477
  property: l,
1456
1478
  size: "small",
1457
1479
  fullWidth: !0,
1458
1480
  label: "Default Value",
1459
- valueImmutable: ce((P = (b = l.locales) == null ? void 0 : b[u]) == null ? void 0 : P.defaultValue),
1460
- value: ((v = (C = l.locales) == null ? void 0 : C[u]) == null ? void 0 : v.defaultValue) ?? ((z = (I = l.locales) == null ? void 0 : I[c]) == null ? void 0 : z.defaultValue),
1481
+ valueImmutable: ae((P = (b = l.locales) == null ? void 0 : b[u]) == null ? void 0 : P.defaultValue),
1482
+ value: ((v = (O = l.locales) == null ? void 0 : O[u]) == null ? void 0 : v.defaultValue) ?? ((z = (I = l.locales) == null ? void 0 : I[a]) == null ? void 0 : z.defaultValue),
1461
1483
  onChange: (K) => {
1462
1484
  k.transact(() => {
1463
1485
  var B;
@@ -1466,61 +1488,61 @@ function ft({
1466
1488
  }
1467
1489
  }
1468
1490
  ) })
1469
- ] }) : e === "parameters" && g ? /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(
1491
+ ] }) : e === "parameters" && g ? /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
1470
1492
  _,
1471
1493
  {
1472
- allComponents: p,
1473
- defaultLocale: c,
1494
+ allComponents: m,
1495
+ defaultLocale: a,
1474
1496
  component: r,
1475
1497
  property: l,
1476
1498
  size: "small",
1477
1499
  fullWidth: !0,
1478
- valueImmutable: ce(
1479
- (U = (E = (W = (R = g.renderer.properties) == null ? void 0 : R[l.id]) == null ? void 0 : W.locales) == null ? void 0 : E[u]) == null ? void 0 : U.value
1500
+ valueImmutable: ae(
1501
+ (W = (U = (E = (R = g.renderer.properties) == null ? void 0 : R[l.id]) == null ? void 0 : E.locales) == null ? void 0 : U[u]) == null ? void 0 : W.value
1480
1502
  ),
1481
- value: ((q = (G = (L = (te = g.renderer.properties) == null ? void 0 : te[l.id]) == null ? void 0 : L.locales) == null ? void 0 : G[u]) == null ? void 0 : q.value) ?? ((De = (Re = (X = (Q = g.renderer.properties) == null ? void 0 : Q[l.id]) == null ? void 0 : X.locales) == null ? void 0 : Re[c]) == null ? void 0 : De.value) ?? ((Ae = (Ne = l.locales) == null ? void 0 : Ne[u]) == null ? void 0 : Ae.defaultValue) ?? ((Ve = (Te = l.locales) == null ? void 0 : Te[c]) == null ? void 0 : Ve.defaultValue),
1503
+ value: ((q = (G = (L = (re = g.renderer.properties) == null ? void 0 : re[l.id]) == null ? void 0 : L.locales) == null ? void 0 : G[u]) == null ? void 0 : q.value) ?? ((je = (Ce = (X = (Q = g.renderer.properties) == null ? void 0 : Q[l.id]) == null ? void 0 : X.locales) == null ? void 0 : Ce[a]) == null ? void 0 : je.value) ?? ((Re = (ze = l.locales) == null ? void 0 : ze[u]) == null ? void 0 : Re.defaultValue) ?? ((Ne = (De = l.locales) == null ? void 0 : De[a]) == null ? void 0 : Ne.defaultValue),
1482
1504
  onChange: (K) => {
1483
1505
  k.transact(() => {
1484
- var B, We, Ee, Ue, Be;
1485
- (B = g.renderer).properties ?? (B.properties = {}), (We = g.renderer.properties)[Ee = l.id] ?? (We[Ee] = {}), (Ue = g.renderer.properties[l.id]).locales ?? (Ue.locales = {}), (Be = g.renderer.properties[l.id].locales)[u] ?? (Be[u] = {}), g.renderer.properties[l.id].locales[u].value = K;
1506
+ var B, Ae, Te, Ve, Ee;
1507
+ (B = g.renderer).properties ?? (B.properties = {}), (Ae = g.renderer.properties)[Te = l.id] ?? (Ae[Te] = {}), (Ve = g.renderer.properties[l.id]).locales ?? (Ve.locales = {}), (Ee = g.renderer.properties[l.id].locales)[u] ?? (Ee[u] = {}), g.renderer.properties[l.id].locales[u].value = K;
1486
1508
  });
1487
1509
  }
1488
1510
  }
1489
1511
  ) }) : null }, l.id) }, u);
1490
1512
  }) }, l.id)) })
1491
1513
  ] }) }) }),
1492
- /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ t(A, { onClick: (l) => {
1514
+ /* @__PURE__ */ t(Xe, { children: /* @__PURE__ */ t(A, { onClick: (l) => {
1493
1515
  var u;
1494
1516
  return (u = n.onClose) == null ? void 0 : u.call(n, l, "escapeKeyDown");
1495
1517
  }, children: i("close") }) })
1496
1518
  ] });
1497
1519
  }
1498
- const $e = (e, r) => (n) => {
1520
+ const Fe = (e, r) => (n) => {
1499
1521
  const i = [
1500
1522
  n.palette.info.main,
1501
1523
  n.palette.primary.main,
1502
1524
  n.palette.secondary.main,
1503
1525
  n.palette.success.main,
1504
1526
  n.palette.warning.main
1505
- ], d = Math.min(i.length - 1, e), m = i[d], c = _e(m, 0.5), p = _e(m, 1);
1527
+ ], d = Math.min(i.length - 1, e), p = i[d], a = Be(p, 0.5), m = Be(p, 1);
1506
1528
  return {
1507
1529
  // 保留原有的边框样式
1508
- borderColor: `${c} !important`,
1530
+ borderColor: `${a} !important`,
1509
1531
  borderLeft: "3px solid !important",
1510
1532
  // 稍粗的左侧边框
1511
- borderLeftColor: c,
1533
+ borderLeftColor: a,
1512
1534
  // 使用透明度适应深色/浅色模式
1513
- color: p,
1535
+ color: m,
1514
1536
  ...r
1515
1537
  };
1516
1538
  };
1517
- function Fr({
1539
+ function _r({
1518
1540
  property: e,
1519
1541
  onChange: r,
1520
1542
  defaultLocale: n,
1521
1543
  allComponents: i
1522
1544
  }) {
1523
- const { t: d, locale: m } = N(), c = F(null), p = Er(c, e), k = T(() => {
1545
+ const { t: d, locale: p } = N(), a = F(null), m = Wr(a, e), k = T(() => {
1524
1546
  if (!(e.type !== "json" && e.type !== "yaml" && e.type !== "array") && e.subProperties)
1525
1547
  try {
1526
1548
  const y = {};
@@ -1529,27 +1551,27 @@ function Fr({
1529
1551
  ).forEach(({ data: o }) => {
1530
1552
  var l, u, f, w;
1531
1553
  if (!o.key) return;
1532
- let s = ((u = (l = o.locales) == null ? void 0 : l[m]) == null ? void 0 : u.defaultValue) ?? ((w = (f = o.locales) == null ? void 0 : f[n]) == null ? void 0 : w.defaultValue);
1554
+ let s = ((u = (l = o.locales) == null ? void 0 : l[p]) == null ? void 0 : u.defaultValue) ?? ((w = (f = o.locales) == null ? void 0 : f[n]) == null ? void 0 : w.defaultValue);
1533
1555
  if (o.type === "number")
1534
1556
  s = Number(s);
1535
1557
  else if (o.type === "boolean")
1536
1558
  s = s === !0 || s === "true";
1537
1559
  else if ((o.type === "json" || o.type === "yaml") && typeof s == "string")
1538
1560
  try {
1539
- o.type === "json" ? s = JSON.parse(s) : s = be.parse(s);
1540
- } catch (a) {
1541
- console.error("Error parsing nested value", s, a), s = {};
1561
+ o.type === "json" ? s = JSON.parse(s) : s = fe.parse(s);
1562
+ } catch (c) {
1563
+ console.error("Error parsing nested value", s, c), s = {};
1542
1564
  }
1543
1565
  y[o.key] = s;
1544
1566
  });
1545
- const h = ve(y, e.type);
1567
+ const h = ye(y, e.type);
1546
1568
  r == null || r(h);
1547
1569
  } catch (y) {
1548
1570
  console.error("Error converting structure to text:", y);
1549
1571
  }
1550
- }, [e, m, n, r]);
1551
- return e.type !== "json" && e.type !== "yaml" && e.type !== "array" ? null : /* @__PURE__ */ S(j, { direction: "column", gap: 1.5, sx: { width: "100%" }, ref: c, children: [
1552
- /* @__PURE__ */ t(St, { sx: { mt: -1 }, children: /* @__PURE__ */ t($, { variant: "caption", color: "text.secondary", children: d("maker.properties.subProperties") }) }),
1572
+ }, [e, p, n, r]);
1573
+ return e.type !== "json" && e.type !== "yaml" && e.type !== "array" ? null : /* @__PURE__ */ S(j, { direction: "column", gap: 1.5, sx: { width: "100%" }, ref: a, children: [
1574
+ /* @__PURE__ */ t(Ot, { sx: { mt: -1 }, children: /* @__PURE__ */ t(J, { variant: "caption", color: "text.secondary", children: d("maker.properties.subProperties") }) }),
1553
1575
  e.subProperties && Object.keys(e.subProperties).length > 0 ? /* @__PURE__ */ t(
1554
1576
  pt,
1555
1577
  {
@@ -1559,7 +1581,7 @@ function Fr({
1559
1581
  renderItem: (y, g, h) => {
1560
1582
  const o = y.visible !== !1;
1561
1583
  return /* @__PURE__ */ t(
1562
- de,
1584
+ te,
1563
1585
  {
1564
1586
  elevation: 0,
1565
1587
  className: "property-container",
@@ -1567,7 +1589,7 @@ function Fr({
1567
1589
  p: 1.25,
1568
1590
  borderRadius: 1,
1569
1591
  border: o ? "1px solid" : "1px dashed",
1570
- "&": $e(p)
1592
+ "&": Fe(m)
1571
1593
  },
1572
1594
  children: /* @__PURE__ */ t(j, { gap: 2, children: /* @__PURE__ */ t(
1573
1595
  ht,
@@ -1578,7 +1600,7 @@ function Fr({
1578
1600
  config: {
1579
1601
  properties: e.subProperties
1580
1602
  },
1581
- currentLocale: m,
1603
+ currentLocale: p,
1582
1604
  defaultLocale: n,
1583
1605
  allComponents: i,
1584
1606
  onUpdateConfig: (s) => {
@@ -1612,7 +1634,7 @@ function Fr({
1612
1634
  startIcon: /* @__PURE__ */ t(st, {}),
1613
1635
  onClick: () => {
1614
1636
  try {
1615
- const y = e.subProperties || {}, g = Ye(), o = {
1637
+ const y = e.subProperties || {}, g = $e(), o = {
1616
1638
  index: Object.values(y).length,
1617
1639
  data: {
1618
1640
  id: g,
@@ -1620,7 +1642,7 @@ function Fr({
1620
1642
  type: "string",
1621
1643
  visible: !0,
1622
1644
  locales: {
1623
- [m]: {
1645
+ [p]: {
1624
1646
  name: "",
1625
1647
  defaultValue: ""
1626
1648
  }
@@ -1641,7 +1663,7 @@ function Fr({
1641
1663
  }
1642
1664
  },
1643
1665
  sx: {
1644
- "&": $e(p, {
1666
+ "&": Fe(m, {
1645
1667
  // borderLeft: undefined,
1646
1668
  })
1647
1669
  },
@@ -1656,29 +1678,29 @@ function _({
1656
1678
  value: n,
1657
1679
  onChange: i,
1658
1680
  valueImmutable: d,
1659
- defaultLocale: m,
1660
- allComponents: c,
1661
- ...p
1681
+ defaultLocale: p,
1682
+ allComponents: a,
1683
+ ...m
1662
1684
  }) {
1663
1685
  var s, l, u, f, w;
1664
- const { locale: k } = N(), y = Xt(), g = F(null), h = () => {
1686
+ const { locale: k } = N(), y = Zt(), g = F(null), h = () => {
1665
1687
  var x;
1666
- const a = (x = y == null ? void 0 : y.current) == null ? void 0 : x.getUploader();
1667
- a == null || a.open(), g.current && a.onceUploadSuccess(({ response: b }) => {
1668
- var C, v;
1669
- let P = ((C = b == null ? void 0 : b.data) == null ? void 0 : C.filename) || "";
1688
+ const c = (x = y == null ? void 0 : y.current) == null ? void 0 : x.getUploader();
1689
+ c == null || c.open(), g.current && c.onceUploadSuccess(({ response: b }) => {
1690
+ var O, v;
1691
+ let P = ((O = b == null ? void 0 : b.data) == null ? void 0 : O.filename) || "";
1670
1692
  P && (P = `mediakit://${P}`, n && !n.includes("mediakit://") && (P += " # please use < import { getMediaKitAbsoluteUrl } from '@blocklet/pages-kit/builtin/utils' > to get the full address")), (v = g.current) == null || v.call(g, P);
1671
1693
  });
1672
- }, o = p.label || ((l = (s = r.locales) == null ? void 0 : s[k]) == null ? void 0 : l.name) || ((f = (u = r.locales) == null ? void 0 : u[m]) == null ? void 0 : f.name) || r.key || r.id;
1694
+ }, o = m.label || ((l = (s = r.locales) == null ? void 0 : s[k]) == null ? void 0 : l.name) || ((f = (u = r.locales) == null ? void 0 : u[p]) == null ? void 0 : f.name) || r.key || r.id;
1673
1695
  if (r.type === "number")
1674
1696
  return /* @__PURE__ */ t(
1675
- _r,
1697
+ Jr,
1676
1698
  {
1677
- ...p,
1699
+ ...m,
1678
1700
  label: o,
1679
1701
  NumberProps: {
1680
1702
  value: ["number", "string"].includes(typeof n) ? n : null,
1681
- onChange: (a, x) => i == null ? void 0 : i(x)
1703
+ onChange: (c, x) => i == null ? void 0 : i(x)
1682
1704
  }
1683
1705
  }
1684
1706
  );
@@ -1686,12 +1708,12 @@ function _({
1686
1708
  return /* @__PURE__ */ t(
1687
1709
  D,
1688
1710
  {
1689
- ...p,
1711
+ ...m,
1690
1712
  label: o,
1691
1713
  type: "text",
1692
1714
  value: n ?? "",
1693
- onChange: (a) => {
1694
- const x = a.target.value;
1715
+ onChange: (c) => {
1716
+ const x = c.target.value;
1695
1717
  if (x === "" || x === "-") {
1696
1718
  i == null || i(x);
1697
1719
  return;
@@ -1705,94 +1727,94 @@ function _({
1705
1727
  );
1706
1728
  if (r.type === "boolean")
1707
1729
  return /* @__PURE__ */ t(
1708
- Qe,
1730
+ Le,
1709
1731
  {
1710
1732
  label: o,
1711
1733
  labelPlacement: "start",
1712
- control: /* @__PURE__ */ t(Xe, { checked: n === !0, onChange: (a, x) => i == null ? void 0 : i(x) })
1734
+ control: /* @__PURE__ */ t(Ge, { checked: n === !0, onChange: (c, x) => i == null ? void 0 : i(x) })
1713
1735
  }
1714
1736
  );
1715
1737
  if (r.type === "color")
1716
1738
  return /* @__PURE__ */ t(
1717
- zr,
1739
+ Rr,
1718
1740
  {
1719
1741
  label: o,
1720
1742
  value: n,
1721
- onChange: (a) => {
1722
- i == null || i(a);
1743
+ onChange: (c) => {
1744
+ i == null || i(c);
1723
1745
  }
1724
1746
  }
1725
1747
  );
1726
1748
  if (r.type === "json" || r.type === "yaml")
1727
1749
  return /* @__PURE__ */ t(
1728
- Rr,
1750
+ Dr,
1729
1751
  {
1730
1752
  label: o,
1731
1753
  value: n,
1732
- onChange: (a) => {
1733
- i == null || i(a);
1754
+ onChange: (c) => {
1755
+ i == null || i(c);
1734
1756
  },
1735
1757
  property: r,
1736
1758
  component: e,
1737
- defaultLocale: m,
1738
- allComponents: c,
1759
+ defaultLocale: p,
1760
+ allComponents: a,
1739
1761
  PropertyValueField: _,
1740
- onUpload: (a) => {
1741
- g.current = a, h();
1762
+ onUpload: (c) => {
1763
+ g.current = c, h();
1742
1764
  }
1743
1765
  }
1744
1766
  );
1745
1767
  if (r.type === "custom") {
1746
- const a = (w = c[r.componentId]) == null ? void 0 : w.data;
1747
- return a ? /* @__PURE__ */ t(O, { width: "100%", children: /* @__PURE__ */ t(
1768
+ const c = (w = a[r.componentId]) == null ? void 0 : w.data;
1769
+ return c ? /* @__PURE__ */ t(C, { width: "100%", children: /* @__PURE__ */ t(
1748
1770
  ot,
1749
1771
  {
1750
- componentId: a.id,
1772
+ componentId: c.id,
1751
1773
  props: { label: o, value: n, onChange: i },
1752
1774
  locale: k,
1753
1775
  dev: {
1754
1776
  mode: "draft",
1755
- components: c,
1756
- defaultLocale: m
1777
+ components: a,
1778
+ defaultLocale: p
1757
1779
  }
1758
1780
  }
1759
- ) }) : /* @__PURE__ */ t(D, { ...p, label: o, disabled: !0, placeholder: "Click right button select a component" });
1781
+ ) }) : /* @__PURE__ */ t(D, { ...m, label: o, disabled: !0, placeholder: "Click right button select a component" });
1760
1782
  }
1761
1783
  if (r.type === "component")
1762
- return /* @__PURE__ */ S(j, { width: "100%", direction: "row", gap: 1, children: [
1763
- /* @__PURE__ */ t(O, { flex: 1, children: /* @__PURE__ */ t(
1764
- ze,
1784
+ return /* @__PURE__ */ S(j, { width: "100%", direction: "column", gap: 1, children: [
1785
+ /* @__PURE__ */ t(
1786
+ Oe,
1765
1787
  {
1766
- allComponents: c,
1788
+ allComponents: a,
1767
1789
  label: o,
1768
1790
  value: n == null ? void 0 : n.componentId,
1769
- onChange: (a, x) => {
1791
+ onChange: (c, x) => {
1770
1792
  d || !n ? i == null || i({ ...n && JSON.parse(JSON.stringify(n)), componentId: x }) : typeof n == "object" && (n.componentId = x);
1771
1793
  }
1772
1794
  }
1773
- ) }),
1774
- /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(
1775
- Kr,
1795
+ ),
1796
+ (n == null ? void 0 : n.componentId) && /* @__PURE__ */ t(
1797
+ Fr,
1776
1798
  {
1777
1799
  value: n,
1778
1800
  valueImmutable: d,
1779
1801
  onChange: i,
1780
- defaultLocale: m,
1781
- allComponents: c
1802
+ defaultLocale: p,
1803
+ allComponents: a
1782
1804
  }
1783
- ) })
1805
+ )
1784
1806
  ] });
1785
1807
  if (!r.type || ["string", "url"].includes(r.type)) {
1786
- const a = r.type === "string" ? r.multiline : void 0, x = r.type === "url" ? n == null ? void 0 : n.url : n;
1808
+ const c = r.type === "string" ? r.multiline : void 0, x = r.type === "url" ? n == null ? void 0 : n.url : n;
1787
1809
  return /* @__PURE__ */ t(
1788
1810
  D,
1789
1811
  {
1790
- ...p,
1812
+ ...m,
1791
1813
  label: o,
1792
1814
  value: typeof x == "string" ? x : "",
1793
- multiline: a,
1794
- minRows: a ? 2 : void 0,
1795
- maxRows: a ? 10 : void 0,
1815
+ multiline: c,
1816
+ minRows: c ? 2 : void 0,
1817
+ maxRows: c ? 10 : void 0,
1796
1818
  onChange: (b) => i == null ? void 0 : i(
1797
1819
  r.type === "url" ? { ...n, url: b.target.value, mediaKitUrl: b.target.value } : b.target.value
1798
1820
  ),
@@ -1800,20 +1822,20 @@ function _({
1800
1822
  sx: { pr: 0 },
1801
1823
  endAdornment: /* @__PURE__ */ S(ue, { position: "end", children: [
1802
1824
  /* @__PURE__ */ t(
1803
- Se,
1825
+ we,
1804
1826
  {
1805
1827
  onChange: async ({ response: b }) => {
1806
1828
  var I, z, R;
1807
1829
  const P = ((I = b == null ? void 0 : b.data) == null ? void 0 : I.url) || ((z = b == null ? void 0 : b.data) == null ? void 0 : z.fileUrl);
1808
- let C;
1809
- P && (C = await he(P).catch(() => fe(P)).catch(() => {
1830
+ let O;
1831
+ P && (O = await me(P).catch(() => he(P)).catch(() => {
1810
1832
  }));
1811
1833
  let v = ((R = b == null ? void 0 : b.data) == null ? void 0 : R.filename) || "";
1812
1834
  v && (v = `mediakit://${v}`), i == null || i({
1813
1835
  url: P,
1814
1836
  mediaKitUrl: v,
1815
- width: C == null ? void 0 : C.naturalWidth,
1816
- height: C == null ? void 0 : C.naturalHeight
1837
+ width: O == null ? void 0 : O.naturalWidth,
1838
+ height: O == null ? void 0 : O.naturalHeight
1817
1839
  });
1818
1840
  }
1819
1841
  }
@@ -1825,40 +1847,40 @@ function _({
1825
1847
  );
1826
1848
  }
1827
1849
  return r.type === "array" ? /* @__PURE__ */ t(
1828
- Pr,
1850
+ Ir,
1829
1851
  {
1830
1852
  label: o,
1831
1853
  value: Array.isArray(n) ? n : [],
1832
- onChange: (a) => i == null ? void 0 : i(a),
1854
+ onChange: (c) => i == null ? void 0 : i(c),
1833
1855
  property: r,
1834
- renderItem: ({ item: a, index: x, onChange: b }) => r.subProperties && Object.keys(r.subProperties).length > 0 ? /* @__PURE__ */ t(j, { gap: 1, width: "100%", children: V(Object.values(r.subProperties), "index").filter((P) => P.data.visible !== !1).map(({ data: P }) => P.key ? /* @__PURE__ */ t(
1856
+ renderItem: ({ item: c, index: x, onChange: b }) => r.subProperties && Object.keys(r.subProperties).length > 0 ? /* @__PURE__ */ t(j, { gap: 1, width: "100%", children: V(Object.values(r.subProperties), "index").filter((P) => P.data.visible !== !1).map(({ data: P }) => P.key ? /* @__PURE__ */ t(
1835
1857
  _,
1836
1858
  {
1837
1859
  component: e,
1838
1860
  property: P,
1839
- value: a[P.key],
1840
- onChange: (C) => {
1841
- const v = { ...a, [P.key]: C };
1861
+ value: c[P.key],
1862
+ onChange: (O) => {
1863
+ const v = { ...c, [P.key]: O };
1842
1864
  b(v);
1843
1865
  },
1844
1866
  size: "small",
1845
1867
  fullWidth: !0,
1846
- defaultLocale: m,
1847
- allComponents: c
1868
+ defaultLocale: p,
1869
+ allComponents: a
1848
1870
  },
1849
1871
  P.id
1850
- ) : null) }, x) : /* @__PURE__ */ t(D, { size: p.size, fullWidth: !0, value: a, onChange: (P) => b(P.target.value) })
1872
+ ) : null) }, x) : /* @__PURE__ */ t(D, { size: m.size, fullWidth: !0, value: c, onChange: (P) => b(P.target.value) })
1851
1873
  }
1852
1874
  ) : (console.error("Unsupported property type", r.type), null);
1853
1875
  }
1854
- function _r({
1876
+ function Jr({
1855
1877
  NumberProps: e,
1856
1878
  ...r
1857
1879
  }) {
1858
- const { getInputProps: n } = ir(e), i = n();
1880
+ const { getInputProps: n } = nr(e), i = n();
1859
1881
  return /* @__PURE__ */ t(D, { ...r, inputProps: i });
1860
1882
  }
1861
- const Jr = `import React from '@blocklet/pages-kit/builtin/react'
1883
+ const $r = `import React from '@blocklet/pages-kit/builtin/react'
1862
1884
  import { Box } from '@blocklet/pages-kit/builtin/mui/material'
1863
1885
 
1864
1886
  export default function () {
@@ -1867,19 +1889,19 @@ export default function () {
1867
1889
  Hello World
1868
1890
  </Box>
1869
1891
  )
1870
- }`, $r = `console.log('hello')
1892
+ }`, Mr = `console.log('hello')
1871
1893
  `;
1872
- function Mr({
1894
+ function Hr({
1873
1895
  value: e
1874
1896
  }) {
1875
1897
  const { locale: r } = N(), n = rt(), i = Y(e).doc;
1876
- return H(() => {
1898
+ return M(() => {
1877
1899
  var d;
1878
1900
  (d = e.renderer) != null && d.script || (i.transact(() => {
1879
- e.renderer.script = e.renderer.type === "react-component" ? Jr : $r;
1901
+ e.renderer.script = e.renderer.type === "react-component" ? $r : Mr;
1880
1902
  }), n());
1881
- }, [e]), /* @__PURE__ */ t(O, { sx: { border: 1, borderColor: "divider", borderRadius: 1, overflow: "hidden" }, children: /* @__PURE__ */ t(
1882
- xe,
1903
+ }, [e]), /* @__PURE__ */ t(C, { sx: { border: 1, borderColor: "divider", borderRadius: 1, overflow: "hidden" }, children: /* @__PURE__ */ t(
1904
+ ge,
1883
1905
  {
1884
1906
  keyId: e.id,
1885
1907
  locale: r,
@@ -1891,48 +1913,48 @@ function Mr({
1891
1913
  e.id
1892
1914
  ) });
1893
1915
  }
1894
- function Hr({ value: e }) {
1916
+ function Yr({ value: e }) {
1895
1917
  var g, h, o;
1896
1918
  const { t: r } = N(), n = Y(e).doc, {
1897
1919
  state: {
1898
1920
  components: i,
1899
1921
  config: { defaultLocale: d },
1900
- resources: m
1922
+ resources: p
1901
1923
  },
1902
- localState: { currentLocale: c }
1903
- } = ae(), p = ge(), k = ((g = i[e.renderer.componentId]) == null ? void 0 : g.data) ?? ((o = (h = m.components) == null ? void 0 : h[e.renderer.componentId]) == null ? void 0 : o.component), y = Ce({ variant: "dialog" });
1924
+ localState: { currentLocale: a }
1925
+ } = de(), m = ve(), k = ((g = i[e.renderer.componentId]) == null ? void 0 : g.data) ?? ((o = (h = p.components) == null ? void 0 : h[e.renderer.componentId]) == null ? void 0 : o.component), y = Ie({ variant: "dialog" });
1904
1926
  return /* @__PURE__ */ S(j, { gap: 1, children: [
1905
1927
  /* @__PURE__ */ t(
1906
- ze,
1928
+ Oe,
1907
1929
  {
1908
- allComponents: p,
1930
+ allComponents: m,
1909
1931
  excludes: [e.id],
1910
1932
  value: e.renderer.componentId,
1911
1933
  onChange: (s, l) => e.renderer.componentId = l
1912
1934
  }
1913
1935
  ),
1914
- k && /* @__PURE__ */ S(J, { children: [
1936
+ k && /* @__PURE__ */ S(H, { children: [
1915
1937
  /* @__PURE__ */ S(j, { direction: "row", justifyContent: "space-between", alignItems: "center", children: [
1916
- /* @__PURE__ */ t($, { variant: "subtitle2", children: r("parameters") }),
1917
- /* @__PURE__ */ t(A, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...je(y), children: /* @__PURE__ */ t(lt, { fontSize: "small" }) })
1938
+ /* @__PURE__ */ t(J, { variant: "subtitle2", children: r("parameters") }),
1939
+ /* @__PURE__ */ t(A, { sx: { minWidth: 32, minHeight: 32, p: 0 }, ...Se(y), children: /* @__PURE__ */ t(lt, { fontSize: "small" }) })
1918
1940
  ] }),
1919
1941
  k.properties && V(Object.values(k.properties), "index").map(({ data: s }) => {
1920
- var l, u, f, w, a, x, b, P, C, v, I, z, R, W, E, U;
1921
- return /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(
1942
+ var l, u, f, w, c, x, b, P, O, v, I, z, R, E, U, W;
1943
+ return /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
1922
1944
  _,
1923
1945
  {
1924
- allComponents: p,
1946
+ allComponents: m,
1925
1947
  defaultLocale: d,
1926
1948
  component: k,
1927
1949
  property: s,
1928
1950
  fullWidth: !0,
1929
1951
  size: "small",
1930
- valueImmutable: ce((w = (f = (u = (l = e.renderer.properties) == null ? void 0 : l[s.id]) == null ? void 0 : u.locales) == null ? void 0 : f[c]) == null ? void 0 : w.value),
1931
- value: ((P = (b = (x = (a = e.renderer.properties) == null ? void 0 : a[s.id]) == null ? void 0 : x.locales) == null ? void 0 : b[c]) == null ? void 0 : P.value) ?? ((z = (I = (v = (C = e.renderer.properties) == null ? void 0 : C[s.id]) == null ? void 0 : v.locales) == null ? void 0 : I[d]) == null ? void 0 : z.value) ?? ((W = (R = s.locales) == null ? void 0 : R[c]) == null ? void 0 : W.defaultValue) ?? ((U = (E = s.locales) == null ? void 0 : E[d]) == null ? void 0 : U.defaultValue),
1932
- onChange: (te) => {
1952
+ valueImmutable: ae((w = (f = (u = (l = e.renderer.properties) == null ? void 0 : l[s.id]) == null ? void 0 : u.locales) == null ? void 0 : f[a]) == null ? void 0 : w.value),
1953
+ value: ((P = (b = (x = (c = e.renderer.properties) == null ? void 0 : c[s.id]) == null ? void 0 : x.locales) == null ? void 0 : b[a]) == null ? void 0 : P.value) ?? ((z = (I = (v = (O = e.renderer.properties) == null ? void 0 : O[s.id]) == null ? void 0 : v.locales) == null ? void 0 : I[d]) == null ? void 0 : z.value) ?? ((E = (R = s.locales) == null ? void 0 : R[a]) == null ? void 0 : E.defaultValue) ?? ((W = (U = s.locales) == null ? void 0 : U[d]) == null ? void 0 : W.defaultValue),
1954
+ onChange: (re) => {
1933
1955
  n.transact(() => {
1934
1956
  var L, G, q, Q, X;
1935
- (L = e.renderer).properties ?? (L.properties = {}), (G = e.renderer.properties)[q = s.id] ?? (G[q] = {}), (Q = e.renderer.properties[s.id]).locales ?? (Q.locales = {}), (X = e.renderer.properties[s.id].locales)[c] ?? (X[c] = {}), e.renderer.properties[s.id].locales[c].value = te;
1957
+ (L = e.renderer).properties ?? (L.properties = {}), (G = e.renderer.properties)[q = s.id] ?? (G[q] = {}), (Q = e.renderer.properties[s.id]).locales ?? (Q.locales = {}), (X = e.renderer.properties[s.id].locales)[a] ?? (X[a] = {}), e.renderer.properties[s.id].locales[a].value = re;
1936
1958
  });
1937
1959
  }
1938
1960
  }
@@ -1942,36 +1964,36 @@ function Hr({ value: e }) {
1942
1964
  ] })
1943
1965
  ] });
1944
1966
  }
1945
- function ze({
1967
+ function Oe({
1946
1968
  label: e,
1947
1969
  options: r,
1948
1970
  excludes: n,
1949
1971
  value: i,
1950
1972
  onChange: d,
1951
- allComponents: m,
1952
- ...c
1973
+ allComponents: p,
1974
+ ...a
1953
1975
  }) {
1954
1976
  var g;
1955
- const { t: p } = N(), k = r ?? V(Object.values(hr(m, ...n ?? [])), "index").map((h) => h.data), y = (typeof i == "string" ? (g = m[i]) == null ? void 0 : g.data : void 0) ?? null;
1977
+ const { t: m } = N(), k = r ?? V(Object.values(fr(p, ...n ?? [])), "index").map((h) => h.data), y = (typeof i == "string" ? (g = p[i]) == null ? void 0 : g.data : void 0) ?? null;
1956
1978
  return /* @__PURE__ */ t(
1957
1979
  Ze,
1958
1980
  {
1959
- ...c,
1981
+ ...a,
1960
1982
  size: "small",
1961
1983
  options: k,
1962
1984
  autoHighlight: !0,
1963
1985
  isOptionEqualToValue: (h, o) => h.id === o.id,
1964
1986
  getOptionKey: (h) => h.id,
1965
1987
  getOptionLabel: (h) => h.name || h.id,
1966
- renderInput: (h) => /* @__PURE__ */ t(D, { label: e || p("component"), ...h }),
1988
+ renderInput: (h) => /* @__PURE__ */ t(D, { label: e || m("component"), ...h }),
1967
1989
  value: y,
1968
1990
  onChange: (h, o) => {
1969
- var l, u, f, w, a, x;
1991
+ var l, u, f, w, c, x;
1970
1992
  let s = {};
1971
1993
  o && (s = {
1972
- blockletId: (l = m[o == null ? void 0 : o.id]) == null ? void 0 : l.blockletId,
1973
- blockletTitle: (u = m[o == null ? void 0 : o.id]) == null ? void 0 : u.blockletTitle,
1974
- componentName: ((w = (f = m[o == null ? void 0 : o.id]) == null ? void 0 : f.data) == null ? void 0 : w.name) || ((x = (a = m[o == null ? void 0 : o.id]) == null ? void 0 : a.data) == null ? void 0 : x.id)
1994
+ blockletId: (l = p[o == null ? void 0 : o.id]) == null ? void 0 : l.blockletId,
1995
+ blockletTitle: (u = p[o == null ? void 0 : o.id]) == null ? void 0 : u.blockletTitle,
1996
+ componentName: ((w = (f = p[o == null ? void 0 : o.id]) == null ? void 0 : f.data) == null ? void 0 : w.name) || ((x = (c = p[o == null ? void 0 : o.id]) == null ? void 0 : c.data) == null ? void 0 : x.id)
1975
1997
  }), d == null || d(h, o == null ? void 0 : o.id, s);
1976
1998
  }
1977
1999
  }
@@ -1983,51 +2005,51 @@ function bt({
1983
2005
  defaultLocale: n,
1984
2006
  propertiesValue: i,
1985
2007
  currentLocale: d,
1986
- onChange: m,
1987
- props: c
2008
+ onChange: p,
2009
+ props: a
1988
2010
  }) {
1989
- const { t: p } = N(), [k, y] = M(e == null ? void 0 : e.properties), [g, h] = M(null);
1990
- H(() => {
2011
+ const { t: m } = N(), [k, y] = $(e == null ? void 0 : e.properties), [g, h] = $(null);
2012
+ M(() => {
1991
2013
  (() => {
1992
- var w, a;
1993
- ((w = e == null ? void 0 : e.renderer) == null ? void 0 : w.type) === "react-component" && it(e == null ? void 0 : e.properties) ? tr((a = e == null ? void 0 : e.renderer) == null ? void 0 : a.script).then((x) => {
1994
- const b = rr(x);
2014
+ var w, c;
2015
+ ((w = e == null ? void 0 : e.renderer) == null ? void 0 : w.type) === "react-component" && it(e == null ? void 0 : e.properties) ? rr((c = e == null ? void 0 : e.renderer) == null ? void 0 : c.script).then((x) => {
2016
+ const b = ir(x);
1995
2017
  y(b);
1996
2018
  }) : y(e == null ? void 0 : e.properties);
1997
2019
  })();
1998
2020
  }, [JSON.stringify(e)]);
1999
2021
  const o = T(() => !e || !k ? {} : Object.values(k).reduce(
2000
2022
  (f, { data: w }) => {
2001
- var x, b, P, C, v;
2002
- const a = w.key || w.id;
2023
+ var x, b, P, O, v;
2024
+ const c = w.key || w.id;
2003
2025
  return f[w.id] = {
2004
- key: a,
2005
- value: (c == null ? void 0 : c[a]) ?? ((x = i == null ? void 0 : i[w.id]) == null ? void 0 : x.value) ?? ((P = (b = w.locales) == null ? void 0 : b[d]) == null ? void 0 : P.defaultValue) ?? ((v = (C = w.locales) == null ? void 0 : C[n]) == null ? void 0 : v.defaultValue),
2026
+ key: c,
2027
+ value: (a == null ? void 0 : a[c]) ?? ((x = i == null ? void 0 : i[w.id]) == null ? void 0 : x.value) ?? ((P = (b = w.locales) == null ? void 0 : b[d]) == null ? void 0 : P.defaultValue) ?? ((v = (O = w.locales) == null ? void 0 : O[n]) == null ? void 0 : v.defaultValue),
2006
2028
  id: w.id,
2007
2029
  type: w.type
2008
2030
  }, f;
2009
2031
  },
2010
2032
  {}
2011
- ), [JSON.stringify(k), e, i, d, n]), s = se(() => {
2033
+ ), [JSON.stringify(k), e, i, d, n]), s = ce(() => {
2012
2034
  if (!k)
2013
2035
  return {
2014
2036
  canUseProperties: [],
2015
2037
  visibleProperties: [],
2016
2038
  canUsePropertiesKeys: []
2017
2039
  };
2018
- const f = V(Object.values(k), "index"), w = f.filter(({ data: b }) => b.key && mt(k, b.id)), a = f.filter(({ data: b }) => b.key && b.type !== "component"), x = a.map(({ data: b }) => b.key);
2040
+ const f = V(Object.values(k), "index"), w = f.filter(({ data: b }) => b.key && mt(k, b.id)), c = f.filter(({ data: b }) => b.key && b.type !== "component"), x = c.map(({ data: b }) => b.key);
2019
2041
  return {
2020
- canUseProperties: a,
2042
+ canUseProperties: c,
2021
2043
  visibleProperties: w,
2022
2044
  canUsePropertiesKeys: x
2023
2045
  };
2024
- }, [JSON.stringify(k)]), l = o(), u = mr(l, "key");
2025
- return /* @__PURE__ */ t(Oe, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
2026
- /* @__PURE__ */ t($, { variant: "subtitle1", children: p("maker.properties.parameters") }),
2027
- !e || s.canUsePropertiesKeys.length === 0 ? /* @__PURE__ */ t(ee, { style: { fontSize: 12 }, children: p("maker.properties.noParameters") }) : /* @__PURE__ */ S(J, { children: [
2046
+ }, [JSON.stringify(k)]), l = o(), u = hr(l, "key");
2047
+ return /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ S(j, { gap: 2, children: [
2048
+ /* @__PURE__ */ t(J, { variant: "subtitle1", children: m("maker.properties.parameters") }),
2049
+ !e || s.canUsePropertiesKeys.length === 0 ? /* @__PURE__ */ t(ee, { style: { fontSize: 12 }, children: m("maker.properties.noParameters") }) : /* @__PURE__ */ S(H, { children: [
2028
2050
  /* @__PURE__ */ t(j, { gap: 2, children: s.visibleProperties.map(({ data: f }) => {
2029
- var w, a;
2030
- return /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(
2051
+ var w, c;
2052
+ return /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
2031
2053
  _,
2032
2054
  {
2033
2055
  allComponents: r,
@@ -2036,14 +2058,14 @@ function bt({
2036
2058
  fullWidth: !0,
2037
2059
  component: e,
2038
2060
  property: f,
2039
- valueImmutable: ce((w = i == null ? void 0 : i[f.id]) == null ? void 0 : w.value),
2040
- value: (c == null ? void 0 : c[f.key || f.id]) ?? ((a = l[f.id]) == null ? void 0 : a.value),
2061
+ valueImmutable: ae((w = i == null ? void 0 : i[f.id]) == null ? void 0 : w.value),
2062
+ value: (a == null ? void 0 : a[f.key || f.id]) ?? ((c = l[f.id]) == null ? void 0 : c.value),
2041
2063
  onChange: (x) => {
2042
- m({
2064
+ p({
2043
2065
  path: ["properties", f.id],
2044
2066
  id: f.id,
2045
2067
  value: { value: x },
2046
- shouldSync: !(!f.type || Je.includes(f.type)),
2068
+ shouldSync: !(!f.type || Ke.includes(f.type)),
2047
2069
  excludeKeys: [],
2048
2070
  key: f.key || f.id
2049
2071
  });
@@ -2060,7 +2082,7 @@ function bt({
2060
2082
  properties: l,
2061
2083
  dev: { mode: "draft", components: r, defaultLocale: n },
2062
2084
  props: {
2063
- ...fr(c ?? {}, s.canUsePropertiesKeys),
2085
+ ...br(a ?? {}, s.canUsePropertiesKeys),
2064
2086
  onChange: (f) => {
2065
2087
  const { canUsePropertiesKeys: w } = s;
2066
2088
  Object.keys(f).filter((x) => {
@@ -2068,24 +2090,24 @@ function bt({
2068
2090
  return f[x] !== ((b = u == null ? void 0 : u[x]) == null ? void 0 : b.value);
2069
2091
  }).filter((x) => {
2070
2092
  var b;
2071
- return !(x === "locale" && !ur(u[x], "locale") || ((b = u[x]) == null ? void 0 : b.type) === "component");
2093
+ return !(x === "locale" && !pr(u[x], "locale") || ((b = u[x]) == null ? void 0 : b.type) === "component");
2072
2094
  }).reduce((x, b) => x.then(() => {
2073
- const P = u[b], C = w.includes(b);
2074
- if (P != null && P.id && C)
2075
- return m({
2095
+ const P = u[b], O = w.includes(b);
2096
+ if (P != null && P.id && O)
2097
+ return p({
2076
2098
  path: ["properties", P.id],
2077
2099
  id: P.id,
2078
2100
  value: { value: f[b] },
2079
- shouldSync: !(!P.type || Je.includes(P.type)),
2101
+ shouldSync: !(!P.type || Ke.includes(P.type)),
2080
2102
  excludeKeys: [],
2081
2103
  key: P.key || P.id
2082
2104
  }), Promise.resolve();
2083
2105
  const v = `propertyNotFound${b}`;
2084
2106
  if (g === v)
2085
2107
  return Promise.resolve();
2086
- Fe.close(g);
2087
- const I = Fe.warning(
2088
- p("maker.properties.propertyNotFound", {
2108
+ We.close(g);
2109
+ const I = We.warning(
2110
+ m("maker.properties.propertyNotFound", {
2089
2111
  key: b
2090
2112
  }),
2091
2113
  {
@@ -2102,12 +2124,12 @@ function bt({
2102
2124
  ] }) });
2103
2125
  }
2104
2126
  export {
2105
- Wr as BasicInfo,
2106
- ze as CustomComponentAutocomplete,
2107
- Vi as CustomComponentSettings,
2108
- Jr as DefaultReactComponentScriptTemplate,
2109
- $r as DefaultWebComponentScriptTemplate,
2127
+ Ur as BasicInfo,
2128
+ Oe as CustomComponentAutocomplete,
2129
+ Ei as CustomComponentSettings,
2130
+ $r as DefaultReactComponentScriptTemplate,
2131
+ Mr as DefaultWebComponentScriptTemplate,
2110
2132
  bt as ParametersConfig,
2111
- Ur as PropertiesConfig,
2133
+ Br as PropertiesConfig,
2112
2134
  _ as PropertyValueField
2113
2135
  };