@makeswift/runtime 0.7.17 → 0.7.18

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/dist/Box.cjs.js +1 -1
  2. package/dist/Box.es.js +1 -1
  3. package/dist/Button.cjs.js +2 -2
  4. package/dist/Button.es.js +2 -2
  5. package/dist/Carousel.cjs.js +3 -3
  6. package/dist/Carousel.es.js +3 -3
  7. package/dist/Countdown.cjs.js +3 -3
  8. package/dist/Countdown.es.js +3 -3
  9. package/dist/Divider.cjs.js +3 -3
  10. package/dist/Divider.es.js +3 -3
  11. package/dist/Embed.cjs.js +3 -3
  12. package/dist/Embed.es.js +3 -3
  13. package/dist/Form.cjs.js +1 -1
  14. package/dist/Form.es.js +1 -1
  15. package/dist/Image.cjs.js +3 -3
  16. package/dist/Image.es.js +3 -3
  17. package/dist/LiveProvider.cjs.js +3 -3
  18. package/dist/LiveProvider.es.js +3 -3
  19. package/dist/Navigation.cjs.js +3 -3
  20. package/dist/Navigation.es.js +3 -3
  21. package/dist/PreviewProvider.cjs.js +8 -8
  22. package/dist/PreviewProvider.cjs.js.map +1 -1
  23. package/dist/PreviewProvider.es.js +1 -1
  24. package/dist/ReadOnlyText.cjs.js +55 -55
  25. package/dist/ReadOnlyText.cjs.js.map +1 -1
  26. package/dist/ReadOnlyText.es.js +3 -3
  27. package/dist/Root.cjs.js +3 -3
  28. package/dist/Root.es.js +3 -3
  29. package/dist/SocialLinks.cjs.js +2 -2
  30. package/dist/SocialLinks.es.js +2 -2
  31. package/dist/Text.cjs.js +3 -3
  32. package/dist/Text.es.js +3 -3
  33. package/dist/Video.cjs.js +3 -3
  34. package/dist/Video.es.js +3 -3
  35. package/dist/builder.cjs.js +2 -2
  36. package/dist/builder.es.js +2 -2
  37. package/dist/components.cjs.js +1 -1
  38. package/dist/components.es.js +1 -1
  39. package/dist/constants.cjs.js +14 -14
  40. package/dist/constants.cjs.js.map +1 -1
  41. package/dist/constants.es.js +1 -1
  42. package/dist/control-serialization.cjs.js +41 -41
  43. package/dist/control-serialization.cjs.js.map +1 -1
  44. package/dist/control-serialization.es.js +1 -1
  45. package/dist/controls.cjs.js +46 -44
  46. package/dist/controls.cjs.js.map +1 -1
  47. package/dist/controls.es.js +2 -2
  48. package/dist/{rich-text.cjs.js → descriptors.cjs.js} +476 -459
  49. package/dist/descriptors.cjs.js.map +1 -0
  50. package/dist/{rich-text.es.js → descriptors.es.js} +467 -452
  51. package/dist/descriptors.es.js.map +1 -0
  52. package/dist/index.cjs.js +241 -210
  53. package/dist/index.cjs.js.map +1 -1
  54. package/dist/index.cjs2.js +1 -1
  55. package/dist/index.cjs5.js +16 -16
  56. package/dist/index.cjs5.js.map +1 -1
  57. package/dist/index.cjs6.js +3 -3
  58. package/dist/index.cjs7.js +35 -35
  59. package/dist/index.cjs7.js.map +1 -1
  60. package/dist/index.es.js +44 -13
  61. package/dist/index.es.js.map +1 -1
  62. package/dist/index.es2.js +1 -1
  63. package/dist/index.es5.js +1 -1
  64. package/dist/index.es6.js +3 -3
  65. package/dist/index.es7.js +1 -1
  66. package/dist/introspection.cjs.js +22 -22
  67. package/dist/introspection.cjs.js.map +1 -1
  68. package/dist/introspection.es.js +1 -1
  69. package/dist/main.cjs.js +1 -1
  70. package/dist/main.es.js +1 -1
  71. package/dist/next.cjs.js +3 -3
  72. package/dist/next.es.js +3 -3
  73. package/dist/prop-controllers.cjs.js +5 -5
  74. package/dist/prop-controllers.es.js +2 -2
  75. package/dist/react.cjs.js +3 -3
  76. package/dist/react.es.js +3 -3
  77. package/dist/slate.cjs.js +4 -4
  78. package/dist/slate.es.js +4 -4
  79. package/dist/types/src/components/builtin/Button/Button.d.ts +1 -1
  80. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
  81. package/dist/types/src/controls/control.d.ts +3 -2
  82. package/dist/types/src/controls/control.d.ts.map +1 -1
  83. package/dist/types/src/controls/shape.d.ts +1 -1
  84. package/dist/types/src/controls/shape.d.ts.map +1 -1
  85. package/dist/types/src/controls/style.d.ts +17 -0
  86. package/dist/types/src/controls/style.d.ts.map +1 -1
  87. package/dist/types/src/prop-controllers/descriptors.d.ts +1 -2
  88. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  89. package/dist/types/src/prop-controllers/instances.d.ts +3 -3
  90. package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
  91. package/dist/types/src/runtimes/react/controls/control.d.ts +3 -2
  92. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  93. package/dist/types/src/runtimes/react/controls/style.d.ts +2 -2
  94. package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
  95. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  96. package/package.json +1 -1
  97. package/dist/rich-text.cjs.js.map +0 -1
  98. package/dist/rich-text.es.js.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -45,7 +45,7 @@ var css = require("@emotion/css");
45
45
  var serialize = require("@emotion/serialize");
46
46
  var utils = require("@emotion/utils");
47
47
  var jsxRuntime = require("react/jsx-runtime");
48
- var richText = require("./rich-text.cjs.js");
48
+ var descriptors = require("./descriptors.cjs.js");
49
49
  require("slate");
50
50
  var textInput = require("./text-input.cjs.js");
51
51
  var combobox = require("./combobox.cjs.js");
@@ -55,9 +55,9 @@ var introspection = require("./introspection.cjs.js");
55
55
  var redux = require("redux");
56
56
  var thunk = require("redux-thunk");
57
57
  var types = require("./types.cjs.js");
58
+ var boxModels = require("./box-models.cjs.js");
58
59
  var ColorHelper = require("color");
59
60
  var scrollIntoView = require("scroll-into-view-if-needed");
60
- var boxModels = require("./box-models.cjs.js");
61
61
  var reactDom = require("react-dom");
62
62
  var parse = require("html-react-parser");
63
63
  var Head = require("next/head");
@@ -148,7 +148,7 @@ function BodySnippet({
148
148
  return null;
149
149
  }
150
150
  async function introspect(element, client, store) {
151
- const descriptors = constants.getPropControllerDescriptors(store.getState());
151
+ const descriptors$1 = constants.getPropControllerDescriptors(store.getState());
152
152
  const swatchIds = /* @__PURE__ */ new Set();
153
153
  const fileIds = /* @__PURE__ */ new Set();
154
154
  const typographyIds = /* @__PURE__ */ new Set();
@@ -173,13 +173,13 @@ async function introspect(element, client, store) {
173
173
  remaining.push(child);
174
174
  }
175
175
  });
176
- if (descriptor.type === richText.ShapeControlType) {
176
+ if (descriptor.type === descriptors.ShapeControlType) {
177
177
  const prop = props[propName];
178
178
  if (prop == null)
179
179
  return;
180
180
  getResourcesFromElementDescriptors(descriptor.config.type, prop);
181
181
  }
182
- if (descriptor.type === richText.ListControlType) {
182
+ if (descriptor.type === descriptors.ListControlType) {
183
183
  const prop = props[propName];
184
184
  if (prop == null)
185
185
  return;
@@ -187,13 +187,13 @@ async function introspect(element, client, store) {
187
187
  getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
188
188
  });
189
189
  }
190
- if (descriptor.type === richText.Types.Shape) {
190
+ if (descriptor.type === descriptors.Types.Shape) {
191
191
  const prop = props[propName];
192
192
  if (prop == null)
193
193
  return;
194
194
  getResourcesFromElementDescriptors(descriptor.options.type, prop);
195
195
  }
196
- if (descriptor.type === richText.Types.List) {
196
+ if (descriptor.type === descriptors.Types.List) {
197
197
  const prop = props[propName];
198
198
  if (prop == null)
199
199
  return;
@@ -213,7 +213,7 @@ async function introspect(element, client, store) {
213
213
  } else {
214
214
  element2 = current;
215
215
  }
216
- const elementDescriptors = descriptors.get(element2.type);
216
+ const elementDescriptors = descriptors$1.get(element2.type);
217
217
  if (elementDescriptors == null)
218
218
  continue;
219
219
  getResourcesFromElementDescriptors(elementDescriptors, element2.props);
@@ -1002,7 +1002,7 @@ function useCachedSite(siteId) {
1002
1002
  const site = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
1003
1003
  return site;
1004
1004
  }
1005
- const version = "0.7.17";
1005
+ const version = "0.7.18";
1006
1006
  class Makeswift {
1007
1007
  constructor(apiKey, { apiOrigin = "https://api.makeswift.com" } = {}) {
1008
1008
  __publicField(this, "apiKey");
@@ -1809,13 +1809,13 @@ function registerComponent$c(runtime) {
1809
1809
  type: constants.MakeswiftComponentType.Box,
1810
1810
  label: "Box",
1811
1811
  props: {
1812
- id: richText.ElementID(),
1813
- backgrounds: richText.Backgrounds(),
1814
- width: richText.Width({
1815
- format: richText.Width.Format.ClassName,
1812
+ id: descriptors.ElementID(),
1813
+ backgrounds: descriptors.Backgrounds(),
1814
+ width: descriptors.Width({
1815
+ format: descriptors.Width.Format.ClassName,
1816
1816
  defaultValue: { value: 100, unit: "%" }
1817
1817
  }),
1818
- height: richText.ResponsiveIconRadioGroup({
1818
+ height: descriptors.ResponsiveIconRadioGroup({
1819
1819
  label: "Height",
1820
1820
  options: [
1821
1821
  { value: "auto", label: "Auto", icon: "HeightAuto16" },
@@ -1823,7 +1823,7 @@ function registerComponent$c(runtime) {
1823
1823
  ],
1824
1824
  defaultValue: "auto"
1825
1825
  }),
1826
- verticalAlign: richText.ResponsiveIconRadioGroup({
1826
+ verticalAlign: descriptors.ResponsiveIconRadioGroup({
1827
1827
  label: "Align items",
1828
1828
  options: [
1829
1829
  { value: "flex-start", label: "Top", icon: "VerticalAlignStart16" },
@@ -1837,9 +1837,9 @@ function registerComponent$c(runtime) {
1837
1837
  ],
1838
1838
  defaultValue: "flex-start"
1839
1839
  }),
1840
- margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
1841
- padding: richText.Padding({
1842
- format: richText.Padding.Format.ClassName,
1840
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
1841
+ padding: descriptors.Padding({
1842
+ format: descriptors.Padding.Format.ClassName,
1843
1843
  preset: [
1844
1844
  {
1845
1845
  deviceId: "desktop",
@@ -1852,16 +1852,16 @@ function registerComponent$c(runtime) {
1852
1852
  }
1853
1853
  ]
1854
1854
  }),
1855
- border: richText.Border({ format: richText.Border.Format.ClassName }),
1856
- borderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName }),
1857
- boxShadow: richText.Shadows({ format: richText.Shadows.Format.ClassName }),
1858
- rowGap: richText.GapY((props) => ({
1855
+ border: descriptors.Border({ format: descriptors.Border.Format.ClassName }),
1856
+ borderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName }),
1857
+ boxShadow: descriptors.Shadows({ format: descriptors.Shadows.Format.ClassName }),
1858
+ rowGap: descriptors.GapY((props) => ({
1859
1859
  hidden: props.children == null
1860
1860
  })),
1861
- columnGap: richText.GapX((props) => ({
1861
+ columnGap: descriptors.GapX((props) => ({
1862
1862
  hidden: props.children == null
1863
1863
  })),
1864
- boxAnimateType: richText.ResponsiveSelect({
1864
+ boxAnimateType: descriptors.ResponsiveSelect({
1865
1865
  label: "Animate box in",
1866
1866
  labelOrientation: "vertical",
1867
1867
  options: [
@@ -1877,7 +1877,7 @@ function registerComponent$c(runtime) {
1877
1877
  ],
1878
1878
  defaultValue: "none"
1879
1879
  }),
1880
- boxAnimateDuration: richText.ResponsiveNumber((props, device) => ({
1880
+ boxAnimateDuration: descriptors.ResponsiveNumber((props, device) => ({
1881
1881
  label: "Box duration",
1882
1882
  defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
1883
1883
  min: 0.1,
@@ -1885,7 +1885,7 @@ function registerComponent$c(runtime) {
1885
1885
  suffix: "s",
1886
1886
  hidden: isHiddenBasedOnBoxAnimation(props, device)
1887
1887
  })),
1888
- boxAnimateDelay: richText.ResponsiveNumber((props, device) => ({
1888
+ boxAnimateDelay: descriptors.ResponsiveNumber((props, device) => ({
1889
1889
  label: "Box delay",
1890
1890
  defaultValue: DEFAULT_BOX_ANIMATE_DELAY,
1891
1891
  min: 0,
@@ -1893,7 +1893,7 @@ function registerComponent$c(runtime) {
1893
1893
  suffix: "s",
1894
1894
  hidden: isHiddenBasedOnBoxAnimation(props, device)
1895
1895
  })),
1896
- itemAnimateType: richText.ResponsiveSelect({
1896
+ itemAnimateType: descriptors.ResponsiveSelect({
1897
1897
  label: "Animate items in",
1898
1898
  labelOrientation: "vertical",
1899
1899
  options: [
@@ -1909,7 +1909,7 @@ function registerComponent$c(runtime) {
1909
1909
  ],
1910
1910
  defaultValue: "none"
1911
1911
  }),
1912
- itemAnimateDuration: richText.ResponsiveNumber((props, device) => ({
1912
+ itemAnimateDuration: descriptors.ResponsiveNumber((props, device) => ({
1913
1913
  label: "Items duration",
1914
1914
  defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
1915
1915
  min: 0.1,
@@ -1917,7 +1917,7 @@ function registerComponent$c(runtime) {
1917
1917
  suffix: "s",
1918
1918
  hidden: isHiddenBasedOnItemAnimation(props, device)
1919
1919
  })),
1920
- itemAnimateDelay: richText.ResponsiveNumber((props, device) => ({
1920
+ itemAnimateDelay: descriptors.ResponsiveNumber((props, device) => ({
1921
1921
  label: "Items delay",
1922
1922
  defaultValue: DEFAULT_ITEM_ANIMATE_DELAY,
1923
1923
  min: 0,
@@ -1925,7 +1925,7 @@ function registerComponent$c(runtime) {
1925
1925
  suffix: "s",
1926
1926
  hidden: isHiddenBasedOnItemAnimation(props, device)
1927
1927
  })),
1928
- itemStaggerDuration: richText.ResponsiveNumber((props, device) => ({
1928
+ itemStaggerDuration: descriptors.ResponsiveNumber((props, device) => ({
1929
1929
  label: "Stagger",
1930
1930
  min: 0,
1931
1931
  step: 0.05,
@@ -1933,11 +1933,11 @@ function registerComponent$c(runtime) {
1933
1933
  defaultValue: DEFAULT_ITEM_STAGGER_DURATION,
1934
1934
  hidden: isHiddenBasedOnItemAnimation(props, device)
1935
1935
  })),
1936
- hidePlaceholder: richText.Checkbox((props) => ({
1936
+ hidePlaceholder: descriptors.Checkbox((props) => ({
1937
1937
  label: "Hide placeholder",
1938
1938
  hidden: props.children != null
1939
1939
  })),
1940
- children: richText.Grid()
1940
+ children: descriptors.Grid()
1941
1941
  }
1942
1942
  });
1943
1943
  }
@@ -1948,9 +1948,9 @@ function registerComponent$b(runtime) {
1948
1948
  type: constants.MakeswiftComponentType.Button,
1949
1949
  label: "Button",
1950
1950
  props: {
1951
- id: richText.ElementID(),
1952
- children: richText.TextInput({ placeholder: "Button text" }),
1953
- link: richText.Link({
1951
+ id: descriptors.ElementID(),
1952
+ children: descriptors.TextInput({ placeholder: "Button text" }),
1953
+ link: descriptors.Link({
1954
1954
  defaultValue: {
1955
1955
  type: "OPEN_PAGE",
1956
1956
  payload: {
@@ -1959,7 +1959,7 @@ function registerComponent$b(runtime) {
1959
1959
  }
1960
1960
  }
1961
1961
  }),
1962
- variant: richText.ResponsiveSelect({
1962
+ variant: descriptors.ResponsiveSelect({
1963
1963
  label: "Style",
1964
1964
  labelOrientation: "horizontal",
1965
1965
  options: [
@@ -1973,7 +1973,7 @@ function registerComponent$b(runtime) {
1973
1973
  ],
1974
1974
  defaultValue: "flat"
1975
1975
  }),
1976
- shape: richText.ResponsiveIconRadioGroup({
1976
+ shape: descriptors.ResponsiveIconRadioGroup({
1977
1977
  label: "Shape",
1978
1978
  options: [
1979
1979
  { label: "Pill", value: "pill", icon: "ButtonPill16" },
@@ -1982,7 +1982,7 @@ function registerComponent$b(runtime) {
1982
1982
  ],
1983
1983
  defaultValue: "rounded"
1984
1984
  }),
1985
- size: richText.ResponsiveIconRadioGroup({
1985
+ size: descriptors.ResponsiveIconRadioGroup({
1986
1986
  label: "Size",
1987
1987
  options: [
1988
1988
  { label: "Small", value: "small", icon: "SizeSmall16" },
@@ -1991,19 +1991,19 @@ function registerComponent$b(runtime) {
1991
1991
  ],
1992
1992
  defaultValue: "medium"
1993
1993
  }),
1994
- color: richText.ResponsiveColor((props, device) => {
1994
+ color: descriptors.ResponsiveColor((props, device) => {
1995
1995
  var _a;
1996
1996
  const variant = props.variant;
1997
1997
  const hidden = ((_a = findDeviceOverride(variant, device)) == null ? void 0 : _a.value) === "clear";
1998
1998
  return { placeholder: "black", hidden };
1999
1999
  }),
2000
- textColor: richText.ResponsiveColor({
2000
+ textColor: descriptors.ResponsiveColor({
2001
2001
  label: "Text color",
2002
2002
  placeholder: "white"
2003
2003
  }),
2004
- textStyle: richText.TextStyle(),
2005
- width: richText.Width(),
2006
- margin: richText.Margin({ format: richText.Margin.Format.ClassName })
2004
+ textStyle: descriptors.TextStyle(),
2005
+ width: descriptors.Width(),
2006
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
2007
2007
  }
2008
2008
  });
2009
2009
  }
@@ -2015,20 +2015,20 @@ function registerComponent$a(runtime) {
2015
2015
  label: "Carousel",
2016
2016
  icon: "Carousel40",
2017
2017
  props: {
2018
- id: richText.ElementID(),
2019
- images: richText.Images({
2018
+ id: descriptors.ElementID(),
2019
+ images: descriptors.Images({
2020
2020
  preset: [
2021
2021
  { key: uuid.v4(), props: {} },
2022
2022
  { key: uuid.v4(), props: {} },
2023
2023
  { key: uuid.v4(), props: {} }
2024
2024
  ]
2025
2025
  }),
2026
- width: richText.Width({
2027
- format: richText.Width.Format.ClassName,
2026
+ width: descriptors.Width({
2027
+ format: descriptors.Width.Format.ClassName,
2028
2028
  defaultValue: { value: 400, unit: "px" }
2029
2029
  }),
2030
- margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
2031
- pageSize: richText.ResponsiveNumber((props) => {
2030
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
2031
+ pageSize: descriptors.ResponsiveNumber((props) => {
2032
2032
  var _a;
2033
2033
  const images = props.images;
2034
2034
  const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
@@ -2040,7 +2040,7 @@ function registerComponent$a(runtime) {
2040
2040
  step: 1
2041
2041
  };
2042
2042
  }),
2043
- step: richText.ResponsiveNumber((props, device) => {
2043
+ step: descriptors.ResponsiveNumber((props, device) => {
2044
2044
  var _a, _b;
2045
2045
  const pageSize = props.pageSize;
2046
2046
  const pageSizeValue = (_b = (_a = findDeviceOverride(pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
@@ -2052,7 +2052,7 @@ function registerComponent$a(runtime) {
2052
2052
  step: 1
2053
2053
  };
2054
2054
  }),
2055
- slideAlignment: richText.ResponsiveIconRadioGroup({
2055
+ slideAlignment: descriptors.ResponsiveIconRadioGroup({
2056
2056
  label: "Alignment",
2057
2057
  options: [
2058
2058
  { label: "Top", value: "flex-start", icon: "VerticalAlignStart16" },
@@ -2061,13 +2061,13 @@ function registerComponent$a(runtime) {
2061
2061
  ],
2062
2062
  defaultValue: "center"
2063
2063
  }),
2064
- gap: richText.GapX({
2064
+ gap: descriptors.GapX({
2065
2065
  label: "Gap",
2066
2066
  step: 5,
2067
2067
  defaultValue: { value: 0, unit: "px" }
2068
2068
  }),
2069
- autoplay: richText.Checkbox({ label: "Autoplay" }),
2070
- delay: richText.Number((props) => ({
2069
+ autoplay: descriptors.Checkbox({ label: "Autoplay" }),
2070
+ delay: descriptors.Number((props) => ({
2071
2071
  label: "Delay",
2072
2072
  preset: 5,
2073
2073
  min: 1,
@@ -2075,8 +2075,8 @@ function registerComponent$a(runtime) {
2075
2075
  suffix: "seconds",
2076
2076
  hidden: !props.autoplay
2077
2077
  })),
2078
- showArrows: richText.Checkbox({ preset: true, label: "Show arrows" }),
2079
- arrowPosition: richText.ResponsiveIconRadioGroup((props) => ({
2078
+ showArrows: descriptors.Checkbox({ preset: true, label: "Show arrows" }),
2079
+ arrowPosition: descriptors.ResponsiveIconRadioGroup((props) => ({
2080
2080
  label: "Arrow position",
2081
2081
  options: [
2082
2082
  { label: "Inside", value: "inside", icon: "ArrowInside16" },
@@ -2086,24 +2086,24 @@ function registerComponent$a(runtime) {
2086
2086
  defaultValue: "inside",
2087
2087
  hidden: props.showArrows === false
2088
2088
  })),
2089
- arrowColor: richText.ResponsiveColor((props) => ({
2089
+ arrowColor: descriptors.ResponsiveColor((props) => ({
2090
2090
  label: "Arrow color",
2091
2091
  placeholder: "black",
2092
2092
  hidden: props.showArrows === false
2093
2093
  })),
2094
- arrowBackground: richText.ResponsiveColor((props) => ({
2094
+ arrowBackground: descriptors.ResponsiveColor((props) => ({
2095
2095
  label: "Arrow background",
2096
2096
  placeholder: "white",
2097
2097
  hidden: props.showArrows === false
2098
2098
  })),
2099
- showDots: richText.Checkbox({ preset: true, label: "Show dots" }),
2100
- dotColor: richText.ResponsiveColor((props) => ({
2099
+ showDots: descriptors.Checkbox({ preset: true, label: "Show dots" }),
2100
+ dotColor: descriptors.ResponsiveColor((props) => ({
2101
2101
  label: "Dot color",
2102
2102
  placeholder: "black",
2103
2103
  hidden: props.showDots === false
2104
2104
  })),
2105
- slideBorder: richText.Border({ format: richText.Border.Format.ClassName }),
2106
- slideBorderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName })
2105
+ slideBorder: descriptors.Border({ format: descriptors.Border.Format.ClassName }),
2106
+ slideBorderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName })
2107
2107
  }
2108
2108
  });
2109
2109
  }
@@ -2115,11 +2115,11 @@ function registerComponent$9(runtime) {
2115
2115
  label: "Countdown",
2116
2116
  icon: "Countdown40",
2117
2117
  props: {
2118
- id: richText.ElementID(),
2119
- date: richText.Date(() => ({
2118
+ id: descriptors.ElementID(),
2119
+ date: descriptors.Date(() => ({
2120
2120
  preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
2121
2121
  })),
2122
- variant: richText.ResponsiveIconRadioGroup({
2122
+ variant: descriptors.ResponsiveIconRadioGroup({
2123
2123
  label: "Style",
2124
2124
  options: [
2125
2125
  { label: "Filled", value: "filled", icon: "CountdownSolid16" },
@@ -2138,7 +2138,7 @@ function registerComponent$9(runtime) {
2138
2138
  ],
2139
2139
  defaultValue: "filled"
2140
2140
  }),
2141
- shape: richText.ResponsiveIconRadioGroup({
2141
+ shape: descriptors.ResponsiveIconRadioGroup({
2142
2142
  label: "Shape",
2143
2143
  options: [
2144
2144
  { label: "Pill", value: "pill", icon: "ButtonPill16" },
@@ -2147,7 +2147,7 @@ function registerComponent$9(runtime) {
2147
2147
  ],
2148
2148
  defaultValue: "rounded"
2149
2149
  }),
2150
- size: richText.ResponsiveIconRadioGroup({
2150
+ size: descriptors.ResponsiveIconRadioGroup({
2151
2151
  label: "Size",
2152
2152
  options: [
2153
2153
  { label: "Small", value: "small", icon: "SizeSmall16" },
@@ -2156,7 +2156,7 @@ function registerComponent$9(runtime) {
2156
2156
  ],
2157
2157
  defaultValue: "medium"
2158
2158
  }),
2159
- gap: richText.GapX({
2159
+ gap: descriptors.GapX({
2160
2160
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
2161
2161
  label: "Gap",
2162
2162
  step: 1,
@@ -2164,32 +2164,32 @@ function registerComponent$9(runtime) {
2164
2164
  max: 100,
2165
2165
  defaultValue: { value: 0, unit: "px" }
2166
2166
  }),
2167
- numberFont: richText.Font({ label: "Number font" }),
2168
- numberColor: richText.ResponsiveColor({
2167
+ numberFont: descriptors.Font({ label: "Number font" }),
2168
+ numberColor: descriptors.ResponsiveColor({
2169
2169
  label: "Number color",
2170
2170
  placeholder: "white"
2171
2171
  }),
2172
- blockColor: richText.ResponsiveColor({
2172
+ blockColor: descriptors.ResponsiveColor({
2173
2173
  label: "Block color",
2174
2174
  placeholder: "black"
2175
2175
  }),
2176
- labelFont: richText.Font({ label: "Label font" }),
2177
- labelColor: richText.ResponsiveColor({
2176
+ labelFont: descriptors.Font({ label: "Label font" }),
2177
+ labelColor: descriptors.ResponsiveColor({
2178
2178
  label: "Label color",
2179
2179
  placeholder: "black"
2180
2180
  }),
2181
- width: richText.Width({
2182
- format: richText.Width.Format.ClassName,
2181
+ width: descriptors.Width({
2182
+ format: descriptors.Width.Format.ClassName,
2183
2183
  defaultValue: { value: 560, unit: "px" }
2184
2184
  }),
2185
- margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
2186
- daysLabel: richText.TextInput({ label: "Days label", placeholder: "Days" }),
2187
- hoursLabel: richText.TextInput({ label: "Hours label", placeholder: "Hours" }),
2188
- minutesLabel: richText.TextInput({
2185
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
2186
+ daysLabel: descriptors.TextInput({ label: "Days label", placeholder: "Days" }),
2187
+ hoursLabel: descriptors.TextInput({ label: "Hours label", placeholder: "Hours" }),
2188
+ minutesLabel: descriptors.TextInput({
2189
2189
  label: "Minutes label",
2190
2190
  placeholder: "Minutes"
2191
2191
  }),
2192
- secondsLabel: richText.TextInput({
2192
+ secondsLabel: descriptors.TextInput({
2193
2193
  label: "Seconds label",
2194
2194
  placeholder: "Seconds"
2195
2195
  })
@@ -2204,8 +2204,8 @@ function registerComponent$8(runtime) {
2204
2204
  label: "Divider",
2205
2205
  icon: "Divider40",
2206
2206
  props: {
2207
- id: richText.ElementID(),
2208
- variant: richText.ResponsiveSelect({
2207
+ id: descriptors.ElementID(),
2208
+ variant: descriptors.ResponsiveSelect({
2209
2209
  label: "Style",
2210
2210
  labelOrientation: "horizontal",
2211
2211
  options: [
@@ -2216,17 +2216,17 @@ function registerComponent$8(runtime) {
2216
2216
  ],
2217
2217
  defaultValue: "solid"
2218
2218
  }),
2219
- thickness: richText.ResponsiveLength({
2219
+ thickness: descriptors.ResponsiveLength({
2220
2220
  label: "Height",
2221
2221
  defaultValue: { value: 1, unit: "px" },
2222
2222
  options: [{ value: "px", label: "Pixels", icon: "Px16" }]
2223
2223
  }),
2224
- color: richText.ResponsiveColor({ placeholder: "black" }),
2225
- width: richText.Width({
2226
- format: richText.Width.Format.ClassName,
2224
+ color: descriptors.ResponsiveColor({ placeholder: "black" }),
2225
+ width: descriptors.Width({
2226
+ format: descriptors.Width.Format.ClassName,
2227
2227
  defaultValue: { value: 100, unit: "%" }
2228
2228
  }),
2229
- margin: richText.Margin({ format: richText.Margin.Format.ClassName })
2229
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
2230
2230
  }
2231
2231
  });
2232
2232
  }
@@ -2238,10 +2238,10 @@ function registerComponent$7(runtime) {
2238
2238
  label: "Embed",
2239
2239
  icon: "Code40",
2240
2240
  props: {
2241
- id: richText.ElementID(),
2242
- html: richText.TextArea({ label: "Code", rows: 20 }),
2243
- width: richText.Width({ format: richText.Width.Format.ClassName }),
2244
- margin: richText.Margin({ format: richText.Margin.Format.ClassName })
2241
+ id: descriptors.ElementID(),
2242
+ html: descriptors.TextArea({ label: "Code", rows: 20 }),
2243
+ width: descriptors.Width({ format: descriptors.Width.Format.ClassName }),
2244
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
2245
2245
  }
2246
2246
  });
2247
2247
  }
@@ -2277,10 +2277,10 @@ function registerComponent$6(runtime) {
2277
2277
  label: "Form",
2278
2278
  icon: "Form40",
2279
2279
  props: {
2280
- id: richText.ElementID(),
2281
- tableId: richText.Table(),
2282
- fields: richText.TableFormFields(),
2283
- submitLink: richText.Link((props) => ({
2280
+ id: descriptors.ElementID(),
2281
+ tableId: descriptors.Table(),
2282
+ fields: descriptors.TableFormFields(),
2283
+ submitLink: descriptors.Link((props) => ({
2284
2284
  label: "Redirect to",
2285
2285
  options: [
2286
2286
  { value: "OPEN_PAGE", label: "Open page" },
@@ -2288,13 +2288,13 @@ function registerComponent$6(runtime) {
2288
2288
  ],
2289
2289
  hidden: props.tableId == null
2290
2290
  })),
2291
- gap: richText.GapY((props) => ({
2291
+ gap: descriptors.GapY((props) => ({
2292
2292
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
2293
2293
  label: "Gap",
2294
2294
  defaultValue: { value: 0, unit: "px" },
2295
2295
  hidden: props.tableId == null
2296
2296
  })),
2297
- shape: richText.ResponsiveIconRadioGroup((props) => ({
2297
+ shape: descriptors.ResponsiveIconRadioGroup((props) => ({
2298
2298
  label: "Shape",
2299
2299
  options: [
2300
2300
  { label: "Pill", value: Shapes.PILL, icon: "ButtonPill16" },
@@ -2304,7 +2304,7 @@ function registerComponent$6(runtime) {
2304
2304
  defaultValue: Shapes.ROUNDED,
2305
2305
  hidden: props.tableId == null
2306
2306
  })),
2307
- size: richText.ResponsiveIconRadioGroup((props) => ({
2307
+ size: descriptors.ResponsiveIconRadioGroup((props) => ({
2308
2308
  label: "Size",
2309
2309
  options: [
2310
2310
  { label: "Small", value: Sizes.SMALL, icon: "SizeSmall16" },
@@ -2314,7 +2314,7 @@ function registerComponent$6(runtime) {
2314
2314
  defaultValue: Sizes.MEDIUM,
2315
2315
  hidden: (props == null ? void 0 : props.tableId) == null
2316
2316
  })),
2317
- contrast: richText.ResponsiveIconRadioGroup((props) => ({
2317
+ contrast: descriptors.ResponsiveIconRadioGroup((props) => ({
2318
2318
  label: "Color",
2319
2319
  options: [
2320
2320
  { label: "Light mode", value: Contrasts.LIGHT, icon: "Sun16" },
@@ -2323,8 +2323,8 @@ function registerComponent$6(runtime) {
2323
2323
  defaultValue: Contrasts.LIGHT,
2324
2324
  hidden: props.tableId == null
2325
2325
  })),
2326
- labelTextStyle: richText.TextStyle({ label: "Label text style" }),
2327
- labelTextColor: richText.ResponsiveColor((props, device) => {
2326
+ labelTextStyle: descriptors.TextStyle({ label: "Label text style" }),
2327
+ labelTextColor: descriptors.ResponsiveColor((props, device) => {
2328
2328
  const hidden = props.tableId == null;
2329
2329
  const responsiveContrast = props.contrast;
2330
2330
  const contrast = findDeviceOverride(responsiveContrast, device);
@@ -2334,23 +2334,23 @@ function registerComponent$6(runtime) {
2334
2334
  placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
2335
2335
  };
2336
2336
  }),
2337
- submitTextStyle: richText.TextStyle({ label: "Button text style" }),
2338
- brandColor: richText.ResponsiveColor((props) => ({
2337
+ submitTextStyle: descriptors.TextStyle({ label: "Button text style" }),
2338
+ brandColor: descriptors.ResponsiveColor((props) => ({
2339
2339
  label: "Button color",
2340
2340
  placeholder: "black",
2341
2341
  hidden: props.tableId == null
2342
2342
  })),
2343
- submitTextColor: richText.ResponsiveColor((props) => ({
2343
+ submitTextColor: descriptors.ResponsiveColor((props) => ({
2344
2344
  label: "Button text color",
2345
2345
  placeholder: "white",
2346
2346
  hidden: props.tableId == null
2347
2347
  })),
2348
- submitLabel: richText.TextInput((props) => ({
2348
+ submitLabel: descriptors.TextInput((props) => ({
2349
2349
  label: "Button label",
2350
2350
  placeholder: "Submit",
2351
2351
  hidden: props.tableId == null
2352
2352
  })),
2353
- submitVariant: richText.ResponsiveSelect((props) => ({
2353
+ submitVariant: descriptors.ResponsiveSelect((props) => ({
2354
2354
  label: "Button style",
2355
2355
  options: [
2356
2356
  { value: "flat", label: "Flat" },
@@ -2364,11 +2364,11 @@ function registerComponent$6(runtime) {
2364
2364
  defaultValue: "flat",
2365
2365
  hidden: props.tableId == null
2366
2366
  })),
2367
- submitWidth: richText.ResponsiveLength((props) => ({
2367
+ submitWidth: descriptors.ResponsiveLength((props) => ({
2368
2368
  label: "Button width",
2369
2369
  hidden: props.tableId == null
2370
2370
  })),
2371
- submitAlignment: richText.ResponsiveIconRadioGroup((props) => ({
2371
+ submitAlignment: descriptors.ResponsiveIconRadioGroup((props) => ({
2372
2372
  label: "Button alignment",
2373
2373
  options: [
2374
2374
  { label: "Left", value: Alignments.LEFT, icon: "AlignLeft16" },
@@ -2378,12 +2378,12 @@ function registerComponent$6(runtime) {
2378
2378
  defaultValue: Alignments.CENTER,
2379
2379
  hidden: props.tableId == null
2380
2380
  })),
2381
- width: richText.Width({
2381
+ width: descriptors.Width({
2382
2382
  preset: [{ deviceId: "desktop", value: { value: 550, unit: "px" } }],
2383
2383
  defaultValue: { value: 100, unit: "%" },
2384
- format: richText.Width.Format.ClassName
2384
+ format: descriptors.Width.Format.ClassName
2385
2385
  }),
2386
- margin: richText.Margin({ format: richText.Margin.Format.ClassName })
2386
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
2387
2387
  }
2388
2388
  });
2389
2389
  }
@@ -2394,17 +2394,17 @@ function registerComponent$5(runtime) {
2394
2394
  type: constants.MakeswiftComponentType.Image,
2395
2395
  label: "Image",
2396
2396
  props: {
2397
- id: richText.ElementID(),
2398
- file: richText.Image(),
2399
- altText: richText.TextInput({ label: "Alt text" }),
2400
- link: richText.Link({ label: "On click" }),
2401
- width: richText.Width(),
2402
- margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
2403
- padding: richText.Padding({ format: richText.Padding.Format.ClassName }),
2404
- border: richText.Border({ format: richText.Border.Format.ClassName }),
2405
- borderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName }),
2406
- boxShadow: richText.Shadows({ format: richText.Shadows.Format.ClassName }),
2407
- opacity: richText.ResponsiveOpacity()
2397
+ id: descriptors.ElementID(),
2398
+ file: descriptors.Image(),
2399
+ altText: descriptors.TextInput({ label: "Alt text" }),
2400
+ link: descriptors.Link({ label: "On click" }),
2401
+ width: descriptors.Width(),
2402
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
2403
+ padding: descriptors.Padding({ format: descriptors.Padding.Format.ClassName }),
2404
+ border: descriptors.Border({ format: descriptors.Border.Format.ClassName }),
2405
+ borderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName }),
2406
+ boxShadow: descriptors.Shadows({ format: descriptors.Shadows.Format.ClassName }),
2407
+ opacity: descriptors.ResponsiveOpacity()
2408
2408
  }
2409
2409
  });
2410
2410
  }
@@ -2416,21 +2416,21 @@ function registerComponent$4(runtime) {
2416
2416
  label: "Navigation",
2417
2417
  icon: "Navigation40",
2418
2418
  props: {
2419
- id: richText.ElementID(),
2420
- links: richText.NavigationLinks(),
2421
- linkTextStyle: richText.TextStyle((props) => {
2419
+ id: descriptors.ElementID(),
2420
+ links: descriptors.NavigationLinks(),
2421
+ linkTextStyle: descriptors.TextStyle((props) => {
2422
2422
  const links = props.links;
2423
2423
  return {
2424
2424
  label: "Link text style",
2425
2425
  hidden: links == null || links.length === 0
2426
2426
  };
2427
2427
  }),
2428
- showLogo: richText.Checkbox({ preset: true, label: "Show logo" }),
2429
- logoFile: richText.Image((props) => ({
2428
+ showLogo: descriptors.Checkbox({ preset: true, label: "Show logo" }),
2429
+ logoFile: descriptors.Image((props) => ({
2430
2430
  label: "Logo",
2431
2431
  hidden: props.showLogo === false
2432
2432
  })),
2433
- logoWidth: richText.ResponsiveLength((props) => ({
2433
+ logoWidth: descriptors.ResponsiveLength((props) => ({
2434
2434
  preset: [{ deviceId: "desktop", value: { value: 100, unit: "px" } }],
2435
2435
  label: "Logo width",
2436
2436
  min: 0,
@@ -2438,15 +2438,15 @@ function registerComponent$4(runtime) {
2438
2438
  options: [{ value: "px", label: "Pixels", icon: "Px16" }],
2439
2439
  hidden: props.showLogo === false
2440
2440
  })),
2441
- logoAltText: richText.TextInput((props) => ({
2441
+ logoAltText: descriptors.TextInput((props) => ({
2442
2442
  label: "Logo alt text",
2443
2443
  hidden: props.showLogo === false
2444
2444
  })),
2445
- logoLink: richText.Link((props) => ({
2445
+ logoLink: descriptors.Link((props) => ({
2446
2446
  label: "Logo on click",
2447
2447
  hidden: props.showLogo === false
2448
2448
  })),
2449
- alignment: richText.ResponsiveIconRadioGroup({
2449
+ alignment: descriptors.ResponsiveIconRadioGroup({
2450
2450
  label: "Alignment",
2451
2451
  options: [
2452
2452
  { label: "Left", value: "flex-start", icon: "AlignLeft16" },
@@ -2455,7 +2455,7 @@ function registerComponent$4(runtime) {
2455
2455
  ],
2456
2456
  defaultValue: "flex-end"
2457
2457
  }),
2458
- gutter: richText.GapX({
2458
+ gutter: descriptors.GapX({
2459
2459
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
2460
2460
  label: "Link gap",
2461
2461
  min: 0,
@@ -2463,14 +2463,14 @@ function registerComponent$4(runtime) {
2463
2463
  step: 1,
2464
2464
  defaultValue: { value: 0, unit: "px" }
2465
2465
  }),
2466
- mobileMenuAnimation: richText.ResponsiveSelect({
2466
+ mobileMenuAnimation: descriptors.ResponsiveSelect({
2467
2467
  label: "Mobile menu",
2468
2468
  options: [
2469
2469
  { value: "coverRight", label: "Cover from right" },
2470
2470
  { value: "coverLeft", label: "Cover from left" }
2471
2471
  ]
2472
2472
  }),
2473
- mobileMenuOpenIconColor: richText.ResponsiveColor((props, device) => {
2473
+ mobileMenuOpenIconColor: descriptors.ResponsiveColor((props, device) => {
2474
2474
  const mobileMenuAnimation = props.mobileMenuAnimation;
2475
2475
  const hidden = !findDeviceOverride(mobileMenuAnimation, device);
2476
2476
  return {
@@ -2479,7 +2479,7 @@ function registerComponent$4(runtime) {
2479
2479
  hidden
2480
2480
  };
2481
2481
  }),
2482
- mobileMenuCloseIconColor: richText.ResponsiveColor((props, device) => {
2482
+ mobileMenuCloseIconColor: descriptors.ResponsiveColor((props, device) => {
2483
2483
  const mobileMenuAnimation = props.mobileMenuAnimation;
2484
2484
  const hidden = !findDeviceOverride(mobileMenuAnimation, device);
2485
2485
  return {
@@ -2488,7 +2488,7 @@ function registerComponent$4(runtime) {
2488
2488
  hidden
2489
2489
  };
2490
2490
  }),
2491
- mobileMenuBackgroundColor: richText.ResponsiveColor((props, device) => {
2491
+ mobileMenuBackgroundColor: descriptors.ResponsiveColor((props, device) => {
2492
2492
  const mobileMenuAnimation = props.mobileMenuAnimation;
2493
2493
  const hidden = !findDeviceOverride(mobileMenuAnimation, device);
2494
2494
  return {
@@ -2497,11 +2497,11 @@ function registerComponent$4(runtime) {
2497
2497
  hidden
2498
2498
  };
2499
2499
  }),
2500
- width: richText.Width({
2501
- format: richText.Width.Format.ClassName,
2500
+ width: descriptors.Width({
2501
+ format: descriptors.Width.Format.ClassName,
2502
2502
  defaultValue: { value: 100, unit: "%" }
2503
2503
  }),
2504
- margin: richText.Margin({ format: richText.Margin.Format.ClassName })
2504
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
2505
2505
  }
2506
2506
  });
2507
2507
  }
@@ -2513,10 +2513,10 @@ function registerComponent$3(runtime) {
2513
2513
  label: "Page",
2514
2514
  hidden: true,
2515
2515
  props: {
2516
- children: richText.Grid(),
2517
- backgrounds: richText.Backgrounds(),
2518
- rowGap: richText.GapY(),
2519
- columnGap: richText.GapX()
2516
+ children: descriptors.Grid(),
2517
+ backgrounds: descriptors.Backgrounds(),
2518
+ rowGap: descriptors.GapY(),
2519
+ columnGap: descriptors.GapX()
2520
2520
  }
2521
2521
  });
2522
2522
  }
@@ -2528,8 +2528,8 @@ function registerComponent$2(runtime) {
2528
2528
  label: "Social Links",
2529
2529
  icon: "SocialLinks40",
2530
2530
  props: {
2531
- id: richText.ElementID(),
2532
- links: richText.SocialLinks({
2531
+ id: descriptors.ElementID(),
2532
+ links: descriptors.SocialLinks({
2533
2533
  preset: {
2534
2534
  links: [
2535
2535
  {
@@ -2548,7 +2548,7 @@ function registerComponent$2(runtime) {
2548
2548
  openInNewTab: false
2549
2549
  }
2550
2550
  }),
2551
- shape: richText.ResponsiveIconRadioGroup((props) => {
2551
+ shape: descriptors.ResponsiveIconRadioGroup((props) => {
2552
2552
  const links = props.links;
2553
2553
  return {
2554
2554
  label: "Shape",
@@ -2562,7 +2562,7 @@ function registerComponent$2(runtime) {
2562
2562
  hidden: links == null || links.links.length === 0
2563
2563
  };
2564
2564
  }),
2565
- size: richText.ResponsiveIconRadioGroup((props) => {
2565
+ size: descriptors.ResponsiveIconRadioGroup((props) => {
2566
2566
  const links = props.links;
2567
2567
  return {
2568
2568
  label: "Size",
@@ -2575,7 +2575,7 @@ function registerComponent$2(runtime) {
2575
2575
  hidden: links == null || links.links.length === 0
2576
2576
  };
2577
2577
  }),
2578
- hoverStyle: richText.ResponsiveSelect((props) => {
2578
+ hoverStyle: descriptors.ResponsiveSelect((props) => {
2579
2579
  const links = props.links;
2580
2580
  const hidden = links == null || links.links.length === 0;
2581
2581
  return {
@@ -2591,7 +2591,7 @@ function registerComponent$2(runtime) {
2591
2591
  hidden
2592
2592
  };
2593
2593
  }),
2594
- fill: richText.ResponsiveColor((props) => {
2594
+ fill: descriptors.ResponsiveColor((props) => {
2595
2595
  const links = props.links;
2596
2596
  const hidden = links == null || links.links.length === 0;
2597
2597
  return {
@@ -2599,7 +2599,7 @@ function registerComponent$2(runtime) {
2599
2599
  hidden
2600
2600
  };
2601
2601
  }),
2602
- backgroundColor: richText.ResponsiveColor((props) => {
2602
+ backgroundColor: descriptors.ResponsiveColor((props) => {
2603
2603
  const links = props.links;
2604
2604
  const hidden = links == null || links.links.length === 0;
2605
2605
  return {
@@ -2607,7 +2607,7 @@ function registerComponent$2(runtime) {
2607
2607
  hidden
2608
2608
  };
2609
2609
  }),
2610
- alignment: richText.ResponsiveIconRadioGroup({
2610
+ alignment: descriptors.ResponsiveIconRadioGroup({
2611
2611
  label: "Alignment",
2612
2612
  options: [
2613
2613
  { label: "flex-start", value: "flex-start", icon: "AlignLeft16" },
@@ -2616,7 +2616,7 @@ function registerComponent$2(runtime) {
2616
2616
  ],
2617
2617
  defaultValue: "center"
2618
2618
  }),
2619
- gutter: richText.GapX({
2619
+ gutter: descriptors.GapX({
2620
2620
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
2621
2621
  label: "Link gap",
2622
2622
  min: 0,
@@ -2624,12 +2624,12 @@ function registerComponent$2(runtime) {
2624
2624
  step: 1,
2625
2625
  defaultValue: { value: 0, unit: "px" }
2626
2626
  }),
2627
- width: richText.Width({
2628
- format: richText.Width.Format.ClassName,
2627
+ width: descriptors.Width({
2628
+ format: descriptors.Width.Format.ClassName,
2629
2629
  defaultValue: { value: 100, unit: "%" }
2630
2630
  }),
2631
- margin: richText.Margin({
2632
- format: richText.Margin.Format.ClassName,
2631
+ margin: descriptors.Margin({
2632
+ format: descriptors.Margin.Format.ClassName,
2633
2633
  preset: [
2634
2634
  {
2635
2635
  deviceId: "desktop",
@@ -2652,8 +2652,8 @@ function registerComponent$1(runtime) {
2652
2652
  type: constants.MakeswiftComponentType.Text,
2653
2653
  label: "Text",
2654
2654
  props: {
2655
- id: richText.ElementID(),
2656
- text: richText.RichText(() => ({
2655
+ id: descriptors.ElementID(),
2656
+ text: descriptors.RichText(() => ({
2657
2657
  preset: {
2658
2658
  document: {
2659
2659
  object: "document",
@@ -2697,13 +2697,13 @@ function registerComponent$1(runtime) {
2697
2697
  }
2698
2698
  }
2699
2699
  })),
2700
- width: richText.Width({
2701
- format: richText.Width.Format.ClassName,
2700
+ width: descriptors.Width({
2701
+ format: descriptors.Width.Format.ClassName,
2702
2702
  preset: [{ deviceId: "desktop", value: { value: 700, unit: "px" } }],
2703
2703
  defaultValue: { value: 100, unit: "%" }
2704
2704
  }),
2705
- margin: richText.Margin({
2706
- format: richText.Margin.Format.ClassName,
2705
+ margin: descriptors.Margin({
2706
+ format: descriptors.Margin.Format.ClassName,
2707
2707
  preset: [
2708
2708
  {
2709
2709
  deviceId: "desktop",
@@ -2727,14 +2727,14 @@ function registerComponent(runtime) {
2727
2727
  label: "Video",
2728
2728
  icon: "Video40",
2729
2729
  props: {
2730
- id: richText.ElementID(),
2731
- video: richText.Video({ preset: { controls: true } }),
2732
- width: richText.Width({
2733
- format: richText.Width.Format.ClassName,
2730
+ id: descriptors.ElementID(),
2731
+ video: descriptors.Video({ preset: { controls: true } }),
2732
+ width: descriptors.Width({
2733
+ format: descriptors.Width.Format.ClassName,
2734
2734
  defaultValue: { value: 560, unit: "px" }
2735
2735
  }),
2736
- margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
2737
- borderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName })
2736
+ margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
2737
+ borderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName })
2738
2738
  }
2739
2739
  });
2740
2740
  }
@@ -3250,7 +3250,7 @@ const defaultPadding = {
3250
3250
  };
3251
3251
  function useStyleControlCssObject(style, controlDefinition) {
3252
3252
  const { properties } = controlDefinition.config;
3253
- return __spreadValues(__spreadValues({}, properties.includes(richText.StyleControlProperty.Width) && {
3253
+ return __spreadValues(__spreadValues({}, properties.includes(descriptors.StyleControlProperty.Width) && {
3254
3254
  maxWidth: "100%"
3255
3255
  }), responsiveStyle([
3256
3256
  style == null ? void 0 : style.width,
@@ -3261,19 +3261,19 @@ function useStyleControlCssObject(style, controlDefinition) {
3261
3261
  style == null ? void 0 : style.textStyle
3262
3262
  ], ([width, margin, padding, border, borderRadius, textStyle]) => {
3263
3263
  var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
3264
- return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(richText.StyleControlProperty.Width) && {
3264
+ return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(descriptors.StyleControlProperty.Width) && {
3265
3265
  width: (_a = widthToString(width)) != null ? _a : "100%"
3266
- }), properties.includes(richText.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(richText.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(richText.StyleControlProperty.Border) && {
3266
+ }), properties.includes(descriptors.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(descriptors.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(descriptors.StyleControlProperty.Border) && {
3267
3267
  borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
3268
3268
  borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
3269
3269
  borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
3270
3270
  borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
3271
- }), properties.includes(richText.StyleControlProperty.BorderRadius) && {
3271
+ }), properties.includes(descriptors.StyleControlProperty.BorderRadius) && {
3272
3272
  borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
3273
3273
  borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
3274
3274
  borderBottomRightRadius: (_h = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _h : 0,
3275
3275
  borderBottomLeftRadius: (_i = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _i : 0
3276
- }), properties.includes(richText.StyleControlProperty.TextStyle) && __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, (textStyle == null ? void 0 : textStyle.fontFamily) && { fontFamily: `"${textStyle.fontFamily}"` }), (textStyle == null ? void 0 : textStyle.letterSpacing) && { letterSpacing: textStyle.letterSpacing }), (textStyle == null ? void 0 : textStyle.fontSize) && { fontSize: fontSizeToString(textStyle.fontSize) }), (textStyle == null ? void 0 : textStyle.fontWeight) && { fontWeight: textStyle.fontWeight }), {
3276
+ }), properties.includes(descriptors.StyleControlProperty.TextStyle) && __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, (textStyle == null ? void 0 : textStyle.fontFamily) && { fontFamily: `"${textStyle.fontFamily}"` }), (textStyle == null ? void 0 : textStyle.letterSpacing) && { letterSpacing: textStyle.letterSpacing }), (textStyle == null ? void 0 : textStyle.fontSize) && { fontSize: fontSizeToString(textStyle.fontSize) }), (textStyle == null ? void 0 : textStyle.fontWeight) && { fontWeight: textStyle.fontWeight }), {
3277
3277
  textTransform: (_j = textStyle == null ? void 0 : textStyle.textTransform) != null ? _j : [],
3278
3278
  fontStyle: (_k = textStyle == null ? void 0 : textStyle.fontStyle) != null ? _k : []
3279
3279
  }));
@@ -3298,9 +3298,31 @@ function useStyleControlCssObject(style, controlDefinition) {
3298
3298
  return `${fontSize.value}${fontSize.unit}`;
3299
3299
  }
3300
3300
  }
3301
- function useFormattedStyle(styleControlData, controlDefinition) {
3301
+ function useFormattedStyle(styleControlData, controlDefinition, control) {
3302
3302
  const style = useStyleControlCssObject(styleControlData, controlDefinition);
3303
- return useStyle(style);
3303
+ const guid = React.useId().replaceAll(":", "");
3304
+ const styleClassName = useStyle(style);
3305
+ const classNames = `${styleClassName} ${guid}`;
3306
+ React.useEffect(() => {
3307
+ let currentBoxModel = null;
3308
+ const handleAnimationFrameRequest = () => {
3309
+ if (control == null)
3310
+ return;
3311
+ const element = document.querySelector(`.${guid}`);
3312
+ const measuredBoxModel = element == null ? null : boxModels.getBox(element);
3313
+ if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3314
+ currentBoxModel = measuredBoxModel;
3315
+ control.changeBoxModel(currentBoxModel);
3316
+ }
3317
+ animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
3318
+ };
3319
+ let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
3320
+ return () => {
3321
+ cancelAnimationFrame(animationFrameHandle);
3322
+ control == null ? void 0 : control.changeBoxModel(null);
3323
+ };
3324
+ }, [guid, control]);
3325
+ return classNames;
3304
3326
  }
3305
3327
  function RenderHook({
3306
3328
  hook: useHook,
@@ -3336,10 +3358,10 @@ function useComboboxControlValue(data) {
3336
3358
  }
3337
3359
  function useImageControlValue(data, definition) {
3338
3360
  var _a;
3339
- const format = (_a = definition.config.format) != null ? _a : richText.ImageControlValueFormat.URL;
3361
+ const format = (_a = definition.config.format) != null ? _a : descriptors.ImageControlValueFormat.URL;
3340
3362
  const fileId = data != null ? data : null;
3341
3363
  const file = useFile(fileId);
3342
- if (format === richText.ImageControlValueFormat.URL) {
3364
+ if (format === descriptors.ImageControlValueFormat.URL) {
3343
3365
  return file == null ? void 0 : file.publicUrl;
3344
3366
  }
3345
3367
  if (file == null || file.dimensions == null)
@@ -3676,19 +3698,19 @@ function ControlValue({
3676
3698
  parameters: [data, definition],
3677
3699
  children: (value) => children(value)
3678
3700
  }, definition.type);
3679
- case richText.ColorControlType:
3701
+ case descriptors.ColorControlType:
3680
3702
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3681
3703
  hook: useColorValue,
3682
3704
  parameters: [data, definition],
3683
3705
  children: (value) => children(value)
3684
3706
  }, definition.type);
3685
- case richText.ImageControlType:
3707
+ case descriptors.ImageControlType:
3686
3708
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3687
3709
  hook: useImageControlValue,
3688
3710
  parameters: [data, definition],
3689
3711
  children: (value) => children(value)
3690
3712
  }, definition.type);
3691
- case richText.LinkControlType:
3713
+ case descriptors.LinkControlType:
3692
3714
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3693
3715
  hook: useLinkControlValue,
3694
3716
  parameters: [data, definition],
@@ -3700,32 +3722,38 @@ function ControlValue({
3700
3722
  parameters: [data],
3701
3723
  children: (value) => children(value)
3702
3724
  }, definition.type);
3703
- case richText.ShapeControlType:
3725
+ case descriptors.ShapeControlType:
3704
3726
  return /* @__PURE__ */ jsxRuntime.jsx(ShapeControlValue, {
3705
3727
  definition,
3706
3728
  data,
3707
3729
  control,
3708
3730
  children: (value) => children(value)
3709
3731
  });
3710
- case richText.ListControlType:
3732
+ case descriptors.ListControlType:
3711
3733
  return /* @__PURE__ */ jsxRuntime.jsx(ListControlValue, {
3712
3734
  definition,
3713
3735
  data,
3714
3736
  control,
3715
3737
  children: (value) => children(value)
3716
3738
  });
3717
- case richText.SlotControlType:
3739
+ case descriptors.SlotControlType:
3718
3740
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3719
3741
  hook: useSlot,
3720
3742
  parameters: [data, control],
3721
3743
  children: (value) => children(value)
3722
3744
  }, definition.type);
3723
- case richText.RichTextControlType:
3745
+ case descriptors.RichTextControlType:
3724
3746
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3725
3747
  hook: useRichText,
3726
3748
  parameters: [data, control],
3727
3749
  children: (value) => children(value)
3728
3750
  }, definition.type);
3751
+ case descriptors.StyleControlType:
3752
+ return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3753
+ hook: useFormattedStyle,
3754
+ parameters: [data, definition, control],
3755
+ children: (value) => children(value)
3756
+ }, definition.type);
3729
3757
  default:
3730
3758
  return children(data);
3731
3759
  }
@@ -3765,19 +3793,19 @@ function PropsValue({
3765
3793
  return constants.getPropControllers(state, documentKey, element.key);
3766
3794
  });
3767
3795
  return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
3768
- var _a2, _b;
3796
+ var _a2, _b, _c2;
3769
3797
  switch (descriptor.type) {
3770
3798
  case textInput.CheckboxControlType:
3771
3799
  case textInput.NumberControlType:
3772
3800
  case textInput.TextInputControlType:
3773
3801
  case textInput.TextAreaControlType:
3774
3802
  case textInput.SelectControlType:
3775
- case richText.ColorControlType:
3776
- case richText.ImageControlType:
3803
+ case descriptors.ColorControlType:
3804
+ case descriptors.ImageControlType:
3777
3805
  case combobox.ComboboxControlType:
3778
- case richText.ShapeControlType:
3779
- case richText.ListControlType:
3780
- case richText.LinkControlType:
3806
+ case descriptors.ShapeControlType:
3807
+ case descriptors.ListControlType:
3808
+ case descriptors.LinkControlType:
3781
3809
  return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
3782
3810
  definition: descriptor,
3783
3811
  data: props[propName],
@@ -3786,16 +3814,18 @@ function PropsValue({
3786
3814
  [propName]: value
3787
3815
  }))
3788
3816
  });
3789
- case richText.StyleControlType:
3817
+ case descriptors.StyleControlType: {
3818
+ const control = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
3790
3819
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3791
3820
  hook: useFormattedStyle,
3792
- parameters: [props[propName], descriptor],
3821
+ parameters: [props[propName], descriptor, control],
3793
3822
  children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
3794
3823
  [propName]: value
3795
3824
  }))
3796
3825
  }, descriptor.type);
3797
- case richText.RichTextControlType:
3798
- const control = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
3826
+ }
3827
+ case descriptors.RichTextControlType: {
3828
+ const control = (_b = propControllers == null ? void 0 : propControllers[propName]) != null ? _b : null;
3799
3829
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3800
3830
  hook: useRichText,
3801
3831
  parameters: [props[propName], control],
@@ -3803,19 +3833,20 @@ function PropsValue({
3803
3833
  [propName]: value
3804
3834
  }))
3805
3835
  }, descriptor.type);
3806
- case richText.SlotControlType: {
3807
- const control2 = (_b = propControllers == null ? void 0 : propControllers[propName]) != null ? _b : null;
3836
+ }
3837
+ case descriptors.SlotControlType: {
3838
+ const control = (_c2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _c2 : null;
3808
3839
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3809
3840
  hook: useSlot,
3810
- parameters: [props[propName], control2],
3841
+ parameters: [props[propName], control],
3811
3842
  children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
3812
3843
  [propName]: value
3813
3844
  }))
3814
3845
  }, descriptor.type);
3815
3846
  }
3816
- case richText.Types.Width:
3847
+ case descriptors.Types.Width:
3817
3848
  switch (descriptor.options.format) {
3818
- case richText.WidthPropControllerFormat.ClassName:
3849
+ case descriptors.WidthPropControllerFormat.ClassName:
3819
3850
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3820
3851
  hook: useWidthStyle,
3821
3852
  parameters: [props[propName], descriptor],
@@ -3828,9 +3859,9 @@ function PropsValue({
3828
3859
  [propName]: props[propName]
3829
3860
  }));
3830
3861
  }
3831
- case richText.Types.Padding:
3862
+ case descriptors.Types.Padding:
3832
3863
  switch (descriptor.options.format) {
3833
- case richText.PaddingPropControllerFormat.ClassName:
3864
+ case descriptors.PaddingPropControllerFormat.ClassName:
3834
3865
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3835
3866
  hook: usePaddingStyle,
3836
3867
  parameters: [props[propName]],
@@ -3843,9 +3874,9 @@ function PropsValue({
3843
3874
  [propName]: props[propName]
3844
3875
  }));
3845
3876
  }
3846
- case richText.Types.Margin:
3877
+ case descriptors.Types.Margin:
3847
3878
  switch (descriptor.options.format) {
3848
- case richText.MarginPropControllerFormat.ClassName:
3879
+ case descriptors.MarginPropControllerFormat.ClassName:
3849
3880
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3850
3881
  hook: useMarginStyle,
3851
3882
  parameters: [props[propName]],
@@ -3858,9 +3889,9 @@ function PropsValue({
3858
3889
  [propName]: props[propName]
3859
3890
  }));
3860
3891
  }
3861
- case richText.Types.BorderRadius:
3892
+ case descriptors.Types.BorderRadius:
3862
3893
  switch (descriptor.options.format) {
3863
- case richText.BorderRadiusPropControllerFormat.ClassName:
3894
+ case descriptors.BorderRadiusPropControllerFormat.ClassName:
3864
3895
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3865
3896
  hook: useBorderRadiusStyle,
3866
3897
  parameters: [props[propName]],
@@ -3873,9 +3904,9 @@ function PropsValue({
3873
3904
  [propName]: props[propName]
3874
3905
  }));
3875
3906
  }
3876
- case richText.Types.Shadows:
3907
+ case descriptors.Types.Shadows:
3877
3908
  switch (descriptor.options.format) {
3878
- case richText.ShadowsPropControllerFormat.ClassName:
3909
+ case descriptors.ShadowsPropControllerFormat.ClassName:
3879
3910
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3880
3911
  hook: useShadowsStyle,
3881
3912
  parameters: [props[propName]],
@@ -3888,9 +3919,9 @@ function PropsValue({
3888
3919
  [propName]: props[propName]
3889
3920
  }));
3890
3921
  }
3891
- case richText.Types.Border:
3922
+ case descriptors.Types.Border:
3892
3923
  switch (descriptor.options.format) {
3893
- case richText.BorderPropControllerFormat.ClassName:
3924
+ case descriptors.BorderPropControllerFormat.ClassName:
3894
3925
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3895
3926
  hook: useBorderStyle,
3896
3927
  parameters: [props[propName]],
@@ -3903,7 +3934,7 @@ function PropsValue({
3903
3934
  [propName]: props[propName]
3904
3935
  }));
3905
3936
  }
3906
- case richText.Types.ResponsiveColor:
3937
+ case descriptors.Types.ResponsiveColor:
3907
3938
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3908
3939
  hook: useResponsiveColor,
3909
3940
  parameters: [props[propName]],