@makeswift/runtime 0.0.0-f5b044f → 0.0.1

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 (98) hide show
  1. package/controls.js +1 -0
  2. package/dist/Page.cjs.js +10 -3
  3. package/dist/Page.cjs.js.map +1 -1
  4. package/dist/Page.es.js +10 -3
  5. package/dist/Page.es.js.map +1 -1
  6. package/dist/builder.cjs.js +1 -0
  7. package/dist/builder.cjs.js.map +1 -1
  8. package/dist/builder.es.js +1 -0
  9. package/dist/builder.es.js.map +1 -1
  10. package/dist/components.cjs.js +1 -0
  11. package/dist/components.cjs.js.map +1 -1
  12. package/dist/components.es.js +1 -0
  13. package/dist/components.es.js.map +1 -1
  14. package/dist/control-serialization.cjs.js +198 -0
  15. package/dist/control-serialization.cjs.js.map +1 -1
  16. package/dist/control-serialization.es.js +198 -0
  17. package/dist/control-serialization.es.js.map +1 -1
  18. package/dist/controls.cjs.js +7 -0
  19. package/dist/controls.cjs.js.map +1 -0
  20. package/dist/controls.es.js +2 -0
  21. package/dist/controls.es.js.map +1 -0
  22. package/dist/descriptors.cjs.js +3 -1
  23. package/dist/descriptors.cjs.js.map +1 -1
  24. package/dist/descriptors.es.js +3 -1
  25. package/dist/descriptors.es.js.map +1 -1
  26. package/dist/index.cjs.js +320 -153
  27. package/dist/index.cjs.js.map +1 -1
  28. package/dist/index.es.js +313 -146
  29. package/dist/index.es.js.map +1 -1
  30. package/dist/main.cjs.js +1 -0
  31. package/dist/main.cjs.js.map +1 -1
  32. package/dist/main.es.js +1 -0
  33. package/dist/main.es.js.map +1 -1
  34. package/dist/next.cjs.js +1 -0
  35. package/dist/next.cjs.js.map +1 -1
  36. package/dist/next.es.js +1 -0
  37. package/dist/next.es.js.map +1 -1
  38. package/dist/prop-controllers.cjs.js +1 -0
  39. package/dist/prop-controllers.cjs.js.map +1 -1
  40. package/dist/prop-controllers.es.js +1 -0
  41. package/dist/prop-controllers.es.js.map +1 -1
  42. package/dist/react-builder-preview.cjs.js +1 -0
  43. package/dist/react-builder-preview.cjs.js.map +1 -1
  44. package/dist/react-builder-preview.es.js +1 -0
  45. package/dist/react-builder-preview.es.js.map +1 -1
  46. package/dist/react.cjs.js +1 -0
  47. package/dist/react.cjs.js.map +1 -1
  48. package/dist/react.es.js +1 -0
  49. package/dist/react.es.js.map +1 -1
  50. package/dist/style.cjs.js +38 -0
  51. package/dist/style.cjs.js.map +1 -0
  52. package/dist/style.es.js +35 -0
  53. package/dist/style.es.js.map +1 -0
  54. package/dist/types/builder/serialization/control-serialization.d.ts +156 -3
  55. package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
  56. package/dist/types/components/builtin/Button/Button.d.ts +2 -1
  57. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  58. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  59. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  60. package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
  61. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  62. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  63. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
  64. package/dist/types/components/page/Page.d.ts +4 -0
  65. package/dist/types/components/page/Page.d.ts.map +1 -1
  66. package/dist/types/controls/index.d.ts +2 -0
  67. package/dist/types/controls/index.d.ts.map +1 -0
  68. package/dist/types/controls/style.d.ts +141 -0
  69. package/dist/types/controls/style.d.ts.map +1 -0
  70. package/dist/types/controls/types.d.ts +11 -0
  71. package/dist/types/controls/types.d.ts.map +1 -0
  72. package/dist/types/prop-controllers/descriptors.d.ts +32 -27
  73. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  74. package/dist/types/prop-controllers/index.d.ts +1 -1
  75. package/dist/types/prop-controllers/index.d.ts.map +1 -1
  76. package/dist/types/runtimes/react/controls/style.d.ts +4 -0
  77. package/dist/types/runtimes/react/controls/style.d.ts.map +1 -0
  78. package/dist/types/runtimes/react/controls.d.ts +2 -5
  79. package/dist/types/runtimes/react/controls.d.ts.map +1 -1
  80. package/dist/types/runtimes/react/index.d.ts +2 -3
  81. package/dist/types/runtimes/react/index.d.ts.map +1 -1
  82. package/package.json +10 -3
  83. package/dist/react.cjs2.js +0 -7992
  84. package/dist/react.cjs2.js.map +0 -1
  85. package/dist/react.es2.js +0 -7911
  86. package/dist/react.es2.js.map +0 -1
  87. package/dist/types/controls/select.d.ts +0 -19
  88. package/dist/types/controls/select.d.ts.map +0 -1
  89. package/dist/types/controls.d.ts +0 -4
  90. package/dist/types/controls.d.ts.map +0 -1
  91. package/dist/types/prop-controllers/instances/slot.d.ts +0 -2
  92. package/dist/types/prop-controllers/instances/slot.d.ts.map +0 -1
  93. package/dist/types/runtimes/index.d.ts +0 -43
  94. package/dist/types/runtimes/index.d.ts.map +0 -1
  95. package/dist/types/runtimes/react/react.d.ts +0 -43
  96. package/dist/types/runtimes/react/react.d.ts.map +0 -1
  97. package/dist/types/runtimes/react.d.ts +0 -43
  98. package/dist/types/runtimes/react.d.ts.map +0 -1
package/dist/index.es.js CHANGED
@@ -63,6 +63,7 @@ import Hotkeys from "slate-hotkeys";
63
63
  import ipsum from "corporate-ipsum";
64
64
  import { Editor } from "slate-react";
65
65
  import Lists from "@convertkit/slate-lists";
66
+ import { a as StyleControlProperty, S as StyleControlType } from "./style.es.js";
66
67
  const PlaceholderBase$1 = styled.div`
67
68
  width: 100%;
68
69
  background: rgba(161, 168, 194, 0.18);
@@ -2238,8 +2239,14 @@ function registerComponent$b(runtime) {
2238
2239
  }],
2239
2240
  defaultValue: "medium"
2240
2241
  }),
2241
- color: ResponsiveColor({
2242
- placeholder: "black"
2242
+ color: ResponsiveColor((props, device) => {
2243
+ var _a;
2244
+ const variant = props.variant;
2245
+ const hidden = ((_a = findDeviceOverride(variant, device)) == null ? void 0 : _a.value) === "clear";
2246
+ return {
2247
+ placeholder: "black",
2248
+ hidden
2249
+ };
2243
2250
  }),
2244
2251
  textColor: ResponsiveColor({
2245
2252
  label: "Text color",
@@ -2816,17 +2823,29 @@ function registerComponent$9(runtime) {
2816
2823
  }
2817
2824
  }),
2818
2825
  margin: Margin(),
2819
- pageSize: ResponsiveNumber({
2820
- label: "Images shown",
2821
- defaultValue: 1,
2822
- min: 1,
2823
- step: 1
2826
+ pageSize: ResponsiveNumber((props) => {
2827
+ var _a;
2828
+ const images = props.images;
2829
+ const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
2830
+ return {
2831
+ label: "Images shown",
2832
+ defaultValue: 1,
2833
+ min: 1,
2834
+ max: imagesLength,
2835
+ step: 1
2836
+ };
2824
2837
  }),
2825
- step: ResponsiveNumber({
2826
- label: "Step",
2827
- defaultValue: 1,
2828
- min: 1,
2829
- step: 1
2838
+ step: ResponsiveNumber((props, device) => {
2839
+ var _a, _b;
2840
+ const pageSize = props.pageSize;
2841
+ const pageSizeValue = (_b = (_a = findDeviceOverride(pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
2842
+ return {
2843
+ label: "Step",
2844
+ defaultValue: 1,
2845
+ min: 1,
2846
+ max: pageSizeValue,
2847
+ step: 1
2848
+ };
2830
2849
  }),
2831
2850
  slideAlignment: ResponsiveIconRadioGroup({
2832
2851
  label: "Alignment",
@@ -2856,18 +2875,19 @@ function registerComponent$9(runtime) {
2856
2875
  autoplay: Checkbox$1({
2857
2876
  label: "Autoplay"
2858
2877
  }),
2859
- delay: Number$1({
2878
+ delay: Number$1((props) => ({
2860
2879
  label: "Delay",
2861
2880
  preset: 5,
2862
2881
  min: 1,
2863
2882
  step: 0.1,
2864
- suffix: "seconds"
2865
- }),
2883
+ suffix: "seconds",
2884
+ hidden: !props.autoplay
2885
+ })),
2866
2886
  showArrows: Checkbox$1({
2867
2887
  preset: true,
2868
2888
  label: "Show arrows"
2869
2889
  }),
2870
- arrowPosition: ResponsiveIconRadioGroup({
2890
+ arrowPosition: ResponsiveIconRadioGroup((props) => ({
2871
2891
  label: "Arrow position",
2872
2892
  options: [{
2873
2893
  label: "Inside",
@@ -2882,24 +2902,28 @@ function registerComponent$9(runtime) {
2882
2902
  value: "outside",
2883
2903
  icon: "ArrowOutside16"
2884
2904
  }],
2885
- defaultValue: "inside"
2886
- }),
2887
- arrowColor: ResponsiveColor({
2905
+ defaultValue: "inside",
2906
+ hidden: props.showArrows === false
2907
+ })),
2908
+ arrowColor: ResponsiveColor((props) => ({
2888
2909
  label: "Arrow color",
2889
- placeholder: "black"
2890
- }),
2891
- arrowBackground: ResponsiveColor({
2910
+ placeholder: "black",
2911
+ hidden: props.showArrows === false
2912
+ })),
2913
+ arrowBackground: ResponsiveColor((props) => ({
2892
2914
  label: "Arrow background",
2893
- placeholder: "white"
2894
- }),
2915
+ placeholder: "white",
2916
+ hidden: props.showArrows === false
2917
+ })),
2895
2918
  showDots: Checkbox$1({
2896
2919
  preset: true,
2897
2920
  label: "Show dots"
2898
2921
  }),
2899
- dotColor: ResponsiveColor({
2922
+ dotColor: ResponsiveColor((props) => ({
2900
2923
  label: "Dot color",
2901
- placeholder: "black"
2902
- }),
2924
+ placeholder: "black",
2925
+ hidden: props.showDots === false
2926
+ })),
2903
2927
  slideBorder: Border(),
2904
2928
  slideBorderRadius: BorderRadius()
2905
2929
  }
@@ -3212,9 +3236,9 @@ function registerComponent$8(runtime) {
3212
3236
  icon: "Countdown40",
3213
3237
  props: {
3214
3238
  id: ElementID(),
3215
- date: Date$1({
3239
+ date: Date$1(() => ({
3216
3240
  preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
3217
- }),
3241
+ })),
3218
3242
  variant: ResponsiveIconRadioGroup({
3219
3243
  label: "Style",
3220
3244
  options: [{
@@ -5187,7 +5211,7 @@ function registerComponent$5(runtime) {
5187
5211
  id: ElementID(),
5188
5212
  tableId: Table(),
5189
5213
  fields: TableFormFields(),
5190
- submitLink: Link$1({
5214
+ submitLink: Link$1((props) => ({
5191
5215
  label: "Redirect to",
5192
5216
  options: [{
5193
5217
  value: "OPEN_PAGE",
@@ -5195,9 +5219,10 @@ function registerComponent$5(runtime) {
5195
5219
  }, {
5196
5220
  value: "OPEN_URL",
5197
5221
  label: "Open URL"
5198
- }]
5199
- }),
5200
- gap: GapY({
5222
+ }],
5223
+ hidden: props.tableId == null
5224
+ })),
5225
+ gap: GapY((props) => ({
5201
5226
  preset: [{
5202
5227
  deviceId: "desktop",
5203
5228
  value: {
@@ -5209,9 +5234,10 @@ function registerComponent$5(runtime) {
5209
5234
  defaultValue: {
5210
5235
  value: 0,
5211
5236
  unit: "px"
5212
- }
5213
- }),
5214
- shape: ResponsiveIconRadioGroup({
5237
+ },
5238
+ hidden: props.tableId == null
5239
+ })),
5240
+ shape: ResponsiveIconRadioGroup((props) => ({
5215
5241
  label: "Shape",
5216
5242
  options: [{
5217
5243
  label: "Pill",
@@ -5226,9 +5252,10 @@ function registerComponent$5(runtime) {
5226
5252
  value: Shapes.SQUARE,
5227
5253
  icon: "ButtonSquare16"
5228
5254
  }],
5229
- defaultValue: Shapes.ROUNDED
5230
- }),
5231
- size: ResponsiveIconRadioGroup({
5255
+ defaultValue: Shapes.ROUNDED,
5256
+ hidden: props.tableId == null
5257
+ })),
5258
+ size: ResponsiveIconRadioGroup((props) => ({
5232
5259
  label: "Size",
5233
5260
  options: [{
5234
5261
  label: "Small",
@@ -5243,9 +5270,10 @@ function registerComponent$5(runtime) {
5243
5270
  value: Sizes.LARGE,
5244
5271
  icon: "SizeLarge16"
5245
5272
  }],
5246
- defaultValue: Sizes.MEDIUM
5247
- }),
5248
- contrast: ResponsiveIconRadioGroup({
5273
+ defaultValue: Sizes.MEDIUM,
5274
+ hidden: (props == null ? void 0 : props.tableId) == null
5275
+ })),
5276
+ contrast: ResponsiveIconRadioGroup((props) => ({
5249
5277
  label: "Color",
5250
5278
  options: [{
5251
5279
  label: "Light mode",
@@ -5256,30 +5284,41 @@ function registerComponent$5(runtime) {
5256
5284
  value: Contrasts.DARK,
5257
5285
  icon: "Moon16"
5258
5286
  }],
5259
- defaultValue: Contrasts.LIGHT
5260
- }),
5287
+ defaultValue: Contrasts.LIGHT,
5288
+ hidden: props.tableId == null
5289
+ })),
5261
5290
  labelTextStyle: TextStyle({
5262
5291
  label: "Label text style"
5263
5292
  }),
5264
- labelTextColor: ResponsiveColor({
5265
- label: "Label text color"
5293
+ labelTextColor: ResponsiveColor((props, device) => {
5294
+ const hidden = props.tableId == null;
5295
+ const responsiveContrast = props.contrast;
5296
+ const contrast = findDeviceOverride(responsiveContrast, device);
5297
+ return {
5298
+ hidden,
5299
+ label: "Label text color",
5300
+ placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
5301
+ };
5266
5302
  }),
5267
5303
  submitTextStyle: TextStyle({
5268
5304
  label: "Button text style"
5269
5305
  }),
5270
- brandColor: ResponsiveColor({
5306
+ brandColor: ResponsiveColor((props) => ({
5271
5307
  label: "Button color",
5272
- placeholder: "black"
5273
- }),
5274
- submitTextColor: ResponsiveColor({
5308
+ placeholder: "black",
5309
+ hidden: props.tableId == null
5310
+ })),
5311
+ submitTextColor: ResponsiveColor((props) => ({
5275
5312
  label: "Button text color",
5276
- placeholder: "white"
5277
- }),
5278
- submitLabel: TextInput({
5313
+ placeholder: "white",
5314
+ hidden: props.tableId == null
5315
+ })),
5316
+ submitLabel: TextInput((props) => ({
5279
5317
  label: "Button label",
5280
- placeholder: "Submit"
5281
- }),
5282
- submitVariant: ResponsiveSelect({
5318
+ placeholder: "Submit",
5319
+ hidden: props.tableId == null
5320
+ })),
5321
+ submitVariant: ResponsiveSelect((props) => ({
5283
5322
  label: "Button style",
5284
5323
  options: [{
5285
5324
  value: "flat",
@@ -5303,12 +5342,14 @@ function registerComponent$5(runtime) {
5303
5342
  value: "skewed",
5304
5343
  label: "Skewed"
5305
5344
  }],
5306
- defaultValue: "flat"
5307
- }),
5308
- submitWidth: ResponsiveLength({
5309
- label: "Button width"
5310
- }),
5311
- submitAlignment: ResponsiveIconRadioGroup({
5345
+ defaultValue: "flat",
5346
+ hidden: props.tableId == null
5347
+ })),
5348
+ submitWidth: ResponsiveLength((props) => ({
5349
+ label: "Button width",
5350
+ hidden: props.tableId == null
5351
+ })),
5352
+ submitAlignment: ResponsiveIconRadioGroup((props) => ({
5312
5353
  label: "Button alignment",
5313
5354
  options: [{
5314
5355
  label: "Left",
@@ -5323,8 +5364,9 @@ function registerComponent$5(runtime) {
5323
5364
  value: Alignments.RIGHT,
5324
5365
  icon: "AlignRight16"
5325
5366
  }],
5326
- defaultValue: Alignments.CENTER
5327
- }),
5367
+ defaultValue: Alignments.CENTER,
5368
+ hidden: props.tableId == null
5369
+ })),
5328
5370
  width: Width({
5329
5371
  format: Width.Formats.ClassName,
5330
5372
  preset: [{
@@ -5931,30 +5973,47 @@ function registerComponent$4(runtime) {
5931
5973
  props: {
5932
5974
  id: ElementID(),
5933
5975
  links: NavigationLinks(),
5934
- linkTextStyle: TextStyle({
5935
- label: "Link text style"
5976
+ linkTextStyle: TextStyle((props) => {
5977
+ const links2 = props.links;
5978
+ return {
5979
+ label: "Link text style",
5980
+ hidden: links2 == null || links2.length === 0
5981
+ };
5936
5982
  }),
5937
5983
  showLogo: Checkbox$1({
5938
5984
  preset: true,
5939
5985
  label: "Show logo"
5940
5986
  }),
5941
- logoFile: Image$1({
5942
- label: "Logo"
5943
- }),
5944
- logoWidth: ResponsiveLength({
5987
+ logoFile: Image$1((props) => ({
5988
+ label: "Logo",
5989
+ hidden: props.showLogo === false
5990
+ })),
5991
+ logoWidth: ResponsiveLength((props) => ({
5992
+ preset: [{
5993
+ deviceId: "desktop",
5994
+ value: {
5995
+ value: 100,
5996
+ unit: "px"
5997
+ }
5998
+ }],
5945
5999
  label: "Logo width",
6000
+ min: 0,
6001
+ max: 1e3,
5946
6002
  options: [{
5947
6003
  value: "px",
5948
6004
  label: "Pixels",
5949
6005
  icon: "Px16"
5950
- }]
5951
- }),
5952
- logoAltText: TextInput({
5953
- label: "Logo alt text"
5954
- }),
5955
- logoLink: Link$1({
5956
- label: "Logo on click"
5957
- }),
6006
+ }],
6007
+ hidden: props.showLogo === false
6008
+ })),
6009
+ logoAltText: TextInput((props) => ({
6010
+ label: "Logo alt text",
6011
+ hidden: props.showLogo === false
6012
+ })),
6013
+ logoLink: Link$1((props) => ({
6014
+ label: "Logo on click",
6015
+ hidden: props.showLogo === false
6016
+ })),
5958
6017
  alignment: ResponsiveIconRadioGroup({
5959
6018
  label: "Alignment",
5960
6019
  options: [{
@@ -5999,17 +6058,32 @@ function registerComponent$4(runtime) {
5999
6058
  label: "Cover from left"
6000
6059
  }]
6001
6060
  }),
6002
- mobileMenuOpenIconColor: ResponsiveColor({
6003
- label: "Open icon color",
6004
- placeholder: "rgba(161, 168, 194, 0.5)"
6061
+ mobileMenuOpenIconColor: ResponsiveColor((props, device) => {
6062
+ const mobileMenuAnimation = props.mobileMenuAnimation;
6063
+ const hidden = !findDeviceOverride(mobileMenuAnimation, device);
6064
+ return {
6065
+ label: "Open icon color",
6066
+ placeholder: "rgba(161, 168, 194, 0.5)",
6067
+ hidden
6068
+ };
6005
6069
  }),
6006
- mobileMenuCloseIconColor: ResponsiveColor({
6007
- label: "Close icon color",
6008
- placeholder: "rgba(161, 168, 194, 0.5)"
6070
+ mobileMenuCloseIconColor: ResponsiveColor((props, device) => {
6071
+ const mobileMenuAnimation = props.mobileMenuAnimation;
6072
+ const hidden = !findDeviceOverride(mobileMenuAnimation, device);
6073
+ return {
6074
+ label: "Close icon color",
6075
+ placeholder: "rgba(161, 168, 194, 0.5)",
6076
+ hidden
6077
+ };
6009
6078
  }),
6010
- mobileMenuBackgroundColor: ResponsiveColor({
6011
- label: "Menu BG color",
6012
- placeholder: "black"
6079
+ mobileMenuBackgroundColor: ResponsiveColor((props, device) => {
6080
+ const mobileMenuAnimation = props.mobileMenuAnimation;
6081
+ const hidden = !findDeviceOverride(mobileMenuAnimation, device);
6082
+ return {
6083
+ label: "Menu BG color",
6084
+ placeholder: "black",
6085
+ hidden
6086
+ };
6013
6087
  }),
6014
6088
  width: Width({
6015
6089
  format: Width.Formats.ClassName,
@@ -6926,67 +7000,90 @@ function registerComponent$2(runtime) {
6926
7000
  openInNewTab: false
6927
7001
  }
6928
7002
  }),
6929
- shape: ResponsiveIconRadioGroup({
6930
- label: "Shape",
6931
- options: [{
6932
- label: "Naked",
6933
- value: "naked",
6934
- icon: "Star16"
6935
- }, {
6936
- label: "Circle",
6937
- value: "circle",
6938
- icon: "StarCircle16"
6939
- }, {
6940
- label: "Rounded",
6941
- value: "rounded",
6942
- icon: "StarRoundedSquare16"
6943
- }, {
6944
- label: "Square",
6945
- value: "square",
6946
- icon: "StarSquare16"
6947
- }],
6948
- defaultValue: "naked"
7003
+ shape: ResponsiveIconRadioGroup((props) => {
7004
+ const links2 = props.links;
7005
+ return {
7006
+ label: "Shape",
7007
+ options: [{
7008
+ label: "Naked",
7009
+ value: "naked",
7010
+ icon: "Star16"
7011
+ }, {
7012
+ label: "Circle",
7013
+ value: "circle",
7014
+ icon: "StarCircle16"
7015
+ }, {
7016
+ label: "Rounded",
7017
+ value: "rounded",
7018
+ icon: "StarRoundedSquare16"
7019
+ }, {
7020
+ label: "Square",
7021
+ value: "square",
7022
+ icon: "StarSquare16"
7023
+ }],
7024
+ defaultValue: "naked",
7025
+ hidden: links2 == null || links2.links.length === 0
7026
+ };
6949
7027
  }),
6950
- size: ResponsiveIconRadioGroup({
6951
- label: "Size",
6952
- options: [{
6953
- label: "Small",
6954
- value: "small",
6955
- icon: "SizeSmall16"
6956
- }, {
6957
- label: "Medium",
6958
- value: "medium",
6959
- icon: "SizeMedium16"
6960
- }, {
6961
- label: "Large",
6962
- value: "large",
6963
- icon: "SizeLarge16"
6964
- }],
6965
- defaultValue: "medium"
7028
+ size: ResponsiveIconRadioGroup((props) => {
7029
+ const links2 = props.links;
7030
+ return {
7031
+ label: "Size",
7032
+ options: [{
7033
+ label: "Small",
7034
+ value: "small",
7035
+ icon: "SizeSmall16"
7036
+ }, {
7037
+ label: "Medium",
7038
+ value: "medium",
7039
+ icon: "SizeMedium16"
7040
+ }, {
7041
+ label: "Large",
7042
+ value: "large",
7043
+ icon: "SizeLarge16"
7044
+ }],
7045
+ defaultValue: "medium",
7046
+ hidden: links2 == null || links2.links.length === 0
7047
+ };
6966
7048
  }),
6967
- hoverStyle: ResponsiveSelect({
6968
- label: "On hover",
6969
- options: [{
6970
- value: "none",
6971
- label: "None"
6972
- }, {
6973
- value: "grow",
6974
- label: "Grow"
6975
- }, {
6976
- value: "shrink",
6977
- label: "Shrink"
6978
- }, {
6979
- value: "fade",
6980
- label: "Fade"
6981
- }],
6982
- defaultValue: "none",
6983
- labelOrientation: "horizontal"
7049
+ hoverStyle: ResponsiveSelect((props) => {
7050
+ const links2 = props.links;
7051
+ const hidden = links2 == null || links2.links.length === 0;
7052
+ return {
7053
+ label: "On hover",
7054
+ options: [{
7055
+ value: "none",
7056
+ label: "None"
7057
+ }, {
7058
+ value: "grow",
7059
+ label: "Grow"
7060
+ }, {
7061
+ value: "shrink",
7062
+ label: "Shrink"
7063
+ }, {
7064
+ value: "fade",
7065
+ label: "Fade"
7066
+ }],
7067
+ defaultValue: "none",
7068
+ labelOrientation: "horizontal",
7069
+ hidden
7070
+ };
6984
7071
  }),
6985
- fill: ResponsiveColor({
6986
- label: "Icon color"
7072
+ fill: ResponsiveColor((props) => {
7073
+ const links2 = props.links;
7074
+ const hidden = links2 == null || links2.links.length === 0;
7075
+ return {
7076
+ label: "Icon color",
7077
+ hidden
7078
+ };
6987
7079
  }),
6988
- backgroundColor: ResponsiveColor({
6989
- label: "Shape color"
7080
+ backgroundColor: ResponsiveColor((props) => {
7081
+ const links2 = props.links;
7082
+ const hidden = links2 == null || links2.links.length === 0;
7083
+ return {
7084
+ label: "Shape color",
7085
+ hidden
7086
+ };
6990
7087
  }),
6991
7088
  alignment: ResponsiveIconRadioGroup({
6992
7089
  label: "Alignment",
@@ -7438,7 +7535,7 @@ function registerComponent$1(runtime) {
7438
7535
  label: "Text",
7439
7536
  props: {
7440
7537
  id: ElementID(),
7441
- text: RichText({
7538
+ text: RichText(() => ({
7442
7539
  preset: {
7443
7540
  document: {
7444
7541
  nodes: [{
@@ -7479,7 +7576,7 @@ function registerComponent$1(runtime) {
7479
7576
  }]
7480
7577
  }
7481
7578
  }
7482
- }),
7579
+ })),
7483
7580
  width: Width({
7484
7581
  format: Width.Formats.ClassName,
7485
7582
  preset: [{
@@ -7675,6 +7772,74 @@ const FallbackComponent = forwardRef(function FallbackComponent2({
7675
7772
  })]
7676
7773
  });
7677
7774
  });
7775
+ function useStyleControlDataClass(style, controlDefinition) {
7776
+ const { properties } = controlDefinition.config;
7777
+ return css$1(__spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
7778
+ maxWidth: "100%"
7779
+ }), responsiveStyle([
7780
+ style == null ? void 0 : style.width,
7781
+ style == null ? void 0 : style.margin,
7782
+ style == null ? void 0 : style.padding,
7783
+ useBorder(style == null ? void 0 : style.border),
7784
+ style == null ? void 0 : style.borderRadius
7785
+ ], ([width, margin, padding, border, borderRadius]) => {
7786
+ var _a, _b, _c, _d, _e, _f, _g2, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
7787
+ return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
7788
+ width: (_a = widthToString(width)) != null ? _a : "100%"
7789
+ }), properties.includes(StyleControlProperty.Margin) && {
7790
+ marginTop: (_b = marginToString(margin == null ? void 0 : margin.marginTop)) != null ? _b : 0,
7791
+ marginRight: (_c = marginToString(margin == null ? void 0 : margin.marginRight)) != null ? _c : "auto",
7792
+ marginBottom: (_d = marginToString(margin == null ? void 0 : margin.marginBottom)) != null ? _d : 0,
7793
+ marginLeft: (_e = marginToString(margin == null ? void 0 : margin.marginLeft)) != null ? _e : "auto"
7794
+ }), properties.includes(StyleControlProperty.Padding) && {
7795
+ paddingTop: (_f = paddingToString(padding == null ? void 0 : padding.paddingTop)) != null ? _f : 0,
7796
+ paddingRight: (_g2 = paddingToString(padding == null ? void 0 : padding.paddingRight)) != null ? _g2 : 0,
7797
+ paddingBottom: (_h = paddingToString(padding == null ? void 0 : padding.paddingBottom)) != null ? _h : 0,
7798
+ paddingLeft: (_i = paddingToString(padding == null ? void 0 : padding.paddingLeft)) != null ? _i : 0
7799
+ }), properties.includes(StyleControlProperty.Border) && {
7800
+ borderTop: (_j = borderSideToString(border == null ? void 0 : border.borderTop)) != null ? _j : "0 solid black",
7801
+ borderRight: (_k = borderSideToString(border == null ? void 0 : border.borderRight)) != null ? _k : "0 solid black",
7802
+ borderBottom: (_l = borderSideToString(border == null ? void 0 : border.borderBottom)) != null ? _l : "0 solid black",
7803
+ borderLeft: (_m = borderSideToString(border == null ? void 0 : border.borderLeft)) != null ? _m : "0 solid black"
7804
+ }), properties.includes(StyleControlProperty.BorderRadius) && {
7805
+ borderTopLeftRadius: (_n = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _n : 0,
7806
+ borderTopRightRadius: (_o = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _o : 0,
7807
+ borderBottomRightRadius: (_p = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _p : 0,
7808
+ borderBottomLeftRadius: (_q = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _q : 0
7809
+ });
7810
+ })));
7811
+ function widthToString(widthProperty) {
7812
+ if (widthProperty == null)
7813
+ return null;
7814
+ return `${widthProperty.value}${widthProperty.unit}`;
7815
+ }
7816
+ function marginToString(marginProperty) {
7817
+ if (marginProperty == null)
7818
+ return null;
7819
+ if (marginProperty === "auto")
7820
+ return marginProperty;
7821
+ return `${marginProperty.value}${marginProperty.unit}`;
7822
+ }
7823
+ function paddingToString(paddingProperty) {
7824
+ if (paddingProperty == null)
7825
+ return null;
7826
+ return `${paddingProperty.value}${paddingProperty.unit}`;
7827
+ }
7828
+ function borderSideToString(borderSide) {
7829
+ if (borderSide == null)
7830
+ return null;
7831
+ const { width, color, style: style2 } = borderSide;
7832
+ return `${width != null ? width : 0}px ${style2} ${color != null ? colorToString(color) : "black"}`;
7833
+ }
7834
+ function borderRadiusToString(borderRadius) {
7835
+ if (borderRadius == null)
7836
+ return null;
7837
+ return `${borderRadius.value}${borderRadius.unit}`;
7838
+ }
7839
+ }
7840
+ function useFormattedStyle(styleControlData, controlDefinition) {
7841
+ return useStyleControlDataClass(styleControlData, controlDefinition);
7842
+ }
7678
7843
  function useDeviceMode() {
7679
7844
  return "desktop";
7680
7845
  }
@@ -7699,6 +7864,8 @@ function useProps(element) {
7699
7864
  }
7700
7865
  case Types.Width:
7701
7866
  return [propName, useWidth(props[propName], descriptor, props)];
7867
+ case StyleControlType:
7868
+ return [propName, useFormattedStyle(props[propName], descriptor)];
7702
7869
  default:
7703
7870
  return [propName, props[propName]];
7704
7871
  }