@makeswift/runtime 0.0.22 → 0.1.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/dist/Box.cjs.js +502 -0
  2. package/dist/Box.cjs.js.map +1 -0
  3. package/dist/Box.es.js +496 -0
  4. package/dist/Box.es.js.map +1 -0
  5. package/dist/Button.cjs.js +308 -0
  6. package/dist/Button.cjs.js.map +1 -0
  7. package/dist/Button.es.js +301 -0
  8. package/dist/Button.es.js.map +1 -0
  9. package/dist/Carousel.cjs.js +487 -0
  10. package/dist/Carousel.cjs.js.map +1 -0
  11. package/dist/Carousel.es.js +481 -0
  12. package/dist/Carousel.es.js.map +1 -0
  13. package/dist/Countdown.cjs.js +340 -0
  14. package/dist/Countdown.cjs.js.map +1 -0
  15. package/dist/Countdown.es.js +334 -0
  16. package/dist/Countdown.es.js.map +1 -0
  17. package/dist/Divider.cjs.js +115 -0
  18. package/dist/Divider.cjs.js.map +1 -0
  19. package/dist/Divider.es.js +109 -0
  20. package/dist/Divider.es.js.map +1 -0
  21. package/dist/Embed.cjs.js +129 -0
  22. package/dist/Embed.cjs.js.map +1 -0
  23. package/dist/Embed.es.js +123 -0
  24. package/dist/Embed.es.js.map +1 -0
  25. package/dist/Form.cjs.js +1705 -0
  26. package/dist/Form.cjs.js.map +1 -0
  27. package/dist/Form.es.js +1677 -0
  28. package/dist/Form.es.js.map +1 -0
  29. package/dist/Image.cjs2.js +148 -0
  30. package/dist/Image.cjs2.js.map +1 -0
  31. package/dist/Image.es2.js +141 -0
  32. package/dist/Image.es2.js.map +1 -0
  33. package/dist/Navigation.cjs.js +736 -0
  34. package/dist/Navigation.cjs.js.map +1 -0
  35. package/dist/Navigation.es.js +710 -0
  36. package/dist/Navigation.es.js.map +1 -0
  37. package/dist/Root.cjs.js +143 -0
  38. package/dist/Root.cjs.js.map +1 -0
  39. package/dist/Root.es.js +137 -0
  40. package/dist/Root.es.js.map +1 -0
  41. package/dist/SocialLinks.cjs.js +900 -0
  42. package/dist/SocialLinks.cjs.js.map +1 -0
  43. package/dist/SocialLinks.es.js +874 -0
  44. package/dist/SocialLinks.es.js.map +1 -0
  45. package/dist/Text.cjs.js +475 -0
  46. package/dist/Text.cjs.js.map +1 -0
  47. package/dist/Text.es.js +467 -0
  48. package/dist/Text.es.js.map +1 -0
  49. package/dist/Video.cjs.js +121 -0
  50. package/dist/Video.cjs.js.map +1 -0
  51. package/dist/Video.es.js +114 -0
  52. package/dist/Video.es.js.map +1 -0
  53. package/dist/components.cjs.js +80 -58
  54. package/dist/components.cjs.js.map +1 -1
  55. package/dist/components.es.js +41 -18
  56. package/dist/components.es.js.map +1 -1
  57. package/dist/cssMediaRules.cjs.js +222 -0
  58. package/dist/cssMediaRules.cjs.js.map +1 -0
  59. package/dist/cssMediaRules.es.js +213 -0
  60. package/dist/cssMediaRules.es.js.map +1 -0
  61. package/dist/descriptors.es.js +1 -1
  62. package/dist/index.cjs.js +1410 -7741
  63. package/dist/index.cjs.js.map +1 -1
  64. package/dist/index.cjs2.js +522 -0
  65. package/dist/index.cjs2.js.map +1 -0
  66. package/dist/index.cjs3.js +141 -0
  67. package/dist/index.cjs3.js.map +1 -0
  68. package/dist/index.cjs4.js +18 -0
  69. package/dist/index.cjs4.js.map +1 -0
  70. package/dist/index.es.js +1341 -7697
  71. package/dist/index.es.js.map +1 -1
  72. package/dist/index.es2.js +514 -0
  73. package/dist/index.es2.js.map +1 -0
  74. package/dist/index.es3.js +134 -0
  75. package/dist/index.es3.js.map +1 -0
  76. package/dist/index.es4.js +13 -0
  77. package/dist/index.es4.js.map +1 -0
  78. package/dist/next.cjs.js +19 -201
  79. package/dist/next.cjs.js.map +1 -1
  80. package/dist/next.es.js +12 -192
  81. package/dist/next.es.js.map +1 -1
  82. package/dist/placeholders.cjs.js +13 -0
  83. package/dist/placeholders.cjs.js.map +1 -0
  84. package/dist/placeholders.es.js +12 -0
  85. package/dist/placeholders.es.js.map +1 -0
  86. package/dist/react-builder-preview.cjs.js +23 -33
  87. package/dist/react-builder-preview.cjs.js.map +1 -1
  88. package/dist/react-builder-preview.es.js +13 -23
  89. package/dist/react-builder-preview.es.js.map +1 -1
  90. package/dist/react-page.es.js +1 -1
  91. package/dist/react.cjs.js +16 -28
  92. package/dist/react.cjs.js.map +1 -1
  93. package/dist/react.es.js +8 -20
  94. package/dist/react.es.js.map +1 -1
  95. package/dist/types/components/builtin/Box/Box.d.ts +1 -4
  96. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
  97. package/dist/types/components/builtin/Box/animations.d.ts +1 -8
  98. package/dist/types/components/builtin/Box/animations.d.ts.map +1 -1
  99. package/dist/types/components/builtin/Box/constants.d.ts +9 -0
  100. package/dist/types/components/builtin/Box/constants.d.ts.map +1 -0
  101. package/dist/types/components/builtin/Box/contants.d.ts +9 -0
  102. package/dist/types/components/builtin/Box/contants.d.ts.map +1 -0
  103. package/dist/types/components/builtin/Box/index.d.ts +2 -2
  104. package/dist/types/components/builtin/Box/index.d.ts.map +1 -1
  105. package/dist/types/components/builtin/Box/register.d.ts +3 -0
  106. package/dist/types/components/builtin/Box/register.d.ts.map +1 -0
  107. package/dist/types/components/builtin/Button/Button.d.ts +1 -4
  108. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  109. package/dist/types/components/builtin/Button/constants.d.ts +2 -0
  110. package/dist/types/components/builtin/Button/constants.d.ts.map +1 -0
  111. package/dist/types/components/builtin/Button/contants.d.ts +2 -0
  112. package/dist/types/components/builtin/Button/contants.d.ts.map +1 -0
  113. package/dist/types/components/builtin/Button/index.d.ts +1 -1
  114. package/dist/types/components/builtin/Button/index.d.ts.map +1 -1
  115. package/dist/types/components/builtin/Button/register.d.ts +3 -0
  116. package/dist/types/components/builtin/Button/register.d.ts.map +1 -0
  117. package/dist/types/components/builtin/Carousel/Carousel.d.ts +0 -3
  118. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  119. package/dist/types/components/builtin/Carousel/index.d.ts +1 -1
  120. package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -1
  121. package/dist/types/components/builtin/Carousel/register.d.ts +3 -0
  122. package/dist/types/components/builtin/Carousel/register.d.ts.map +1 -0
  123. package/dist/types/components/builtin/Countdown/Countdown.d.ts +0 -3
  124. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  125. package/dist/types/components/builtin/Countdown/index.d.ts +1 -1
  126. package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -1
  127. package/dist/types/components/builtin/Countdown/register.d.ts +3 -0
  128. package/dist/types/components/builtin/Countdown/register.d.ts.map +1 -0
  129. package/dist/types/components/builtin/Divider/Divider.d.ts +0 -3
  130. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
  131. package/dist/types/components/builtin/Divider/index.d.ts +1 -1
  132. package/dist/types/components/builtin/Divider/index.d.ts.map +1 -1
  133. package/dist/types/components/builtin/Divider/register.d.ts +3 -0
  134. package/dist/types/components/builtin/Divider/register.d.ts.map +1 -0
  135. package/dist/types/components/builtin/Embed/Embed.d.ts +0 -3
  136. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
  137. package/dist/types/components/builtin/Embed/index.d.ts +1 -1
  138. package/dist/types/components/builtin/Embed/index.d.ts.map +1 -1
  139. package/dist/types/components/builtin/Embed/register.d.ts +3 -0
  140. package/dist/types/components/builtin/Embed/register.d.ts.map +1 -0
  141. package/dist/types/components/builtin/Form/Form.d.ts +1 -10
  142. package/dist/types/components/builtin/Form/Form.d.ts.map +1 -1
  143. package/dist/types/components/builtin/Form/constants.d.ts +1 -0
  144. package/dist/types/components/builtin/Form/constants.d.ts.map +1 -0
  145. package/dist/types/components/builtin/Form/context/FormContext.d.ts +6 -0
  146. package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -1
  147. package/dist/types/components/builtin/Form/index.d.ts +1 -1
  148. package/dist/types/components/builtin/Form/index.d.ts.map +1 -1
  149. package/dist/types/components/builtin/Form/register.d.ts +3 -0
  150. package/dist/types/components/builtin/Form/register.d.ts.map +1 -0
  151. package/dist/types/components/builtin/Image/Image.d.ts +0 -3
  152. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
  153. package/dist/types/components/builtin/Image/index.d.ts +1 -1
  154. package/dist/types/components/builtin/Image/index.d.ts.map +1 -1
  155. package/dist/types/components/builtin/Image/register.d.ts +3 -0
  156. package/dist/types/components/builtin/Image/register.d.ts.map +1 -0
  157. package/dist/types/components/builtin/Navigation/Navigation.d.ts +0 -3
  158. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  159. package/dist/types/components/builtin/Navigation/index.d.ts +1 -1
  160. package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -1
  161. package/dist/types/components/builtin/Navigation/register.d.ts +3 -0
  162. package/dist/types/components/builtin/Navigation/register.d.ts.map +1 -0
  163. package/dist/types/components/builtin/Root/Root.d.ts +0 -2
  164. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
  165. package/dist/types/components/builtin/Root/index.d.ts +1 -1
  166. package/dist/types/components/builtin/Root/index.d.ts.map +1 -1
  167. package/dist/types/components/builtin/Root/register.d.ts +3 -0
  168. package/dist/types/components/builtin/Root/register.d.ts.map +1 -0
  169. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +0 -3
  170. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  171. package/dist/types/components/builtin/SocialLinks/index.d.ts +1 -1
  172. package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -1
  173. package/dist/types/components/builtin/SocialLinks/register.d.ts +3 -0
  174. package/dist/types/components/builtin/SocialLinks/register.d.ts.map +1 -0
  175. package/dist/types/components/builtin/Text/Text.d.ts +0 -3
  176. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
  177. package/dist/types/components/builtin/Text/index.d.ts +1 -1
  178. package/dist/types/components/builtin/Text/index.d.ts.map +1 -1
  179. package/dist/types/components/builtin/Text/register.d.ts +3 -0
  180. package/dist/types/components/builtin/Text/register.d.ts.map +1 -0
  181. package/dist/types/components/builtin/Video/Video.d.ts +0 -3
  182. package/dist/types/components/builtin/Video/Video.d.ts.map +1 -1
  183. package/dist/types/components/builtin/Video/index.d.ts +1 -1
  184. package/dist/types/components/builtin/Video/index.d.ts.map +1 -1
  185. package/dist/types/components/builtin/Video/register.d.ts +3 -0
  186. package/dist/types/components/builtin/Video/register.d.ts.map +1 -0
  187. package/dist/types/components/builtin/index.d.ts +1 -2
  188. package/dist/types/components/builtin/index.d.ts.map +1 -1
  189. package/dist/types/components/builtin/register.d.ts +3 -0
  190. package/dist/types/components/builtin/register.d.ts.map +1 -0
  191. package/dist/types/dynamic.d.ts +2 -0
  192. package/dist/types/dynamic.d.ts.map +1 -0
  193. package/dist/types/next/plugin.d.ts +3 -0
  194. package/dist/types/next/plugin.d.ts.map +1 -0
  195. package/dist/types/next.d.ts +12 -2
  196. package/dist/types/next.d.ts.map +1 -1
  197. package/dist/useBackgrounds.cjs.js +124 -0
  198. package/dist/useBackgrounds.cjs.js.map +1 -0
  199. package/dist/useBackgrounds.es.js +123 -0
  200. package/dist/useBackgrounds.es.js.map +1 -0
  201. package/dist/useBoxShadow.cjs.js +78 -0
  202. package/dist/useBoxShadow.cjs.js.map +1 -0
  203. package/dist/useBoxShadow.es.js +77 -0
  204. package/dist/useBoxShadow.es.js.map +1 -0
  205. package/dist/useMediaQuery.cjs.js +26 -0
  206. package/dist/useMediaQuery.cjs.js.map +1 -0
  207. package/dist/useMediaQuery.es.js +25 -0
  208. package/dist/useMediaQuery.es.js.map +1 -0
  209. package/dist/usePage.cjs.js +14 -0
  210. package/dist/usePage.cjs.js.map +1 -0
  211. package/dist/usePage.es.js +13 -0
  212. package/dist/usePage.es.js.map +1 -0
  213. package/dist/useTable.cjs.js +10 -0
  214. package/dist/useTable.cjs.js.map +1 -0
  215. package/dist/useTable.es.js +9 -0
  216. package/dist/useTable.es.js.map +1 -0
  217. package/next/plugin.js +1 -0
  218. package/package.json +4 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../../runtimes/react';
2
+ export declare function registerComponent(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Image/register.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAqBtD"}
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CheckboxValue, ElementIDValue, GapXValue, ImageValue, LinkValue, MarginValue, NavigationLinksValue, ResponsiveIconRadioGroupValue, ResponsiveLengthValue, ResponsiveSelectValue, TextInputValue, TextStyleValue } from '../../../prop-controllers/descriptors';
3
- import { ReactRuntime } from '../../../react';
4
- import { Props } from '../../../prop-controllers';
5
3
  import { ResponsiveColor } from '../../../runtimes/react/controls';
6
4
  declare type Props = {
7
5
  id?: ElementIDValue;
@@ -23,5 +21,4 @@ declare type Props = {
23
21
  };
24
22
  declare const Navigation: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
25
23
  export default Navigation;
26
- export declare function registerComponent(runtime: ReactRuntime): () => void;
27
24
  //# sourceMappingURL=Navigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Navigation/Navig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
1
+ {"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Navigation/Navigation.tsx"],"names":[],"mappings":";AAYA,OAAO,EAEL,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,cAAc,EAEf,MAAM,uCAAuC,CAAA;AAI9C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAGlE,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,KAAK,CAAC,EAAE,oBAAoB,CAAA;IAC5B,aAAa,CAAC,EAAE,cAAc,CAAA;IAC9B,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,WAAW,CAAC,EAAE,cAAc,CAAA;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,6BAA6B,CAAC,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAA;IAC/E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,mBAAmB,CAAC,EAAE,qBAAqB,CAAC,YAAY,GAAG,WAAW,CAAC,CAAA;IACvE,uBAAuB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAChD,wBAAwB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IACjD,yBAAyB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAwFD,QAAA,MAAM,UAAU,kGAiFd,CAAA;AAEF,eAAe,UAAU,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default, registerComponent } from './Navigation';
1
+ export { default } from './Navigation';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../../runtimes/react';
2
+ export declare function registerComponent(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Navigation/register.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAGtD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAsGtD"}
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { GridValue, BackgroundsValue, GapXValue, GapYValue } from '../../../prop-controllers/descriptors';
3
- import { ReactRuntime } from '../../../react';
4
3
  import { Props } from '../../../prop-controllers';
5
4
  declare type Props = {
6
5
  children?: GridValue;
@@ -10,5 +9,4 @@ declare type Props = {
10
9
  };
11
10
  declare const Root: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
12
11
  export default Root;
13
- export declare function registerComponent(runtime: ReactRuntime): () => void;
14
12
  //# sourceMappingURL=Root.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Root/Root.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAW,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AA4BjD,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,IAAI,kGA4BR,CAAA;AAEF,eAAe,IAAI,CAAA;AAEnB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAYtD"}
1
+ {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Root/Root.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,SAAS,EACV,MAAM,uCAAuC,CAAA;AAI9C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AA4BjD,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,WAAW,CAAC,EAAE,gBAAgB,CAAA;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,IAAI,kGA4BR,CAAA;AAEF,eAAe,IAAI,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default, registerComponent } from './Root';
1
+ export { default } from './Root';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../../react';
2
+ export declare function registerComponent(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Root/register.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAetD"}
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { ElementIDValue, SocialLinksValue, ResponsiveIconRadioGroupValue, ResponsiveSelectValue, GapXValue, MarginValue } from '../../../prop-controllers/descriptors';
3
- import { ReactRuntime } from '../../../react';
4
- import { Props } from '../../../prop-controllers';
5
3
  import { ResponsiveColor } from '../../../runtimes/react/controls';
6
4
  declare type Props = {
7
5
  id?: ElementIDValue;
@@ -18,5 +16,4 @@ declare type Props = {
18
16
  };
19
17
  declare const SocialLinks: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
20
18
  export default SocialLinks;
21
- export declare function registerComponent(runtime: ReactRuntime): () => void;
22
19
  //# sourceMappingURL=SocialLinks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SocialLinks.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/SocialLinks/SocialLinks.tsx"],"names":[],"mappings":";AAWA,OAAO,EAEL,cAAc,EACd,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,SAAS,EACT,WAAW,EACZ,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAElE,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,KAAK,CAAC,EAAE,gBAAgB,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C,CAAA;IAClE,UAAU,CAAC,EAAE,qBAAqB,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAA;IACvE,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAC7B,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IACxC,SAAS,CAAC,EAAE,6BAA6B,CAAC,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAA;IAC/E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAkFD,QAAA,MAAM,WAAW,kGAkDf,CAAA;AAEF,eAAe,WAAW,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default, registerComponent } from './SocialLinks';
1
+ export { default } from './SocialLinks';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/SocialLinks/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/SocialLinks/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../../runtimes/react';
2
+ export declare function registerComponent(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/SocialLinks/register.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAiItD"}
@@ -2,8 +2,6 @@
2
2
  import { ElementIDValue, MarginValue, RichTextDescriptor, RichTextValue } from '../../../prop-controllers/descriptors';
3
3
  import { BoxModelHandle } from '../../../box-model';
4
4
  import { PropControllersHandle } from '../../../state/modules/prop-controller-handles';
5
- import { ReactRuntime } from '../../../react';
6
- import { Props } from '../../../prop-controllers';
7
5
  declare type Props = {
8
6
  id?: ElementIDValue;
9
7
  text?: RichTextValue;
@@ -15,5 +13,4 @@ declare type Descriptors = {
15
13
  };
16
14
  declare const Text: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<BoxModelHandle & PropControllersHandle<Descriptors>>>;
17
15
  export default Text;
18
- export declare function registerComponent(runtime: ReactRuntime): () => void;
19
16
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Text/Text.tsx"],"names":[],"mappings":";AAoBA,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,aAAa,EACd,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAA;AAEtF,OAAO,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAA;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAEjD,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAeD,aAAK,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAEhD,QAAA,MAAM,IAAI,uIAsIR,CAAA;AAEF,eAAe,IAAI,CAAA;AAEnB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAqEtD"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Text/Text.tsx"],"names":[],"mappings":";AAmBA,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,aAAa,EACd,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAA;AAKtF,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAeD,aAAK,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAEhD,QAAA,MAAM,IAAI,uIA8IR,CAAA;AAEF,eAAe,IAAI,CAAA"}
@@ -1,2 +1,2 @@
1
- export { default, registerComponent } from './Text';
1
+ export { default } from './Text';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../../runtimes/react';
2
+ export declare function registerComponent(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Text/register.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAwEtD"}
@@ -1,7 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { BorderRadiusValue, ElementIDValue, MarginValue, VideoValue } from '../../../prop-controllers/descriptors';
3
- import { ReactRuntime } from '../../../react';
4
- import { Props } from '../../../prop-controllers';
5
3
  declare type Props = {
6
4
  id?: ElementIDValue;
7
5
  video?: VideoValue;
@@ -11,5 +9,4 @@ declare type Props = {
11
9
  };
12
10
  declare const Video: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
13
11
  export default Video;
14
- export declare function registerComponent(runtime: ReactRuntime): () => void;
15
12
  //# sourceMappingURL=Video.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Video/Video.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,UAAU,EACX,MAAM,uCAAuC,CAAA;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AAEjD,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAcD,QAAA,MAAM,KAAK,kGA+BT,CAAA;AAEF,eAAe,KAAK,CAAA;AAEpB,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAgBtD"}
1
+ {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Video/Video.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,UAAU,EACX,MAAM,uCAAuC,CAAA;AAI9C,aAAK,KAAK,GAAG;IACX,EAAE,CAAC,EAAE,cAAc,CAAA;IACnB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAcD,QAAA,MAAM,KAAK,kGA+BT,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './Video';
1
+ export { default } from './Video';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Video/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Video/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../../runtimes/react';
2
+ export declare function registerComponent(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../../src/components/builtin/Video/register.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,cAmBtD"}
@@ -11,6 +11,5 @@ export { default as Navigation } from './Navigation';
11
11
  export { default as Root } from './Root';
12
12
  export { default as SocialLinks } from './SocialLinks';
13
13
  export { default as Text } from './Text';
14
- import { ReactRuntime } from '../../react';
15
- export declare function registerBuiltinComponents(runtime: ReactRuntime): () => void;
14
+ export { default as Video } from './Video';
16
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/builtin/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAe1C,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,YAAY,cA+B9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/builtin/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { ReactRuntime } from '../../runtimes/react';
2
+ export declare function registerBuiltinComponents(runtime: ReactRuntime): () => void;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/components/builtin/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAenD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,YAAY,cA+B9D"}
@@ -0,0 +1,2 @@
1
+ export default function Dynamic(): JSX.Element;
2
+ //# sourceMappingURL=dynamic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.d.ts","sourceRoot":"","sources":["../../src/dynamic.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,OAAO,gBAE9B"}
@@ -0,0 +1,3 @@
1
+ declare const _exports: typeof import("@makeswift/next-plugin");
2
+ export = _exports;
3
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/next/plugin.js"],"names":[],"mappings":""}
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
1
  import { NormalizedCacheObject } from '@apollo/client';
3
2
  import { GetServerSidePropsContext, GetServerSidePropsResult, GetStaticPathsResult, GetStaticPropsContext, GetStaticPropsResult } from 'next';
4
3
  import NextDocument, { DocumentContext, DocumentInitialProps } from 'next/document';
4
+ import { ComponentType, ForwardRefExoticComponent, ForwardedRef, PropsWithoutRef, RefAttributes } from 'react';
5
5
  import { MakeswiftClient } from './api/react';
6
6
  import { Element } from './state/react-page';
7
- import { PageData } from './components';
7
+ import { PageData } from './components/page';
8
8
  export { MakeswiftClient };
9
9
  export declare class Document extends NextDocument {
10
10
  static getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps>;
@@ -22,4 +22,14 @@ export declare function getStaticProps({ params, }: GetStaticPropsContext<{
22
22
  }>): Promise<GetStaticPropsResult<PageProps>>;
23
23
  export declare function getStaticPaths(): Promise<GetStaticPathsResult>;
24
24
  export declare function Page({ page, rootElement, makeswiftApiEndpoint, cacheData, preview }: PageProps): JSX.Element;
25
+ declare const FORWARDED_NEXT_DYNAMIC_REF_KEY = "__forwarded_next_dynamic_ref__";
26
+ declare type WithSavedForwardedRef<P, T> = P & {
27
+ [FORWARDED_NEXT_DYNAMIC_REF_KEY]: ForwardedRef<T>;
28
+ };
29
+ declare type LoaderComponent<P> = Promise<ComponentType<P> | {
30
+ default: ComponentType<P>;
31
+ }>;
32
+ declare type PatchedLoaderComponent<P, T> = LoaderComponent<WithSavedForwardedRef<P, T>>;
33
+ declare type PatchLoaderComponent = <P, T>(loaderComponent: LoaderComponent<P>) => PatchedLoaderComponent<P, T>;
34
+ export declare function forwardNextDynamicRef<T, P>(nextDynamicThunk: (patch: PatchLoaderComponent) => ComponentType<WithSavedForwardedRef<P, T>>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
25
35
  //# sourceMappingURL=next.d.ts.map
@@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B,CAAC,SAAS,CAAC,CAAC,CAiCtF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAEpE;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,SAAS,eAY9F;AAED,QAAA,MAAM,8BAA8B,mCAAmC,CAAA;AAEvE,aAAK,qBAAqB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACrC,CAAC,8BAA8B,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAClD,CAAA;AAiBD,aAAK,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC,CAAA;AAMnF,aAAK,sBAAsB,CAAC,CAAC,EAAE,CAAC,IAAI,eAAe,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAEhF,aAAK,oBAAoB,GAAG,CAAC,CAAC,EAAE,CAAC,EAC/B,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,KAChC,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAEjC,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,EACxC,gBAAgB,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,aAAa,CAAC,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAC5F,yBAAyB,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CASlE"}
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
33
+ var React = require("react");
34
+ var next = require("./index.cjs.js");
35
+ function useBackgrounds(value) {
36
+ const fileIds = value == null ? [] : value.map(({ value: backgrounds }) => backgrounds.map((background) => background.type === "image" && background.payload != null ? background.payload.imageId : null).filter(next.isNonNullable).reduce((a, b) => a.concat(b), [])).reduce((a, b) => a.concat(b), []);
37
+ const swatchIds = value == null ? [] : value.map(({ value: backgrounds }) => backgrounds.map((background) => {
38
+ if (background.type === "color" && background.payload != null) {
39
+ return [background.payload.swatchId];
40
+ }
41
+ if (background.type === "gradient" && background.payload != null) {
42
+ return background.payload.stops.map((stop) => stop.color && stop.color.swatchId).filter(next.isNonNullable);
43
+ }
44
+ if (background.type === "video" && background.payload != null) {
45
+ return [background.payload.maskColor && background.payload.maskColor.swatchId];
46
+ }
47
+ return null;
48
+ }).filter(next.isNonNullable).reduce((a, b) => a.concat(b), [])).reduce((a, b) => a.concat(b), []).filter(next.isNonNullable);
49
+ const skip = value == null;
50
+ const filesResult = next.useQuery(next.FILES_BY_ID, {
51
+ skip: skip || fileIds.length === 0,
52
+ variables: { ids: fileIds }
53
+ });
54
+ const swatchesResult = next.useQuery(next.SWATCHES_BY_ID, {
55
+ skip: skip || swatchIds.length === 0,
56
+ variables: { ids: swatchIds }
57
+ });
58
+ return React.useMemo(() => {
59
+ const { data: filesData = {} } = filesResult;
60
+ const { data: swatchesData = {} } = swatchesResult;
61
+ if (value == null || filesResult.error != null || swatchesResult.error != null) {
62
+ return null;
63
+ }
64
+ const { files = [] } = filesData;
65
+ const { swatches = [] } = swatchesData;
66
+ return value.map((_a) => {
67
+ var _b = _a, { value: backgrounds } = _b, restOfValue = __objRest(_b, ["value"]);
68
+ return __spreadProps(__spreadValues({}, restOfValue), {
69
+ value: backgrounds.map((bg) => {
70
+ if (bg.type === "image" && bg.payload != null && bg.payload.imageId != null) {
71
+ const _a2 = bg.payload, { imageId } = _a2, restOfPayload = __objRest(_a2, ["imageId"]);
72
+ const file = files.find((f) => f && f.id === imageId);
73
+ return file && {
74
+ id: bg.id,
75
+ type: "image",
76
+ payload: __spreadProps(__spreadValues({}, restOfPayload), {
77
+ publicUrl: file.publicUrl,
78
+ dimensions: file.dimensions
79
+ })
80
+ };
81
+ }
82
+ if (bg.type === "color" && bg.payload != null) {
83
+ const { swatchId, alpha } = bg.payload;
84
+ const swatch = swatches.find((s) => s && s.id === swatchId);
85
+ return { id: bg.id, type: "color", payload: { swatch, alpha } };
86
+ }
87
+ if (bg.type === "gradient" && bg.payload != null && bg.payload.stops.length > 0) {
88
+ return {
89
+ id: bg.id,
90
+ type: "gradient",
91
+ payload: {
92
+ angle: bg.payload.angle,
93
+ isRadial: bg.payload.isRadial,
94
+ stops: bg.payload.stops.map((_b2) => {
95
+ var _c = _b2, { color } = _c, restOfStop = __objRest(_c, ["color"]);
96
+ return __spreadProps(__spreadValues({}, restOfStop), {
97
+ color: color && {
98
+ swatch: swatches.find((s) => s && s.id === color.swatchId),
99
+ alpha: color.alpha
100
+ }
101
+ });
102
+ })
103
+ }
104
+ };
105
+ }
106
+ if (bg.type === "video" && bg.payload != null) {
107
+ const _d = bg.payload, { maskColor } = _d, restOfPayload = __objRest(_d, ["maskColor"]);
108
+ const swatch = maskColor && swatches.find((s) => s && s.id === maskColor.swatchId);
109
+ return {
110
+ id: bg.id,
111
+ type: "video",
112
+ payload: __spreadProps(__spreadValues({}, restOfPayload), {
113
+ maskColor: swatch && maskColor && { swatch, alpha: maskColor.alpha }
114
+ })
115
+ };
116
+ }
117
+ return null;
118
+ }).filter(Boolean)
119
+ });
120
+ });
121
+ }, [filesResult, swatchesResult, value]);
122
+ }
123
+ exports.useBackgrounds = useBackgrounds;
124
+ //# sourceMappingURL=useBackgrounds.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBackgrounds.cjs.js","sources":["../src/components/hooks/useBackgrounds.ts"],"sourcesContent":["import { useMemo } from 'react'\n\nimport { ColorValue as Color } from '../utils/types'\nimport { ResponsiveValue } from '../../prop-controllers'\nimport { FILES_BY_ID, SWATCHES_BY_ID } from '../utils/queries'\nimport { isNonNullable } from '../utils/isNonNullable'\nimport { BackgroundsValue as ResponsiveBackgroundsValue } from '../../prop-controllers/descriptors'\nimport { useQuery } from '../../api/react'\n\ntype BackgroundColorData = Color\n\ntype BackgroundGradientStopData = {\n id: string\n location: number\n color: Color | null | undefined\n}\n\ntype BackgroundGradientData = {\n angle: number\n isRadial: boolean\n stops: Array<BackgroundGradientStopData>\n}\n\ntype BackgroundImageData = {\n publicUrl?: string\n dimensions: { width: number; height: number } | null\n position: {\n x: number\n y: number\n }\n size: 'cover' | 'contain' | 'auto'\n repeat: 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat'\n opacity?: number\n parallax?: number\n}\n\ntype BackgroundVideoData = {\n url: string\n maskColor: Color | null | undefined\n aspectRatio: 'wide' | 'standard'\n opacity: number\n zoom: number\n parallax: number\n}\n\ntype BackgroundData =\n | { id: string; type: 'color'; payload: BackgroundColorData | null | undefined }\n | { id: string; type: 'image'; payload: BackgroundImageData | null | undefined }\n | { id: string; type: 'gradient'; payload: BackgroundGradientData | null | undefined }\n | { id: string; type: 'video'; payload: BackgroundVideoData | null | undefined }\n\ntype BackgroundsData = Array<BackgroundData>\n\nexport type BackgroundsPropControllerData = ResponsiveValue<BackgroundsData>\n\nexport function useBackgrounds(\n value: ResponsiveBackgroundsValue | null | undefined,\n): BackgroundsPropControllerData | null | undefined {\n const fileIds =\n value == null\n ? []\n : value\n .map(({ value: backgrounds }) =>\n backgrounds\n .map(background =>\n background.type === 'image' && background.payload != null\n ? background.payload.imageId\n : null,\n )\n .filter(isNonNullable)\n .reduce((a, b) => a.concat(b), [] as string[]),\n )\n .reduce((a, b) => a.concat(b), [])\n const swatchIds =\n value == null\n ? []\n : value\n .map(({ value: backgrounds }) =>\n backgrounds\n .map(background => {\n if (background.type === 'color' && background.payload != null) {\n return [background.payload.swatchId]\n }\n\n if (background.type === 'gradient' && background.payload != null) {\n return background.payload.stops\n .map(stop => stop.color && stop.color.swatchId)\n .filter(isNonNullable)\n }\n\n if (background.type === 'video' && background.payload != null) {\n return [background.payload.maskColor && background.payload.maskColor.swatchId]\n }\n\n return null\n })\n .filter(isNonNullable)\n .reduce((a, b) => a.concat(b), []),\n )\n .reduce((a, b) => a.concat(b), [])\n .filter(isNonNullable)\n const skip = value == null\n const filesResult = useQuery(FILES_BY_ID, {\n skip: skip || fileIds.length === 0,\n variables: { ids: fileIds },\n })\n const swatchesResult = useQuery(SWATCHES_BY_ID, {\n skip: skip || swatchIds.length === 0,\n variables: { ids: swatchIds },\n })\n\n return useMemo(() => {\n const { data: filesData = {} } = filesResult\n const { data: swatchesData = {} } = swatchesResult\n\n if (value == null || filesResult.error != null || swatchesResult.error != null) {\n return null\n }\n\n const { files = [] } = filesData\n const { swatches = [] } = swatchesData\n\n return value.map(({ value: backgrounds, ...restOfValue }) => ({\n ...restOfValue,\n value: backgrounds\n .map(bg => {\n if (bg.type === 'image' && bg.payload != null && bg.payload.imageId != null) {\n const { imageId, ...restOfPayload } = bg.payload\n const file = files.find((f: any) => f && f.id === imageId)\n\n return (\n file && {\n id: bg.id,\n type: 'image',\n payload: {\n ...restOfPayload,\n publicUrl: file.publicUrl,\n dimensions: file.dimensions,\n },\n }\n )\n }\n\n if (bg.type === 'color' && bg.payload != null) {\n const { swatchId, alpha } = bg.payload\n const swatch = swatches.find((s: any) => s && s.id === swatchId)\n\n return { id: bg.id, type: 'color', payload: { swatch, alpha } }\n }\n\n if (bg.type === 'gradient' && bg.payload != null && bg.payload.stops.length > 0) {\n return {\n id: bg.id,\n type: 'gradient',\n payload: {\n angle: bg.payload.angle,\n isRadial: bg.payload.isRadial,\n stops: bg.payload.stops.map(({ color, ...restOfStop }) => ({\n ...restOfStop,\n color: color && {\n swatch: swatches.find((s: any) => s && s.id === color.swatchId),\n alpha: color.alpha,\n },\n })),\n },\n }\n }\n\n if (bg.type === 'video' && bg.payload != null) {\n const { maskColor, ...restOfPayload } = bg.payload\n const swatch = maskColor && swatches.find((s: any) => s && s.id === maskColor.swatchId)\n\n return {\n id: bg.id,\n type: 'video',\n payload: {\n ...restOfPayload,\n maskColor: swatch && maskColor && { swatch, alpha: maskColor.alpha },\n },\n }\n }\n\n return null\n })\n .filter(Boolean),\n }))\n }, [filesResult, swatchesResult, value])\n}\n"],"names":["isNonNullable","useQuery","FILES_BY_ID","SWATCHES_BY_ID","useMemo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,wBACL,OACkD;AAC5C,QAAA,UACJ,SAAS,OACL,KACA,MACG,IAAI,CAAC,EAAE,OAAO,kBACb,YACG,IAAI,CAAA,eACH,WAAW,SAAS,WAAW,WAAW,WAAW,OACjD,WAAW,QAAQ,UACnB,IACN,EACC,OAAOA,KAAAA,aAAa,EACpB,OAAO,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,CAAA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A,sBACd,QAAQ,SAAS,KAAK,CAAC,MAAW,KAAK,EAAE,OAAO,MAAM,QAAQ;AAAA,sBAC9D,OAAO,MAAM;AAAA,oBACf;AAAA,kBAAA;AAAA,iBACA;AAAA,cACJ;AAAA,YAAA;AAAA,UAEJ;AAEA,cAAI,GAAG,SAAS,WAAW,GAAG,WAAW,MAAM;AACvC,kBAAkC,QAAG,SAAnC,gBAAgC,IAAlB,0BAAkB,IAAlB,CAAd;AACF,kBAAA,SAAS,aAAa,SAAS,KAAK,CAAC,MAAW,KAAK,EAAE,OAAO,UAAU,QAAQ;AAE/E,mBAAA;AAAA,cACL,IAAI,GAAG;AAAA,cACP,MAAM;AAAA,cACN,SAAS,iCACJ,gBADI;AAAA,gBAEP,WAAW,UAAU,aAAa,EAAE,QAAQ,OAAO,UAAU,MAAM;AAAA,cACrE;AAAA,YAAA;AAAA,UAEJ;AAEO,iBAAA;AAAA,QAAA,CACR,EACA,OAAO,OAAO;AAAA,MACjB;AAAA,KAAA;AAAA,EACD,GAAA,CAAC,aAAa,gBAAgB,KAAK,CAAC;AACzC;;"}
@@ -0,0 +1,123 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ import { useMemo } from "react";
33
+ import { i as isNonNullable, c as useQuery, F as FILES_BY_ID, S as SWATCHES_BY_ID } from "./index.es.js";
34
+ function useBackgrounds(value) {
35
+ const fileIds = value == null ? [] : value.map(({ value: backgrounds }) => backgrounds.map((background) => background.type === "image" && background.payload != null ? background.payload.imageId : null).filter(isNonNullable).reduce((a, b) => a.concat(b), [])).reduce((a, b) => a.concat(b), []);
36
+ const swatchIds = value == null ? [] : value.map(({ value: backgrounds }) => backgrounds.map((background) => {
37
+ if (background.type === "color" && background.payload != null) {
38
+ return [background.payload.swatchId];
39
+ }
40
+ if (background.type === "gradient" && background.payload != null) {
41
+ return background.payload.stops.map((stop) => stop.color && stop.color.swatchId).filter(isNonNullable);
42
+ }
43
+ if (background.type === "video" && background.payload != null) {
44
+ return [background.payload.maskColor && background.payload.maskColor.swatchId];
45
+ }
46
+ return null;
47
+ }).filter(isNonNullable).reduce((a, b) => a.concat(b), [])).reduce((a, b) => a.concat(b), []).filter(isNonNullable);
48
+ const skip = value == null;
49
+ const filesResult = useQuery(FILES_BY_ID, {
50
+ skip: skip || fileIds.length === 0,
51
+ variables: { ids: fileIds }
52
+ });
53
+ const swatchesResult = useQuery(SWATCHES_BY_ID, {
54
+ skip: skip || swatchIds.length === 0,
55
+ variables: { ids: swatchIds }
56
+ });
57
+ return useMemo(() => {
58
+ const { data: filesData = {} } = filesResult;
59
+ const { data: swatchesData = {} } = swatchesResult;
60
+ if (value == null || filesResult.error != null || swatchesResult.error != null) {
61
+ return null;
62
+ }
63
+ const { files = [] } = filesData;
64
+ const { swatches = [] } = swatchesData;
65
+ return value.map((_a) => {
66
+ var _b = _a, { value: backgrounds } = _b, restOfValue = __objRest(_b, ["value"]);
67
+ return __spreadProps(__spreadValues({}, restOfValue), {
68
+ value: backgrounds.map((bg) => {
69
+ if (bg.type === "image" && bg.payload != null && bg.payload.imageId != null) {
70
+ const _a2 = bg.payload, { imageId } = _a2, restOfPayload = __objRest(_a2, ["imageId"]);
71
+ const file = files.find((f) => f && f.id === imageId);
72
+ return file && {
73
+ id: bg.id,
74
+ type: "image",
75
+ payload: __spreadProps(__spreadValues({}, restOfPayload), {
76
+ publicUrl: file.publicUrl,
77
+ dimensions: file.dimensions
78
+ })
79
+ };
80
+ }
81
+ if (bg.type === "color" && bg.payload != null) {
82
+ const { swatchId, alpha } = bg.payload;
83
+ const swatch = swatches.find((s) => s && s.id === swatchId);
84
+ return { id: bg.id, type: "color", payload: { swatch, alpha } };
85
+ }
86
+ if (bg.type === "gradient" && bg.payload != null && bg.payload.stops.length > 0) {
87
+ return {
88
+ id: bg.id,
89
+ type: "gradient",
90
+ payload: {
91
+ angle: bg.payload.angle,
92
+ isRadial: bg.payload.isRadial,
93
+ stops: bg.payload.stops.map((_b2) => {
94
+ var _c = _b2, { color } = _c, restOfStop = __objRest(_c, ["color"]);
95
+ return __spreadProps(__spreadValues({}, restOfStop), {
96
+ color: color && {
97
+ swatch: swatches.find((s) => s && s.id === color.swatchId),
98
+ alpha: color.alpha
99
+ }
100
+ });
101
+ })
102
+ }
103
+ };
104
+ }
105
+ if (bg.type === "video" && bg.payload != null) {
106
+ const _d = bg.payload, { maskColor } = _d, restOfPayload = __objRest(_d, ["maskColor"]);
107
+ const swatch = maskColor && swatches.find((s) => s && s.id === maskColor.swatchId);
108
+ return {
109
+ id: bg.id,
110
+ type: "video",
111
+ payload: __spreadProps(__spreadValues({}, restOfPayload), {
112
+ maskColor: swatch && maskColor && { swatch, alpha: maskColor.alpha }
113
+ })
114
+ };
115
+ }
116
+ return null;
117
+ }).filter(Boolean)
118
+ });
119
+ });
120
+ }, [filesResult, swatchesResult, value]);
121
+ }
122
+ export { useBackgrounds as u };
123
+ //# sourceMappingURL=useBackgrounds.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBackgrounds.es.js","sources":["../src/components/hooks/useBackgrounds.ts"],"sourcesContent":["import { useMemo } from 'react'\n\nimport { ColorValue as Color } from '../utils/types'\nimport { ResponsiveValue } from '../../prop-controllers'\nimport { FILES_BY_ID, SWATCHES_BY_ID } from '../utils/queries'\nimport { isNonNullable } from '../utils/isNonNullable'\nimport { BackgroundsValue as ResponsiveBackgroundsValue } from '../../prop-controllers/descriptors'\nimport { useQuery } from '../../api/react'\n\ntype BackgroundColorData = Color\n\ntype BackgroundGradientStopData = {\n id: string\n location: number\n color: Color | null | undefined\n}\n\ntype BackgroundGradientData = {\n angle: number\n isRadial: boolean\n stops: Array<BackgroundGradientStopData>\n}\n\ntype BackgroundImageData = {\n publicUrl?: string\n dimensions: { width: number; height: number } | null\n position: {\n x: number\n y: number\n }\n size: 'cover' | 'contain' | 'auto'\n repeat: 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat'\n opacity?: number\n parallax?: number\n}\n\ntype BackgroundVideoData = {\n url: string\n maskColor: Color | null | undefined\n aspectRatio: 'wide' | 'standard'\n opacity: number\n zoom: number\n parallax: number\n}\n\ntype BackgroundData =\n | { id: string; type: 'color'; payload: BackgroundColorData | null | undefined }\n | { id: string; type: 'image'; payload: BackgroundImageData | null | undefined }\n | { id: string; type: 'gradient'; payload: BackgroundGradientData | null | undefined }\n | { id: string; type: 'video'; payload: BackgroundVideoData | null | undefined }\n\ntype BackgroundsData = Array<BackgroundData>\n\nexport type BackgroundsPropControllerData = ResponsiveValue<BackgroundsData>\n\nexport function useBackgrounds(\n value: ResponsiveBackgroundsValue | null | undefined,\n): BackgroundsPropControllerData | null | undefined {\n const fileIds =\n value == null\n ? []\n : value\n .map(({ value: backgrounds }) =>\n backgrounds\n .map(background =>\n background.type === 'image' && background.payload != null\n ? background.payload.imageId\n : null,\n )\n .filter(isNonNullable)\n .reduce((a, b) => a.concat(b), [] as string[]),\n )\n .reduce((a, b) => a.concat(b), [])\n const swatchIds =\n value == null\n ? []\n : value\n .map(({ value: backgrounds }) =>\n backgrounds\n .map(background => {\n if (background.type === 'color' && background.payload != null) {\n return [background.payload.swatchId]\n }\n\n if (background.type === 'gradient' && background.payload != null) {\n return background.payload.stops\n .map(stop => stop.color && stop.color.swatchId)\n .filter(isNonNullable)\n }\n\n if (background.type === 'video' && background.payload != null) {\n return [background.payload.maskColor && background.payload.maskColor.swatchId]\n }\n\n return null\n })\n .filter(isNonNullable)\n .reduce((a, b) => a.concat(b), []),\n )\n .reduce((a, b) => a.concat(b), [])\n .filter(isNonNullable)\n const skip = value == null\n const filesResult = useQuery(FILES_BY_ID, {\n skip: skip || fileIds.length === 0,\n variables: { ids: fileIds },\n })\n const swatchesResult = useQuery(SWATCHES_BY_ID, {\n skip: skip || swatchIds.length === 0,\n variables: { ids: swatchIds },\n })\n\n return useMemo(() => {\n const { data: filesData = {} } = filesResult\n const { data: swatchesData = {} } = swatchesResult\n\n if (value == null || filesResult.error != null || swatchesResult.error != null) {\n return null\n }\n\n const { files = [] } = filesData\n const { swatches = [] } = swatchesData\n\n return value.map(({ value: backgrounds, ...restOfValue }) => ({\n ...restOfValue,\n value: backgrounds\n .map(bg => {\n if (bg.type === 'image' && bg.payload != null && bg.payload.imageId != null) {\n const { imageId, ...restOfPayload } = bg.payload\n const file = files.find((f: any) => f && f.id === imageId)\n\n return (\n file && {\n id: bg.id,\n type: 'image',\n payload: {\n ...restOfPayload,\n publicUrl: file.publicUrl,\n dimensions: file.dimensions,\n },\n }\n )\n }\n\n if (bg.type === 'color' && bg.payload != null) {\n const { swatchId, alpha } = bg.payload\n const swatch = swatches.find((s: any) => s && s.id === swatchId)\n\n return { id: bg.id, type: 'color', payload: { swatch, alpha } }\n }\n\n if (bg.type === 'gradient' && bg.payload != null && bg.payload.stops.length > 0) {\n return {\n id: bg.id,\n type: 'gradient',\n payload: {\n angle: bg.payload.angle,\n isRadial: bg.payload.isRadial,\n stops: bg.payload.stops.map(({ color, ...restOfStop }) => ({\n ...restOfStop,\n color: color && {\n swatch: swatches.find((s: any) => s && s.id === color.swatchId),\n alpha: color.alpha,\n },\n })),\n },\n }\n }\n\n if (bg.type === 'video' && bg.payload != null) {\n const { maskColor, ...restOfPayload } = bg.payload\n const swatch = maskColor && swatches.find((s: any) => s && s.id === maskColor.swatchId)\n\n return {\n id: bg.id,\n type: 'video',\n payload: {\n ...restOfPayload,\n maskColor: swatch && maskColor && { swatch, alpha: maskColor.alpha },\n },\n }\n }\n\n return null\n })\n .filter(Boolean),\n }))\n }, [filesResult, swatchesResult, value])\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,wBACL,OACkD;AAC5C,QAAA,UACJ,SAAS,OACL,KACA,MACG,IAAI,CAAC,EAAE,OAAO,kBACb,YACG,IAAI,CAAA,eACH,WAAW,SAAS,WAAW,WAAW,WAAW,OACjD,WAAW,QAAQ,UACnB,IACN,EACC,OAAO,aAAa,EACpB,OAAO,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,CAAA,CAAc,CACjD,EACC,OAAO,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC,GAAG,CAAA,CAAE;AACzC,QAAM,YACJ,SAAS,OACL,CACA,IAAA,MACG,IAAI,CAAC,EAAE,OAAO,kBACb,YACG,IAAI,CAAc,eAAA;AACjB,QAAI,WAAW,SAAS,WAAW,WAAW,WAAW,MAAM;AACtD,aAAA,CAAC,WAAW,QAAQ,QAAQ;AAAA,IACrC;AAEA,QAAI,WAAW,SAAS,cAAc,WAAW,WAAW,MAAM;AAChE,aAAO,WAAW,QAAQ,MACvB,IAAI,CAAQ,SAAA,KAAK,SAAS,KAAK,MAAM,QAAQ,EAC7C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