@makeswift/runtime 0.9.0 → 0.9.2

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 (200) hide show
  1. package/dist/Box.cjs.js +15 -15
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +10 -10
  4. package/dist/Button.cjs.js +12 -12
  5. package/dist/Button.cjs.js.map +1 -1
  6. package/dist/Button.es.js +10 -10
  7. package/dist/Carousel.cjs.js +28 -28
  8. package/dist/Carousel.cjs.js.map +1 -1
  9. package/dist/Carousel.es.js +7 -7
  10. package/dist/Countdown.cjs.js +15 -15
  11. package/dist/Countdown.cjs.js.map +1 -1
  12. package/dist/Countdown.es.js +7 -7
  13. package/dist/Divider.cjs.js +12 -12
  14. package/dist/Divider.cjs.js.map +1 -1
  15. package/dist/Divider.es.js +10 -10
  16. package/dist/Embed.cjs.js +3 -30
  17. package/dist/Embed.cjs.js.map +1 -1
  18. package/dist/Embed.es.js +2 -29
  19. package/dist/Embed.es.js.map +1 -1
  20. package/dist/Form.cjs.js +51 -51
  21. package/dist/Form.cjs.js.map +1 -1
  22. package/dist/Form.es.js +7 -7
  23. package/dist/Image.cjs.js +8 -8
  24. package/dist/Image.cjs.js.map +1 -1
  25. package/dist/Image.es.js +7 -7
  26. package/dist/LiveProvider.cjs.js +6 -6
  27. package/dist/LiveProvider.es.js +8 -8
  28. package/dist/Navigation.cjs.js +27 -27
  29. package/dist/Navigation.cjs.js.map +1 -1
  30. package/dist/Navigation.es.js +6 -6
  31. package/dist/PreviewProvider.cjs.js +7 -7
  32. package/dist/PreviewProvider.cjs.js.map +1 -1
  33. package/dist/PreviewProvider.es.js +7 -7
  34. package/dist/ReadOnlyText.cjs.js +16 -13
  35. package/dist/ReadOnlyText.cjs.js.map +1 -1
  36. package/dist/ReadOnlyText.es.js +11 -8
  37. package/dist/ReadOnlyText.es.js.map +1 -1
  38. package/dist/ReadOnlyTextV2.cjs.js +13 -10
  39. package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
  40. package/dist/ReadOnlyTextV2.es.js +9 -6
  41. package/dist/ReadOnlyTextV2.es.js.map +1 -1
  42. package/dist/Root.cjs.js +8 -8
  43. package/dist/Root.cjs.js.map +1 -1
  44. package/dist/Root.es.js +6 -6
  45. package/dist/SocialLinks.cjs.js +14 -14
  46. package/dist/SocialLinks.cjs.js.map +1 -1
  47. package/dist/SocialLinks.es.js +10 -10
  48. package/dist/Text.cjs.js +4 -4
  49. package/dist/Text.es.js +5 -5
  50. package/dist/Video.cjs.js +3 -30
  51. package/dist/Video.cjs.js.map +1 -1
  52. package/dist/Video.es.js +2 -29
  53. package/dist/Video.es.js.map +1 -1
  54. package/dist/builder.cjs.js +4 -2
  55. package/dist/builder.cjs.js.map +1 -1
  56. package/dist/builder.es.js +4 -2
  57. package/dist/builder.es.js.map +1 -1
  58. package/dist/components.cjs.js +9 -9
  59. package/dist/components.es.js +9 -9
  60. package/dist/control-serialization.cjs.js +88 -12
  61. package/dist/control-serialization.cjs.js.map +1 -1
  62. package/dist/control-serialization.es.js +89 -13
  63. package/dist/control-serialization.es.js.map +1 -1
  64. package/dist/controls.cjs.js +15 -4
  65. package/dist/controls.cjs.js.map +1 -1
  66. package/dist/controls.es.js +6 -3
  67. package/dist/controls.es.js.map +1 -1
  68. package/dist/deepEqual.cjs.js +40 -0
  69. package/dist/deepEqual.cjs.js.map +1 -0
  70. package/dist/deepEqual.es.js +39 -0
  71. package/dist/deepEqual.es.js.map +1 -0
  72. package/dist/index.cjs.js +102 -98
  73. package/dist/index.cjs.js.map +1 -1
  74. package/dist/index.cjs10.js +173 -249
  75. package/dist/index.cjs10.js.map +1 -1
  76. package/dist/index.cjs11.js +375 -0
  77. package/dist/index.cjs11.js.map +1 -0
  78. package/dist/index.cjs2.js +14 -16
  79. package/dist/index.cjs2.js.map +1 -1
  80. package/dist/index.cjs4.js +2 -1
  81. package/dist/index.cjs4.js.map +1 -1
  82. package/dist/index.cjs6.js +700 -22
  83. package/dist/index.cjs6.js.map +1 -1
  84. package/dist/index.cjs7.js +37 -13
  85. package/dist/index.cjs7.js.map +1 -1
  86. package/dist/index.cjs8.js +17 -41
  87. package/dist/index.cjs8.js.map +1 -1
  88. package/dist/index.cjs9.js +13 -266
  89. package/dist/index.cjs9.js.map +1 -1
  90. package/dist/index.es.js +85 -80
  91. package/dist/index.es.js.map +1 -1
  92. package/dist/index.es10.js +174 -250
  93. package/dist/index.es10.js.map +1 -1
  94. package/dist/index.es11.js +368 -0
  95. package/dist/index.es11.js.map +1 -0
  96. package/dist/index.es2.js +3 -5
  97. package/dist/index.es2.js.map +1 -1
  98. package/dist/index.es3.js +1 -1
  99. package/dist/index.es4.js +2 -1
  100. package/dist/index.es4.js.map +1 -1
  101. package/dist/index.es6.js +695 -22
  102. package/dist/index.es6.js.map +1 -1
  103. package/dist/index.es7.js +33 -14
  104. package/dist/index.es7.js.map +1 -1
  105. package/dist/index.es8.js +17 -39
  106. package/dist/index.es8.js.map +1 -1
  107. package/dist/index.es9.js +12 -261
  108. package/dist/index.es9.js.map +1 -1
  109. package/dist/leaf.cjs.js +1 -1
  110. package/dist/leaf.cjs.js.map +1 -1
  111. package/dist/leaf.es.js +2 -2
  112. package/dist/main.cjs.js +4 -2
  113. package/dist/main.cjs.js.map +1 -1
  114. package/dist/main.es.js +4 -2
  115. package/dist/main.es.js.map +1 -1
  116. package/dist/next.cjs.js +3 -3
  117. package/dist/next.es.js +4 -4
  118. package/dist/prop-controllers.cjs.js +4 -2
  119. package/dist/prop-controllers.cjs.js.map +1 -1
  120. package/dist/prop-controllers.es.js +4 -2
  121. package/dist/prop-controllers.es.js.map +1 -1
  122. package/dist/react-page.cjs.js +958 -1431
  123. package/dist/react-page.cjs.js.map +1 -1
  124. package/dist/react-page.es.js +852 -1343
  125. package/dist/react-page.es.js.map +1 -1
  126. package/dist/react.cjs.js +3 -3
  127. package/dist/react.es.js +3 -3
  128. package/dist/select.cjs.js +21 -0
  129. package/dist/select.cjs.js.map +1 -0
  130. package/dist/select.es.js +16 -0
  131. package/dist/select.es.js.map +1 -0
  132. package/dist/slate.cjs.js +213 -12
  133. package/dist/slate.cjs.js.map +1 -1
  134. package/dist/slate.es.js +207 -6
  135. package/dist/slate.es.js.map +1 -1
  136. package/dist/types/src/api/react.d.ts.map +1 -1
  137. package/dist/types/src/builder/serialization/control-serialization.d.ts +3 -3
  138. package/dist/types/src/builder/serialization/control-serialization.d.ts.map +1 -1
  139. package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts +2 -2
  140. package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts.map +1 -1
  141. package/dist/types/src/builder/serialization/controls/style-v2.d.ts +5 -0
  142. package/dist/types/src/builder/serialization/controls/style-v2.d.ts.map +1 -0
  143. package/dist/types/src/components/builtin/Button/Button.d.ts +1 -1
  144. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
  145. package/dist/types/src/components/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
  146. package/dist/types/src/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
  147. package/dist/types/src/components/page/Page.d.ts.map +1 -1
  148. package/dist/types/src/controls/control.d.ts +4 -2
  149. package/dist/types/src/controls/control.d.ts.map +1 -1
  150. package/dist/types/src/controls/icon-radio-group.d.ts +29 -0
  151. package/dist/types/src/controls/icon-radio-group.d.ts.map +1 -0
  152. package/dist/types/src/controls/index.d.ts +2 -0
  153. package/dist/types/src/controls/index.d.ts.map +1 -1
  154. package/dist/types/src/controls/rich-text/translation.d.ts +1 -1
  155. package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
  156. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +12 -3
  157. package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  158. package/dist/types/src/controls/shape.d.ts +1 -2
  159. package/dist/types/src/controls/shape.d.ts.map +1 -1
  160. package/dist/types/src/controls/style-v2.d.ts +64 -0
  161. package/dist/types/src/controls/style-v2.d.ts.map +1 -0
  162. package/dist/types/src/next/client.d.ts.map +1 -1
  163. package/dist/types/src/next/document.d.ts.map +1 -1
  164. package/dist/types/src/prop-controllers/descriptors.d.ts +6 -3
  165. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  166. package/dist/types/src/prop-controllers/instances.d.ts +2 -2
  167. package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
  168. package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
  169. package/dist/types/src/runtimes/react/controls/control.d.ts +5 -2
  170. package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
  171. package/dist/types/src/runtimes/react/controls/icon-radio-group.d.ts +4 -0
  172. package/dist/types/src/runtimes/react/controls/icon-radio-group.d.ts.map +1 -0
  173. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +2 -1
  174. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
  175. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +10 -0
  176. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -0
  177. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +10 -0
  178. package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -0
  179. package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +1 -1
  180. package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
  181. package/dist/types/src/runtimes/react/controls/style-v2.d.ts +13 -0
  182. package/dist/types/src/runtimes/react/controls/style-v2.d.ts.map +1 -0
  183. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  184. package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
  185. package/dist/types/src/slate/BlockPlugin/index.d.ts +4 -0
  186. package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
  187. package/dist/types/src/slate/ColorPlugin/index.d.ts +10 -0
  188. package/dist/types/src/slate/ColorPlugin/index.d.ts.map +1 -0
  189. package/dist/types/src/slate/InlineModePlugin/index.d.ts +2 -0
  190. package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
  191. package/dist/types/src/slate/TextAlignPlugin/index.d.ts +9 -0
  192. package/dist/types/src/slate/TextAlignPlugin/index.d.ts.map +1 -0
  193. package/dist/types/src/slate/index.d.ts +2 -0
  194. package/dist/types/src/slate/index.d.ts.map +1 -1
  195. package/dist/types/src/slate/types.d.ts +39 -0
  196. package/dist/types/src/slate/types.d.ts.map +1 -1
  197. package/dist/types/src/slate/utils/responsive.d.ts +16 -0
  198. package/dist/types/src/slate/utils/responsive.d.ts.map +1 -0
  199. package/dist/useMediaQuery.es.js +1 -1
  200. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -34,29 +34,28 @@ var __publicField = (obj, key, value) => {
34
34
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
35
35
  return value;
36
36
  };
37
- var _e;
38
37
  import * as React from "react";
39
38
  import { useEffect, createContext, useContext, useState, useMemo, useRef, Children, createElement, forwardRef, memo, useId, useCallback, useImperativeHandle, Component, Suspense } from "react";
40
39
  import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector";
41
40
  import dynamic from "next/dynamic";
42
- import { a as createDocumentReference, g as getPropControllerDescriptors, b as isElementReference, e as getElementSwatchIds, f as getFileIds, h as getTypographyIds, j as getTableIds, k as getPageIds, l as getElementChildren, S as ShapeControlType, L as ListControlType, m as Types, E as ElementID, B as Backgrounds, W as Width, n as ResponsiveIconRadioGroup, M as Margin, P as Padding, o as Border, p as BorderRadius, q as Shadows, G as GapY, r as GapX, s as ResponsiveSelect, t as ResponsiveNumber, u as Checkbox, v as Grid, w as TextInput, x as Link, y as ResponsiveColor, z as TextStyle, C as ComponentIcon, I as Images, N as Number$1, D as Date$1, F as Font, A as ResponsiveLength, H as TextArea, J as Table, K as TableFormFields, O as Image, Q as ResponsiveOpacity, U as NavigationLinks, V as SocialLinks, X as RichText, Y as Video, Z as getBorderSwatchIds, _ as isNonNullable, $ as getBoxShadowsSwatchIds, a0 as getResponsiveColorSwatchIds, a1 as StyleControlProperty, a2 as ImageControlValueFormat, a3 as isPropControllersHandle, a4 as StyleControlType, a5 as RichTextV2ControlType, a6 as RichTextControlType, a7 as SlotControlType, a8 as LinkControlType, a9 as ImageControlType, aa as ColorControlType, ab as SelectControlType, ac as getComponentPropControllerDescriptors, ad as getPropControllers, ae as BorderPropControllerFormat, af as ShadowsPropControllerFormat, ag as BorderRadiusPropControllerFormat, ah as MarginPropControllerFormat, ai as PaddingPropControllerFormat, aj as WidthPropControllerFormat, ak as configureStore$1, al as copyElementTree, am as getBreakpoints, an as getDocument, ao as getElementId, ap as getIsPreview, aq as getIsInBuilder, ar as getReactComponent, as as getBuilderEditMode } from "./react-page.es.js";
41
+ import { a as createDocumentReference, g as getPropControllerDescriptors, b as isElementReference, e as getElementSwatchIds, f as getFileIds, h as getTypographyIds, j as getTableIds, k as getPageIds, l as getElementChildren, S as ShapeControlType, L as ListControlType, m as Types, E as ElementID, B as Backgrounds, W as Width, n as ResponsiveIconRadioGroup, M as Margin, P as Padding, o as Border, p as BorderRadius, q as Shadows, G as GapY, r as GapX, s as ResponsiveSelect, t as ResponsiveNumber, u as Checkbox, v as Grid, w as TextInput, x as Link, y as ResponsiveColor, z as TextStyle, C as ComponentIcon, I as Images, N as Number$1, D as Date$1, F as Font, A as ResponsiveLength, H as TextArea, J as Table, K as TableFormFields, O as Image, Q as ResponsiveOpacity, U as NavigationLinks, V as SocialLinks, X as RichText, Y as Video, Z as useStyle, _ as getBorderSwatchIds, $ as isNonNullable, a0 as getBoxShadowsSwatchIds, a1 as getResponsiveColorSwatchIds, a2 as StyleControlProperty, a3 as ImageControlValueFormat, a4 as isPropControllersHandle, a5 as StyleControlType, a6 as RichTextV2ControlType, a7 as RichTextControlType, a8 as SlotControlType, a9 as StyleV2ControlType, aa as LinkControlType, ab as ImageControlType, ac as ColorControlType, ad as getComponentPropControllerDescriptors, ae as getPropControllers, af as BorderPropControllerFormat, ag as ShadowsPropControllerFormat, ah as BorderRadiusPropControllerFormat, ai as MarginPropControllerFormat, aj as PaddingPropControllerFormat, ak as WidthPropControllerFormat, al as configureStore$1, am as copyElementTree, an as getBreakpoints, ao as getDocument, ap as getElementId, aq as getIsPreview, ar as getIsInBuilder, as as getReactComponent, at as getBuilderEditMode } from "./react-page.es.js";
43
42
  import { A as ActionTypes, n as apiResourceFulfilled, o as registerComponentEffect, p as registerReactComponentEffect, q as registerComponentHandleEffect, t as mountComponentEffect } from "./actions.es.js";
44
- import { cache, cx } from "@emotion/css";
45
- import { serializeStyles } from "@emotion/serialize";
46
- import { registerStyles, insertStyles } from "@emotion/utils";
47
43
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
48
44
  import { T as TextAreaControlType, a as TextInputControlType, N as NumberControlType, C as CheckboxControlType } from "./text-input.es.js";
49
45
  import { C as ComboboxControlType } from "./combobox.es.js";
46
+ import { I as IconRadioGroupControlType, S as SelectControlType } from "./select.es.js";
50
47
  import "slate";
51
- import { getBaseBreakpoint, findBreakpointOverride, DefaultBreakpointID, join, getBreakpoint, getBreakpointMediaQuery, parseBreakpointsInput } from "./state/breakpoints.es.js";
52
- import "is-hotkey";
53
- import "slate-react";
54
48
  import { useSyncExternalStore } from "use-sync-external-store/shim";
55
49
  import { createStore, applyMiddleware } from "redux";
56
50
  import thunk from "redux-thunk";
57
51
  import { A as APIResourceType } from "./types.es.js";
52
+ import { d as deepEqual } from "./deepEqual.es.js";
53
+ import { getBaseBreakpoint, findBreakpointOverride, DefaultBreakpointID, join, getBreakpoint, getBreakpointMediaQuery, parseBreakpointsInput } from "./state/breakpoints.es.js";
58
54
  import { g as getBox, i as isMeasurable, m as measure } from "./box-models.es.js";
59
55
  import ColorHelper from "color";
56
+ import { cache, cx } from "@emotion/css";
57
+ import "@emotion/serialize";
58
+ import "@emotion/utils";
60
59
  import scrollIntoView from "scroll-into-view-if-needed";
61
60
  import { findDOMNode } from "react-dom";
62
61
  import parse from "html-react-parser";
@@ -72,43 +71,6 @@ import { parse as parse$1 } from "set-cookie-parser";
72
71
  import { M as MakeswiftComponentType } from "./constants.es.js";
73
72
  import { v4 } from "uuid";
74
73
  import ipsum from "corporate-ipsum";
75
- function is(x, y) {
76
- if (x === y)
77
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
78
- return x !== x && y !== y;
79
- }
80
- const { hasOwnProperty: hasOwnProperty$1 } = Object.prototype;
81
- const shallowEqual = (a, b) => {
82
- if (is(a, b))
83
- return true;
84
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
85
- return false;
86
- const keysA = Object.keys(a);
87
- const keysB = Object.keys(b);
88
- if (keysA.length !== keysB.length)
89
- return false;
90
- for (let i = 0; i < keysA.length; i += 1) {
91
- if (!hasOwnProperty$1.call(b, keysA[i]) || !is(a[keysA[i]], b[keysA[i]]))
92
- return false;
93
- }
94
- return true;
95
- };
96
- const { hasOwnProperty } = Object.prototype;
97
- const deepEqual = (a, b) => {
98
- if (shallowEqual(a, b))
99
- return true;
100
- if (typeof a !== "object" || a === null || typeof b !== "object" || b === null)
101
- return false;
102
- const keysA = Object.keys(a);
103
- const keysB = Object.keys(b);
104
- if (keysA.length !== keysB.length)
105
- return false;
106
- for (let i = 0; i < keysA.length; i += 1) {
107
- if (!hasOwnProperty.call(b, keysA[i]) || !deepEqual(a[keysA[i]], b[keysA[i]]))
108
- return false;
109
- }
110
- return true;
111
- };
112
74
  const SCRIPT_TAG = "script";
113
75
  function BodySnippet({
114
76
  code,
@@ -1151,7 +1113,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1151
1113
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1152
1114
  return res.json(fonts2);
1153
1115
  }
1154
- const version = "0.9.0";
1116
+ const version = "0.9.2";
1155
1117
  async function handler(req, res, { apiKey, unstable_siteVersions }) {
1156
1118
  if (req.query.secret !== apiKey) {
1157
1119
  return res.status(401).json({ message: "Unauthorized" });
@@ -2423,19 +2385,6 @@ function registerBuiltinComponents(runtime) {
2423
2385
  unregisterVideoComponent();
2424
2386
  };
2425
2387
  }
2426
- const isServer = typeof window === "undefined";
2427
- const useInsertionEffectSpecifier = "useInsertionEffect";
2428
- const useInsertionEffect = (_e = React[useInsertionEffectSpecifier]) != null ? _e : React.useLayoutEffect;
2429
- function useStyle(style) {
2430
- const serialized = serializeStyles([style], cache.registered);
2431
- registerStyles(cache, serialized, false);
2432
- useInsertionEffect(() => {
2433
- insertStyles(cache, serialized, false);
2434
- });
2435
- if (isServer)
2436
- insertStyles(cache, serialized, false);
2437
- return `${cache.key}-${serialized.name}`;
2438
- }
2439
2388
  var _path;
2440
2389
  function _extends() {
2441
2390
  _extends = Object.assign || function(target) {
@@ -2579,8 +2528,8 @@ function useTable(tableId) {
2579
2528
  }, [client, tableId]);
2580
2529
  return table;
2581
2530
  }
2582
- function mapSideColor(swatches, _f) {
2583
- var _g = _f, { color } = _g, restOfSide = __objRest(_g, ["color"]);
2531
+ function mapSideColor(swatches, _e) {
2532
+ var _f = _e, { color } = _f, restOfSide = __objRest(_f, ["color"]);
2584
2533
  return __spreadProps(__spreadValues({}, restOfSide), {
2585
2534
  color: color && {
2586
2535
  alpha: color.alpha,
@@ -2898,7 +2847,7 @@ const defaultPadding = {
2898
2847
  paddingBottom: 0,
2899
2848
  paddingLeft: 0
2900
2849
  };
2901
- function useStyleControlCssObject(style, controlDefinition) {
2850
+ function useStyleControlCssObject$1(style, controlDefinition) {
2902
2851
  const { properties } = controlDefinition.config;
2903
2852
  return __spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
2904
2853
  maxWidth: "100%"
@@ -2910,14 +2859,14 @@ function useStyleControlCssObject(style, controlDefinition) {
2910
2859
  style == null ? void 0 : style.borderRadius,
2911
2860
  style == null ? void 0 : style.textStyle
2912
2861
  ], ([width, margin, padding, border, borderRadius, textStyle]) => {
2913
- var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k;
2862
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
2914
2863
  return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
2915
2864
  width: (_a = widthToString(width)) != null ? _a : "100%"
2916
2865
  }), properties.includes(StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(StyleControlProperty.Border) && {
2917
2866
  borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
2918
2867
  borderRight: (_c = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c : "0 solid black",
2919
2868
  borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
2920
- borderLeft: (_e2 = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e2 : "0 solid black"
2869
+ borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
2921
2870
  }), properties.includes(StyleControlProperty.BorderRadius) && {
2922
2871
  borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
2923
2872
  borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
@@ -2949,7 +2898,7 @@ function useStyleControlCssObject(style, controlDefinition) {
2949
2898
  }
2950
2899
  }
2951
2900
  function useFormattedStyle(styleControlData, controlDefinition, control) {
2952
- const style = useStyleControlCssObject(styleControlData, controlDefinition);
2901
+ const style = useStyleControlCssObject$1(styleControlData, controlDefinition);
2953
2902
  const guid = useId().replaceAll(":", "");
2954
2903
  const styleClassName = useStyle(style);
2955
2904
  const classNames = `${styleClassName} ${guid}`;
@@ -3006,6 +2955,9 @@ function useColorValue(data, definition) {
3006
2955
  function useComboboxControlValue(data) {
3007
2956
  return data == null ? void 0 : data.value;
3008
2957
  }
2958
+ function useIconRadioGroupValue(iconRadioGroupControlData, controlDefinition) {
2959
+ return iconRadioGroupControlData != null ? iconRadioGroupControlData : controlDefinition.config.defaultValue;
2960
+ }
3009
2961
  function useImageControlValue(data, definition) {
3010
2962
  var _a;
3011
2963
  const format = (_a = definition.config.format) != null ? _a : ImageControlValueFormat.URL;
@@ -3109,7 +3061,7 @@ function ListControlValue({
3109
3061
  function useNumber(numberControlData, controlDefinition) {
3110
3062
  return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
3111
3063
  }
3112
- const Text = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es8.js"))));
3064
+ const Text = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es9.js"))));
3113
3065
  function useRichText(data, control) {
3114
3066
  const textCallbackRef = useCallback((handle) => {
3115
3067
  var _a;
@@ -3123,12 +3075,13 @@ function useRichText(data, control) {
3123
3075
  ref: textCallbackRef
3124
3076
  });
3125
3077
  }
3126
- const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es9.js"))));
3078
+ const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es10.js"))));
3127
3079
  const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./ReadOnlyTextV2.es.js"))));
3128
- function useRichTextV2(data, control) {
3080
+ function useRichTextV2(data, definition, control) {
3129
3081
  const isPreview = useIsPreview();
3130
3082
  return isPreview ? /* @__PURE__ */ jsx(EditableText, {
3131
3083
  text: data,
3084
+ definition,
3132
3085
  control
3133
3086
  }) : /* @__PURE__ */ jsx(ReadOnlyText, {
3134
3087
  text: data,
@@ -3190,13 +3143,13 @@ function useSlot(data, control) {
3190
3143
  }, element.key))
3191
3144
  });
3192
3145
  }
3193
- function Slot(_h) {
3194
- var _i = _h, {
3146
+ function Slot(_g) {
3147
+ var _h = _g, {
3195
3148
  as,
3196
3149
  control,
3197
3150
  children,
3198
3151
  className
3199
- } = _i, restOfProps = __objRest(_i, [
3152
+ } = _h, restOfProps = __objRest(_h, [
3200
3153
  "as",
3201
3154
  "control",
3202
3155
  "children",
@@ -3225,15 +3178,15 @@ function Slot(_h) {
3225
3178
  }
3226
3179
  Slot.Placeholder = SlotPlaceholder;
3227
3180
  Slot.Item = SlotItem;
3228
- function SlotItem(_j) {
3229
- var _k = _j, {
3181
+ function SlotItem(_i) {
3182
+ var _j = _i, {
3230
3183
  as,
3231
3184
  control,
3232
3185
  grid,
3233
3186
  index,
3234
3187
  children,
3235
3188
  className
3236
- } = _k, restOfProps = __objRest(_k, [
3189
+ } = _j, restOfProps = __objRest(_j, [
3237
3190
  "as",
3238
3191
  "control",
3239
3192
  "grid",
@@ -3315,6 +3268,43 @@ function SlotPlaceholder({
3315
3268
  })
3316
3269
  });
3317
3270
  }
3271
+ function useStyleControlCssObject(styleControlData, controlDefinition) {
3272
+ var _a;
3273
+ const breakpoints = useBreakpoints();
3274
+ return __spreadValues(__spreadValues({}, controlDefinition.config.getStyle((_a = findBreakpointOverride(breakpoints, styleControlData, getBaseBreakpoint(breakpoints).id)) == null ? void 0 : _a.value)), breakpoints.reduce((styles, breakpoint) => {
3275
+ var _a2;
3276
+ return __spreadProps(__spreadValues({}, styles), {
3277
+ [getBreakpointMediaQuery(breakpoint)]: controlDefinition.config.getStyle((_a2 = findBreakpointOverride(breakpoints, styleControlData, breakpoint.id)) == null ? void 0 : _a2.value)
3278
+ });
3279
+ }, {}));
3280
+ }
3281
+ function useFormattedStyleV2(styleControlData, controlDefinition) {
3282
+ const styles = useStyleControlCssObject(styleControlData, controlDefinition);
3283
+ return useStyle(styles);
3284
+ }
3285
+ function StyleV2ControlValue({
3286
+ definition,
3287
+ data,
3288
+ children,
3289
+ control
3290
+ }) {
3291
+ return (data != null ? data : []).reduceRight((renderFn, deviceOverrideData) => (responsiveValue) => {
3292
+ return /* @__PURE__ */ jsx(ControlValue, {
3293
+ definition: definition.config.type,
3294
+ data: deviceOverrideData.value,
3295
+ control: control == null ? void 0 : control.control,
3296
+ children: (value) => renderFn([__spreadProps(__spreadValues({}, deviceOverrideData), {
3297
+ value
3298
+ }), ...responsiveValue])
3299
+ });
3300
+ }, (value) => {
3301
+ return /* @__PURE__ */ jsx(RenderHook, {
3302
+ hook: useFormattedStyleV2,
3303
+ parameters: [value, definition],
3304
+ children: (value2) => children(value2)
3305
+ }, definition.type);
3306
+ })([]);
3307
+ }
3318
3308
  function useTextAreaValue(data, definition) {
3319
3309
  return data != null ? data : definition.config.defaultValue;
3320
3310
  }
@@ -3364,6 +3354,12 @@ function ControlValue({
3364
3354
  parameters: [data, definition],
3365
3355
  children: (value) => children(value)
3366
3356
  }, definition.type);
3357
+ case IconRadioGroupControlType:
3358
+ return /* @__PURE__ */ jsx(RenderHook, {
3359
+ hook: useIconRadioGroupValue,
3360
+ parameters: [data, definition],
3361
+ children: (value) => children(value)
3362
+ }, definition.type);
3367
3363
  case ImageControlType:
3368
3364
  return /* @__PURE__ */ jsx(RenderHook, {
3369
3365
  hook: useImageControlValue,
@@ -3396,6 +3392,13 @@ function ControlValue({
3396
3392
  control,
3397
3393
  children: (value) => children(value)
3398
3394
  });
3395
+ case StyleV2ControlType:
3396
+ return /* @__PURE__ */ jsx(StyleV2ControlValue, {
3397
+ data,
3398
+ definition,
3399
+ control,
3400
+ children: (value) => children(value)
3401
+ }, definition.type);
3399
3402
  case SlotControlType:
3400
3403
  return /* @__PURE__ */ jsx(RenderHook, {
3401
3404
  hook: useSlot,
@@ -3411,7 +3414,7 @@ function ControlValue({
3411
3414
  case RichTextV2ControlType:
3412
3415
  return /* @__PURE__ */ jsx(RenderHook, {
3413
3416
  hook: useRichTextV2,
3414
- parameters: [data, control],
3417
+ parameters: [data, definition, control],
3415
3418
  children: (value) => children(value)
3416
3419
  }, definition.type);
3417
3420
  case StyleControlType:
@@ -3467,11 +3470,13 @@ function PropsValue({
3467
3470
  case TextAreaControlType:
3468
3471
  case SelectControlType:
3469
3472
  case ColorControlType:
3473
+ case IconRadioGroupControlType:
3470
3474
  case ImageControlType:
3471
3475
  case ComboboxControlType:
3472
3476
  case ShapeControlType:
3473
3477
  case ListControlType:
3474
3478
  case LinkControlType:
3479
+ case StyleV2ControlType:
3475
3480
  return /* @__PURE__ */ jsx(ControlValue, {
3476
3481
  definition: descriptor,
3477
3482
  data: props[propName],
@@ -3504,7 +3509,7 @@ function PropsValue({
3504
3509
  const control = (_c = propControllers == null ? void 0 : propControllers[propName]) != null ? _c : null;
3505
3510
  return /* @__PURE__ */ jsx(RenderHook, {
3506
3511
  hook: useRichTextV2,
3507
- parameters: [props[propName], control],
3512
+ parameters: [props[propName], descriptor, control],
3508
3513
  children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
3509
3514
  [propName]: value
3510
3515
  }))
@@ -3761,10 +3766,10 @@ registerBuiltinComponents(ReactRuntime);
3761
3766
  const StoreContext = createContext(ReactRuntime.store);
3762
3767
  const PreviewProvider = dynamic(() => import("./PreviewProvider.es.js"));
3763
3768
  const LiveProvider = dynamic(() => import("./LiveProvider.es.js"));
3764
- function RuntimeProvider(_l) {
3765
- var _m = _l, {
3769
+ function RuntimeProvider(_k) {
3770
+ var _l = _k, {
3766
3771
  preview
3767
- } = _m, props = __objRest(_m, [
3772
+ } = _l, props = __objRest(_l, [
3768
3773
  "preview"
3769
3774
  ]);
3770
3775
  return preview ? /* @__PURE__ */ jsx(PreviewProvider, __spreadValues({}, props)) : /* @__PURE__ */ jsx(LiveProvider, __spreadValues({}, props));
@@ -3965,5 +3970,5 @@ const DocumentReference = memo(forwardRef(function DocumentReference2({
3965
3970
  document: document2
3966
3971
  });
3967
3972
  }));
3968
- export { Document$1 as $, Alignments as A, useFile as B, Contrasts as C, DocumentReference as D, Element$1 as E, forwardNextDynamicRef as F, useIsPreview as G, useFiles as H, useSwatches as I, usePagePathnameSlice as J, useElementId as K, deepEqual as L, ElementImperativeHandle as M, StoreContext as N, MakeswiftProvider as O, PageProvider as P, useBuilderEditMode as Q, RuntimeProvider as R, Shapes as S, pollBoxModel as T, useTypography as U, getStaticPaths as V, getStaticProps as W, getServerSideProps as X, Page as Y, Makeswift as Z, PreviewModeScript as _, ReactRuntime as a, MakeswiftApiHandler as a0, usePageId as b, DEFAULT_BOX_ANIMATE_TYPE as c, DEFAULT_BOX_ANIMATE_DELAY as d, DEFAULT_BOX_ANIMATE_DURATION as e, DEFAULT_ITEM_ANIMATE_TYPE as f, DEFAULT_ITEM_ANIMATE_DELAY as g, DEFAULT_ITEM_ANIMATE_DURATION as h, DEFAULT_ITEM_STAGGER_DURATION as i, useBorder as j, useBoxShadow as k, useResponsiveColor as l, Page$1 as m, useStyle as n, useResponsiveStyle as o, useResponsiveWidth as p, useResponsiveTextStyle as q, colorToString as r, useBreakpoints as s, Sizes as t, useIsInBuilder as u, useFormContext as v, useResponsiveGridItem as w, useTable as x, useMakeswiftClient as y, Provider as z };
3973
+ export { MakeswiftApiHandler as $, Alignments as A, forwardNextDynamicRef as B, Contrasts as C, DocumentReference as D, Element$1 as E, useIsPreview as F, useFiles as G, useSwatches as H, usePagePathnameSlice as I, useElementId as J, ElementImperativeHandle as K, StoreContext as L, MakeswiftProvider as M, ControlValue as N, useBuilderEditMode as O, PageProvider as P, pollBoxModel as Q, RuntimeProvider as R, Shapes as S, useTypography as T, getStaticPaths as U, getStaticProps as V, getServerSideProps as W, Page as X, Makeswift as Y, PreviewModeScript as Z, Document$1 as _, ReactRuntime as a, usePageId as b, DEFAULT_BOX_ANIMATE_TYPE as c, DEFAULT_BOX_ANIMATE_DELAY as d, DEFAULT_BOX_ANIMATE_DURATION as e, DEFAULT_ITEM_ANIMATE_TYPE as f, DEFAULT_ITEM_ANIMATE_DELAY as g, DEFAULT_ITEM_ANIMATE_DURATION as h, DEFAULT_ITEM_STAGGER_DURATION as i, useBorder as j, useBoxShadow as k, useResponsiveColor as l, Page$1 as m, useResponsiveStyle as n, useResponsiveWidth as o, useResponsiveTextStyle as p, colorToString as q, useBreakpoints as r, Sizes as s, useFormContext as t, useIsInBuilder as u, useResponsiveGridItem as v, useTable as w, useMakeswiftClient as x, Provider as y, useFile as z };
3969
3974
  //# sourceMappingURL=index.es.js.map