@makeswift/runtime 0.26.0-canary.7 → 0.26.0-canary.9

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 (312) hide show
  1. package/dist/cjs/api-handler/handlers/element-tree.js.map +1 -1
  2. package/dist/cjs/api-handler/handlers/manifest.js +1 -1
  3. package/dist/cjs/api-handler/index.js.map +1 -1
  4. package/dist/cjs/builder/index.js +42 -0
  5. package/dist/cjs/builder/index.js.map +1 -1
  6. package/dist/cjs/client/index.js.map +1 -1
  7. package/dist/cjs/components/builtin/Box/register.js +2 -2
  8. package/dist/cjs/components/builtin/Box/register.js.map +1 -1
  9. package/dist/cjs/components/builtin/Button/register.js +2 -2
  10. package/dist/cjs/components/builtin/Button/register.js.map +1 -1
  11. package/dist/cjs/components/builtin/Carousel/register.js +2 -2
  12. package/dist/cjs/components/builtin/Carousel/register.js.map +1 -1
  13. package/dist/cjs/components/builtin/Countdown/register.js +2 -2
  14. package/dist/cjs/components/builtin/Countdown/register.js.map +1 -1
  15. package/dist/cjs/components/builtin/Divider/register.js +2 -2
  16. package/dist/cjs/components/builtin/Divider/register.js.map +1 -1
  17. package/dist/cjs/components/builtin/Embed/register.js +2 -2
  18. package/dist/cjs/components/builtin/Embed/register.js.map +1 -1
  19. package/dist/cjs/components/builtin/Form/register.js +2 -2
  20. package/dist/cjs/components/builtin/Form/register.js.map +1 -1
  21. package/dist/cjs/components/builtin/Image/register.js.map +1 -1
  22. package/dist/cjs/components/builtin/Navigation/register.js +2 -2
  23. package/dist/cjs/components/builtin/Navigation/register.js.map +1 -1
  24. package/dist/cjs/components/builtin/Root/Root.js +2 -2
  25. package/dist/cjs/components/builtin/Root/Root.js.map +1 -1
  26. package/dist/cjs/components/builtin/Root/register.js +2 -2
  27. package/dist/cjs/components/builtin/Root/register.js.map +1 -1
  28. package/dist/cjs/components/builtin/Slot/register.js.map +1 -1
  29. package/dist/cjs/components/builtin/SocialLinks/register.js +2 -2
  30. package/dist/cjs/components/builtin/SocialLinks/register.js.map +1 -1
  31. package/dist/cjs/components/builtin/Text/register.js +2 -2
  32. package/dist/cjs/components/builtin/Text/register.js.map +1 -1
  33. package/dist/cjs/components/builtin/Video/register.js +2 -2
  34. package/dist/cjs/components/builtin/Video/register.js.map +1 -1
  35. package/dist/cjs/components/builtin/register.js.map +1 -1
  36. package/dist/cjs/core/index.js.map +1 -1
  37. package/dist/cjs/index.js +2 -41
  38. package/dist/cjs/index.js.map +1 -1
  39. package/dist/cjs/next/components/tests/__fixtures__/element-data/box-component.js +2 -2
  40. package/dist/cjs/next/components/tests/__fixtures__/element-data/box-component.js.map +1 -1
  41. package/dist/cjs/next/components/tests/__fixtures__/element-data/button-component.js +2 -2
  42. package/dist/cjs/next/components/tests/__fixtures__/element-data/button-component.js.map +1 -1
  43. package/dist/cjs/next/components/tests/__fixtures__/element-data/image-component.js +2 -2
  44. package/dist/cjs/next/components/tests/__fixtures__/element-data/image-component.js.map +1 -1
  45. package/dist/cjs/next/components/tests/__fixtures__/page-document.js +2 -2
  46. package/dist/cjs/next/components/tests/__fixtures__/page-document.js.map +1 -1
  47. package/dist/cjs/next/testing/element-data.js +2 -2
  48. package/dist/cjs/next/testing/element-data.js.map +1 -1
  49. package/dist/cjs/next/testing/page-rendering.js +2 -2
  50. package/dist/cjs/next/testing/page-rendering.js.map +1 -1
  51. package/dist/cjs/next/testing/react-provider.js.map +1 -1
  52. package/dist/cjs/react/builtins/box.js +42 -0
  53. package/dist/cjs/react/builtins/box.js.map +1 -0
  54. package/dist/cjs/react/builtins/button.js +42 -0
  55. package/dist/cjs/react/builtins/button.js.map +1 -0
  56. package/dist/cjs/react/builtins/carousel.js +42 -0
  57. package/dist/cjs/react/builtins/carousel.js.map +1 -0
  58. package/dist/cjs/react/builtins/countdown.js +42 -0
  59. package/dist/cjs/react/builtins/countdown.js.map +1 -0
  60. package/dist/cjs/react/builtins/divider.js +42 -0
  61. package/dist/cjs/react/builtins/divider.js.map +1 -0
  62. package/dist/cjs/react/builtins/embed.js +42 -0
  63. package/dist/cjs/react/builtins/embed.js.map +1 -0
  64. package/dist/cjs/react/builtins/form.js +42 -0
  65. package/dist/cjs/react/builtins/form.js.map +1 -0
  66. package/dist/cjs/react/builtins/image.js +42 -0
  67. package/dist/cjs/react/builtins/image.js.map +1 -0
  68. package/dist/cjs/{components → react/builtins}/index.js +11 -7
  69. package/dist/cjs/react/builtins/index.js.map +1 -0
  70. package/dist/cjs/react/builtins/navigation.js +42 -0
  71. package/dist/cjs/react/builtins/navigation.js.map +1 -0
  72. package/dist/cjs/react/builtins/root.js +42 -0
  73. package/dist/cjs/react/builtins/root.js.map +1 -0
  74. package/dist/cjs/react/builtins/slot.js +42 -0
  75. package/dist/cjs/react/builtins/slot.js.map +1 -0
  76. package/dist/cjs/react/builtins/social-links.js +42 -0
  77. package/dist/cjs/react/builtins/social-links.js.map +1 -0
  78. package/dist/cjs/react/builtins/text.js +42 -0
  79. package/dist/cjs/react/builtins/text.js.map +1 -0
  80. package/dist/cjs/react/builtins/video.js +42 -0
  81. package/dist/cjs/react/builtins/video.js.map +1 -0
  82. package/dist/cjs/react/core/index.js +29 -0
  83. package/dist/cjs/react/core/index.js.map +1 -0
  84. package/dist/cjs/{react.js → react/index.js} +4 -15
  85. package/dist/cjs/react/index.js.map +1 -0
  86. package/dist/cjs/runtimes/react/components/RuntimeProvider.js.map +1 -1
  87. package/dist/cjs/runtimes/react/components/Slot.js +2 -2
  88. package/dist/cjs/runtimes/react/components/Slot.js.map +1 -1
  89. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js +4 -4
  90. package/dist/cjs/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -1
  91. package/dist/cjs/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.js +2 -2
  92. package/dist/cjs/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.js.map +1 -1
  93. package/dist/cjs/runtimes/react/hooks/use-react-runtime.js.map +1 -1
  94. package/dist/cjs/runtimes/react/react-runtime-core.js +69 -0
  95. package/dist/cjs/runtimes/react/react-runtime-core.js.map +1 -0
  96. package/dist/cjs/runtimes/react/react-runtime.js +2 -37
  97. package/dist/cjs/runtimes/react/react-runtime.js.map +1 -1
  98. package/dist/esm/api-handler/handlers/element-tree.js.map +1 -1
  99. package/dist/esm/api-handler/handlers/manifest.js +1 -1
  100. package/dist/esm/api-handler/index.js.map +1 -1
  101. package/dist/esm/builder/index.js +38 -0
  102. package/dist/esm/builder/index.js.map +1 -1
  103. package/dist/esm/client/index.js.map +1 -1
  104. package/dist/esm/components/builtin/Box/register.js.map +1 -1
  105. package/dist/esm/components/builtin/Button/register.js.map +1 -1
  106. package/dist/esm/components/builtin/Carousel/register.js.map +1 -1
  107. package/dist/esm/components/builtin/Countdown/register.js.map +1 -1
  108. package/dist/esm/components/builtin/Divider/register.js.map +1 -1
  109. package/dist/esm/components/builtin/Embed/register.js.map +1 -1
  110. package/dist/esm/components/builtin/Form/register.js.map +1 -1
  111. package/dist/esm/components/builtin/Image/register.js.map +1 -1
  112. package/dist/esm/components/builtin/Navigation/register.js.map +1 -1
  113. package/dist/esm/components/builtin/Root/Root.js +1 -1
  114. package/dist/esm/components/builtin/Root/Root.js.map +1 -1
  115. package/dist/esm/components/builtin/Root/register.js.map +1 -1
  116. package/dist/esm/components/builtin/Slot/register.js.map +1 -1
  117. package/dist/esm/components/builtin/SocialLinks/register.js.map +1 -1
  118. package/dist/esm/components/builtin/Text/register.js.map +1 -1
  119. package/dist/esm/components/builtin/Video/register.js.map +1 -1
  120. package/dist/esm/components/builtin/register.js.map +1 -1
  121. package/dist/esm/core/index.js.map +1 -1
  122. package/dist/esm/index.js +1 -39
  123. package/dist/esm/index.js.map +1 -1
  124. package/dist/esm/next/components/tests/__fixtures__/element-data/box-component.js +1 -1
  125. package/dist/esm/next/components/tests/__fixtures__/element-data/box-component.js.map +1 -1
  126. package/dist/esm/next/components/tests/__fixtures__/element-data/button-component.js +1 -1
  127. package/dist/esm/next/components/tests/__fixtures__/element-data/button-component.js.map +1 -1
  128. package/dist/esm/next/components/tests/__fixtures__/element-data/image-component.js +1 -1
  129. package/dist/esm/next/components/tests/__fixtures__/element-data/image-component.js.map +1 -1
  130. package/dist/esm/next/components/tests/__fixtures__/page-document.js +1 -1
  131. package/dist/esm/next/components/tests/__fixtures__/page-document.js.map +1 -1
  132. package/dist/esm/next/testing/element-data.js +1 -1
  133. package/dist/esm/next/testing/element-data.js.map +1 -1
  134. package/dist/esm/next/testing/page-rendering.js +1 -1
  135. package/dist/esm/next/testing/page-rendering.js.map +1 -1
  136. package/dist/esm/next/testing/react-provider.js.map +1 -1
  137. package/dist/esm/react/builtins/box.js +7 -0
  138. package/dist/esm/react/builtins/box.js.map +1 -0
  139. package/dist/esm/react/builtins/button.js +7 -0
  140. package/dist/esm/react/builtins/button.js.map +1 -0
  141. package/dist/esm/react/builtins/carousel.js +7 -0
  142. package/dist/esm/react/builtins/carousel.js.map +1 -0
  143. package/dist/esm/react/builtins/countdown.js +7 -0
  144. package/dist/esm/react/builtins/countdown.js.map +1 -0
  145. package/dist/esm/react/builtins/divider.js +7 -0
  146. package/dist/esm/react/builtins/divider.js.map +1 -0
  147. package/dist/esm/react/builtins/embed.js +7 -0
  148. package/dist/esm/react/builtins/embed.js.map +1 -0
  149. package/dist/esm/react/builtins/form.js +7 -0
  150. package/dist/esm/react/builtins/form.js.map +1 -0
  151. package/dist/esm/react/builtins/image.js +7 -0
  152. package/dist/esm/react/builtins/image.js.map +1 -0
  153. package/dist/esm/react/builtins/index.js +5 -0
  154. package/dist/esm/react/builtins/index.js.map +1 -0
  155. package/dist/esm/react/builtins/navigation.js +7 -0
  156. package/dist/esm/react/builtins/navigation.js.map +1 -0
  157. package/dist/esm/react/builtins/root.js +7 -0
  158. package/dist/esm/react/builtins/root.js.map +1 -0
  159. package/dist/esm/react/builtins/slot.js +7 -0
  160. package/dist/esm/react/builtins/slot.js.map +1 -0
  161. package/dist/esm/react/builtins/social-links.js +7 -0
  162. package/dist/esm/react/builtins/social-links.js.map +1 -0
  163. package/dist/esm/react/builtins/text.js +7 -0
  164. package/dist/esm/react/builtins/text.js.map +1 -0
  165. package/dist/esm/react/builtins/video.js +7 -0
  166. package/dist/esm/react/builtins/video.js.map +1 -0
  167. package/dist/esm/react/core/index.js +5 -0
  168. package/dist/esm/react/core/index.js.map +1 -0
  169. package/dist/esm/react/index.js +5 -0
  170. package/dist/esm/react/index.js.map +1 -0
  171. package/dist/esm/runtimes/react/components/RuntimeProvider.js.map +1 -1
  172. package/dist/esm/runtimes/react/components/Slot.js +1 -1
  173. package/dist/esm/runtimes/react/components/Slot.js.map +1 -1
  174. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js +1 -1
  175. package/dist/esm/runtimes/react/components/hooks/use-builder-connection-ping.js.map +1 -1
  176. package/dist/esm/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.js +1 -1
  177. package/dist/esm/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.js.map +1 -1
  178. package/dist/esm/runtimes/react/hooks/use-react-runtime.js.map +1 -1
  179. package/dist/esm/runtimes/react/react-runtime-core.js +45 -0
  180. package/dist/esm/runtimes/react/react-runtime-core.js.map +1 -0
  181. package/dist/esm/runtimes/react/react-runtime.js +2 -37
  182. package/dist/esm/runtimes/react/react-runtime.js.map +1 -1
  183. package/dist/types/api-handler/handlers/element-tree.d.ts +2 -2
  184. package/dist/types/api-handler/handlers/element-tree.d.ts.map +1 -1
  185. package/dist/types/api-handler/index.d.ts +2 -2
  186. package/dist/types/api-handler/index.d.ts.map +1 -1
  187. package/dist/types/builder/index.d.ts +3 -0
  188. package/dist/types/builder/index.d.ts.map +1 -1
  189. package/dist/types/client/index.d.ts +2 -2
  190. package/dist/types/client/index.d.ts.map +1 -1
  191. package/dist/types/components/builtin/Box/register.d.ts +2 -2
  192. package/dist/types/components/builtin/Box/register.d.ts.map +1 -1
  193. package/dist/types/components/builtin/Button/register.d.ts +2 -2
  194. package/dist/types/components/builtin/Button/register.d.ts.map +1 -1
  195. package/dist/types/components/builtin/Carousel/register.d.ts +2 -2
  196. package/dist/types/components/builtin/Carousel/register.d.ts.map +1 -1
  197. package/dist/types/components/builtin/Countdown/register.d.ts +2 -2
  198. package/dist/types/components/builtin/Countdown/register.d.ts.map +1 -1
  199. package/dist/types/components/builtin/Divider/register.d.ts +2 -2
  200. package/dist/types/components/builtin/Divider/register.d.ts.map +1 -1
  201. package/dist/types/components/builtin/Embed/register.d.ts +2 -2
  202. package/dist/types/components/builtin/Embed/register.d.ts.map +1 -1
  203. package/dist/types/components/builtin/Form/register.d.ts +2 -2
  204. package/dist/types/components/builtin/Form/register.d.ts.map +1 -1
  205. package/dist/types/components/builtin/Image/register.d.ts +2 -2
  206. package/dist/types/components/builtin/Image/register.d.ts.map +1 -1
  207. package/dist/types/components/builtin/Navigation/register.d.ts +2 -2
  208. package/dist/types/components/builtin/Navigation/register.d.ts.map +1 -1
  209. package/dist/types/components/builtin/Root/register.d.ts +2 -2
  210. package/dist/types/components/builtin/Root/register.d.ts.map +1 -1
  211. package/dist/types/components/builtin/Slot/register.d.ts +2 -2
  212. package/dist/types/components/builtin/Slot/register.d.ts.map +1 -1
  213. package/dist/types/components/builtin/SocialLinks/register.d.ts +2 -2
  214. package/dist/types/components/builtin/SocialLinks/register.d.ts.map +1 -1
  215. package/dist/types/components/builtin/Text/register.d.ts +2 -2
  216. package/dist/types/components/builtin/Text/register.d.ts.map +1 -1
  217. package/dist/types/components/builtin/Video/register.d.ts +2 -2
  218. package/dist/types/components/builtin/Video/register.d.ts.map +1 -1
  219. package/dist/types/components/builtin/register.d.ts +2 -2
  220. package/dist/types/components/builtin/register.d.ts.map +1 -1
  221. package/dist/types/core/index.d.ts +1 -1
  222. package/dist/types/core/index.d.ts.map +1 -1
  223. package/dist/types/index.d.ts +0 -7
  224. package/dist/types/index.d.ts.map +1 -1
  225. package/dist/types/next/testing/react-provider.d.ts +2 -2
  226. package/dist/types/next/testing/react-provider.d.ts.map +1 -1
  227. package/dist/types/react/builtins/box.d.ts +3 -0
  228. package/dist/types/react/builtins/box.d.ts.map +1 -0
  229. package/dist/types/react/builtins/button.d.ts +3 -0
  230. package/dist/types/react/builtins/button.d.ts.map +1 -0
  231. package/dist/types/react/builtins/carousel.d.ts +3 -0
  232. package/dist/types/react/builtins/carousel.d.ts.map +1 -0
  233. package/dist/types/react/builtins/countdown.d.ts +3 -0
  234. package/dist/types/react/builtins/countdown.d.ts.map +1 -0
  235. package/dist/types/react/builtins/divider.d.ts +3 -0
  236. package/dist/types/react/builtins/divider.d.ts.map +1 -0
  237. package/dist/types/react/builtins/embed.d.ts +3 -0
  238. package/dist/types/react/builtins/embed.d.ts.map +1 -0
  239. package/dist/types/react/builtins/form.d.ts +3 -0
  240. package/dist/types/react/builtins/form.d.ts.map +1 -0
  241. package/dist/types/react/builtins/image.d.ts +3 -0
  242. package/dist/types/react/builtins/image.d.ts.map +1 -0
  243. package/dist/types/react/builtins/index.d.ts +2 -0
  244. package/dist/types/react/builtins/index.d.ts.map +1 -0
  245. package/dist/types/react/builtins/navigation.d.ts +3 -0
  246. package/dist/types/react/builtins/navigation.d.ts.map +1 -0
  247. package/dist/types/react/builtins/root.d.ts +3 -0
  248. package/dist/types/react/builtins/root.d.ts.map +1 -0
  249. package/dist/types/react/builtins/slot.d.ts +3 -0
  250. package/dist/types/react/builtins/slot.d.ts.map +1 -0
  251. package/dist/types/react/builtins/social-links.d.ts +3 -0
  252. package/dist/types/react/builtins/social-links.d.ts.map +1 -0
  253. package/dist/types/react/builtins/text.d.ts +3 -0
  254. package/dist/types/react/builtins/text.d.ts.map +1 -0
  255. package/dist/types/react/builtins/video.d.ts +3 -0
  256. package/dist/types/react/builtins/video.d.ts.map +1 -0
  257. package/dist/types/react/core/index.d.ts +2 -0
  258. package/dist/types/react/core/index.d.ts.map +1 -0
  259. package/dist/types/react/index.d.ts +2 -0
  260. package/dist/types/react/index.d.ts.map +1 -0
  261. package/dist/types/runtimes/react/components/Document.d.ts +1 -1
  262. package/dist/types/runtimes/react/components/Document.d.ts.map +1 -1
  263. package/dist/types/runtimes/react/components/DocumentRoot.d.ts +1 -1
  264. package/dist/types/runtimes/react/components/DocumentRoot.d.ts.map +1 -1
  265. package/dist/types/runtimes/react/components/Element.d.ts +1 -1
  266. package/dist/types/runtimes/react/components/Element.d.ts.map +1 -1
  267. package/dist/types/runtimes/react/components/ElementReference.d.ts +1 -1
  268. package/dist/types/runtimes/react/components/ElementReference.d.ts.map +1 -1
  269. package/dist/types/runtimes/react/components/RuntimeProvider.d.ts +2 -2
  270. package/dist/types/runtimes/react/components/RuntimeProvider.d.ts.map +1 -1
  271. package/dist/types/runtimes/react/hooks/use-react-runtime.d.ts +3 -3
  272. package/dist/types/runtimes/react/hooks/use-react-runtime.d.ts.map +1 -1
  273. package/dist/types/runtimes/react/hooks/use-store.d.ts +1 -1
  274. package/dist/types/runtimes/react/react-runtime-core.d.ts +23 -0
  275. package/dist/types/runtimes/react/react-runtime-core.d.ts.map +1 -0
  276. package/dist/types/runtimes/react/react-runtime.d.ts +2 -17
  277. package/dist/types/runtimes/react/react-runtime.d.ts.map +1 -1
  278. package/package.json +84 -15
  279. package/react/builtins/box/package.json +5 -0
  280. package/react/builtins/button/package.json +5 -0
  281. package/react/builtins/carousel/package.json +5 -0
  282. package/react/builtins/countdown/package.json +5 -0
  283. package/react/builtins/divider/package.json +5 -0
  284. package/react/builtins/embed/package.json +5 -0
  285. package/react/builtins/form/package.json +5 -0
  286. package/react/builtins/image/package.json +5 -0
  287. package/react/builtins/navigation/package.json +5 -0
  288. package/react/builtins/package.json +5 -0
  289. package/react/builtins/root/package.json +5 -0
  290. package/react/builtins/slot/package.json +5 -0
  291. package/react/builtins/social-links/package.json +5 -0
  292. package/react/builtins/text/package.json +5 -0
  293. package/react/builtins/video/package.json +5 -0
  294. package/react/core/package.json +5 -0
  295. package/react/package.json +3 -3
  296. package/components/package.json +0 -5
  297. package/dist/cjs/components/builtin/index.js +0 -84
  298. package/dist/cjs/components/builtin/index.js.map +0 -1
  299. package/dist/cjs/components/index.js.map +0 -1
  300. package/dist/cjs/react.js.map +0 -1
  301. package/dist/esm/components/builtin/index.js +0 -34
  302. package/dist/esm/components/builtin/index.js.map +0 -1
  303. package/dist/esm/components/index.js +0 -3
  304. package/dist/esm/components/index.js.map +0 -1
  305. package/dist/esm/react.js +0 -11
  306. package/dist/esm/react.js.map +0 -1
  307. package/dist/types/components/builtin/index.d.ts +0 -17
  308. package/dist/types/components/builtin/index.d.ts.map +0 -1
  309. package/dist/types/components/index.d.ts +0 -3
  310. package/dist/types/components/index.d.ts.map +0 -1
  311. package/dist/types/react.d.ts +0 -4
  312. package/dist/types/react.d.ts.map +0 -1
@@ -33,11 +33,11 @@ __export(register_exports, {
33
33
  module.exports = __toCommonJS(register_exports);
34
34
  var import_constants = require("../constants");
35
35
  var import_components_meta = require("../../../state/modules/components-meta");
36
- var import_react2 = require("react");
36
+ var import_react = require("react");
37
37
  var import_prop_controllers = require("@makeswift/prop-controllers");
38
38
  function registerComponent(runtime) {
39
39
  return runtime.registerComponent(
40
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Divider")))),
40
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Divider")))),
41
41
  {
42
42
  type: import_constants.MakeswiftComponentType.Divider,
43
43
  label: "Divider",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Divider/register.ts"],"sourcesContent":["import { ReactRuntime } from '../../../runtimes/react'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ElementID,\n Margin,\n ResponsiveColor,\n ResponsiveLength,\n ResponsiveSelect,\n Width,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Divider')),\n {\n type: MakeswiftComponentType.Divider,\n label: 'Divider',\n icon: ComponentIcon.Divider,\n props: {\n id: ElementID(),\n variant: ResponsiveSelect({\n label: 'Style',\n labelOrientation: 'horizontal',\n options: [\n { value: 'solid', label: 'Solid' },\n { value: 'dashed', label: 'Dashed' },\n { value: 'dotted', label: 'Dotted' },\n { value: 'blended', label: 'Blended' },\n ],\n defaultValue: 'solid',\n }),\n thickness: ResponsiveLength({\n label: 'Height',\n defaultValue: { value: 1, unit: 'px' },\n options: [{ value: 'px', label: 'Pixels', icon: 'Px16' }],\n }),\n color: ResponsiveColor({ placeholder: 'black' }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,6BAA8B;AAC9B,IAAAA,gBAAqB;AACrB,8BAOO;AAEA,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,WAAW,GAAC;AAAA,IAC9B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,aAAS,0CAAiB;AAAA,UACxB,OAAO;AAAA,UACP,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACP,EAAE,OAAO,SAAS,OAAO,QAAQ;AAAA,YACjC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,YACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,YACnC,EAAE,OAAO,WAAW,OAAO,UAAU;AAAA,UACvC;AAAA,UACA,cAAc;AAAA,QAChB,CAAC;AAAA,QACD,eAAW,0CAAiB;AAAA,UAC1B,OAAO;AAAA,UACP,cAAc,EAAE,OAAO,GAAG,MAAM,KAAK;AAAA,UACrC,SAAS,CAAC,EAAE,OAAO,MAAM,OAAO,UAAU,MAAM,OAAO,CAAC;AAAA,QAC1D,CAAC;AAAA,QACD,WAAO,yCAAgB,EAAE,aAAa,QAAQ,CAAC;AAAA,QAC/C,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,QACxC,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Divider/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ElementID,\n Margin,\n ResponsiveColor,\n ResponsiveLength,\n ResponsiveSelect,\n Width,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Divider')),\n {\n type: MakeswiftComponentType.Divider,\n label: 'Divider',\n icon: ComponentIcon.Divider,\n props: {\n id: ElementID(),\n variant: ResponsiveSelect({\n label: 'Style',\n labelOrientation: 'horizontal',\n options: [\n { value: 'solid', label: 'Solid' },\n { value: 'dashed', label: 'Dashed' },\n { value: 'dotted', label: 'Dotted' },\n { value: 'blended', label: 'Blended' },\n ],\n defaultValue: 'solid',\n }),\n thickness: ResponsiveLength({\n label: 'Height',\n defaultValue: { value: 1, unit: 'px' },\n options: [{ value: 'px', label: 'Pixels', icon: 'Px16' }],\n }),\n color: ResponsiveColor({ placeholder: 'black' }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,6BAA8B;AAC9B,mBAAqB;AACrB,8BAOO;AAEA,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,WAAW,GAAC;AAAA,IAC9B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,aAAS,0CAAiB;AAAA,UACxB,OAAO;AAAA,UACP,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACP,EAAE,OAAO,SAAS,OAAO,QAAQ;AAAA,YACjC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,YACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,YACnC,EAAE,OAAO,WAAW,OAAO,UAAU;AAAA,UACvC;AAAA,UACA,cAAc;AAAA,QAChB,CAAC;AAAA,QACD,eAAW,0CAAiB;AAAA,UAC1B,OAAO;AAAA,UACP,cAAc,EAAE,OAAO,GAAG,MAAM,KAAK;AAAA,UACrC,SAAS,CAAC,EAAE,OAAO,MAAM,OAAO,UAAU,MAAM,OAAO,CAAC;AAAA,QAC1D,CAAC;AAAA,QACD,WAAO,yCAAgB,EAAE,aAAa,QAAQ,CAAC;AAAA,QAC/C,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,QACxC,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -33,11 +33,11 @@ __export(register_exports, {
33
33
  module.exports = __toCommonJS(register_exports);
34
34
  var import_constants = require("../constants");
35
35
  var import_components_meta = require("../../../state/modules/components-meta");
36
- var import_react2 = require("react");
36
+ var import_react = require("react");
37
37
  var import_prop_controllers = require("@makeswift/prop-controllers");
38
38
  function registerComponent(runtime) {
39
39
  return runtime.registerComponent(
40
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Embed")))),
40
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Embed")))),
41
41
  {
42
42
  type: import_constants.MakeswiftComponentType.Embed,
43
43
  label: "Embed",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Embed/register.ts"],"sourcesContent":["import { ReactRuntime } from '../../../runtimes/react'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport { ElementID, Margin, TextArea, Width } from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Embed')),\n {\n type: MakeswiftComponentType.Embed,\n label: 'Embed',\n icon: ComponentIcon.Code,\n props: {\n id: ElementID(),\n html: TextArea({ label: 'Code', rows: 20 }),\n width: Width({ format: Width.Format.ClassName }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,6BAA8B;AAC9B,IAAAA,gBAAqB;AACrB,8BAAmD;AAE5C,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,SAAS,GAAC;AAAA,IAC5B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,UAAM,kCAAS,EAAE,OAAO,QAAQ,MAAM,GAAG,CAAC;AAAA,QAC1C,WAAO,+BAAM,EAAE,QAAQ,8BAAM,OAAO,UAAU,CAAC;AAAA,QAC/C,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Embed/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport { ElementID, Margin, TextArea, Width } from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Embed')),\n {\n type: MakeswiftComponentType.Embed,\n label: 'Embed',\n icon: ComponentIcon.Code,\n props: {\n id: ElementID(),\n html: TextArea({ label: 'Code', rows: 20 }),\n width: Width({ format: Width.Format.ClassName }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,6BAA8B;AAC9B,mBAAqB;AACrB,8BAAmD;AAE5C,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,SAAS,GAAC;AAAA,IAC5B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,UAAM,kCAAS,EAAE,OAAO,QAAQ,MAAM,GAAG,CAAC;AAAA,QAC1C,WAAO,+BAAM,EAAE,QAAQ,8BAAM,OAAO,UAAU,CAAC;AAAA,QAC/C,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -35,11 +35,11 @@ var import_controls = require("@makeswift/controls");
35
35
  var import_constants = require("../constants");
36
36
  var import_FormContext = require("./context/FormContext");
37
37
  var import_components_meta = require("../../../state/modules/components-meta");
38
- var import_react2 = require("react");
38
+ var import_react = require("react");
39
39
  var import_prop_controllers = require("@makeswift/prop-controllers");
40
40
  function registerComponent(runtime) {
41
41
  return runtime.registerComponent(
42
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Form")))),
42
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Form")))),
43
43
  {
44
44
  type: import_constants.MakeswiftComponentType.Form,
45
45
  label: "Form",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Form/register.ts"],"sourcesContent":["import { ReactRuntime } from '../../../runtimes/react'\nimport { findBreakpointOverride, getBaseBreakpoint } from '@makeswift/controls'\nimport { MakeswiftComponentType } from '../constants'\nimport { Alignments, Contrast, Contrasts, Shapes, Sizes } from './context/FormContext'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ElementID,\n GapY,\n Link,\n Margin,\n ResponsiveColor,\n ResponsiveLength,\n ResponsiveSelect,\n ResponsiveIconRadioGroup,\n Table,\n TableFormFields,\n TextInput,\n TextStyle,\n Width,\n type PropData,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Form')),\n {\n type: MakeswiftComponentType.Form,\n label: 'Form',\n icon: ComponentIcon.Form,\n props: {\n id: ElementID(),\n tableId: Table(),\n fields: TableFormFields(),\n submitLink: Link(props => ({\n label: 'Redirect to',\n // TODO: This option is hardcoded. We should import it from LinkPanelOptions\n options: [\n { value: 'OPEN_PAGE', label: 'Open page' },\n { value: 'OPEN_URL', label: 'Open URL' },\n ],\n hidden: props.tableId == null,\n })),\n gap: GapY(props => ({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 10, unit: 'px' },\n },\n ],\n label: 'Gap',\n defaultValue: { value: 0, unit: 'px' },\n hidden: props.tableId == null,\n })),\n shape: ResponsiveIconRadioGroup(props => ({\n label: 'Shape',\n options: [\n { label: 'Pill', value: Shapes.PILL, icon: 'ButtonPill16' },\n { label: 'Rounded', value: Shapes.ROUNDED, icon: 'ButtonRounded16' },\n { label: 'Square', value: Shapes.SQUARE, icon: 'ButtonSquare16' },\n ],\n defaultValue: Shapes.ROUNDED,\n hidden: props.tableId == null,\n })),\n size: ResponsiveIconRadioGroup(props => ({\n label: 'Size',\n options: [\n { label: 'Small', value: Sizes.SMALL, icon: 'SizeSmall16' },\n { label: 'Medium', value: Sizes.MEDIUM, icon: 'SizeMedium16' },\n { label: 'Large', value: Sizes.LARGE, icon: 'SizeLarge16' },\n ],\n defaultValue: Sizes.MEDIUM,\n hidden: props?.tableId == null,\n })),\n contrast: ResponsiveIconRadioGroup(props => ({\n label: 'Color',\n options: [\n { label: 'Light mode', value: Contrasts.LIGHT, icon: 'Sun16' },\n { label: 'Dark mode', value: Contrasts.DARK, icon: 'Moon16' },\n ],\n defaultValue: Contrasts.LIGHT,\n hidden: props.tableId == null,\n })),\n labelTextStyle: TextStyle({ label: 'Label text style' }),\n labelTextColor: ResponsiveColor((props, device) => {\n const hidden = props.tableId == null\n const responsiveContrast = ResponsiveSelect.fromPropData<Contrast>(\n props.contrast as PropData<typeof ResponsiveSelect> | undefined,\n )\n const contrast = findBreakpointOverride<Contrast>(\n runtime.getBreakpoints(),\n responsiveContrast,\n device,\n )\n\n return {\n hidden,\n label: 'Label text color',\n placeholder:\n contrast?.value === Contrasts.DARK ? 'rgba(255,255,255,0.95)' : 'rgba(0,0,0,0.8)',\n }\n }),\n submitTextStyle: TextStyle({ label: 'Button text style' }),\n brandColor: ResponsiveColor(props => ({\n label: 'Button color',\n placeholder: 'black',\n hidden: props.tableId == null,\n // TODO: Add hideAlphaSlider\n })),\n submitTextColor: ResponsiveColor(props => ({\n label: 'Button text color',\n placeholder: 'white',\n hidden: props.tableId == null,\n })),\n submitLabel: TextInput(props => ({\n label: 'Button label',\n placeholder: 'Submit',\n hidden: props.tableId == null,\n })),\n submitVariant: ResponsiveSelect(props => ({\n label: 'Button style',\n options: [\n { value: 'flat', label: 'Flat' },\n { value: 'outline', label: 'Outline' },\n { value: 'shadow', label: 'Floating' },\n { value: 'clear', label: 'Clear' },\n { value: 'blocky', label: 'Blocky' },\n { value: 'bubbly', label: 'Bubbly' },\n { value: 'skewed', label: 'Skewed' },\n ],\n defaultValue: 'flat',\n hidden: props.tableId == null,\n })),\n submitWidth: ResponsiveLength(props => ({\n label: 'Button width',\n hidden: props.tableId == null,\n // TODO: Add placeholder: { value: 'auto' }\n })),\n submitAlignment: ResponsiveIconRadioGroup(props => ({\n label: 'Button alignment',\n options: [\n { label: 'Left', value: Alignments.LEFT, icon: 'AlignLeft16' },\n { label: 'Center', value: Alignments.CENTER, icon: 'AlignCenter16' },\n { label: 'Right', value: Alignments.RIGHT, icon: 'AlignRight16' },\n ],\n defaultValue: Alignments.CENTER,\n hidden: props.tableId == null,\n })),\n width: Width({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 550, unit: 'px' },\n },\n ],\n defaultValue: { value: 100, unit: '%' },\n format: Width.Format.ClassName,\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA0D;AAC1D,uBAAuC;AACvC,yBAA+D;AAC/D,6BAA8B;AAC9B,IAAAA,gBAAqB;AACrB,8BAeO;AAEA,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,aAAS,+BAAM;AAAA,QACf,YAAQ,yCAAgB;AAAA,QACxB,gBAAY,8BAAK,YAAU;AAAA,UACzB,OAAO;AAAA;AAAA,UAEP,SAAS;AAAA,YACP,EA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AAS;AAAA,YACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,YACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,UACrC;AAAA,UACA,cAAc;AAAA,UACd,QAAQ,MAAM,WAAW;AAAA,QAC3B,EAAE;AAAA,QACF,iBAAa,0CAAiB,YAAU;AAAA,UACtC,OAAO;AAAA,UACP,QAAQ,MAAM,WAAW;AAAA;AAAA,QAE3B,EAAE;AAAA,QACF,qBAAiB,kDAAyB,YAAU;AAAA,UAClD,OAAO;AAAA,UACP,SAAS;AAAA,YACP,EAAE,OAAO,QAAQ,OAAO,8BAAW,MAAM,MAAM,cAAc;AAAA,YAC7D,EAAE,OAAO,UAAU,OAAO,8BAAW,QAAQ,MAAM,gBAAgB;AAAA,YACnE,EAAE,OAAO,SAAS,OAAO,8BAAW,OAAO,MAAM,eAAe;AAAA,UAClE;AAAA,UACA,cAAc,8BAAW;AAAA,UACzB,QAAQ,MAAM,WAAW;AAAA,QAC3B,EAAE;AAAA,QACF,WAAO,+BAAM;AAAA,UACX,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO,EAAE,OAAO,KAAK,MAAM,KAAK;AAAA,YAClC;AAAA,UACF;AAAA,UACA,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,UACtC,QAAQ,8BAAM,OAAO;AAAA,QACvB,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Form/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { findBreakpointOverride, getBaseBreakpoint } from '@makeswift/controls'\nimport { MakeswiftComponentType } from '../constants'\nimport { Alignments, Contrast, Contrasts, Shapes, Sizes } from './context/FormContext'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ElementID,\n GapY,\n Link,\n Margin,\n ResponsiveColor,\n ResponsiveLength,\n ResponsiveSelect,\n ResponsiveIconRadioGroup,\n Table,\n TableFormFields,\n TextInput,\n TextStyle,\n Width,\n type PropData,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Form')),\n {\n type: MakeswiftComponentType.Form,\n label: 'Form',\n icon: ComponentIcon.Form,\n props: {\n id: ElementID(),\n tableId: Table(),\n fields: TableFormFields(),\n submitLink: Link(props => ({\n label: 'Redirect to',\n // TODO: This option is hardcoded. We should import it from LinkPanelOptions\n options: [\n { value: 'OPEN_PAGE', label: 'Open page' },\n { value: 'OPEN_URL', label: 'Open URL' },\n ],\n hidden: props.tableId == null,\n })),\n gap: GapY(props => ({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 10, unit: 'px' },\n },\n ],\n label: 'Gap',\n defaultValue: { value: 0, unit: 'px' },\n hidden: props.tableId == null,\n })),\n shape: ResponsiveIconRadioGroup(props => ({\n label: 'Shape',\n options: [\n { label: 'Pill', value: Shapes.PILL, icon: 'ButtonPill16' },\n { label: 'Rounded', value: Shapes.ROUNDED, icon: 'ButtonRounded16' },\n { label: 'Square', value: Shapes.SQUARE, icon: 'ButtonSquare16' },\n ],\n defaultValue: Shapes.ROUNDED,\n hidden: props.tableId == null,\n })),\n size: ResponsiveIconRadioGroup(props => ({\n label: 'Size',\n options: [\n { label: 'Small', value: Sizes.SMALL, icon: 'SizeSmall16' },\n { label: 'Medium', value: Sizes.MEDIUM, icon: 'SizeMedium16' },\n { label: 'Large', value: Sizes.LARGE, icon: 'SizeLarge16' },\n ],\n defaultValue: Sizes.MEDIUM,\n hidden: props?.tableId == null,\n })),\n contrast: ResponsiveIconRadioGroup(props => ({\n label: 'Color',\n options: [\n { label: 'Light mode', value: Contrasts.LIGHT, icon: 'Sun16' },\n { label: 'Dark mode', value: Contrasts.DARK, icon: 'Moon16' },\n ],\n defaultValue: Contrasts.LIGHT,\n hidden: props.tableId == null,\n })),\n labelTextStyle: TextStyle({ label: 'Label text style' }),\n labelTextColor: ResponsiveColor((props, device) => {\n const hidden = props.tableId == null\n const responsiveContrast = ResponsiveSelect.fromPropData<Contrast>(\n props.contrast as PropData<typeof ResponsiveSelect> | undefined,\n )\n const contrast = findBreakpointOverride<Contrast>(\n runtime.getBreakpoints(),\n responsiveContrast,\n device,\n )\n\n return {\n hidden,\n label: 'Label text color',\n placeholder:\n contrast?.value === Contrasts.DARK ? 'rgba(255,255,255,0.95)' : 'rgba(0,0,0,0.8)',\n }\n }),\n submitTextStyle: TextStyle({ label: 'Button text style' }),\n brandColor: ResponsiveColor(props => ({\n label: 'Button color',\n placeholder: 'black',\n hidden: props.tableId == null,\n // TODO: Add hideAlphaSlider\n })),\n submitTextColor: ResponsiveColor(props => ({\n label: 'Button text color',\n placeholder: 'white',\n hidden: props.tableId == null,\n })),\n submitLabel: TextInput(props => ({\n label: 'Button label',\n placeholder: 'Submit',\n hidden: props.tableId == null,\n })),\n submitVariant: ResponsiveSelect(props => ({\n label: 'Button style',\n options: [\n { value: 'flat', label: 'Flat' },\n { value: 'outline', label: 'Outline' },\n { value: 'shadow', label: 'Floating' },\n { value: 'clear', label: 'Clear' },\n { value: 'blocky', label: 'Blocky' },\n { value: 'bubbly', label: 'Bubbly' },\n { value: 'skewed', label: 'Skewed' },\n ],\n defaultValue: 'flat',\n hidden: props.tableId == null,\n })),\n submitWidth: ResponsiveLength(props => ({\n label: 'Button width',\n hidden: props.tableId == null,\n // TODO: Add placeholder: { value: 'auto' }\n })),\n submitAlignment: ResponsiveIconRadioGroup(props => ({\n label: 'Button alignment',\n options: [\n { label: 'Left', value: Alignments.LEFT, icon: 'AlignLeft16' },\n { label: 'Center', value: Alignments.CENTER, icon: 'AlignCenter16' },\n { label: 'Right', value: Alignments.RIGHT, icon: 'AlignRight16' },\n ],\n defaultValue: Alignments.CENTER,\n hidden: props.tableId == null,\n })),\n width: Width({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 550, unit: 'px' },\n },\n ],\n defaultValue: { value: 100, unit: '%' },\n format: Width.Format.ClassName,\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA0D;AAC1D,uBAAuC;AACvC,yBAA+D;AAC/D,6BAA8B;AAC9B,mBAAqB;AACrB,8BAeO;AAEA,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,aAAS,+BAAM;AAAA,QACf,YAAQ,yCAAgB;AAAA,QACxB,gBAAY,8BAAK,YAAU;AAAA,UACzB,OAAO;AAAA;AAAA,UAEP,SAAS;AAAA,YACP,EAAE,OAAO,aAAa,OAAO,YAAY;AAAA,YACzC,EAAE,OAAO,YAAY,OAAO,WAAW;AAAA,UACzC;AAAA,UACA,QAAQ,MAAM,WAAW;AAAA,QAC3B,EAAE;AAAA,QACF,SAAK,8BAAK,YAAU;AAAA,UAClB,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,YACjC;AAAA,UACF;AAAA,UACA,OAAO;AAAA,UACP,cAAc,EAAE,OAAO,GAAG,MAAM,KAAK;AAAA,UACrC,QAAQ,MAAM,WAAW;AAAA,QAC3B,EAAE;AAAA,QACF,WAAO,kDAAyB,YAAU;AAAA,UACxC,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AAA,YACnE,EAAE,OAAO,SAAS,OAAO,8BAAW,OAAO,MAAM,eAAe;AAAA,UAClE;AAAA,UACA,cAAc,8BAAW;AAAA,UACzB,QAAQ,MAAM,WAAW;AAAA,QAC3B,EAAE;AAAA,QACF,WAAO,+BAAM;AAAA,UACX,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO,EAAE,OAAO,KAAK,MAAM,KAAK;AAAA,YAClC;AAAA,UACF;AAAA,UACA,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,UACtC,QAAQ,8BAAM,OAAO;AAAA,QACvB,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Image/register.ts"],"sourcesContent":["import { lazy } from 'react'\nimport { ReactRuntime } from '../../../runtimes/react'\nimport { MakeswiftComponentType } from '../constants'\nimport {\n Border,\n Link,\n Shadows,\n Checkbox,\n BorderRadius,\n Margin,\n Padding,\n Width,\n ElementID,\n Image,\n ResponsiveOpacity,\n TextInput,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Image')),\n {\n type: MakeswiftComponentType.Image,\n label: 'Image',\n props: {\n id: ElementID(),\n file: Image(),\n altText: TextInput({ label: 'Alt text' }),\n link: Link({ label: 'On click' }),\n width: Width(),\n margin: Margin({ format: Margin.Format.ClassName }),\n padding: Padding({ format: Padding.Format.ClassName }),\n border: Border({ format: Border.Format.ClassName }),\n borderRadius: BorderRadius({ format: BorderRadius.Format.ClassName }),\n boxShadow: Shadows({ format: Shadows.Format.ClassName }),\n opacity: ResponsiveOpacity(),\n priority: Checkbox({ label: 'Priority' }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqB;AAErB,uBAAuC;AACvC,8BAaO;AAEA,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,SAAS,GAAC;AAAA,IAC5B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,UAAM,+BAAM;AAAA,QACZ,aAAS,mCAAU,EAAE,OAAO,WAAW,CAAC;AAAA,QACxC,UAAM,8BAAK,EAAE,OAAO,WAAW,CAAC;AAAA,QAChC,WAAO,+BAAM;AAAA,QACb,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,QAClD,aAAS,iCAAQ,EAAE,QAAQ,gCAAQ,OAAO,UAAU,CAAC;AAAA,QACrD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,QAClD,kBAAc,sCAAa,EAAE,QAAQ,qCAAa,OAAO,UAAU,CAAC;AAAA,QACpE,eAAW,iCAAQ,EAAE,QAAQ,gCAAQ,OAAO,UAAU,CAAC;AAAA,QACvD,aAAS,2CAAkB;AAAA,QAC3B,cAAU,kCAAS,EAAE,OAAO,WAAW,CAAC;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Image/register.ts"],"sourcesContent":["import { lazy } from 'react'\nimport { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport {\n Border,\n Link,\n Shadows,\n Checkbox,\n BorderRadius,\n Margin,\n Padding,\n Width,\n ElementID,\n Image,\n ResponsiveOpacity,\n TextInput,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Image')),\n {\n type: MakeswiftComponentType.Image,\n label: 'Image',\n props: {\n id: ElementID(),\n file: Image(),\n altText: TextInput({ label: 'Alt text' }),\n link: Link({ label: 'On click' }),\n width: Width(),\n margin: Margin({ format: Margin.Format.ClassName }),\n padding: Padding({ format: Padding.Format.ClassName }),\n border: Border({ format: Border.Format.ClassName }),\n borderRadius: BorderRadius({ format: BorderRadius.Format.ClassName }),\n boxShadow: Shadows({ format: Shadows.Format.ClassName }),\n opacity: ResponsiveOpacity(),\n priority: Checkbox({ label: 'Priority' }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqB;AAErB,uBAAuC;AACvC,8BAaO;AAEA,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,SAAS,GAAC;AAAA,IAC5B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,UAAM,+BAAM;AAAA,QACZ,aAAS,mCAAU,EAAE,OAAO,WAAW,CAAC;AAAA,QACxC,UAAM,8BAAK,EAAE,OAAO,WAAW,CAAC;AAAA,QAChC,WAAO,+BAAM;AAAA,QACb,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,QAClD,aAAS,iCAAQ,EAAE,QAAQ,gCAAQ,OAAO,UAAU,CAAC;AAAA,QACrD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,QAClD,kBAAc,sCAAa,EAAE,QAAQ,qCAAa,OAAO,UAAU,CAAC;AAAA,QACpE,eAAW,iCAAQ,EAAE,QAAQ,gCAAQ,OAAO,UAAU,CAAC;AAAA,QACvD,aAAS,2CAAkB;AAAA,QAC3B,cAAU,kCAAS,EAAE,OAAO,WAAW,CAAC;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(register_exports);
34
34
  var import_controls = require("@makeswift/controls");
35
35
  var import_constants = require("../constants");
36
36
  var import_components_meta = require("../../../state/modules/components-meta");
37
- var import_react2 = require("react");
37
+ var import_react = require("react");
38
38
  var import_prop_controllers = require("@makeswift/prop-controllers");
39
39
  function registerComponent(runtime) {
40
40
  function isHiddenBasedOnMenuAnimation(props, deviceId) {
@@ -44,7 +44,7 @@ function registerComponent(runtime) {
44
44
  return !(0, import_controls.findBreakpointOverride)(runtime.getBreakpoints(), mobileMenuAnimation, deviceId);
45
45
  }
46
46
  return runtime.registerComponent(
47
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Navigation")))),
47
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Navigation")))),
48
48
  {
49
49
  type: import_constants.MakeswiftComponentType.Navigation,
50
50
  label: "Navigation",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Navigation/register.ts"],"sourcesContent":["import { ReactRuntime } from '../../../runtimes/react'\nimport { findBreakpointOverride, getBaseBreakpoint } from '@makeswift/controls'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ControlDataTypeKey,\n Checkbox,\n Link,\n ResponsiveColor,\n ResponsiveLength,\n ResponsiveLengthPropControllerDataV1Type,\n checkboxPropControllerDataSchema,\n getCheckboxPropControllerDataBoolean,\n Margin,\n Width,\n TextStyle,\n NavigationLinks,\n NavigationLinksData,\n GapX,\n ResponsiveIconRadioGroup,\n ResponsiveSelect,\n ElementID,\n Image,\n TextInput,\n type PropData,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n function isHiddenBasedOnMenuAnimation(props: Record<string, unknown>, deviceId: string): boolean {\n const mobileMenuAnimation = ResponsiveSelect.fromPropData(\n props.mobileMenuAnimation as PropData<typeof ResponsiveSelect> | undefined,\n )\n\n return !findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, deviceId)\n }\n\n return runtime.registerComponent(\n lazy(() => import('./Navigation')),\n {\n type: MakeswiftComponentType.Navigation,\n label: 'Navigation',\n icon: ComponentIcon.Navigation,\n props: {\n id: ElementID(),\n links: NavigationLinks(),\n linkTextStyle: TextStyle(props => {\n const links = props.links as NavigationLinksData | undefined\n\n return {\n label: 'Link text style',\n hidden: links == null || links.length === 0,\n }\n }),\n showLogo: Checkbox({ preset: true, label: 'Show logo' }),\n logoFile: Image(props => ({\n label: 'Logo',\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n logoWidth: ResponsiveLength(props => ({\n // TODO(miguel): We're manually constructing the data here but should be using a factory\n // function instead. This is because the factory function currently expects a definition\n // but we don't have one to pass here. Perhaps we should make the factory function not\n // require the definition and use the latest version when a definition isn't provided.\n preset: {\n [ControlDataTypeKey]: ResponsiveLengthPropControllerDataV1Type,\n value: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 100, unit: 'px' },\n },\n ],\n },\n label: 'Logo width',\n min: 0,\n max: 1000,\n // TODO: This is hardcoded value, import it from LengthInputOptions\n options: [{ value: 'px', label: 'Pixels', icon: 'Px16' }],\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n logoAltText: TextInput(props => ({\n label: 'Logo alt text',\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n logoLink: Link(props => ({\n label: 'Logo on click',\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n alignment: ResponsiveIconRadioGroup({\n label: 'Alignment',\n options: [\n { label: 'Left', value: 'flex-start', icon: 'AlignLeft16' },\n { label: 'Center', value: 'center', icon: 'AlignCenter16' },\n { label: 'End', value: 'flex-end', icon: 'AlignRight16' },\n ],\n defaultValue: 'flex-end',\n }),\n gutter: GapX({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 10, unit: 'px' },\n },\n ],\n label: 'Link gap',\n min: 0,\n max: 100,\n step: 1,\n defaultValue: { value: 0, unit: 'px' },\n }),\n mobileMenuAnimation: ResponsiveSelect({\n label: 'Mobile menu',\n options: [\n { value: 'coverRight', label: 'Cover from right' },\n { value: 'coverLeft', label: 'Cover from left' },\n ],\n }),\n mobileMenuOpenIconColor: ResponsiveColor((props, device) => {\n return {\n label: 'Open icon color',\n placeholder: 'rgba(161, 168, 194, 0.5)',\n hidden: isHiddenBasedOnMenuAnimation(props, device),\n }\n }),\n mobileMenuCloseIconColor: ResponsiveColor((props, device) => {\n return {\n label: 'Close icon color',\n placeholder: 'rgba(161, 168, 194, 0.5)',\n hidden: isHiddenBasedOnMenuAnimation(props, device),\n }\n }),\n mobileMenuBackgroundColor: ResponsiveColor((props, device) => {\n return {\n label: 'Menu BG color',\n placeholder: 'black',\n hidden: isHiddenBasedOnMenuAnimation(props, device),\n }\n }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA0D;AAC1D,uBAAuC;AACvC,6BAA8B;AAC9B,IAAAA,gBAAqB;AACrB,8BAqBO;AAEA,SAAS,kBAAkB,SAAuB;AACvD,WAAS,6BAA6B,OAAgC,UAA2B;AAC/F,UAAM,sBAAsB,yCAAiB;AAAA,MAC3C,MAAM;AAAA,IACR;AAEA,WAAO,KAAC,wCAAuB,QAAQ,eAAe,GAAG,qBAAqB,QAAQ;AAAA,EACxF;AAEA,SAAO,Q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;AAAA,YACb,QAAQ,6BAA6B,OAAO,MAAM;AAAA,UACpD;AAAA,QACF,CAAC;AAAA,QACD,+BAA2B,yCAAgB,CAAC,OAAO,WAAW;AAC5D,iBAAO;AAAA,YACL,OAAO;AAAA,YACP,aAAa;AAAA,YACb,QAAQ,6BAA6B,OAAO,MAAM;AAAA,UACpD;AAAA,QACF,CAAC;AAAA,QACD,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,QACxC,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Navigation/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { findBreakpointOverride, getBaseBreakpoint } from '@makeswift/controls'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ControlDataTypeKey,\n Checkbox,\n Link,\n ResponsiveColor,\n ResponsiveLength,\n ResponsiveLengthPropControllerDataV1Type,\n checkboxPropControllerDataSchema,\n getCheckboxPropControllerDataBoolean,\n Margin,\n Width,\n TextStyle,\n NavigationLinks,\n NavigationLinksData,\n GapX,\n ResponsiveIconRadioGroup,\n ResponsiveSelect,\n ElementID,\n Image,\n TextInput,\n type PropData,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n function isHiddenBasedOnMenuAnimation(props: Record<string, unknown>, deviceId: string): boolean {\n const mobileMenuAnimation = ResponsiveSelect.fromPropData(\n props.mobileMenuAnimation as PropData<typeof ResponsiveSelect> | undefined,\n )\n\n return !findBreakpointOverride(runtime.getBreakpoints(), mobileMenuAnimation, deviceId)\n }\n\n return runtime.registerComponent(\n lazy(() => import('./Navigation')),\n {\n type: MakeswiftComponentType.Navigation,\n label: 'Navigation',\n icon: ComponentIcon.Navigation,\n props: {\n id: ElementID(),\n links: NavigationLinks(),\n linkTextStyle: TextStyle(props => {\n const links = props.links as NavigationLinksData | undefined\n\n return {\n label: 'Link text style',\n hidden: links == null || links.length === 0,\n }\n }),\n showLogo: Checkbox({ preset: true, label: 'Show logo' }),\n logoFile: Image(props => ({\n label: 'Logo',\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n logoWidth: ResponsiveLength(props => ({\n // TODO(miguel): We're manually constructing the data here but should be using a factory\n // function instead. This is because the factory function currently expects a definition\n // but we don't have one to pass here. Perhaps we should make the factory function not\n // require the definition and use the latest version when a definition isn't provided.\n preset: {\n [ControlDataTypeKey]: ResponsiveLengthPropControllerDataV1Type,\n value: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 100, unit: 'px' },\n },\n ],\n },\n label: 'Logo width',\n min: 0,\n max: 1000,\n // TODO: This is hardcoded value, import it from LengthInputOptions\n options: [{ value: 'px', label: 'Pixels', icon: 'Px16' }],\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n logoAltText: TextInput(props => ({\n label: 'Logo alt text',\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n logoLink: Link(props => ({\n label: 'Logo on click',\n hidden:\n getCheckboxPropControllerDataBoolean(\n checkboxPropControllerDataSchema.optional().catch(undefined).parse(props.showLogo),\n ) === false,\n })),\n alignment: ResponsiveIconRadioGroup({\n label: 'Alignment',\n options: [\n { label: 'Left', value: 'flex-start', icon: 'AlignLeft16' },\n { label: 'Center', value: 'center', icon: 'AlignCenter16' },\n { label: 'End', value: 'flex-end', icon: 'AlignRight16' },\n ],\n defaultValue: 'flex-end',\n }),\n gutter: GapX({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 10, unit: 'px' },\n },\n ],\n label: 'Link gap',\n min: 0,\n max: 100,\n step: 1,\n defaultValue: { value: 0, unit: 'px' },\n }),\n mobileMenuAnimation: ResponsiveSelect({\n label: 'Mobile menu',\n options: [\n { value: 'coverRight', label: 'Cover from right' },\n { value: 'coverLeft', label: 'Cover from left' },\n ],\n }),\n mobileMenuOpenIconColor: ResponsiveColor((props, device) => {\n return {\n label: 'Open icon color',\n placeholder: 'rgba(161, 168, 194, 0.5)',\n hidden: isHiddenBasedOnMenuAnimation(props, device),\n }\n }),\n mobileMenuCloseIconColor: ResponsiveColor((props, device) => {\n return {\n label: 'Close icon color',\n placeholder: 'rgba(161, 168, 194, 0.5)',\n hidden: isHiddenBasedOnMenuAnimation(props, device),\n }\n }),\n mobileMenuBackgroundColor: ResponsiveColor((props, device) => {\n return {\n label: 'Menu BG color',\n placeholder: 'black',\n hidden: isHiddenBasedOnMenuAnimation(props, device),\n }\n }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA0D;AAC1D,uBAAuC;AACvC,6BAA8B;AAC9B,mBAAqB;AACrB,8BAqBO;AAEA,SAAS,kBAAkB,SAA2B;AAC3D,WAAS,6BAA6B,OAAgC,UAA2B;AAC/F,UAAM,sBAAsB,yCAAiB;AAAA,MAC3C,MAAM;AAAA,IACR;AAEA,WAAO,KAAC,wCAAuB,QAAQ,eAAe,GAAG,qBAAqB,QAAQ;AAAA,EACxF;AAEA,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,cAAc,GAAC;AAAA,IACjC;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,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C,OAAO,WAAW;AAC5D,iBAAO;AAAA,YACL,OAAO;AAAA,YACP,aAAa;AAAA,YACb,QAAQ,6BAA6B,OAAO,MAAM;AAAA,UACpD;AAAA,QACF,CAAC;AAAA,QACD,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,QACxC,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(Root_exports);
34
34
  var import_jsx_runtime = require("react/jsx-runtime");
35
35
  var import_polished = require("polished");
36
36
  var import_react = require("react");
37
- var import_react2 = require("../../../runtimes/react");
37
+ var import_Element = require("../../../runtimes/react/components/Element");
38
38
  var import_use_global_style = require("../../../runtimes/react/use-global-style");
39
39
  var import_use_style = require("../../../runtimes/react/use-style");
40
40
  var import_root_style_registry = require("../../../runtimes/react/root-style-registry");
@@ -56,7 +56,7 @@ const Root = (0, import_react.forwardRef)(function Page({ children, backgrounds,
56
56
  index,
57
57
  columnGap,
58
58
  rowGap,
59
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Element, { element: child })
59
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Element.Element, { element: child })
60
60
  },
61
61
  child.key
62
62
  )) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Placeholder.default, {}) }) });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { normalize } from 'polished'\nimport { forwardRef, type Ref } from 'react'\n\nimport {\n type GridData,\n type ResponsiveBackgroundsData,\n type ResponsiveGapData,\n} from '@makeswift/prop-controllers'\n\nimport { Element } from '../../../runtimes/react'\nimport { useGlobalStyle } from '../../../runtimes/react/use-global-style'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { useCSSResetEnabled } from '../../../runtimes/react/root-style-registry'\n\nimport { GridItem } from '../../shared/grid-item'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\n\nimport Placeholder from './components/Placeholder'\n\ntype Props = {\n children?: GridData\n backgrounds?: ResponsiveBackgroundsData\n rowGap?: ResponsiveGapData\n columnGap?: ResponsiveGapData\n}\n\nconst Root = forwardRef(function Page(\n { children, backgrounds, rowGap, columnGap }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const cssResetEnabled = useCSSResetEnabled()\n\n useGlobalStyle(\n cssResetEnabled\n ? [\n { html: { boxSizing: 'border-box' }, '*, *::before, *::after': { boxSizing: 'inherit' } },\n normalize(),\n ]\n : [],\n )\n\n return (\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <div className={useStyle({ display: 'flex', flexWrap: 'wrap', width: '100%' })}>\n {children && children.elements.length > 0 ? (\n children.elements.map((child, index) => (\n <GridItem\n key={child.key}\n grid={children.columns}\n index={index}\n columnGap={columnGap}\n rowGap={rowGap}\n >\n <Element element={child} />\n </GridItem>\n ))\n ) : (\n <Placeholder />\n )}\n </div>\n </BackgroundsContainer>\n )\n})\n\nexport default Root\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqDc;AArDd,sBAA0B;AAC1B,mBAAqC;AAQrC,IAAAA,gBAAwB;AACxB,8BAA+B;AAC/B,uBAAyB;AACzB,iCAAmC;AAEnC,uBAAyB;AACzB,kCAAiC;AAEjC,yBAAwB;AASxB,MAAM,WAAO,yBAAW,SAAS,KAC/B,EAAE,UAAU,aAAa,QAAQ,UAAU,GAC3C,KACA;AACA,QAAM,sBAAkB,+CAAmB;AAE3C;AAAA,IACE,kBACI;AAAA,MACE,EAAE,MAAM,EAAE,WAAW,aAAa,GAAG,0BAA0B,EAAE,WAAW,UAAU,EAAE;AAAA,UACxF,2BAAU;AAAA,IACZ,IACA,CAAC;AAAA,EACP;AAEA,SACE,4CAAC,4BAAAC,SAAA,EAAqB,KAAU,OAAO,EAAE,YAAY,QAAQ,GAAG,aAC9D,sDAAC,SAAI,eAAW,2BAAS,EAAE,SAAS,QAAQ,UAAU,QAAQ,OAAO,OAAO,CAAC,GAC1E,sBAAY,SAAS,SAAS,SAAS,IACtC,SAAS,SAAS,IAAI,CAAC,OAAO,UAC5B;AAAA,IAAC;AAAA;AAAA,MAEC,MAAM,SAAS;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,sDAAC,yBAAQ,SAAS,OAAO;AAAA;AAAA,IANpB,MAAM;AAAA,EAOb,CACD,IAED,4CAAC,mBAAAC,SAAA,EAAY,GAEjB,GACF;AAEJ,CAAC;AAED,IAAO,eAAQ;","names":["import_react","BackgroundsContainer","Placeholder"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { normalize } from 'polished'\nimport { forwardRef, type Ref } from 'react'\n\nimport {\n type GridData,\n type ResponsiveBackgroundsData,\n type ResponsiveGapData,\n} from '@makeswift/prop-controllers'\n\nimport { Element } from '../../../runtimes/react/components/Element'\nimport { useGlobalStyle } from '../../../runtimes/react/use-global-style'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { useCSSResetEnabled } from '../../../runtimes/react/root-style-registry'\n\nimport { GridItem } from '../../shared/grid-item'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\n\nimport Placeholder from './components/Placeholder'\n\ntype Props = {\n children?: GridData\n backgrounds?: ResponsiveBackgroundsData\n rowGap?: ResponsiveGapData\n columnGap?: ResponsiveGapData\n}\n\nconst Root = forwardRef(function Page(\n { children, backgrounds, rowGap, columnGap }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const cssResetEnabled = useCSSResetEnabled()\n\n useGlobalStyle(\n cssResetEnabled\n ? [\n { html: { boxSizing: 'border-box' }, '*, *::before, *::after': { boxSizing: 'inherit' } },\n normalize(),\n ]\n : [],\n )\n\n return (\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <div className={useStyle({ display: 'flex', flexWrap: 'wrap', width: '100%' })}>\n {children && children.elements.length > 0 ? (\n children.elements.map((child, index) => (\n <GridItem\n key={child.key}\n grid={children.columns}\n index={index}\n columnGap={columnGap}\n rowGap={rowGap}\n >\n <Element element={child} />\n </GridItem>\n ))\n ) : (\n <Placeholder />\n )}\n </div>\n </BackgroundsContainer>\n )\n})\n\nexport default Root\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqDc;AArDd,sBAA0B;AAC1B,mBAAqC;AAQrC,qBAAwB;AACxB,8BAA+B;AAC/B,uBAAyB;AACzB,iCAAmC;AAEnC,uBAAyB;AACzB,kCAAiC;AAEjC,yBAAwB;AASxB,MAAM,WAAO,yBAAW,SAAS,KAC/B,EAAE,UAAU,aAAa,QAAQ,UAAU,GAC3C,KACA;AACA,QAAM,sBAAkB,+CAAmB;AAE3C;AAAA,IACE,kBACI;AAAA,MACE,EAAE,MAAM,EAAE,WAAW,aAAa,GAAG,0BAA0B,EAAE,WAAW,UAAU,EAAE;AAAA,UACxF,2BAAU;AAAA,IACZ,IACA,CAAC;AAAA,EACP;AAEA,SACE,4CAAC,4BAAAA,SAAA,EAAqB,KAAU,OAAO,EAAE,YAAY,QAAQ,GAAG,aAC9D,sDAAC,SAAI,eAAW,2BAAS,EAAE,SAAS,QAAQ,UAAU,QAAQ,OAAO,OAAO,CAAC,GAC1E,sBAAY,SAAS,SAAS,SAAS,IACtC,SAAS,SAAS,IAAI,CAAC,OAAO,UAC5B;AAAA,IAAC;AAAA;AAAA,MAEC,MAAM,SAAS;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,sDAAC,0BAAQ,SAAS,OAAO;AAAA;AAAA,IANpB,MAAM;AAAA,EAOb,CACD,IAED,4CAAC,mBAAAC,SAAA,EAAY,GAEjB,GACF;AAEJ,CAAC;AAED,IAAO,eAAQ;","names":["BackgroundsContainer","Placeholder"]}
@@ -33,10 +33,10 @@ __export(register_exports, {
33
33
  module.exports = __toCommonJS(register_exports);
34
34
  var import_prop_controllers = require("@makeswift/prop-controllers");
35
35
  var import_constants = require("../constants");
36
- var import_react2 = require("react");
36
+ var import_react = require("react");
37
37
  function registerComponent(runtime) {
38
38
  return runtime.registerComponent(
39
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Root")))),
39
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Root")))),
40
40
  {
41
41
  type: import_constants.MakeswiftComponentType.Root,
42
42
  label: "Page",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Root/register.ts"],"sourcesContent":["import { Backgrounds, GapX, GapY, Grid } from '@makeswift/prop-controllers'\nimport { ReactRuntime } from '../../../react'\nimport { MakeswiftComponentType } from '../constants'\nimport { lazy } from 'react'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Root')),\n {\n type: MakeswiftComponentType.Root,\n label: 'Page',\n hidden: true,\n props: {\n children: Grid(),\n backgrounds: Backgrounds(),\n rowGap: GapY(),\n columnGap: GapX(),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA8C;AAE9C,uBAAuC;AACvC,IAAAA,gBAAqB;AAEd,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAU,8BAAK;AAAA,QACf,iBAAa,qCAAY;AAAA,QACzB,YAAQ,8BAAK;AAAA,QACb,eAAW,8BAAK;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Root/register.ts"],"sourcesContent":["import { Backgrounds, GapX, GapY, Grid } from '@makeswift/prop-controllers'\nimport { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport { lazy } from 'react'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Root')),\n {\n type: MakeswiftComponentType.Root,\n label: 'Page',\n hidden: true,\n props: {\n children: Grid(),\n backgrounds: Backgrounds(),\n rowGap: GapY(),\n columnGap: GapX(),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA8C;AAE9C,uBAAuC;AACvC,mBAAqB;AAEd,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAU,8BAAK;AAAA,QACf,iBAAa,qCAAY;AAAA,QACzB,YAAQ,8BAAK;AAAA,QACb,eAAW,8BAAK;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Slot/register.ts"],"sourcesContent":["import { lazy } from 'react'\nimport { ReactRuntime } from '../../../react'\nimport { MakeswiftComponentType } from '../constants'\nimport { Checkbox } from '@makeswift/controls'\nimport { Slot } from '../../../controls'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Slot')),\n {\n type: MakeswiftComponentType.Slot,\n label: 'Slot',\n hidden: true,\n props: {\n children: Slot(),\n showFallback: Checkbox({ label: 'Use fallback', defaultValue: true }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqB;AAErB,uBAAuC;AACvC,sBAAyB;AACzB,IAAAA,mBAAqB;AAEd,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAU,uBAAK;AAAA,QACf,kBAAc,0BAAS,EAAE,OAAO,gBAAgB,cAAc,KAAK,CAAC;AAAA,MACtE;AAAA,IACF;AAAA,EACF;AACF;","names":["import_controls"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Slot/register.ts"],"sourcesContent":["import { lazy } from 'react'\nimport { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport { Checkbox } from '@makeswift/controls'\nimport { Slot } from '../../../controls'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Slot')),\n {\n type: MakeswiftComponentType.Slot,\n label: 'Slot',\n hidden: true,\n props: {\n children: Slot(),\n showFallback: Checkbox({ label: 'Use fallback', defaultValue: true }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqB;AAErB,uBAAuC;AACvC,sBAAyB;AACzB,IAAAA,mBAAqB;AAEd,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAU,uBAAK;AAAA,QACf,kBAAc,0BAAS,EAAE,OAAO,gBAAgB,cAAc,KAAK,CAAC;AAAA,MACtE;AAAA,IACF;AAAA,EACF;AACF;","names":["import_controls"]}
@@ -34,11 +34,11 @@ module.exports = __toCommonJS(register_exports);
34
34
  var import_controls = require("@makeswift/controls");
35
35
  var import_constants = require("../constants");
36
36
  var import_components_meta = require("../../../state/modules/components-meta");
37
- var import_react2 = require("react");
37
+ var import_react = require("react");
38
38
  var import_prop_controllers = require("@makeswift/prop-controllers");
39
39
  function registerComponent(runtime) {
40
40
  return runtime.registerComponent(
41
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./SocialLinks")))),
41
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./SocialLinks")))),
42
42
  {
43
43
  type: import_constants.MakeswiftComponentType.SocialLinks,
44
44
  label: "Social Links",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/SocialLinks/register.ts"],"sourcesContent":["import { ReactRuntime } from '../../../runtimes/react'\nimport { getBaseBreakpoint } from '@makeswift/controls'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ElementID,\n GapX,\n Margin,\n ResponsiveColor,\n ResponsiveSelect,\n ResponsiveIconRadioGroup,\n SocialLinks,\n SocialLinksPropControllerData,\n Width,\n getSocialLinksPropControllerDataSocialLinksData,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./SocialLinks')),\n {\n type: MakeswiftComponentType.SocialLinks,\n label: 'Social Links',\n icon: ComponentIcon.SocialLinks,\n props: {\n id: ElementID(),\n links: SocialLinks({\n preset: {\n links: [\n {\n id: 'facebook',\n payload: { type: 'facebook', url: 'https://www.facebook.com' },\n },\n {\n id: 'instagram',\n payload: { type: 'instagram', url: 'https://www.instagram.com' },\n },\n {\n id: 'twitter',\n payload: { type: 'twitter', url: 'https://www.twitter.com' },\n },\n ],\n openInNewTab: false,\n },\n }),\n shape: ResponsiveIconRadioGroup(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n\n return {\n label: 'Shape',\n options: [\n { label: 'Naked', value: 'naked', icon: 'Star16' },\n { label: 'Circle', value: 'circle', icon: 'StarCircle16' },\n { label: 'Rounded', value: 'rounded', icon: 'StarRoundedSquare16' },\n { label: 'Square', value: 'square', icon: 'StarSquare16' },\n ],\n defaultValue: 'naked',\n hidden: links == null || links.links.length === 0,\n }\n }),\n size: ResponsiveIconRadioGroup(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n\n return {\n label: 'Size',\n options: [\n { label: 'Small', value: 'small', icon: 'SizeSmall16' },\n { label: 'Medium', value: 'medium', icon: 'SizeMedium16' },\n { label: 'Large', value: 'large', icon: 'SizeLarge16' },\n ],\n defaultValue: 'medium',\n hidden: links == null || links.links.length === 0,\n }\n }),\n hoverStyle: ResponsiveSelect(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n const hidden = links == null || links.links.length === 0\n\n return {\n label: 'On hover',\n options: [\n { value: 'none', label: 'None' },\n { value: 'grow', label: 'Grow' },\n { value: 'shrink', label: 'Shrink' },\n { value: 'fade', label: 'Fade' },\n ],\n defaultValue: 'none',\n labelOrientation: 'horizontal',\n hidden,\n }\n }),\n fill: ResponsiveColor(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n const hidden = links == null || links.links.length === 0\n\n return {\n label: 'Icon color',\n hidden,\n }\n }),\n backgroundColor: ResponsiveColor(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n const hidden = links == null || links.links.length === 0\n\n return {\n label: 'Shape color',\n hidden,\n }\n }),\n alignment: ResponsiveIconRadioGroup({\n label: 'Alignment',\n options: [\n { label: 'flex-start', value: 'flex-start', icon: 'AlignLeft16' },\n { label: 'center', value: 'center', icon: 'AlignCenter16' },\n { label: 'flex-end', value: 'flex-end', icon: 'AlignRight16' },\n ],\n defaultValue: 'center',\n }),\n gutter: GapX({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 10, unit: 'px' },\n },\n ],\n label: 'Link gap',\n min: 0,\n max: 100,\n step: 1,\n defaultValue: { value: 0, unit: 'px' },\n }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({\n format: Margin.Format.ClassName,\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: {\n marginTop: { value: 10, unit: 'px' },\n marginRight: 'auto',\n marginBottom: { value: 10, unit: 'px' },\n marginLeft: 'auto',\n },\n },\n ],\n }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAkC;AAClC,uBAAuC;AACvC,6BAA8B;AAC9B,IAAAA,gBAAqB;AACrB,8BAWO;AAEA,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,eAAe,GAAC;AAAA,IAClC;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,WAAO,qCAAY;AAAA,UACjB,QAAQ;AAAA,YACN,OAAO;AAAA,cACL;AAAA,gBACE,IAAI;AAAA,gBACJ,SAAS,EAAE,MAAM,YAAY,KAAK,2BAA2B;AAAA,cAC/D;AAAA,cACA;AAAA,gBACE,IAAI;AAAA,gBACJ,SAAS,EAAE,MAAM,aAAa,KAAK,4BAA4B;AAAA,cACjE;AAAA,cACA;AAAA,gBACE,IAAI;AAAA,gBACJ,SAAS,EAAE,MAAM,WAAW,KAAK,0BAA0B;AAAA,cAC7D;AAAA,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gCAAO;AAAA,UACb,QAAQ,+BAAO,OAAO;AAAA,UACtB,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO;AAAA,gBACL,WAAW,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,gBACnC,aAAa;AAAA,gBACb,cAAc,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,gBACtC,YAAY;AAAA,cACd;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/SocialLinks/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { getBaseBreakpoint } from '@makeswift/controls'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport {\n ElementID,\n GapX,\n Margin,\n ResponsiveColor,\n ResponsiveSelect,\n ResponsiveIconRadioGroup,\n SocialLinks,\n SocialLinksPropControllerData,\n Width,\n getSocialLinksPropControllerDataSocialLinksData,\n} from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./SocialLinks')),\n {\n type: MakeswiftComponentType.SocialLinks,\n label: 'Social Links',\n icon: ComponentIcon.SocialLinks,\n props: {\n id: ElementID(),\n links: SocialLinks({\n preset: {\n links: [\n {\n id: 'facebook',\n payload: { type: 'facebook', url: 'https://www.facebook.com' },\n },\n {\n id: 'instagram',\n payload: { type: 'instagram', url: 'https://www.instagram.com' },\n },\n {\n id: 'twitter',\n payload: { type: 'twitter', url: 'https://www.twitter.com' },\n },\n ],\n openInNewTab: false,\n },\n }),\n shape: ResponsiveIconRadioGroup(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n\n return {\n label: 'Shape',\n options: [\n { label: 'Naked', value: 'naked', icon: 'Star16' },\n { label: 'Circle', value: 'circle', icon: 'StarCircle16' },\n { label: 'Rounded', value: 'rounded', icon: 'StarRoundedSquare16' },\n { label: 'Square', value: 'square', icon: 'StarSquare16' },\n ],\n defaultValue: 'naked',\n hidden: links == null || links.links.length === 0,\n }\n }),\n size: ResponsiveIconRadioGroup(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n\n return {\n label: 'Size',\n options: [\n { label: 'Small', value: 'small', icon: 'SizeSmall16' },\n { label: 'Medium', value: 'medium', icon: 'SizeMedium16' },\n { label: 'Large', value: 'large', icon: 'SizeLarge16' },\n ],\n defaultValue: 'medium',\n hidden: links == null || links.links.length === 0,\n }\n }),\n hoverStyle: ResponsiveSelect(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n const hidden = links == null || links.links.length === 0\n\n return {\n label: 'On hover',\n options: [\n { value: 'none', label: 'None' },\n { value: 'grow', label: 'Grow' },\n { value: 'shrink', label: 'Shrink' },\n { value: 'fade', label: 'Fade' },\n ],\n defaultValue: 'none',\n labelOrientation: 'horizontal',\n hidden,\n }\n }),\n fill: ResponsiveColor(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n const hidden = links == null || links.links.length === 0\n\n return {\n label: 'Icon color',\n hidden,\n }\n }),\n backgroundColor: ResponsiveColor(props => {\n const links = getSocialLinksPropControllerDataSocialLinksData(\n props.links as SocialLinksPropControllerData | undefined,\n )\n const hidden = links == null || links.links.length === 0\n\n return {\n label: 'Shape color',\n hidden,\n }\n }),\n alignment: ResponsiveIconRadioGroup({\n label: 'Alignment',\n options: [\n { label: 'flex-start', value: 'flex-start', icon: 'AlignLeft16' },\n { label: 'center', value: 'center', icon: 'AlignCenter16' },\n { label: 'flex-end', value: 'flex-end', icon: 'AlignRight16' },\n ],\n defaultValue: 'center',\n }),\n gutter: GapX({\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 10, unit: 'px' },\n },\n ],\n label: 'Link gap',\n min: 0,\n max: 100,\n step: 1,\n defaultValue: { value: 0, unit: 'px' },\n }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({\n format: Margin.Format.ClassName,\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: {\n marginTop: { value: 10, unit: 'px' },\n marginRight: 'auto',\n marginBottom: { value: 10, unit: 'px' },\n marginLeft: 'auto',\n },\n },\n ],\n }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAkC;AAClC,uBAAuC;AACvC,6BAA8B;AAC9B,mBAAqB;AACrB,8BAWO;AAEA,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,eAAe,GAAC;AAAA,IAClC;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,WAAO,qCAAY;AAAA,UACjB,QAAQ;AAAA,YACN,OAAO;AAAA,cACL;AAAA,gBACE,IAAI;AAAA,gBACJ,SAAS,EAAE,MAAM,YAAY,KAAK,2BAA2B;AAAA,cAC/D;AAAA,cACA;AAAA,gBACE,IAAI;AAAA,gBACJ,SAAS,EAAE,MAAM,aAAa,KAAK,4BAA4B;AAAA,cACjE;AAAA,cACA;AAAA,gBACE,IAAI;AAAA,gBACJ,SAAS,EAAE,MAAM,WAAW,KAAK,0BAA0B;AAAA,cAC7D;AAAA,YACF;AAAA,YACA,cAAc;AAAA,UAChB;AAAA,QACF,CAAC;AAAA,QACD,WAAO,kDAAyB,WAAS;AACvC,gBAAM,Y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AQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO;AAAA,gBACL,WAAW,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,gBACnC,aAAa;AAAA,gBACb,cAAc,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,gBACtC,YAAY;AAAA,cACd;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -34,11 +34,11 @@ module.exports = __toCommonJS(register_exports);
34
34
  var import_constants = require("../constants");
35
35
  var import_controls = require("@makeswift/controls");
36
36
  var import_rich_text_v2 = require("../../../controls/rich-text-v2/rich-text-v2");
37
- var import_react2 = require("react");
37
+ var import_react = require("react");
38
38
  var import_prop_controllers = require("@makeswift/prop-controllers");
39
39
  function registerComponent(runtime) {
40
40
  return runtime.registerComponent(
41
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Text")))),
41
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Text")))),
42
42
  {
43
43
  type: import_constants.MakeswiftComponentType.Text,
44
44
  label: "Text",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Text/register.ts"],"sourcesContent":["import { type ReactRuntime } from '../../../runtimes/react'\nimport { MakeswiftComponentType } from '../constants'\nimport { getBaseBreakpoint } from '@makeswift/controls'\nimport { RichText } from '../../../controls/rich-text-v2/rich-text-v2'\nimport { lazy } from 'react'\nimport { ElementID, Margin, Width } from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Text')),\n {\n type: MakeswiftComponentType.Text,\n label: 'Text',\n props: {\n id: ElementID(),\n text: RichText(),\n width: Width({\n format: Width.Format.ClassName,\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 700, unit: 'px' },\n },\n ],\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({\n format: Margin.Format.ClassName,\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: {\n marginTop: null,\n marginRight: 'auto',\n marginBottom: { value: 20, unit: 'px' },\n marginLeft: 'auto',\n },\n },\n ],\n }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,sBAAkC;AAClC,0BAAyB;AACzB,IAAAA,gBAAqB;AACrB,8BAAyC;AAElC,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,UAAM,8BAAS;AAAA,QACf,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO,EAAE,OAAO,KAAK,MAAM,KAAK;AAAA,YAClC;AAAA,UACF;AAAA,UACA,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,QACxC,CAAC;AAAA,QACD,YAAQ,gCAAO;AAAA,UACb,QAAQ,+BAAO,OAAO;AAAA,UACtB,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO;AAAA,gBACL,WAAW;AAAA,gBACX,aAAa;AAAA,gBACb,cAAc,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,gBACtC,YAAY;AAAA,cACd;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Text/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport { getBaseBreakpoint } from '@makeswift/controls'\nimport { RichText } from '../../../controls/rich-text-v2/rich-text-v2'\nimport { lazy } from 'react'\nimport { ElementID, Margin, Width } from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Text')),\n {\n type: MakeswiftComponentType.Text,\n label: 'Text',\n props: {\n id: ElementID(),\n text: RichText(),\n width: Width({\n format: Width.Format.ClassName,\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: { value: 700, unit: 'px' },\n },\n ],\n defaultValue: { value: 100, unit: '%' },\n }),\n margin: Margin({\n format: Margin.Format.ClassName,\n preset: [\n {\n deviceId: getBaseBreakpoint(runtime.getBreakpoints()).id,\n value: {\n marginTop: null,\n marginRight: 'auto',\n marginBottom: { value: 20, unit: 'px' },\n marginLeft: 'auto',\n },\n },\n ],\n }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,sBAAkC;AAClC,0BAAyB;AACzB,mBAAqB;AACrB,8BAAyC;AAElC,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,QAAQ,GAAC;AAAA,IAC3B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,UAAM,8BAAS;AAAA,QACf,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO,EAAE,OAAO,KAAK,MAAM,KAAK;AAAA,YAClC;AAAA,UACF;AAAA,UACA,cAAc,EAAE,OAAO,KAAK,MAAM,IAAI;AAAA,QACxC,CAAC;AAAA,QACD,YAAQ,gCAAO;AAAA,UACb,QAAQ,+BAAO,OAAO;AAAA,UACtB,QAAQ;AAAA,YACN;AAAA,cACE,cAAU,mCAAkB,QAAQ,eAAe,CAAC,EAAE;AAAA,cACtD,OAAO;AAAA,gBACL,WAAW;AAAA,gBACX,aAAa;AAAA,gBACb,cAAc,EAAE,OAAO,IAAI,MAAM,KAAK;AAAA,gBACtC,YAAY;AAAA,cACd;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -33,11 +33,11 @@ __export(register_exports, {
33
33
  module.exports = __toCommonJS(register_exports);
34
34
  var import_constants = require("../constants");
35
35
  var import_components_meta = require("../../../state/modules/components-meta");
36
- var import_react2 = require("react");
36
+ var import_react = require("react");
37
37
  var import_prop_controllers = require("@makeswift/prop-controllers");
38
38
  function registerComponent(runtime) {
39
39
  return runtime.registerComponent(
40
- (0, import_react2.lazy)(() => Promise.resolve().then(() => __toESM(require("./Video")))),
40
+ (0, import_react.lazy)(() => Promise.resolve().then(() => __toESM(require("./Video")))),
41
41
  {
42
42
  type: import_constants.MakeswiftComponentType.Video,
43
43
  label: "Video",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/builtin/Video/register.ts"],"sourcesContent":["import { ReactRuntime } from '../../../runtimes/react'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport { BorderRadius, ElementID, Margin, Video, Width } from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntime) {\n return runtime.registerComponent(\n lazy(() => import('./Video')),\n {\n type: MakeswiftComponentType.Video,\n label: 'Video',\n icon: ComponentIcon.Video,\n props: {\n id: ElementID(),\n video: Video({ preset: { controls: true } }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 560, unit: 'px' },\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n borderRadius: BorderRadius({ format: BorderRadius.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,6BAA8B;AAC9B,IAAAA,gBAAqB;AACrB,8BAA8D;AAEvD,SAAS,kBAAkB,SAAuB;AACvD,SAAO,QAAQ;AAAA,QACb,oBAAK,MAAM,6CAAO,SAAS,GAAC;AAAA,IAC5B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,WAAO,+BAAM,EAAE,QAAQ,EAAE,UAAU,KAAK,EAAE,CAAC;AAAA,QAC3C,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,cAAc,EAAE,OAAO,KAAK,MAAM,KAAK;AAAA,QACzC,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,QAClD,kBAAc,sCAAa,EAAE,QAAQ,qCAAa,OAAO,UAAU,CAAC;AAAA,MACtE;AAAA,IACF;AAAA,EACF;AACF;","names":["import_react"]}
1
+ {"version":3,"sources":["../../../../../src/components/builtin/Video/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../../runtimes/react/react-runtime-core'\nimport { MakeswiftComponentType } from '../constants'\nimport { ComponentIcon } from '../../../state/modules/components-meta'\nimport { lazy } from 'react'\nimport { BorderRadius, ElementID, Margin, Video, Width } from '@makeswift/prop-controllers'\n\nexport function registerComponent(runtime: ReactRuntimeCore) {\n return runtime.registerComponent(\n lazy(() => import('./Video')),\n {\n type: MakeswiftComponentType.Video,\n label: 'Video',\n icon: ComponentIcon.Video,\n props: {\n id: ElementID(),\n video: Video({ preset: { controls: true } }),\n width: Width({\n format: Width.Format.ClassName,\n defaultValue: { value: 560, unit: 'px' },\n }),\n margin: Margin({ format: Margin.Format.ClassName }),\n borderRadius: BorderRadius({ format: BorderRadius.Format.ClassName }),\n },\n },\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAAuC;AACvC,6BAA8B;AAC9B,mBAAqB;AACrB,8BAA8D;AAEvD,SAAS,kBAAkB,SAA2B;AAC3D,SAAO,QAAQ;AAAA,QACb,mBAAK,MAAM,6CAAO,SAAS,GAAC;AAAA,IAC5B;AAAA,MACE,MAAM,wCAAuB;AAAA,MAC7B,OAAO;AAAA,MACP,MAAM,qCAAc;AAAA,MACpB,OAAO;AAAA,QACL,QAAI,mCAAU;AAAA,QACd,WAAO,+BAAM,EAAE,QAAQ,EAAE,UAAU,KAAK,EAAE,CAAC;AAAA,QAC3C,WAAO,+BAAM;AAAA,UACX,QAAQ,8BAAM,OAAO;AAAA,UACrB,cAAc,EAAE,OAAO,KAAK,MAAM,KAAK;AAAA,QACzC,CAAC;AAAA,QACD,YAAQ,gCAAO,EAAE,QAAQ,+BAAO,OAAO,UAAU,CAAC;AAAA,QAClD,kBAAc,sCAAa,EAAE,QAAQ,qCAAa,OAAO,UAAU,CAAC;AAAA,MACtE;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/builtin/register.ts"],"sourcesContent":["import { type ReactRuntime } from '../../runtimes/react'\nimport { registerComponent as registerBoxComponent } from './Box/register'\nimport { registerComponent as registerButtonComponent } from './Button/register'\nimport { registerComponent as registerCarouselComponent } from './Carousel/register'\nimport { registerComponent as registerCountdownComponent } from './Countdown/register'\nimport { registerComponent as registerDividerComponent } from './Divider/register'\nimport { registerComponent as registerEmbedComponent } from './Embed/register'\nimport { registerComponent as registerFormComponent } from './Form/register'\nimport { registerComponent as registerImageComponent } from './Image/register'\nimport { registerComponent as registerNavigationComponent } from './Navigation/register'\nimport { registerComponent as registerRootComponent } from './Root/register'\nimport { registerComponent as registerSlotComponent } from './Slot/register'\nimport { registerComponent as registerSocialLinksComponent } from './SocialLinks/register'\nimport { registerComponent as registerTextComponent } from './Text/register'\nimport { registerComponent as registerVideoComponent } from './Video/register'\n\nexport function registerBuiltinComponents(runtime: ReactRuntime) {\n const unregisterBoxComponent = registerBoxComponent(runtime)\n const unregisterButtonComponent = registerButtonComponent(runtime)\n const unregisterCarouselComponent = registerCarouselComponent(runtime)\n const unregisterCountdownComponent = registerCountdownComponent(runtime)\n const unregisterDividerComponent = registerDividerComponent(runtime)\n const unregisterEmbedComponent = registerEmbedComponent(runtime)\n const unregisterFormComponent = registerFormComponent(runtime)\n const unregisterImageComponent = registerImageComponent(runtime)\n const unregisterNavigationComponent = registerNavigationComponent(runtime)\n const unregisterRootComponent = registerRootComponent(runtime)\n const unregisterSlotComponent = registerSlotComponent(runtime)\n const unregisterSocialLinksComponent = registerSocialLinksComponent(runtime)\n const unregisterTextComponent = registerTextComponent(runtime)\n const unregisterVideoComponent = registerVideoComponent(runtime)\n\n return () => {\n unregisterBoxComponent()\n unregisterButtonComponent()\n unregisterCarouselComponent()\n unregisterCountdownComponent()\n unregisterDividerComponent()\n unregisterEmbedComponent()\n unregisterFormComponent()\n unregisterImageComponent()\n unregisterNavigationComponent()\n unregisterRootComponent()\n unregisterSlotComponent()\n unregisterSocialLinksComponent()\n unregisterTextComponent()\n unregisterVideoComponent()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA0D;AAC1D,IAAAA,mBAA6D;AAC7D,IAAAA,mBAA+D;AAC/D,IAAAA,mBAAgE;AAChE,IAAAA,mBAA8D;AAC9D,IAAAA,mBAA4D;AAC5D,IAAAA,mBAA2D;AAC3D,IAAAA,mBAA4D;AAC5D,IAAAA,mBAAiE;AACjE,IAAAA,oBAA2D;AAC3D,IAAAA,oBAA2D;AAC3D,IAAAA,oBAAkE;AAClE,IAAAA,oBAA2D;AAC3D,IAAAA,oBAA4D;AAErD,SAAS,0BAA0B,SAAuB;AAC/D,QAAM,6BAAyB,gBAAAC,mBAAqB,OAAO;AAC3D,QAAM,gCAA4B,iBAAAC,mBAAwB,OAAO;AACjE,QAAM,kCAA8B,iBAAAC,mBAA0B,OAAO;AACrE,QAAM,mCAA+B,iBAAAC,mBAA2B,OAAO;AACvE,QAAM,iCAA6B,iBAAAC,mBAAyB,OAAO;AACnE,QAAM,+BAA2B,iBAAAC,mBAAuB,OAAO;AAC/D,QAAM,8BAA0B,iBAAAC,mBAAsB,OAAO;AAC7D,QAAM,+BAA2B,iBAAAC,mBAAuB,OAAO;AAC/D,QAAM,oCAAgC,iBAAAC,mBAA4B,OAAO;AACzE,QAAM,8BAA0B,kBAAAC,mBAAsB,OAAO;AAC7D,QAAM,8BAA0B,kBAAAC,mBAAsB,OAAO;AAC7D,QAAM,qCAAiC,kBAAAC,mBAA6B,OAAO;AAC3E,QAAM,8BAA0B,kBAAAC,mBAAsB,OAAO;AAC7D,QAAM,+BAA2B,kBAAAC,mBAAuB,OAAO;AAE/D,SAAO,MAAM;AACX,2BAAuB;AACvB,8BAA0B;AAC1B,gCAA4B;AAC5B,iCAA6B;AAC7B,+BAA2B;AAC3B,6BAAyB;AACzB,4BAAwB;AACxB,6BAAyB;AACzB,kCAA8B;AAC9B,4BAAwB;AACxB,4BAAwB;AACxB,mCAA+B;AAC/B,4BAAwB;AACxB,6BAAyB;AAAA,EAC3B;AACF;","names":["import_register","registerBoxComponent","registerButtonComponent","registerCarouselComponent","registerCountdownComponent","registerDividerComponent","registerEmbedComponent","registerFormComponent","registerImageComponent","registerNavigationComponent","registerRootComponent","registerSlotComponent","registerSocialLinksComponent","registerTextComponent","registerVideoComponent"]}
1
+ {"version":3,"sources":["../../../../src/components/builtin/register.ts"],"sourcesContent":["import { type ReactRuntimeCore } from '../../runtimes/react/react-runtime-core'\nimport { registerComponent as registerBoxComponent } from './Box/register'\nimport { registerComponent as registerButtonComponent } from './Button/register'\nimport { registerComponent as registerCarouselComponent } from './Carousel/register'\nimport { registerComponent as registerCountdownComponent } from './Countdown/register'\nimport { registerComponent as registerDividerComponent } from './Divider/register'\nimport { registerComponent as registerEmbedComponent } from './Embed/register'\nimport { registerComponent as registerFormComponent } from './Form/register'\nimport { registerComponent as registerImageComponent } from './Image/register'\nimport { registerComponent as registerNavigationComponent } from './Navigation/register'\nimport { registerComponent as registerRootComponent } from './Root/register'\nimport { registerComponent as registerSlotComponent } from './Slot/register'\nimport { registerComponent as registerSocialLinksComponent } from './SocialLinks/register'\nimport { registerComponent as registerTextComponent } from './Text/register'\nimport { registerComponent as registerVideoComponent } from './Video/register'\n\nexport function registerBuiltinComponents(runtime: ReactRuntimeCore) {\n const unregisterBoxComponent = registerBoxComponent(runtime)\n const unregisterButtonComponent = registerButtonComponent(runtime)\n const unregisterCarouselComponent = registerCarouselComponent(runtime)\n const unregisterCountdownComponent = registerCountdownComponent(runtime)\n const unregisterDividerComponent = registerDividerComponent(runtime)\n const unregisterEmbedComponent = registerEmbedComponent(runtime)\n const unregisterFormComponent = registerFormComponent(runtime)\n const unregisterImageComponent = registerImageComponent(runtime)\n const unregisterNavigationComponent = registerNavigationComponent(runtime)\n const unregisterRootComponent = registerRootComponent(runtime)\n const unregisterSlotComponent = registerSlotComponent(runtime)\n const unregisterSocialLinksComponent = registerSocialLinksComponent(runtime)\n const unregisterTextComponent = registerTextComponent(runtime)\n const unregisterVideoComponent = registerVideoComponent(runtime)\n\n return () => {\n unregisterBoxComponent()\n unregisterButtonComponent()\n unregisterCarouselComponent()\n unregisterCountdownComponent()\n unregisterDividerComponent()\n unregisterEmbedComponent()\n unregisterFormComponent()\n unregisterImageComponent()\n unregisterNavigationComponent()\n unregisterRootComponent()\n unregisterSlotComponent()\n unregisterSocialLinksComponent()\n unregisterTextComponent()\n unregisterVideoComponent()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAA0D;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ownComponent","registerDividerComponent","registerEmbedComponent","registerFormComponent","registerImageComponent","registerNavigationComponent","registerRootComponent","registerSlotComponent","registerSocialLinksComponent","registerTextComponent","registerVideoComponent"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/index.ts"],"sourcesContent":["export {\n type Breakpoint,\n type BreakpointId,\n type Breakpoints,\n type ConfigType,\n type Data,\n type DataType,\n type DeviceOverride,\n type FallbackStrategy,\n type ValueType,\n type ResolvedValueType,\n type ResponsiveValue,\n type ControlMessage,\n type ReplacementContext,\n type SendMessageType,\n ControlDefinition,\n ControlInstance,\n DefaultControlInstance,\n ShapeV2Control,\n getBaseBreakpoint,\n getBreakpoint,\n findBreakpointOverride,\n findNextFallback,\n mergeOrCoalesceFallbacks,\n mergeResponsiveValues,\n shallowMergeFallbacks,\n getViewportStyle,\n replaceResourceIfNeeded,\n shouldRemoveResource,\n ContextResource,\n} from '@makeswift/controls'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBA8BO;","names":[]}
1
+ {"version":3,"sources":["../../../src/core/index.ts"],"sourcesContent":["export {\n type Breakpoint,\n type BreakpointId,\n type Breakpoints,\n type ConfigType,\n type Data,\n type DataType,\n type DeviceOverride,\n type FallbackStrategy,\n type ValueType,\n type ResolvedValueType,\n type ResponsiveValue,\n type ControlMessage,\n type ReplacementContext,\n type SendMessageType,\n type Element,\n ControlDefinition,\n ControlInstance,\n DefaultControlInstance,\n ShapeV2Control,\n getBaseBreakpoint,\n getBreakpoint,\n findBreakpointOverride,\n findNextFallback,\n mergeOrCoalesceFallbacks,\n mergeResponsiveValues,\n shallowMergeFallbacks,\n getViewportStyle,\n replaceResourceIfNeeded,\n shouldRemoveResource,\n ContextResource,\n} from '@makeswift/controls'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBA+BO;","names":[]}
package/dist/cjs/index.js CHANGED
@@ -18,51 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var src_exports = {};
20
20
  __export(src_exports, {
21
- ActionTypes: () => import_actions.ActionTypes,
22
- ComponentIcon: () => import_components_meta.ComponentIcon,
23
- MakeswiftComponentType: () => import_constants.MakeswiftComponentType,
24
- builderPointerMove: () => import_actions.builderPointerMove,
25
- changeApiResource: () => import_actions.changeApiResource,
26
- changeDocument: () => import_actions.changeDocument,
27
- changeDocumentElementScrollTop: () => import_actions.changeDocumentElementScrollTop,
28
- cleanUp: () => import_actions.cleanUp,
29
- createBaseDocument: () => import_react_page.createBaseDocument,
30
- evictApiResource: () => import_actions.evictApiResource,
31
- init: () => import_actions.init,
32
- messageHostPropController: () => import_actions.messageHostPropController,
33
- registerDocument: () => import_actions.registerDocument,
34
- scrollDocumentElement: () => import_actions.scrollDocumentElement,
35
- setBreakpoints: () => import_actions.setBreakpoints,
36
- setBuilderEditMode: () => import_actions.setBuilderEditMode,
37
- setLocale: () => import_actions.setLocale,
38
- setLocalizedResourceId: () => import_actions.setLocalizedResourceId,
39
- unregisterDocument: () => import_actions.unregisterDocument
21
+ ComponentIcon: () => import_components_meta.ComponentIcon
40
22
  });
41
23
  module.exports = __toCommonJS(src_exports);
42
- var import_actions = require("./state/actions");
43
24
  var import_components_meta = require("./state/modules/components-meta");
44
- var import_react_page = require("./state/react-page");
45
- var import_constants = require("./components/builtin/constants");
46
25
  // Annotate the CommonJS export names for ESM import in node:
47
26
  0 && (module.exports = {
48
- ActionTypes,
49
- ComponentIcon,
50
- MakeswiftComponentType,
51
- builderPointerMove,
52
- changeApiResource,
53
- changeDocument,
54
- changeDocumentElementScrollTop,
55
- cleanUp,
56
- createBaseDocument,
57
- evictApiResource,
58
- init,
59
- messageHostPropController,
60
- registerDocument,
61
- scrollDocumentElement,
62
- setBreakpoints,
63
- setBuilderEditMode,
64
- setLocale,
65
- setLocalizedResourceId,
66
- unregisterDocument
27
+ ComponentIcon
67
28
  });
68
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export type { Action, SetBreakpointsAction } from './state/actions'\nexport {\n ActionTypes,\n changeDocument,\n changeDocumentElementScrollTop,\n cleanUp,\n init,\n messageHostPropController,\n changeApiResource,\n evictApiResource,\n registerDocument,\n scrollDocumentElement,\n unregisterDocument,\n setBuilderEditMode,\n builderPointerMove,\n setBreakpoints,\n setLocale,\n setLocalizedResourceId,\n} from './state/actions'\nexport type { Operation } from './state/modules/read-write-documents'\nexport type { ComponentMeta } from './state/modules/components-meta'\nexport { ComponentIcon } from './state/modules/components-meta'\nexport type {\n PropControllerDescriptor,\n PropControllerDescriptorValueType,\n} from './prop-controllers'\nexport type { Element } from './state/react-page'\nexport { createBaseDocument } from './state/react-page'\nexport { MakeswiftComponentType } from './components/builtin/constants'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qBAiBO;AAGP,6BAA8B;AAM9B,wBAAmC;AACnC,uBAAuC;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export type { ComponentMeta } from './state/modules/components-meta'\nexport { ComponentIcon } from './state/modules/components-meta'\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,6BAA8B;","names":[]}
@@ -22,7 +22,7 @@ __export(box_component_exports, {
22
22
  imageBackgroundData: () => imageBackgroundData
23
23
  });
24
24
  module.exports = __toCommonJS(box_component_exports);
25
- var import_components = require("../../../../../components");
25
+ var import_constants = require("../../../../../components/builtin/constants");
26
26
  const boxComponentData = ({
27
27
  htmlId,
28
28
  backgrounds = []
@@ -99,7 +99,7 @@ const boxComponentData = ({
99
99
  ]
100
100
  }
101
101
  },
102
- type: import_components.MakeswiftComponentType.Box
102
+ type: import_constants.MakeswiftComponentType.Box
103
103
  });
104
104
  const imageBackgroundData = (imageId) => ({
105
105
  id: "d710554f-3b2a-4dc5-8785-44224d09e579",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/next/components/tests/__fixtures__/element-data/box-component.ts"],"sourcesContent":["import { type ElementData } from '@makeswift/controls'\nimport { type BackgroundData } from '@makeswift/prop-controllers'\n\nimport { MakeswiftComponentType } from '../../../../../components'\n\nexport const boxComponentData = ({\n htmlId,\n backgrounds = [],\n}: {\n htmlId: string\n backgrounds: BackgroundData[]\n}): ElementData => ({\n key: 'a87eab9c-1c2b-462e-8f79-e836dd836271',\n props: {\n backgrounds: {\n '@@makeswift/type': 'prop-controllers::backgrounds::v2',\n value: [\n {\n deviceId: 'desktop',\n value: backgrounds,\n },\n ],\n },\n id: {\n '@@makeswift/type': 'prop-controllers::element-id::v1',\n value: htmlId,\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 60,\n },\n marginTop: {\n unit: 'px',\n value: 40,\n },\n },\n },\n ],\n },\n padding: {\n '@@makeswift/type': 'prop-controllers::padding::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 470,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n width: {\n '@@makeswift/type': 'prop-controllers::width::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 1160,\n },\n },\n ],\n },\n },\n type: MakeswiftComponentType.Box,\n})\n\nexport const imageBackgroundData = (imageId: string): BackgroundData => ({\n id: 'd710554f-3b2a-4dc5-8785-44224d09e579',\n payload: {\n imageId,\n opacity: 0.9,\n parallax: 0,\n position: {\n x: 0,\n y: 0,\n },\n priority: true,\n size: 'contain',\n },\n type: 'image',\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuC;AAEhC,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA,cAAc,CAAC;AACjB,OAGoB;AAAA,EAClB,KAAK;AAAA,EACL,OAAO;AAAA,IACL,aAAa;AAAA,MACX,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,IACA,IAAI;AAAA,MACF,oBAAoB;AAAA,MACpB,OAAO;AAAA,IACT;AAAA,IACA,QAAQ;AAAA,MACN,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,WAAW;AAAA,cACT,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,eAAe;AAAA,cACb,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,aAAa;AAAA,cACX,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,MAAM;AAAA,YACN,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM,yCAAuB;AAC/B;AAEO,MAAM,sBAAsB,CAAC,aAAqC;AAAA,EACvE,IAAI;AAAA,EACJ,SAAS;AAAA,IACP;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,MACR,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AACR;","names":[]}
1
+ {"version":3,"sources":["../../../../../../../src/next/components/tests/__fixtures__/element-data/box-component.ts"],"sourcesContent":["import { type ElementData } from '@makeswift/controls'\nimport { type BackgroundData } from '@makeswift/prop-controllers'\n\nimport { MakeswiftComponentType } from '../../../../../components/builtin/constants'\n\nexport const boxComponentData = ({\n htmlId,\n backgrounds = [],\n}: {\n htmlId: string\n backgrounds: BackgroundData[]\n}): ElementData => ({\n key: 'a87eab9c-1c2b-462e-8f79-e836dd836271',\n props: {\n backgrounds: {\n '@@makeswift/type': 'prop-controllers::backgrounds::v2',\n value: [\n {\n deviceId: 'desktop',\n value: backgrounds,\n },\n ],\n },\n id: {\n '@@makeswift/type': 'prop-controllers::element-id::v1',\n value: htmlId,\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 60,\n },\n marginTop: {\n unit: 'px',\n value: 40,\n },\n },\n },\n ],\n },\n padding: {\n '@@makeswift/type': 'prop-controllers::padding::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 470,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n width: {\n '@@makeswift/type': 'prop-controllers::width::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 1160,\n },\n },\n ],\n },\n },\n type: MakeswiftComponentType.Box,\n})\n\nexport const imageBackgroundData = (imageId: string): BackgroundData => ({\n id: 'd710554f-3b2a-4dc5-8785-44224d09e579',\n payload: {\n imageId,\n opacity: 0.9,\n parallax: 0,\n position: {\n x: 0,\n y: 0,\n },\n priority: true,\n size: 'contain',\n },\n type: 'image',\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAuC;AAEhC,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA,cAAc,CAAC;AACjB,OAGoB;AAAA,EAClB,KAAK;AAAA,EACL,OAAO;AAAA,IACL,aAAa;AAAA,MACX,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,IACA,IAAI;AAAA,MACF,oBAAoB;AAAA,MACpB,OAAO;AAAA,IACT;AAAA,IACA,QAAQ;AAAA,MACN,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,WAAW;AAAA,cACT,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,eAAe;AAAA,cACb,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,aAAa;AAAA,cACX,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,MAAM;AAAA,YACN,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM,wCAAuB;AAC/B;AAEO,MAAM,sBAAsB,CAAC,aAAqC;AAAA,EACvE,IAAI;AAAA,EACJ,SAAS;AAAA,IACP;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,MACR,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AACR;","names":[]}
@@ -23,7 +23,7 @@ __export(button_component_exports, {
23
23
  linkUrlData: () => linkUrlData
24
24
  });
25
25
  module.exports = __toCommonJS(button_component_exports);
26
- var import_components = require("../../../../../components");
26
+ var import_constants = require("../../../../../components/builtin/constants");
27
27
  const buttonComponentData = ({
28
28
  htmlId,
29
29
  linkData: linkData2
@@ -57,7 +57,7 @@ const buttonComponentData = ({
57
57
  ]
58
58
  }
59
59
  },
60
- type: import_components.MakeswiftComponentType.Button
60
+ type: import_constants.MakeswiftComponentType.Button
61
61
  });
62
62
  const linkUrlData = (url = "https://www.makeswift.com/") => ({
63
63
  payload: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/next/components/tests/__fixtures__/element-data/button-component.ts"],"sourcesContent":["import { type ElementData } from '@makeswift/controls'\nimport { LinkData } from '@makeswift/prop-controllers'\n\nimport { MakeswiftComponentType } from '../../../../../components'\n\nexport const buttonComponentData = ({\n htmlId,\n linkData,\n}: {\n htmlId: string\n linkData: LinkData\n}): ElementData => ({\n key: '3dda7ade-3dcb-4776-a2f5-2f7e04e34ec2',\n props: {\n id: {\n '@@makeswift/type': 'prop-controllers::element-id::v1',\n value: htmlId,\n },\n link: {\n '@@makeswift/type': 'prop-controllers::link::v1',\n value: linkData,\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 80,\n },\n marginTop: {\n unit: 'px',\n value: 60,\n },\n },\n },\n ],\n },\n },\n type: MakeswiftComponentType.Button,\n})\n\nexport const linkUrlData = (url: string = 'https://www.makeswift.com/'): LinkData => ({\n payload: {\n openInNewTab: false,\n url,\n },\n type: 'OPEN_URL',\n})\n\nexport const linkData: Record<string, LinkData> = {\n page: {\n payload: {\n openInNewTab: false,\n pageId: 'UGFnZTozOWZkNDcyZS03N2QxLTRjZDItOGE3Yi02ZTQ2MDU3ODgxNzM=',\n },\n type: 'OPEN_PAGE',\n },\n url: linkUrlData(),\n email: {\n payload: {\n body: '',\n subject: 'Buttons',\n to: 'alan@makeswift.com',\n },\n type: 'SEND_EMAIL',\n },\n phone: {\n payload: {\n phoneNumber: '15551234567',\n },\n type: 'CALL_PHONE',\n },\n element: {\n payload: {\n block: 'start',\n elementIdConfig: {\n elementKey: '3dda7ade-3dcb-4776-a2f5-2f7e04e34ec2',\n propName: 'id',\n },\n },\n type: 'SCROLL_TO_ELEMENT',\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuC;AAEhC,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA,UAAAA;AACF,OAGoB;AAAA,EAClB,KAAK;AAAA,EACL,OAAO;AAAA,IACL,IAAI;AAAA,MACF,oBAAoB;AAAA,MACpB,OAAO;AAAA,IACT;AAAA,IACA,MAAM;AAAA,MACJ,oBAAoB;AAAA,MACpB,OAAOA;AAAA,IACT;AAAA,IACA,QAAQ;AAAA,MACN,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,WAAW;AAAA,cACT,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM,yCAAuB;AAC/B;AAEO,MAAM,cAAc,CAAC,MAAc,kCAA4C;AAAA,EACpF,SAAS;AAAA,IACP,cAAc;AAAA,IACd;AAAA,EACF;AAAA,EACA,MAAM;AACR;AAEO,MAAM,WAAqC;AAAA,EAChD,MAAM;AAAA,IACJ,SAAS;AAAA,MACP,cAAc;AAAA,MACd,QAAQ;AAAA,IACV;AAAA,IACA,MAAM;AAAA,EACR;AAAA,EACA,KAAK,YAAY;AAAA,EACjB,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,IAAI;AAAA,IACN;AAAA,IACA,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,SAAS;AAAA,MACP,aAAa;AAAA,IACf;AAAA,IACA,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,MACP,OAAO;AAAA,MACP,iBAAiB;AAAA,QACf,YAAY;AAAA,QACZ,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,MAAM;AAAA,EACR;AACF;","names":["linkData"]}
1
+ {"version":3,"sources":["../../../../../../../src/next/components/tests/__fixtures__/element-data/button-component.ts"],"sourcesContent":["import { type ElementData } from '@makeswift/controls'\nimport { LinkData } from '@makeswift/prop-controllers'\n\nimport { MakeswiftComponentType } from '../../../../../components/builtin/constants'\n\nexport const buttonComponentData = ({\n htmlId,\n linkData,\n}: {\n htmlId: string\n linkData: LinkData\n}): ElementData => ({\n key: '3dda7ade-3dcb-4776-a2f5-2f7e04e34ec2',\n props: {\n id: {\n '@@makeswift/type': 'prop-controllers::element-id::v1',\n value: htmlId,\n },\n link: {\n '@@makeswift/type': 'prop-controllers::link::v1',\n value: linkData,\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 80,\n },\n marginTop: {\n unit: 'px',\n value: 60,\n },\n },\n },\n ],\n },\n },\n type: MakeswiftComponentType.Button,\n})\n\nexport const linkUrlData = (url: string = 'https://www.makeswift.com/'): LinkData => ({\n payload: {\n openInNewTab: false,\n url,\n },\n type: 'OPEN_URL',\n})\n\nexport const linkData: Record<string, LinkData> = {\n page: {\n payload: {\n openInNewTab: false,\n pageId: 'UGFnZTozOWZkNDcyZS03N2QxLTRjZDItOGE3Yi02ZTQ2MDU3ODgxNzM=',\n },\n type: 'OPEN_PAGE',\n },\n url: linkUrlData(),\n email: {\n payload: {\n body: '',\n subject: 'Buttons',\n to: 'alan@makeswift.com',\n },\n type: 'SEND_EMAIL',\n },\n phone: {\n payload: {\n phoneNumber: '15551234567',\n },\n type: 'CALL_PHONE',\n },\n element: {\n payload: {\n block: 'start',\n elementIdConfig: {\n elementKey: '3dda7ade-3dcb-4776-a2f5-2f7e04e34ec2',\n propName: 'id',\n },\n },\n type: 'SCROLL_TO_ELEMENT',\n },\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAuC;AAEhC,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA,UAAAA;AACF,OAGoB;AAAA,EAClB,KAAK;AAAA,EACL,OAAO;AAAA,IACL,IAAI;AAAA,MACF,oBAAoB;AAAA,MACpB,OAAO;AAAA,IACT;AAAA,IACA,MAAM;AAAA,MACJ,oBAAoB;AAAA,M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