@yklyklpackages/message-card 0.7.0 → 0.8.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 (37) hide show
  1. package/dist/components/core/LeafWrapper.d.ts.map +1 -1
  2. package/dist/components/core/templateAdapter.d.ts.map +1 -1
  3. package/dist/components/layout/{CardLayout.d.ts → JDHCardLayout.d.ts} +3 -3
  4. package/dist/components/layout/JDHCardLayout.d.ts.map +1 -0
  5. package/dist/components/message/MessageContainer.d.ts +1 -0
  6. package/dist/components/message/MessageContainer.d.ts.map +1 -1
  7. package/dist/components/render/Button/index.d.ts +13 -0
  8. package/dist/components/render/Button/index.d.ts.map +1 -0
  9. package/dist/components/render/ButtonJDH.d.ts +2 -2
  10. package/dist/components/render/ButtonJDH.d.ts.map +1 -1
  11. package/dist/components/render/ChoiceJDH.d.ts +2 -2
  12. package/dist/components/render/ChoiceJDH.d.ts.map +1 -1
  13. package/dist/components/render/Image.d.ts +2 -2
  14. package/dist/components/render/Image.d.ts.map +1 -1
  15. package/dist/components/render/InputJDH.d.ts +2 -2
  16. package/dist/components/render/InputJDH.d.ts.map +1 -1
  17. package/dist/components/render/Markdown.d.ts +2 -2
  18. package/dist/components/render/Markdown.d.ts.map +1 -1
  19. package/dist/components/render/Text.d.ts +2 -2
  20. package/dist/components/render/Text.d.ts.map +1 -1
  21. package/dist/components/render/TextareaJDH.d.ts +2 -2
  22. package/dist/components/render/TextareaJDH.d.ts.map +1 -1
  23. package/dist/components/theme/ScreenTheme375.d.ts.map +1 -1
  24. package/dist/components/theme/defaultTheme.d.ts.map +1 -1
  25. package/dist/components/types/component.d.ts +0 -4
  26. package/dist/components/types/component.d.ts.map +1 -1
  27. package/dist/components/utils/styleHelpers.d.ts +17 -18
  28. package/dist/components/utils/styleHelpers.d.ts.map +1 -1
  29. package/dist/index.cjs +1293 -617
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.mjs +1293 -617
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/index.umd.js +1293 -617
  34. package/dist/index.umd.js.map +1 -1
  35. package/dist/style.css +177 -206
  36. package/package.json +4 -3
  37. package/dist/components/layout/CardLayout.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -4,25 +4,25 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
4
4
  var _a;
5
5
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
6
6
  import React, { useState, useRef, useCallback, useEffect, createContext, useMemo, useContext, Fragment as Fragment$1, forwardRef } from "react";
7
- var __defProp$z = Object.defineProperty;
8
- var __defProps$t = Object.defineProperties;
9
- var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
10
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
11
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
12
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
13
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
- var __spreadValues$w = (a, b3) => {
7
+ var __defProp$A = Object.defineProperty;
8
+ var __defProps$u = Object.defineProperties;
9
+ var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
10
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
11
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues$x = (a, b3) => {
15
15
  for (var prop in b3 || (b3 = {}))
16
- if (__hasOwnProp$w.call(b3, prop))
17
- __defNormalProp$z(a, prop, b3[prop]);
18
- if (__getOwnPropSymbols$w)
19
- for (var prop of __getOwnPropSymbols$w(b3)) {
20
- if (__propIsEnum$w.call(b3, prop))
21
- __defNormalProp$z(a, prop, b3[prop]);
16
+ if (__hasOwnProp$x.call(b3, prop))
17
+ __defNormalProp$A(a, prop, b3[prop]);
18
+ if (__getOwnPropSymbols$x)
19
+ for (var prop of __getOwnPropSymbols$x(b3)) {
20
+ if (__propIsEnum$x.call(b3, prop))
21
+ __defNormalProp$A(a, prop, b3[prop]);
22
22
  }
23
23
  return a;
24
24
  };
25
- var __spreadProps$t = (a, b3) => __defProps$t(a, __getOwnPropDescs$t(b3));
25
+ var __spreadProps$u = (a, b3) => __defProps$u(a, __getOwnPropDescs$u(b3));
26
26
  const postMessage$1 = (name, params) => {
27
27
  var _a2;
28
28
  (_a2 = window == null ? void 0 : window.parent) == null ? void 0 : _a2.postMessage({ from: "aui-preview", name, params }, "*");
@@ -67,8 +67,8 @@ const WrapComponent = (props) => {
67
67
  className: "container-wrap-hoc",
68
68
  ref: containerRef,
69
69
  onClick,
70
- children: renderFunction(__spreadProps$t(__spreadValues$w({}, runtimeProps), {
71
- component: __spreadValues$w(__spreadValues$w({}, runtimeProps.component), componentFromEditor || {})
70
+ children: renderFunction(__spreadProps$u(__spreadValues$x({}, runtimeProps), {
71
+ component: __spreadValues$x(__spreadValues$x({}, runtimeProps.component), componentFromEditor || {})
72
72
  }))
73
73
  },
74
74
  updateUniqueId
@@ -92,19 +92,19 @@ const containerComponentEditorModeHOC = (renderFunction) => {
92
92
  );
93
93
  } : renderFunction;
94
94
  };
95
- var __defProp$y = Object.defineProperty;
96
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
97
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
98
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
99
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
100
- var __spreadValues$v = (a, b3) => {
95
+ var __defProp$z = Object.defineProperty;
96
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
97
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
98
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
99
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
100
+ var __spreadValues$w = (a, b3) => {
101
101
  for (var prop in b3 || (b3 = {}))
102
- if (__hasOwnProp$v.call(b3, prop))
103
- __defNormalProp$y(a, prop, b3[prop]);
104
- if (__getOwnPropSymbols$v)
105
- for (var prop of __getOwnPropSymbols$v(b3)) {
106
- if (__propIsEnum$v.call(b3, prop))
107
- __defNormalProp$y(a, prop, b3[prop]);
102
+ if (__hasOwnProp$w.call(b3, prop))
103
+ __defNormalProp$z(a, prop, b3[prop]);
104
+ if (__getOwnPropSymbols$w)
105
+ for (var prop of __getOwnPropSymbols$w(b3)) {
106
+ if (__propIsEnum$w.call(b3, prop))
107
+ __defNormalProp$z(a, prop, b3[prop]);
108
108
  }
109
109
  return a;
110
110
  };
@@ -130,7 +130,7 @@ const getImageUrl = ({
130
130
  if (isWebp) {
131
131
  reWebp = ".webp";
132
132
  }
133
- const { width, height } = __spreadValues$v({}, size);
133
+ const { width, height } = __spreadValues$w({}, size);
134
134
  let reSize = "";
135
135
  if (width && height) {
136
136
  reSize = `s${width}x${height}_`;
@@ -210,7 +210,183 @@ const defaultTheme$2 = {
210
210
  Radius_JDH_xs: 6
211
211
  },
212
212
  components: {
213
- card: {
213
+ text: {
214
+ basic: {
215
+ fontSize: "FontSizes_JDH_Text",
216
+ lineHeight: "FontSizes_JDH_Text",
217
+ fontWeight: "FontWeight_JDH_Normal",
218
+ color: "Color_JDH_Gray_Text",
219
+ background: "#FFF",
220
+ margin: 0
221
+ },
222
+ variant: {
223
+ h1: {
224
+ fontSize: "FontSizes_JDH_Headline1",
225
+ lineHeight: "FontSizes_JDH_Headline1",
226
+ color: "Color_JDH_Gray_Headline",
227
+ fontWeight: "FontWeight_JDH_Medium"
228
+ },
229
+ h2: {
230
+ fontSize: "FontSizes_JDH_Headline2",
231
+ lineHeight: "FontSizes_JDH_Headline2",
232
+ color: "Color_JDH_Gray_Headline",
233
+ fontWeight: "FontWeight_JDH_Medium"
234
+ },
235
+ h3: {
236
+ fontSize: "FontSizes_JDH_Title",
237
+ lineHeight: "FontSizes_JDH_Title",
238
+ color: "Color_JDH_Gray_Headline",
239
+ fontWeight: "FontWeight_JDH_Medium"
240
+ },
241
+ h4: {
242
+ fontSize: "FontSizes_JDH_Title",
243
+ lineHeight: "FontSizes_JDH_Title",
244
+ color: "Color_JDH_Gray_Headline",
245
+ fontWeight: "FontWeight_JDH_Medium"
246
+ },
247
+ h5: {
248
+ fontSize: "FontSizes_JDH_Title",
249
+ lineHeight: "FontSizes_JDH_Title",
250
+ color: "Color_JDH_Gray_Headline",
251
+ fontWeight: "FontWeight_JDH_Medium"
252
+ },
253
+ body: {},
254
+ caption: {
255
+ fontSize: "FontSizes_JDH_AccentText",
256
+ lineHeight: "FontSizes_JDH_AccentText",
257
+ color: "Color_JDH_Gray_AccentText"
258
+ },
259
+ tag: {
260
+ fontSize: "FontSizes_JDH_TagText",
261
+ lineHeight: "FontSizes_JDH_TagText",
262
+ color: "Color_JDH_Gray_AccentText"
263
+ }
264
+ }
265
+ },
266
+ button: {
267
+ basicColor: {
268
+ color: "#FFF",
269
+ background: "#000",
270
+ borderColor: "rgb(217, 217, 217)",
271
+ fillBackground: "rgba(0, 0, 0, 0.04)"
272
+ },
273
+ color: {
274
+ default: {},
275
+ primary: {
276
+ color: "#FFF",
277
+ background: "rgb(22, 119, 255)",
278
+ borderColor: "rgb(22, 119, 255)",
279
+ fillBackground: "rgb(230, 244, 255)"
280
+ },
281
+ danger: {
282
+ color: "#FFF",
283
+ background: "rgb(255, 77, 79)",
284
+ borderColor: "rgb(255, 77, 79)",
285
+ fillBackground: "rgb(255, 242, 240)"
286
+ },
287
+ green: {
288
+ color: "#fff",
289
+ background: "rgb(82, 196, 26)",
290
+ borderColor: "rgb(82, 196, 26)",
291
+ fillBackground: "rgb(246, 255, 237)"
292
+ },
293
+ red: {
294
+ background: "rgb(245, 34, 45)",
295
+ borderColor: "rgb(245, 34, 45)",
296
+ fillBackground: "rgb(255, 241, 240)"
297
+ },
298
+ yellow: {
299
+ background: "rgb(250, 219, 20)",
300
+ borderColor: "rgb(250, 219, 20)",
301
+ fillBackground: "rgb(254, 255, 230)"
302
+ },
303
+ blue: {
304
+ color: "#FFF",
305
+ background: "rgb(22, 119, 255)",
306
+ borderColor: "rgb(22, 119, 255)",
307
+ fillBackground: "rgb(230, 244, 255)"
308
+ }
309
+ },
310
+ disabledColor: {
311
+ color: "rgba(0, 0, 0, 0.25)",
312
+ background: "rgba(0, 0, 0, 0.04)",
313
+ borderColor: "rgb(217, 217, 217)",
314
+ fillBackground: "rgba(0, 0, 0, 0.04)",
315
+ textLinkBackground: "#fff"
316
+ },
317
+ hoverColor: {
318
+ default: {
319
+ solidBackground: "rgba(0,0,0,0.75)",
320
+ outlineDashedTextColor: "#4096ff",
321
+ fillBackground: "rgba(0,0,0,0.06)",
322
+ textBackground: "rgba(0,0,0,0.04)"
323
+ },
324
+ primary: {
325
+ solidBackground: "#4096ff",
326
+ outlineDashedTextColor: "#4096ff",
327
+ fillBackground: "#bae0ff",
328
+ textBackground: "#e6f4ff"
329
+ },
330
+ danger: {
331
+ solidBackground: "#ff7875",
332
+ outlineDashedTextColor: "#ff7875",
333
+ fillBackground: "#ffdfdc",
334
+ textBackground: "#fff2f0"
335
+ },
336
+ green: {
337
+ solidBackground: "#73d13d",
338
+ outlineDashedTextColor: "#73d13d",
339
+ fillBackground: "#d9f7be",
340
+ textBackground: "#f6ffed"
341
+ },
342
+ red: {
343
+ solidBackground: "#ff4d4f",
344
+ outlineDashedTextColor: "#ff4d4f",
345
+ fillBackground: "#ffccc7",
346
+ textBackground: "#fff1f0"
347
+ },
348
+ blue: {
349
+ solidBackground: "#4096ff",
350
+ outlineDashedTextColor: "#4096ff",
351
+ fillBackground: "#bae0ff",
352
+ textBackground: "#e6f4ff"
353
+ },
354
+ yellow: {
355
+ solidBackground: "#ffec3d",
356
+ outlineDashedTextColor: "#ffec3d",
357
+ fillBackground: "#ffffb8",
358
+ textBackground: "#feffe6"
359
+ }
360
+ },
361
+ basicSize: {
362
+ fontSize: 28,
363
+ lineHeight: 44,
364
+ padding: [8, 30],
365
+ borderRadius: 12,
366
+ minWidth: "auto"
367
+ },
368
+ size: {
369
+ small: {
370
+ padding: [0, 14]
371
+ },
372
+ middle: {},
373
+ large: {
374
+ fontSize: 32,
375
+ lineHeight: 50,
376
+ borderRadius: 16,
377
+ padding: [13, 30]
378
+ }
379
+ },
380
+ icon: {
381
+ borderRadius: 4,
382
+ margin: [0, 16, 0, 0]
383
+ },
384
+ loading: {
385
+ opacity: 0.65
386
+ },
387
+ loadingIcon: ""
388
+ },
389
+ jdhCard: {
214
390
  wrap: {
215
391
  background: "Color_JDH_Gray_Background",
216
392
  padding: "Spacing_JDH_xxl"
@@ -235,7 +411,7 @@ const defaultTheme$2 = {
235
411
  borderRadius: "Radius_JDH_xl"
236
412
  }
237
413
  },
238
- choice: {
414
+ jdhChoice: {
239
415
  wrap: {
240
416
  padding: [13, 32],
241
417
  layoutSmallPadding: [11, 20],
@@ -287,7 +463,7 @@ const defaultTheme$2 = {
287
463
  },
288
464
  disabledOpacity: 0.4
289
465
  },
290
- button: {
466
+ jdhButton: {
291
467
  colorStyle: {
292
468
  solid: {
293
469
  primary: {
@@ -375,7 +551,7 @@ const defaultTheme$2 = {
375
551
  },
376
552
  disabledOpacity: 0.4
377
553
  },
378
- input: {
554
+ jdhInput: {
379
555
  defaultState: {
380
556
  background: "Color_JDH_Gray_Background",
381
557
  fontSize: "FontSizes_JDH_Text",
@@ -421,7 +597,7 @@ const defaultTheme$2 = {
421
597
  color: "Color_JDH_Gray_AccentText"
422
598
  }
423
599
  },
424
- textarea: {
600
+ jdhTextarea: {
425
601
  defaultState: {
426
602
  background: "Color_JDH_Gray_Background",
427
603
  fontSize: "FontSizes_JDH_Text",
@@ -476,12 +652,12 @@ const defaultTheme$1 = {
476
652
  FontSizes_JDH_TagText: 10
477
653
  },
478
654
  lineHeight: {
479
- FontSizes_JDH_Headline1: 70,
480
- FontSizes_JDH_Headline2: 52,
481
- FontSizes_JDH_Title: 46,
482
- FontSizes_JDH_Text: 42,
483
- FontSizes_JDH_AccentText: 36,
484
- FontSizes_JDH_TagText: 30
655
+ FontSizes_JDH_Headline1: 35,
656
+ FontSizes_JDH_Headline2: 26,
657
+ FontSizes_JDH_Title: 23,
658
+ FontSizes_JDH_Text: 21,
659
+ FontSizes_JDH_AccentText: 18,
660
+ FontSizes_JDH_TagText: 15
485
661
  },
486
662
  color: {
487
663
  Color_JDH_Primary: "#17CB8E",
@@ -527,7 +703,183 @@ const defaultTheme$1 = {
527
703
  Radius_JDH_xs: 3
528
704
  },
529
705
  components: {
530
- card: {
706
+ text: {
707
+ basic: {
708
+ fontSize: "FontSizes_JDH_Text",
709
+ lineHeight: "FontSizes_JDH_Text",
710
+ fontWeight: "FontWeight_JDH_Normal",
711
+ color: "Color_JDH_Gray_Text",
712
+ background: "#FFF",
713
+ margin: 0
714
+ },
715
+ variant: {
716
+ h1: {
717
+ fontSize: "FontSizes_JDH_Headline1",
718
+ lineHeight: "FontSizes_JDH_Headline1",
719
+ color: "Color_JDH_Gray_Headline",
720
+ fontWeight: "FontWeight_JDH_Medium"
721
+ },
722
+ h2: {
723
+ fontSize: "FontSizes_JDH_Headline2",
724
+ lineHeight: "FontSizes_JDH_Headline2",
725
+ color: "Color_JDH_Gray_Headline",
726
+ fontWeight: "FontWeight_JDH_Medium"
727
+ },
728
+ h3: {
729
+ fontSize: "FontSizes_JDH_Title",
730
+ lineHeight: "FontSizes_JDH_Title",
731
+ color: "Color_JDH_Gray_Headline",
732
+ fontWeight: "FontWeight_JDH_Medium"
733
+ },
734
+ h4: {
735
+ fontSize: "FontSizes_JDH_Title",
736
+ lineHeight: "FontSizes_JDH_Title",
737
+ color: "Color_JDH_Gray_Headline",
738
+ fontWeight: "FontWeight_JDH_Medium"
739
+ },
740
+ h5: {
741
+ fontSize: "FontSizes_JDH_Title",
742
+ lineHeight: "FontSizes_JDH_Title",
743
+ color: "Color_JDH_Gray_Headline",
744
+ fontWeight: "FontWeight_JDH_Medium"
745
+ },
746
+ body: {},
747
+ caption: {
748
+ fontSize: "FontSizes_JDH_AccentText",
749
+ lineHeight: "FontSizes_JDH_AccentText",
750
+ color: "Color_JDH_Gray_AccentText"
751
+ },
752
+ tag: {
753
+ fontSize: "FontSizes_JDH_TagText",
754
+ lineHeight: "FontSizes_JDH_TagText",
755
+ color: "Color_JDH_Gray_AccentText"
756
+ }
757
+ }
758
+ },
759
+ button: {
760
+ basicColor: {
761
+ color: "#FFF",
762
+ background: "#000",
763
+ borderColor: "rgb(217, 217, 217)",
764
+ fillBackground: "rgba(0, 0, 0, 0.04)"
765
+ },
766
+ color: {
767
+ default: {},
768
+ primary: {
769
+ color: "#FFF",
770
+ background: "rgb(22, 119, 255)",
771
+ borderColor: "rgb(22, 119, 255)",
772
+ fillBackground: "rgb(230, 244, 255)"
773
+ },
774
+ danger: {
775
+ color: "#FFF",
776
+ background: "rgb(255, 77, 79)",
777
+ borderColor: "rgb(255, 77, 79)",
778
+ fillBackground: "rgb(255, 242, 240)"
779
+ },
780
+ green: {
781
+ color: "#fff",
782
+ background: "rgb(82, 196, 26)",
783
+ borderColor: "rgb(82, 196, 26)",
784
+ fillBackground: "rgb(246, 255, 237)"
785
+ },
786
+ red: {
787
+ background: "rgb(245, 34, 45)",
788
+ borderColor: "rgb(245, 34, 45)",
789
+ fillBackground: "rgb(255, 241, 240)"
790
+ },
791
+ yellow: {
792
+ background: "rgb(250, 219, 20)",
793
+ borderColor: "rgb(250, 219, 20)",
794
+ fillBackground: "rgb(254, 255, 230)"
795
+ },
796
+ blue: {
797
+ color: "#FFF",
798
+ background: "rgb(22, 119, 255)",
799
+ borderColor: "rgb(22, 119, 255)",
800
+ fillBackground: "rgb(230, 244, 255)"
801
+ }
802
+ },
803
+ disabledColor: {
804
+ color: "rgba(0, 0, 0, 0.25)",
805
+ background: "rgba(0, 0, 0, 0.04)",
806
+ borderColor: "rgb(217, 217, 217)",
807
+ fillBackground: "rgba(0, 0, 0, 0.04)",
808
+ textLinkBackground: "#fff"
809
+ },
810
+ hoverColor: {
811
+ default: {
812
+ solidBackground: "rgba(0,0,0,0.75)",
813
+ outlineDashedTextColor: "#4096ff",
814
+ fillBackground: "rgba(0,0,0,0.06)",
815
+ textBackground: "rgba(0,0,0,0.04)"
816
+ },
817
+ primary: {
818
+ solidBackground: "#4096ff",
819
+ outlineDashedTextColor: "#4096ff",
820
+ fillBackground: "#bae0ff",
821
+ textBackground: "#e6f4ff"
822
+ },
823
+ danger: {
824
+ solidBackground: "#ff7875",
825
+ outlineDashedTextColor: "#ff7875",
826
+ fillBackground: "#ffdfdc",
827
+ textBackground: "#fff2f0"
828
+ },
829
+ green: {
830
+ solidBackground: "#73d13d",
831
+ outlineDashedTextColor: "#73d13d",
832
+ fillBackground: "#d9f7be",
833
+ textBackground: "#f6ffed"
834
+ },
835
+ red: {
836
+ solidBackground: "#ff4d4f",
837
+ outlineDashedTextColor: "#ff4d4f",
838
+ fillBackground: "#ffccc7",
839
+ textBackground: "#fff1f0"
840
+ },
841
+ blue: {
842
+ solidBackground: "#4096ff",
843
+ outlineDashedTextColor: "#4096ff",
844
+ fillBackground: "#bae0ff",
845
+ textBackground: "#e6f4ff"
846
+ },
847
+ yellow: {
848
+ solidBackground: "#ffec3d",
849
+ outlineDashedTextColor: "#ffec3d",
850
+ fillBackground: "#ffffb8",
851
+ textBackground: "#feffe6"
852
+ }
853
+ },
854
+ basicSize: {
855
+ fontSize: 14,
856
+ lineHeight: 22,
857
+ padding: [4, 15],
858
+ borderRadius: 6,
859
+ minWidth: "auto"
860
+ },
861
+ size: {
862
+ small: {
863
+ padding: [0, 7]
864
+ },
865
+ middle: {},
866
+ large: {
867
+ fontSize: 16,
868
+ lineHeight: 25,
869
+ borderRadius: 8,
870
+ padding: [6.5, 15]
871
+ }
872
+ },
873
+ icon: {
874
+ borderRadius: 2,
875
+ margin: [0, 8, 0, 0]
876
+ },
877
+ loading: {
878
+ opacity: 0.65
879
+ },
880
+ loadingIcon: ""
881
+ },
882
+ jdhCard: {
531
883
  wrap: {
532
884
  background: "Color_JDH_Gray_Background",
533
885
  padding: "Spacing_JDH_xxl"
@@ -552,7 +904,7 @@ const defaultTheme$1 = {
552
904
  borderRadius: "Radius_JDH_xl"
553
905
  }
554
906
  },
555
- choice: {
907
+ jdhChoice: {
556
908
  wrap: {
557
909
  padding: [6.5, 16],
558
910
  layoutSmallPadding: [5.5, 10],
@@ -604,7 +956,7 @@ const defaultTheme$1 = {
604
956
  },
605
957
  disabledOpacity: 0.4
606
958
  },
607
- button: {
959
+ jdhButton: {
608
960
  colorStyle: {
609
961
  solid: {
610
962
  primary: {
@@ -692,7 +1044,7 @@ const defaultTheme$1 = {
692
1044
  },
693
1045
  disabledOpacity: 0.4
694
1046
  },
695
- input: {
1047
+ jdhInput: {
696
1048
  defaultState: {
697
1049
  background: "Color_JDH_Gray_Background",
698
1050
  fontSize: "FontSizes_JDH_Text",
@@ -738,7 +1090,7 @@ const defaultTheme$1 = {
738
1090
  color: "Color_JDH_Gray_AccentText"
739
1091
  }
740
1092
  },
741
- textarea: {
1093
+ jdhTextarea: {
742
1094
  defaultState: {
743
1095
  background: "Color_JDH_Gray_Background",
744
1096
  fontSize: "FontSizes_JDH_Text",
@@ -784,25 +1136,25 @@ const defaultTheme$1 = {
784
1136
  }
785
1137
  };
786
1138
  const DEFAULT_SCALE = 0.5;
787
- var __defProp$x = Object.defineProperty;
788
- var __defProps$s = Object.defineProperties;
789
- var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
790
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
791
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
792
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
793
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
794
- var __spreadValues$u = (a, b3) => {
1139
+ var __defProp$y = Object.defineProperty;
1140
+ var __defProps$t = Object.defineProperties;
1141
+ var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
1142
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
1143
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
1144
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
1145
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1146
+ var __spreadValues$v = (a, b3) => {
795
1147
  for (var prop in b3 || (b3 = {}))
796
- if (__hasOwnProp$u.call(b3, prop))
797
- __defNormalProp$x(a, prop, b3[prop]);
798
- if (__getOwnPropSymbols$u)
799
- for (var prop of __getOwnPropSymbols$u(b3)) {
800
- if (__propIsEnum$u.call(b3, prop))
801
- __defNormalProp$x(a, prop, b3[prop]);
1148
+ if (__hasOwnProp$v.call(b3, prop))
1149
+ __defNormalProp$y(a, prop, b3[prop]);
1150
+ if (__getOwnPropSymbols$v)
1151
+ for (var prop of __getOwnPropSymbols$v(b3)) {
1152
+ if (__propIsEnum$v.call(b3, prop))
1153
+ __defNormalProp$y(a, prop, b3[prop]);
802
1154
  }
803
1155
  return a;
804
1156
  };
805
- var __spreadProps$s = (a, b3) => __defProps$s(a, __getOwnPropDescs$s(b3));
1157
+ var __spreadProps$t = (a, b3) => __defProps$t(a, __getOwnPropDescs$t(b3));
806
1158
  const ThemeContext = createContext(defaultTheme$2);
807
1159
  const ThemeProvider = ({
808
1160
  scale = DEFAULT_SCALE,
@@ -811,13 +1163,13 @@ const ThemeProvider = ({
811
1163
  }) => {
812
1164
  const merged = useMemo(() => {
813
1165
  const base = scale <= DEFAULT_SCALE ? defaultTheme$2 : defaultTheme$1;
814
- return __spreadProps$s(__spreadValues$u(__spreadValues$u({}, base), theme || {}), {
815
- fontSize: __spreadValues$u(__spreadValues$u({}, base.fontSize), (theme == null ? void 0 : theme.fontSize) || {}),
816
- color: __spreadValues$u(__spreadValues$u({}, base.color), (theme == null ? void 0 : theme.color) || {}),
817
- backgroundColor: __spreadValues$u(__spreadValues$u({}, base.color), (theme == null ? void 0 : theme.color) || {}),
818
- fontWeight: __spreadValues$u(__spreadValues$u({}, base.fontWeight), (theme == null ? void 0 : theme.fontWeight) || {}),
819
- space: __spreadValues$u(__spreadValues$u({}, base.space), (theme == null ? void 0 : theme.space) || {}),
820
- borderRadius: __spreadValues$u(__spreadValues$u({}, base.borderRadius), (theme == null ? void 0 : theme.borderRadius) || {})
1166
+ return __spreadProps$t(__spreadValues$v(__spreadValues$v({}, base), theme || {}), {
1167
+ fontSize: __spreadValues$v(__spreadValues$v({}, base.fontSize), (theme == null ? void 0 : theme.fontSize) || {}),
1168
+ color: __spreadValues$v(__spreadValues$v({}, base.color), (theme == null ? void 0 : theme.color) || {}),
1169
+ backgroundColor: __spreadValues$v(__spreadValues$v({}, base.color), (theme == null ? void 0 : theme.color) || {}),
1170
+ fontWeight: __spreadValues$v(__spreadValues$v({}, base.fontWeight), (theme == null ? void 0 : theme.fontWeight) || {}),
1171
+ space: __spreadValues$v(__spreadValues$v({}, base.space), (theme == null ? void 0 : theme.space) || {}),
1172
+ borderRadius: __spreadValues$v(__spreadValues$v({}, base.borderRadius), (theme == null ? void 0 : theme.borderRadius) || {})
821
1173
  });
822
1174
  }, [theme]);
823
1175
  return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: merged, children });
@@ -2282,7 +2634,9 @@ const compileToTree = (template, data = {}, editorMode2 = false) => {
2282
2634
  "actions",
2283
2635
  "renderActions",
2284
2636
  "border",
2285
- "backgroundImage"
2637
+ "backgroundImage",
2638
+ "backgroundLinearGradient",
2639
+ "boxShadow"
2286
2640
  ]
2287
2641
  },
2288
2642
  runtime: {
@@ -2290,7 +2644,9 @@ const compileToTree = (template, data = {}, editorMode2 = false) => {
2290
2644
  "actions",
2291
2645
  "renderActions",
2292
2646
  "border",
2293
- "backgroundImage"
2647
+ "backgroundImage",
2648
+ "backgroundLinearGradient",
2649
+ "boxShadow"
2294
2650
  ],
2295
2651
  editorMode: editorMode2
2296
2652
  }
@@ -4625,33 +4981,33 @@ var lib = {
4625
4981
  stringify: stringify2
4626
4982
  };
4627
4983
  const qs = /* @__PURE__ */ getDefaultExportFromCjs(lib);
4628
- var __defProp$w = Object.defineProperty;
4629
- var __defProps$r = Object.defineProperties;
4630
- var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
4631
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
4632
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
4633
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
4634
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4635
- var __spreadValues$t = (a, b3) => {
4984
+ var __defProp$x = Object.defineProperty;
4985
+ var __defProps$s = Object.defineProperties;
4986
+ var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
4987
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
4988
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
4989
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
4990
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4991
+ var __spreadValues$u = (a, b3) => {
4636
4992
  for (var prop in b3 || (b3 = {}))
4637
- if (__hasOwnProp$t.call(b3, prop))
4638
- __defNormalProp$w(a, prop, b3[prop]);
4639
- if (__getOwnPropSymbols$t)
4640
- for (var prop of __getOwnPropSymbols$t(b3)) {
4641
- if (__propIsEnum$t.call(b3, prop))
4642
- __defNormalProp$w(a, prop, b3[prop]);
4993
+ if (__hasOwnProp$u.call(b3, prop))
4994
+ __defNormalProp$x(a, prop, b3[prop]);
4995
+ if (__getOwnPropSymbols$u)
4996
+ for (var prop of __getOwnPropSymbols$u(b3)) {
4997
+ if (__propIsEnum$u.call(b3, prop))
4998
+ __defNormalProp$x(a, prop, b3[prop]);
4643
4999
  }
4644
5000
  return a;
4645
5001
  };
4646
- var __spreadProps$r = (a, b3) => __defProps$r(a, __getOwnPropDescs$r(b3));
4647
- var __objRest$1 = (source, exclude) => {
5002
+ var __spreadProps$s = (a, b3) => __defProps$s(a, __getOwnPropDescs$s(b3));
5003
+ var __objRest = (source, exclude) => {
4648
5004
  var target = {};
4649
5005
  for (var prop in source)
4650
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
5006
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
4651
5007
  target[prop] = source[prop];
4652
- if (source != null && __getOwnPropSymbols$t)
4653
- for (var prop of __getOwnPropSymbols$t(source)) {
4654
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
5008
+ if (source != null && __getOwnPropSymbols$u)
5009
+ for (var prop of __getOwnPropSymbols$u(source)) {
5010
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
4655
5011
  target[prop] = source[prop];
4656
5012
  }
4657
5013
  return target;
@@ -4694,7 +5050,7 @@ const manageAutoScrollDisable = (ctx, timeout = 500) => {
4694
5050
  return { startDisable, endDisable };
4695
5051
  };
4696
5052
  const handleNavigateTo = async (config) => {
4697
- const _a2 = config.params || {}, { url, params, delayH5 } = _a2, restOptions = __objRest$1(_a2, ["url", "params", "delayH5"]);
5053
+ const _a2 = config.params || {}, { url, params, delayH5 } = _a2, restOptions = __objRest(_a2, ["url", "params", "delayH5"]);
4698
5054
  if (delayH5 > 0) {
4699
5055
  setTimeout(() => jumpRouter(url, params, restOptions), delayH5);
4700
5056
  } else {
@@ -4720,12 +5076,12 @@ const jumpRouter = (url, params = {}, opt = {}) => {
4720
5076
  const handleSendMessage = (config, { ctx, metadata }) => {
4721
5077
  var _a2, _c;
4722
5078
  if ((_a2 = config.params) == null ? void 0 : _a2.text) {
4723
- const _b = config.params, { text } = _b, rest = __objRest$1(_b, ["text"]);
5079
+ const _b = config.params, { text } = _b, rest = __objRest(_b, ["text"]);
4724
5080
  (_c = ctx == null ? void 0 : ctx.postMessage) == null ? void 0 : _c.call(ctx, {
4725
5081
  type: "text",
4726
5082
  data: {
4727
5083
  text,
4728
- customJsonData: __spreadValues$t({
5084
+ customJsonData: __spreadValues$u({
4729
5085
  customBiz: metadata == null ? void 0 : metadata.customBiz
4730
5086
  }, rest || {})
4731
5087
  }
@@ -4748,16 +5104,16 @@ const handleUpdateLocalData = async (config, { setValues, extra }) => {
4748
5104
  const oldValue = prev == null ? void 0 : prev[key];
4749
5105
  const isOldEmpty = oldValue === void 0 || oldValue === null || oldValue === "" || typeof oldValue === "object" && Object.keys(oldValue).length === 0;
4750
5106
  if (isOldEmpty) {
4751
- return __spreadProps$r(__spreadValues$t({}, prev || {}), {
5107
+ return __spreadProps$s(__spreadValues$u({}, prev || {}), {
4752
5108
  [key]: targetValue
4753
5109
  });
4754
5110
  }
4755
5111
  if (typeof oldValue === "object" && typeof targetValue === "object" && !Array.isArray(oldValue) && !Array.isArray(targetValue) && oldValue !== null && targetValue !== null) {
4756
- return __spreadProps$r(__spreadValues$t({}, prev || {}), {
4757
- [key]: __spreadValues$t(__spreadValues$t({}, oldValue), targetValue)
5112
+ return __spreadProps$s(__spreadValues$u({}, prev || {}), {
5113
+ [key]: __spreadValues$u(__spreadValues$u({}, oldValue), targetValue)
4758
5114
  });
4759
5115
  }
4760
- return __spreadProps$r(__spreadValues$t({}, prev || {}), {
5116
+ return __spreadProps$s(__spreadValues$u({}, prev || {}), {
4761
5117
  [key]: targetValue
4762
5118
  });
4763
5119
  });
@@ -4770,7 +5126,7 @@ const handleAddLocalDataToSet = (config, { setValues }) => {
4770
5126
  if (set.indexOf(value) === -1) {
4771
5127
  set.push(value);
4772
5128
  }
4773
- return __spreadProps$r(__spreadValues$t({}, prev), { [updateKey]: set });
5129
+ return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
4774
5130
  });
4775
5131
  };
4776
5132
  const handleRemoveLocalDataToSet = (config, { setValues }) => {
@@ -4778,7 +5134,7 @@ const handleRemoveLocalDataToSet = (config, { setValues }) => {
4778
5134
  const { updateKey, value } = config.params;
4779
5135
  setValues((prev = {}) => {
4780
5136
  const set = Array.isArray(prev[updateKey]) ? [...prev[updateKey].filter((v2) => v2 !== value)] : [];
4781
- return __spreadProps$r(__spreadValues$t({}, prev), { [updateKey]: set });
5137
+ return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
4782
5138
  });
4783
5139
  };
4784
5140
  const handleToggleLocalDataToSet = (config, { setValues }) => {
@@ -4792,7 +5148,7 @@ const handleToggleLocalDataToSet = (config, { setValues }) => {
4792
5148
  } else {
4793
5149
  set.splice(valueIndex, 1);
4794
5150
  }
4795
- return __spreadProps$r(__spreadValues$t({}, prev), { [updateKey]: set });
5151
+ return __spreadProps$s(__spreadValues$u({}, prev), { [updateKey]: set });
4796
5152
  });
4797
5153
  };
4798
5154
  const handleCallApiUpdateData = (config, { onAction, commonPayload }) => {
@@ -4819,7 +5175,7 @@ const handleShowPopup = (config, { originProps }) => {
4819
5175
  ctx.getComponent({
4820
5176
  code: (_b = config == null ? void 0 : config.params) == null ? void 0 : _b.componentCode
4821
5177
  }),
4822
- __spreadValues$t(__spreadValues$t({}, originProps), ((_c = config == null ? void 0 : config.params) == null ? void 0 : _c.params) || {}),
5178
+ __spreadValues$u(__spreadValues$u({}, originProps), ((_c = config == null ? void 0 : config.params) == null ? void 0 : _c.params) || {}),
4823
5179
  {
4824
5180
  background: "none",
4825
5181
  position: "bottom",
@@ -4974,27 +5330,45 @@ const RenderActionWrapper = ({
4974
5330
  }
4975
5331
  return /* @__PURE__ */ jsx(Fragment, { children });
4976
5332
  };
4977
- var __defProp$v = Object.defineProperty;
4978
- var __defProps$q = Object.defineProperties;
4979
- var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
4980
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
4981
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
4982
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
4983
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4984
- var __spreadValues$s = (a, b3) => {
5333
+ var __defProp$w = Object.defineProperty;
5334
+ var __defProps$r = Object.defineProperties;
5335
+ var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
5336
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
5337
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
5338
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
5339
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5340
+ var __spreadValues$t = (a, b3) => {
4985
5341
  for (var prop in b3 || (b3 = {}))
4986
- if (__hasOwnProp$s.call(b3, prop))
4987
- __defNormalProp$v(a, prop, b3[prop]);
4988
- if (__getOwnPropSymbols$s)
4989
- for (var prop of __getOwnPropSymbols$s(b3)) {
4990
- if (__propIsEnum$s.call(b3, prop))
4991
- __defNormalProp$v(a, prop, b3[prop]);
5342
+ if (__hasOwnProp$t.call(b3, prop))
5343
+ __defNormalProp$w(a, prop, b3[prop]);
5344
+ if (__getOwnPropSymbols$t)
5345
+ for (var prop of __getOwnPropSymbols$t(b3)) {
5346
+ if (__propIsEnum$t.call(b3, prop))
5347
+ __defNormalProp$w(a, prop, b3[prop]);
4992
5348
  }
4993
5349
  return a;
4994
5350
  };
4995
- var __spreadProps$q = (a, b3) => __defProps$q(a, __getOwnPropDescs$q(b3));
5351
+ var __spreadProps$r = (a, b3) => __defProps$r(a, __getOwnPropDescs$r(b3));
5352
+ function pick(obj, keys) {
5353
+ const result = {};
5354
+ keys.forEach((key) => {
5355
+ if (key in obj) {
5356
+ result[key] = obj[key];
5357
+ }
5358
+ });
5359
+ return result;
5360
+ }
5361
+ function mapToType(obj, callback) {
5362
+ const result = {};
5363
+ for (const key in obj) {
5364
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
5365
+ result[key] = callback(obj[key], key);
5366
+ }
5367
+ }
5368
+ return result;
5369
+ }
4996
5370
  const baseContainerStyle = (props, scale = 1) => {
4997
- const style = __spreadValues$s({}, (props == null ? void 0 : props.style) || {});
5371
+ const style = __spreadValues$t({}, (props == null ? void 0 : props.style) || {});
4998
5372
  return style;
4999
5373
  };
5000
5374
  const childGapStyle = (index, count, theme, gap, horizontal, scale = 1, isWrap = false) => {
@@ -5024,7 +5398,7 @@ const resolveSpace = (val, theme, scale = 1) => {
5024
5398
  }
5025
5399
  return val;
5026
5400
  };
5027
- const paddingToStyle = (padding, theme, scale = 1) => {
5401
+ const paddingLogogramToStyle = (padding, theme, scale = 1) => {
5028
5402
  if (padding == null) return {};
5029
5403
  if (typeof padding === "number" || typeof padding === "string") {
5030
5404
  return { padding: resolveSpace(padding, theme, scale) };
@@ -5067,7 +5441,7 @@ const paddingToStyle = (padding, theme, scale = 1) => {
5067
5441
  }
5068
5442
  return {};
5069
5443
  };
5070
- const marginToStyle = (margin, theme, scale = 1) => {
5444
+ const marginLogogramToStyle = (margin, theme, scale = 1) => {
5071
5445
  if (margin == null) return {};
5072
5446
  if (typeof margin === "number" || typeof margin === "string") {
5073
5447
  return { margin: resolveSpace(margin, theme, scale) };
@@ -5104,16 +5478,57 @@ const marginToStyle = (margin, theme, scale = 1) => {
5104
5478
  }
5105
5479
  return {};
5106
5480
  };
5107
- const resolvedLineHeight = (lineHeight, theme, scale = 1) => {
5481
+ const marginAndPaddingToStyle = (marginAndPadding, theme, scale = 1) => {
5482
+ const style = {};
5483
+ if (marginAndPadding.margin) {
5484
+ Object.assign(
5485
+ style,
5486
+ marginLogogramToStyle(marginAndPadding.margin, theme, scale)
5487
+ );
5488
+ }
5489
+ if (marginAndPadding.padding) {
5490
+ Object.assign(
5491
+ style,
5492
+ paddingLogogramToStyle(marginAndPadding.padding, theme, scale)
5493
+ );
5494
+ }
5495
+ Object.assign(
5496
+ style,
5497
+ mapToType(
5498
+ pick(marginAndPadding, [
5499
+ "marginBottom",
5500
+ "marginLeft",
5501
+ "marginRight",
5502
+ "marginTop",
5503
+ "paddingBottom",
5504
+ "paddingLeft",
5505
+ "paddingRight",
5506
+ "paddingTop"
5507
+ ]),
5508
+ (v2) => resolveSpace(v2, theme, scale)
5509
+ )
5510
+ );
5511
+ return style;
5512
+ };
5513
+ const resolvedLineHeight = (lineHeight, theme, scale = 1, notAddUnit = false) => {
5108
5514
  if (typeof lineHeight === "number") {
5109
- return runStyle(lineHeight, scale);
5515
+ return runStyle(lineHeight, scale, notAddUnit);
5110
5516
  }
5111
5517
  if (theme.lineHeight[lineHeight]) {
5112
- return runStyle(theme.lineHeight[lineHeight], scale);
5518
+ return runStyle(theme.lineHeight[lineHeight], scale, notAddUnit);
5113
5519
  }
5114
5520
  return lineHeight;
5115
5521
  };
5116
- const textStyleFromTheme = (theme, opts, scale = 1) => {
5522
+ const resolvedFontSize = (lineHeight, theme, scale = 1, notAddUnit = false) => {
5523
+ if (typeof lineHeight === "number") {
5524
+ return runStyle(lineHeight, scale, notAddUnit);
5525
+ }
5526
+ if (theme.fontSize[lineHeight]) {
5527
+ return runStyle(theme.fontSize[lineHeight], scale, notAddUnit);
5528
+ }
5529
+ return lineHeight;
5530
+ };
5531
+ const textStyleFromTheme = (theme, opts, scale = 1) => {
5117
5532
  var _a2, _b, _c, _d, _e2, _f;
5118
5533
  const style = {};
5119
5534
  if (!opts) return style;
@@ -5176,6 +5591,52 @@ const backgroundToStyle = (background, theme) => {
5176
5591
  }
5177
5592
  return style;
5178
5593
  };
5594
+ const parseLinerGradient = (linerGradient, theme) => {
5595
+ const { colors = [], angle, stops = [] } = linerGradient;
5596
+ const gradientArr = [];
5597
+ if (angle) {
5598
+ gradientArr.push(`${angle}deg`);
5599
+ }
5600
+ if (colors.length !== stops.length) {
5601
+ stops.length = 0;
5602
+ }
5603
+ colors.forEach((v2, i) => {
5604
+ gradientArr.push(
5605
+ `${resolveColor(v2, theme)}${typeof stops[i] === "number" ? " " + String(stops[i] * 100) + "%" : ""}`
5606
+ );
5607
+ });
5608
+ return `linear-gradient(${gradientArr.join(", ")})`;
5609
+ };
5610
+ const backgroundImagePositionPropsMap = {
5611
+ topLeft: "top left",
5612
+ center: "center",
5613
+ topRight: "top right",
5614
+ bottomRight: "bottom right",
5615
+ bottomLeft: "bottom left"
5616
+ };
5617
+ const backgroundImageRepeatPropsMap = {
5618
+ noRepeat: "no-repeat",
5619
+ repeat: "repeat",
5620
+ repeatX: "repeat-x",
5621
+ repeatY: "repeat-y"
5622
+ };
5623
+ const backgroundImageAndLinearGradientToStyle = (theme, backgroundImage, backgroundLinearGradient) => {
5624
+ if (!backgroundImage && !backgroundLinearGradient) return {};
5625
+ const linearGradientString = backgroundLinearGradient ? parseLinerGradient(backgroundLinearGradient, theme) : void 0;
5626
+ const backgroundImageArr = [];
5627
+ if (backgroundImage == null ? void 0 : backgroundImage.url) {
5628
+ backgroundImageArr.push(`url(${backgroundImage.url})`);
5629
+ }
5630
+ if (linearGradientString) {
5631
+ backgroundImageArr.push(linearGradientString);
5632
+ }
5633
+ return {
5634
+ backgroundImage: backgroundImageArr.join(", "),
5635
+ backgroundPosition: (backgroundImage == null ? void 0 : backgroundImage.alignment) && backgroundImagePositionPropsMap[backgroundImage.alignment] ? backgroundImagePositionPropsMap[backgroundImage.alignment] : "center",
5636
+ backgroundSize: typeof (backgroundImage == null ? void 0 : backgroundImage.objectFit) !== "string" ? "auto" : backgroundImage.objectFit === "fill" ? "100% 100%" : backgroundImage.objectFit,
5637
+ backgroundRepeat: (backgroundImage == null ? void 0 : backgroundImage.repeat) && backgroundImageRepeatPropsMap[backgroundImage.repeat] ? backgroundImageRepeatPropsMap[backgroundImage.repeat] : "no-repeat"
5638
+ };
5639
+ };
5179
5640
  const borderRadiusToStyle = (borderRadius, theme, scale = 1) => {
5180
5641
  const borderRadiusMap = (theme == null ? void 0 : theme.borderRadius) || {};
5181
5642
  const style = {};
@@ -5235,19 +5696,23 @@ const borderToStyle = (border, theme, scale = 1) => {
5235
5696
  }
5236
5697
  return style;
5237
5698
  };
5699
+ const resolveBoxShadow = ({ boxShadow }, theme, scale = 1) => {
5700
+ if (!boxShadow) return void 0;
5701
+ const { color: color2, offset = [], blurRadius = 0, spreadRadius = 0 } = boxShadow;
5702
+ const [offsetX = 0, offsetY = 0] = offset;
5703
+ return `${resolveSpace(offsetX, theme, scale)} ${resolveSpace(offsetY, theme, scale)} ${resolveSpace(blurRadius, theme, scale)} ${resolveSpace(spreadRadius, theme, scale)} ${resolveColor(color2, theme)}`;
5704
+ };
5238
5705
  const imageStyleFromProps = (props, theme, scale = 1) => {
5239
- const style = __spreadValues$s({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
5706
+ const style = __spreadValues$t(__spreadValues$t({}, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), marginAndPaddingToStyle(props, theme, scale));
5240
5707
  if (props.width != null) style.width = runStyle(props.width, scale) || "100%";
5241
5708
  if (props.height != null)
5242
5709
  style.height = runStyle(props.height, scale) || "auto";
5243
5710
  if (props.fit) style.objectFit = props.fit;
5244
- style.display = props.display || "flex";
5245
- Object.assign(style, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
5246
5711
  if (props.style) Object.assign(style, props.style);
5247
5712
  return style;
5248
5713
  };
5249
5714
  const imageViewStyleFromProps = (props, theme, scale = 1) => {
5250
- const style = __spreadValues$s({
5715
+ const style = __spreadValues$t({
5251
5716
  overflow: "hidden"
5252
5717
  }, borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale));
5253
5718
  return style;
@@ -5256,9 +5721,7 @@ const fractionWidth = (percent) => ({
5256
5721
  width: percent
5257
5722
  });
5258
5723
  const buildItemContainerStyle = (index, count, theme, props, horizontal = false, scale = 1, isWrap = false) => {
5259
- const style = __spreadValues$s({
5260
- width: (props == null ? void 0 : props.flexDirection) === "row" ? "auto" : "100%",
5261
- flexDirection: props.direction || "column",
5724
+ const style = __spreadValues$t({
5262
5725
  minWidth: 0,
5263
5726
  height: "auto",
5264
5727
  boxSizing: "border-box",
@@ -5275,21 +5738,24 @@ const buildItemContainerStyle = (index, count, theme, props, horizontal = false,
5275
5738
  return style;
5276
5739
  };
5277
5740
  const buildLayoutContainerStyle = (props, direction, theme, scale = 1) => {
5278
- const style = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
5741
+ const style = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5279
5742
  display: "flex",
5280
5743
  boxSizing: "border-box",
5281
5744
  width: runStyle(props == null ? void 0 : props.width, scale) || "100%",
5282
5745
  height: runStyle(props == null ? void 0 : props.height, scale) || "auto",
5283
5746
  position: "relative",
5284
5747
  flexDirection: direction || "column",
5285
- overflow: props.overflow || "visible"
5286
- }, 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));
5287
- Object.assign(style, paddingToStyle(props == null ? void 0 : props.padding, theme, scale));
5288
- Object.assign(style, marginToStyle(props == null ? void 0 : props.margin, theme, scale));
5748
+ overflow: props.overflow || "visible",
5749
+ boxShadow: resolveBoxShadow(props, theme, scale)
5750
+ }, 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(
5751
+ theme,
5752
+ props.backgroundImage,
5753
+ props.backgroundLinearGradient
5754
+ ));
5289
5755
  return style;
5290
5756
  };
5291
5757
  const buildAbsoluteLayoutStyle = (props, direction, theme, scale = 1) => {
5292
- const style = __spreadProps$q(__spreadValues$s(__spreadValues$s({}, buildLayoutContainerStyle(props, direction, theme, scale)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), {
5758
+ const style = __spreadProps$r(__spreadValues$t(__spreadValues$t({}, buildLayoutContainerStyle(props, direction, theme, scale)), borderRadiusToStyle(props == null ? void 0 : props.borderRadius, theme, scale)), {
5293
5759
  position: "absolute",
5294
5760
  zIndex: 1
5295
5761
  });
@@ -5307,17 +5773,17 @@ const buildAbsoluteLayoutStyle = (props, direction, theme, scale = 1) => {
5307
5773
  return style;
5308
5774
  };
5309
5775
  const numberTestRegexp = /^-?\d+(\.\d+)?$/;
5310
- const runStyle = (val, scale = 0.5) => {
5776
+ const runStyle = (val, scale = 0.5, notAddUnit = false) => {
5311
5777
  if (val === void 0 || val === null) return "";
5312
5778
  const parts = Array.isArray(val) ? val : String(val).trim().split(/\s+/);
5313
5779
  const final = parts.map((item) => {
5314
5780
  if (item === 0 || item === "0" || item === "0px") return "0";
5315
5781
  if (typeof item === "number") {
5316
- return `${item * scale}px`;
5782
+ return `${item * scale}${notAddUnit ? "" : "px"}`;
5317
5783
  }
5318
5784
  if (typeof item === "string") {
5319
5785
  if (!numberTestRegexp.test(item)) return item;
5320
- return `${parseFloat(item) * scale}px`;
5786
+ return `${parseFloat(item) * scale}${notAddUnit ? "" : "px"}`;
5321
5787
  }
5322
5788
  return item;
5323
5789
  }).join(" ");
@@ -5327,10 +5793,10 @@ const runStyle = (val, scale = 0.5) => {
5327
5793
  const resolveColor = (color2, theme) => {
5328
5794
  return theme.color[color2] ? theme.color[color2] : color2;
5329
5795
  };
5330
- const buildCardLayoutStyle = (props, theme, scale = 1) => {
5331
- const cardTheme = theme.components.card;
5332
- const warpStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s({}, backgroundToStyle(cardTheme.wrap.background, theme)), paddingToStyle(cardTheme.wrap.padding, theme, scale)), marginToStyle(props.margin, theme, scale));
5333
- 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));
5796
+ const buildJDHCardLayoutStyle = (props, theme, scale = 1) => {
5797
+ const cardTheme = theme.components.jdhCard;
5798
+ const warpStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({}, backgroundToStyle(cardTheme.wrap.background, theme)), paddingLogogramToStyle(cardTheme.wrap.padding, theme, scale)), marginLogogramToStyle(props.margin, theme, scale));
5799
+ 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));
5334
5800
  const titleHeight = resolvedLineHeight(
5335
5801
  cardTheme.title.lineHeight,
5336
5802
  theme,
@@ -5343,7 +5809,7 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
5343
5809
  height: titleHeight,
5344
5810
  overflow: "hidden"
5345
5811
  };
5346
- const titleStyle = __spreadProps$q(__spreadValues$s({}, textStyleFromTheme(theme, cardTheme.title, scale)), {
5812
+ const titleStyle = __spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, cardTheme.title, scale)), {
5347
5813
  height: titleHeight,
5348
5814
  minHeight: 0,
5349
5815
  overflow: "hidden",
@@ -5357,7 +5823,7 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
5357
5823
  flexShrink: 0,
5358
5824
  flexGrow: 1
5359
5825
  };
5360
- const subDescriptionStyle = __spreadProps$q(__spreadValues$s({}, textStyleFromTheme(theme, cardTheme.subDescription, scale)), {
5826
+ const subDescriptionStyle = __spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, cardTheme.subDescription, scale)), {
5361
5827
  height: resolvedLineHeight(
5362
5828
  cardTheme.subDescription.lineHeight,
5363
5829
  theme,
@@ -5368,11 +5834,11 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
5368
5834
  whiteSpace: "nowrap",
5369
5835
  textOverflow: "ellipsis"
5370
5836
  });
5371
- const contentStyle = __spreadValues$s({}, borderRadiusToStyle(cardTheme.content.borderRadius, theme, scale));
5837
+ const contentStyle = __spreadValues$t({}, borderRadiusToStyle(cardTheme.content.borderRadius, theme, scale));
5372
5838
  if (props.title || props.subDescription) {
5373
5839
  Object.assign(
5374
5840
  contentStyle,
5375
- marginToStyle(cardTheme.content.margin, theme, scale)
5841
+ marginLogogramToStyle(cardTheme.content.margin, theme, scale)
5376
5842
  );
5377
5843
  }
5378
5844
  return {
@@ -5386,14 +5852,14 @@ const buildCardLayoutStyle = (props, theme, scale = 1) => {
5386
5852
  contentStyle
5387
5853
  };
5388
5854
  };
5389
- const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5855
+ const buildJDHChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5390
5856
  const { disabled = false, subDescription, layout = "inline-icon" } = props;
5391
- const choiceTheme = theme.components.choice;
5857
+ const choiceTheme = theme.components.jdhChoice;
5392
5858
  const hasSubDesc = typeof subDescription === "string";
5393
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s({
5859
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t({
5394
5860
  width: layout === "image-top" ? runStyle(choiceTheme.wrap.layoutImageTopWidth, scale) : "auto",
5395
5861
  opacity: disabled ? choiceTheme.disabledOpacity : 1
5396
- }, paddingToStyle(
5862
+ }, paddingLogogramToStyle(
5397
5863
  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,
5398
5864
  theme,
5399
5865
  scale
@@ -5405,11 +5871,11 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5405
5871
  theme,
5406
5872
  scale
5407
5873
  ));
5408
- const labelLineStyle = __spreadValues$s({
5874
+ const labelLineStyle = __spreadValues$t({
5409
5875
  display: "flex",
5410
5876
  alignItems: "center",
5411
5877
  justifyContent: "center"
5412
- }, paddingToStyle(
5878
+ }, paddingLogogramToStyle(
5413
5879
  layout === "image-top" ? choiceTheme.labelLineWrap.layoutImageTopPadding : choiceTheme.labelLineWrap.padding,
5414
5880
  theme,
5415
5881
  scale
@@ -5419,7 +5885,7 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5419
5885
  lineHeight: layout === "small-inline-icon" ? choiceTheme.label.layoutSmallLineHeight : choiceTheme.label.lineHeight,
5420
5886
  color: isSelected ? choiceTheme.label.selectedColor : choiceTheme.label.color
5421
5887
  };
5422
- const labelStyle = __spreadValues$s(__spreadProps$q(__spreadValues$s({}, textStyleFromTheme(theme, labelTextOptions, scale)), {
5888
+ const labelStyle = __spreadValues$t(__spreadProps$r(__spreadValues$t({}, textStyleFromTheme(theme, labelTextOptions, scale)), {
5423
5889
  overflow: "hidden",
5424
5890
  textOverflow: "ellipsis"
5425
5891
  }), layout === "image-top" ? {
@@ -5435,7 +5901,7 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5435
5901
  whiteSpace: "nowrap",
5436
5902
  height: resolvedLineHeight(labelTextOptions.lineHeight, theme, scale)
5437
5903
  });
5438
- const subDescriptionStyle = __spreadValues$s(__spreadValues$s({
5904
+ const subDescriptionStyle = __spreadValues$t(__spreadValues$t({
5439
5905
  textAlign: "center",
5440
5906
  whiteSpace: "nowrap",
5441
5907
  overflow: "hidden",
@@ -5447,11 +5913,11 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5447
5913
  )
5448
5914
  }, textStyleFromTheme(
5449
5915
  theme,
5450
- __spreadProps$q(__spreadValues$s({}, choiceTheme.subDescription), {
5916
+ __spreadProps$r(__spreadValues$t({}, choiceTheme.subDescription), {
5451
5917
  color: isSelected ? choiceTheme.subDescription.selectedColor : choiceTheme.subDescription.color
5452
5918
  }),
5453
5919
  scale
5454
- )), marginToStyle(choiceTheme.subDescription.margin, theme, scale));
5920
+ )), marginLogogramToStyle(choiceTheme.subDescription.margin, theme, scale));
5455
5921
  const topImgSize = runStyle(choiceTheme.image.layoutImageTop.size, scale);
5456
5922
  const imgTopStyle = layout === "image-top" ? {
5457
5923
  display: "block",
@@ -5486,24 +5952,25 @@ const buildChoiceRenderStyle = (props, isSelected, theme, scale = 1) => {
5486
5952
  imgLeftStyle
5487
5953
  };
5488
5954
  };
5489
- const buildButtonRenderStyle = (props, theme, scale = 1) => {
5955
+ const buildJDHButtonRenderStyle = (props, theme, scale = 1) => {
5490
5956
  const {
5491
5957
  color: color2 = "default",
5492
5958
  size = "small",
5493
5959
  variant = "solid",
5494
5960
  disabled = false
5495
5961
  } = props;
5496
- const buttonTheme = theme.components.button;
5497
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
5962
+ const buttonTheme = theme.components.jdhButton;
5963
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5498
5964
  display: "flex",
5499
5965
  flexDirection: "row",
5500
5966
  alignItems: "center",
5501
5967
  justifyContent: "center",
5968
+ alignSelf: "center",
5502
5969
  opacity: disabled && variant !== "link" ? buttonTheme.disabledOpacity : 1
5503
5970
  }, variant !== "link" ? backgroundToStyle(
5504
5971
  buttonTheme.colorStyle[variant][color2].background,
5505
5972
  theme
5506
- ) : {}), paddingToStyle(
5973
+ ) : {}), paddingLogogramToStyle(
5507
5974
  variant === "link" ? 0 : buttonTheme.sizeStyle[size].padding,
5508
5975
  theme,
5509
5976
  scale
@@ -5532,7 +5999,7 @@ const buildButtonRenderStyle = (props, theme, scale = 1) => {
5532
5999
  theme,
5533
6000
  scale
5534
6001
  );
5535
- const iconStyle = __spreadValues$s({
6002
+ const iconStyle = __spreadValues$t({
5536
6003
  width: iconSize,
5537
6004
  height: iconSize,
5538
6005
  marginRight: runStyle(buttonTheme.image.marginRight, scale)
@@ -5549,7 +6016,7 @@ const buildButtonRenderStyle = (props, theme, scale = 1) => {
5549
6016
  arrowStyle
5550
6017
  };
5551
6018
  };
5552
- const buildInputRenderStyle = (props, theme, scale = 1) => {
6019
+ const buildJDHInputRenderStyle = (props, theme, scale = 1) => {
5553
6020
  const {
5554
6021
  readonly = false,
5555
6022
  error = false,
@@ -5557,17 +6024,17 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
5557
6024
  password = false,
5558
6025
  disabled = false
5559
6026
  } = props;
5560
- const inputTheme = theme.components.input;
5561
- const themeState = __spreadValues$s(__spreadValues$s({}, inputTheme.defaultState), readonly ? inputTheme.readonlyState : disabled ? inputTheme.disabledState : error ? inputTheme.errorState : {});
5562
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
6027
+ const inputTheme = theme.components.jdhInput;
6028
+ const themeState = __spreadValues$t(__spreadValues$t({}, inputTheme.defaultState), readonly ? inputTheme.readonlyState : disabled ? inputTheme.disabledState : error ? inputTheme.errorState : {});
6029
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5563
6030
  position: "relative",
5564
6031
  opacity: themeState.opacity
5565
- }, paddingToStyle(themeState.padding, theme, scale)), borderToStyle(
6032
+ }, paddingLogogramToStyle(themeState.padding, theme, scale)), borderToStyle(
5566
6033
  { size: "1px", color: themeState.borderColor, style: "solid" },
5567
6034
  theme,
5568
6035
  scale
5569
6036
  )), backgroundToStyle(themeState.background, theme)), borderRadiusToStyle(themeState.borderRadius, theme, scale));
5570
- const inputStyle = __spreadValues$s(__spreadValues$s({
6037
+ const inputStyle = __spreadValues$t(__spreadValues$t({
5571
6038
  border: "none",
5572
6039
  width: "100%",
5573
6040
  outline: "none"
@@ -5581,7 +6048,7 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
5581
6048
  scale
5582
6049
  ));
5583
6050
  const clearButtonSize = runStyle(inputTheme.clearButton.size, scale);
5584
- const clearStyle = __spreadValues$s({
6051
+ const clearStyle = __spreadValues$t({
5585
6052
  width: clearButtonSize,
5586
6053
  height: clearButtonSize,
5587
6054
  borderRadius: "100px",
@@ -5601,7 +6068,7 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
5601
6068
  transform: "translate(-50%, -50%)"
5602
6069
  };
5603
6070
  const msgTheme = error && errorMessage ? inputTheme.errorMessage : inputTheme.subDescription;
5604
- const msgStyle = __spreadValues$s(__spreadValues$s({}, textStyleFromTheme(theme, msgTheme, scale)), marginToStyle(msgTheme.margin, theme, scale));
6071
+ const msgStyle = __spreadValues$t(__spreadValues$t({}, textStyleFromTheme(theme, msgTheme, scale)), marginLogogramToStyle(msgTheme.margin, theme, scale));
5605
6072
  const passwordIconSize = runStyle(inputTheme.passwordButton.size, scale);
5606
6073
  const passwordStyle = password ? {
5607
6074
  width: passwordIconSize,
@@ -5626,7 +6093,7 @@ const buildInputRenderStyle = (props, theme, scale = 1) => {
5626
6093
  passwordIconStyle
5627
6094
  };
5628
6095
  };
5629
- const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
6096
+ const buildJDHTextareaRenderStyle = (props, value, theme, scale = 1) => {
5630
6097
  const {
5631
6098
  readonly = false,
5632
6099
  error = false,
@@ -5634,25 +6101,26 @@ const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
5634
6101
  errorMessage,
5635
6102
  maxLength
5636
6103
  } = props;
5637
- const textareaTheme = theme.components.textarea;
5638
- const themeState = __spreadValues$s(__spreadValues$s({}, textareaTheme.defaultState), readonly ? textareaTheme.readonlyState : disabled ? textareaTheme.disabledState : error ? textareaTheme.errorState : {});
5639
- const wrapStyle = __spreadValues$s(__spreadValues$s(__spreadValues$s(__spreadValues$s({
6104
+ const textareaTheme = theme.components.jdhTextarea;
6105
+ const themeState = __spreadValues$t(__spreadValues$t({}, textareaTheme.defaultState), readonly ? textareaTheme.readonlyState : disabled ? textareaTheme.disabledState : error ? textareaTheme.errorState : {});
6106
+ const wrapStyle = __spreadValues$t(__spreadValues$t(__spreadValues$t(__spreadValues$t({
5640
6107
  position: "relative",
5641
6108
  boxSizing: "border-box",
5642
6109
  opacity: themeState.opacity,
5643
6110
  height: runStyle(themeState.minHeight, scale),
5644
6111
  maxHeight: runStyle(themeState.maxHeight, scale)
5645
- }, paddingToStyle(themeState.padding, theme, scale)), borderToStyle(
6112
+ }, paddingLogogramToStyle(themeState.padding, theme, scale)), borderToStyle(
5646
6113
  { size: "1px", color: themeState.borderColor, style: "solid" },
5647
6114
  theme,
5648
6115
  scale
5649
6116
  )), backgroundToStyle(themeState.background, theme)), borderRadiusToStyle(themeState.borderRadius, theme, scale));
5650
- const textareaStyle = __spreadValues$s(__spreadValues$s({
6117
+ const textareaStyle = __spreadValues$t(__spreadValues$t({
5651
6118
  border: "none",
5652
6119
  width: "100%",
5653
6120
  display: "block",
5654
6121
  outline: "none",
5655
- height: "100%"
6122
+ height: "100%",
6123
+ resize: "none"
5656
6124
  }, backgroundToStyle(themeState.background, theme)), textStyleFromTheme(
5657
6125
  theme,
5658
6126
  {
@@ -5663,8 +6131,8 @@ const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
5663
6131
  scale
5664
6132
  ));
5665
6133
  const msgTheme = error && errorMessage ? textareaTheme.errorMessage : textareaTheme.subDescription;
5666
- const msgStyle = __spreadValues$s(__spreadValues$s({}, textStyleFromTheme(theme, msgTheme, scale)), marginToStyle(msgTheme.margin, theme, scale));
5667
- const maxLengthTipsStyle = typeof maxLength === "number" ? __spreadValues$s({
6134
+ const msgStyle = __spreadValues$t(__spreadValues$t({}, textStyleFromTheme(theme, msgTheme, scale)), marginLogogramToStyle(msgTheme.margin, theme, scale));
6135
+ const maxLengthTipsStyle = typeof maxLength === "number" ? __spreadValues$t({
5668
6136
  position: "absolute",
5669
6137
  bottom: resolveSpace(
5670
6138
  textareaTheme.maxLengthTips.bottom,
@@ -5674,7 +6142,7 @@ const buildTextareaRenderStyle = (props, value, theme, scale = 1) => {
5674
6142
  right: resolveSpace(textareaTheme.maxLengthTips.right, theme, scale)
5675
6143
  }, textStyleFromTheme(
5676
6144
  theme,
5677
- __spreadProps$q(__spreadValues$s({}, textareaTheme.maxLengthTips), {
6145
+ __spreadProps$r(__spreadValues$t({}, textareaTheme.maxLengthTips), {
5678
6146
  color: resolveColor(
5679
6147
  value.length > maxLength ? textareaTheme.maxLengthTips.colorBeyond : textareaTheme.maxLengthTips.color,
5680
6148
  theme
@@ -5754,25 +6222,25 @@ const ResponsiveContext = createContext({
5754
6222
  containerWidth: null
5755
6223
  });
5756
6224
  const useResponsive = () => useContext(ResponsiveContext);
5757
- var __defProp$u = Object.defineProperty;
5758
- var __defProps$p = Object.defineProperties;
5759
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
5760
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
5761
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
5762
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
5763
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5764
- var __spreadValues$r = (a, b3) => {
6225
+ var __defProp$v = Object.defineProperty;
6226
+ var __defProps$q = Object.defineProperties;
6227
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
6228
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
6229
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
6230
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
6231
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6232
+ var __spreadValues$s = (a, b3) => {
5765
6233
  for (var prop in b3 || (b3 = {}))
5766
- if (__hasOwnProp$r.call(b3, prop))
5767
- __defNormalProp$u(a, prop, b3[prop]);
5768
- if (__getOwnPropSymbols$r)
5769
- for (var prop of __getOwnPropSymbols$r(b3)) {
5770
- if (__propIsEnum$r.call(b3, prop))
5771
- __defNormalProp$u(a, prop, b3[prop]);
6234
+ if (__hasOwnProp$s.call(b3, prop))
6235
+ __defNormalProp$v(a, prop, b3[prop]);
6236
+ if (__getOwnPropSymbols$s)
6237
+ for (var prop of __getOwnPropSymbols$s(b3)) {
6238
+ if (__propIsEnum$s.call(b3, prop))
6239
+ __defNormalProp$v(a, prop, b3[prop]);
5772
6240
  }
5773
6241
  return a;
5774
6242
  };
5775
- var __spreadProps$p = (a, b3) => __defProps$p(a, __getOwnPropDescs$p(b3));
6243
+ var __spreadProps$q = (a, b3) => __defProps$q(a, __getOwnPropDescs$q(b3));
5776
6244
  const FullRowLayout = ({
5777
6245
  props,
5778
6246
  children
@@ -5797,7 +6265,7 @@ const FullRowLayout = ({
5797
6265
  };
5798
6266
  return /* @__PURE__ */ jsx(
5799
6267
  "div",
5800
- __spreadProps$p(__spreadValues$r({
6268
+ __spreadProps$q(__spreadValues$s({
5801
6269
  style: containerStyle,
5802
6270
  onClick: handleClick,
5803
6271
  ref: ref2
@@ -5810,7 +6278,7 @@ const FullRowLayout = ({
5810
6278
  return /* @__PURE__ */ jsx(
5811
6279
  "div",
5812
6280
  {
5813
- style: __spreadProps$p(__spreadValues$r({}, buildItemContainerStyle(
6281
+ style: __spreadProps$q(__spreadValues$s({}, buildItemContainerStyle(
5814
6282
  idx,
5815
6283
  count,
5816
6284
  theme,
@@ -5828,25 +6296,25 @@ const FullRowLayout = ({
5828
6296
  })
5829
6297
  );
5830
6298
  };
5831
- var __defProp$t = Object.defineProperty;
5832
- var __defProps$o = Object.defineProperties;
5833
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
5834
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
5835
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
5836
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
5837
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5838
- var __spreadValues$q = (a, b3) => {
6299
+ var __defProp$u = Object.defineProperty;
6300
+ var __defProps$p = Object.defineProperties;
6301
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
6302
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
6303
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
6304
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
6305
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6306
+ var __spreadValues$r = (a, b3) => {
5839
6307
  for (var prop in b3 || (b3 = {}))
5840
- if (__hasOwnProp$q.call(b3, prop))
5841
- __defNormalProp$t(a, prop, b3[prop]);
5842
- if (__getOwnPropSymbols$q)
5843
- for (var prop of __getOwnPropSymbols$q(b3)) {
5844
- if (__propIsEnum$q.call(b3, prop))
5845
- __defNormalProp$t(a, prop, b3[prop]);
6308
+ if (__hasOwnProp$r.call(b3, prop))
6309
+ __defNormalProp$u(a, prop, b3[prop]);
6310
+ if (__getOwnPropSymbols$r)
6311
+ for (var prop of __getOwnPropSymbols$r(b3)) {
6312
+ if (__propIsEnum$r.call(b3, prop))
6313
+ __defNormalProp$u(a, prop, b3[prop]);
5846
6314
  }
5847
6315
  return a;
5848
6316
  };
5849
- var __spreadProps$o = (a, b3) => __defProps$o(a, __getOwnPropDescs$o(b3));
6317
+ var __spreadProps$p = (a, b3) => __defProps$p(a, __getOwnPropDescs$p(b3));
5850
6318
  const MultipleColumnLayout = ({
5851
6319
  props,
5852
6320
  children
@@ -5855,11 +6323,11 @@ const MultipleColumnLayout = ({
5855
6323
  const { executeActions } = useAction();
5856
6324
  const theme = useTheme();
5857
6325
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
5858
- const containerStyle = __spreadProps$o(__spreadValues$q({}, buildLayoutContainerStyle(props, "row", theme, scale)), {
6326
+ const containerStyle = __spreadProps$p(__spreadValues$r({}, buildLayoutContainerStyle(props, "row", theme, scale)), {
5859
6327
  flexWrap: (props == null ? void 0 : props.flexWrap) || "nowrap"
5860
6328
  });
5861
6329
  const itemContainerStyle = (child, idx) => {
5862
- return __spreadProps$o(__spreadValues$q({}, buildItemContainerStyle(idx, count, theme, props, true, scale, true)), {
6330
+ return __spreadProps$p(__spreadValues$r({}, buildItemContainerStyle(idx, count, theme, props, true, scale, true)), {
5863
6331
  flexShrink: itemFlexShrink(child),
5864
6332
  width: void 0
5865
6333
  });
@@ -5875,7 +6343,7 @@ const MultipleColumnLayout = ({
5875
6343
  paddingBottom: containerStyle.marginBottom
5876
6344
  };
5877
6345
  const gapMargin = `-${resolveSpace(props.gap, theme, scale)}`;
5878
- const containerStyleForGap = __spreadProps$o(__spreadValues$q({}, containerStyle), {
6346
+ const containerStyleForGap = __spreadProps$p(__spreadValues$r({}, containerStyle), {
5879
6347
  margin: void 0,
5880
6348
  marginTop: gapMargin,
5881
6349
  marginLeft: gapMargin,
@@ -5902,7 +6370,7 @@ const MultipleColumnLayout = ({
5902
6370
  // 最外层div使用padding代替原container的margin,以便container使用负margin中和gap实现的效果
5903
6371
  /* @__PURE__ */ jsx("div", { className: "for-gap-wrap", style: polyfillContainerMarginStyle, children: /* @__PURE__ */ jsx(
5904
6372
  "div",
5905
- __spreadProps$o(__spreadValues$q({
6373
+ __spreadProps$p(__spreadValues$r({
5906
6374
  className: "for-gap",
5907
6375
  style: containerStyleForGap,
5908
6376
  onClick: handleClick,
@@ -5913,6 +6381,68 @@ const MultipleColumnLayout = ({
5913
6381
  ) })
5914
6382
  );
5915
6383
  };
6384
+ var __defProp$t = Object.defineProperty;
6385
+ var __defProps$o = Object.defineProperties;
6386
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
6387
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
6388
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
6389
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
6390
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6391
+ var __spreadValues$q = (a, b3) => {
6392
+ for (var prop in b3 || (b3 = {}))
6393
+ if (__hasOwnProp$q.call(b3, prop))
6394
+ __defNormalProp$t(a, prop, b3[prop]);
6395
+ if (__getOwnPropSymbols$q)
6396
+ for (var prop of __getOwnPropSymbols$q(b3)) {
6397
+ if (__propIsEnum$q.call(b3, prop))
6398
+ __defNormalProp$t(a, prop, b3[prop]);
6399
+ }
6400
+ return a;
6401
+ };
6402
+ var __spreadProps$o = (a, b3) => __defProps$o(a, __getOwnPropDescs$o(b3));
6403
+ const TwoColumnLayout$2 = ({
6404
+ props,
6405
+ children
6406
+ }) => {
6407
+ const { scale } = useResponsive();
6408
+ const { executeActions } = useAction();
6409
+ const theme = useTheme();
6410
+ const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6411
+ const containerStyle = buildLayoutContainerStyle(
6412
+ props,
6413
+ "row",
6414
+ theme,
6415
+ scale
6416
+ );
6417
+ const items = React.Children.toArray(children).slice(0, 2);
6418
+ const count = items.length;
6419
+ const handleClick = (e) => {
6420
+ if (props.actions) {
6421
+ void executeActions(props.actions);
6422
+ }
6423
+ onClick(e);
6424
+ };
6425
+ return /* @__PURE__ */ jsx(
6426
+ "div",
6427
+ __spreadProps$o(__spreadValues$q({
6428
+ style: containerStyle,
6429
+ onClick: handleClick,
6430
+ ref: ref2
6431
+ }, { onMouseEnter, onMouseLeave }), {
6432
+ children: items.map((child, idx) => /* @__PURE__ */ jsx(
6433
+ "div",
6434
+ {
6435
+ style: __spreadProps$o(__spreadValues$q({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6436
+ flex: 1
6437
+ // ...fractionWidth('50%'),
6438
+ }),
6439
+ children: child
6440
+ },
6441
+ idx
6442
+ ))
6443
+ })
6444
+ );
6445
+ };
5916
6446
  var __defProp$s = Object.defineProperty;
5917
6447
  var __defProps$n = Object.defineProperties;
5918
6448
  var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
@@ -5932,7 +6462,7 @@ var __spreadValues$p = (a, b3) => {
5932
6462
  return a;
5933
6463
  };
5934
6464
  var __spreadProps$n = (a, b3) => __defProps$n(a, __getOwnPropDescs$n(b3));
5935
- const TwoColumnLayout$2 = ({
6465
+ const ThreeColumnLayout$1 = ({
5936
6466
  props,
5937
6467
  children
5938
6468
  }) => {
@@ -5946,7 +6476,7 @@ const TwoColumnLayout$2 = ({
5946
6476
  theme,
5947
6477
  scale
5948
6478
  );
5949
- const items = React.Children.toArray(children).slice(0, 2);
6479
+ const items = React.Children.toArray(children).slice(0, 3);
5950
6480
  const count = items.length;
5951
6481
  const handleClick = (e) => {
5952
6482
  if (props.actions) {
@@ -5966,7 +6496,6 @@ const TwoColumnLayout$2 = ({
5966
6496
  {
5967
6497
  style: __spreadProps$n(__spreadValues$p({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
5968
6498
  flex: 1
5969
- // ...fractionWidth('50%'),
5970
6499
  }),
5971
6500
  children: child
5972
6501
  },
@@ -5994,7 +6523,7 @@ var __spreadValues$o = (a, b3) => {
5994
6523
  return a;
5995
6524
  };
5996
6525
  var __spreadProps$m = (a, b3) => __defProps$m(a, __getOwnPropDescs$m(b3));
5997
- const ThreeColumnLayout$1 = ({
6526
+ const FourColumnLayout = ({
5998
6527
  props,
5999
6528
  children
6000
6529
  }) => {
@@ -6008,7 +6537,7 @@ const ThreeColumnLayout$1 = ({
6008
6537
  theme,
6009
6538
  scale
6010
6539
  );
6011
- const items = React.Children.toArray(children).slice(0, 3);
6540
+ const items = React.Children.toArray(children).slice(0, 4);
6012
6541
  const count = items.length;
6013
6542
  const handleClick = (e) => {
6014
6543
  if (props.actions) {
@@ -6026,9 +6555,7 @@ const ThreeColumnLayout$1 = ({
6026
6555
  children: items.map((child, idx) => /* @__PURE__ */ jsx(
6027
6556
  "div",
6028
6557
  {
6029
- style: __spreadProps$m(__spreadValues$o({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6030
- flex: 1
6031
- }),
6558
+ style: __spreadValues$o(__spreadValues$o({}, fractionWidth("25%")), buildItemContainerStyle(idx, count, theme, props, true, scale)),
6032
6559
  children: child
6033
6560
  },
6034
6561
  idx
@@ -6055,7 +6582,7 @@ var __spreadValues$n = (a, b3) => {
6055
6582
  return a;
6056
6583
  };
6057
6584
  var __spreadProps$l = (a, b3) => __defProps$l(a, __getOwnPropDescs$l(b3));
6058
- const FourColumnLayout = ({
6585
+ const TwoColumnLayout$1 = ({
6059
6586
  props,
6060
6587
  children
6061
6588
  }) => {
@@ -6069,7 +6596,7 @@ const FourColumnLayout = ({
6069
6596
  theme,
6070
6597
  scale
6071
6598
  );
6072
- const items = React.Children.toArray(children).slice(0, 4);
6599
+ const items = React.Children.toArray(children).slice(0, 2);
6073
6600
  const count = items.length;
6074
6601
  const handleClick = (e) => {
6075
6602
  if (props.actions) {
@@ -6080,14 +6607,20 @@ const FourColumnLayout = ({
6080
6607
  return /* @__PURE__ */ jsx(
6081
6608
  "div",
6082
6609
  __spreadProps$l(__spreadValues$n({
6083
- style: containerStyle,
6610
+ style: __spreadProps$l(__spreadValues$n({}, containerStyle), {
6611
+ width: "100%"
6612
+ }),
6084
6613
  onClick: handleClick,
6085
6614
  ref: ref2
6086
6615
  }, { onMouseEnter, onMouseLeave }), {
6087
6616
  children: items.map((child, idx) => /* @__PURE__ */ jsx(
6088
6617
  "div",
6089
6618
  {
6090
- style: __spreadValues$n(__spreadValues$n({}, fractionWidth("25%")), buildItemContainerStyle(idx, count, theme, props, true, scale)),
6619
+ style: __spreadProps$l(__spreadValues$n({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6620
+ flex: idx === 0 ? 1 : "initial",
6621
+ width: idx === 1 ? runStyle(props.rightWidth, scale) : "auto",
6622
+ flexDirection: "row"
6623
+ }),
6091
6624
  children: child
6092
6625
  },
6093
6626
  idx
@@ -6114,7 +6647,7 @@ var __spreadValues$m = (a, b3) => {
6114
6647
  return a;
6115
6648
  };
6116
6649
  var __spreadProps$k = (a, b3) => __defProps$k(a, __getOwnPropDescs$k(b3));
6117
- const TwoColumnLayout$1 = ({
6650
+ const TwoColumnLayout = ({
6118
6651
  props,
6119
6652
  children
6120
6653
  }) => {
@@ -6139,9 +6672,7 @@ const TwoColumnLayout$1 = ({
6139
6672
  return /* @__PURE__ */ jsx(
6140
6673
  "div",
6141
6674
  __spreadProps$k(__spreadValues$m({
6142
- style: __spreadProps$k(__spreadValues$m({}, containerStyle), {
6143
- width: "100%"
6144
- }),
6675
+ style: containerStyle,
6145
6676
  onClick: handleClick,
6146
6677
  ref: ref2
6147
6678
  }, { onMouseEnter, onMouseLeave }), {
@@ -6149,8 +6680,8 @@ const TwoColumnLayout$1 = ({
6149
6680
  "div",
6150
6681
  {
6151
6682
  style: __spreadProps$k(__spreadValues$m({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6152
- flex: idx === 0 ? 1 : "initial",
6153
- width: idx === 1 ? runStyle(props.rightWidth, scale) : "auto",
6683
+ flex: idx === 1 ? 1 : "initial",
6684
+ width: idx === 0 ? runStyle(props == null ? void 0 : props.leftWidth) : "auto",
6154
6685
  flexDirection: "row"
6155
6686
  }),
6156
6687
  children: child
@@ -6179,7 +6710,7 @@ var __spreadValues$l = (a, b3) => {
6179
6710
  return a;
6180
6711
  };
6181
6712
  var __spreadProps$j = (a, b3) => __defProps$j(a, __getOwnPropDescs$j(b3));
6182
- const TwoColumnLayout = ({
6713
+ const ThreeColumnLayout = ({
6183
6714
  props,
6184
6715
  children
6185
6716
  }) => {
@@ -6193,7 +6724,7 @@ const TwoColumnLayout = ({
6193
6724
  theme,
6194
6725
  scale
6195
6726
  );
6196
- const items = React.Children.toArray(children).slice(0, 2);
6727
+ const items = React.Children.toArray(children).slice(0, 3);
6197
6728
  const count = items.length;
6198
6729
  const handleClick = (e) => {
6199
6730
  if (props.actions) {
@@ -6213,7 +6744,6 @@ const TwoColumnLayout = ({
6213
6744
  {
6214
6745
  style: __spreadProps$j(__spreadValues$l({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6215
6746
  flex: idx === 1 ? 1 : "initial",
6216
- width: idx === 0 ? runStyle(props == null ? void 0 : props.leftWidth) : "auto",
6217
6747
  flexDirection: "row"
6218
6748
  }),
6219
6749
  children: child
@@ -6242,42 +6772,46 @@ var __spreadValues$k = (a, b3) => {
6242
6772
  return a;
6243
6773
  };
6244
6774
  var __spreadProps$i = (a, b3) => __defProps$i(a, __getOwnPropDescs$i(b3));
6245
- const ThreeColumnLayout = ({
6775
+ const AbsoluteViewLayout = ({
6246
6776
  props,
6247
6777
  children
6248
6778
  }) => {
6249
6779
  const { scale } = useResponsive();
6250
6780
  const { executeActions } = useAction();
6781
+ const handleClick = (e) => {
6782
+ if (props.actions) {
6783
+ void executeActions(props.actions);
6784
+ }
6785
+ onClick(e);
6786
+ };
6251
6787
  const theme = useTheme();
6252
6788
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6253
- const containerStyle = buildLayoutContainerStyle(
6789
+ const absoluteContainerStyle = buildAbsoluteLayoutStyle(
6254
6790
  props,
6255
- "row",
6791
+ "column",
6256
6792
  theme,
6257
6793
  scale
6258
6794
  );
6259
- const items = React.Children.toArray(children).slice(0, 3);
6795
+ const items = React.Children.toArray(children);
6260
6796
  const count = items.length;
6261
- const handleClick = (e) => {
6262
- if (props.actions) {
6263
- void executeActions(props.actions);
6264
- }
6265
- onClick(e);
6266
- };
6267
6797
  return /* @__PURE__ */ jsx(
6268
6798
  "div",
6269
6799
  __spreadProps$i(__spreadValues$k({
6270
- style: containerStyle,
6800
+ style: absoluteContainerStyle,
6271
6801
  onClick: handleClick,
6272
6802
  ref: ref2
6273
6803
  }, { onMouseEnter, onMouseLeave }), {
6274
6804
  children: items.map((child, idx) => /* @__PURE__ */ jsx(
6275
6805
  "div",
6276
6806
  {
6277
- style: __spreadProps$i(__spreadValues$k({}, buildItemContainerStyle(idx, count, theme, props, true, scale)), {
6278
- flex: idx === 1 ? 1 : "initial",
6279
- flexDirection: "row"
6280
- }),
6807
+ style: buildItemContainerStyle(
6808
+ idx,
6809
+ count,
6810
+ theme,
6811
+ props,
6812
+ false,
6813
+ scale
6814
+ ),
6281
6815
  children: child
6282
6816
  },
6283
6817
  idx
@@ -6304,7 +6838,7 @@ var __spreadValues$j = (a, b3) => {
6304
6838
  return a;
6305
6839
  };
6306
6840
  var __spreadProps$h = (a, b3) => __defProps$h(a, __getOwnPropDescs$h(b3));
6307
- const AbsoluteViewLayout = ({
6841
+ const AnimationLayout = ({
6308
6842
  props,
6309
6843
  children
6310
6844
  }) => {
@@ -6318,7 +6852,7 @@ const AbsoluteViewLayout = ({
6318
6852
  };
6319
6853
  const theme = useTheme();
6320
6854
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6321
- const absoluteContainerStyle = buildAbsoluteLayoutStyle(
6855
+ const containerStyle = buildLayoutContainerStyle(
6322
6856
  props,
6323
6857
  "column",
6324
6858
  theme,
@@ -6329,7 +6863,7 @@ const AbsoluteViewLayout = ({
6329
6863
  return /* @__PURE__ */ jsx(
6330
6864
  "div",
6331
6865
  __spreadProps$h(__spreadValues$j({
6332
- style: absoluteContainerStyle,
6866
+ style: containerStyle,
6333
6867
  onClick: handleClick,
6334
6868
  ref: ref2
6335
6869
  }, { onMouseEnter, onMouseLeave }), {
@@ -6370,108 +6904,42 @@ var __spreadValues$i = (a, b3) => {
6370
6904
  return a;
6371
6905
  };
6372
6906
  var __spreadProps$g = (a, b3) => __defProps$g(a, __getOwnPropDescs$g(b3));
6373
- const AnimationLayout = ({
6907
+ const ScrollViewLayout = ({
6374
6908
  props,
6375
6909
  children
6376
6910
  }) => {
6377
- const { scale } = useResponsive();
6378
6911
  const { executeActions } = useAction();
6379
- const handleClick = (e) => {
6380
- if (props.actions) {
6381
- void executeActions(props.actions);
6382
- }
6383
- onClick(e);
6384
- };
6385
6912
  const theme = useTheme();
6386
6913
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6914
+ const customProps = props;
6915
+ const scrollX = (customProps == null ? void 0 : customProps.direction) === "horizontal";
6916
+ const scrollY = (customProps == null ? void 0 : customProps.direction) === "vertical" || !(customProps == null ? void 0 : customProps.direction);
6387
6917
  const containerStyle = buildLayoutContainerStyle(
6388
6918
  props,
6389
- "column",
6390
- theme,
6391
- scale
6919
+ scrollX ? "row" : "column",
6920
+ theme
6392
6921
  );
6393
6922
  const items = React.Children.toArray(children);
6394
- const count = items.length;
6923
+ items.length;
6924
+ const handleClick = (e) => {
6925
+ if (props == null ? void 0 : props.actions) void executeActions(props.actions);
6926
+ onClick(e);
6927
+ };
6395
6928
  return /* @__PURE__ */ jsx(
6396
6929
  "div",
6397
- __spreadProps$g(__spreadValues$i({
6398
- style: containerStyle,
6930
+ {
6931
+ style: __spreadProps$g(__spreadValues$i({}, containerStyle), {
6932
+ width: (customProps == null ? void 0 : customProps.width) || "100%",
6933
+ height: (customProps == null ? void 0 : customProps.height) || "auto",
6934
+ whiteSpace: scrollX ? "nowrap" : "normal",
6935
+ // 横向滚动时防止换行
6936
+ overflowX: scrollX ? "auto" : "hidden",
6937
+ overflowY: scrollY ? "auto" : "hidden"
6938
+ }),
6399
6939
  onClick: handleClick,
6400
- ref: ref2
6401
- }, { onMouseEnter, onMouseLeave }), {
6402
- children: items.map((child, idx) => /* @__PURE__ */ jsx(
6940
+ children: /* @__PURE__ */ jsx(
6403
6941
  "div",
6404
- {
6405
- style: buildItemContainerStyle(
6406
- idx,
6407
- count,
6408
- theme,
6409
- props,
6410
- false,
6411
- scale
6412
- ),
6413
- children: child
6414
- },
6415
- idx
6416
- ))
6417
- })
6418
- );
6419
- };
6420
- var __defProp$k = Object.defineProperty;
6421
- var __defProps$f = Object.defineProperties;
6422
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
6423
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
6424
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
6425
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
6426
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6427
- var __spreadValues$h = (a, b3) => {
6428
- for (var prop in b3 || (b3 = {}))
6429
- if (__hasOwnProp$h.call(b3, prop))
6430
- __defNormalProp$k(a, prop, b3[prop]);
6431
- if (__getOwnPropSymbols$h)
6432
- for (var prop of __getOwnPropSymbols$h(b3)) {
6433
- if (__propIsEnum$h.call(b3, prop))
6434
- __defNormalProp$k(a, prop, b3[prop]);
6435
- }
6436
- return a;
6437
- };
6438
- var __spreadProps$f = (a, b3) => __defProps$f(a, __getOwnPropDescs$f(b3));
6439
- const ScrollViewLayout = ({
6440
- props,
6441
- children
6442
- }) => {
6443
- const { executeActions } = useAction();
6444
- const theme = useTheme();
6445
- const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6446
- const customProps = props;
6447
- const scrollX = (customProps == null ? void 0 : customProps.direction) === "horizontal";
6448
- const scrollY = (customProps == null ? void 0 : customProps.direction) === "vertical" || !(customProps == null ? void 0 : customProps.direction);
6449
- const containerStyle = buildLayoutContainerStyle(
6450
- props,
6451
- scrollX ? "row" : "column",
6452
- theme
6453
- );
6454
- const items = React.Children.toArray(children);
6455
- items.length;
6456
- const handleClick = (e) => {
6457
- if (props == null ? void 0 : props.actions) void executeActions(props.actions);
6458
- onClick(e);
6459
- };
6460
- return /* @__PURE__ */ jsx(
6461
- "div",
6462
- {
6463
- style: __spreadProps$f(__spreadValues$h({}, containerStyle), {
6464
- width: (customProps == null ? void 0 : customProps.width) || "100%",
6465
- height: (customProps == null ? void 0 : customProps.height) || "auto",
6466
- whiteSpace: scrollX ? "nowrap" : "normal",
6467
- // 横向滚动时防止换行
6468
- overflowX: scrollX ? "auto" : "hidden",
6469
- overflowY: scrollY ? "auto" : "hidden"
6470
- }),
6471
- onClick: handleClick,
6472
- children: /* @__PURE__ */ jsx(
6473
- "div",
6474
- __spreadProps$f(__spreadValues$h({
6942
+ __spreadProps$g(__spreadValues$i({
6475
6943
  style: {
6476
6944
  display: "flex",
6477
6945
  flexDirection: scrollX ? "row" : "column",
@@ -6540,26 +7008,26 @@ const CustomLayout = ({
6540
7008
  }
6541
7009
  );
6542
7010
  };
6543
- var __defProp$j = Object.defineProperty;
6544
- var __defProps$e = Object.defineProperties;
6545
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
6546
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
6547
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
6548
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
6549
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6550
- var __spreadValues$g = (a, b3) => {
7011
+ var __defProp$k = Object.defineProperty;
7012
+ var __defProps$f = Object.defineProperties;
7013
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
7014
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
7015
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
7016
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
7017
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7018
+ var __spreadValues$h = (a, b3) => {
6551
7019
  for (var prop in b3 || (b3 = {}))
6552
- if (__hasOwnProp$g.call(b3, prop))
6553
- __defNormalProp$j(a, prop, b3[prop]);
6554
- if (__getOwnPropSymbols$g)
6555
- for (var prop of __getOwnPropSymbols$g(b3)) {
6556
- if (__propIsEnum$g.call(b3, prop))
6557
- __defNormalProp$j(a, prop, b3[prop]);
7020
+ if (__hasOwnProp$h.call(b3, prop))
7021
+ __defNormalProp$k(a, prop, b3[prop]);
7022
+ if (__getOwnPropSymbols$h)
7023
+ for (var prop of __getOwnPropSymbols$h(b3)) {
7024
+ if (__propIsEnum$h.call(b3, prop))
7025
+ __defNormalProp$k(a, prop, b3[prop]);
6558
7026
  }
6559
7027
  return a;
6560
7028
  };
6561
- var __spreadProps$e = (a, b3) => __defProps$e(a, __getOwnPropDescs$e(b3));
6562
- const CardLayout = ({
7029
+ var __spreadProps$f = (a, b3) => __defProps$f(a, __getOwnPropDescs$f(b3));
7030
+ const JDHCardLayout = ({
6563
7031
  props,
6564
7032
  children,
6565
7033
  slot = {}
@@ -6569,13 +7037,13 @@ const CardLayout = ({
6569
7037
  const { scale } = useResponsive();
6570
7038
  const theme = useTheme();
6571
7039
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6572
- const cardStyle = buildCardLayoutStyle(props, theme, scale);
7040
+ const cardStyle = buildJDHCardLayoutStyle(props, theme, scale);
6573
7041
  const handleClick = (e) => {
6574
7042
  onClick(e);
6575
7043
  };
6576
7044
  return /* @__PURE__ */ jsx(
6577
7045
  "div",
6578
- __spreadProps$e(__spreadValues$g({
7046
+ __spreadProps$f(__spreadValues$h({
6579
7047
  style: cardStyle.warpStyle,
6580
7048
  className: "card-wrap",
6581
7049
  onClick: handleClick,
@@ -6647,25 +7115,25 @@ const ResponsiveTwoColumnLayout = ({ props, children }) => {
6647
7115
  const useTwoColumn = containerWidth === null || containerWidth > minWidthFowTwoColumn * scale;
6648
7116
  return useTwoColumn ? /* @__PURE__ */ jsx(TwoColumnLayout$2, { props, children }) : /* @__PURE__ */ jsx(FullRowLayout, { props, children });
6649
7117
  };
6650
- var __defProp$i = Object.defineProperty;
6651
- var __defProps$d = Object.defineProperties;
6652
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
6653
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
6654
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
6655
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
6656
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6657
- var __spreadValues$f = (a, b3) => {
7118
+ var __defProp$j = Object.defineProperty;
7119
+ var __defProps$e = Object.defineProperties;
7120
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
7121
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
7122
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
7123
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
7124
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7125
+ var __spreadValues$g = (a, b3) => {
6658
7126
  for (var prop in b3 || (b3 = {}))
6659
- if (__hasOwnProp$f.call(b3, prop))
6660
- __defNormalProp$i(a, prop, b3[prop]);
6661
- if (__getOwnPropSymbols$f)
6662
- for (var prop of __getOwnPropSymbols$f(b3)) {
6663
- if (__propIsEnum$f.call(b3, prop))
6664
- __defNormalProp$i(a, prop, b3[prop]);
7127
+ if (__hasOwnProp$g.call(b3, prop))
7128
+ __defNormalProp$j(a, prop, b3[prop]);
7129
+ if (__getOwnPropSymbols$g)
7130
+ for (var prop of __getOwnPropSymbols$g(b3)) {
7131
+ if (__propIsEnum$g.call(b3, prop))
7132
+ __defNormalProp$j(a, prop, b3[prop]);
6665
7133
  }
6666
7134
  return a;
6667
7135
  };
6668
- var __spreadProps$d = (a, b3) => __defProps$d(a, __getOwnPropDescs$d(b3));
7136
+ var __spreadProps$e = (a, b3) => __defProps$e(a, __getOwnPropDescs$e(b3));
6669
7137
  const LayoutWrapper = ({
6670
7138
  node,
6671
7139
  originProps,
@@ -6690,7 +7158,7 @@ const LayoutWrapper = ({
6690
7158
  case "full-row":
6691
7159
  return /* @__PURE__ */ jsx(FullRowLayout, { props: layoutProps, children });
6692
7160
  case "multiple-column":
6693
- return /* @__PURE__ */ jsx(MultipleColumnLayout, __spreadProps$d(__spreadValues$f({ props: layoutProps }, { originProps }), { children }));
7161
+ return /* @__PURE__ */ jsx(MultipleColumnLayout, __spreadProps$e(__spreadValues$g({ props: layoutProps }, { originProps }), { children }));
6694
7162
  case "two-column":
6695
7163
  return /* @__PURE__ */ jsx(TwoColumnLayout$2, { props: layoutProps, children });
6696
7164
  case "three-column":
@@ -6708,9 +7176,9 @@ const LayoutWrapper = ({
6708
7176
  case "animation-layout":
6709
7177
  return /* @__PURE__ */ jsx(AnimationLayout, { props: layoutProps, children });
6710
7178
  case "scroll-view":
6711
- return /* @__PURE__ */ jsx(ScrollViewLayout, __spreadProps$d(__spreadValues$f({}, node), { children }));
6712
- case "card":
6713
- return /* @__PURE__ */ jsx(CardLayout, { props: layoutProps, slot, children });
7179
+ return /* @__PURE__ */ jsx(ScrollViewLayout, __spreadProps$e(__spreadValues$g({}, node), { children }));
7180
+ case "jdh-card":
7181
+ return /* @__PURE__ */ jsx(JDHCardLayout, { props: layoutProps, slot, children });
6714
7182
  case "responsive-two-column":
6715
7183
  return /* @__PURE__ */ jsx(ResponsiveTwoColumnLayout, { props: layoutProps, children });
6716
7184
  default:
@@ -6740,31 +7208,42 @@ const makeOnChange = (name, onChange) => (eOrValue) => {
6740
7208
  const value = normalizeEventValue(eOrValue);
6741
7209
  onChange({ name, value });
6742
7210
  };
6743
- var __defProp$h = Object.defineProperty;
6744
- var __defProps$c = Object.defineProperties;
6745
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
6746
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
6747
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
6748
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
6749
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6750
- var __spreadValues$e = (a, b3) => {
7211
+ var __defProp$i = Object.defineProperty;
7212
+ var __defProps$d = Object.defineProperties;
7213
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
7214
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
7215
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
7216
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
7217
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7218
+ var __spreadValues$f = (a, b3) => {
6751
7219
  for (var prop in b3 || (b3 = {}))
6752
- if (__hasOwnProp$e.call(b3, prop))
6753
- __defNormalProp$h(a, prop, b3[prop]);
6754
- if (__getOwnPropSymbols$e)
6755
- for (var prop of __getOwnPropSymbols$e(b3)) {
6756
- if (__propIsEnum$e.call(b3, prop))
6757
- __defNormalProp$h(a, prop, b3[prop]);
7220
+ if (__hasOwnProp$f.call(b3, prop))
7221
+ __defNormalProp$i(a, prop, b3[prop]);
7222
+ if (__getOwnPropSymbols$f)
7223
+ for (var prop of __getOwnPropSymbols$f(b3)) {
7224
+ if (__propIsEnum$f.call(b3, prop))
7225
+ __defNormalProp$i(a, prop, b3[prop]);
6758
7226
  }
6759
7227
  return a;
6760
7228
  };
6761
- var __spreadProps$c = (a, b3) => __defProps$c(a, __getOwnPropDescs$c(b3));
7229
+ var __spreadProps$d = (a, b3) => __defProps$d(a, __getOwnPropDescs$d(b3));
6762
7230
  const TextRender = (props) => {
6763
7231
  const theme = useTheme();
7232
+ const { variant = "body" } = props;
6764
7233
  const { scale } = useResponsive();
6765
7234
  const { executeActions } = useAction();
6766
7235
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
6767
- const style = textStyleFromTheme(theme, props, scale);
7236
+ const textTheme = theme.components.text;
7237
+ const textProps = __spreadValues$f(__spreadValues$f(__spreadValues$f({}, textTheme.basic), textTheme.variant[variant]), props);
7238
+ const style = __spreadValues$f(__spreadValues$f(__spreadValues$f({}, textStyleFromTheme(theme, textProps, scale)), marginAndPaddingToStyle(props, theme, scale)), typeof props.numberOfLines === "number" ? {
7239
+ display: "-webkit-box",
7240
+ webkitBoxOrient: "vertical",
7241
+ webkitLineClamp: props.numberOfLines.toString(),
7242
+ // 控制显示行数
7243
+ overflow: "hidden",
7244
+ textOverflow: "ellipsis",
7245
+ whiteSpace: "normal"
7246
+ } : {});
6768
7247
  const handleClick = (e) => {
6769
7248
  if (props.actions) {
6770
7249
  void executeActions(props.actions);
@@ -6773,7 +7252,7 @@ const TextRender = (props) => {
6773
7252
  };
6774
7253
  return /* @__PURE__ */ jsx(
6775
7254
  "span",
6776
- __spreadProps$c(__spreadValues$e({
7255
+ __spreadProps$d(__spreadValues$f({
6777
7256
  style,
6778
7257
  onClick: handleClick,
6779
7258
  ref: ref2
@@ -8084,6 +8563,24 @@ const chineseEmphasisTokenizer = {
8084
8563
  return Math.min(starIndex, underIndex);
8085
8564
  },
8086
8565
  tokenizer(src) {
8566
+ if (/^\*(?=[\d])/.test(src)) {
8567
+ const token = {
8568
+ type: "text",
8569
+ raw: "*",
8570
+ text: "*",
8571
+ escaped: false
8572
+ };
8573
+ return token;
8574
+ }
8575
+ if (/^\*[^*\n\r]+(?=\*\*)/.test(src)) {
8576
+ const token = {
8577
+ type: "text",
8578
+ raw: "*",
8579
+ text: "*",
8580
+ escaped: false
8581
+ };
8582
+ return token;
8583
+ }
8087
8584
  const match = src.match(/^(\*|_)([^\*_\n\r]+?)\1(?!\1)/);
8088
8585
  if (match) {
8089
8586
  const [raw, delimiter, text] = match;
@@ -8177,7 +8674,7 @@ const STREAM_INCOMPLETE_REGEX = {
8177
8674
  /^(\*{2,3}|_{1,3})(?!\s)(?!.*\S\1$)[^\r\n]{0,1000}$/
8178
8675
  ],
8179
8676
  list: [
8180
- /^[-+*]\s{0,3}$/,
8677
+ /^[-+*]\s{1,3}$/,
8181
8678
  /^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\S\1$)[^\r\n]{0,1000}$/,
8182
8679
  /^[-+*]\s{1,3}\[[^\]\r\n]{0,1000}$/,
8183
8680
  /^[-+*]\s{1,3}\[[^\r\n]{0,1000}\](\([^)\r\n]{0,1000})?$/
@@ -8218,7 +8715,7 @@ const tokenRecognizerMap = {
8218
8715
  },
8219
8716
  [inteface_StreamCacheTokenType.List]: {
8220
8717
  tokenType: inteface_StreamCacheTokenType.List,
8221
- isStartOfToken: (markdown) => /^[-+*]/.test(markdown),
8718
+ isStartOfToken: (markdown) => /^[-+*]\s/.test(markdown),
8222
8719
  isStreamingValid: (markdown) => STREAM_INCOMPLETE_REGEX.list.some((re2) => re2.test(markdown))
8223
8720
  },
8224
8721
  [inteface_StreamCacheTokenType.Table]: {
@@ -8232,8 +8729,19 @@ const recognize = (cache, tokenType) => {
8232
8729
  if (!recognizer) return;
8233
8730
  const { token, pending } = cache;
8234
8731
  if (token === inteface_StreamCacheTokenType.Text && recognizer.isStartOfToken(pending)) {
8235
- cache.token = tokenType;
8236
- return;
8732
+ if (tokenType === inteface_StreamCacheTokenType.List) {
8733
+ const cm = cache.completeMarkdown;
8734
+ const lastLF = cm.lastIndexOf("\n");
8735
+ const lineStart = lastLF >= 0 ? lastLF + 1 : 0;
8736
+ const before = cm.slice(lineStart);
8737
+ if (/^ {0,3}$/.test(before)) {
8738
+ cache.token = tokenType;
8739
+ return;
8740
+ }
8741
+ } else {
8742
+ cache.token = tokenType;
8743
+ return;
8744
+ }
8237
8745
  }
8238
8746
  if (token === tokenType && !recognizer.isStreamingValid(pending)) {
8239
8747
  commitCache(cache);
@@ -8745,9 +9253,14 @@ const ListRenderer = ({ node, prevNode, nextNode, parent }) => {
8745
9253
  const { renderers } = useMarkdownContext();
8746
9254
  const { ListItemRenderer: ListItemRenderer2 } = renderers;
8747
9255
  const isOrdered = "ordered" in node ? node.ordered : false;
9256
+ const forceIndent = (prevNode == null ? void 0 : prevNode.type) === "list" && !parent && node.type === "list" && !node.ordered ? true : false;
9257
+ if (forceIndent) {
9258
+ node.indent = true;
9259
+ }
8748
9260
  const className = shared_clsx("xmd-list", {
8749
9261
  "xmd-ordered-list": isOrdered,
8750
- "xmd-bullet-list": !isOrdered
9262
+ "xmd-bullet-list": !isOrdered,
9263
+ "xmd-bullet-indent": forceIndent
8751
9264
  });
8752
9265
  const ListTag = isOrdered ? "ol" : "ul";
8753
9266
  const isNested = (parent == null ? void 0 : parent.type) === "list_item";
@@ -8777,7 +9290,7 @@ const ListItemRenderer = ({ node, index, parent }) => {
8777
9290
  const list = parent;
8778
9291
  const displayIndex = ((list == null ? void 0 : list.start) || 0) + (index || 0);
8779
9292
  const depth = (parent == null ? void 0 : parent._depth) || 1;
8780
- const isTopLevelBullet = !isOrdered && depth === 1;
9293
+ const isTopLevelBullet = !isOrdered && depth === 1 && !parent.indent;
8781
9294
  node._depth = depth;
8782
9295
  const className = shared_clsx("xmd-list-item", {
8783
9296
  "xmd-ordered-list-item": isOrdered,
@@ -8809,59 +9322,20 @@ const ListItemRenderer = ({ node, index, parent }) => {
8809
9322
  ]
8810
9323
  });
8811
9324
  };
8812
- var __defProp$g = Object.defineProperty;
8813
- var __defProps$b = Object.defineProperties;
8814
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
8815
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
8816
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
8817
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
8818
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8819
- var __spreadValues$d = (a, b3) => {
8820
- for (var prop in b3 || (b3 = {}))
8821
- if (__hasOwnProp$d.call(b3, prop))
8822
- __defNormalProp$g(a, prop, b3[prop]);
8823
- if (__getOwnPropSymbols$d)
8824
- for (var prop of __getOwnPropSymbols$d(b3)) {
8825
- if (__propIsEnum$d.call(b3, prop))
8826
- __defNormalProp$g(a, prop, b3[prop]);
8827
- }
8828
- return a;
8829
- };
8830
- var __spreadProps$b = (a, b3) => __defProps$b(a, __getOwnPropDescs$b(b3));
8831
- var __objRest = (source, exclude) => {
8832
- var target = {};
8833
- for (var prop in source)
8834
- if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
8835
- target[prop] = source[prop];
8836
- if (source != null && __getOwnPropSymbols$d)
8837
- for (var prop of __getOwnPropSymbols$d(source)) {
8838
- if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
8839
- target[prop] = source[prop];
8840
- }
8841
- return target;
8842
- };
8843
- const View = (_a2) => {
8844
- var _b = _a2, { children } = _b, props = __objRest(_b, ["children"]);
8845
- return /* @__PURE__ */ jsx("div", __spreadProps$b(__spreadValues$d({}, props), { children }));
8846
- };
8847
- const Text = (_c) => {
8848
- var _d = _c, { children } = _d, props = __objRest(_d, ["children"]);
8849
- return /* @__PURE__ */ jsx("span", __spreadProps$b(__spreadValues$d({}, props), { children }));
8850
- };
8851
9325
  const CodeRenderer = ({ node }) => {
8852
- return jsxs(View, {
9326
+ return jsxs("div", {
8853
9327
  className: "xmd-code-container",
8854
9328
  children: [
8855
- node.lang && jsx(View, {
9329
+ node.lang && jsx("div", {
8856
9330
  className: "xmd-code-header",
8857
- children: jsx(Text, {
9331
+ children: jsx("span", {
8858
9332
  className: "xmd-code-lang",
8859
9333
  children: node.lang
8860
9334
  })
8861
9335
  }),
8862
- jsx(View, {
9336
+ jsx("div", {
8863
9337
  className: "xmd-code-content",
8864
- children: jsx(Text, {
9338
+ children: jsx("span", {
8865
9339
  className: "xmd-code-text",
8866
9340
  children: node.text
8867
9341
  })
@@ -8869,6 +9343,9 @@ const CodeRenderer = ({ node }) => {
8869
9343
  ]
8870
9344
  });
8871
9345
  };
9346
+ const checkURL = (url) => {
9347
+ return /^(https?:|cmd:)\/\/|^#\S+/.test(url);
9348
+ };
8872
9349
  const Icon = React.memo((props) => {
8873
9350
  const { name = "", size, color: color2 } = props;
8874
9351
  const classNames = shared_clsx("xmdfont", `xmd-icon-${name}`);
@@ -8886,14 +9363,16 @@ const LinkRenderer = ({ node }) => {
8886
9363
  const { renderers, showLinkIcon, onLinkPress } = useMarkdownContext();
8887
9364
  const { PhrasingContentResolver: PhrasingContentResolver2 } = renderers;
8888
9365
  const { href: url } = node;
9366
+ const isURL = checkURL(url);
8889
9367
  const onPress = useCallback((e) => {
8890
9368
  e.preventDefault();
8891
- if (url) {
9369
+ if (isURL) {
8892
9370
  onLinkPress == null ? void 0 : onLinkPress(url);
8893
9371
  }
8894
9372
  }, [
8895
9373
  url,
8896
- onLinkPress
9374
+ onLinkPress,
9375
+ isURL
8897
9376
  ]);
8898
9377
  return jsxs("a", {
8899
9378
  className: "xmd-link",
@@ -8907,7 +9386,7 @@ const LinkRenderer = ({ node }) => {
8907
9386
  prevNode: index > 0 ? array[index - 1] : void 0,
8908
9387
  nextNode: index < array.length - 1 ? array[index + 1] : void 0
8909
9388
  }, index)),
8910
- showLinkIcon && jsx("span", {
9389
+ showLinkIcon && isURL && jsx("span", {
8911
9390
  className: "xmd-link-search",
8912
9391
  children: jsx(Icon, {
8913
9392
  name: "search",
@@ -9056,7 +9535,7 @@ const ImageRenderer = ({ node }) => {
9056
9535
  });
9057
9536
  };
9058
9537
  const CodespanRenderer = ({ node }) => {
9059
- return jsx(Text, {
9538
+ return jsx("span", {
9060
9539
  className: "xmd-codespan",
9061
9540
  children: node.text
9062
9541
  });
@@ -9406,7 +9885,7 @@ const defaultRenderers = {
9406
9885
  ...defaultRenderers
9407
9886
  });
9408
9887
  const pxTransform = (value) => {
9409
- return value / 2;
9888
+ return `${value / 2}px`;
9410
9889
  };
9411
9890
  const shared_pxTransform = pxTransform;
9412
9891
  const defaultTheme = {
@@ -9769,52 +10248,79 @@ const MarkdownFC = ({ content, theme, tableToolbar, styles: customStyles, showLi
9769
10248
  });
9770
10249
  };
9771
10250
  const Markdown = attachStaticMethods(MarkdownFC);
9772
- const MarkdownRender = (props) => {
9773
- var _a2;
9774
- useTheme();
9775
- const { executeActions } = useAction();
9776
- useForEditor(props);
9777
- const content = props.content || "";
9778
- const originProps = props.originProps || {};
9779
- return (originProps == null ? void 0 : originProps.renderMarkdown) ? (_a2 = originProps == null ? void 0 : originProps.renderMarkdown) == null ? void 0 : _a2.call(originProps, { text: content }) : /* @__PURE__ */ jsx(
9780
- Markdown,
9781
- {
9782
- content,
9783
- theme: {
9784
- line_height: 5,
9785
- text_size: 16
9786
- }
9787
- }
9788
- );
9789
- };
9790
- var __defProp$f = Object.defineProperty;
9791
- var __defProps$a = Object.defineProperties;
9792
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
9793
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
9794
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
9795
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
9796
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9797
- var __spreadValues$c = (a, b3) => {
10251
+ var __defProp$h = Object.defineProperty;
10252
+ var __defProps$c = Object.defineProperties;
10253
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
10254
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
10255
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
10256
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
10257
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10258
+ var __spreadValues$e = (a, b3) => {
9798
10259
  for (var prop in b3 || (b3 = {}))
9799
- if (__hasOwnProp$c.call(b3, prop))
9800
- __defNormalProp$f(a, prop, b3[prop]);
9801
- if (__getOwnPropSymbols$c)
9802
- for (var prop of __getOwnPropSymbols$c(b3)) {
9803
- if (__propIsEnum$c.call(b3, prop))
9804
- __defNormalProp$f(a, prop, b3[prop]);
10260
+ if (__hasOwnProp$e.call(b3, prop))
10261
+ __defNormalProp$h(a, prop, b3[prop]);
10262
+ if (__getOwnPropSymbols$e)
10263
+ for (var prop of __getOwnPropSymbols$e(b3)) {
10264
+ if (__propIsEnum$e.call(b3, prop))
10265
+ __defNormalProp$h(a, prop, b3[prop]);
9805
10266
  }
9806
10267
  return a;
9807
10268
  };
9808
- var __spreadProps$a = (a, b3) => __defProps$a(a, __getOwnPropDescs$a(b3));
9809
- const ImageRender = (props) => {
10269
+ var __spreadProps$c = (a, b3) => __defProps$c(a, __getOwnPropDescs$c(b3));
10270
+ const MarkdownRender = (props) => {
9810
10271
  const theme = useTheme();
9811
- const { scale } = useResponsive();
9812
10272
  const { executeActions } = useAction();
9813
- const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
9814
- const viewStyle = imageViewStyleFromProps(props, theme, scale);
9815
- const getObjectFit = (fit) => {
9816
- switch (fit) {
9817
- case "contain":
10273
+ const { scale } = useResponsive();
10274
+ const { onClick } = useForEditor(props);
10275
+ const content = props.content || "";
10276
+ const style = __spreadProps$c(__spreadValues$e({}, marginAndPaddingToStyle(props, theme, scale)), {
10277
+ textAlign: props.textAlign
10278
+ });
10279
+ const markdownTheme = {
10280
+ line_height: typeof props.lineHeight === "number" ? parseFloat(
10281
+ resolvedLineHeight(props.lineHeight, theme, scale, true).toString()
10282
+ ) * 2 : void 0,
10283
+ text_size: typeof props.fontSize === "number" ? parseFloat(
10284
+ resolvedFontSize(props.fontSize, theme, scale, true).toString()
10285
+ ) * 2 : void 0,
10286
+ text_color: typeof props.color === "string" ? resolveColor(props.color, theme) : void 0
10287
+ };
10288
+ const handleClick = (e) => {
10289
+ if (props == null ? void 0 : props.actions) {
10290
+ void executeActions(props.actions);
10291
+ }
10292
+ onClick(e);
10293
+ };
10294
+ return /* @__PURE__ */ jsx("div", { onClick: handleClick, className: "aui-markdown-wrap", style, children: /* @__PURE__ */ jsx(Markdown, { content, theme: markdownTheme }) });
10295
+ };
10296
+ var __defProp$g = Object.defineProperty;
10297
+ var __defProps$b = Object.defineProperties;
10298
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
10299
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
10300
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
10301
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
10302
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10303
+ var __spreadValues$d = (a, b3) => {
10304
+ for (var prop in b3 || (b3 = {}))
10305
+ if (__hasOwnProp$d.call(b3, prop))
10306
+ __defNormalProp$g(a, prop, b3[prop]);
10307
+ if (__getOwnPropSymbols$d)
10308
+ for (var prop of __getOwnPropSymbols$d(b3)) {
10309
+ if (__propIsEnum$d.call(b3, prop))
10310
+ __defNormalProp$g(a, prop, b3[prop]);
10311
+ }
10312
+ return a;
10313
+ };
10314
+ var __spreadProps$b = (a, b3) => __defProps$b(a, __getOwnPropDescs$b(b3));
10315
+ const ImageRender = (props) => {
10316
+ const theme = useTheme();
10317
+ const { scale } = useResponsive();
10318
+ const { executeActions } = useAction();
10319
+ const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10320
+ const viewStyle = imageViewStyleFromProps(props, theme, scale);
10321
+ const getObjectFit = (fit) => {
10322
+ switch (fit) {
10323
+ case "contain":
9818
10324
  return "contain";
9819
10325
  case "cover":
9820
10326
  return "cover";
@@ -9829,7 +10335,7 @@ const ImageRender = (props) => {
9829
10335
  }
9830
10336
  };
9831
10337
  const style = imageStyleFromProps(
9832
- __spreadValues$c({
10338
+ __spreadValues$d({
9833
10339
  width: props.width,
9834
10340
  height: props.height,
9835
10341
  fit: getObjectFit(props.fit)
@@ -9837,7 +10343,7 @@ const ImageRender = (props) => {
9837
10343
  theme,
9838
10344
  scale
9839
10345
  );
9840
- const imgUrl = getImageUrl(__spreadValues$c({ url: props.src }, props));
10346
+ const imgUrl = getImageUrl(__spreadValues$d({ url: props.src }, props));
9841
10347
  const handleClick = (e) => {
9842
10348
  if (props == null ? void 0 : props.actions) {
9843
10349
  void executeActions(props.actions);
@@ -9846,7 +10352,7 @@ const ImageRender = (props) => {
9846
10352
  };
9847
10353
  return /* @__PURE__ */ jsx(
9848
10354
  "div",
9849
- __spreadProps$a(__spreadValues$c({
10355
+ __spreadProps$b(__spreadValues$d({
9850
10356
  onClick: props.actions ? handleClick : void 0,
9851
10357
  style: viewStyle,
9852
10358
  ref: ref2
@@ -9855,25 +10361,25 @@ const ImageRender = (props) => {
9855
10361
  })
9856
10362
  );
9857
10363
  };
9858
- var __defProp$e = Object.defineProperty;
9859
- var __defProps$9 = Object.defineProperties;
9860
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
9861
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
9862
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
9863
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
9864
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9865
- var __spreadValues$b = (a, b3) => {
10364
+ var __defProp$f = Object.defineProperty;
10365
+ var __defProps$a = Object.defineProperties;
10366
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
10367
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
10368
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
10369
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
10370
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10371
+ var __spreadValues$c = (a, b3) => {
9866
10372
  for (var prop in b3 || (b3 = {}))
9867
- if (__hasOwnProp$b.call(b3, prop))
9868
- __defNormalProp$e(a, prop, b3[prop]);
9869
- if (__getOwnPropSymbols$b)
9870
- for (var prop of __getOwnPropSymbols$b(b3)) {
9871
- if (__propIsEnum$b.call(b3, prop))
9872
- __defNormalProp$e(a, prop, b3[prop]);
10373
+ if (__hasOwnProp$c.call(b3, prop))
10374
+ __defNormalProp$f(a, prop, b3[prop]);
10375
+ if (__getOwnPropSymbols$c)
10376
+ for (var prop of __getOwnPropSymbols$c(b3)) {
10377
+ if (__propIsEnum$c.call(b3, prop))
10378
+ __defNormalProp$f(a, prop, b3[prop]);
9873
10379
  }
9874
10380
  return a;
9875
10381
  };
9876
- var __spreadProps$9 = (a, b3) => __defProps$9(a, __getOwnPropDescs$9(b3));
10382
+ var __spreadProps$a = (a, b3) => __defProps$a(a, __getOwnPropDescs$a(b3));
9877
10383
  const TextListRender = (props) => {
9878
10384
  const theme = useTheme();
9879
10385
  const { scale } = useResponsive();
@@ -9895,7 +10401,7 @@ const TextListRender = (props) => {
9895
10401
  };
9896
10402
  return /* @__PURE__ */ jsxs(
9897
10403
  "div",
9898
- __spreadProps$9(__spreadValues$b({
10404
+ __spreadProps$a(__spreadValues$c({
9899
10405
  style,
9900
10406
  onClick: handleContainerClick,
9901
10407
  ref: ref2
@@ -9949,25 +10455,25 @@ const TextListRender = (props) => {
9949
10455
  })
9950
10456
  );
9951
10457
  };
9952
- var __defProp$d = Object.defineProperty;
9953
- var __defProps$8 = Object.defineProperties;
9954
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
9955
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
9956
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
9957
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
9958
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9959
- var __spreadValues$a = (a, b3) => {
10458
+ var __defProp$e = Object.defineProperty;
10459
+ var __defProps$9 = Object.defineProperties;
10460
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
10461
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
10462
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
10463
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
10464
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10465
+ var __spreadValues$b = (a, b3) => {
9960
10466
  for (var prop in b3 || (b3 = {}))
9961
- if (__hasOwnProp$a.call(b3, prop))
9962
- __defNormalProp$d(a, prop, b3[prop]);
9963
- if (__getOwnPropSymbols$a)
9964
- for (var prop of __getOwnPropSymbols$a(b3)) {
9965
- if (__propIsEnum$a.call(b3, prop))
9966
- __defNormalProp$d(a, prop, b3[prop]);
10467
+ if (__hasOwnProp$b.call(b3, prop))
10468
+ __defNormalProp$e(a, prop, b3[prop]);
10469
+ if (__getOwnPropSymbols$b)
10470
+ for (var prop of __getOwnPropSymbols$b(b3)) {
10471
+ if (__propIsEnum$b.call(b3, prop))
10472
+ __defNormalProp$e(a, prop, b3[prop]);
9967
10473
  }
9968
10474
  return a;
9969
10475
  };
9970
- var __spreadProps$8 = (a, b3) => __defProps$8(a, __getOwnPropDescs$8(b3));
10476
+ var __spreadProps$9 = (a, b3) => __defProps$9(a, __getOwnPropDescs$9(b3));
9971
10477
  const CustomRenderFromIM = (props) => {
9972
10478
  const { executeActions, getLocalData } = useAction();
9973
10479
  const { originProps } = props;
@@ -10000,32 +10506,32 @@ const CustomRenderFromIM = (props) => {
10000
10506
  },
10001
10507
  {}
10002
10508
  );
10003
- return __spreadProps$8(__spreadValues$a({}, actions), {
10509
+ return __spreadProps$9(__spreadValues$b({}, actions), {
10004
10510
  getLocalData
10005
10511
  });
10006
10512
  }, [executeActions, getLocalData]);
10007
10513
  if (!CustomComp)
10008
10514
  return /* @__PURE__ */ jsx(UnknownRenderer, { type: props == null ? void 0 : props.customCode, prefix: "渲染类型错误" });
10009
10515
  if (React.isValidElement(CustomComp)) {
10010
- return React.cloneElement(CustomComp, __spreadProps$8(__spreadValues$a(__spreadValues$a(__spreadValues$a({}, (CustomComp == null ? void 0 : CustomComp.props) || {}), originProps), props), {
10516
+ return React.cloneElement(CustomComp, __spreadProps$9(__spreadValues$b(__spreadValues$b(__spreadValues$b({}, (CustomComp == null ? void 0 : CustomComp.props) || {}), originProps), props), {
10011
10517
  AUIActions
10012
10518
  }));
10013
10519
  }
10014
- return /* @__PURE__ */ jsx(CustomComp, __spreadProps$8(__spreadValues$a(__spreadValues$a({}, originProps), props), { AUIActions }));
10520
+ return /* @__PURE__ */ jsx(CustomComp, __spreadProps$9(__spreadValues$b(__spreadValues$b({}, originProps), props), { AUIActions }));
10015
10521
  };
10016
- var __defProp$c = Object.defineProperty;
10017
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
10018
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
10019
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
10020
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10021
- var __spreadValues$9 = (a, b3) => {
10522
+ var __defProp$d = Object.defineProperty;
10523
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
10524
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
10525
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
10526
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10527
+ var __spreadValues$a = (a, b3) => {
10022
10528
  for (var prop in b3 || (b3 = {}))
10023
- if (__hasOwnProp$9.call(b3, prop))
10024
- __defNormalProp$c(a, prop, b3[prop]);
10025
- if (__getOwnPropSymbols$9)
10026
- for (var prop of __getOwnPropSymbols$9(b3)) {
10027
- if (__propIsEnum$9.call(b3, prop))
10028
- __defNormalProp$c(a, prop, b3[prop]);
10529
+ if (__hasOwnProp$a.call(b3, prop))
10530
+ __defNormalProp$d(a, prop, b3[prop]);
10531
+ if (__getOwnPropSymbols$a)
10532
+ for (var prop of __getOwnPropSymbols$a(b3)) {
10533
+ if (__propIsEnum$a.call(b3, prop))
10534
+ __defNormalProp$d(a, prop, b3[prop]);
10029
10535
  }
10030
10536
  return a;
10031
10537
  };
@@ -10039,7 +10545,7 @@ const DividerRender = (props) => {
10039
10545
  void executeActions(props.actions);
10040
10546
  }
10041
10547
  };
10042
- const style = __spreadValues$9({
10548
+ const style = __spreadValues$a({
10043
10549
  width: "100%",
10044
10550
  height: props.height ? runStyle(props.height, scale) : "1px",
10045
10551
  backgroundColor: props.color ? ((_a2 = theme.color) == null ? void 0 : _a2[props.color]) || props.color : "#eeeeee",
@@ -10071,25 +10577,25 @@ const CustomRenderFromProps = ({ props, component }) => {
10071
10577
  }
10072
10578
  );
10073
10579
  };
10074
- var __defProp$b = Object.defineProperty;
10075
- var __defProps$7 = Object.defineProperties;
10076
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
10077
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
10078
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
10079
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
10080
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10081
- var __spreadValues$8 = (a, b3) => {
10580
+ var __defProp$c = Object.defineProperty;
10581
+ var __defProps$8 = Object.defineProperties;
10582
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
10583
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
10584
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
10585
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
10586
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10587
+ var __spreadValues$9 = (a, b3) => {
10082
10588
  for (var prop in b3 || (b3 = {}))
10083
- if (__hasOwnProp$8.call(b3, prop))
10084
- __defNormalProp$b(a, prop, b3[prop]);
10085
- if (__getOwnPropSymbols$8)
10086
- for (var prop of __getOwnPropSymbols$8(b3)) {
10087
- if (__propIsEnum$8.call(b3, prop))
10088
- __defNormalProp$b(a, prop, b3[prop]);
10589
+ if (__hasOwnProp$9.call(b3, prop))
10590
+ __defNormalProp$c(a, prop, b3[prop]);
10591
+ if (__getOwnPropSymbols$9)
10592
+ for (var prop of __getOwnPropSymbols$9(b3)) {
10593
+ if (__propIsEnum$9.call(b3, prop))
10594
+ __defNormalProp$c(a, prop, b3[prop]);
10089
10595
  }
10090
10596
  return a;
10091
10597
  };
10092
- var __spreadProps$7 = (a, b3) => __defProps$7(a, __getOwnPropDescs$7(b3));
10598
+ var __spreadProps$8 = (a, b3) => __defProps$8(a, __getOwnPropDescs$8(b3));
10093
10599
  const ChoiceJDHRender = ({ props, values }) => {
10094
10600
  const {
10095
10601
  updateKey,
@@ -10108,7 +10614,7 @@ const ChoiceJDHRender = ({ props, values }) => {
10108
10614
  const { scale } = useResponsive();
10109
10615
  const { executeActions } = useAction();
10110
10616
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10111
- const style = buildChoiceRenderStyle(props, isSelected, theme, scale);
10617
+ const style = buildJDHChoiceRenderStyle(props, isSelected, theme, scale);
10112
10618
  const actions = [
10113
10619
  {
10114
10620
  type: !multi ? "updateLocalData" : "toggleLocalDataToSet",
@@ -10125,7 +10631,7 @@ const ChoiceJDHRender = ({ props, values }) => {
10125
10631
  };
10126
10632
  return /* @__PURE__ */ jsxs(
10127
10633
  "div",
10128
- __spreadProps$7(__spreadValues$8({
10634
+ __spreadProps$8(__spreadValues$9({
10129
10635
  className: "choice-wrap",
10130
10636
  style: style.wrapStyle,
10131
10637
  onClick: handleClick,
@@ -10172,25 +10678,25 @@ const ChoiceJDHRender = ({ props, values }) => {
10172
10678
  })
10173
10679
  );
10174
10680
  };
10175
- var __defProp$a = Object.defineProperty;
10176
- var __defProps$6 = Object.defineProperties;
10177
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
10178
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
10179
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
10180
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
10181
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10182
- var __spreadValues$7 = (a, b3) => {
10681
+ var __defProp$b = Object.defineProperty;
10682
+ var __defProps$7 = Object.defineProperties;
10683
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
10684
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
10685
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
10686
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
10687
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10688
+ var __spreadValues$8 = (a, b3) => {
10183
10689
  for (var prop in b3 || (b3 = {}))
10184
- if (__hasOwnProp$7.call(b3, prop))
10185
- __defNormalProp$a(a, prop, b3[prop]);
10186
- if (__getOwnPropSymbols$7)
10187
- for (var prop of __getOwnPropSymbols$7(b3)) {
10188
- if (__propIsEnum$7.call(b3, prop))
10189
- __defNormalProp$a(a, prop, b3[prop]);
10690
+ if (__hasOwnProp$8.call(b3, prop))
10691
+ __defNormalProp$b(a, prop, b3[prop]);
10692
+ if (__getOwnPropSymbols$8)
10693
+ for (var prop of __getOwnPropSymbols$8(b3)) {
10694
+ if (__propIsEnum$8.call(b3, prop))
10695
+ __defNormalProp$b(a, prop, b3[prop]);
10190
10696
  }
10191
10697
  return a;
10192
10698
  };
10193
- var __spreadProps$6 = (a, b3) => __defProps$6(a, __getOwnPropDescs$6(b3));
10699
+ var __spreadProps$7 = (a, b3) => __defProps$7(a, __getOwnPropDescs$7(b3));
10194
10700
  const ButtonJDHRender = ({ props }) => {
10195
10701
  const {
10196
10702
  text,
@@ -10204,7 +10710,7 @@ const ButtonJDHRender = ({ props }) => {
10204
10710
  const { scale } = useResponsive();
10205
10711
  const { executeActions } = useAction();
10206
10712
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10207
- const style = buildButtonRenderStyle(props, theme, scale);
10713
+ const style = buildJDHButtonRenderStyle(props, theme, scale);
10208
10714
  const handleClick = (e) => {
10209
10715
  if (!disabled) {
10210
10716
  executeActions(actions);
@@ -10213,7 +10719,7 @@ const ButtonJDHRender = ({ props }) => {
10213
10719
  };
10214
10720
  return /* @__PURE__ */ jsxs(
10215
10721
  "div",
10216
- __spreadProps$6(__spreadValues$7({
10722
+ __spreadProps$7(__spreadValues$8({
10217
10723
  className: "button-wrap",
10218
10724
  style: style.wrapStyle,
10219
10725
  onClick: handleClick,
@@ -10235,25 +10741,25 @@ const ButtonJDHRender = ({ props }) => {
10235
10741
  })
10236
10742
  );
10237
10743
  };
10238
- var __defProp$9 = Object.defineProperty;
10239
- var __defProps$5 = Object.defineProperties;
10240
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
10241
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
10242
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
10243
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
10244
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10245
- var __spreadValues$6 = (a, b3) => {
10744
+ var __defProp$a = Object.defineProperty;
10745
+ var __defProps$6 = Object.defineProperties;
10746
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
10747
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
10748
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
10749
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
10750
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10751
+ var __spreadValues$7 = (a, b3) => {
10246
10752
  for (var prop in b3 || (b3 = {}))
10247
- if (__hasOwnProp$6.call(b3, prop))
10248
- __defNormalProp$9(a, prop, b3[prop]);
10249
- if (__getOwnPropSymbols$6)
10250
- for (var prop of __getOwnPropSymbols$6(b3)) {
10251
- if (__propIsEnum$6.call(b3, prop))
10252
- __defNormalProp$9(a, prop, b3[prop]);
10753
+ if (__hasOwnProp$7.call(b3, prop))
10754
+ __defNormalProp$a(a, prop, b3[prop]);
10755
+ if (__getOwnPropSymbols$7)
10756
+ for (var prop of __getOwnPropSymbols$7(b3)) {
10757
+ if (__propIsEnum$7.call(b3, prop))
10758
+ __defNormalProp$a(a, prop, b3[prop]);
10253
10759
  }
10254
10760
  return a;
10255
10761
  };
10256
- var __spreadProps$5 = (a, b3) => __defProps$5(a, __getOwnPropDescs$5(b3));
10762
+ var __spreadProps$6 = (a, b3) => __defProps$6(a, __getOwnPropDescs$6(b3));
10257
10763
  const InputJDHRender = ({ props, value = "", onChange }) => {
10258
10764
  const {
10259
10765
  placeholder,
@@ -10268,7 +10774,7 @@ const InputJDHRender = ({ props, value = "", onChange }) => {
10268
10774
  const { scale } = useResponsive();
10269
10775
  const { executeActions } = useAction();
10270
10776
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10271
- const style = buildInputRenderStyle(props, theme, scale);
10777
+ const style = buildJDHInputRenderStyle(props, theme, scale);
10272
10778
  const [targetValue, setTargetValue] = useState(value);
10273
10779
  const [passwordShow, setPasswordShow] = useState(false);
10274
10780
  const handleClick = useCallback((e) => {
@@ -10297,7 +10803,7 @@ const InputJDHRender = ({ props, value = "", onChange }) => {
10297
10803
  return /* @__PURE__ */ jsxs("div", { style: { width: "100%" }, children: [
10298
10804
  /* @__PURE__ */ jsxs(
10299
10805
  "div",
10300
- __spreadProps$5(__spreadValues$6({
10806
+ __spreadProps$6(__spreadValues$7({
10301
10807
  className: "aui-input-wrap",
10302
10808
  style: style.wrapStyle,
10303
10809
  onClick: handleClick,
@@ -10423,25 +10929,25 @@ const InputJDHRender = ({ props, value = "", onChange }) => {
10423
10929
  (error && !!errorMessage || !!subDescription) && /* @__PURE__ */ jsx("div", { className: "input-msg", style: style.msgStyle, children: error && !!errorMessage ? errorMessage : subDescription }, "msg")
10424
10930
  ] });
10425
10931
  };
10426
- var __defProp$8 = Object.defineProperty;
10427
- var __defProps$4 = Object.defineProperties;
10428
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
10429
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
10430
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
10431
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
10432
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10433
- var __spreadValues$5 = (a, b3) => {
10932
+ var __defProp$9 = Object.defineProperty;
10933
+ var __defProps$5 = Object.defineProperties;
10934
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
10935
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
10936
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
10937
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
10938
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10939
+ var __spreadValues$6 = (a, b3) => {
10434
10940
  for (var prop in b3 || (b3 = {}))
10435
- if (__hasOwnProp$5.call(b3, prop))
10436
- __defNormalProp$8(a, prop, b3[prop]);
10437
- if (__getOwnPropSymbols$5)
10438
- for (var prop of __getOwnPropSymbols$5(b3)) {
10439
- if (__propIsEnum$5.call(b3, prop))
10440
- __defNormalProp$8(a, prop, b3[prop]);
10941
+ if (__hasOwnProp$6.call(b3, prop))
10942
+ __defNormalProp$9(a, prop, b3[prop]);
10943
+ if (__getOwnPropSymbols$6)
10944
+ for (var prop of __getOwnPropSymbols$6(b3)) {
10945
+ if (__propIsEnum$6.call(b3, prop))
10946
+ __defNormalProp$9(a, prop, b3[prop]);
10441
10947
  }
10442
10948
  return a;
10443
10949
  };
10444
- var __spreadProps$4 = (a, b3) => __defProps$4(a, __getOwnPropDescs$4(b3));
10950
+ var __spreadProps$5 = (a, b3) => __defProps$5(a, __getOwnPropDescs$5(b3));
10445
10951
  const TextareaJDHRender = ({ props, value = "", onChange }) => {
10446
10952
  const {
10447
10953
  placeholder,
@@ -10456,7 +10962,7 @@ const TextareaJDHRender = ({ props, value = "", onChange }) => {
10456
10962
  const { scale } = useResponsive();
10457
10963
  const { executeActions } = useAction();
10458
10964
  const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
10459
- const style = buildTextareaRenderStyle(props, value, theme, scale);
10965
+ const style = buildJDHTextareaRenderStyle(props, value, theme, scale);
10460
10966
  const [targetValue, setTargetValue] = useState(value);
10461
10967
  const [passwordShow, setPasswordShow] = useState(false);
10462
10968
  const handleClick = useCallback((e) => {
@@ -10474,7 +10980,7 @@ const TextareaJDHRender = ({ props, value = "", onChange }) => {
10474
10980
  return /* @__PURE__ */ jsxs("div", { children: [
10475
10981
  /* @__PURE__ */ jsxs(
10476
10982
  "div",
10477
- __spreadProps$4(__spreadValues$5({
10983
+ __spreadProps$5(__spreadValues$6({
10478
10984
  className: "aui-textarea-wrap",
10479
10985
  style: style.wrapStyle,
10480
10986
  onClick: handleClick,
@@ -10513,6 +11019,166 @@ const TextareaJDHRender = ({ props, value = "", onChange }) => {
10513
11019
  (error && !!errorMessage || !!subDescription) && /* @__PURE__ */ jsx("div", { className: "textarea-msg", style: style.msgStyle, children: error && !!errorMessage ? errorMessage : subDescription }, "msg")
10514
11020
  ] });
10515
11021
  };
11022
+ var __defProp$8 = Object.defineProperty;
11023
+ var __defProps$4 = Object.defineProperties;
11024
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
11025
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
11026
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
11027
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
11028
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11029
+ var __spreadValues$5 = (a, b3) => {
11030
+ for (var prop in b3 || (b3 = {}))
11031
+ if (__hasOwnProp$5.call(b3, prop))
11032
+ __defNormalProp$8(a, prop, b3[prop]);
11033
+ if (__getOwnPropSymbols$5)
11034
+ for (var prop of __getOwnPropSymbols$5(b3)) {
11035
+ if (__propIsEnum$5.call(b3, prop))
11036
+ __defNormalProp$8(a, prop, b3[prop]);
11037
+ }
11038
+ return a;
11039
+ };
11040
+ var __spreadProps$4 = (a, b3) => __defProps$4(a, __getOwnPropDescs$4(b3));
11041
+ const buildColorStyle = (variant, colorType, disabled, hover, theme) => {
11042
+ const { basicColor, color: color2, disabledColor, hoverColor } = theme.components.button;
11043
+ if (disabled) {
11044
+ return {
11045
+ fontColor: disabledColor.color,
11046
+ backgroundColor: variant === "text" || variant === "link" ? disabledColor.textLinkBackground : variant === "filled" ? disabledColor.fillBackground : disabledColor.background,
11047
+ borderColor: variant === "text" || variant === "link" ? disabledColor.textLinkBackground : disabledColor.borderColor
11048
+ };
11049
+ }
11050
+ const colorTheme = __spreadValues$5(__spreadValues$5({}, basicColor), color2[colorType]);
11051
+ const fontColor = variant === "solid" ? colorTheme.color : colorTheme.background;
11052
+ const backgroundColor = variant === "solid" ? colorTheme.background : variant === "filled" ? colorTheme.fillBackground : colorTheme.color;
11053
+ const borderColor = variant === "dashed" || variant === "outlined" ? colorTheme.borderColor : variant === "solid" ? colorTheme.background : colorTheme.color;
11054
+ const result = { fontColor, backgroundColor, borderColor };
11055
+ if (hover) {
11056
+ const hoverTheme = hoverColor[colorType];
11057
+ if (variant === "solid") {
11058
+ result.backgroundColor = hoverTheme.solidBackground;
11059
+ } else if (variant === "outlined" || variant === "dashed") {
11060
+ result.fontColor = hoverTheme.outlineDashedTextColor;
11061
+ result.borderColor = hoverTheme.outlineDashedTextColor;
11062
+ } else if (variant === "link") {
11063
+ result.fontColor = hoverTheme.outlineDashedTextColor;
11064
+ } else if (variant === "text") {
11065
+ result.backgroundColor = hoverTheme.textBackground;
11066
+ } else if (variant === "filled") {
11067
+ result.backgroundColor = hoverTheme.fillBackground;
11068
+ }
11069
+ }
11070
+ return result;
11071
+ };
11072
+ const ButtonRender = ({ props }) => {
11073
+ const {
11074
+ text,
11075
+ iconSrc,
11076
+ loading = false,
11077
+ color: color2 = "default",
11078
+ size = "middle",
11079
+ actions,
11080
+ variant = "solid",
11081
+ disabled = false,
11082
+ block = false
11083
+ } = props;
11084
+ const theme = useTheme();
11085
+ const [onHover, setOnHover] = useState(false);
11086
+ const buttonTheme = theme.components.button;
11087
+ const { fontColor, backgroundColor, borderColor } = buildColorStyle(
11088
+ variant,
11089
+ color2,
11090
+ disabled,
11091
+ onHover,
11092
+ theme
11093
+ );
11094
+ const sizeTheme = __spreadValues$5(__spreadValues$5({}, buttonTheme.basicSize), buttonTheme.size[size]);
11095
+ const imageSrc = loading ? buttonTheme.loadingIcon : iconSrc;
11096
+ const { scale } = useResponsive();
11097
+ const { executeActions } = useAction();
11098
+ const { ref: ref2, onClick, onMouseEnter, onMouseLeave } = useForEditor(props);
11099
+ const wrapStyle = __spreadProps$4(__spreadValues$5(__spreadValues$5(__spreadValues$5({}, textStyleFromTheme(
11100
+ theme,
11101
+ {
11102
+ fontSize: props.fontSize ? props.fontSize : sizeTheme.fontSize,
11103
+ lineHeight: props.lineHeight ? props.lineHeight : sizeTheme.lineHeight,
11104
+ fontWeight: props.fontWeight,
11105
+ color: fontColor
11106
+ },
11107
+ scale
11108
+ )), borderRadiusToStyle(sizeTheme.borderRadius, theme, scale)), marginAndPaddingToStyle(__spreadValues$5(__spreadValues$5({}, sizeTheme), props), theme, scale)), {
11109
+ background: resolveColor(backgroundColor, theme),
11110
+ borderWidth: 1,
11111
+ borderStyle: variant === "dashed" ? "dashed" : "solid",
11112
+ borderColor: resolveColor(borderColor, theme),
11113
+ opacity: loading ? buttonTheme.loading.opacity : 1,
11114
+ cursor: disabled ? "not-allowed" : loading ? void 0 : "pointer",
11115
+ flex: block ? 1 : "initial",
11116
+ textAlign: props.textAlign || "center"
11117
+ });
11118
+ const iconSize = wrapStyle.fontSize;
11119
+ const iconStyle = __spreadValues$5(__spreadValues$5({
11120
+ width: iconSize,
11121
+ height: iconSize
11122
+ }, borderRadiusToStyle(buttonTheme.icon.borderRadius, theme, scale)), marginLogogramToStyle(buttonTheme.icon.margin, theme, scale));
11123
+ const handleClick = (e) => {
11124
+ if (!disabled || !loading) {
11125
+ executeActions(actions);
11126
+ }
11127
+ onClick(e);
11128
+ };
11129
+ const handleMouseEnter = useCallback(
11130
+ (e) => {
11131
+ setOnHover(true);
11132
+ onMouseEnter(e);
11133
+ },
11134
+ [onMouseEnter]
11135
+ );
11136
+ const handleMouseLeave = useCallback(
11137
+ (e) => {
11138
+ setOnHover(false);
11139
+ onMouseLeave(e);
11140
+ },
11141
+ [onMouseLeave]
11142
+ );
11143
+ return /* @__PURE__ */ jsxs(
11144
+ "div",
11145
+ {
11146
+ className: "button-wrap",
11147
+ style: wrapStyle,
11148
+ onClick: handleClick,
11149
+ ref: ref2,
11150
+ onMouseEnter: handleMouseEnter,
11151
+ onMouseLeave: handleMouseLeave,
11152
+ children: [
11153
+ imageSrc && /* @__PURE__ */ jsx(
11154
+ "img",
11155
+ {
11156
+ style: iconStyle,
11157
+ className: `button-icon ${loading ? "aui-button-loading" : ""}`,
11158
+ src: imageSrc
11159
+ }
11160
+ ),
11161
+ !imageSrc && loading && /* @__PURE__ */ jsx(
11162
+ "svg",
11163
+ {
11164
+ viewBox: "0 0 1024 1024",
11165
+ focusable: "false",
11166
+ "data-icon": "loading",
11167
+ style: __spreadProps$4(__spreadValues$5({}, marginLogogramToStyle(buttonTheme.icon.margin, theme, scale)), {
11168
+ width: iconSize,
11169
+ height: iconSize,
11170
+ fill: wrapStyle.color
11171
+ }),
11172
+ className: "aui-button-loading",
11173
+ "aria-hidden": "true",
11174
+ children: /* @__PURE__ */ 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" })
11175
+ }
11176
+ ),
11177
+ /* @__PURE__ */ jsx("span", { className: "button-text", children: text })
11178
+ ]
11179
+ }
11180
+ );
11181
+ };
10516
11182
  var __defProp$7 = Object.defineProperty;
10517
11183
  var __defProps$3 = Object.defineProperties;
10518
11184
  var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
@@ -10566,7 +11232,7 @@ const LeafWrapper = ({
10566
11232
  return /* @__PURE__ */ jsx(ImageRender, __spreadValues$4({}, props));
10567
11233
  case "text-list":
10568
11234
  return /* @__PURE__ */ jsx(TextListRender, __spreadProps$3(__spreadValues$4({}, props), { children }));
10569
- case "input": {
11235
+ case "jdh-input": {
10570
11236
  const p = props;
10571
11237
  const value = p.updateKey ? values == null ? void 0 : values[p.updateKey] : "";
10572
11238
  return /* @__PURE__ */ jsx(
@@ -10578,7 +11244,7 @@ const LeafWrapper = ({
10578
11244
  }
10579
11245
  );
10580
11246
  }
10581
- case "textarea": {
11247
+ case "jdh-textarea": {
10582
11248
  const p = props;
10583
11249
  const value = p.updateKey ? values == null ? void 0 : values[p.updateKey] : "";
10584
11250
  return /* @__PURE__ */ jsx(
@@ -10590,6 +11256,9 @@ const LeafWrapper = ({
10590
11256
  }
10591
11257
  );
10592
11258
  }
11259
+ case "button": {
11260
+ return /* @__PURE__ */ jsx(ButtonRender, { props });
11261
+ }
10593
11262
  case "divider": {
10594
11263
  return /* @__PURE__ */ jsx(DividerRender, __spreadValues$4({}, props));
10595
11264
  }
@@ -10599,14 +11268,20 @@ const LeafWrapper = ({
10599
11268
  case "custom-render": {
10600
11269
  return /* @__PURE__ */ jsx(CustomRenderFromIM, __spreadProps$3(__spreadValues$4({}, props), { originProps }));
10601
11270
  }
10602
- case "choice": {
11271
+ case "jdh-choice": {
10603
11272
  return /* @__PURE__ */ jsx(ChoiceJDHRender, { props, values });
10604
11273
  }
10605
- case "button": {
11274
+ case "jdh-button": {
10606
11275
  return /* @__PURE__ */ jsx(ButtonJDHRender, { props });
10607
11276
  }
10608
11277
  default:
10609
- return /* @__PURE__ */ jsx(UnknownRenderer, { type: String(renderType), prefix: "未知渲染类型" });
11278
+ return /* @__PURE__ */ jsx(
11279
+ UnknownRenderer,
11280
+ {
11281
+ type: String(renderType),
11282
+ prefix: `未知渲染类型: ${subType}`
11283
+ }
11284
+ );
10610
11285
  }
10611
11286
  };
10612
11287
  const ComponentRenderer = ({
@@ -10710,7 +11385,8 @@ const MessageContainer = (props) => {
10710
11385
  template,
10711
11386
  referenceComponentList,
10712
11387
  data,
10713
- initLocalData = {}
11388
+ initLocalData = {},
11389
+ devicePixelRatio: componentDevicePixelRatio
10714
11390
  } = component;
10715
11391
  const [containerWidth, setContainerWidth] = useState(
10716
11392
  typeof containerWidthFromProps === "number" ? containerWidthFromProps : null
@@ -10719,7 +11395,7 @@ const MessageContainer = (props) => {
10719
11395
  const { editorMode: editorMode2 } = useForEditor({});
10720
11396
  const responsiveValue = useMemo(() => {
10721
11397
  return {
10722
- scale: props.devicePixelRatio ? 1 / props.devicePixelRatio : DEFAULT_SCALE,
11398
+ scale: typeof componentDevicePixelRatio === "number" ? 1 / componentDevicePixelRatio : props.devicePixelRatio ? 1 / props.devicePixelRatio : DEFAULT_SCALE,
10723
11399
  containerWidth
10724
11400
  };
10725
11401
  }, [props.devicePixelRatio, containerWidth]);