@yklyklpackages/message-card 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/components/action/ActionContext.d.ts.map +1 -1
  2. package/dist/components/action/dispatcher.d.ts +4 -1
  3. package/dist/components/action/dispatcher.d.ts.map +1 -1
  4. package/dist/components/action/handlers.d.ts +1 -0
  5. package/dist/components/action/handlers.d.ts.map +1 -1
  6. package/dist/components/action/types.d.ts +9 -0
  7. package/dist/components/action/types.d.ts.map +1 -1
  8. package/dist/components/core/LeafWrapper.d.ts.map +1 -1
  9. package/dist/components/core/templateAdapter.d.ts.map +1 -1
  10. package/dist/components/layout/{CardLayout.d.ts → JDHCardLayout.d.ts} +3 -3
  11. package/dist/components/layout/JDHCardLayout.d.ts.map +1 -0
  12. package/dist/components/layout/MultipleColumnLayout.d.ts.map +1 -1
  13. package/dist/components/message/MessageContainer.d.ts +1 -0
  14. package/dist/components/message/MessageContainer.d.ts.map +1 -1
  15. package/dist/components/render/Button/index.d.ts +13 -0
  16. package/dist/components/render/Button/index.d.ts.map +1 -0
  17. package/dist/components/render/ButtonJDH.d.ts +2 -2
  18. package/dist/components/render/ButtonJDH.d.ts.map +1 -1
  19. package/dist/components/render/ChoiceJDH.d.ts +2 -2
  20. package/dist/components/render/ChoiceJDH.d.ts.map +1 -1
  21. package/dist/components/render/CustomRenderFromProps.d.ts.map +1 -1
  22. package/dist/components/render/Image.d.ts +2 -2
  23. package/dist/components/render/Image.d.ts.map +1 -1
  24. package/dist/components/render/InputJDH.d.ts +2 -2
  25. package/dist/components/render/InputJDH.d.ts.map +1 -1
  26. package/dist/components/render/Markdown.d.ts +2 -2
  27. package/dist/components/render/Markdown.d.ts.map +1 -1
  28. package/dist/components/render/Text.d.ts +2 -2
  29. package/dist/components/render/Text.d.ts.map +1 -1
  30. package/dist/components/render/TextareaJDH.d.ts +2 -2
  31. package/dist/components/render/TextareaJDH.d.ts.map +1 -1
  32. package/dist/components/theme/ScreenTheme375.d.ts.map +1 -1
  33. package/dist/components/theme/defaultTheme.d.ts.map +1 -1
  34. package/dist/components/types/component.d.ts +2 -5
  35. package/dist/components/types/component.d.ts.map +1 -1
  36. package/dist/components/utils/styleHelpers.d.ts +17 -18
  37. package/dist/components/utils/styleHelpers.d.ts.map +1 -1
  38. package/dist/index.cjs +1468 -709
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.mjs +1468 -709
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/index.umd.js +1464 -705
  43. package/dist/index.umd.js.map +1 -1
  44. package/dist/style.css +177 -206
  45. package/package.json +4 -3
  46. package/dist/components/layout/CardLayout.d.ts.map +0 -1
package/dist/index.umd.js CHANGED
@@ -6,25 +6,25 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
6
6
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
7
 
8
8
  var _a;
9
- var __defProp$z = Object.defineProperty;
10
- var __defProps$t = Object.defineProperties;
11
- var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
12
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
13
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
14
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
15
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16
- var __spreadValues$w = (a, b2) => {
9
+ var __defProp$A = Object.defineProperty;
10
+ var __defProps$u = Object.defineProperties;
11
+ var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
12
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
13
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
14
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
15
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16
+ var __spreadValues$x = (a, b2) => {
17
17
  for (var prop in b2 || (b2 = {}))
18
- if (__hasOwnProp$w.call(b2, prop))
19
- __defNormalProp$z(a, prop, b2[prop]);
20
- if (__getOwnPropSymbols$w)
21
- for (var prop of __getOwnPropSymbols$w(b2)) {
22
- if (__propIsEnum$w.call(b2, prop))
23
- __defNormalProp$z(a, prop, b2[prop]);
18
+ if (__hasOwnProp$x.call(b2, prop))
19
+ __defNormalProp$A(a, prop, b2[prop]);
20
+ if (__getOwnPropSymbols$x)
21
+ for (var prop of __getOwnPropSymbols$x(b2)) {
22
+ if (__propIsEnum$x.call(b2, prop))
23
+ __defNormalProp$A(a, prop, b2[prop]);
24
24
  }
25
25
  return a;
26
26
  };
27
- var __spreadProps$t = (a, b2) => __defProps$t(a, __getOwnPropDescs$t(b2));
27
+ var __spreadProps$u = (a, b2) => __defProps$u(a, __getOwnPropDescs$u(b2));
28
28
  const postMessage$1 = (name, params) => {
29
29
  var _a2;
30
30
  (_a2 = window == null ? void 0 : window.parent) == null ? void 0 : _a2.postMessage({ from: "aui-preview", name, params }, "*");
@@ -69,8 +69,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
69
69
  className: "container-wrap-hoc",
70
70
  ref: containerRef,
71
71
  onClick,
72
- children: renderFunction(__spreadProps$t(__spreadValues$w({}, runtimeProps), {
73
- component: __spreadValues$w(__spreadValues$w({}, runtimeProps.component), componentFromEditor || {})
72
+ children: renderFunction(__spreadProps$u(__spreadValues$x({}, runtimeProps), {
73
+ component: __spreadValues$x(__spreadValues$x({}, runtimeProps.component), componentFromEditor || {})
74
74
  }))
75
75
  },
76
76
  updateUniqueId
@@ -94,19 +94,19 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
94
94
  );
95
95
  } : renderFunction;
96
96
  };
97
- var __defProp$y = Object.defineProperty;
98
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
99
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
100
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
101
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
102
- var __spreadValues$v = (a, b2) => {
97
+ var __defProp$z = Object.defineProperty;
98
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
99
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
100
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
101
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
102
+ var __spreadValues$w = (a, b2) => {
103
103
  for (var prop in b2 || (b2 = {}))
104
- if (__hasOwnProp$v.call(b2, prop))
105
- __defNormalProp$y(a, prop, b2[prop]);
106
- if (__getOwnPropSymbols$v)
107
- for (var prop of __getOwnPropSymbols$v(b2)) {
108
- if (__propIsEnum$v.call(b2, prop))
109
- __defNormalProp$y(a, prop, b2[prop]);
104
+ if (__hasOwnProp$w.call(b2, prop))
105
+ __defNormalProp$z(a, prop, b2[prop]);
106
+ if (__getOwnPropSymbols$w)
107
+ for (var prop of __getOwnPropSymbols$w(b2)) {
108
+ if (__propIsEnum$w.call(b2, prop))
109
+ __defNormalProp$z(a, prop, b2[prop]);
110
110
  }
111
111
  return a;
112
112
  };
@@ -132,7 +132,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
132
132
  if (isWebp) {
133
133
  reWebp = ".webp";
134
134
  }
135
- const { width, height } = __spreadValues$v({}, size);
135
+ const { width, height } = __spreadValues$w({}, size);
136
136
  let reSize = "";
137
137
  if (width && height) {
138
138
  reSize = `s${width}x${height}_`;
@@ -212,7 +212,183 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
212
212
  Radius_JDH_xs: 6
213
213
  },
214
214
  components: {
215
- card: {
215
+ text: {
216
+ basic: {
217
+ fontSize: "FontSizes_JDH_Text",
218
+ lineHeight: "FontSizes_JDH_Text",
219
+ fontWeight: "FontWeight_JDH_Normal",
220
+ color: "Color_JDH_Gray_Text",
221
+ background: "#FFF",
222
+ margin: 0
223
+ },
224
+ variant: {
225
+ h1: {
226
+ fontSize: "FontSizes_JDH_Headline1",
227
+ lineHeight: "FontSizes_JDH_Headline1",
228
+ color: "Color_JDH_Gray_Headline",
229
+ fontWeight: "FontWeight_JDH_Medium"
230
+ },
231
+ h2: {
232
+ fontSize: "FontSizes_JDH_Headline2",
233
+ lineHeight: "FontSizes_JDH_Headline2",
234
+ color: "Color_JDH_Gray_Headline",
235
+ fontWeight: "FontWeight_JDH_Medium"
236
+ },
237
+ h3: {
238
+ fontSize: "FontSizes_JDH_Title",
239
+ lineHeight: "FontSizes_JDH_Title",
240
+ color: "Color_JDH_Gray_Headline",
241
+ fontWeight: "FontWeight_JDH_Medium"
242
+ },
243
+ h4: {
244
+ fontSize: "FontSizes_JDH_Title",
245
+ lineHeight: "FontSizes_JDH_Title",
246
+ color: "Color_JDH_Gray_Headline",
247
+ fontWeight: "FontWeight_JDH_Medium"
248
+ },
249
+ h5: {
250
+ fontSize: "FontSizes_JDH_Title",
251
+ lineHeight: "FontSizes_JDH_Title",
252
+ color: "Color_JDH_Gray_Headline",
253
+ fontWeight: "FontWeight_JDH_Medium"
254
+ },
255
+ body: {},
256
+ caption: {
257
+ fontSize: "FontSizes_JDH_AccentText",
258
+ lineHeight: "FontSizes_JDH_AccentText",
259
+ color: "Color_JDH_Gray_AccentText"
260
+ },
261
+ tag: {
262
+ fontSize: "FontSizes_JDH_TagText",
263
+ lineHeight: "FontSizes_JDH_TagText",
264
+ color: "Color_JDH_Gray_AccentText"
265
+ }
266
+ }
267
+ },
268
+ button: {
269
+ basicColor: {
270
+ color: "#FFF",
271
+ background: "#000",
272
+ borderColor: "rgb(217, 217, 217)",
273
+ fillBackground: "rgba(0, 0, 0, 0.04)"
274
+ },
275
+ color: {
276
+ default: {},
277
+ primary: {
278
+ color: "#FFF",
279
+ background: "rgb(22, 119, 255)",
280
+ borderColor: "rgb(22, 119, 255)",
281
+ fillBackground: "rgb(230, 244, 255)"
282
+ },
283
+ danger: {
284
+ color: "#FFF",
285
+ background: "rgb(255, 77, 79)",
286
+ borderColor: "rgb(255, 77, 79)",
287
+ fillBackground: "rgb(255, 242, 240)"
288
+ },
289
+ green: {
290
+ color: "#fff",
291
+ background: "rgb(82, 196, 26)",
292
+ borderColor: "rgb(82, 196, 26)",
293
+ fillBackground: "rgb(246, 255, 237)"
294
+ },
295
+ red: {
296
+ background: "rgb(245, 34, 45)",
297
+ borderColor: "rgb(245, 34, 45)",
298
+ fillBackground: "rgb(255, 241, 240)"
299
+ },
300
+ yellow: {
301
+ background: "rgb(250, 219, 20)",
302
+ borderColor: "rgb(250, 219, 20)",
303
+ fillBackground: "rgb(254, 255, 230)"
304
+ },
305
+ blue: {
306
+ color: "#FFF",
307
+ background: "rgb(22, 119, 255)",
308
+ borderColor: "rgb(22, 119, 255)",
309
+ fillBackground: "rgb(230, 244, 255)"
310
+ }
311
+ },
312
+ disabledColor: {
313
+ color: "rgba(0, 0, 0, 0.25)",
314
+ background: "rgba(0, 0, 0, 0.04)",
315
+ borderColor: "rgb(217, 217, 217)",
316
+ fillBackground: "rgba(0, 0, 0, 0.04)",
317
+ textLinkBackground: "#fff"
318
+ },
319
+ hoverColor: {
320
+ default: {
321
+ solidBackground: "rgba(0,0,0,0.75)",
322
+ outlineDashedTextColor: "#4096ff",
323
+ fillBackground: "rgba(0,0,0,0.06)",
324
+ textBackground: "rgba(0,0,0,0.04)"
325
+ },
326
+ primary: {
327
+ solidBackground: "#4096ff",
328
+ outlineDashedTextColor: "#4096ff",
329
+ fillBackground: "#bae0ff",
330
+ textBackground: "#e6f4ff"
331
+ },
332
+ danger: {
333
+ solidBackground: "#ff7875",
334
+ outlineDashedTextColor: "#ff7875",
335
+ fillBackground: "#ffdfdc",
336
+ textBackground: "#fff2f0"
337
+ },
338
+ green: {
339
+ solidBackground: "#73d13d",
340
+ outlineDashedTextColor: "#73d13d",
341
+ fillBackground: "#d9f7be",
342
+ textBackground: "#f6ffed"
343
+ },
344
+ red: {
345
+ solidBackground: "#ff4d4f",
346
+ outlineDashedTextColor: "#ff4d4f",
347
+ fillBackground: "#ffccc7",
348
+ textBackground: "#fff1f0"
349
+ },
350
+ blue: {
351
+ solidBackground: "#4096ff",
352
+ outlineDashedTextColor: "#4096ff",
353
+ fillBackground: "#bae0ff",
354
+ textBackground: "#e6f4ff"
355
+ },
356
+ yellow: {
357
+ solidBackground: "#ffec3d",
358
+ outlineDashedTextColor: "#ffec3d",
359
+ fillBackground: "#ffffb8",
360
+ textBackground: "#feffe6"
361
+ }
362
+ },
363
+ basicSize: {
364
+ fontSize: 28,
365
+ lineHeight: 44,
366
+ padding: [8, 30],
367
+ borderRadius: 12,
368
+ minWidth: "auto"
369
+ },
370
+ size: {
371
+ small: {
372
+ padding: [0, 14]
373
+ },
374
+ middle: {},
375
+ large: {
376
+ fontSize: 32,
377
+ lineHeight: 50,
378
+ borderRadius: 16,
379
+ padding: [13, 30]
380
+ }
381
+ },
382
+ icon: {
383
+ borderRadius: 4,
384
+ margin: [0, 16, 0, 0]
385
+ },
386
+ loading: {
387
+ opacity: 0.65
388
+ },
389
+ loadingIcon: ""
390
+ },
391
+ jdhCard: {
216
392
  wrap: {
217
393
  background: "Color_JDH_Gray_Background",
218
394
  padding: "Spacing_JDH_xxl"
@@ -237,7 +413,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
237
413
  borderRadius: "Radius_JDH_xl"
238
414
  }
239
415
  },
240
- choice: {
416
+ jdhChoice: {
241
417
  wrap: {
242
418
  padding: [13, 32],
243
419
  layoutSmallPadding: [11, 20],
@@ -289,7 +465,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
289
465
  },
290
466
  disabledOpacity: 0.4
291
467
  },
292
- button: {
468
+ jdhButton: {
293
469
  colorStyle: {
294
470
  solid: {
295
471
  primary: {
@@ -377,7 +553,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
377
553
  },
378
554
  disabledOpacity: 0.4
379
555
  },
380
- input: {
556
+ jdhInput: {
381
557
  defaultState: {
382
558
  background: "Color_JDH_Gray_Background",
383
559
  fontSize: "FontSizes_JDH_Text",
@@ -423,7 +599,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
423
599
  color: "Color_JDH_Gray_AccentText"
424
600
  }
425
601
  },
426
- textarea: {
602
+ jdhTextarea: {
427
603
  defaultState: {
428
604
  background: "Color_JDH_Gray_Background",
429
605
  fontSize: "FontSizes_JDH_Text",
@@ -478,12 +654,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
478
654
  FontSizes_JDH_TagText: 10
479
655
  },
480
656
  lineHeight: {
481
- FontSizes_JDH_Headline1: 70,
482
- FontSizes_JDH_Headline2: 52,
483
- FontSizes_JDH_Title: 46,
484
- FontSizes_JDH_Text: 42,
485
- FontSizes_JDH_AccentText: 36,
486
- FontSizes_JDH_TagText: 30
657
+ FontSizes_JDH_Headline1: 35,
658
+ FontSizes_JDH_Headline2: 26,
659
+ FontSizes_JDH_Title: 23,
660
+ FontSizes_JDH_Text: 21,
661
+ FontSizes_JDH_AccentText: 18,
662
+ FontSizes_JDH_TagText: 15
487
663
  },
488
664
  color: {
489
665
  Color_JDH_Primary: "#17CB8E",
@@ -529,7 +705,183 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
529
705
  Radius_JDH_xs: 3
530
706
  },
531
707
  components: {
532
- card: {
708
+ text: {
709
+ basic: {
710
+ fontSize: "FontSizes_JDH_Text",
711
+ lineHeight: "FontSizes_JDH_Text",
712
+ fontWeight: "FontWeight_JDH_Normal",
713
+ color: "Color_JDH_Gray_Text",
714
+ background: "#FFF",
715
+ margin: 0
716
+ },
717
+ variant: {
718
+ h1: {
719
+ fontSize: "FontSizes_JDH_Headline1",
720
+ lineHeight: "FontSizes_JDH_Headline1",
721
+ color: "Color_JDH_Gray_Headline",
722
+ fontWeight: "FontWeight_JDH_Medium"
723
+ },
724
+ h2: {
725
+ fontSize: "FontSizes_JDH_Headline2",
726
+ lineHeight: "FontSizes_JDH_Headline2",
727
+ color: "Color_JDH_Gray_Headline",
728
+ fontWeight: "FontWeight_JDH_Medium"
729
+ },
730
+ h3: {
731
+ fontSize: "FontSizes_JDH_Title",
732
+ lineHeight: "FontSizes_JDH_Title",
733
+ color: "Color_JDH_Gray_Headline",
734
+ fontWeight: "FontWeight_JDH_Medium"
735
+ },
736
+ h4: {
737
+ fontSize: "FontSizes_JDH_Title",
738
+ lineHeight: "FontSizes_JDH_Title",
739
+ color: "Color_JDH_Gray_Headline",
740
+ fontWeight: "FontWeight_JDH_Medium"
741
+ },
742
+ h5: {
743
+ fontSize: "FontSizes_JDH_Title",
744
+ lineHeight: "FontSizes_JDH_Title",
745
+ color: "Color_JDH_Gray_Headline",
746
+ fontWeight: "FontWeight_JDH_Medium"
747
+ },
748
+ body: {},
749
+ caption: {
750
+ fontSize: "FontSizes_JDH_AccentText",
751
+ lineHeight: "FontSizes_JDH_AccentText",
752
+ color: "Color_JDH_Gray_AccentText"
753
+ },
754
+ tag: {
755
+ fontSize: "FontSizes_JDH_TagText",
756
+ lineHeight: "FontSizes_JDH_TagText",
757
+ color: "Color_JDH_Gray_AccentText"
758
+ }
759
+ }
760
+ },
761
+ button: {
762
+ basicColor: {
763
+ color: "#FFF",
764
+ background: "#000",
765
+ borderColor: "rgb(217, 217, 217)",
766
+ fillBackground: "rgba(0, 0, 0, 0.04)"
767
+ },
768
+ color: {
769
+ default: {},
770
+ primary: {
771
+ color: "#FFF",
772
+ background: "rgb(22, 119, 255)",
773
+ borderColor: "rgb(22, 119, 255)",
774
+ fillBackground: "rgb(230, 244, 255)"
775
+ },
776
+ danger: {
777
+ color: "#FFF",
778
+ background: "rgb(255, 77, 79)",
779
+ borderColor: "rgb(255, 77, 79)",
780
+ fillBackground: "rgb(255, 242, 240)"
781
+ },
782
+ green: {
783
+ color: "#fff",
784
+ background: "rgb(82, 196, 26)",
785
+ borderColor: "rgb(82, 196, 26)",
786
+ fillBackground: "rgb(246, 255, 237)"
787
+ },
788
+ red: {
789
+ background: "rgb(245, 34, 45)",
790
+ borderColor: "rgb(245, 34, 45)",
791
+ fillBackground: "rgb(255, 241, 240)"
792
+ },
793
+ yellow: {
794
+ background: "rgb(250, 219, 20)",
795
+ borderColor: "rgb(250, 219, 20)",
796
+ fillBackground: "rgb(254, 255, 230)"
797
+ },
798
+ blue: {
799
+ color: "#FFF",
800
+ background: "rgb(22, 119, 255)",
801
+ borderColor: "rgb(22, 119, 255)",
802
+ fillBackground: "rgb(230, 244, 255)"
803
+ }
804
+ },
805
+ disabledColor: {
806
+ color: "rgba(0, 0, 0, 0.25)",
807
+ background: "rgba(0, 0, 0, 0.04)",
808
+ borderColor: "rgb(217, 217, 217)",
809
+ fillBackground: "rgba(0, 0, 0, 0.04)",
810
+ textLinkBackground: "#fff"
811
+ },
812
+ hoverColor: {
813
+ default: {
814
+ solidBackground: "rgba(0,0,0,0.75)",
815
+ outlineDashedTextColor: "#4096ff",
816
+ fillBackground: "rgba(0,0,0,0.06)",
817
+ textBackground: "rgba(0,0,0,0.04)"
818
+ },
819
+ primary: {
820
+ solidBackground: "#4096ff",
821
+ outlineDashedTextColor: "#4096ff",
822
+ fillBackground: "#bae0ff",
823
+ textBackground: "#e6f4ff"
824
+ },
825
+ danger: {
826
+ solidBackground: "#ff7875",
827
+ outlineDashedTextColor: "#ff7875",
828
+ fillBackground: "#ffdfdc",
829
+ textBackground: "#fff2f0"
830
+ },
831
+ green: {
832
+ solidBackground: "#73d13d",
833
+ outlineDashedTextColor: "#73d13d",
834
+ fillBackground: "#d9f7be",
835
+ textBackground: "#f6ffed"
836
+ },
837
+ red: {
838
+ solidBackground: "#ff4d4f",
839
+ outlineDashedTextColor: "#ff4d4f",
840
+ fillBackground: "#ffccc7",
841
+ textBackground: "#fff1f0"
842
+ },
843
+ blue: {
844
+ solidBackground: "#4096ff",
845
+ outlineDashedTextColor: "#4096ff",
846
+ fillBackground: "#bae0ff",
847
+ textBackground: "#e6f4ff"
848
+ },
849
+ yellow: {
850
+ solidBackground: "#ffec3d",
851
+ outlineDashedTextColor: "#ffec3d",
852
+ fillBackground: "#ffffb8",
853
+ textBackground: "#feffe6"
854
+ }
855
+ },
856
+ basicSize: {
857
+ fontSize: 14,
858
+ lineHeight: 22,
859
+ padding: [4, 15],
860
+ borderRadius: 6,
861
+ minWidth: "auto"
862
+ },
863
+ size: {
864
+ small: {
865
+ padding: [0, 7]
866
+ },
867
+ middle: {},
868
+ large: {
869
+ fontSize: 16,
870
+ lineHeight: 25,
871
+ borderRadius: 8,
872
+ padding: [6.5, 15]
873
+ }
874
+ },
875
+ icon: {
876
+ borderRadius: 2,
877
+ margin: [0, 8, 0, 0]
878
+ },
879
+ loading: {
880
+ opacity: 0.65
881
+ },
882
+ loadingIcon: ""
883
+ },
884
+ jdhCard: {
533
885
  wrap: {
534
886
  background: "Color_JDH_Gray_Background",
535
887
  padding: "Spacing_JDH_xxl"
@@ -554,7 +906,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
554
906
  borderRadius: "Radius_JDH_xl"
555
907
  }
556
908
  },
557
- choice: {
909
+ jdhChoice: {
558
910
  wrap: {
559
911
  padding: [6.5, 16],
560
912
  layoutSmallPadding: [5.5, 10],
@@ -606,7 +958,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
606
958
  },
607
959
  disabledOpacity: 0.4
608
960
  },
609
- button: {
961
+ jdhButton: {
610
962
  colorStyle: {
611
963
  solid: {
612
964
  primary: {
@@ -694,7 +1046,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
694
1046
  },
695
1047
  disabledOpacity: 0.4
696
1048
  },
697
- input: {
1049
+ jdhInput: {
698
1050
  defaultState: {
699
1051
  background: "Color_JDH_Gray_Background",
700
1052
  fontSize: "FontSizes_JDH_Text",
@@ -740,7 +1092,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
740
1092
  color: "Color_JDH_Gray_AccentText"
741
1093
  }
742
1094
  },
743
- textarea: {
1095
+ jdhTextarea: {
744
1096
  defaultState: {
745
1097
  background: "Color_JDH_Gray_Background",
746
1098
  fontSize: "FontSizes_JDH_Text",
@@ -786,25 +1138,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
786
1138
  }
787
1139
  };
788
1140
  const DEFAULT_SCALE = 0.5;
789
- var __defProp$x = Object.defineProperty;
790
- var __defProps$s = Object.defineProperties;
791
- var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
792
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
793
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
794
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
795
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
796
- var __spreadValues$u = (a, b2) => {
1141
+ var __defProp$y = Object.defineProperty;
1142
+ var __defProps$t = Object.defineProperties;
1143
+ var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1144
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
1145
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
1146
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
1147
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1148
+ var __spreadValues$v = (a, b2) => {
797
1149
  for (var prop in b2 || (b2 = {}))
798
- if (__hasOwnProp$u.call(b2, prop))
799
- __defNormalProp$x(a, prop, b2[prop]);
800
- if (__getOwnPropSymbols$u)
801
- for (var prop of __getOwnPropSymbols$u(b2)) {
802
- if (__propIsEnum$u.call(b2, prop))
803
- __defNormalProp$x(a, prop, b2[prop]);
1150
+ if (__hasOwnProp$v.call(b2, prop))
1151
+ __defNormalProp$y(a, prop, b2[prop]);
1152
+ if (__getOwnPropSymbols$v)
1153
+ for (var prop of __getOwnPropSymbols$v(b2)) {
1154
+ if (__propIsEnum$v.call(b2, prop))
1155
+ __defNormalProp$y(a, prop, b2[prop]);
804
1156
  }
805
1157
  return a;
806
1158
  };
807
- var __spreadProps$s = (a, b2) => __defProps$s(a, __getOwnPropDescs$s(b2));
1159
+ var __spreadProps$t = (a, b2) => __defProps$t(a, __getOwnPropDescs$t(b2));
808
1160
  const ThemeContext = React.createContext(defaultTheme$2);
809
1161
  const ThemeProvider = ({
810
1162
  scale = DEFAULT_SCALE,
@@ -813,13 +1165,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
813
1165
  }) => {
814
1166
  const merged = React.useMemo(() => {
815
1167
  const base = scale <= DEFAULT_SCALE ? defaultTheme$2 : defaultTheme$1;
816
- return __spreadProps$s(__spreadValues$u(__spreadValues$u({}, base), theme || {}), {
817
- fontSize: __spreadValues$u(__spreadValues$u({}, base.fontSize), (theme == null ? void 0 : theme.fontSize) || {}),
818
- color: __spreadValues$u(__spreadValues$u({}, base.color), (theme == null ? void 0 : theme.color) || {}),
819
- backgroundColor: __spreadValues$u(__spreadValues$u({}, base.color), (theme == null ? void 0 : theme.color) || {}),
820
- fontWeight: __spreadValues$u(__spreadValues$u({}, base.fontWeight), (theme == null ? void 0 : theme.fontWeight) || {}),
821
- space: __spreadValues$u(__spreadValues$u({}, base.space), (theme == null ? void 0 : theme.space) || {}),
822
- borderRadius: __spreadValues$u(__spreadValues$u({}, base.borderRadius), (theme == null ? void 0 : theme.borderRadius) || {})
1168
+ return __spreadProps$t(__spreadValues$v(__spreadValues$v({}, base), theme || {}), {
1169
+ fontSize: __spreadValues$v(__spreadValues$v({}, base.fontSize), (theme == null ? void 0 : theme.fontSize) || {}),
1170
+ color: __spreadValues$v(__spreadValues$v({}, base.color), (theme == null ? void 0 : theme.color) || {}),
1171
+ backgroundColor: __spreadValues$v(__spreadValues$v({}, base.color), (theme == null ? void 0 : theme.color) || {}),
1172
+ fontWeight: __spreadValues$v(__spreadValues$v({}, base.fontWeight), (theme == null ? void 0 : theme.fontWeight) || {}),
1173
+ space: __spreadValues$v(__spreadValues$v({}, base.space), (theme == null ? void 0 : theme.space) || {}),
1174
+ borderRadius: __spreadValues$v(__spreadValues$v({}, base.borderRadius), (theme == null ? void 0 : theme.borderRadius) || {})
823
1175
  });
824
1176
  }, [theme]);
825
1177
  return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: merged, children });
@@ -2284,7 +2636,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2284
2636
  "actions",
2285
2637
  "renderActions",
2286
2638
  "border",
2287
- "backgroundImage"
2639
+ "backgroundImage",
2640
+ "backgroundLinearGradient",
2641
+ "boxShadow"
2288
2642
  ]
2289
2643
  },
2290
2644
  runtime: {
@@ -2292,7 +2646,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2292
2646
  "actions",
2293
2647
  "renderActions",
2294
2648
  "border",
2295
- "backgroundImage"
2649
+ "backgroundImage",
2650
+ "backgroundLinearGradient",
2651
+ "boxShadow"
2296
2652
  ],
2297
2653
  editorMode: editorMode2
2298
2654
  }
@@ -2626,7 +2982,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2626
2982
  var ys = arrObjKeys(obj, inspect2);
2627
2983
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
2628
2984
  var protoTag = obj instanceof Object ? "" : "null prototype";
2629
- var stringTag = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
2985
+ var stringTag = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
2630
2986
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
2631
2987
  var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
2632
2988
  if (ys.length === 0) {
@@ -2651,25 +3007,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2651
3007
  return !toStringTag$1 || !(typeof obj === "object" && (toStringTag$1 in obj || typeof obj[toStringTag$1] !== "undefined"));
2652
3008
  }
2653
3009
  function isArray$4(obj) {
2654
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
3010
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
2655
3011
  }
2656
3012
  function isDate$1(obj) {
2657
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
3013
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
2658
3014
  }
2659
3015
  function isRegExp$2(obj) {
2660
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
3016
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
2661
3017
  }
2662
3018
  function isError(obj) {
2663
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
3019
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
2664
3020
  }
2665
3021
  function isString$1(obj) {
2666
- return toStr(obj) === "[object String]" && canTrustToString(obj);
3022
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
2667
3023
  }
2668
3024
  function isNumber$1(obj) {
2669
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
3025
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
2670
3026
  }
2671
3027
  function isBoolean$1(obj) {
2672
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
3028
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
2673
3029
  }
2674
3030
  function isSymbol(obj) {
2675
3031
  if (hasShammedSymbols) {
@@ -2705,7 +3061,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
2705
3061
  function has$3(obj, key) {
2706
3062
  return hasOwn$1.call(obj, key);
2707
3063
  }
2708
- function toStr(obj) {
3064
+ function toStr$1(obj) {
2709
3065
  return objectToString.call(obj);
2710
3066
  }
2711
3067
  function nameOf(f) {
@@ -3014,7 +3370,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3014
3370
  var uri = URIError;
3015
3371
  var abs$1 = Math.abs;
3016
3372
  var floor$1 = Math.floor;
3017
- var max$1 = Math.max;
3373
+ var max$2 = Math.max;
3018
3374
  var min$1 = Math.min;
3019
3375
  var pow$1 = Math.pow;
3020
3376
  var round$1 = Math.round;
@@ -3143,99 +3499,78 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3143
3499
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
3144
3500
  return Object_getPrototypeOf;
3145
3501
  }
3146
- var implementation;
3147
- var hasRequiredImplementation;
3148
- function requireImplementation() {
3149
- if (hasRequiredImplementation) return implementation;
3150
- hasRequiredImplementation = 1;
3151
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3152
- var toStr2 = Object.prototype.toString;
3153
- var max2 = Math.max;
3154
- var funcType = "[object Function]";
3155
- var concatty = function concatty2(a, b2) {
3156
- var arr = [];
3157
- for (var i = 0; i < a.length; i += 1) {
3158
- arr[i] = a[i];
3159
- }
3160
- for (var j2 = 0; j2 < b2.length; j2 += 1) {
3161
- arr[j2 + a.length] = b2[j2];
3162
- }
3163
- return arr;
3164
- };
3165
- var slicy = function slicy2(arrLike, offset) {
3166
- var arr = [];
3167
- for (var i = offset, j2 = 0; i < arrLike.length; i += 1, j2 += 1) {
3168
- arr[j2] = arrLike[i];
3169
- }
3170
- return arr;
3171
- };
3172
- var joiny = function(arr, joiner) {
3173
- var str = "";
3174
- for (var i = 0; i < arr.length; i += 1) {
3175
- str += arr[i];
3176
- if (i + 1 < arr.length) {
3177
- str += joiner;
3178
- }
3502
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3503
+ var toStr = Object.prototype.toString;
3504
+ var max$1 = Math.max;
3505
+ var funcType = "[object Function]";
3506
+ var concatty = function concatty2(a, b2) {
3507
+ var arr = [];
3508
+ for (var i = 0; i < a.length; i += 1) {
3509
+ arr[i] = a[i];
3510
+ }
3511
+ for (var j2 = 0; j2 < b2.length; j2 += 1) {
3512
+ arr[j2 + a.length] = b2[j2];
3513
+ }
3514
+ return arr;
3515
+ };
3516
+ var slicy = function slicy2(arrLike, offset) {
3517
+ var arr = [];
3518
+ for (var i = offset, j2 = 0; i < arrLike.length; i += 1, j2 += 1) {
3519
+ arr[j2] = arrLike[i];
3520
+ }
3521
+ return arr;
3522
+ };
3523
+ var joiny = function(arr, joiner) {
3524
+ var str = "";
3525
+ for (var i = 0; i < arr.length; i += 1) {
3526
+ str += arr[i];
3527
+ if (i + 1 < arr.length) {
3528
+ str += joiner;
3179
3529
  }
3180
- return str;
3181
- };
3182
- implementation = function bind2(that) {
3183
- var target = this;
3184
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
3185
- throw new TypeError(ERROR_MESSAGE + target);
3186
- }
3187
- var args = slicy(arguments, 1);
3188
- var bound;
3189
- var binder = function() {
3190
- if (this instanceof bound) {
3191
- var result = target.apply(
3192
- this,
3193
- concatty(args, arguments)
3194
- );
3195
- if (Object(result) === result) {
3196
- return result;
3197
- }
3198
- return this;
3199
- }
3200
- return target.apply(
3201
- that,
3530
+ }
3531
+ return str;
3532
+ };
3533
+ var implementation$1 = function bind2(that) {
3534
+ var target = this;
3535
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
3536
+ throw new TypeError(ERROR_MESSAGE + target);
3537
+ }
3538
+ var args = slicy(arguments, 1);
3539
+ var bound;
3540
+ var binder = function() {
3541
+ if (this instanceof bound) {
3542
+ var result = target.apply(
3543
+ this,
3202
3544
  concatty(args, arguments)
3203
3545
  );
3204
- };
3205
- var boundLength = max2(0, target.length - args.length);
3206
- var boundArgs = [];
3207
- for (var i = 0; i < boundLength; i++) {
3208
- boundArgs[i] = "$" + i;
3209
- }
3210
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3211
- if (target.prototype) {
3212
- var Empty = function Empty2() {
3213
- };
3214
- Empty.prototype = target.prototype;
3215
- bound.prototype = new Empty();
3216
- Empty.prototype = null;
3546
+ if (Object(result) === result) {
3547
+ return result;
3548
+ }
3549
+ return this;
3217
3550
  }
3218
- return bound;
3551
+ return target.apply(
3552
+ that,
3553
+ concatty(args, arguments)
3554
+ );
3219
3555
  };
3220
- return implementation;
3221
- }
3222
- var functionBind;
3223
- var hasRequiredFunctionBind;
3224
- function requireFunctionBind() {
3225
- if (hasRequiredFunctionBind) return functionBind;
3226
- hasRequiredFunctionBind = 1;
3227
- var implementation2 = requireImplementation();
3228
- functionBind = Function.prototype.bind || implementation2;
3229
- return functionBind;
3230
- }
3231
- var functionCall;
3232
- var hasRequiredFunctionCall;
3233
- function requireFunctionCall() {
3234
- if (hasRequiredFunctionCall) return functionCall;
3235
- hasRequiredFunctionCall = 1;
3236
- functionCall = Function.prototype.call;
3237
- return functionCall;
3238
- }
3556
+ var boundLength = max$1(0, target.length - args.length);
3557
+ var boundArgs = [];
3558
+ for (var i = 0; i < boundLength; i++) {
3559
+ boundArgs[i] = "$" + i;
3560
+ }
3561
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3562
+ if (target.prototype) {
3563
+ var Empty = function Empty2() {
3564
+ };
3565
+ Empty.prototype = target.prototype;
3566
+ bound.prototype = new Empty();
3567
+ Empty.prototype = null;
3568
+ }
3569
+ return bound;
3570
+ };
3571
+ var implementation = implementation$1;
3572
+ var functionBind = Function.prototype.bind || implementation;
3573
+ var functionCall = Function.prototype.call;
3239
3574
  var functionApply;
3240
3575
  var hasRequiredFunctionApply;
3241
3576
  function requireFunctionApply() {
@@ -3245,14 +3580,14 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3245
3580
  return functionApply;
3246
3581
  }
3247
3582
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
3248
- var bind$3 = requireFunctionBind();
3583
+ var bind$3 = functionBind;
3249
3584
  var $apply$1 = requireFunctionApply();
3250
- var $call$2 = requireFunctionCall();
3585
+ var $call$2 = functionCall;
3251
3586
  var $reflectApply = reflectApply;
3252
3587
  var actualApply = $reflectApply || bind$3.call($call$2, $apply$1);
3253
- var bind$2 = requireFunctionBind();
3588
+ var bind$2 = functionBind;
3254
3589
  var $TypeError$4 = type;
3255
- var $call$1 = requireFunctionCall();
3590
+ var $call$1 = functionCall;
3256
3591
  var $actualApply = actualApply;
3257
3592
  var callBindApplyHelpers = function callBindBasic2(args) {
3258
3593
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -3318,7 +3653,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3318
3653
  hasRequiredHasown = 1;
3319
3654
  var call = Function.prototype.call;
3320
3655
  var $hasOwn = Object.prototype.hasOwnProperty;
3321
- var bind2 = requireFunctionBind();
3656
+ var bind2 = functionBind;
3322
3657
  hasown = bind2.call(call, $hasOwn);
3323
3658
  return hasown;
3324
3659
  }
@@ -3333,7 +3668,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3333
3668
  var $URIError = uri;
3334
3669
  var abs = abs$1;
3335
3670
  var floor = floor$1;
3336
- var max = max$1;
3671
+ var max = max$2;
3337
3672
  var min = min$1;
3338
3673
  var pow = pow$1;
3339
3674
  var round = round$1;
@@ -3367,7 +3702,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3367
3702
  var $ObjectGPO = requireObject_getPrototypeOf();
3368
3703
  var $ReflectGPO = requireReflect_getPrototypeOf();
3369
3704
  var $apply = requireFunctionApply();
3370
- var $call = requireFunctionCall();
3705
+ var $call = functionCall;
3371
3706
  var needsEval = {};
3372
3707
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
3373
3708
  var INTRINSICS = {
@@ -3538,7 +3873,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
3538
3873
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3539
3874
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3540
3875
  };
3541
- var bind$1 = requireFunctionBind();
3876
+ var bind$1 = functionBind;
3542
3877
  var hasOwn = requireHasown();
3543
3878
  var $concat = bind$1.call($call, Array.prototype.concat);
3544
3879
  var $spliceApply = bind$1.call($apply, Array.prototype.splice);
@@ -4627,33 +4962,33 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4627
4962
  stringify
4628
4963
  };
4629
4964
  const qs = /* @__PURE__ */ getDefaultExportFromCjs(lib);
4630
- var __defProp$w = Object.defineProperty;
4631
- var __defProps$r = Object.defineProperties;
4632
- var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
4633
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
4634
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
4635
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
4636
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4637
- var __spreadValues$t = (a, b2) => {
4965
+ var __defProp$x = Object.defineProperty;
4966
+ var __defProps$s = Object.defineProperties;
4967
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
4968
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
4969
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
4970
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
4971
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4972
+ var __spreadValues$u = (a, b2) => {
4638
4973
  for (var prop in b2 || (b2 = {}))
4639
- if (__hasOwnProp$t.call(b2, prop))
4640
- __defNormalProp$w(a, prop, b2[prop]);
4641
- if (__getOwnPropSymbols$t)
4642
- for (var prop of __getOwnPropSymbols$t(b2)) {
4643
- if (__propIsEnum$t.call(b2, prop))
4644
- __defNormalProp$w(a, prop, b2[prop]);
4974
+ if (__hasOwnProp$u.call(b2, prop))
4975
+ __defNormalProp$x(a, prop, b2[prop]);
4976
+ if (__getOwnPropSymbols$u)
4977
+ for (var prop of __getOwnPropSymbols$u(b2)) {
4978
+ if (__propIsEnum$u.call(b2, prop))
4979
+ __defNormalProp$x(a, prop, b2[prop]);
4645
4980
  }
4646
4981
  return a;
4647
4982
  };
4648
- var __spreadProps$r = (a, b2) => __defProps$r(a, __getOwnPropDescs$r(b2));
4649
- var __objRest$1 = (source, exclude) => {
4983
+ var __spreadProps$s = (a, b2) => __defProps$s(a, __getOwnPropDescs$s(b2));
4984
+ var __objRest = (source, exclude) => {
4650
4985
  var target = {};
4651
4986
  for (var prop in source)
4652
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
4987
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
4653
4988
  target[prop] = source[prop];
4654
- if (source != null && __getOwnPropSymbols$t)
4655
- for (var prop of __getOwnPropSymbols$t(source)) {
4656
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
4989
+ if (source != null && __getOwnPropSymbols$u)
4990
+ for (var prop of __getOwnPropSymbols$u(source)) {
4991
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
4657
4992
  target[prop] = source[prop];
4658
4993
  }
4659
4994
  return target;
@@ -4696,7 +5031,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4696
5031
  return { startDisable, endDisable };
4697
5032
  };
4698
5033
  const handleNavigateTo = async (config) => {
4699
- const _a2 = config.params || {}, { url, params, delayH5 } = _a2, restOptions = __objRest$1(_a2, ["url", "params", "delayH5"]);
5034
+ const _a2 = config.params || {}, { url, params, delayH5 } = _a2, restOptions = __objRest(_a2, ["url", "params", "delayH5"]);
4700
5035
  if (delayH5 > 0) {
4701
5036
  setTimeout(() => jumpRouter(url, params, restOptions), delayH5);
4702
5037
  } else {
@@ -4722,12 +5057,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4722
5057
  const handleSendMessage = (config, { ctx, metadata }) => {
4723
5058
  var _a2, _c;
4724
5059
  if ((_a2 = config.params) == null ? void 0 : _a2.text) {
4725
- const _b = config.params, { text } = _b, rest = __objRest$1(_b, ["text"]);
5060
+ const _b = config.params, { text } = _b, rest = __objRest(_b, ["text"]);
4726
5061
  (_c = ctx == null ? void 0 : ctx.postMessage) == null ? void 0 : _c.call(ctx, {
4727
5062
  type: "text",
4728
5063
  data: {
4729
5064
  text,
4730
- customJsonData: __spreadValues$t({
5065
+ customJsonData: __spreadValues$u({
4731
5066
  customBiz: metadata == null ? void 0 : metadata.customBiz
4732
5067
  }, rest || {})
4733
5068
  }
@@ -4750,16 +5085,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4750
5085
  const oldValue = prev == null ? void 0 : prev[key];
4751
5086
  const isOldEmpty = oldValue === void 0 || oldValue === null || oldValue === "" || typeof oldValue === "object" && Object.keys(oldValue).length === 0;
4752
5087
  if (isOldEmpty) {
4753
- return __spreadProps$r(__spreadValues$t({}, prev || {}), {
5088
+ return __spreadProps$s(__spreadValues$u({}, prev || {}), {
4754
5089
  [key]: targetValue
4755
5090
  });
4756
5091
  }
4757
5092
  if (typeof oldValue === "object" && typeof targetValue === "object" && !Array.isArray(oldValue) && !Array.isArray(targetValue) && oldValue !== null && targetValue !== null) {
4758
- return __spreadProps$r(__spreadValues$t({}, prev || {}), {
4759
- [key]: __spreadValues$t(__spreadValues$t({}, oldValue), targetValue)
5093
+ return __spreadProps$s(__spreadValues$u({}, prev || {}), {
5094
+ [key]: __spreadValues$u(__spreadValues$u({}, oldValue), targetValue)
4760
5095
  });
4761
5096
  }
4762
- return __spreadProps$r(__spreadValues$t({}, prev || {}), {
5097
+ return __spreadProps$s(__spreadValues$u({}, prev || {}), {
4763
5098
  [key]: targetValue
4764
5099
  });
4765
5100
  });
@@ -4772,7 +5107,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4772
5107
  if (set.indexOf(value) === -1) {
4773
5108
  set.push(value);
4774
5109
  }
4775
- return __spreadProps$r(__spreadValues$t({}, prev), { [updateKey]: set });
5110
+ return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
4776
5111
  });
4777
5112
  };
4778
5113
  const handleRemoveLocalDataToSet = (config, { setValues }) => {
@@ -4780,7 +5115,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4780
5115
  const { updateKey, value } = config.params;
4781
5116
  setValues((prev = {}) => {
4782
5117
  const set = Array.isArray(prev[updateKey]) ? [...prev[updateKey].filter((v2) => v2 !== value)] : [];
4783
- return __spreadProps$r(__spreadValues$t({}, prev), { [updateKey]: set });
5118
+ return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
4784
5119
  });
4785
5120
  };
4786
5121
  const handleToggleLocalDataToSet = (config, { setValues }) => {
@@ -4794,12 +5129,92 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4794
5129
  } else {
4795
5130
  set.splice(valueIndex, 1);
4796
5131
  }
4797
- return __spreadProps$r(__spreadValues$t({}, prev), { [updateKey]: set });
5132
+ return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
4798
5133
  });
4799
5134
  };
5135
+ function setDeep(oldObj, patch, path) {
5136
+ if (!path || path.trim() === "") {
5137
+ return isObject$1(patch) ? __spreadValues$u(__spreadValues$u({}, oldObj), patch) : oldObj;
5138
+ }
5139
+ const keys = path.replace(/\[(\d+)\]/g, ".$1").split(".");
5140
+ function updateRecursive(current, index) {
5141
+ const key = keys[index];
5142
+ if (index === keys.length - 1) {
5143
+ if (isObject$1(current == null ? void 0 : current[key]) && isObject$1(patch)) {
5144
+ return Array.isArray(current[key]) ? [...current[key], ...patch] : __spreadValues$u(__spreadValues$u({}, current[key]), patch);
5145
+ }
5146
+ return patch;
5147
+ }
5148
+ if (!current || typeof current !== "object" || !(key in current)) {
5149
+ return current;
5150
+ }
5151
+ const isArray2 = Array.isArray(current);
5152
+ const newValue = updateRecursive(current[key], index + 1);
5153
+ if (newValue === current[key]) return current;
5154
+ if (isArray2) {
5155
+ const nextArray = [...current];
5156
+ nextArray[Number(key)] = newValue;
5157
+ return nextArray;
5158
+ } else {
5159
+ return __spreadProps$s(__spreadValues$u({}, current), {
5160
+ [key]: newValue
5161
+ });
5162
+ }
5163
+ }
5164
+ return updateRecursive(oldObj, 0);
5165
+ }
5166
+ function isObject$1(val) {
5167
+ return val !== null && typeof val === "object";
5168
+ }
4800
5169
  const handleCallApiUpdateData = (config, { onAction, commonPayload }) => {
4801
5170
  onAction == null ? void 0 : onAction({ type: config.type, payload: commonPayload });
4802
5171
  };
5172
+ const handleCallFetchUpdateData = async ({ params }, { setTemplate, setReferenceComponentList, setData }) => {
5173
+ const { url, method, body } = params;
5174
+ const res = await fetch(url, {
5175
+ method,
5176
+ body: typeof body === "undefined" || method !== "POST" ? void 0 : JSON.stringify(body),
5177
+ headers: {
5178
+ "content-type": "application/json"
5179
+ }
5180
+ });
5181
+ const json = await res.json();
5182
+ if (json) {
5183
+ if (json.code === 0 && Object.prototype.toString.call(json.data) === "[object Object]") {
5184
+ const updateData = json.data;
5185
+ if (updateData.template) {
5186
+ setTemplate((t) => updateData.template);
5187
+ }
5188
+ if (Array.isArray(updateData.referenceComponentList)) {
5189
+ setReferenceComponentList((r) => updateData.referenceComponentList);
5190
+ }
5191
+ if (updateData.data) {
5192
+ setData((d) => updateData.data);
5193
+ }
5194
+ if (Array.isArray(updateData.referenceComponentListUpdate)) {
5195
+ setReferenceComponentList((oldRC) => {
5196
+ const existComponentId = [];
5197
+ return [].concat(oldRC, updateData.referenceComponentListUpdate).reverse().filter((c) => {
5198
+ if (existComponentId.includes(c.componentId)) {
5199
+ return false;
5200
+ }
5201
+ c.componentId && existComponentId.push(c.componentId);
5202
+ return true;
5203
+ });
5204
+ });
5205
+ }
5206
+ if (updateData.dataUpdate) {
5207
+ setData(
5208
+ (oldData) => setDeep(oldData, updateData.dataUpdate, updateData.dataUpdatePath)
5209
+ );
5210
+ }
5211
+ } else {
5212
+ console.error(`请求返回异常:${JSON.stringify(json)}`);
5213
+ }
5214
+ } else {
5215
+ console.error(`请求异常:${json}`);
5216
+ }
5217
+ };
4803
5218
  const handleClickTrack = (config, { commonJsonParams }) => {
4804
5219
  var _a2;
4805
5220
  if ((_a2 = config == null ? void 0 : config.params) == null ? void 0 : _a2.eventId) ;
@@ -4821,7 +5236,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4821
5236
  ctx.getComponent({
4822
5237
  code: (_b = config == null ? void 0 : config.params) == null ? void 0 : _b.componentCode
4823
5238
  }),
4824
- __spreadValues$t(__spreadValues$t({}, originProps), ((_c = config == null ? void 0 : config.params) == null ? void 0 : _c.params) || {}),
5239
+ __spreadValues$u(__spreadValues$u({}, originProps), ((_c = config == null ? void 0 : config.params) == null ? void 0 : _c.params) || {}),
4825
5240
  {
4826
5241
  background: "none",
4827
5242
  position: "bottom",
@@ -4840,6 +5255,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4840
5255
  removeLocalDataToSet: handleRemoveLocalDataToSet,
4841
5256
  toggleLocalDataToSet: handleToggleLocalDataToSet,
4842
5257
  callApiUpdateData: handleCallApiUpdateData,
5258
+ callFetchUpdateData: handleCallFetchUpdateData,
4843
5259
  clickTrack: handleClickTrack,
4844
5260
  exposureTrack: handleExposureTrack,
4845
5261
  disableScroll: handleDisableScroll,
@@ -4848,7 +5264,16 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4848
5264
  const SUPPORTED_ACTIONS = Object.keys(ACTION_HANDLERS);
4849
5265
  const dispatchAction = async (config, context) => {
4850
5266
  var _a2, _b, _c, _d;
4851
- const { onAction, setValues, originProps, extra, externalActions } = context;
5267
+ const {
5268
+ onAction,
5269
+ setValues,
5270
+ originProps,
5271
+ extra,
5272
+ externalActions,
5273
+ setData,
5274
+ setTemplate,
5275
+ setReferenceComponentList
5276
+ } = context;
4852
5277
  const commonPayload = {
4853
5278
  params: config.params,
4854
5279
  extra: extra == null ? void 0 : extra.payload
@@ -4877,7 +5302,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4877
5302
  onAction,
4878
5303
  commonPayload,
4879
5304
  commonJsonParams,
4880
- originProps
5305
+ originProps,
5306
+ setData,
5307
+ setTemplate,
5308
+ setReferenceComponentList
4881
5309
  });
4882
5310
  } else {
4883
5311
  console.warn(`[ActionContext] 未找到对应的 Action 处理器: ${config.type}`);
@@ -4895,6 +5323,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4895
5323
  children,
4896
5324
  onAction,
4897
5325
  setValues,
5326
+ setData,
5327
+ setTemplate,
5328
+ setReferenceComponentList,
4898
5329
  values,
4899
5330
  originProps,
4900
5331
  externalActions
@@ -4908,7 +5339,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4908
5339
  setValues,
4909
5340
  originProps,
4910
5341
  extra,
4911
- externalActions
5342
+ externalActions,
5343
+ setData,
5344
+ setTemplate,
5345
+ setReferenceComponentList
4912
5346
  });
4913
5347
  },
4914
5348
  [onAction, setValues, originProps, externalActions]
@@ -4976,27 +5410,45 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4976
5410
  }
4977
5411
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
4978
5412
  };
4979
- var __defProp$v = Object.defineProperty;
4980
- var __defProps$q = Object.defineProperties;
4981
- var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
4982
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
4983
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
4984
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
4985
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4986
- var __spreadValues$s = (a, b2) => {
5413
+ var __defProp$w = Object.defineProperty;
5414
+ var __defProps$r = Object.defineProperties;
5415
+ var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
5416
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
5417
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
5418
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
5419
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5420
+ var __spreadValues$t = (a, b2) => {
4987
5421
  for (var prop in b2 || (b2 = {}))
4988
- if (__hasOwnProp$s.call(b2, prop))
4989
- __defNormalProp$v(a, prop, b2[prop]);
4990
- if (__getOwnPropSymbols$s)
4991
- for (var prop of __getOwnPropSymbols$s(b2)) {
4992
- if (__propIsEnum$s.call(b2, prop))
4993
- __defNormalProp$v(a, prop, b2[prop]);
5422
+ if (__hasOwnProp$t.call(b2, prop))
5423
+ __defNormalProp$w(a, prop, b2[prop]);
5424
+ if (__getOwnPropSymbols$t)
5425
+ for (var prop of __getOwnPropSymbols$t(b2)) {
5426
+ if (__propIsEnum$t.call(b2, prop))
5427
+ __defNormalProp$w(a, prop, b2[prop]);
4994
5428
  }
4995
5429
  return a;
4996
5430
  };
4997
- var __spreadProps$q = (a, b2) => __defProps$q(a, __getOwnPropDescs$q(b2));
5431
+ var __spreadProps$r = (a, b2) => __defProps$r(a, __getOwnPropDescs$r(b2));
5432
+ function pick(obj, keys) {
5433
+ const result = {};
5434
+ keys.forEach((key) => {
5435
+ if (key in obj) {
5436
+ result[key] = obj[key];
5437
+ }
5438
+ });
5439
+ return result;
5440
+ }
5441
+ function mapToType(obj, callback) {
5442
+ const result = {};
5443
+ for (const key in obj) {
5444
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
5445
+ result[key] = callback(obj[key], key);
5446
+ }
5447
+ }
5448
+ return result;
5449
+ }
4998
5450
  const baseContainerStyle = (props, scale = 1) => {
4999
- const style = __spreadValues$s({}, (props == null ? void 0 : props.style) || {});
5451
+ const style = __spreadValues$t({}, (props == null ? void 0 : props.style) || {});
5000
5452
  return style;
5001
5453
  };
5002
5454
  const childGapStyle = (index, count, theme, gap, horizontal, scale = 1, isWrap = false) => {
@@ -5026,7 +5478,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5026
5478
  }
5027
5479
  return val;
5028
5480
  };
5029
- const paddingToStyle = (padding, theme, scale = 1) => {
5481
+ const paddingLogogramToStyle = (padding, theme, scale = 1) => {
5030
5482
  if (padding == null) return {};
5031
5483
  if (typeof padding === "number" || typeof padding === "string") {
5032
5484
  return { padding: resolveSpace(padding, theme, scale) };
@@ -5069,7 +5521,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5069
5521
  }
5070
5522
  return {};
5071
5523
  };
5072
- const marginToStyle = (margin, theme, scale = 1) => {
5524
+ const marginLogogramToStyle = (margin, theme, scale = 1) => {
5073
5525
  if (margin == null) return {};
5074
5526
  if (typeof margin === "number" || typeof margin === "string") {
5075
5527
  return { margin: resolveSpace(margin, theme, scale) };
@@ -5106,12 +5558,53 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5106
5558
  }
5107
5559
  return {};
5108
5560
  };
5109
- const resolvedLineHeight = (lineHeight, theme, scale = 1) => {
5561
+ const marginAndPaddingToStyle = (marginAndPadding, theme, scale = 1) => {
5562
+ const style = {};
5563
+ if (marginAndPadding.margin) {
5564
+ Object.assign(
5565
+ style,
5566
+ marginLogogramToStyle(marginAndPadding.margin, theme, scale)
5567
+ );
5568
+ }
5569
+ if (marginAndPadding.padding) {
5570
+ Object.assign(
5571
+ style,
5572
+ paddingLogogramToStyle(marginAndPadding.padding, theme, scale)
5573
+ );
5574
+ }
5575
+ Object.assign(
5576
+ style,
5577
+ mapToType(
5578
+ pick(marginAndPadding, [
5579
+ "marginBottom",
5580
+ "marginLeft",
5581
+ "marginRight",
5582
+ "marginTop",
5583
+ "paddingBottom",
5584
+ "paddingLeft",
5585
+ "paddingRight",
5586
+ "paddingTop"
5587
+ ]),
5588
+ (v2) => resolveSpace(v2, theme, scale)
5589
+ )
5590
+ );
5591
+ return style;
5592
+ };
5593
+ const resolvedLineHeight = (lineHeight, theme, scale = 1, notAddUnit = false) => {
5110
5594
  if (typeof lineHeight === "number") {
5111
- return runStyle(lineHeight, scale);
5595
+ return runStyle(lineHeight, scale, notAddUnit);
5112
5596
  }
5113
5597
  if (theme.lineHeight[lineHeight]) {
5114
- return runStyle(theme.lineHeight[lineHeight], scale);
5598
+ return runStyle(theme.lineHeight[lineHeight], scale, notAddUnit);
5599
+ }
5600
+ return lineHeight;
5601
+ };
5602
+ const resolvedFontSize = (lineHeight, theme, scale = 1, notAddUnit = false) => {
5603
+ if (typeof lineHeight === "number") {
5604
+ return runStyle(lineHeight, scale, notAddUnit);
5605
+ }
5606
+ if (theme.fontSize[lineHeight]) {
5607
+ return runStyle(theme.fontSize[lineHeight], scale, notAddUnit);
5115
5608
  }
5116
5609
  return lineHeight;
5117
5610
  };
@@ -5178,6 +5671,52 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5178
5671
  }
5179
5672
  return style;
5180
5673
  };
5674
+ const parseLinerGradient = (linerGradient, theme) => {
5675
+ const { colors = [], angle, stops = [] } = linerGradient;
5676
+ const gradientArr = [];
5677
+ if (angle) {
5678
+ gradientArr.push(`${angle}deg`);
5679
+ }
5680
+ if (colors.length !== stops.length) {
5681
+ stops.length = 0;
5682
+ }
5683
+ colors.forEach((v2, i) => {
5684
+ gradientArr.push(
5685
+ `${resolveColor(v2, theme)}${typeof stops[i] === "number" ? " " + String(stops[i] * 100) + "%" : ""}`
5686
+ );
5687
+ });
5688
+ return `linear-gradient(${gradientArr.join(", ")})`;
5689
+ };
5690
+ const backgroundImagePositionPropsMap = {
5691
+ topLeft: "top left",
5692
+ center: "center",
5693
+ topRight: "top right",
5694
+ bottomRight: "bottom right",
5695
+ bottomLeft: "bottom left"
5696
+ };
5697
+ const backgroundImageRepeatPropsMap = {
5698
+ noRepeat: "no-repeat",
5699
+ repeat: "repeat",
5700
+ repeatX: "repeat-x",
5701
+ repeatY: "repeat-y"
5702
+ };
5703
+ const backgroundImageAndLinearGradientToStyle = (theme, backgroundImage, backgroundLinearGradient) => {
5704
+ if (!backgroundImage && !backgroundLinearGradient) return {};
5705
+ const linearGradientString = backgroundLinearGradient ? parseLinerGradient(backgroundLinearGradient, theme) : void 0;
5706
+ const backgroundImageArr = [];
5707
+ if (backgroundImage == null ? void 0 : backgroundImage.url) {
5708
+ backgroundImageArr.push(`url(${backgroundImage.url})`);
5709
+ }
5710
+ if (linearGradientString) {
5711
+ backgroundImageArr.push(linearGradientString);
5712
+ }
5713
+ return {
5714
+ backgroundImage: backgroundImageArr.join(", "),
5715
+ backgroundPosition: (backgroundImage == null ? void 0 : backgroundImage.alignment) && backgroundImagePositionPropsMap[backgroundImage.alignment] ? backgroundImagePositionPropsMap[backgroundImage.alignment] : "center",
5716
+ backgroundSize: typeof (backgroundImage == null ? void 0 : backgroundImage.objectFit) !== "string" ? "auto" : backgroundImage.objectFit === "fill" ? "100% 100%" : backgroundImage.objectFit,
5717
+ backgroundRepeat: (backgroundImage == null ? void 0 : backgroundImage.repeat) && backgroundImageRepeatPropsMap[backgroundImage.repeat] ? backgroundImageRepeatPropsMap[backgroundImage.repeat] : "no-repeat"
5718
+ };
5719
+ };
5181
5720
  const borderRadiusToStyle = (borderRadius, theme, scale = 1) => {
5182
5721
  const borderRadiusMap = (theme == null ? void 0 : theme.borderRadius) || {};
5183
5722
  const style = {};
@@ -5237,19 +5776,23 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5237
5776
  }
5238
5777
  return style;
5239
5778
  };
5779
+ const resolveBoxShadow = ({ boxShadow }, theme, scale = 1) => {
5780
+ if (!boxShadow) return void 0;
5781
+ const { color: color2, offset = [], blurRadius = 0, spreadRadius = 0 } = boxShadow;
5782
+ const [offsetX = 0, offsetY = 0] = offset;
5783
+ return `${resolveSpace(offsetX, theme, scale)} ${resolveSpace(offsetY, theme, scale)} ${resolveSpace(blurRadius, theme, scale)} ${resolveSpace(spreadRadius, theme, scale)} ${resolveColor(color2, theme)}`;
5784
+ };
5240
5785
  const imageStyleFromProps = (props, theme, scale = 1) => {
5241
- const style = __spreadValues$s({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
5786
+ const style = __spreadValues$t(__spreadValues$t({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), marginAndPaddingToStyle(props, theme, scale));
5242
5787
  if (props.width != null) style.width = runStyle(props.width, scale) || "100%";
5243
5788
  if (props.height != null)
5244
5789
  style.height = runStyle(props.height, scale) || "auto";
5245
5790
  if (props.fit) style.objectFit = props.fit;
5246
- style.display = props.display || "flex";
5247
- Object.assign(style, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
5248
5791
  if (props.style) Object.assign(style, props.style);
5249
5792
  return style;
5250
5793
  };
5251
5794
  const imageViewStyleFromProps = (props, theme, scale = 1) => {
5252
- const style = __spreadValues$s({
5795
+ const style = __spreadValues$t({
5253
5796
  overflow: "hidden"
5254
5797
  }, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
5255
5798
  return style;
@@ -5258,9 +5801,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5258
5801
  width: percent
5259
5802
  });
5260
5803
  const buildItemContainerStyle = (index, count, theme, props, horizontal = false, scale = 1, isWrap = false) => {
5261
- const style = __spreadValues$s({
5262
- width: (props == null ? void 0 : props.flexDirection) === "row" ? "auto" : "100%",
5263
- flexDirection: props.direction || "column",
5804
+ const style = __spreadValues$t({
5264
5805
  minWidth: 0,
5265
5806
  height: "auto",
5266
5807
  boxSizing: "border-box",
@@ -5277,21 +5818,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5277
5818
  return style;
5278
5819
  };
5279
5820
  const buildLayoutContainerStyle = (props, direction, theme, scale = 1) => {
5280
- const style = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
5821
+ const style = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5281
5822
  display: "flex",
5282
5823
  boxSizing: "border-box",
5283
5824
  width: runStyle(props == null ? void 0 : props.width, scale) || "100%",
5284
5825
  height: runStyle(props == null ? void 0 : props.height, scale) || "auto",
5285
5826
  position: "relative",
5286
5827
  flexDirection: direction || "column",
5287
- overflow: props.overflow || "visible"
5288
- }, justifyContentToStyle(props == null ? void 0 : props.alignItems, props == null ? void 0 : props.justifyContent)), backgroundToStyle(props == null ? void 0 : props.background, theme)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), borderToStyle(props == null ? void 0 : props.border, theme, scale)), baseContainerStyle(props, scale));
5289
- Object.assign(style, paddingToStyle(props == null ? void 0 : props.padding, theme, scale));
5290
- Object.assign(style, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
5828
+ overflow: props.overflow || "visible",
5829
+ boxShadow: resolveBoxShadow(props, theme, scale)
5830
+ }, justifyContentToStyle(props == null ? void 0 : props.alignItems, props == null ? void 0 : props.justifyContent)), backgroundToStyle(props == null ? void 0 : props.background, theme)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), borderToStyle(props == null ? void 0 : props.border, theme, scale)), baseContainerStyle(props, scale)), marginAndPaddingToStyle(props, theme, scale)), backgroundImageAndLinearGradientToStyle(
5831
+ theme,
5832
+ props.backgroundImage,
5833
+ props.backgroundLinearGradient
5834
+ ));
5291
5835
  return style;
5292
5836
  };
5293
5837
  const buildAbsoluteLayoutStyle = (props, direction, theme, scale = 1) => {
5294
- const style = __spreadProps$q(__spreadValues$s(__spreadValues$s({}, buildLayoutContainerStyle(props, direction, theme, scale)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), {
5838
+ const style = __spreadProps$r(__spreadValues$t(__spreadValues$t({}, buildLayoutContainerStyle(props, direction, theme, scale)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), {
5295
5839
  position: "absolute",
5296
5840
  zIndex: 1
5297
5841
  });
@@ -5309,17 +5853,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5309
5853
  return style;
5310
5854
  };
5311
5855
  const numberTestRegexp = /^-?\d+(\.\d+)?$/;
5312
- const runStyle = (val, scale = 0.5) => {
5856
+ const runStyle = (val, scale = 0.5, notAddUnit = false) => {
5313
5857
  if (val === void 0 || val === null) return "";
5314
5858
  const parts = Array.isArray(val) ? val : String(val).trim().split(/\s+/);
5315
5859
  const final = parts.map((item) => {
5316
5860
  if (item === 0 || item === "0" || item === "0px") return "0";
5317
5861
  if (typeof item === "number") {
5318
- return `${item * scale}px`;
5862
+ return `${item * scale}${notAddUnit ? "" : "px"}`;
5319
5863
  }
5320
5864
  if (typeof item === "string") {
5321
5865
  if (!numberTestRegexp.test(item)) return item;
5322
- return `${parseFloat(item) * scale}px`;
5866
+ return `${parseFloat(item) * scale}${notAddUnit ? "" : "px"}`;
5323
5867
  }
5324
5868
  return item;
5325
5869
  }).join(" ");
@@ -5329,10 +5873,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5329
5873
  const resolveColor = (color2, theme) => {
5330
5874
  return theme.color[color2] ? theme.color[color2] : color2;
5331
5875
  };
5332
- const buildCardLayoutStyle = (props, theme, scale = 1) => {
5333
- const cardTheme = theme.components.card;
5334
- const warpStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s({}, backgroundToStyle(cardTheme.wrap.background, theme)), paddingToStyle(cardTheme.wrap.padding, theme, scale)), marginToStyle(props.margin, theme, scale));
5335
- const containerStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s({}, paddingToStyle(cardTheme.container.padding, theme, scale)), borderRadiusToStyle(cardTheme.container.borderRadius, theme, scale)), backgroundToStyle(cardTheme.container.background, theme));
5876
+ const buildJDHCardLayoutStyle = (props, theme, scale = 1) => {
5877
+ const cardTheme = theme.components.jdhCard;
5878
+ const warpStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({}, backgroundToStyle(cardTheme.wrap.background, theme)), paddingLogogramToStyle(cardTheme.wrap.padding, theme, scale)), marginLogogramToStyle(props.margin, theme, scale));
5879
+ const containerStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({}, paddingLogogramToStyle(cardTheme.container.padding, theme, scale)), borderRadiusToStyle(cardTheme.container.borderRadius, theme, scale)), backgroundToStyle(cardTheme.container.background, theme));
5336
5880
  const titleHeight = resolvedLineHeight(
5337
5881
  cardTheme.title.lineHeight,
5338
5882
  theme,
@@ -5345,7 +5889,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5345
5889
  height: titleHeight,
5346
5890
  overflow: "hidden"
5347
5891
  };
5348
- const titleStyle = __spreadProps$q(__spreadValues$s({}, textStyleFromTheme(theme, cardTheme.title, scale)), {
5892
+ const titleStyle = __spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, cardTheme.title, scale)), {
5349
5893
  height: titleHeight,
5350
5894
  minHeight: 0,
5351
5895
  overflow: "hidden",
@@ -5359,7 +5903,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5359
5903
  flexShrink: 0,
5360
5904
  flexGrow: 1
5361
5905
  };
5362
- const subDescriptionStyle = __spreadProps$q(__spreadValues$s({}, textStyleFromTheme(theme, cardTheme.subDescription, scale)), {
5906
+ const subDescriptionStyle = __spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, cardTheme.subDescription, scale)), {
5363
5907
  height: resolvedLineHeight(
5364
5908
  cardTheme.subDescription.lineHeight,
5365
5909
  theme,
@@ -5370,11 +5914,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5370
5914
  whiteSpace: "nowrap",
5371
5915
  textOverflow: "ellipsis"
5372
5916
  });
5373
- const contentStyle = __spreadValues$s({}, borderRadiusToStyle(cardTheme.content.borderRadius, theme, scale));
5917
+ const contentStyle = __spreadValues$t({}, borderRadiusToStyle(cardTheme.content.borderRadius, theme, scale));
5374
5918
  if (props.title || props.subDescription) {
5375
5919
  Object.assign(
5376
5920
  contentStyle,
5377
- marginToStyle(cardTheme.content.margin, theme, scale)
5921
+ marginLogogramToStyle(cardTheme.content.margin, theme, scale)
5378
5922
  );
5379
5923
  }
5380
5924
  return {
@@ -5388,14 +5932,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5388
5932
  contentStyle
5389
5933
  };
5390
5934
  };
5391
- const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5935
+ const buildJDHChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5392
5936
  const { disabled = false, subDescription, layout = "inline-icon" } = props;
5393
- const choiceTheme = theme.components.choice;
5937
+ const choiceTheme = theme.components.jdhChoice;
5394
5938
  const hasSubDesc = typeof subDescription === "string";
5395
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s({
5939
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({
5940
+ flex: 1,
5396
5941
  width: layout === "image-top" ? runStyle(choiceTheme.wrap.layoutImageTopWidth, scale) : "auto",
5397
5942
  opacity: disabled ? choiceTheme.disabledOpacity : 1
5398
- }, paddingToStyle(
5943
+ }, paddingLogogramToStyle(
5399
5944
  layout === "small-inline-icon" ? choiceTheme.wrap.layoutSmallPadding : layout === "image-left" ? choiceTheme.wrap.layoutImageLeftPadding : layout === "image-top" ? choiceTheme.wrap.layoutImageTopPadding : hasSubDesc ? choiceTheme.wrap.withSubDescriptionPadding : choiceTheme.wrap.padding,
5400
5945
  theme,
5401
5946
  scale
@@ -5407,11 +5952,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5407
5952
  theme,
5408
5953
  scale
5409
5954
  ));
5410
- const labelLineStyle = __spreadValues$s({
5955
+ const labelLineStyle = __spreadValues$t({
5411
5956
  display: "flex",
5412
5957
  alignItems: "center",
5413
5958
  justifyContent: "center"
5414
- }, paddingToStyle(
5959
+ }, paddingLogogramToStyle(
5415
5960
  layout === "image-top" ? choiceTheme.labelLineWrap.layoutImageTopPadding : choiceTheme.labelLineWrap.padding,
5416
5961
  theme,
5417
5962
  scale
@@ -5421,7 +5966,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5421
5966
  lineHeight: layout === "small-inline-icon" ? choiceTheme.label.layoutSmallLineHeight : choiceTheme.label.lineHeight,
5422
5967
  color: isSelected ? choiceTheme.label.selectedColor : choiceTheme.label.color
5423
5968
  };
5424
- const labelStyle = __spreadValues$s(__spreadProps$q(__spreadValues$s({}, textStyleFromTheme(theme, labelTextOptions, scale)), {
5969
+ const labelStyle = __spreadValues$t(__spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, labelTextOptions, scale)), {
5425
5970
  overflow: "hidden",
5426
5971
  textOverflow: "ellipsis"
5427
5972
  }), layout === "image-top" ? {
@@ -5437,7 +5982,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5437
5982
  whiteSpace: "nowrap",
5438
5983
  height: resolvedLineHeight(labelTextOptions.lineHeight, theme, scale)
5439
5984
  });
5440
- const subDescriptionStyle = __spreadValues$s(__spreadValues$s({
5985
+ const subDescriptionStyle = __spreadValues$t(__spreadValues$t({
5441
5986
  textAlign: "center",
5442
5987
  whiteSpace: "nowrap",
5443
5988
  overflow: "hidden",
@@ -5449,11 +5994,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5449
5994
  )
5450
5995
  }, textStyleFromTheme(
5451
5996
  theme,
5452
- __spreadProps$q(__spreadValues$s({}, choiceTheme.subDescription), {
5997
+ __spreadProps$r(__spreadValues$t({}, choiceTheme.subDescription), {
5453
5998
  color: isSelected ? choiceTheme.subDescription.selectedColor : choiceTheme.subDescription.color
5454
5999
  }),
5455
6000
  scale
5456
- )), marginToStyle(choiceTheme.subDescription.margin, theme, scale));
6001
+ )), marginLogogramToStyle(choiceTheme.subDescription.margin, theme, scale));
5457
6002
  const topImgSize = runStyle(choiceTheme.image.layoutImageTop.size, scale);
5458
6003
  const imgTopStyle = layout === "image-top" ? {
5459
6004
  display: "block",
@@ -5488,24 +6033,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5488
6033
  imgLeftStyle
5489
6034
  };
5490
6035
  };
5491
- const buildButtonRenderStyle = (props, theme, scale = 1) => {
6036
+ const buildJDHButtonRenderStyle = (props, theme, scale = 1) => {
5492
6037
  const {
5493
6038
  color: color2 = "default",
5494
6039
  size = "small",
5495
6040
  variant = "solid",
5496
6041
  disabled = false
5497
6042
  } = props;
5498
- const buttonTheme = theme.components.button;
5499
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
6043
+ const buttonTheme = theme.components.jdhButton;
6044
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5500
6045
  display: "flex",
5501
6046
  flexDirection: "row",
5502
6047
  alignItems: "center",
5503
6048
  justifyContent: "center",
6049
+ alignSelf: "center",
5504
6050
  opacity: disabled && variant !== "link" ? buttonTheme.disabledOpacity : 1
5505
6051
  }, variant !== "link" ? backgroundToStyle(
5506
6052
  buttonTheme.colorStyle[variant][color2].background,
5507
6053
  theme
5508
- ) : {}), paddingToStyle(
6054
+ ) : {}), paddingLogogramToStyle(
5509
6055
  variant === "link" ? 0 : buttonTheme.sizeStyle[size].padding,
5510
6056
  theme,
5511
6057
  scale
@@ -5534,7 +6080,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5534
6080
  theme,
5535
6081
  scale
5536
6082
  );
5537
- const iconStyle = __spreadValues$s({
6083
+ const iconStyle = __spreadValues$t({
5538
6084
  width: iconSize,
5539
6085
  height: iconSize,
5540
6086
  marginRight: runStyle(buttonTheme.image.marginRight, scale)
@@ -5551,7 +6097,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5551
6097
  arrowStyle
5552
6098
  };
5553
6099
  };
5554
- const buildInputRenderStyle = (props, theme, scale = 1) => {
6100
+ const buildJDHInputRenderStyle = (props, theme, scale = 1) => {
5555
6101
  const {
5556
6102
  readonly = false,
5557
6103
  error = false,
@@ -5559,17 +6105,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5559
6105
  password = false,
5560
6106
  disabled = false
5561
6107
  } = props;
5562
- const inputTheme = theme.components.input;
5563
- const themeState = __spreadValues$s(__spreadValues$s({}, inputTheme.defaultState), readonly ? inputTheme.readonlyState : disabled ? inputTheme.disabledState : error ? inputTheme.errorState : {});
5564
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
6108
+ const inputTheme = theme.components.jdhInput;
6109
+ const themeState = __spreadValues$t(__spreadValues$t({}, inputTheme.defaultState), readonly ? inputTheme.readonlyState : disabled ? inputTheme.disabledState : error ? inputTheme.errorState : {});
6110
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5565
6111
  position: "relative",
5566
6112
  opacity: themeState.opacity
5567
- }, paddingToStyle(themeState.padding, theme, scale)), borderToStyle(
6113
+ }, paddingLogogramToStyle(themeState.padding, theme, scale)), borderToStyle(
5568
6114
  { size: "1px", color: themeState.borderColor, style: "solid" },
5569
6115
  theme,
5570
6116
  scale
5571
6117
  )), backgroundToStyle(themeState.background, theme)), borderRadiusToStyle(themeState.borderRadius, theme, scale));
5572
- const inputStyle = __spreadValues$s(__spreadValues$s({
6118
+ const inputStyle = __spreadValues$t(__spreadValues$t({
5573
6119
  border: "none",
5574
6120
  width: "100%",
5575
6121
  outline: "none"
@@ -5583,7 +6129,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5583
6129
  scale
5584
6130
  ));
5585
6131
  const clearButtonSize = runStyle(inputTheme.clearButton.size, scale);
5586
- const clearStyle = __spreadValues$s({
6132
+ const clearStyle = __spreadValues$t({
5587
6133
  width: clearButtonSize,
5588
6134
  height: clearButtonSize,
5589
6135
  borderRadius: "100px",
@@ -5603,7 +6149,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5603
6149
  transform: "translate(-50%, -50%)"
5604
6150
  };
5605
6151
  const msgTheme = error && errorMessage ? inputTheme.errorMessage : inputTheme.subDescription;
5606
- const msgStyle = __spreadValues$s(__spreadValues$s({}, textStyleFromTheme(theme, msgTheme, scale)), marginToStyle(msgTheme.margin, theme, scale));
6152
+ const msgStyle = __spreadValues$t(__spreadValues$t({}, textStyleFromTheme(theme, msgTheme, scale)), marginLogogramToStyle(msgTheme.margin, theme, scale));
5607
6153
  const passwordIconSize = runStyle(inputTheme.passwordButton.size, scale);
5608
6154
  const passwordStyle = password ? {
5609
6155
  width: passwordIconSize,
@@ -5628,7 +6174,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5628
6174
  passwordIconStyle
5629
6175
  };
5630
6176
  };
5631
- const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
6177
+ const buildJDHTextareaRenderStyle = (props, value, theme, scale = 1) => {
5632
6178
  const {
5633
6179
  readonly = false,
5634
6180
  error = false,
@@ -5636,25 +6182,26 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5636
6182
  errorMessage,
5637
6183
  maxLength
5638
6184
  } = props;
5639
- const textareaTheme = theme.components.textarea;
5640
- const themeState = __spreadValues$s(__spreadValues$s({}, textareaTheme.defaultState), readonly ? textareaTheme.readonlyState : disabled ? textareaTheme.disabledState : error ? textareaTheme.errorState : {});
5641
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
6185
+ const textareaTheme = theme.components.jdhTextarea;
6186
+ const themeState = __spreadValues$t(__spreadValues$t({}, textareaTheme.defaultState), readonly ? textareaTheme.readonlyState : disabled ? textareaTheme.disabledState : error ? textareaTheme.errorState : {});
6187
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5642
6188
  position: "relative",
5643
6189
  boxSizing: "border-box",
5644
6190
  opacity: themeState.opacity,
5645
6191
  height: runStyle(themeState.minHeight, scale),
5646
6192
  maxHeight: runStyle(themeState.maxHeight, scale)
5647
- }, paddingToStyle(themeState.padding, theme, scale)), borderToStyle(
6193
+ }, paddingLogogramToStyle(themeState.padding, theme, scale)), borderToStyle(
5648
6194
  { size: "1px", color: themeState.borderColor, style: "solid" },
5649
6195
  theme,
5650
6196
  scale
5651
6197
  )), backgroundToStyle(themeState.background, theme)), borderRadiusToStyle(themeState.borderRadius, theme, scale));
5652
- const textareaStyle = __spreadValues$s(__spreadValues$s({
6198
+ const textareaStyle = __spreadValues$t(__spreadValues$t({
5653
6199
  border: "none",
5654
6200
  width: "100%",
5655
6201
  display: "block",
5656
6202
  outline: "none",
5657
- height: "100%"
6203
+ height: "100%",
6204
+ resize: "none"
5658
6205
  }, backgroundToStyle(themeState.background, theme)), textStyleFromTheme(
5659
6206
  theme,
5660
6207
  {
@@ -5665,8 +6212,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5665
6212
  scale
5666
6213
  ));
5667
6214
  const msgTheme = error && errorMessage ? textareaTheme.errorMessage : textareaTheme.subDescription;
5668
- const msgStyle = __spreadValues$s(__spreadValues$s({}, textStyleFromTheme(theme, msgTheme, scale)), marginToStyle(msgTheme.margin, theme, scale));
5669
- const maxLengthTipsStyle = typeof maxLength === "number" ? __spreadValues$s({
6215
+ const msgStyle = __spreadValues$t(__spreadValues$t({}, textStyleFromTheme(theme, msgTheme, scale)), marginLogogramToStyle(msgTheme.margin, theme, scale));
6216
+ const maxLengthTipsStyle = typeof maxLength === "number" ? __spreadValues$t({
5670
6217
  position: "absolute",
5671
6218
  bottom: resolveSpace(
5672
6219
  textareaTheme.maxLengthTips.bottom,
@@ -5676,7 +6223,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5676
6223
  right: resolveSpace(textareaTheme.maxLengthTips.right, theme, scale)
5677
6224
  }, textStyleFromTheme(
5678
6225
  theme,
5679
- __spreadProps$q(__spreadValues$s({}, textareaTheme.maxLengthTips), {
6226
+ __spreadProps$r(__spreadValues$t({}, textareaTheme.maxLengthTips), {
5680
6227
  color: resolveColor(
5681
6228
  value.length > maxLength ? textareaTheme.maxLengthTips.colorBeyond : textareaTheme.maxLengthTips.color,
5682
6229
  theme
@@ -5756,25 +6303,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5756
6303
  containerWidth: null
5757
6304
  });
5758
6305
  const useResponsive = () => React.useContext(ResponsiveContext);
5759
- var __defProp$u = Object.defineProperty;
5760
- var __defProps$p = Object.defineProperties;
5761
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
5762
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
5763
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
5764
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
5765
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5766
- var __spreadValues$r = (a, b2) => {
6306
+ var __defProp$v = Object.defineProperty;
6307
+ var __defProps$q = Object.defineProperties;
6308
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
6309
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
6310
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
6311
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
6312
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6313
+ var __spreadValues$s = (a, b2) => {
5767
6314
  for (var prop in b2 || (b2 = {}))
5768
- if (__hasOwnProp$r.call(b2, prop))
5769
- __defNormalProp$u(a, prop, b2[prop]);
5770
- if (__getOwnPropSymbols$r)
5771
- for (var prop of __getOwnPropSymbols$r(b2)) {
5772
- if (__propIsEnum$r.call(b2, prop))
5773
- __defNormalProp$u(a, prop, b2[prop]);
6315
+ if (__hasOwnProp$s.call(b2, prop))
6316
+ __defNormalProp$v(a, prop, b2[prop]);
6317
+ if (__getOwnPropSymbols$s)
6318
+ for (var prop of __getOwnPropSymbols$s(b2)) {
6319
+ if (__propIsEnum$s.call(b2, prop))
6320
+ __defNormalProp$v(a, prop, b2[prop]);
5774
6321
  }
5775
6322
  return a;
5776
6323
  };
5777
- var __spreadProps$p = (a, b2) => __defProps$p(a, __getOwnPropDescs$p(b2));
6324
+ var __spreadProps$q = (a, b2) => __defProps$q(a, __getOwnPropDescs$q(b2));
5778
6325
  const FullRowLayout = ({
5779
6326
  props,
5780
6327
  children
@@ -5799,7 +6346,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5799
6346
  };
5800
6347
  return /* @__PURE__ */ jsxRuntime.jsx(
5801
6348
  "div",
5802
- __spreadProps$p(__spreadValues$r({
6349
+ __spreadProps$q(__spreadValues$s({
5803
6350
  style: containerStyle,
5804
6351
  onClick: handleClick,
5805
6352
  ref: ref2
@@ -5812,7 +6359,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5812
6359
  return /* @__PURE__ */ jsxRuntime.jsx(
5813
6360
  "div",
5814
6361
  {
5815
- style: __spreadProps$p(__spreadValues$r({}, buildItemContainerStyle(
6362
+ style: __spreadProps$q(__spreadValues$s({}, buildItemContainerStyle(
5816
6363
  idx,
5817
6364
  count,
5818
6365
  theme,
@@ -5830,25 +6377,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5830
6377
  })
5831
6378
  );
5832
6379
  };
5833
- var __defProp$t = Object.defineProperty;
5834
- var __defProps$o = Object.defineProperties;
5835
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
5836
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
5837
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
5838
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
5839
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5840
- var __spreadValues$q = (a, b2) => {
6380
+ var __defProp$u = Object.defineProperty;
6381
+ var __defProps$p = Object.defineProperties;
6382
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
6383
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
6384
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
6385
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
6386
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6387
+ var __spreadValues$r = (a, b2) => {
5841
6388
  for (var prop in b2 || (b2 = {}))
5842
- if (__hasOwnProp$q.call(b2, prop))
5843
- __defNormalProp$t(a, prop, b2[prop]);
5844
- if (__getOwnPropSymbols$q)
5845
- for (var prop of __getOwnPropSymbols$q(b2)) {
5846
- if (__propIsEnum$q.call(b2, prop))
5847
- __defNormalProp$t(a, prop, b2[prop]);
6389
+ if (__hasOwnProp$r.call(b2, prop))
6390
+ __defNormalProp$u(a, prop, b2[prop]);
6391
+ if (__getOwnPropSymbols$r)
6392
+ for (var prop of __getOwnPropSymbols$r(b2)) {
6393
+ if (__propIsEnum$r.call(b2, prop))
6394
+ __defNormalProp$u(a, prop, b2[prop]);
5848
6395
  }
5849
6396
  return a;
5850
6397
  };
5851
- var __spreadProps$o = (a, b2) => __defProps$o(a, __getOwnPropDescs$o(b2));
6398
+ var __spreadProps$p = (a, b2) => __defProps$p(a, __getOwnPropDescs$p(b2));
5852
6399
  const MultipleColumnLayout = ({
5853
6400
  props,
5854
6401
  children
@@ -5857,11 +6404,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5857
6404
  const { executeActions } = useAction();
5858
6405
  const theme = useTheme();
5859
6406
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
5860
- const containerStyle = __spreadProps$o(__spreadValues$q({}, buildLayoutContainerStyle(props, "row", theme, scale)), {
6407
+ const containerStyle = __spreadProps$p(__spreadValues$r({}, buildLayoutContainerStyle(props, "row", theme, scale)), {
5861
6408
  flexWrap: (props == null ? void 0 : props.flexWrap) || "nowrap"
5862
6409
  });
5863
6410
  const itemContainerStyle = (child, idx) => {
5864
- return __spreadProps$o(__spreadValues$q({}, buildItemContainerStyle(idx, count, theme, props, true, scale, true)), {
6411
+ return __spreadProps$p(__spreadValues$r({}, buildItemContainerStyle(idx, count, theme, props, true, scale, true)), {
5865
6412
  flexShrink: itemFlexShrink(child),
5866
6413
  width: void 0
5867
6414
  });
@@ -5877,16 +6424,17 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5877
6424
  paddingBottom: containerStyle.marginBottom
5878
6425
  };
5879
6426
  const gapMargin = `-${resolveSpace(props.gap, theme, scale)}`;
5880
- const containerStyleForGap = __spreadProps$o(__spreadValues$q({}, containerStyle), {
6427
+ const containerStyleForGap = __spreadValues$r(__spreadProps$p(__spreadValues$r({}, containerStyle), {
5881
6428
  margin: void 0,
5882
6429
  marginTop: gapMargin,
5883
6430
  marginLeft: gapMargin,
5884
6431
  marginBottom: void 0,
5885
- marginRight: void 0,
6432
+ marginRight: void 0
6433
+ }), containerStyle.width === "100%" ? {
5886
6434
  width: void 0,
5887
6435
  // 宽度 100% 和 负margin结合会在flex下有bug,这里改用flexGrow撑开宽度
5888
6436
  flexGrow: 1
5889
- });
6437
+ } : {});
5890
6438
  const items = React.Children.toArray(children);
5891
6439
  const count = items.length;
5892
6440
  const itemFlexShrink = (child) => {
@@ -5904,7 +6452,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5904
6452
  // 最外层div使用padding代替原container的margin,以便container使用负margin中和gap实现的效果
5905
6453
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "for-gap-wrap", style: polyfillContainerMarginStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
5906
6454
  "div",
5907
- __spreadProps$o(__spreadValues$q({
6455
+ __spreadProps$p(__spreadValues$r({
5908
6456
  className: "for-gap",
5909
6457
  style: containerStyleForGap,
5910
6458
  onClick: handleClick,
@@ -5915,6 +6463,68 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5915
6463
  ) })
5916
6464
  );
5917
6465
  };
6466
+ var __defProp$t = Object.defineProperty;
6467
+ var __defProps$o = Object.defineProperties;
6468
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
6469
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
6470
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
6471
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
6472
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6473
+ var __spreadValues$q = (a, b2) => {
6474
+ for (var prop in b2 || (b2 = {}))
6475
+ if (__hasOwnProp$q.call(b2, prop))
6476
+ __defNormalProp$t(a, prop, b2[prop]);
6477
+ if (__getOwnPropSymbols$q)
6478
+ for (var prop of __getOwnPropSymbols$q(b2)) {
6479
+ if (__propIsEnum$q.call(b2, prop))
6480
+ __defNormalProp$t(a, prop, b2[prop]);
6481
+ }
6482
+ return a;
6483
+ };
6484
+ var __spreadProps$o = (a, b2) => __defProps$o(a, __getOwnPropDescs$o(b2));
6485
+ const TwoColumnLayout$2 = ({
6486
+ props,
6487
+ children
6488
+ }) => {
6489
+ const { scale } = useResponsive();
6490
+ const { executeActions } = useAction();
6491
+ const theme = useTheme();
6492
+ const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6493
+ const containerStyle = buildLayoutContainerStyle(
6494
+ props,
6495
+ "row",
6496
+ theme,
6497
+ scale
6498
+ );
6499
+ const items = React.Children.toArray(children).slice(0, 2);
6500
+ const count = items.length;
6501
+ const handleClick = (e) => {
6502
+ if (props.actions) {
6503
+ void executeActions(props.actions);
6504
+ }
6505
+ onClick(e);
6506
+ };
6507
+ return /* @__PURE__ */ jsxRuntime.jsx(
6508
+ "div",
6509
+ __spreadProps$o(__spreadValues$q({
6510
+ style: containerStyle,
6511
+ onClick: handleClick,
6512
+ ref: ref2
6513
+ }, { onMouseEnter, onMouseLeave }), {
6514
+ children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
6515
+ "div",
6516
+ {
6517
+ style: __spreadProps$o(__spreadValues$q({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6518
+ flex: 1
6519
+ // ...fractionWidth('50%'),
6520
+ }),
6521
+ children: child
6522
+ },
6523
+ idx
6524
+ ))
6525
+ })
6526
+ );
6527
+ };
5918
6528
  var __defProp$s = Object.defineProperty;
5919
6529
  var __defProps$n = Object.defineProperties;
5920
6530
  var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
@@ -5934,7 +6544,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5934
6544
  return a;
5935
6545
  };
5936
6546
  var __spreadProps$n = (a, b2) => __defProps$n(a, __getOwnPropDescs$n(b2));
5937
- const TwoColumnLayout$2 = ({
6547
+ const ThreeColumnLayout$1 = ({
5938
6548
  props,
5939
6549
  children
5940
6550
  }) => {
@@ -5948,7 +6558,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5948
6558
  theme,
5949
6559
  scale
5950
6560
  );
5951
- const items = React.Children.toArray(children).slice(0, 2);
6561
+ const items = React.Children.toArray(children).slice(0, 3);
5952
6562
  const count = items.length;
5953
6563
  const handleClick = (e) => {
5954
6564
  if (props.actions) {
@@ -5968,7 +6578,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5968
6578
  {
5969
6579
  style: __spreadProps$n(__spreadValues$p({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
5970
6580
  flex: 1
5971
- // ...fractionWidth('50%'),
5972
6581
  }),
5973
6582
  children: child
5974
6583
  },
@@ -5996,7 +6605,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5996
6605
  return a;
5997
6606
  };
5998
6607
  var __spreadProps$m = (a, b2) => __defProps$m(a, __getOwnPropDescs$m(b2));
5999
- const ThreeColumnLayout$1 = ({
6608
+ const FourColumnLayout = ({
6000
6609
  props,
6001
6610
  children
6002
6611
  }) => {
@@ -6010,7 +6619,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6010
6619
  theme,
6011
6620
  scale
6012
6621
  );
6013
- const items = React.Children.toArray(children).slice(0, 3);
6622
+ const items = React.Children.toArray(children).slice(0, 4);
6014
6623
  const count = items.length;
6015
6624
  const handleClick = (e) => {
6016
6625
  if (props.actions) {
@@ -6028,9 +6637,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6028
6637
  children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
6029
6638
  "div",
6030
6639
  {
6031
- style: __spreadProps$m(__spreadValues$o({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6032
- flex: 1
6033
- }),
6640
+ style: __spreadValues$o(__spreadValues$o({}, fractionWidth("25%")), buildItemContainerStyle(idx, count, theme, props, true, scale)),
6034
6641
  children: child
6035
6642
  },
6036
6643
  idx
@@ -6057,7 +6664,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6057
6664
  return a;
6058
6665
  };
6059
6666
  var __spreadProps$l = (a, b2) => __defProps$l(a, __getOwnPropDescs$l(b2));
6060
- const FourColumnLayout = ({
6667
+ const TwoColumnLayout$1 = ({
6061
6668
  props,
6062
6669
  children
6063
6670
  }) => {
@@ -6071,7 +6678,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6071
6678
  theme,
6072
6679
  scale
6073
6680
  );
6074
- const items = React.Children.toArray(children).slice(0, 4);
6681
+ const items = React.Children.toArray(children).slice(0, 2);
6075
6682
  const count = items.length;
6076
6683
  const handleClick = (e) => {
6077
6684
  if (props.actions) {
@@ -6082,14 +6689,20 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6082
6689
  return /* @__PURE__ */ jsxRuntime.jsx(
6083
6690
  "div",
6084
6691
  __spreadProps$l(__spreadValues$n({
6085
- style: containerStyle,
6692
+ style: __spreadProps$l(__spreadValues$n({}, containerStyle), {
6693
+ width: "100%"
6694
+ }),
6086
6695
  onClick: handleClick,
6087
6696
  ref: ref2
6088
6697
  }, { onMouseEnter, onMouseLeave }), {
6089
6698
  children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
6090
6699
  "div",
6091
6700
  {
6092
- style: __spreadValues$n(__spreadValues$n({}, fractionWidth("25%")), buildItemContainerStyle(idx, count, theme, props, true, scale)),
6701
+ style: __spreadProps$l(__spreadValues$n({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6702
+ flex: idx === 0 ? 1 : "initial",
6703
+ width: idx === 1 ? runStyle(props.rightWidth, scale) : "auto",
6704
+ flexDirection: "row"
6705
+ }),
6093
6706
  children: child
6094
6707
  },
6095
6708
  idx
@@ -6116,7 +6729,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6116
6729
  return a;
6117
6730
  };
6118
6731
  var __spreadProps$k = (a, b2) => __defProps$k(a, __getOwnPropDescs$k(b2));
6119
- const TwoColumnLayout$1 = ({
6732
+ const TwoColumnLayout = ({
6120
6733
  props,
6121
6734
  children
6122
6735
  }) => {
@@ -6141,9 +6754,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6141
6754
  return /* @__PURE__ */ jsxRuntime.jsx(
6142
6755
  "div",
6143
6756
  __spreadProps$k(__spreadValues$m({
6144
- style: __spreadProps$k(__spreadValues$m({}, containerStyle), {
6145
- width: "100%"
6146
- }),
6757
+ style: containerStyle,
6147
6758
  onClick: handleClick,
6148
6759
  ref: ref2
6149
6760
  }, { onMouseEnter, onMouseLeave }), {
@@ -6151,8 +6762,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6151
6762
  "div",
6152
6763
  {
6153
6764
  style: __spreadProps$k(__spreadValues$m({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6154
- flex: idx === 0 ? 1 : "initial",
6155
- width: idx === 1 ? runStyle(props.rightWidth, scale) : "auto",
6765
+ flex: idx === 1 ? 1 : "initial",
6766
+ width: idx === 0 ? runStyle(props == null ? void 0 : props.leftWidth) : "auto",
6156
6767
  flexDirection: "row"
6157
6768
  }),
6158
6769
  children: child
@@ -6181,7 +6792,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6181
6792
  return a;
6182
6793
  };
6183
6794
  var __spreadProps$j = (a, b2) => __defProps$j(a, __getOwnPropDescs$j(b2));
6184
- const TwoColumnLayout = ({
6795
+ const ThreeColumnLayout = ({
6185
6796
  props,
6186
6797
  children
6187
6798
  }) => {
@@ -6195,7 +6806,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6195
6806
  theme,
6196
6807
  scale
6197
6808
  );
6198
- const items = React.Children.toArray(children).slice(0, 2);
6809
+ const items = React.Children.toArray(children).slice(0, 3);
6199
6810
  const count = items.length;
6200
6811
  const handleClick = (e) => {
6201
6812
  if (props.actions) {
@@ -6215,7 +6826,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6215
6826
  {
6216
6827
  style: __spreadProps$j(__spreadValues$l({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6217
6828
  flex: idx === 1 ? 1 : "initial",
6218
- width: idx === 0 ? runStyle(props == null ? void 0 : props.leftWidth) : "auto",
6219
6829
  flexDirection: "row"
6220
6830
  }),
6221
6831
  children: child
@@ -6244,43 +6854,47 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6244
6854
  return a;
6245
6855
  };
6246
6856
  var __spreadProps$i = (a, b2) => __defProps$i(a, __getOwnPropDescs$i(b2));
6247
- const ThreeColumnLayout = ({
6857
+ const AbsoluteViewLayout = ({
6248
6858
  props,
6249
6859
  children
6250
6860
  }) => {
6251
6861
  const { scale } = useResponsive();
6252
6862
  const { executeActions } = useAction();
6863
+ const handleClick = (e) => {
6864
+ if (props.actions) {
6865
+ void executeActions(props.actions);
6866
+ }
6867
+ onClick(e);
6868
+ };
6253
6869
  const theme = useTheme();
6254
6870
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6255
- const containerStyle = buildLayoutContainerStyle(
6871
+ const absoluteContainerStyle = buildAbsoluteLayoutStyle(
6256
6872
  props,
6257
- "row",
6873
+ "column",
6258
6874
  theme,
6259
6875
  scale
6260
6876
  );
6261
- const items = React.Children.toArray(children).slice(0, 3);
6877
+ const items = React.Children.toArray(children);
6262
6878
  const count = items.length;
6263
- const handleClick = (e) => {
6264
- if (props.actions) {
6265
- void executeActions(props.actions);
6266
- }
6267
- onClick(e);
6268
- };
6269
6879
  return /* @__PURE__ */ jsxRuntime.jsx(
6270
6880
  "div",
6271
6881
  __spreadProps$i(__spreadValues$k({
6272
- style: containerStyle,
6882
+ style: absoluteContainerStyle,
6273
6883
  onClick: handleClick,
6274
6884
  ref: ref2
6275
6885
  }, { onMouseEnter, onMouseLeave }), {
6276
6886
  children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
6277
6887
  "div",
6278
6888
  {
6279
- style: __spreadProps$i(__spreadValues$k({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6280
- flex: idx === 1 ? 1 : "initial",
6281
- flexDirection: "row"
6282
- }),
6283
- children: child
6889
+ style: buildItemContainerStyle(
6890
+ idx,
6891
+ count,
6892
+ theme,
6893
+ props,
6894
+ false,
6895
+ scale
6896
+ ),
6897
+ children: child
6284
6898
  },
6285
6899
  idx
6286
6900
  ))
@@ -6306,7 +6920,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6306
6920
  return a;
6307
6921
  };
6308
6922
  var __spreadProps$h = (a, b2) => __defProps$h(a, __getOwnPropDescs$h(b2));
6309
- const AbsoluteViewLayout = ({
6923
+ const AnimationLayout = ({
6310
6924
  props,
6311
6925
  children
6312
6926
  }) => {
@@ -6320,7 +6934,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6320
6934
  };
6321
6935
  const theme = useTheme();
6322
6936
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6323
- const absoluteContainerStyle = buildAbsoluteLayoutStyle(
6937
+ const containerStyle = buildLayoutContainerStyle(
6324
6938
  props,
6325
6939
  "column",
6326
6940
  theme,
@@ -6331,7 +6945,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6331
6945
  return /* @__PURE__ */ jsxRuntime.jsx(
6332
6946
  "div",
6333
6947
  __spreadProps$h(__spreadValues$j({
6334
- style: absoluteContainerStyle,
6948
+ style: containerStyle,
6335
6949
  onClick: handleClick,
6336
6950
  ref: ref2
6337
6951
  }, { onMouseEnter, onMouseLeave }), {
@@ -6372,72 +6986,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6372
6986
  return a;
6373
6987
  };
6374
6988
  var __spreadProps$g = (a, b2) => __defProps$g(a, __getOwnPropDescs$g(b2));
6375
- const AnimationLayout = ({
6376
- props,
6377
- children
6378
- }) => {
6379
- const { scale } = useResponsive();
6380
- const { executeActions } = useAction();
6381
- const handleClick = (e) => {
6382
- if (props.actions) {
6383
- void executeActions(props.actions);
6384
- }
6385
- onClick(e);
6386
- };
6387
- const theme = useTheme();
6388
- const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6389
- const containerStyle = buildLayoutContainerStyle(
6390
- props,
6391
- "column",
6392
- theme,
6393
- scale
6394
- );
6395
- const items = React.Children.toArray(children);
6396
- const count = items.length;
6397
- return /* @__PURE__ */ jsxRuntime.jsx(
6398
- "div",
6399
- __spreadProps$g(__spreadValues$i({
6400
- style: containerStyle,
6401
- onClick: handleClick,
6402
- ref: ref2
6403
- }, { onMouseEnter, onMouseLeave }), {
6404
- children: items.map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx(
6405
- "div",
6406
- {
6407
- style: buildItemContainerStyle(
6408
- idx,
6409
- count,
6410
- theme,
6411
- props,
6412
- false,
6413
- scale
6414
- ),
6415
- children: child
6416
- },
6417
- idx
6418
- ))
6419
- })
6420
- );
6421
- };
6422
- var __defProp$k = Object.defineProperty;
6423
- var __defProps$f = Object.defineProperties;
6424
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
6425
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
6426
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
6427
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
6428
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6429
- var __spreadValues$h = (a, b2) => {
6430
- for (var prop in b2 || (b2 = {}))
6431
- if (__hasOwnProp$h.call(b2, prop))
6432
- __defNormalProp$k(a, prop, b2[prop]);
6433
- if (__getOwnPropSymbols$h)
6434
- for (var prop of __getOwnPropSymbols$h(b2)) {
6435
- if (__propIsEnum$h.call(b2, prop))
6436
- __defNormalProp$k(a, prop, b2[prop]);
6437
- }
6438
- return a;
6439
- };
6440
- var __spreadProps$f = (a, b2) => __defProps$f(a, __getOwnPropDescs$f(b2));
6441
6989
  const ScrollViewLayout = ({
6442
6990
  props,
6443
6991
  children
@@ -6462,7 +7010,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6462
7010
  return /* @__PURE__ */ jsxRuntime.jsx(
6463
7011
  "div",
6464
7012
  {
6465
- style: __spreadProps$f(__spreadValues$h({}, containerStyle), {
7013
+ style: __spreadProps$g(__spreadValues$i({}, containerStyle), {
6466
7014
  width: (customProps == null ? void 0 : customProps.width) || "100%",
6467
7015
  height: (customProps == null ? void 0 : customProps.height) || "auto",
6468
7016
  whiteSpace: scrollX ? "nowrap" : "normal",
@@ -6473,7 +7021,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6473
7021
  onClick: handleClick,
6474
7022
  children: /* @__PURE__ */ jsxRuntime.jsx(
6475
7023
  "div",
6476
- __spreadProps$f(__spreadValues$h({
7024
+ __spreadProps$g(__spreadValues$i({
6477
7025
  style: {
6478
7026
  display: "flex",
6479
7027
  flexDirection: scrollX ? "row" : "column",
@@ -6542,26 +7090,26 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6542
7090
  }
6543
7091
  );
6544
7092
  };
6545
- var __defProp$j = Object.defineProperty;
6546
- var __defProps$e = Object.defineProperties;
6547
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
6548
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
6549
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
6550
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
6551
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6552
- var __spreadValues$g = (a, b2) => {
7093
+ var __defProp$k = Object.defineProperty;
7094
+ var __defProps$f = Object.defineProperties;
7095
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
7096
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
7097
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
7098
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
7099
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7100
+ var __spreadValues$h = (a, b2) => {
6553
7101
  for (var prop in b2 || (b2 = {}))
6554
- if (__hasOwnProp$g.call(b2, prop))
6555
- __defNormalProp$j(a, prop, b2[prop]);
6556
- if (__getOwnPropSymbols$g)
6557
- for (var prop of __getOwnPropSymbols$g(b2)) {
6558
- if (__propIsEnum$g.call(b2, prop))
6559
- __defNormalProp$j(a, prop, b2[prop]);
7102
+ if (__hasOwnProp$h.call(b2, prop))
7103
+ __defNormalProp$k(a, prop, b2[prop]);
7104
+ if (__getOwnPropSymbols$h)
7105
+ for (var prop of __getOwnPropSymbols$h(b2)) {
7106
+ if (__propIsEnum$h.call(b2, prop))
7107
+ __defNormalProp$k(a, prop, b2[prop]);
6560
7108
  }
6561
7109
  return a;
6562
7110
  };
6563
- var __spreadProps$e = (a, b2) => __defProps$e(a, __getOwnPropDescs$e(b2));
6564
- const CardLayout = ({
7111
+ var __spreadProps$f = (a, b2) => __defProps$f(a, __getOwnPropDescs$f(b2));
7112
+ const JDHCardLayout = ({
6565
7113
  props,
6566
7114
  children,
6567
7115
  slot = {}
@@ -6571,13 +7119,13 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6571
7119
  const { scale } = useResponsive();
6572
7120
  const theme = useTheme();
6573
7121
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6574
- const cardStyle = buildCardLayoutStyle(props, theme, scale);
7122
+ const cardStyle = buildJDHCardLayoutStyle(props, theme, scale);
6575
7123
  const handleClick = (e) => {
6576
7124
  onClick(e);
6577
7125
  };
6578
7126
  return /* @__PURE__ */ jsxRuntime.jsx(
6579
7127
  "div",
6580
- __spreadProps$e(__spreadValues$g({
7128
+ __spreadProps$f(__spreadValues$h({
6581
7129
  style: cardStyle.warpStyle,
6582
7130
  className: "card-wrap",
6583
7131
  onClick: handleClick,
@@ -6649,25 +7197,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6649
7197
  const useTwoColumn = containerWidth === null || containerWidth > minWidthFowTwoColumn * scale;
6650
7198
  return useTwoColumn ? /* @__PURE__ */ jsxRuntime.jsx(TwoColumnLayout$2, { props, children }) : /* @__PURE__ */ jsxRuntime.jsx(FullRowLayout, { props, children });
6651
7199
  };
6652
- var __defProp$i = Object.defineProperty;
6653
- var __defProps$d = Object.defineProperties;
6654
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
6655
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
6656
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
6657
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
6658
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6659
- var __spreadValues$f = (a, b2) => {
7200
+ var __defProp$j = Object.defineProperty;
7201
+ var __defProps$e = Object.defineProperties;
7202
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
7203
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
7204
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
7205
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
7206
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7207
+ var __spreadValues$g = (a, b2) => {
6660
7208
  for (var prop in b2 || (b2 = {}))
6661
- if (__hasOwnProp$f.call(b2, prop))
6662
- __defNormalProp$i(a, prop, b2[prop]);
6663
- if (__getOwnPropSymbols$f)
6664
- for (var prop of __getOwnPropSymbols$f(b2)) {
6665
- if (__propIsEnum$f.call(b2, prop))
6666
- __defNormalProp$i(a, prop, b2[prop]);
7209
+ if (__hasOwnProp$g.call(b2, prop))
7210
+ __defNormalProp$j(a, prop, b2[prop]);
7211
+ if (__getOwnPropSymbols$g)
7212
+ for (var prop of __getOwnPropSymbols$g(b2)) {
7213
+ if (__propIsEnum$g.call(b2, prop))
7214
+ __defNormalProp$j(a, prop, b2[prop]);
6667
7215
  }
6668
7216
  return a;
6669
7217
  };
6670
- var __spreadProps$d = (a, b2) => __defProps$d(a, __getOwnPropDescs$d(b2));
7218
+ var __spreadProps$e = (a, b2) => __defProps$e(a, __getOwnPropDescs$e(b2));
6671
7219
  const LayoutWrapper = ({
6672
7220
  node,
6673
7221
  originProps,
@@ -6692,7 +7240,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6692
7240
  case "full-row":
6693
7241
  return /* @__PURE__ */ jsxRuntime.jsx(FullRowLayout, { props: layoutProps, children });
6694
7242
  case "multiple-column":
6695
- return /* @__PURE__ */ jsxRuntime.jsx(MultipleColumnLayout, __spreadProps$d(__spreadValues$f({ props: layoutProps }, { originProps }), { children }));
7243
+ return /* @__PURE__ */ jsxRuntime.jsx(MultipleColumnLayout, __spreadProps$e(__spreadValues$g({ props: layoutProps }, { originProps }), { children }));
6696
7244
  case "two-column":
6697
7245
  return /* @__PURE__ */ jsxRuntime.jsx(TwoColumnLayout$2, { props: layoutProps, children });
6698
7246
  case "three-column":
@@ -6710,9 +7258,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6710
7258
  case "animation-layout":
6711
7259
  return /* @__PURE__ */ jsxRuntime.jsx(AnimationLayout, { props: layoutProps, children });
6712
7260
  case "scroll-view":
6713
- return /* @__PURE__ */ jsxRuntime.jsx(ScrollViewLayout, __spreadProps$d(__spreadValues$f({}, node), { children }));
6714
- case "card":
6715
- return /* @__PURE__ */ jsxRuntime.jsx(CardLayout, { props: layoutProps, slot, children });
7261
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollViewLayout, __spreadProps$e(__spreadValues$g({}, node), { children }));
7262
+ case "jdh-card":
7263
+ return /* @__PURE__ */ jsxRuntime.jsx(JDHCardLayout, { props: layoutProps, slot, children });
6716
7264
  case "responsive-two-column":
6717
7265
  return /* @__PURE__ */ jsxRuntime.jsx(ResponsiveTwoColumnLayout, { props: layoutProps, children });
6718
7266
  default:
@@ -6742,31 +7290,42 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6742
7290
  const value = normalizeEventValue(eOrValue);
6743
7291
  onChange({ name, value });
6744
7292
  };
6745
- var __defProp$h = Object.defineProperty;
6746
- var __defProps$c = Object.defineProperties;
6747
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
6748
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
6749
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
6750
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
6751
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6752
- var __spreadValues$e = (a, b2) => {
7293
+ var __defProp$i = Object.defineProperty;
7294
+ var __defProps$d = Object.defineProperties;
7295
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
7296
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
7297
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
7298
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
7299
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7300
+ var __spreadValues$f = (a, b2) => {
6753
7301
  for (var prop in b2 || (b2 = {}))
6754
- if (__hasOwnProp$e.call(b2, prop))
6755
- __defNormalProp$h(a, prop, b2[prop]);
6756
- if (__getOwnPropSymbols$e)
6757
- for (var prop of __getOwnPropSymbols$e(b2)) {
6758
- if (__propIsEnum$e.call(b2, prop))
6759
- __defNormalProp$h(a, prop, b2[prop]);
7302
+ if (__hasOwnProp$f.call(b2, prop))
7303
+ __defNormalProp$i(a, prop, b2[prop]);
7304
+ if (__getOwnPropSymbols$f)
7305
+ for (var prop of __getOwnPropSymbols$f(b2)) {
7306
+ if (__propIsEnum$f.call(b2, prop))
7307
+ __defNormalProp$i(a, prop, b2[prop]);
6760
7308
  }
6761
7309
  return a;
6762
7310
  };
6763
- var __spreadProps$c = (a, b2) => __defProps$c(a, __getOwnPropDescs$c(b2));
7311
+ var __spreadProps$d = (a, b2) => __defProps$d(a, __getOwnPropDescs$d(b2));
6764
7312
  const TextRender = (props) => {
6765
7313
  const theme = useTheme();
7314
+ const { variant = "body" } = props;
6766
7315
  const { scale } = useResponsive();
6767
7316
  const { executeActions } = useAction();
6768
7317
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6769
- const style = textStyleFromTheme(theme, props, scale);
7318
+ const textTheme = theme.components.text;
7319
+ const textProps = __spreadValues$f(__spreadValues$f(__spreadValues$f({}, textTheme.basic), textTheme.variant[variant]), props);
7320
+ const style = __spreadValues$f(__spreadValues$f(__spreadValues$f({}, textStyleFromTheme(theme, textProps, scale)), marginAndPaddingToStyle(props, theme, scale)), typeof props.numberOfLines === "number" ? {
7321
+ display: "-webkit-box",
7322
+ webkitBoxOrient: "vertical",
7323
+ webkitLineClamp: props.numberOfLines.toString(),
7324
+ // 控制显示行数
7325
+ overflow: "hidden",
7326
+ textOverflow: "ellipsis",
7327
+ whiteSpace: "normal"
7328
+ } : {});
6770
7329
  const handleClick = (e) => {
6771
7330
  if (props.actions) {
6772
7331
  void executeActions(props.actions);
@@ -6775,7 +7334,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
6775
7334
  };
6776
7335
  return /* @__PURE__ */ jsxRuntime.jsx(
6777
7336
  "span",
6778
- __spreadProps$c(__spreadValues$e({
7337
+ __spreadProps$d(__spreadValues$f({
6779
7338
  style,
6780
7339
  onClick: handleClick,
6781
7340
  ref: ref2
@@ -8086,6 +8645,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8086
8645
  return Math.min(starIndex, underIndex);
8087
8646
  },
8088
8647
  tokenizer(src) {
8648
+ if (/^\*(?=[\d])/.test(src)) {
8649
+ const token = {
8650
+ type: "text",
8651
+ raw: "*",
8652
+ text: "*",
8653
+ escaped: false
8654
+ };
8655
+ return token;
8656
+ }
8657
+ if (/^\*[^*\n\r]+(?=\*\*)/.test(src)) {
8658
+ const token = {
8659
+ type: "text",
8660
+ raw: "*",
8661
+ text: "*",
8662
+ escaped: false
8663
+ };
8664
+ return token;
8665
+ }
8089
8666
  const match = src.match(/^(\*|_)([^\*_\n\r]+?)\1(?!\1)/);
8090
8667
  if (match) {
8091
8668
  const [raw, delimiter, text] = match;
@@ -8179,7 +8756,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8179
8756
  /^(\*{2,3}|_{1,3})(?!\s)(?!.*\S\1$)[^\r\n]{0,1000}$/
8180
8757
  ],
8181
8758
  list: [
8182
- /^[-+*]\s{0,3}$/,
8759
+ /^[-+*]\s{1,3}$/,
8183
8760
  /^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\S\1$)[^\r\n]{0,1000}$/,
8184
8761
  /^[-+*]\s{1,3}\[[^\]\r\n]{0,1000}$/,
8185
8762
  /^[-+*]\s{1,3}\[[^\r\n]{0,1000}\](\([^)\r\n]{0,1000})?$/
@@ -8220,7 +8797,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8220
8797
  },
8221
8798
  [inteface_StreamCacheTokenType.List]: {
8222
8799
  tokenType: inteface_StreamCacheTokenType.List,
8223
- isStartOfToken: (markdown) => /^[-+*]/.test(markdown),
8800
+ isStartOfToken: (markdown) => /^[-+*]\s/.test(markdown),
8224
8801
  isStreamingValid: (markdown) => STREAM_INCOMPLETE_REGEX.list.some((re2) => re2.test(markdown))
8225
8802
  },
8226
8803
  [inteface_StreamCacheTokenType.Table]: {
@@ -8234,8 +8811,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8234
8811
  if (!recognizer) return;
8235
8812
  const { token, pending } = cache;
8236
8813
  if (token === inteface_StreamCacheTokenType.Text && recognizer.isStartOfToken(pending)) {
8237
- cache.token = tokenType;
8238
- return;
8814
+ if (tokenType === inteface_StreamCacheTokenType.List) {
8815
+ const cm = cache.completeMarkdown;
8816
+ const lastLF = cm.lastIndexOf("\n");
8817
+ const lineStart = lastLF >= 0 ? lastLF + 1 : 0;
8818
+ const before = cm.slice(lineStart);
8819
+ if (/^ {0,3}$/.test(before)) {
8820
+ cache.token = tokenType;
8821
+ return;
8822
+ }
8823
+ } else {
8824
+ cache.token = tokenType;
8825
+ return;
8826
+ }
8239
8827
  }
8240
8828
  if (token === tokenType && !recognizer.isStreamingValid(pending)) {
8241
8829
  commitCache(cache);
@@ -8747,9 +9335,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8747
9335
  const { renderers } = useMarkdownContext();
8748
9336
  const { ListItemRenderer: ListItemRenderer2 } = renderers;
8749
9337
  const isOrdered = "ordered" in node ? node.ordered : false;
9338
+ const forceIndent = (prevNode == null ? void 0 : prevNode.type) === "list" && !parent && node.type === "list" && !node.ordered ? true : false;
9339
+ if (forceIndent) {
9340
+ node.indent = true;
9341
+ }
8750
9342
  const className = shared_clsx("xmd-list", {
8751
9343
  "xmd-ordered-list": isOrdered,
8752
- "xmd-bullet-list": !isOrdered
9344
+ "xmd-bullet-list": !isOrdered,
9345
+ "xmd-bullet-indent": forceIndent
8753
9346
  });
8754
9347
  const ListTag = isOrdered ? "ol" : "ul";
8755
9348
  const isNested = (parent == null ? void 0 : parent.type) === "list_item";
@@ -8779,7 +9372,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8779
9372
  const list = parent;
8780
9373
  const displayIndex = ((list == null ? void 0 : list.start) || 0) + (index || 0);
8781
9374
  const depth = (parent == null ? void 0 : parent._depth) || 1;
8782
- const isTopLevelBullet = !isOrdered && depth === 1;
9375
+ const isTopLevelBullet = !isOrdered && depth === 1 && !parent.indent;
8783
9376
  node._depth = depth;
8784
9377
  const className = shared_clsx("xmd-list-item", {
8785
9378
  "xmd-ordered-list-item": isOrdered,
@@ -8811,59 +9404,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8811
9404
  ]
8812
9405
  });
8813
9406
  };
8814
- var __defProp$g = Object.defineProperty;
8815
- var __defProps$b = Object.defineProperties;
8816
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
8817
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
8818
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
8819
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
8820
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8821
- var __spreadValues$d = (a, b2) => {
8822
- for (var prop in b2 || (b2 = {}))
8823
- if (__hasOwnProp$d.call(b2, prop))
8824
- __defNormalProp$g(a, prop, b2[prop]);
8825
- if (__getOwnPropSymbols$d)
8826
- for (var prop of __getOwnPropSymbols$d(b2)) {
8827
- if (__propIsEnum$d.call(b2, prop))
8828
- __defNormalProp$g(a, prop, b2[prop]);
8829
- }
8830
- return a;
8831
- };
8832
- var __spreadProps$b = (a, b2) => __defProps$b(a, __getOwnPropDescs$b(b2));
8833
- var __objRest = (source, exclude) => {
8834
- var target = {};
8835
- for (var prop in source)
8836
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
8837
- target[prop] = source[prop];
8838
- if (source != null && __getOwnPropSymbols$d)
8839
- for (var prop of __getOwnPropSymbols$d(source)) {
8840
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
8841
- target[prop] = source[prop];
8842
- }
8843
- return target;
8844
- };
8845
- const View = (_a2) => {
8846
- var _b = _a2, { children } = _b, props = __objRest(_b, ["children"]);
8847
- return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps$b(__spreadValues$d({}, props), { children }));
8848
- };
8849
- const Text = (_c) => {
8850
- var _d = _c, { children } = _d, props = __objRest(_d, ["children"]);
8851
- return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps$b(__spreadValues$d({}, props), { children }));
8852
- };
8853
9407
  const CodeRenderer = ({ node }) => {
8854
- return jsxRuntime.jsxs(View, {
9408
+ return jsxRuntime.jsxs("div", {
8855
9409
  className: "xmd-code-container",
8856
9410
  children: [
8857
- node.lang && jsxRuntime.jsx(View, {
9411
+ node.lang && jsxRuntime.jsx("div", {
8858
9412
  className: "xmd-code-header",
8859
- children: jsxRuntime.jsx(Text, {
9413
+ children: jsxRuntime.jsx("span", {
8860
9414
  className: "xmd-code-lang",
8861
9415
  children: node.lang
8862
9416
  })
8863
9417
  }),
8864
- jsxRuntime.jsx(View, {
9418
+ jsxRuntime.jsx("div", {
8865
9419
  className: "xmd-code-content",
8866
- children: jsxRuntime.jsx(Text, {
9420
+ children: jsxRuntime.jsx("span", {
8867
9421
  className: "xmd-code-text",
8868
9422
  children: node.text
8869
9423
  })
@@ -8871,6 +9425,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8871
9425
  ]
8872
9426
  });
8873
9427
  };
9428
+ const checkURL = (url) => {
9429
+ return /^(https?:|cmd:)\/\/|^#\S+/.test(url);
9430
+ };
8874
9431
  const Icon = React.memo((props) => {
8875
9432
  const { name = "", size, color: color2 } = props;
8876
9433
  const classNames = shared_clsx("xmdfont", `xmd-icon-${name}`);
@@ -8888,14 +9445,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8888
9445
  const { renderers, showLinkIcon, onLinkPress } = useMarkdownContext();
8889
9446
  const { PhrasingContentResolver: PhrasingContentResolver2 } = renderers;
8890
9447
  const { href: url } = node;
9448
+ const isURL = checkURL(url);
8891
9449
  const onPress = React.useCallback((e) => {
8892
9450
  e.preventDefault();
8893
- if (url) {
9451
+ if (isURL) {
8894
9452
  onLinkPress == null ? void 0 : onLinkPress(url);
8895
9453
  }
8896
9454
  }, [
8897
9455
  url,
8898
- onLinkPress
9456
+ onLinkPress,
9457
+ isURL
8899
9458
  ]);
8900
9459
  return jsxRuntime.jsxs("a", {
8901
9460
  className: "xmd-link",
@@ -8909,7 +9468,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
8909
9468
  prevNode: index > 0 ? array[index - 1] : void 0,
8910
9469
  nextNode: index < array.length - 1 ? array[index + 1] : void 0
8911
9470
  }, index)),
8912
- showLinkIcon && jsxRuntime.jsx("span", {
9471
+ showLinkIcon && isURL && jsxRuntime.jsx("span", {
8913
9472
  className: "xmd-link-search",
8914
9473
  children: jsxRuntime.jsx(Icon, {
8915
9474
  name: "search",
@@ -9058,7 +9617,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9058
9617
  });
9059
9618
  };
9060
9619
  const CodespanRenderer = ({ node }) => {
9061
- return jsxRuntime.jsx(Text, {
9620
+ return jsxRuntime.jsx("span", {
9062
9621
  className: "xmd-codespan",
9063
9622
  children: node.text
9064
9623
  });
@@ -9408,7 +9967,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9408
9967
  ...defaultRenderers
9409
9968
  });
9410
9969
  const pxTransform = (value) => {
9411
- return value / 2;
9970
+ return `${value / 2}px`;
9412
9971
  };
9413
9972
  const shared_pxTransform = pxTransform;
9414
9973
  const defaultTheme = {
@@ -9771,43 +10330,70 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9771
10330
  });
9772
10331
  };
9773
10332
  const Markdown = attachStaticMethods(MarkdownFC);
10333
+ var __defProp$h = Object.defineProperty;
10334
+ var __defProps$c = Object.defineProperties;
10335
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
10336
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
10337
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
10338
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
10339
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10340
+ var __spreadValues$e = (a, b2) => {
10341
+ for (var prop in b2 || (b2 = {}))
10342
+ if (__hasOwnProp$e.call(b2, prop))
10343
+ __defNormalProp$h(a, prop, b2[prop]);
10344
+ if (__getOwnPropSymbols$e)
10345
+ for (var prop of __getOwnPropSymbols$e(b2)) {
10346
+ if (__propIsEnum$e.call(b2, prop))
10347
+ __defNormalProp$h(a, prop, b2[prop]);
10348
+ }
10349
+ return a;
10350
+ };
10351
+ var __spreadProps$c = (a, b2) => __defProps$c(a, __getOwnPropDescs$c(b2));
9774
10352
  const MarkdownRender = (props) => {
9775
- var _a2;
9776
- useTheme();
10353
+ const theme = useTheme();
9777
10354
  const { executeActions } = useAction();
9778
- useForEditor(props);
10355
+ const { scale } = useResponsive();
10356
+ const { onClick } = useForEditor(props);
9779
10357
  const content = props.content || "";
9780
- const originProps = props.originProps || {};
9781
- return (originProps == null ? void 0 : originProps.renderMarkdown) ? (_a2 = originProps == null ? void 0 : originProps.renderMarkdown) == null ? void 0 : _a2.call(originProps, { text: content }) : /* @__PURE__ */ jsxRuntime.jsx(
9782
- Markdown,
9783
- {
9784
- content,
9785
- theme: {
9786
- line_height: 5,
9787
- text_size: 16
9788
- }
10358
+ const style = __spreadProps$c(__spreadValues$e({}, marginAndPaddingToStyle(props, theme, scale)), {
10359
+ textAlign: props.textAlign
10360
+ });
10361
+ const markdownTheme = {
10362
+ line_height: typeof props.lineHeight === "number" ? parseFloat(
10363
+ resolvedLineHeight(props.lineHeight, theme, scale, true).toString()
10364
+ ) * 2 : void 0,
10365
+ text_size: typeof props.fontSize === "number" ? parseFloat(
10366
+ resolvedFontSize(props.fontSize, theme, scale, true).toString()
10367
+ ) * 2 : void 0,
10368
+ text_color: typeof props.color === "string" ? resolveColor(props.color, theme) : void 0
10369
+ };
10370
+ const handleClick = (e) => {
10371
+ if (props == null ? void 0 : props.actions) {
10372
+ void executeActions(props.actions);
9789
10373
  }
9790
- );
10374
+ onClick(e);
10375
+ };
10376
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: handleClick, className: "aui-markdown-wrap", style, children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { content, theme: markdownTheme }) });
9791
10377
  };
9792
- var __defProp$f = Object.defineProperty;
9793
- var __defProps$a = Object.defineProperties;
9794
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
9795
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
9796
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
9797
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
9798
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9799
- var __spreadValues$c = (a, b2) => {
10378
+ var __defProp$g = Object.defineProperty;
10379
+ var __defProps$b = Object.defineProperties;
10380
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
10381
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
10382
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
10383
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
10384
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10385
+ var __spreadValues$d = (a, b2) => {
9800
10386
  for (var prop in b2 || (b2 = {}))
9801
- if (__hasOwnProp$c.call(b2, prop))
9802
- __defNormalProp$f(a, prop, b2[prop]);
9803
- if (__getOwnPropSymbols$c)
9804
- for (var prop of __getOwnPropSymbols$c(b2)) {
9805
- if (__propIsEnum$c.call(b2, prop))
9806
- __defNormalProp$f(a, prop, b2[prop]);
10387
+ if (__hasOwnProp$d.call(b2, prop))
10388
+ __defNormalProp$g(a, prop, b2[prop]);
10389
+ if (__getOwnPropSymbols$d)
10390
+ for (var prop of __getOwnPropSymbols$d(b2)) {
10391
+ if (__propIsEnum$d.call(b2, prop))
10392
+ __defNormalProp$g(a, prop, b2[prop]);
9807
10393
  }
9808
10394
  return a;
9809
10395
  };
9810
- var __spreadProps$a = (a, b2) => __defProps$a(a, __getOwnPropDescs$a(b2));
10396
+ var __spreadProps$b = (a, b2) => __defProps$b(a, __getOwnPropDescs$b(b2));
9811
10397
  const ImageRender = (props) => {
9812
10398
  const theme = useTheme();
9813
10399
  const { scale } = useResponsive();
@@ -9831,7 +10417,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9831
10417
  }
9832
10418
  };
9833
10419
  const style = imageStyleFromProps(
9834
- __spreadValues$c({
10420
+ __spreadValues$d({
9835
10421
  width: props.width,
9836
10422
  height: props.height,
9837
10423
  fit: getObjectFit(props.fit)
@@ -9839,7 +10425,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9839
10425
  theme,
9840
10426
  scale
9841
10427
  );
9842
- const imgUrl = getImageUrl(__spreadValues$c({ url: props.src }, props));
10428
+ const imgUrl = getImageUrl(__spreadValues$d({ url: props.src }, props));
9843
10429
  const handleClick = (e) => {
9844
10430
  if (props == null ? void 0 : props.actions) {
9845
10431
  void executeActions(props.actions);
@@ -9848,7 +10434,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9848
10434
  };
9849
10435
  return /* @__PURE__ */ jsxRuntime.jsx(
9850
10436
  "div",
9851
- __spreadProps$a(__spreadValues$c({
10437
+ __spreadProps$b(__spreadValues$d({
9852
10438
  onClick: props.actions ? handleClick : void 0,
9853
10439
  style: viewStyle,
9854
10440
  ref: ref2
@@ -9857,25 +10443,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9857
10443
  })
9858
10444
  );
9859
10445
  };
9860
- var __defProp$e = Object.defineProperty;
9861
- var __defProps$9 = Object.defineProperties;
9862
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
9863
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
9864
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
9865
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
9866
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9867
- var __spreadValues$b = (a, b2) => {
10446
+ var __defProp$f = Object.defineProperty;
10447
+ var __defProps$a = Object.defineProperties;
10448
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
10449
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
10450
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
10451
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
10452
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10453
+ var __spreadValues$c = (a, b2) => {
9868
10454
  for (var prop in b2 || (b2 = {}))
9869
- if (__hasOwnProp$b.call(b2, prop))
9870
- __defNormalProp$e(a, prop, b2[prop]);
9871
- if (__getOwnPropSymbols$b)
9872
- for (var prop of __getOwnPropSymbols$b(b2)) {
9873
- if (__propIsEnum$b.call(b2, prop))
9874
- __defNormalProp$e(a, prop, b2[prop]);
10455
+ if (__hasOwnProp$c.call(b2, prop))
10456
+ __defNormalProp$f(a, prop, b2[prop]);
10457
+ if (__getOwnPropSymbols$c)
10458
+ for (var prop of __getOwnPropSymbols$c(b2)) {
10459
+ if (__propIsEnum$c.call(b2, prop))
10460
+ __defNormalProp$f(a, prop, b2[prop]);
9875
10461
  }
9876
10462
  return a;
9877
10463
  };
9878
- var __spreadProps$9 = (a, b2) => __defProps$9(a, __getOwnPropDescs$9(b2));
10464
+ var __spreadProps$a = (a, b2) => __defProps$a(a, __getOwnPropDescs$a(b2));
9879
10465
  const TextListRender = (props) => {
9880
10466
  const theme = useTheme();
9881
10467
  const { scale } = useResponsive();
@@ -9897,7 +10483,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9897
10483
  };
9898
10484
  return /* @__PURE__ */ jsxRuntime.jsxs(
9899
10485
  "div",
9900
- __spreadProps$9(__spreadValues$b({
10486
+ __spreadProps$a(__spreadValues$c({
9901
10487
  style,
9902
10488
  onClick: handleContainerClick,
9903
10489
  ref: ref2
@@ -9951,25 +10537,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9951
10537
  })
9952
10538
  );
9953
10539
  };
9954
- var __defProp$d = Object.defineProperty;
9955
- var __defProps$8 = Object.defineProperties;
9956
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
9957
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
9958
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
9959
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
9960
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9961
- var __spreadValues$a = (a, b2) => {
10540
+ var __defProp$e = Object.defineProperty;
10541
+ var __defProps$9 = Object.defineProperties;
10542
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
10543
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
10544
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
10545
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
10546
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10547
+ var __spreadValues$b = (a, b2) => {
9962
10548
  for (var prop in b2 || (b2 = {}))
9963
- if (__hasOwnProp$a.call(b2, prop))
9964
- __defNormalProp$d(a, prop, b2[prop]);
9965
- if (__getOwnPropSymbols$a)
9966
- for (var prop of __getOwnPropSymbols$a(b2)) {
9967
- if (__propIsEnum$a.call(b2, prop))
9968
- __defNormalProp$d(a, prop, b2[prop]);
10549
+ if (__hasOwnProp$b.call(b2, prop))
10550
+ __defNormalProp$e(a, prop, b2[prop]);
10551
+ if (__getOwnPropSymbols$b)
10552
+ for (var prop of __getOwnPropSymbols$b(b2)) {
10553
+ if (__propIsEnum$b.call(b2, prop))
10554
+ __defNormalProp$e(a, prop, b2[prop]);
9969
10555
  }
9970
10556
  return a;
9971
10557
  };
9972
- var __spreadProps$8 = (a, b2) => __defProps$8(a, __getOwnPropDescs$8(b2));
10558
+ var __spreadProps$9 = (a, b2) => __defProps$9(a, __getOwnPropDescs$9(b2));
9973
10559
  const CustomRenderFromIM = (props) => {
9974
10560
  const { executeActions, getLocalData } = useAction();
9975
10561
  const { originProps } = props;
@@ -10002,32 +10588,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10002
10588
  },
10003
10589
  {}
10004
10590
  );
10005
- return __spreadProps$8(__spreadValues$a({}, actions), {
10591
+ return __spreadProps$9(__spreadValues$b({}, actions), {
10006
10592
  getLocalData
10007
10593
  });
10008
10594
  }, [executeActions, getLocalData]);
10009
10595
  if (!CustomComp)
10010
10596
  return /* @__PURE__ */ jsxRuntime.jsx(UnknownRenderer, { type: props == null ? void 0 : props.customCode, prefix: "渲染类型错误" });
10011
10597
  if (React.isValidElement(CustomComp)) {
10012
- return React.cloneElement(CustomComp, __spreadProps$8(__spreadValues$a(__spreadValues$a(__spreadValues$a({}, (CustomComp == null ? void 0 : CustomComp.props) || {}), originProps), props), {
10598
+ return React.cloneElement(CustomComp, __spreadProps$9(__spreadValues$b(__spreadValues$b(__spreadValues$b({}, (CustomComp == null ? void 0 : CustomComp.props) || {}), originProps), props), {
10013
10599
  AUIActions
10014
10600
  }));
10015
10601
  }
10016
- return /* @__PURE__ */ jsxRuntime.jsx(CustomComp, __spreadProps$8(__spreadValues$a(__spreadValues$a({}, originProps), props), { AUIActions }));
10602
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomComp, __spreadProps$9(__spreadValues$b(__spreadValues$b({}, originProps), props), { AUIActions }));
10017
10603
  };
10018
- var __defProp$c = Object.defineProperty;
10019
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
10020
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
10021
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
10022
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10023
- var __spreadValues$9 = (a, b2) => {
10604
+ var __defProp$d = Object.defineProperty;
10605
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
10606
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
10607
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
10608
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10609
+ var __spreadValues$a = (a, b2) => {
10024
10610
  for (var prop in b2 || (b2 = {}))
10025
- if (__hasOwnProp$9.call(b2, prop))
10026
- __defNormalProp$c(a, prop, b2[prop]);
10027
- if (__getOwnPropSymbols$9)
10028
- for (var prop of __getOwnPropSymbols$9(b2)) {
10029
- if (__propIsEnum$9.call(b2, prop))
10030
- __defNormalProp$c(a, prop, b2[prop]);
10611
+ if (__hasOwnProp$a.call(b2, prop))
10612
+ __defNormalProp$d(a, prop, b2[prop]);
10613
+ if (__getOwnPropSymbols$a)
10614
+ for (var prop of __getOwnPropSymbols$a(b2)) {
10615
+ if (__propIsEnum$a.call(b2, prop))
10616
+ __defNormalProp$d(a, prop, b2[prop]);
10031
10617
  }
10032
10618
  return a;
10033
10619
  };
@@ -10041,7 +10627,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10041
10627
  void executeActions(props.actions);
10042
10628
  }
10043
10629
  };
10044
- const style = __spreadValues$9({
10630
+ const style = __spreadValues$a({
10045
10631
  width: "100%",
10046
10632
  height: props.height ? runStyle(props.height, scale) : "1px",
10047
10633
  backgroundColor: props.color ? ((_a2 = theme.color) == null ? void 0 : _a2[props.color]) || props.color : "#eeeeee",
@@ -10058,40 +10644,35 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10058
10644
  const { scale } = useResponsive();
10059
10645
  const { executeActions } = useAction();
10060
10646
  const style = textStyleFromTheme(theme, props, scale);
10061
- const handleClick = (e) => {
10062
- if (props.actions) {
10063
- void executeActions(props.actions);
10064
- }
10065
- };
10066
10647
  const Component = component;
10067
10648
  return /* @__PURE__ */ jsxRuntime.jsx(
10068
10649
  Component,
10069
10650
  {
10070
10651
  compiledStyle: style,
10071
- compiledOnClick: handleClick,
10652
+ executeActions,
10072
10653
  compiledProps: props
10073
10654
  }
10074
10655
  );
10075
10656
  };
10076
- var __defProp$b = Object.defineProperty;
10077
- var __defProps$7 = Object.defineProperties;
10078
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
10079
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
10080
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
10081
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
10082
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10083
- var __spreadValues$8 = (a, b2) => {
10657
+ var __defProp$c = Object.defineProperty;
10658
+ var __defProps$8 = Object.defineProperties;
10659
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
10660
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
10661
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
10662
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
10663
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10664
+ var __spreadValues$9 = (a, b2) => {
10084
10665
  for (var prop in b2 || (b2 = {}))
10085
- if (__hasOwnProp$8.call(b2, prop))
10086
- __defNormalProp$b(a, prop, b2[prop]);
10087
- if (__getOwnPropSymbols$8)
10088
- for (var prop of __getOwnPropSymbols$8(b2)) {
10089
- if (__propIsEnum$8.call(b2, prop))
10090
- __defNormalProp$b(a, prop, b2[prop]);
10666
+ if (__hasOwnProp$9.call(b2, prop))
10667
+ __defNormalProp$c(a, prop, b2[prop]);
10668
+ if (__getOwnPropSymbols$9)
10669
+ for (var prop of __getOwnPropSymbols$9(b2)) {
10670
+ if (__propIsEnum$9.call(b2, prop))
10671
+ __defNormalProp$c(a, prop, b2[prop]);
10091
10672
  }
10092
10673
  return a;
10093
10674
  };
10094
- var __spreadProps$7 = (a, b2) => __defProps$7(a, __getOwnPropDescs$7(b2));
10675
+ var __spreadProps$8 = (a, b2) => __defProps$8(a, __getOwnPropDescs$8(b2));
10095
10676
  const ChoiceJDHRender = ({ props, values }) => {
10096
10677
  const {
10097
10678
  updateKey,
@@ -10110,7 +10691,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10110
10691
  const { scale } = useResponsive();
10111
10692
  const { executeActions } = useAction();
10112
10693
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10113
- const style = buildChoiceRenderStyle(props, isSelected, theme, scale);
10694
+ const style = buildJDHChoiceRenderStyle(props, isSelected, theme, scale);
10114
10695
  const actions = [
10115
10696
  {
10116
10697
  type: !multi ? "updateLocalData" : "toggleLocalDataToSet",
@@ -10127,7 +10708,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10127
10708
  };
10128
10709
  return /* @__PURE__ */ jsxRuntime.jsxs(
10129
10710
  "div",
10130
- __spreadProps$7(__spreadValues$8({
10711
+ __spreadProps$8(__spreadValues$9({
10131
10712
  className: "choice-wrap",
10132
10713
  style: style.wrapStyle,
10133
10714
  onClick: handleClick,
@@ -10174,25 +10755,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10174
10755
  })
10175
10756
  );
10176
10757
  };
10177
- var __defProp$a = Object.defineProperty;
10178
- var __defProps$6 = Object.defineProperties;
10179
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
10180
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
10181
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
10182
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
10183
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10184
- var __spreadValues$7 = (a, b2) => {
10758
+ var __defProp$b = Object.defineProperty;
10759
+ var __defProps$7 = Object.defineProperties;
10760
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
10761
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
10762
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
10763
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
10764
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10765
+ var __spreadValues$8 = (a, b2) => {
10185
10766
  for (var prop in b2 || (b2 = {}))
10186
- if (__hasOwnProp$7.call(b2, prop))
10187
- __defNormalProp$a(a, prop, b2[prop]);
10188
- if (__getOwnPropSymbols$7)
10189
- for (var prop of __getOwnPropSymbols$7(b2)) {
10190
- if (__propIsEnum$7.call(b2, prop))
10191
- __defNormalProp$a(a, prop, b2[prop]);
10767
+ if (__hasOwnProp$8.call(b2, prop))
10768
+ __defNormalProp$b(a, prop, b2[prop]);
10769
+ if (__getOwnPropSymbols$8)
10770
+ for (var prop of __getOwnPropSymbols$8(b2)) {
10771
+ if (__propIsEnum$8.call(b2, prop))
10772
+ __defNormalProp$b(a, prop, b2[prop]);
10192
10773
  }
10193
10774
  return a;
10194
10775
  };
10195
- var __spreadProps$6 = (a, b2) => __defProps$6(a, __getOwnPropDescs$6(b2));
10776
+ var __spreadProps$7 = (a, b2) => __defProps$7(a, __getOwnPropDescs$7(b2));
10196
10777
  const ButtonJDHRender = ({ props }) => {
10197
10778
  const {
10198
10779
  text,
@@ -10206,7 +10787,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10206
10787
  const { scale } = useResponsive();
10207
10788
  const { executeActions } = useAction();
10208
10789
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10209
- const style = buildButtonRenderStyle(props, theme, scale);
10790
+ const style = buildJDHButtonRenderStyle(props, theme, scale);
10210
10791
  const handleClick = (e) => {
10211
10792
  if (!disabled) {
10212
10793
  executeActions(actions);
@@ -10215,7 +10796,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10215
10796
  };
10216
10797
  return /* @__PURE__ */ jsxRuntime.jsxs(
10217
10798
  "div",
10218
- __spreadProps$6(__spreadValues$7({
10799
+ __spreadProps$7(__spreadValues$8({
10219
10800
  className: "button-wrap",
10220
10801
  style: style.wrapStyle,
10221
10802
  onClick: handleClick,
@@ -10237,25 +10818,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10237
10818
  })
10238
10819
  );
10239
10820
  };
10240
- var __defProp$9 = Object.defineProperty;
10241
- var __defProps$5 = Object.defineProperties;
10242
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
10243
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
10244
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
10245
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
10246
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10247
- var __spreadValues$6 = (a, b2) => {
10821
+ var __defProp$a = Object.defineProperty;
10822
+ var __defProps$6 = Object.defineProperties;
10823
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
10824
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
10825
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
10826
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
10827
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10828
+ var __spreadValues$7 = (a, b2) => {
10248
10829
  for (var prop in b2 || (b2 = {}))
10249
- if (__hasOwnProp$6.call(b2, prop))
10250
- __defNormalProp$9(a, prop, b2[prop]);
10251
- if (__getOwnPropSymbols$6)
10252
- for (var prop of __getOwnPropSymbols$6(b2)) {
10253
- if (__propIsEnum$6.call(b2, prop))
10254
- __defNormalProp$9(a, prop, b2[prop]);
10830
+ if (__hasOwnProp$7.call(b2, prop))
10831
+ __defNormalProp$a(a, prop, b2[prop]);
10832
+ if (__getOwnPropSymbols$7)
10833
+ for (var prop of __getOwnPropSymbols$7(b2)) {
10834
+ if (__propIsEnum$7.call(b2, prop))
10835
+ __defNormalProp$a(a, prop, b2[prop]);
10255
10836
  }
10256
10837
  return a;
10257
10838
  };
10258
- var __spreadProps$5 = (a, b2) => __defProps$5(a, __getOwnPropDescs$5(b2));
10839
+ var __spreadProps$6 = (a, b2) => __defProps$6(a, __getOwnPropDescs$6(b2));
10259
10840
  const InputJDHRender = ({ props, value = "", onChange }) => {
10260
10841
  const {
10261
10842
  placeholder,
@@ -10270,7 +10851,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10270
10851
  const { scale } = useResponsive();
10271
10852
  const { executeActions } = useAction();
10272
10853
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10273
- const style = buildInputRenderStyle(props, theme, scale);
10854
+ const style = buildJDHInputRenderStyle(props, theme, scale);
10274
10855
  const [targetValue, setTargetValue] = React.useState(value);
10275
10856
  const [passwordShow, setPasswordShow] = React.useState(false);
10276
10857
  const handleClick = React.useCallback((e) => {
@@ -10299,7 +10880,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10299
10880
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%" }, children: [
10300
10881
  /* @__PURE__ */ jsxRuntime.jsxs(
10301
10882
  "div",
10302
- __spreadProps$5(__spreadValues$6({
10883
+ __spreadProps$6(__spreadValues$7({
10303
10884
  className: "aui-input-wrap",
10304
10885
  style: style.wrapStyle,
10305
10886
  onClick: handleClick,
@@ -10425,25 +11006,25 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10425
11006
  (error && !!errorMessage || !!subDescription) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "input-msg", style: style.msgStyle, children: error && !!errorMessage ? errorMessage : subDescription }, "msg")
10426
11007
  ] });
10427
11008
  };
10428
- var __defProp$8 = Object.defineProperty;
10429
- var __defProps$4 = Object.defineProperties;
10430
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
10431
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
10432
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
10433
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
10434
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10435
- var __spreadValues$5 = (a, b2) => {
11009
+ var __defProp$9 = Object.defineProperty;
11010
+ var __defProps$5 = Object.defineProperties;
11011
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
11012
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
11013
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
11014
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
11015
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11016
+ var __spreadValues$6 = (a, b2) => {
10436
11017
  for (var prop in b2 || (b2 = {}))
10437
- if (__hasOwnProp$5.call(b2, prop))
10438
- __defNormalProp$8(a, prop, b2[prop]);
10439
- if (__getOwnPropSymbols$5)
10440
- for (var prop of __getOwnPropSymbols$5(b2)) {
10441
- if (__propIsEnum$5.call(b2, prop))
10442
- __defNormalProp$8(a, prop, b2[prop]);
11018
+ if (__hasOwnProp$6.call(b2, prop))
11019
+ __defNormalProp$9(a, prop, b2[prop]);
11020
+ if (__getOwnPropSymbols$6)
11021
+ for (var prop of __getOwnPropSymbols$6(b2)) {
11022
+ if (__propIsEnum$6.call(b2, prop))
11023
+ __defNormalProp$9(a, prop, b2[prop]);
10443
11024
  }
10444
11025
  return a;
10445
11026
  };
10446
- var __spreadProps$4 = (a, b2) => __defProps$4(a, __getOwnPropDescs$4(b2));
11027
+ var __spreadProps$5 = (a, b2) => __defProps$5(a, __getOwnPropDescs$5(b2));
10447
11028
  const TextareaJDHRender = ({ props, value = "", onChange }) => {
10448
11029
  const {
10449
11030
  placeholder,
@@ -10458,7 +11039,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10458
11039
  const { scale } = useResponsive();
10459
11040
  const { executeActions } = useAction();
10460
11041
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10461
- const style = buildTextareaRenderStyle(props, value, theme, scale);
11042
+ const style = buildJDHTextareaRenderStyle(props, value, theme, scale);
10462
11043
  const [targetValue, setTargetValue] = React.useState(value);
10463
11044
  const [passwordShow, setPasswordShow] = React.useState(false);
10464
11045
  const handleClick = React.useCallback((e) => {
@@ -10476,7 +11057,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10476
11057
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
10477
11058
  /* @__PURE__ */ jsxRuntime.jsxs(
10478
11059
  "div",
10479
- __spreadProps$4(__spreadValues$5({
11060
+ __spreadProps$5(__spreadValues$6({
10480
11061
  className: "aui-textarea-wrap",
10481
11062
  style: style.wrapStyle,
10482
11063
  onClick: handleClick,
@@ -10515,6 +11096,166 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10515
11096
  (error && !!errorMessage || !!subDescription) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "textarea-msg", style: style.msgStyle, children: error && !!errorMessage ? errorMessage : subDescription }, "msg")
10516
11097
  ] });
10517
11098
  };
11099
+ var __defProp$8 = Object.defineProperty;
11100
+ var __defProps$4 = Object.defineProperties;
11101
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
11102
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
11103
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
11104
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
11105
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11106
+ var __spreadValues$5 = (a, b2) => {
11107
+ for (var prop in b2 || (b2 = {}))
11108
+ if (__hasOwnProp$5.call(b2, prop))
11109
+ __defNormalProp$8(a, prop, b2[prop]);
11110
+ if (__getOwnPropSymbols$5)
11111
+ for (var prop of __getOwnPropSymbols$5(b2)) {
11112
+ if (__propIsEnum$5.call(b2, prop))
11113
+ __defNormalProp$8(a, prop, b2[prop]);
11114
+ }
11115
+ return a;
11116
+ };
11117
+ var __spreadProps$4 = (a, b2) => __defProps$4(a, __getOwnPropDescs$4(b2));
11118
+ const buildColorStyle = (variant, colorType, disabled, hover, theme) => {
11119
+ const { basicColor, color: color2, disabledColor, hoverColor } = theme.components.button;
11120
+ if (disabled) {
11121
+ return {
11122
+ fontColor: disabledColor.color,
11123
+ backgroundColor: variant === "text" || variant === "link" ? disabledColor.textLinkBackground : variant === "filled" ? disabledColor.fillBackground : disabledColor.background,
11124
+ borderColor: variant === "text" || variant === "link" ? disabledColor.textLinkBackground : disabledColor.borderColor
11125
+ };
11126
+ }
11127
+ const colorTheme = __spreadValues$5(__spreadValues$5({}, basicColor), color2[colorType]);
11128
+ const fontColor = variant === "solid" ? colorTheme.color : colorTheme.background;
11129
+ const backgroundColor = variant === "solid" ? colorTheme.background : variant === "filled" ? colorTheme.fillBackground : colorTheme.color;
11130
+ const borderColor = variant === "dashed" || variant === "outlined" ? colorTheme.borderColor : variant === "solid" ? colorTheme.background : colorTheme.color;
11131
+ const result = { fontColor, backgroundColor, borderColor };
11132
+ if (hover) {
11133
+ const hoverTheme = hoverColor[colorType];
11134
+ if (variant === "solid") {
11135
+ result.backgroundColor = hoverTheme.solidBackground;
11136
+ } else if (variant === "outlined" || variant === "dashed") {
11137
+ result.fontColor = hoverTheme.outlineDashedTextColor;
11138
+ result.borderColor = hoverTheme.outlineDashedTextColor;
11139
+ } else if (variant === "link") {
11140
+ result.fontColor = hoverTheme.outlineDashedTextColor;
11141
+ } else if (variant === "text") {
11142
+ result.backgroundColor = hoverTheme.textBackground;
11143
+ } else if (variant === "filled") {
11144
+ result.backgroundColor = hoverTheme.fillBackground;
11145
+ }
11146
+ }
11147
+ return result;
11148
+ };
11149
+ const ButtonRender = ({ props }) => {
11150
+ const {
11151
+ text,
11152
+ iconSrc,
11153
+ loading = false,
11154
+ color: color2 = "default",
11155
+ size = "middle",
11156
+ actions,
11157
+ variant = "solid",
11158
+ disabled = false,
11159
+ block = false
11160
+ } = props;
11161
+ const theme = useTheme();
11162
+ const [onHover, setOnHover] = React.useState(false);
11163
+ const buttonTheme = theme.components.button;
11164
+ const { fontColor, backgroundColor, borderColor } = buildColorStyle(
11165
+ variant,
11166
+ color2,
11167
+ disabled,
11168
+ onHover,
11169
+ theme
11170
+ );
11171
+ const sizeTheme = __spreadValues$5(__spreadValues$5({}, buttonTheme.basicSize), buttonTheme.size[size]);
11172
+ const imageSrc = loading ? buttonTheme.loadingIcon : iconSrc;
11173
+ const { scale } = useResponsive();
11174
+ const { executeActions } = useAction();
11175
+ const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
11176
+ const wrapStyle = __spreadProps$4(__spreadValues$5(__spreadValues$5(__spreadValues$5({}, textStyleFromTheme(
11177
+ theme,
11178
+ {
11179
+ fontSize: props.fontSize ? props.fontSize : sizeTheme.fontSize,
11180
+ lineHeight: props.lineHeight ? props.lineHeight : sizeTheme.lineHeight,
11181
+ fontWeight: props.fontWeight,
11182
+ color: fontColor
11183
+ },
11184
+ scale
11185
+ )), borderRadiusToStyle(sizeTheme.borderRadius, theme, scale)), marginAndPaddingToStyle(__spreadValues$5(__spreadValues$5({}, sizeTheme), props), theme, scale)), {
11186
+ background: resolveColor(backgroundColor, theme),
11187
+ borderWidth: 1,
11188
+ borderStyle: variant === "dashed" ? "dashed" : "solid",
11189
+ borderColor: resolveColor(borderColor, theme),
11190
+ opacity: loading ? buttonTheme.loading.opacity : 1,
11191
+ cursor: disabled ? "not-allowed" : loading ? void 0 : "pointer",
11192
+ flex: block ? 1 : "initial",
11193
+ textAlign: props.textAlign || "center"
11194
+ });
11195
+ const iconSize = wrapStyle.fontSize;
11196
+ const iconStyle = __spreadValues$5(__spreadValues$5({
11197
+ width: iconSize,
11198
+ height: iconSize
11199
+ }, borderRadiusToStyle(buttonTheme.icon.borderRadius, theme, scale)), marginLogogramToStyle(buttonTheme.icon.margin, theme, scale));
11200
+ const handleClick = (e) => {
11201
+ if (!disabled || !loading) {
11202
+ executeActions(actions);
11203
+ }
11204
+ onClick(e);
11205
+ };
11206
+ const handleMouseEnter = React.useCallback(
11207
+ (e) => {
11208
+ setOnHover(true);
11209
+ onMouseEnter(e);
11210
+ },
11211
+ [onMouseEnter]
11212
+ );
11213
+ const handleMouseLeave = React.useCallback(
11214
+ (e) => {
11215
+ setOnHover(false);
11216
+ onMouseLeave(e);
11217
+ },
11218
+ [onMouseLeave]
11219
+ );
11220
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11221
+ "div",
11222
+ {
11223
+ className: "button-wrap",
11224
+ style: wrapStyle,
11225
+ onClick: handleClick,
11226
+ ref: ref2,
11227
+ onMouseEnter: handleMouseEnter,
11228
+ onMouseLeave: handleMouseLeave,
11229
+ children: [
11230
+ imageSrc && /* @__PURE__ */ jsxRuntime.jsx(
11231
+ "img",
11232
+ {
11233
+ style: iconStyle,
11234
+ className: `button-icon ${loading ? "aui-button-loading" : ""}`,
11235
+ src: imageSrc
11236
+ }
11237
+ ),
11238
+ !imageSrc && loading && /* @__PURE__ */ jsxRuntime.jsx(
11239
+ "svg",
11240
+ {
11241
+ viewBox: "0 0 1024 1024",
11242
+ focusable: "false",
11243
+ "data-icon": "loading",
11244
+ style: __spreadProps$4(__spreadValues$5({}, marginLogogramToStyle(buttonTheme.icon.margin, theme, scale)), {
11245
+ width: iconSize,
11246
+ height: iconSize,
11247
+ fill: wrapStyle.color
11248
+ }),
11249
+ className: "aui-button-loading",
11250
+ "aria-hidden": "true",
11251
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" })
11252
+ }
11253
+ ),
11254
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "button-text", children: text })
11255
+ ]
11256
+ }
11257
+ );
11258
+ };
10518
11259
  var __defProp$7 = Object.defineProperty;
10519
11260
  var __defProps$3 = Object.defineProperties;
10520
11261
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
@@ -10568,7 +11309,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10568
11309
  return /* @__PURE__ */ jsxRuntime.jsx(ImageRender, __spreadValues$4({}, props));
10569
11310
  case "text-list":
10570
11311
  return /* @__PURE__ */ jsxRuntime.jsx(TextListRender, __spreadProps$3(__spreadValues$4({}, props), { children }));
10571
- case "input": {
11312
+ case "jdh-input": {
10572
11313
  const p = props;
10573
11314
  const value = p.updateKey ? values == null ? void 0 : values[p.updateKey] : "";
10574
11315
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -10580,7 +11321,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10580
11321
  }
10581
11322
  );
10582
11323
  }
10583
- case "textarea": {
11324
+ case "jdh-textarea": {
10584
11325
  const p = props;
10585
11326
  const value = p.updateKey ? values == null ? void 0 : values[p.updateKey] : "";
10586
11327
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -10592,6 +11333,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10592
11333
  }
10593
11334
  );
10594
11335
  }
11336
+ case "button": {
11337
+ return /* @__PURE__ */ jsxRuntime.jsx(ButtonRender, { props });
11338
+ }
10595
11339
  case "divider": {
10596
11340
  return /* @__PURE__ */ jsxRuntime.jsx(DividerRender, __spreadValues$4({}, props));
10597
11341
  }
@@ -10601,14 +11345,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10601
11345
  case "custom-render": {
10602
11346
  return /* @__PURE__ */ jsxRuntime.jsx(CustomRenderFromIM, __spreadProps$3(__spreadValues$4({}, props), { originProps }));
10603
11347
  }
10604
- case "choice": {
11348
+ case "jdh-choice": {
10605
11349
  return /* @__PURE__ */ jsxRuntime.jsx(ChoiceJDHRender, { props, values });
10606
11350
  }
10607
- case "button": {
11351
+ case "jdh-button": {
10608
11352
  return /* @__PURE__ */ jsxRuntime.jsx(ButtonJDHRender, { props });
10609
11353
  }
10610
11354
  default:
10611
- return /* @__PURE__ */ jsxRuntime.jsx(UnknownRenderer, { type: String(renderType), prefix: "未知渲染类型" });
11355
+ return /* @__PURE__ */ jsxRuntime.jsx(
11356
+ UnknownRenderer,
11357
+ {
11358
+ type: String(renderType),
11359
+ prefix: `未知渲染类型: ${subType}`
11360
+ }
11361
+ );
10612
11362
  }
10613
11363
  };
10614
11364
  const ComponentRenderer = ({
@@ -10709,10 +11459,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10709
11459
  } = props;
10710
11460
  const autoDetectContainerWidth = typeof containerWidthFromProps === "number" ? false : typeof props.autoDetectContainerWidth === "boolean" ? props.autoDetectContainerWidth : false;
10711
11461
  const {
10712
- template,
10713
- referenceComponentList,
10714
- data,
10715
- initLocalData = {}
11462
+ template: templateFromComponent,
11463
+ referenceComponentList: referenceComponentListFromComponent = [],
11464
+ data: dataFromComponent = {},
11465
+ initLocalData = {},
11466
+ devicePixelRatio: componentDevicePixelRatio
10716
11467
  } = component;
10717
11468
  const [containerWidth, setContainerWidth] = React.useState(
10718
11469
  typeof containerWidthFromProps === "number" ? containerWidthFromProps : null
@@ -10721,10 +11472,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10721
11472
  const { editorMode: editorMode2 } = useForEditor({});
10722
11473
  const responsiveValue = React.useMemo(() => {
10723
11474
  return {
10724
- scale: props.devicePixelRatio ? 1 / props.devicePixelRatio : DEFAULT_SCALE,
11475
+ scale: typeof componentDevicePixelRatio === "number" ? 1 / componentDevicePixelRatio : props.devicePixelRatio ? 1 / props.devicePixelRatio : DEFAULT_SCALE,
10725
11476
  containerWidth
10726
11477
  };
10727
11478
  }, [props.devicePixelRatio, containerWidth]);
11479
+ const [data, setData] = React.useState(dataFromComponent);
11480
+ const [template, setTemplate] = React.useState(templateFromComponent);
11481
+ const [referenceComponentList, setReferenceComponentList] = React.useState(
11482
+ referenceComponentListFromComponent
11483
+ );
10728
11484
  const [values, setValues] = React.useState(initLocalData);
10729
11485
  const [dsValues, setDsValues] = React.useState({});
10730
11486
  const [nodes, setNodes] = React.useState([]);
@@ -10846,6 +11602,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10846
11602
  {
10847
11603
  onAction,
10848
11604
  setValues,
11605
+ setData,
11606
+ setTemplate,
11607
+ setReferenceComponentList,
10849
11608
  values,
10850
11609
  originProps: props,
10851
11610
  externalActions,