@delmaredigital/payload-puck 0.6.12 → 0.6.14

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 (697) hide show
  1. package/README.md +50 -1
  2. package/dist/admin/EditWithPuckButton.d.ts +1 -2
  3. package/dist/admin/EditWithPuckButton.js +64 -26
  4. package/dist/admin/EditWithPuckCell.d.ts +0 -1
  5. package/dist/admin/EditWithPuckCell.js +42 -14
  6. package/dist/admin/PuckEditorView.d.ts +1 -2
  7. package/dist/admin/PuckEditorView.js +117 -33
  8. package/dist/admin/client.d.ts +2 -3
  9. package/dist/admin/client.js +3 -5
  10. package/dist/admin/generateAdminComponents.d.ts +0 -1
  11. package/dist/admin/generateAdminComponents.js +6 -8
  12. package/dist/admin/index.d.ts +5 -6
  13. package/dist/admin/index.js +2 -3
  14. package/dist/ai/collections/AiContext.d.ts +0 -1
  15. package/dist/ai/collections/AiContext.js +55 -30
  16. package/dist/ai/collections/AiPrompts.d.ts +0 -1
  17. package/dist/ai/collections/AiPrompts.js +23 -20
  18. package/dist/ai/createAiApiRoutes.d.ts +0 -1
  19. package/dist/ai/createAiApiRoutes.js +27 -20
  20. package/dist/ai/createAiGenerate.d.ts +0 -1
  21. package/dist/ai/createAiGenerate.js +6 -9
  22. package/dist/ai/createAiPlugin.d.ts +0 -1
  23. package/dist/ai/createAiPlugin.js +6 -10
  24. package/dist/ai/hooks/useAiContext.d.ts +0 -1
  25. package/dist/ai/hooks/useAiContext.js +49 -40
  26. package/dist/ai/hooks/useAiPrompts.d.ts +0 -1
  27. package/dist/ai/hooks/useAiPrompts.js +32 -26
  28. package/dist/ai/index.d.ts +0 -1
  29. package/dist/ai/index.js +8 -11
  30. package/dist/ai/plugins/ContextEditorPanel.d.ts +1 -2
  31. package/dist/ai/plugins/ContextEditorPanel.js +398 -108
  32. package/dist/ai/plugins/PromptEditorPanel.d.ts +1 -2
  33. package/dist/ai/plugins/PromptEditorPanel.js +236 -52
  34. package/dist/ai/plugins/contextEditorPlugin.d.ts +0 -1
  35. package/dist/ai/plugins/contextEditorPlugin.js +11 -6
  36. package/dist/ai/plugins/promptApiRoutes.d.ts +0 -1
  37. package/dist/ai/plugins/promptApiRoutes.js +118 -51
  38. package/dist/ai/plugins/promptEditorPlugin.d.ts +0 -1
  39. package/dist/ai/plugins/promptEditorPlugin.js +11 -6
  40. package/dist/ai/presets/componentAiDefaults.d.ts +0 -1
  41. package/dist/ai/presets/componentAiDefaults.js +107 -84
  42. package/dist/ai/presets/index.d.ts +0 -1
  43. package/dist/ai/presets/index.js +11 -19
  44. package/dist/ai/presets/instructions/interactive.d.ts +0 -1
  45. package/dist/ai/presets/instructions/interactive.js +84 -76
  46. package/dist/ai/presets/instructions/layout.d.ts +0 -1
  47. package/dist/ai/presets/instructions/layout.js +121 -118
  48. package/dist/ai/presets/instructions/media.d.ts +0 -1
  49. package/dist/ai/presets/instructions/media.js +30 -30
  50. package/dist/ai/presets/instructions/pagePatterns.d.ts +0 -1
  51. package/dist/ai/presets/instructions/pagePatterns.js +3 -7
  52. package/dist/ai/presets/instructions/schemas.d.ts +0 -1
  53. package/dist/ai/presets/instructions/schemas.js +494 -138
  54. package/dist/ai/presets/instructions/typography.d.ts +0 -1
  55. package/dist/ai/presets/instructions/typography.js +37 -34
  56. package/dist/ai/tools/index.d.ts +0 -1
  57. package/dist/ai/tools/index.js +91 -56
  58. package/dist/ai/types.d.ts +0 -1
  59. package/dist/ai/types.js +6 -2
  60. package/dist/ai/utils/injectAiConfig.d.ts +0 -1
  61. package/dist/ai/utils/injectAiConfig.js +32 -41
  62. package/dist/api/createPuckApiRoutes.d.ts +1 -2
  63. package/dist/api/createPuckApiRoutes.js +122 -66
  64. package/dist/api/createPuckApiRoutesVersions.d.ts +1 -2
  65. package/dist/api/createPuckApiRoutesVersions.js +87 -38
  66. package/dist/api/createPuckApiRoutesWithId.d.ts +1 -2
  67. package/dist/api/createPuckApiRoutesWithId.js +165 -73
  68. package/dist/api/index.d.ts +5 -6
  69. package/dist/api/index.js +5 -7
  70. package/dist/api/payload-config.d.js +14 -0
  71. package/dist/api/types.d.ts +0 -1
  72. package/dist/api/types.js +3 -2
  73. package/dist/api/utils/mapRootProps.d.ts +1 -2
  74. package/dist/api/utils/mapRootProps.js +76 -45
  75. package/dist/collections/Templates.d.ts +0 -1
  76. package/dist/collections/Templates.js +23 -21
  77. package/dist/components/AccordionClient.d.ts +2 -3
  78. package/dist/components/AccordionClient.js +80 -23
  79. package/dist/components/AnimatedWrapper.d.ts +2 -3
  80. package/dist/components/AnimatedWrapper.js +30 -17
  81. package/dist/components/exports.d.ts +0 -1
  82. package/dist/components/exports.js +1 -3
  83. package/dist/components/index.d.ts +5 -6
  84. package/dist/components/index.js +6 -8
  85. package/dist/components/interactive/Accordion.d.ts +1 -2
  86. package/dist/components/interactive/Accordion.js +148 -56
  87. package/dist/components/interactive/Accordion.server.d.ts +1 -2
  88. package/dist/components/interactive/Accordion.server.js +24 -8
  89. package/dist/components/interactive/Button.d.ts +3 -4
  90. package/dist/components/interactive/Button.js +88 -44
  91. package/dist/components/interactive/Button.server.d.ts +2 -3
  92. package/dist/components/interactive/Button.server.js +39 -21
  93. package/dist/components/interactive/Card.d.ts +3 -4
  94. package/dist/components/interactive/Card.js +130 -40
  95. package/dist/components/interactive/Card.server.d.ts +3 -4
  96. package/dist/components/interactive/Card.server.js +71 -12
  97. package/dist/components/interactive/Divider.d.ts +1 -2
  98. package/dist/components/interactive/Divider.js +53 -27
  99. package/dist/components/interactive/Divider.server.d.ts +1 -2
  100. package/dist/components/interactive/Divider.server.js +27 -13
  101. package/dist/components/interactive/index.d.ts +4 -5
  102. package/dist/components/interactive/index.js +4 -6
  103. package/dist/components/layout/Container.d.ts +1 -2
  104. package/dist/components/layout/Container.js +100 -48
  105. package/dist/components/layout/Container.server.d.ts +1 -2
  106. package/dist/components/layout/Container.server.js +66 -20
  107. package/dist/components/layout/Flex.d.ts +2 -3
  108. package/dist/components/layout/Flex.js +123 -56
  109. package/dist/components/layout/Flex.server.d.ts +1 -2
  110. package/dist/components/layout/Flex.server.js +49 -15
  111. package/dist/components/layout/Grid.d.ts +1 -2
  112. package/dist/components/layout/Grid.js +92 -45
  113. package/dist/components/layout/Grid.server.d.ts +1 -2
  114. package/dist/components/layout/Grid.server.js +55 -15
  115. package/dist/components/layout/Section.d.ts +1 -2
  116. package/dist/components/layout/Section.js +146 -65
  117. package/dist/components/layout/Section.server.d.ts +1 -2
  118. package/dist/components/layout/Section.server.js +91 -29
  119. package/dist/components/layout/Spacer.d.ts +1 -2
  120. package/dist/components/layout/Spacer.js +79 -31
  121. package/dist/components/layout/Spacer.server.d.ts +1 -2
  122. package/dist/components/layout/Spacer.server.js +30 -10
  123. package/dist/components/layout/Template.d.ts +1 -2
  124. package/dist/components/layout/Template.js +57 -31
  125. package/dist/components/layout/Template.server.d.ts +1 -2
  126. package/dist/components/layout/Template.server.js +42 -12
  127. package/dist/components/layout/index.d.ts +8 -9
  128. package/dist/components/layout/index.js +7 -9
  129. package/dist/components/media/Image.d.ts +3 -4
  130. package/dist/components/media/Image.js +121 -40
  131. package/dist/components/media/Image.server.d.ts +3 -4
  132. package/dist/components/media/Image.server.js +75 -14
  133. package/dist/components/media/index.d.ts +1 -2
  134. package/dist/components/media/index.js +1 -3
  135. package/dist/components/typography/Heading.d.ts +2 -3
  136. package/dist/components/typography/Heading.js +44 -26
  137. package/dist/components/typography/Heading.server.d.ts +2 -3
  138. package/dist/components/typography/Heading.server.js +15 -11
  139. package/dist/components/typography/RichText.editor.d.ts +1 -2
  140. package/dist/components/typography/RichText.editor.js +43 -20
  141. package/dist/components/typography/RichText.server.d.ts +2 -3
  142. package/dist/components/typography/RichText.server.js +32 -15
  143. package/dist/components/typography/Text.d.ts +2 -3
  144. package/dist/components/typography/Text.js +48 -24
  145. package/dist/components/typography/Text.server.d.ts +2 -3
  146. package/dist/components/typography/Text.server.js +20 -9
  147. package/dist/components/typography/index.d.ts +4 -5
  148. package/dist/components/typography/index.js +4 -6
  149. package/dist/config/config.editor.d.ts +3 -4
  150. package/dist/config/config.editor.js +118 -55
  151. package/dist/config/index.d.ts +4 -5
  152. package/dist/config/index.js +61 -36
  153. package/dist/config/merge.d.ts +1 -2
  154. package/dist/config/merge.js +22 -27
  155. package/dist/config/presets.d.ts +4 -5
  156. package/dist/config/presets.js +194 -76
  157. package/dist/config/types.d.ts +0 -1
  158. package/dist/config/types.js +5 -3
  159. package/dist/editor/PuckEditor.d.ts +4 -5
  160. package/dist/editor/PuckEditor.js +161 -71
  161. package/dist/editor/PuckEditorImpl.client.d.ts +4 -5
  162. package/dist/editor/PuckEditorImpl.client.js +303 -153
  163. package/dist/editor/components/DarkModeStyles.d.ts +0 -1
  164. package/dist/editor/components/DarkModeStyles.js +10 -13
  165. package/dist/editor/components/HeaderActions.d.ts +0 -1
  166. package/dist/editor/components/HeaderActions.js +307 -65
  167. package/dist/editor/components/IframeWrapper.d.ts +1 -2
  168. package/dist/editor/components/IframeWrapper.js +81 -59
  169. package/dist/editor/components/LoadingState.d.ts +1 -2
  170. package/dist/editor/components/LoadingState.js +16 -4
  171. package/dist/editor/components/PreviewModal.d.ts +0 -1
  172. package/dist/editor/components/PreviewModal.js +233 -79
  173. package/dist/editor/components/PreviewModeToggle.d.ts +0 -1
  174. package/dist/editor/components/PreviewModeToggle.js +42 -16
  175. package/dist/editor/components/VersionHistory.d.ts +0 -1
  176. package/dist/editor/components/VersionHistory.js +218 -72
  177. package/dist/editor/hooks/useDarkMode.d.ts +0 -1
  178. package/dist/editor/hooks/useDarkMode.js +35 -24
  179. package/dist/editor/hooks/useUnsavedChanges.d.ts +0 -1
  180. package/dist/editor/hooks/useUnsavedChanges.js +7 -9
  181. package/dist/editor/index.d.ts +0 -1
  182. package/dist/editor/index.js +4 -7
  183. package/dist/editor/plugins/VersionHistoryPanel.d.ts +0 -1
  184. package/dist/editor/plugins/VersionHistoryPanel.js +235 -76
  185. package/dist/editor/plugins/index.d.ts +0 -1
  186. package/dist/editor/plugins/index.js +3 -5
  187. package/dist/editor/plugins/versionHistoryPlugin.d.ts +0 -1
  188. package/dist/editor/plugins/versionHistoryPlugin.js +9 -9
  189. package/dist/editor/utils/detectPageTree.d.ts +0 -1
  190. package/dist/editor/utils/detectPageTree.js +4 -6
  191. package/dist/editor/utils/index.d.ts +0 -1
  192. package/dist/editor/utils/index.js +0 -1
  193. package/dist/editor/utils/injectPageTreeFields.d.ts +0 -1
  194. package/dist/editor/utils/injectPageTreeFields.js +12 -10
  195. package/dist/endpoints/ai.d.ts +0 -1
  196. package/dist/endpoints/ai.js +57 -35
  197. package/dist/endpoints/context.d.ts +0 -1
  198. package/dist/endpoints/context.js +85 -41
  199. package/dist/endpoints/index.d.ts +0 -1
  200. package/dist/endpoints/index.js +152 -77
  201. package/dist/endpoints/postcss.d.js +4 -0
  202. package/dist/endpoints/prompts.d.ts +0 -1
  203. package/dist/endpoints/prompts.js +80 -40
  204. package/dist/endpoints/styles.d.ts +0 -1
  205. package/dist/endpoints/styles.js +33 -37
  206. package/dist/exports/client.d.ts +0 -1
  207. package/dist/exports/client.js +1 -3
  208. package/dist/exports/rsc.d.ts +0 -1
  209. package/dist/exports/rsc.js +1 -3
  210. package/dist/fields/AlignmentField.d.ts +1 -2
  211. package/dist/fields/AlignmentField.js +92 -31
  212. package/dist/fields/AnimationField.d.ts +2 -3
  213. package/dist/fields/AnimationField.js +557 -85
  214. package/dist/fields/BackgroundField.d.ts +2 -3
  215. package/dist/fields/BackgroundField.js +753 -121
  216. package/dist/fields/BorderField.d.ts +2 -3
  217. package/dist/fields/BorderField.js +274 -74
  218. package/dist/fields/ColorPickerField.d.ts +2 -3
  219. package/dist/fields/ColorPickerField.js +209 -69
  220. package/dist/fields/ContentAlignmentField.d.ts +1 -2
  221. package/dist/fields/ContentAlignmentField.js +160 -76
  222. package/dist/fields/DimensionsField.d.ts +2 -3
  223. package/dist/fields/DimensionsField.js +574 -147
  224. package/dist/fields/FlexAlignmentField.d.ts +2 -3
  225. package/dist/fields/FlexAlignmentField.js +188 -52
  226. package/dist/fields/FolderPickerField.d.ts +8 -2
  227. package/dist/fields/FolderPickerField.js +287 -76
  228. package/dist/fields/GradientEditor.d.ts +2 -3
  229. package/dist/fields/GradientEditor.js +461 -87
  230. package/dist/fields/LockedField.d.ts +15 -3
  231. package/dist/fields/LockedField.js +179 -50
  232. package/dist/fields/MarginField.d.ts +2 -3
  233. package/dist/fields/MarginField.js +143 -47
  234. package/dist/fields/MediaField.d.ts +1 -2
  235. package/dist/fields/MediaField.js +687 -187
  236. package/dist/fields/PaddingField.d.ts +2 -3
  237. package/dist/fields/PaddingField.js +143 -47
  238. package/dist/fields/PageSegmentField.d.ts +15 -3
  239. package/dist/fields/PageSegmentField.js +155 -55
  240. package/dist/fields/ResetField.d.ts +1 -2
  241. package/dist/fields/ResetField.js +58 -32
  242. package/dist/fields/ResponsiveField.d.ts +1 -2
  243. package/dist/fields/ResponsiveField.js +232 -91
  244. package/dist/fields/ResponsiveVisibilityField.d.ts +2 -3
  245. package/dist/fields/ResponsiveVisibilityField.js +118 -37
  246. package/dist/fields/SizeField.d.ts +3 -4
  247. package/dist/fields/SizeField.js +225 -53
  248. package/dist/fields/SlugPreviewField.d.ts +8 -2
  249. package/dist/fields/SlugPreviewField.js +64 -17
  250. package/dist/fields/TemplateField.d.ts +1 -2
  251. package/dist/fields/TemplateField.js +361 -121
  252. package/dist/fields/TransformField.d.ts +2 -3
  253. package/dist/fields/TransformField.js +516 -82
  254. package/dist/fields/VerticalAlignmentField.d.ts +1 -2
  255. package/dist/fields/VerticalAlignmentField.js +92 -31
  256. package/dist/fields/WidthField.d.ts +2 -3
  257. package/dist/fields/WidthField.js +277 -82
  258. package/dist/fields/index.d.ts +41 -42
  259. package/dist/fields/index.js +36 -44
  260. package/dist/fields/richtext/controls/ColorPickerControl.d.ts +13 -3
  261. package/dist/fields/richtext/controls/ColorPickerControl.js +211 -48
  262. package/dist/fields/richtext/controls/DropdownPortal.d.ts +2 -3
  263. package/dist/fields/richtext/controls/DropdownPortal.js +35 -5
  264. package/dist/fields/richtext/controls/FontSizeControl.d.ts +9 -2
  265. package/dist/fields/richtext/controls/FontSizeControl.js +108 -25
  266. package/dist/fields/richtext/controls/HighlightControl.d.ts +12 -2
  267. package/dist/fields/richtext/controls/HighlightControl.js +53 -18
  268. package/dist/fields/richtext/controls/index.d.ts +5 -6
  269. package/dist/fields/richtext/controls/index.js +7 -12
  270. package/dist/fields/richtext/controls/shared.d.ts +0 -1
  271. package/dist/fields/richtext/controls/shared.js +107 -64
  272. package/dist/fields/richtext/createRichTextField.d.ts +18 -5
  273. package/dist/fields/richtext/createRichTextField.js +112 -27
  274. package/dist/fields/richtext/extensions/FontSize.d.ts +0 -1
  275. package/dist/fields/richtext/extensions/FontSize.js +25 -21
  276. package/dist/fields/richtext/extensions/index.d.ts +1 -2
  277. package/dist/fields/richtext/extensions/index.js +1 -3
  278. package/dist/fields/richtext/index.d.ts +6 -7
  279. package/dist/fields/richtext/index.js +7 -9
  280. package/dist/fields/shared.d.ts +1 -2
  281. package/dist/fields/shared.js +914 -479
  282. package/dist/hooks/index.d.ts +2 -3
  283. package/dist/hooks/index.js +2 -4
  284. package/dist/hooks/useResponsiveStyles.d.ts +1 -2
  285. package/dist/hooks/useResponsiveStyles.js +35 -33
  286. package/dist/hooks/useScrollAnimation.d.ts +0 -1
  287. package/dist/hooks/useScrollAnimation.js +25 -25
  288. package/dist/index.d.ts +4 -5
  289. package/dist/index.js +4 -6
  290. package/dist/layouts/LayoutWrapper.d.ts +3 -4
  291. package/dist/layouts/LayoutWrapper.js +114 -52
  292. package/dist/layouts/defaults.d.ts +1 -2
  293. package/dist/layouts/defaults.js +22 -32
  294. package/dist/layouts/index.d.ts +4 -5
  295. package/dist/layouts/index.js +4 -5
  296. package/dist/layouts/types.d.ts +0 -1
  297. package/dist/layouts/types.js +3 -3
  298. package/dist/layouts/utils.d.ts +1 -2
  299. package/dist/layouts/utils.js +31 -41
  300. package/dist/next/index.d.ts +0 -1
  301. package/dist/next/index.js +30 -35
  302. package/dist/plugin/collections/Pages.d.ts +2 -3
  303. package/dist/plugin/collections/Pages.js +45 -44
  304. package/dist/plugin/fields/index.d.ts +3 -4
  305. package/dist/plugin/fields/index.js +99 -79
  306. package/dist/plugin/fields/types.d.ts +1 -2
  307. package/dist/plugin/fields/types.js +25 -3
  308. package/dist/plugin/hooks/index.d.ts +1 -2
  309. package/dist/plugin/hooks/index.js +1 -3
  310. package/dist/plugin/hooks/isHomepageUnique.d.ts +0 -1
  311. package/dist/plugin/hooks/isHomepageUnique.js +27 -20
  312. package/dist/plugin/index.d.ts +8 -9
  313. package/dist/plugin/index.js +189 -189
  314. package/dist/render/HybridPageRenderer.d.ts +2 -3
  315. package/dist/render/HybridPageRenderer.js +57 -11
  316. package/dist/render/PageRenderer.d.ts +2 -3
  317. package/dist/render/PageRenderer.js +30 -15
  318. package/dist/render/PuckEditor.client.d.ts +1 -2
  319. package/dist/render/PuckEditor.client.js +32 -17
  320. package/dist/render/index.d.ts +5 -6
  321. package/dist/render/index.js +4 -7
  322. package/dist/styles/puck-dark-mode.css +101 -0
  323. package/dist/theme/context.d.ts +2 -3
  324. package/dist/theme/context.js +20 -19
  325. package/dist/theme/defaults.d.ts +1 -2
  326. package/dist/theme/defaults.js +82 -38
  327. package/dist/theme/example.d.ts +1 -2
  328. package/dist/theme/example.js +67 -31
  329. package/dist/theme/index.d.ts +5 -6
  330. package/dist/theme/index.js +5 -6
  331. package/dist/theme/types.d.ts +0 -1
  332. package/dist/theme/types.js +5 -3
  333. package/dist/theme/utils.d.ts +1 -2
  334. package/dist/theme/utils.js +23 -26
  335. package/dist/types/index.d.ts +6 -7
  336. package/dist/types/index.js +2 -2
  337. package/dist/utils/index.d.ts +2 -3
  338. package/dist/utils/index.js +12 -23
  339. package/dist/utils/migration.d.ts +1 -2
  340. package/dist/utils/migration.js +42 -50
  341. package/dist/utils/validation.d.ts +1 -2
  342. package/dist/utils/validation.js +35 -44
  343. package/dist/version.d.ts +1 -2
  344. package/dist/version.js +1 -2
  345. package/dist/views/PuckConfigContext.d.ts +1 -2
  346. package/dist/views/PuckConfigContext.js +24 -11
  347. package/dist/views/PuckEditorView.d.ts +1 -2
  348. package/dist/views/PuckEditorView.js +105 -39
  349. package/dist/views/index.d.ts +0 -1
  350. package/dist/views/index.js +1 -3
  351. package/package.json +62 -42
  352. package/dist/admin/EditWithPuckButton.d.ts.map +0 -1
  353. package/dist/admin/EditWithPuckButton.js.map +0 -1
  354. package/dist/admin/EditWithPuckCell.d.ts.map +0 -1
  355. package/dist/admin/EditWithPuckCell.js.map +0 -1
  356. package/dist/admin/PuckEditorView.d.ts.map +0 -1
  357. package/dist/admin/PuckEditorView.js.map +0 -1
  358. package/dist/admin/client.d.ts.map +0 -1
  359. package/dist/admin/client.js.map +0 -1
  360. package/dist/admin/generateAdminComponents.d.ts.map +0 -1
  361. package/dist/admin/generateAdminComponents.js.map +0 -1
  362. package/dist/admin/index.d.ts.map +0 -1
  363. package/dist/admin/index.js.map +0 -1
  364. package/dist/ai/collections/AiContext.d.ts.map +0 -1
  365. package/dist/ai/collections/AiContext.js.map +0 -1
  366. package/dist/ai/collections/AiPrompts.d.ts.map +0 -1
  367. package/dist/ai/collections/AiPrompts.js.map +0 -1
  368. package/dist/ai/createAiApiRoutes.d.ts.map +0 -1
  369. package/dist/ai/createAiApiRoutes.js.map +0 -1
  370. package/dist/ai/createAiGenerate.d.ts.map +0 -1
  371. package/dist/ai/createAiGenerate.js.map +0 -1
  372. package/dist/ai/createAiPlugin.d.ts.map +0 -1
  373. package/dist/ai/createAiPlugin.js.map +0 -1
  374. package/dist/ai/hooks/useAiContext.d.ts.map +0 -1
  375. package/dist/ai/hooks/useAiContext.js.map +0 -1
  376. package/dist/ai/hooks/useAiPrompts.d.ts.map +0 -1
  377. package/dist/ai/hooks/useAiPrompts.js.map +0 -1
  378. package/dist/ai/index.d.ts.map +0 -1
  379. package/dist/ai/index.js.map +0 -1
  380. package/dist/ai/plugins/ContextEditorPanel.d.ts.map +0 -1
  381. package/dist/ai/plugins/ContextEditorPanel.js.map +0 -1
  382. package/dist/ai/plugins/PromptEditorPanel.d.ts.map +0 -1
  383. package/dist/ai/plugins/PromptEditorPanel.js.map +0 -1
  384. package/dist/ai/plugins/contextEditorPlugin.d.ts.map +0 -1
  385. package/dist/ai/plugins/contextEditorPlugin.js.map +0 -1
  386. package/dist/ai/plugins/promptApiRoutes.d.ts.map +0 -1
  387. package/dist/ai/plugins/promptApiRoutes.js.map +0 -1
  388. package/dist/ai/plugins/promptEditorPlugin.d.ts.map +0 -1
  389. package/dist/ai/plugins/promptEditorPlugin.js.map +0 -1
  390. package/dist/ai/presets/componentAiDefaults.d.ts.map +0 -1
  391. package/dist/ai/presets/componentAiDefaults.js.map +0 -1
  392. package/dist/ai/presets/index.d.ts.map +0 -1
  393. package/dist/ai/presets/index.js.map +0 -1
  394. package/dist/ai/presets/instructions/interactive.d.ts.map +0 -1
  395. package/dist/ai/presets/instructions/interactive.js.map +0 -1
  396. package/dist/ai/presets/instructions/layout.d.ts.map +0 -1
  397. package/dist/ai/presets/instructions/layout.js.map +0 -1
  398. package/dist/ai/presets/instructions/media.d.ts.map +0 -1
  399. package/dist/ai/presets/instructions/media.js.map +0 -1
  400. package/dist/ai/presets/instructions/pagePatterns.d.ts.map +0 -1
  401. package/dist/ai/presets/instructions/pagePatterns.js.map +0 -1
  402. package/dist/ai/presets/instructions/schemas.d.ts.map +0 -1
  403. package/dist/ai/presets/instructions/schemas.js.map +0 -1
  404. package/dist/ai/presets/instructions/typography.d.ts.map +0 -1
  405. package/dist/ai/presets/instructions/typography.js.map +0 -1
  406. package/dist/ai/tools/index.d.ts.map +0 -1
  407. package/dist/ai/tools/index.js.map +0 -1
  408. package/dist/ai/types.d.ts.map +0 -1
  409. package/dist/ai/types.js.map +0 -1
  410. package/dist/ai/utils/injectAiConfig.d.ts.map +0 -1
  411. package/dist/ai/utils/injectAiConfig.js.map +0 -1
  412. package/dist/api/createPuckApiRoutes.d.ts.map +0 -1
  413. package/dist/api/createPuckApiRoutes.js.map +0 -1
  414. package/dist/api/createPuckApiRoutesVersions.d.ts.map +0 -1
  415. package/dist/api/createPuckApiRoutesVersions.js.map +0 -1
  416. package/dist/api/createPuckApiRoutesWithId.d.ts.map +0 -1
  417. package/dist/api/createPuckApiRoutesWithId.js.map +0 -1
  418. package/dist/api/index.d.ts.map +0 -1
  419. package/dist/api/index.js.map +0 -1
  420. package/dist/api/types.d.ts.map +0 -1
  421. package/dist/api/types.js.map +0 -1
  422. package/dist/api/utils/mapRootProps.d.ts.map +0 -1
  423. package/dist/api/utils/mapRootProps.js.map +0 -1
  424. package/dist/collections/Templates.d.ts.map +0 -1
  425. package/dist/collections/Templates.js.map +0 -1
  426. package/dist/components/AccordionClient.d.ts.map +0 -1
  427. package/dist/components/AccordionClient.js.map +0 -1
  428. package/dist/components/AnimatedWrapper.d.ts.map +0 -1
  429. package/dist/components/AnimatedWrapper.js.map +0 -1
  430. package/dist/components/exports.d.ts.map +0 -1
  431. package/dist/components/exports.js.map +0 -1
  432. package/dist/components/index.d.ts.map +0 -1
  433. package/dist/components/index.js.map +0 -1
  434. package/dist/components/interactive/Accordion.d.ts.map +0 -1
  435. package/dist/components/interactive/Accordion.js.map +0 -1
  436. package/dist/components/interactive/Accordion.server.d.ts.map +0 -1
  437. package/dist/components/interactive/Accordion.server.js.map +0 -1
  438. package/dist/components/interactive/Button.d.ts.map +0 -1
  439. package/dist/components/interactive/Button.js.map +0 -1
  440. package/dist/components/interactive/Button.server.d.ts.map +0 -1
  441. package/dist/components/interactive/Button.server.js.map +0 -1
  442. package/dist/components/interactive/Card.d.ts.map +0 -1
  443. package/dist/components/interactive/Card.js.map +0 -1
  444. package/dist/components/interactive/Card.server.d.ts.map +0 -1
  445. package/dist/components/interactive/Card.server.js.map +0 -1
  446. package/dist/components/interactive/Divider.d.ts.map +0 -1
  447. package/dist/components/interactive/Divider.js.map +0 -1
  448. package/dist/components/interactive/Divider.server.d.ts.map +0 -1
  449. package/dist/components/interactive/Divider.server.js.map +0 -1
  450. package/dist/components/interactive/index.d.ts.map +0 -1
  451. package/dist/components/interactive/index.js.map +0 -1
  452. package/dist/components/layout/Container.d.ts.map +0 -1
  453. package/dist/components/layout/Container.js.map +0 -1
  454. package/dist/components/layout/Container.server.d.ts.map +0 -1
  455. package/dist/components/layout/Container.server.js.map +0 -1
  456. package/dist/components/layout/Flex.d.ts.map +0 -1
  457. package/dist/components/layout/Flex.js.map +0 -1
  458. package/dist/components/layout/Flex.server.d.ts.map +0 -1
  459. package/dist/components/layout/Flex.server.js.map +0 -1
  460. package/dist/components/layout/Grid.d.ts.map +0 -1
  461. package/dist/components/layout/Grid.js.map +0 -1
  462. package/dist/components/layout/Grid.server.d.ts.map +0 -1
  463. package/dist/components/layout/Grid.server.js.map +0 -1
  464. package/dist/components/layout/Section.d.ts.map +0 -1
  465. package/dist/components/layout/Section.js.map +0 -1
  466. package/dist/components/layout/Section.server.d.ts.map +0 -1
  467. package/dist/components/layout/Section.server.js.map +0 -1
  468. package/dist/components/layout/Spacer.d.ts.map +0 -1
  469. package/dist/components/layout/Spacer.js.map +0 -1
  470. package/dist/components/layout/Spacer.server.d.ts.map +0 -1
  471. package/dist/components/layout/Spacer.server.js.map +0 -1
  472. package/dist/components/layout/Template.d.ts.map +0 -1
  473. package/dist/components/layout/Template.js.map +0 -1
  474. package/dist/components/layout/Template.server.d.ts.map +0 -1
  475. package/dist/components/layout/Template.server.js.map +0 -1
  476. package/dist/components/layout/index.d.ts.map +0 -1
  477. package/dist/components/layout/index.js.map +0 -1
  478. package/dist/components/media/Image.d.ts.map +0 -1
  479. package/dist/components/media/Image.js.map +0 -1
  480. package/dist/components/media/Image.server.d.ts.map +0 -1
  481. package/dist/components/media/Image.server.js.map +0 -1
  482. package/dist/components/media/index.d.ts.map +0 -1
  483. package/dist/components/media/index.js.map +0 -1
  484. package/dist/components/typography/Heading.d.ts.map +0 -1
  485. package/dist/components/typography/Heading.js.map +0 -1
  486. package/dist/components/typography/Heading.server.d.ts.map +0 -1
  487. package/dist/components/typography/Heading.server.js.map +0 -1
  488. package/dist/components/typography/RichText.editor.d.ts.map +0 -1
  489. package/dist/components/typography/RichText.editor.js.map +0 -1
  490. package/dist/components/typography/RichText.server.d.ts.map +0 -1
  491. package/dist/components/typography/RichText.server.js.map +0 -1
  492. package/dist/components/typography/Text.d.ts.map +0 -1
  493. package/dist/components/typography/Text.js.map +0 -1
  494. package/dist/components/typography/Text.server.d.ts.map +0 -1
  495. package/dist/components/typography/Text.server.js.map +0 -1
  496. package/dist/components/typography/index.d.ts.map +0 -1
  497. package/dist/components/typography/index.js.map +0 -1
  498. package/dist/config/config.editor.d.ts.map +0 -1
  499. package/dist/config/config.editor.js.map +0 -1
  500. package/dist/config/index.d.ts.map +0 -1
  501. package/dist/config/index.js.map +0 -1
  502. package/dist/config/merge.d.ts.map +0 -1
  503. package/dist/config/merge.js.map +0 -1
  504. package/dist/config/presets.d.ts.map +0 -1
  505. package/dist/config/presets.js.map +0 -1
  506. package/dist/config/types.d.ts.map +0 -1
  507. package/dist/config/types.js.map +0 -1
  508. package/dist/editor/PuckEditor.d.ts.map +0 -1
  509. package/dist/editor/PuckEditor.js.map +0 -1
  510. package/dist/editor/PuckEditorImpl.client.d.ts.map +0 -1
  511. package/dist/editor/PuckEditorImpl.client.js.map +0 -1
  512. package/dist/editor/components/DarkModeStyles.d.ts.map +0 -1
  513. package/dist/editor/components/DarkModeStyles.js.map +0 -1
  514. package/dist/editor/components/HeaderActions.d.ts.map +0 -1
  515. package/dist/editor/components/HeaderActions.js.map +0 -1
  516. package/dist/editor/components/IframeWrapper.d.ts.map +0 -1
  517. package/dist/editor/components/IframeWrapper.js.map +0 -1
  518. package/dist/editor/components/LoadingState.d.ts.map +0 -1
  519. package/dist/editor/components/LoadingState.js.map +0 -1
  520. package/dist/editor/components/PreviewModal.d.ts.map +0 -1
  521. package/dist/editor/components/PreviewModal.js.map +0 -1
  522. package/dist/editor/components/PreviewModeToggle.d.ts.map +0 -1
  523. package/dist/editor/components/PreviewModeToggle.js.map +0 -1
  524. package/dist/editor/components/VersionHistory.d.ts.map +0 -1
  525. package/dist/editor/components/VersionHistory.js.map +0 -1
  526. package/dist/editor/hooks/useDarkMode.d.ts.map +0 -1
  527. package/dist/editor/hooks/useDarkMode.js.map +0 -1
  528. package/dist/editor/hooks/useUnsavedChanges.d.ts.map +0 -1
  529. package/dist/editor/hooks/useUnsavedChanges.js.map +0 -1
  530. package/dist/editor/index.d.ts.map +0 -1
  531. package/dist/editor/index.js.map +0 -1
  532. package/dist/editor/plugins/VersionHistoryPanel.d.ts.map +0 -1
  533. package/dist/editor/plugins/VersionHistoryPanel.js.map +0 -1
  534. package/dist/editor/plugins/index.d.ts.map +0 -1
  535. package/dist/editor/plugins/index.js.map +0 -1
  536. package/dist/editor/plugins/versionHistoryPlugin.d.ts.map +0 -1
  537. package/dist/editor/plugins/versionHistoryPlugin.js.map +0 -1
  538. package/dist/editor/utils/detectPageTree.d.ts.map +0 -1
  539. package/dist/editor/utils/detectPageTree.js.map +0 -1
  540. package/dist/editor/utils/index.d.ts.map +0 -1
  541. package/dist/editor/utils/index.js.map +0 -1
  542. package/dist/editor/utils/injectPageTreeFields.d.ts.map +0 -1
  543. package/dist/editor/utils/injectPageTreeFields.js.map +0 -1
  544. package/dist/endpoints/ai.d.ts.map +0 -1
  545. package/dist/endpoints/ai.js.map +0 -1
  546. package/dist/endpoints/context.d.ts.map +0 -1
  547. package/dist/endpoints/context.js.map +0 -1
  548. package/dist/endpoints/index.d.ts.map +0 -1
  549. package/dist/endpoints/index.js.map +0 -1
  550. package/dist/endpoints/prompts.d.ts.map +0 -1
  551. package/dist/endpoints/prompts.js.map +0 -1
  552. package/dist/endpoints/styles.d.ts.map +0 -1
  553. package/dist/endpoints/styles.js.map +0 -1
  554. package/dist/exports/client.d.ts.map +0 -1
  555. package/dist/exports/client.js.map +0 -1
  556. package/dist/exports/rsc.d.ts.map +0 -1
  557. package/dist/exports/rsc.js.map +0 -1
  558. package/dist/fields/AlignmentField.d.ts.map +0 -1
  559. package/dist/fields/AlignmentField.js.map +0 -1
  560. package/dist/fields/AnimationField.d.ts.map +0 -1
  561. package/dist/fields/AnimationField.js.map +0 -1
  562. package/dist/fields/BackgroundField.d.ts.map +0 -1
  563. package/dist/fields/BackgroundField.js.map +0 -1
  564. package/dist/fields/BorderField.d.ts.map +0 -1
  565. package/dist/fields/BorderField.js.map +0 -1
  566. package/dist/fields/ColorPickerField.d.ts.map +0 -1
  567. package/dist/fields/ColorPickerField.js.map +0 -1
  568. package/dist/fields/ContentAlignmentField.d.ts.map +0 -1
  569. package/dist/fields/ContentAlignmentField.js.map +0 -1
  570. package/dist/fields/DimensionsField.d.ts.map +0 -1
  571. package/dist/fields/DimensionsField.js.map +0 -1
  572. package/dist/fields/FlexAlignmentField.d.ts.map +0 -1
  573. package/dist/fields/FlexAlignmentField.js.map +0 -1
  574. package/dist/fields/FolderPickerField.d.ts.map +0 -1
  575. package/dist/fields/FolderPickerField.js.map +0 -1
  576. package/dist/fields/GradientEditor.d.ts.map +0 -1
  577. package/dist/fields/GradientEditor.js.map +0 -1
  578. package/dist/fields/LockedField.d.ts.map +0 -1
  579. package/dist/fields/LockedField.js.map +0 -1
  580. package/dist/fields/MarginField.d.ts.map +0 -1
  581. package/dist/fields/MarginField.js.map +0 -1
  582. package/dist/fields/MediaField.d.ts.map +0 -1
  583. package/dist/fields/MediaField.js.map +0 -1
  584. package/dist/fields/PaddingField.d.ts.map +0 -1
  585. package/dist/fields/PaddingField.js.map +0 -1
  586. package/dist/fields/PageSegmentField.d.ts.map +0 -1
  587. package/dist/fields/PageSegmentField.js.map +0 -1
  588. package/dist/fields/ResetField.d.ts.map +0 -1
  589. package/dist/fields/ResetField.js.map +0 -1
  590. package/dist/fields/ResponsiveField.d.ts.map +0 -1
  591. package/dist/fields/ResponsiveField.js.map +0 -1
  592. package/dist/fields/ResponsiveVisibilityField.d.ts.map +0 -1
  593. package/dist/fields/ResponsiveVisibilityField.js.map +0 -1
  594. package/dist/fields/SizeField.d.ts.map +0 -1
  595. package/dist/fields/SizeField.js.map +0 -1
  596. package/dist/fields/SlugPreviewField.d.ts.map +0 -1
  597. package/dist/fields/SlugPreviewField.js.map +0 -1
  598. package/dist/fields/TemplateField.d.ts.map +0 -1
  599. package/dist/fields/TemplateField.js.map +0 -1
  600. package/dist/fields/TransformField.d.ts.map +0 -1
  601. package/dist/fields/TransformField.js.map +0 -1
  602. package/dist/fields/VerticalAlignmentField.d.ts.map +0 -1
  603. package/dist/fields/VerticalAlignmentField.js.map +0 -1
  604. package/dist/fields/WidthField.d.ts.map +0 -1
  605. package/dist/fields/WidthField.js.map +0 -1
  606. package/dist/fields/index.d.ts.map +0 -1
  607. package/dist/fields/index.js.map +0 -1
  608. package/dist/fields/richtext/controls/ColorPickerControl.d.ts.map +0 -1
  609. package/dist/fields/richtext/controls/ColorPickerControl.js.map +0 -1
  610. package/dist/fields/richtext/controls/DropdownPortal.d.ts.map +0 -1
  611. package/dist/fields/richtext/controls/DropdownPortal.js.map +0 -1
  612. package/dist/fields/richtext/controls/FontSizeControl.d.ts.map +0 -1
  613. package/dist/fields/richtext/controls/FontSizeControl.js.map +0 -1
  614. package/dist/fields/richtext/controls/HighlightControl.d.ts.map +0 -1
  615. package/dist/fields/richtext/controls/HighlightControl.js.map +0 -1
  616. package/dist/fields/richtext/controls/index.d.ts.map +0 -1
  617. package/dist/fields/richtext/controls/index.js.map +0 -1
  618. package/dist/fields/richtext/controls/shared.d.ts.map +0 -1
  619. package/dist/fields/richtext/controls/shared.js.map +0 -1
  620. package/dist/fields/richtext/createRichTextField.d.ts.map +0 -1
  621. package/dist/fields/richtext/createRichTextField.js.map +0 -1
  622. package/dist/fields/richtext/extensions/FontSize.d.ts.map +0 -1
  623. package/dist/fields/richtext/extensions/FontSize.js.map +0 -1
  624. package/dist/fields/richtext/extensions/index.d.ts.map +0 -1
  625. package/dist/fields/richtext/extensions/index.js.map +0 -1
  626. package/dist/fields/richtext/index.d.ts.map +0 -1
  627. package/dist/fields/richtext/index.js.map +0 -1
  628. package/dist/fields/shared.d.ts.map +0 -1
  629. package/dist/fields/shared.js.map +0 -1
  630. package/dist/hooks/index.d.ts.map +0 -1
  631. package/dist/hooks/index.js.map +0 -1
  632. package/dist/hooks/useResponsiveStyles.d.ts.map +0 -1
  633. package/dist/hooks/useResponsiveStyles.js.map +0 -1
  634. package/dist/hooks/useScrollAnimation.d.ts.map +0 -1
  635. package/dist/hooks/useScrollAnimation.js.map +0 -1
  636. package/dist/index.d.ts.map +0 -1
  637. package/dist/index.js.map +0 -1
  638. package/dist/layouts/LayoutWrapper.d.ts.map +0 -1
  639. package/dist/layouts/LayoutWrapper.js.map +0 -1
  640. package/dist/layouts/defaults.d.ts.map +0 -1
  641. package/dist/layouts/defaults.js.map +0 -1
  642. package/dist/layouts/index.d.ts.map +0 -1
  643. package/dist/layouts/index.js.map +0 -1
  644. package/dist/layouts/types.d.ts.map +0 -1
  645. package/dist/layouts/types.js.map +0 -1
  646. package/dist/layouts/utils.d.ts.map +0 -1
  647. package/dist/layouts/utils.js.map +0 -1
  648. package/dist/next/index.d.ts.map +0 -1
  649. package/dist/next/index.js.map +0 -1
  650. package/dist/plugin/collections/Pages.d.ts.map +0 -1
  651. package/dist/plugin/collections/Pages.js.map +0 -1
  652. package/dist/plugin/fields/index.d.ts.map +0 -1
  653. package/dist/plugin/fields/index.js.map +0 -1
  654. package/dist/plugin/fields/types.d.ts.map +0 -1
  655. package/dist/plugin/fields/types.js.map +0 -1
  656. package/dist/plugin/hooks/index.d.ts.map +0 -1
  657. package/dist/plugin/hooks/index.js.map +0 -1
  658. package/dist/plugin/hooks/isHomepageUnique.d.ts.map +0 -1
  659. package/dist/plugin/hooks/isHomepageUnique.js.map +0 -1
  660. package/dist/plugin/index.d.ts.map +0 -1
  661. package/dist/plugin/index.js.map +0 -1
  662. package/dist/render/HybridPageRenderer.d.ts.map +0 -1
  663. package/dist/render/HybridPageRenderer.js.map +0 -1
  664. package/dist/render/PageRenderer.d.ts.map +0 -1
  665. package/dist/render/PageRenderer.js.map +0 -1
  666. package/dist/render/PuckEditor.client.d.ts.map +0 -1
  667. package/dist/render/PuckEditor.client.js.map +0 -1
  668. package/dist/render/index.d.ts.map +0 -1
  669. package/dist/render/index.js.map +0 -1
  670. package/dist/theme/context.d.ts.map +0 -1
  671. package/dist/theme/context.js.map +0 -1
  672. package/dist/theme/defaults.d.ts.map +0 -1
  673. package/dist/theme/defaults.js.map +0 -1
  674. package/dist/theme/example.d.ts.map +0 -1
  675. package/dist/theme/example.js.map +0 -1
  676. package/dist/theme/index.d.ts.map +0 -1
  677. package/dist/theme/index.js.map +0 -1
  678. package/dist/theme/types.d.ts.map +0 -1
  679. package/dist/theme/types.js.map +0 -1
  680. package/dist/theme/utils.d.ts.map +0 -1
  681. package/dist/theme/utils.js.map +0 -1
  682. package/dist/types/index.d.ts.map +0 -1
  683. package/dist/types/index.js.map +0 -1
  684. package/dist/utils/index.d.ts.map +0 -1
  685. package/dist/utils/index.js.map +0 -1
  686. package/dist/utils/migration.d.ts.map +0 -1
  687. package/dist/utils/migration.js.map +0 -1
  688. package/dist/utils/validation.d.ts.map +0 -1
  689. package/dist/utils/validation.js.map +0 -1
  690. package/dist/version.d.ts.map +0 -1
  691. package/dist/version.js.map +0 -1
  692. package/dist/views/PuckConfigContext.d.ts.map +0 -1
  693. package/dist/views/PuckConfigContext.js.map +0 -1
  694. package/dist/views/PuckEditorView.d.ts.map +0 -1
  695. package/dist/views/PuckEditorView.js.map +0 -1
  696. package/dist/views/index.d.ts.map +0 -1
  697. package/dist/views/index.js.map +0 -1
@@ -8,13 +8,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  * - Solid: Single color with opacity
9
9
  * - Gradient: Linear or radial gradients with multiple stops
10
10
  * - Image: Background image from media library with sizing options
11
- */
12
- import { useCallback, memo } from 'react';
11
+ */ import React, { useCallback, memo } from 'react';
13
12
  import { X } from 'lucide-react';
14
- import { backgroundValueToCSS, getBackgroundImageOpacity } from './shared';
15
- import { ColorPickerField } from './ColorPickerField';
16
- import { MediaField } from './MediaField';
17
- import { GradientEditor } from './GradientEditor';
13
+ import { backgroundValueToCSS, getBackgroundImageOpacity } from './shared.js';
14
+ import { ColorPickerField } from './ColorPickerField.js';
15
+ import { MediaField } from './MediaField.js';
16
+ import { GradientEditor } from './GradientEditor.js';
18
17
  // =============================================================================
19
18
  // Default Values
20
19
  // =============================================================================
@@ -22,17 +21,29 @@ const DEFAULT_VALUE = {
22
21
  type: 'none',
23
22
  solid: null,
24
23
  gradient: null,
25
- image: null,
24
+ image: null
26
25
  };
27
26
  const DEFAULT_GRADIENT = {
28
27
  type: 'linear',
29
28
  angle: 90,
30
29
  stops: [
31
- { color: { hex: '#000000', opacity: 100 }, position: 0 },
32
- { color: { hex: '#ffffff', opacity: 100 }, position: 100 },
30
+ {
31
+ color: {
32
+ hex: '#000000',
33
+ opacity: 100
34
+ },
35
+ position: 0
36
+ },
37
+ {
38
+ color: {
39
+ hex: '#ffffff',
40
+ opacity: 100
41
+ },
42
+ position: 100
43
+ }
33
44
  ],
34
45
  radialShape: 'circle',
35
- radialPosition: 'center',
46
+ radialPosition: 'center'
36
47
  };
37
48
  const DEFAULT_IMAGE = {
38
49
  media: null,
@@ -41,7 +52,7 @@ const DEFAULT_IMAGE = {
41
52
  repeat: 'no-repeat',
42
53
  attachment: 'scroll',
43
54
  opacity: 100,
44
- mask: undefined,
55
+ mask: undefined
45
56
  };
46
57
  const DEFAULT_MASK = {
47
58
  enabled: false,
@@ -49,13 +60,16 @@ const DEFAULT_MASK = {
49
60
  startOpacity: 100,
50
61
  endOpacity: 0,
51
62
  startPosition: 0,
52
- endPosition: 100,
63
+ endPosition: 100
53
64
  };
54
65
  const DEFAULT_OVERLAY = {
55
66
  enabled: false,
56
67
  type: 'solid',
57
- solid: { hex: '#000000', opacity: 50 },
58
- gradient: null,
68
+ solid: {
69
+ hex: '#000000',
70
+ opacity: 50
71
+ },
72
+ gradient: null
59
73
  };
60
74
  // =============================================================================
61
75
  // Styles
@@ -64,17 +78,17 @@ const styles = {
64
78
  container: {
65
79
  display: 'flex',
66
80
  flexDirection: 'column',
67
- gap: '12px',
81
+ gap: '12px'
68
82
  },
69
83
  header: {
70
84
  display: 'flex',
71
85
  alignItems: 'center',
72
- justifyContent: 'space-between',
86
+ justifyContent: 'space-between'
73
87
  },
74
88
  label: {
75
89
  fontSize: '14px',
76
90
  fontWeight: 500,
77
- color: 'var(--theme-elevation-800)',
91
+ color: 'var(--theme-elevation-800)'
78
92
  },
79
93
  clearButton: {
80
94
  display: 'flex',
@@ -87,7 +101,7 @@ const styles = {
87
101
  borderRadius: '4px',
88
102
  backgroundColor: 'transparent',
89
103
  color: 'var(--theme-elevation-500)',
90
- cursor: 'pointer',
104
+ cursor: 'pointer'
91
105
  },
92
106
  tabContainer: {
93
107
  display: 'flex',
@@ -95,7 +109,7 @@ const styles = {
95
109
  gap: '4px',
96
110
  padding: '4px',
97
111
  backgroundColor: 'var(--theme-elevation-50)',
98
- borderRadius: '8px',
112
+ borderRadius: '8px'
99
113
  },
100
114
  tabButton: {
101
115
  flex: '1 1 auto',
@@ -108,7 +122,7 @@ const styles = {
108
122
  backgroundColor: 'transparent',
109
123
  color: 'var(--theme-elevation-500)',
110
124
  cursor: 'pointer',
111
- whiteSpace: 'nowrap',
125
+ whiteSpace: 'nowrap'
112
126
  },
113
127
  tabButtonActive: {
114
128
  flex: '1 1 auto',
@@ -121,18 +135,18 @@ const styles = {
121
135
  backgroundColor: 'var(--theme-elevation-800)',
122
136
  color: 'var(--theme-bg)',
123
137
  cursor: 'pointer',
124
- whiteSpace: 'nowrap',
138
+ whiteSpace: 'nowrap'
125
139
  },
126
140
  tabButtonDisabled: {
127
141
  opacity: 0.5,
128
- cursor: 'not-allowed',
142
+ cursor: 'not-allowed'
129
143
  },
130
144
  previewContainer: {
131
145
  position: 'relative',
132
146
  height: '64px',
133
147
  borderRadius: '6px',
134
148
  border: '1px solid var(--theme-elevation-150)',
135
- overflow: 'hidden',
149
+ overflow: 'hidden'
136
150
  },
137
151
  previewEmpty: {
138
152
  height: '100%',
@@ -141,17 +155,17 @@ const styles = {
141
155
  justifyContent: 'center',
142
156
  fontSize: '12px',
143
157
  color: 'var(--theme-elevation-500)',
144
- backgroundColor: 'var(--theme-elevation-50)',
158
+ backgroundColor: 'var(--theme-elevation-50)'
145
159
  },
146
160
  checkerboard: {
147
161
  position: 'absolute',
148
162
  inset: 0,
149
163
  backgroundImage: 'linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)',
150
164
  backgroundSize: '12px 12px',
151
- backgroundPosition: '0 0, 0 6px, 6px -6px, -6px 0px',
165
+ backgroundPosition: '0 0, 0 6px, 6px -6px, -6px 0px'
152
166
  },
153
167
  contentContainer: {
154
- minHeight: '100px',
168
+ minHeight: '100px'
155
169
  },
156
170
  emptyContent: {
157
171
  display: 'flex',
@@ -159,36 +173,36 @@ const styles = {
159
173
  justifyContent: 'center',
160
174
  height: '96px',
161
175
  fontSize: '14px',
162
- color: 'var(--theme-elevation-500)',
176
+ color: 'var(--theme-elevation-500)'
163
177
  },
164
178
  imageOptionsContainer: {
165
179
  display: 'flex',
166
180
  flexDirection: 'column',
167
- gap: '16px',
181
+ gap: '16px'
168
182
  },
169
183
  optionsSection: {
170
184
  display: 'flex',
171
185
  flexDirection: 'column',
172
186
  gap: '12px',
173
187
  paddingTop: '8px',
174
- borderTop: '1px solid var(--theme-elevation-150)',
188
+ borderTop: '1px solid var(--theme-elevation-150)'
175
189
  },
176
190
  optionRow: {
177
191
  display: 'flex',
178
192
  alignItems: 'center',
179
- gap: '8px',
193
+ gap: '8px'
180
194
  },
181
195
  optionLabel: {
182
196
  fontSize: '12px',
183
197
  color: 'var(--theme-elevation-500)',
184
198
  width: '80px',
185
- flexShrink: 0,
199
+ flexShrink: 0
186
200
  },
187
201
  optionLabelSmall: {
188
202
  fontSize: '12px',
189
203
  color: 'var(--theme-elevation-500)',
190
204
  width: '48px',
191
- flexShrink: 0,
205
+ flexShrink: 0
192
206
  },
193
207
  select: {
194
208
  flex: 1,
@@ -199,7 +213,7 @@ const styles = {
199
213
  borderRadius: '4px',
200
214
  backgroundColor: 'var(--theme-input-bg)',
201
215
  color: 'var(--theme-elevation-800)',
202
- cursor: 'pointer',
216
+ cursor: 'pointer'
203
217
  },
204
218
  selectSmall: {
205
219
  flex: 1,
@@ -211,14 +225,14 @@ const styles = {
211
225
  borderRadius: '4px',
212
226
  backgroundColor: 'var(--theme-input-bg)',
213
227
  color: 'var(--theme-elevation-800)',
214
- cursor: 'pointer',
228
+ cursor: 'pointer'
215
229
  },
216
230
  slider: {
217
231
  flex: 1,
218
232
  minWidth: 0,
219
233
  height: '6px',
220
234
  accentColor: 'var(--theme-elevation-800)',
221
- cursor: 'pointer',
235
+ cursor: 'pointer'
222
236
  },
223
237
  sliderValue: {
224
238
  fontSize: '12px',
@@ -226,112 +240,523 @@ const styles = {
226
240
  color: 'var(--theme-elevation-500)',
227
241
  width: '32px',
228
242
  textAlign: 'right',
229
- flexShrink: 0,
243
+ flexShrink: 0
230
244
  },
231
245
  checkboxRow: {
232
246
  display: 'flex',
233
247
  alignItems: 'center',
234
248
  gap: '8px',
235
- cursor: 'pointer',
249
+ cursor: 'pointer'
236
250
  },
237
251
  checkbox: {
238
252
  width: '16px',
239
253
  height: '16px',
240
254
  accentColor: 'var(--theme-elevation-800)',
241
- cursor: 'pointer',
255
+ cursor: 'pointer'
242
256
  },
243
257
  checkboxLabel: {
244
258
  fontSize: '12px',
245
- color: 'var(--theme-elevation-500)',
259
+ color: 'var(--theme-elevation-500)'
246
260
  },
247
261
  maskSection: {
248
262
  display: 'flex',
249
263
  flexDirection: 'column',
250
264
  gap: '8px',
251
- paddingLeft: '24px',
265
+ paddingLeft: '24px'
252
266
  },
253
267
  overlaySection: {
254
268
  display: 'flex',
255
269
  flexDirection: 'column',
256
270
  gap: '12px',
257
- paddingTop: '12px',
258
- },
271
+ paddingTop: '12px'
272
+ }
259
273
  };
260
274
  function TabButton({ active, onClick, disabled, children }) {
261
- return (_jsx("button", { type: "button", onClick: onClick, disabled: disabled, style: {
262
- ...(active ? styles.tabButtonActive : styles.tabButton),
263
- ...(disabled ? styles.tabButtonDisabled : {}),
264
- }, children: children }));
275
+ return /*#__PURE__*/ _jsx("button", {
276
+ type: "button",
277
+ onClick: onClick,
278
+ disabled: disabled,
279
+ style: {
280
+ ...active ? styles.tabButtonActive : styles.tabButton,
281
+ ...disabled ? styles.tabButtonDisabled : {}
282
+ },
283
+ children: children
284
+ });
265
285
  }
266
286
  function BackgroundPreview({ value }) {
267
287
  const style = backgroundValueToCSS(value);
268
288
  const imageOpacity = getBackgroundImageOpacity(value);
269
289
  const hasBackground = value.type !== 'none' && Object.keys(style).length > 0;
270
- return (_jsxs("div", { style: styles.previewContainer, children: [hasBackground && _jsx("div", { style: styles.checkerboard }), hasBackground && (_jsx("div", { style: {
290
+ return /*#__PURE__*/ _jsxs("div", {
291
+ style: styles.previewContainer,
292
+ children: [
293
+ hasBackground && /*#__PURE__*/ _jsx("div", {
294
+ style: styles.checkerboard
295
+ }),
296
+ hasBackground && /*#__PURE__*/ _jsx("div", {
297
+ style: {
271
298
  position: 'absolute',
272
299
  inset: 0,
273
300
  ...style,
274
- opacity: imageOpacity !== undefined ? imageOpacity : 1,
275
- } })), !hasBackground && (_jsx("div", { style: styles.previewEmpty, children: "No background" }))] }));
301
+ opacity: imageOpacity !== undefined ? imageOpacity : 1
302
+ }
303
+ }),
304
+ !hasBackground && /*#__PURE__*/ _jsx("div", {
305
+ style: styles.previewEmpty,
306
+ children: "No background"
307
+ })
308
+ ]
309
+ });
276
310
  }
277
311
  function ImageOptionsInner({ value, onChange, readOnly, apiEndpoint }) {
278
- const handleMediaChange = useCallback((media) => {
279
- onChange({ ...value, media });
280
- }, [value, onChange]);
281
- const handleSizeChange = useCallback((size) => {
282
- onChange({ ...value, size });
283
- }, [value, onChange]);
284
- const handlePositionChange = useCallback((position) => {
285
- onChange({ ...value, position });
286
- }, [value, onChange]);
287
- const handleRepeatChange = useCallback((repeat) => {
288
- onChange({ ...value, repeat });
289
- }, [value, onChange]);
290
- const handleAttachmentChange = useCallback((attachment) => {
291
- onChange({ ...value, attachment });
292
- }, [value, onChange]);
293
- const handleOpacityChange = useCallback((e) => {
312
+ const handleMediaChange = useCallback((media)=>{
313
+ onChange({
314
+ ...value,
315
+ media
316
+ });
317
+ }, [
318
+ value,
319
+ onChange
320
+ ]);
321
+ const handleSizeChange = useCallback((size)=>{
322
+ onChange({
323
+ ...value,
324
+ size
325
+ });
326
+ }, [
327
+ value,
328
+ onChange
329
+ ]);
330
+ const handlePositionChange = useCallback((position)=>{
331
+ onChange({
332
+ ...value,
333
+ position
334
+ });
335
+ }, [
336
+ value,
337
+ onChange
338
+ ]);
339
+ const handleRepeatChange = useCallback((repeat)=>{
340
+ onChange({
341
+ ...value,
342
+ repeat
343
+ });
344
+ }, [
345
+ value,
346
+ onChange
347
+ ]);
348
+ const handleAttachmentChange = useCallback((attachment)=>{
349
+ onChange({
350
+ ...value,
351
+ attachment
352
+ });
353
+ }, [
354
+ value,
355
+ onChange
356
+ ]);
357
+ const handleOpacityChange = useCallback((e)=>{
294
358
  const opacity = parseInt(e.target.value, 10);
295
- onChange({ ...value, opacity });
296
- }, [value, onChange]);
297
- const handleMaskToggle = useCallback((checked) => {
359
+ onChange({
360
+ ...value,
361
+ opacity
362
+ });
363
+ }, [
364
+ value,
365
+ onChange
366
+ ]);
367
+ const handleMaskToggle = useCallback((checked)=>{
298
368
  if (checked) {
299
- onChange({ ...value, mask: { ...DEFAULT_MASK, enabled: true } });
369
+ onChange({
370
+ ...value,
371
+ mask: {
372
+ ...DEFAULT_MASK,
373
+ enabled: true
374
+ }
375
+ });
376
+ } else {
377
+ onChange({
378
+ ...value,
379
+ mask: undefined
380
+ });
300
381
  }
301
- else {
302
- onChange({ ...value, mask: undefined });
303
- }
304
- }, [value, onChange]);
305
- const handleMaskDirectionChange = useCallback((direction) => {
382
+ }, [
383
+ value,
384
+ onChange
385
+ ]);
386
+ const handleMaskDirectionChange = useCallback((direction)=>{
306
387
  const currentMask = value.mask || DEFAULT_MASK;
307
- onChange({ ...value, mask: { ...currentMask, direction, enabled: true } });
308
- }, [value, onChange]);
309
- const handleMaskStartPositionChange = useCallback((e) => {
388
+ onChange({
389
+ ...value,
390
+ mask: {
391
+ ...currentMask,
392
+ direction,
393
+ enabled: true
394
+ }
395
+ });
396
+ }, [
397
+ value,
398
+ onChange
399
+ ]);
400
+ const handleMaskStartPositionChange = useCallback((e)=>{
310
401
  const startPosition = parseInt(e.target.value, 10);
311
402
  const currentMask = value.mask || DEFAULT_MASK;
312
- onChange({ ...value, mask: { ...currentMask, startPosition, enabled: true } });
313
- }, [value, onChange]);
314
- const handleMaskEndPositionChange = useCallback((e) => {
403
+ onChange({
404
+ ...value,
405
+ mask: {
406
+ ...currentMask,
407
+ startPosition,
408
+ enabled: true
409
+ }
410
+ });
411
+ }, [
412
+ value,
413
+ onChange
414
+ ]);
415
+ const handleMaskEndPositionChange = useCallback((e)=>{
315
416
  const endPosition = parseInt(e.target.value, 10);
316
417
  const currentMask = value.mask || DEFAULT_MASK;
317
- onChange({ ...value, mask: { ...currentMask, endPosition, enabled: true } });
318
- }, [value, onChange]);
418
+ onChange({
419
+ ...value,
420
+ mask: {
421
+ ...currentMask,
422
+ endPosition,
423
+ enabled: true
424
+ }
425
+ });
426
+ }, [
427
+ value,
428
+ onChange
429
+ ]);
319
430
  const opacity = value.opacity ?? 100;
320
431
  const maskEnabled = value.mask?.enabled ?? false;
321
- return (_jsxs("div", { style: styles.imageOptionsContainer, children: [_jsx(MediaField, { value: value.media, onChange: handleMediaChange, readOnly: readOnly, apiEndpoint: apiEndpoint }), value.media && (_jsxs("div", { style: styles.optionsSection, children: [_jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabel, children: "Opacity" }), _jsx("input", { type: "range", min: "0", max: "100", value: opacity, onChange: handleOpacityChange, disabled: readOnly, style: styles.slider }), _jsxs("span", { style: styles.sliderValue, children: [opacity, "%"] })] }), _jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabel, children: "Size" }), _jsxs("select", { value: value.size, onChange: (e) => handleSizeChange(e.target.value), disabled: readOnly, style: styles.select, children: [_jsx("option", { value: "cover", children: "Cover" }), _jsx("option", { value: "contain", children: "Contain" }), _jsx("option", { value: "auto", children: "Auto" })] })] }), _jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabel, children: "Position" }), _jsxs("select", { value: value.position, onChange: (e) => handlePositionChange(e.target.value), disabled: readOnly, style: styles.select, children: [_jsx("option", { value: "center", children: "Center" }), _jsx("option", { value: "top", children: "Top" }), _jsx("option", { value: "bottom", children: "Bottom" }), _jsx("option", { value: "left", children: "Left" }), _jsx("option", { value: "right", children: "Right" }), _jsx("option", { value: "top-left", children: "Top Left" }), _jsx("option", { value: "top-right", children: "Top Right" }), _jsx("option", { value: "bottom-left", children: "Bottom Left" }), _jsx("option", { value: "bottom-right", children: "Bottom Right" })] })] }), _jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabel, children: "Repeat" }), _jsxs("select", { value: value.repeat, onChange: (e) => handleRepeatChange(e.target.value), disabled: readOnly, style: styles.select, children: [_jsx("option", { value: "no-repeat", children: "No Repeat" }), _jsx("option", { value: "repeat", children: "Repeat" }), _jsx("option", { value: "repeat-x", children: "Repeat X" }), _jsx("option", { value: "repeat-y", children: "Repeat Y" })] })] }), _jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabel, children: "Attachment" }), _jsxs("select", { value: value.attachment, onChange: (e) => handleAttachmentChange(e.target.value), disabled: readOnly, style: styles.select, children: [_jsx("option", { value: "scroll", children: "Scroll" }), _jsx("option", { value: "fixed", children: "Fixed" })] })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '8px', paddingTop: '12px' }, children: [_jsxs("label", { style: styles.checkboxRow, children: [_jsx("input", { type: "checkbox", checked: maskEnabled, onChange: (e) => handleMaskToggle(e.target.checked), disabled: readOnly, style: styles.checkbox }), _jsx("span", { style: styles.checkboxLabel, children: "Fade to transparent" })] }), maskEnabled && (_jsxs("div", { style: styles.maskSection, children: [_jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabelSmall, children: "Dir" }), _jsxs("select", { value: value.mask?.direction || 'to-bottom', onChange: (e) => handleMaskDirectionChange(e.target.value), disabled: readOnly, style: styles.selectSmall, children: [_jsx("option", { value: "to-top", children: "To Top" }), _jsx("option", { value: "to-bottom", children: "To Bottom" }), _jsx("option", { value: "to-left", children: "To Left" }), _jsx("option", { value: "to-right", children: "To Right" }), _jsx("option", { value: "to-top-left", children: "To Top Left" }), _jsx("option", { value: "to-top-right", children: "To Top Right" }), _jsx("option", { value: "to-bottom-left", children: "To Bottom Left" }), _jsx("option", { value: "to-bottom-right", children: "To Bottom Right" }), _jsx("option", { value: "from-center", children: "From Center (Radial)" })] })] }), _jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabelSmall, children: "Start" }), _jsx("input", { type: "range", min: "0", max: "100", value: value.mask?.startPosition ?? 0, onChange: handleMaskStartPositionChange, disabled: readOnly, style: styles.slider }), _jsxs("span", { style: styles.sliderValue, children: [value.mask?.startPosition ?? 0, "%"] })] }), _jsxs("div", { style: styles.optionRow, children: [_jsx("label", { style: styles.optionLabelSmall, children: "End" }), _jsx("input", { type: "range", min: "0", max: "100", value: value.mask?.endPosition ?? 100, onChange: handleMaskEndPositionChange, disabled: readOnly, style: styles.slider }), _jsxs("span", { style: styles.sliderValue, children: [value.mask?.endPosition ?? 100, "%"] })] })] }))] })] }))] }));
432
+ return /*#__PURE__*/ _jsxs("div", {
433
+ style: styles.imageOptionsContainer,
434
+ children: [
435
+ /*#__PURE__*/ _jsx(MediaField, {
436
+ value: value.media,
437
+ onChange: handleMediaChange,
438
+ readOnly: readOnly,
439
+ apiEndpoint: apiEndpoint
440
+ }),
441
+ value.media && /*#__PURE__*/ _jsxs("div", {
442
+ style: styles.optionsSection,
443
+ children: [
444
+ /*#__PURE__*/ _jsxs("div", {
445
+ style: styles.optionRow,
446
+ children: [
447
+ /*#__PURE__*/ _jsx("label", {
448
+ style: styles.optionLabel,
449
+ children: "Opacity"
450
+ }),
451
+ /*#__PURE__*/ _jsx("input", {
452
+ type: "range",
453
+ min: "0",
454
+ max: "100",
455
+ value: opacity,
456
+ onChange: handleOpacityChange,
457
+ disabled: readOnly,
458
+ style: styles.slider
459
+ }),
460
+ /*#__PURE__*/ _jsxs("span", {
461
+ style: styles.sliderValue,
462
+ children: [
463
+ opacity,
464
+ "%"
465
+ ]
466
+ })
467
+ ]
468
+ }),
469
+ /*#__PURE__*/ _jsxs("div", {
470
+ style: styles.optionRow,
471
+ children: [
472
+ /*#__PURE__*/ _jsx("label", {
473
+ style: styles.optionLabel,
474
+ children: "Size"
475
+ }),
476
+ /*#__PURE__*/ _jsxs("select", {
477
+ value: value.size,
478
+ onChange: (e)=>handleSizeChange(e.target.value),
479
+ disabled: readOnly,
480
+ style: styles.select,
481
+ children: [
482
+ /*#__PURE__*/ _jsx("option", {
483
+ value: "cover",
484
+ children: "Cover"
485
+ }),
486
+ /*#__PURE__*/ _jsx("option", {
487
+ value: "contain",
488
+ children: "Contain"
489
+ }),
490
+ /*#__PURE__*/ _jsx("option", {
491
+ value: "auto",
492
+ children: "Auto"
493
+ })
494
+ ]
495
+ })
496
+ ]
497
+ }),
498
+ /*#__PURE__*/ _jsxs("div", {
499
+ style: styles.optionRow,
500
+ children: [
501
+ /*#__PURE__*/ _jsx("label", {
502
+ style: styles.optionLabel,
503
+ children: "Position"
504
+ }),
505
+ /*#__PURE__*/ _jsxs("select", {
506
+ value: value.position,
507
+ onChange: (e)=>handlePositionChange(e.target.value),
508
+ disabled: readOnly,
509
+ style: styles.select,
510
+ children: [
511
+ /*#__PURE__*/ _jsx("option", {
512
+ value: "center",
513
+ children: "Center"
514
+ }),
515
+ /*#__PURE__*/ _jsx("option", {
516
+ value: "top",
517
+ children: "Top"
518
+ }),
519
+ /*#__PURE__*/ _jsx("option", {
520
+ value: "bottom",
521
+ children: "Bottom"
522
+ }),
523
+ /*#__PURE__*/ _jsx("option", {
524
+ value: "left",
525
+ children: "Left"
526
+ }),
527
+ /*#__PURE__*/ _jsx("option", {
528
+ value: "right",
529
+ children: "Right"
530
+ }),
531
+ /*#__PURE__*/ _jsx("option", {
532
+ value: "top-left",
533
+ children: "Top Left"
534
+ }),
535
+ /*#__PURE__*/ _jsx("option", {
536
+ value: "top-right",
537
+ children: "Top Right"
538
+ }),
539
+ /*#__PURE__*/ _jsx("option", {
540
+ value: "bottom-left",
541
+ children: "Bottom Left"
542
+ }),
543
+ /*#__PURE__*/ _jsx("option", {
544
+ value: "bottom-right",
545
+ children: "Bottom Right"
546
+ })
547
+ ]
548
+ })
549
+ ]
550
+ }),
551
+ /*#__PURE__*/ _jsxs("div", {
552
+ style: styles.optionRow,
553
+ children: [
554
+ /*#__PURE__*/ _jsx("label", {
555
+ style: styles.optionLabel,
556
+ children: "Repeat"
557
+ }),
558
+ /*#__PURE__*/ _jsxs("select", {
559
+ value: value.repeat,
560
+ onChange: (e)=>handleRepeatChange(e.target.value),
561
+ disabled: readOnly,
562
+ style: styles.select,
563
+ children: [
564
+ /*#__PURE__*/ _jsx("option", {
565
+ value: "no-repeat",
566
+ children: "No Repeat"
567
+ }),
568
+ /*#__PURE__*/ _jsx("option", {
569
+ value: "repeat",
570
+ children: "Repeat"
571
+ }),
572
+ /*#__PURE__*/ _jsx("option", {
573
+ value: "repeat-x",
574
+ children: "Repeat X"
575
+ }),
576
+ /*#__PURE__*/ _jsx("option", {
577
+ value: "repeat-y",
578
+ children: "Repeat Y"
579
+ })
580
+ ]
581
+ })
582
+ ]
583
+ }),
584
+ /*#__PURE__*/ _jsxs("div", {
585
+ style: styles.optionRow,
586
+ children: [
587
+ /*#__PURE__*/ _jsx("label", {
588
+ style: styles.optionLabel,
589
+ children: "Attachment"
590
+ }),
591
+ /*#__PURE__*/ _jsxs("select", {
592
+ value: value.attachment,
593
+ onChange: (e)=>handleAttachmentChange(e.target.value),
594
+ disabled: readOnly,
595
+ style: styles.select,
596
+ children: [
597
+ /*#__PURE__*/ _jsx("option", {
598
+ value: "scroll",
599
+ children: "Scroll"
600
+ }),
601
+ /*#__PURE__*/ _jsx("option", {
602
+ value: "fixed",
603
+ children: "Fixed"
604
+ })
605
+ ]
606
+ })
607
+ ]
608
+ }),
609
+ /*#__PURE__*/ _jsxs("div", {
610
+ style: {
611
+ display: 'flex',
612
+ flexDirection: 'column',
613
+ gap: '8px',
614
+ paddingTop: '12px'
615
+ },
616
+ children: [
617
+ /*#__PURE__*/ _jsxs("label", {
618
+ style: styles.checkboxRow,
619
+ children: [
620
+ /*#__PURE__*/ _jsx("input", {
621
+ type: "checkbox",
622
+ checked: maskEnabled,
623
+ onChange: (e)=>handleMaskToggle(e.target.checked),
624
+ disabled: readOnly,
625
+ style: styles.checkbox
626
+ }),
627
+ /*#__PURE__*/ _jsx("span", {
628
+ style: styles.checkboxLabel,
629
+ children: "Fade to transparent"
630
+ })
631
+ ]
632
+ }),
633
+ maskEnabled && /*#__PURE__*/ _jsxs("div", {
634
+ style: styles.maskSection,
635
+ children: [
636
+ /*#__PURE__*/ _jsxs("div", {
637
+ style: styles.optionRow,
638
+ children: [
639
+ /*#__PURE__*/ _jsx("label", {
640
+ style: styles.optionLabelSmall,
641
+ children: "Dir"
642
+ }),
643
+ /*#__PURE__*/ _jsxs("select", {
644
+ value: value.mask?.direction || 'to-bottom',
645
+ onChange: (e)=>handleMaskDirectionChange(e.target.value),
646
+ disabled: readOnly,
647
+ style: styles.selectSmall,
648
+ children: [
649
+ /*#__PURE__*/ _jsx("option", {
650
+ value: "to-top",
651
+ children: "To Top"
652
+ }),
653
+ /*#__PURE__*/ _jsx("option", {
654
+ value: "to-bottom",
655
+ children: "To Bottom"
656
+ }),
657
+ /*#__PURE__*/ _jsx("option", {
658
+ value: "to-left",
659
+ children: "To Left"
660
+ }),
661
+ /*#__PURE__*/ _jsx("option", {
662
+ value: "to-right",
663
+ children: "To Right"
664
+ }),
665
+ /*#__PURE__*/ _jsx("option", {
666
+ value: "to-top-left",
667
+ children: "To Top Left"
668
+ }),
669
+ /*#__PURE__*/ _jsx("option", {
670
+ value: "to-top-right",
671
+ children: "To Top Right"
672
+ }),
673
+ /*#__PURE__*/ _jsx("option", {
674
+ value: "to-bottom-left",
675
+ children: "To Bottom Left"
676
+ }),
677
+ /*#__PURE__*/ _jsx("option", {
678
+ value: "to-bottom-right",
679
+ children: "To Bottom Right"
680
+ }),
681
+ /*#__PURE__*/ _jsx("option", {
682
+ value: "from-center",
683
+ children: "From Center (Radial)"
684
+ })
685
+ ]
686
+ })
687
+ ]
688
+ }),
689
+ /*#__PURE__*/ _jsxs("div", {
690
+ style: styles.optionRow,
691
+ children: [
692
+ /*#__PURE__*/ _jsx("label", {
693
+ style: styles.optionLabelSmall,
694
+ children: "Start"
695
+ }),
696
+ /*#__PURE__*/ _jsx("input", {
697
+ type: "range",
698
+ min: "0",
699
+ max: "100",
700
+ value: value.mask?.startPosition ?? 0,
701
+ onChange: handleMaskStartPositionChange,
702
+ disabled: readOnly,
703
+ style: styles.slider
704
+ }),
705
+ /*#__PURE__*/ _jsxs("span", {
706
+ style: styles.sliderValue,
707
+ children: [
708
+ value.mask?.startPosition ?? 0,
709
+ "%"
710
+ ]
711
+ })
712
+ ]
713
+ }),
714
+ /*#__PURE__*/ _jsxs("div", {
715
+ style: styles.optionRow,
716
+ children: [
717
+ /*#__PURE__*/ _jsx("label", {
718
+ style: styles.optionLabelSmall,
719
+ children: "End"
720
+ }),
721
+ /*#__PURE__*/ _jsx("input", {
722
+ type: "range",
723
+ min: "0",
724
+ max: "100",
725
+ value: value.mask?.endPosition ?? 100,
726
+ onChange: handleMaskEndPositionChange,
727
+ disabled: readOnly,
728
+ style: styles.slider
729
+ }),
730
+ /*#__PURE__*/ _jsxs("span", {
731
+ style: styles.sliderValue,
732
+ children: [
733
+ value.mask?.endPosition ?? 100,
734
+ "%"
735
+ ]
736
+ })
737
+ ]
738
+ })
739
+ ]
740
+ })
741
+ ]
742
+ })
743
+ ]
744
+ })
745
+ ]
746
+ });
322
747
  }
323
- const ImageOptions = memo(ImageOptionsInner);
748
+ const ImageOptions = /*#__PURE__*/ memo(ImageOptionsInner);
324
749
  // =============================================================================
325
750
  // BackgroundField Component
326
751
  // =============================================================================
327
- function BackgroundFieldInner({ value, onChange, label, readOnly, apiEndpoint = '/api/media', showOpacity = true, colorPresets, }) {
752
+ function BackgroundFieldInner({ value, onChange, label, readOnly, apiEndpoint = '/api/media', showOpacity = true, colorPresets }) {
328
753
  const currentValue = value || DEFAULT_VALUE;
329
754
  const currentType = currentValue.type;
330
755
  // Handle type change
331
- const handleTypeChange = useCallback((type) => {
756
+ const handleTypeChange = useCallback((type)=>{
332
757
  const newValue = {
333
758
  ...currentValue,
334
- type,
759
+ type
335
760
  };
336
761
  // Initialize defaults for the new type if needed
337
762
  if (type === 'gradient' && !newValue.gradient) {
@@ -341,30 +766,65 @@ function BackgroundFieldInner({ value, onChange, label, readOnly, apiEndpoint =
341
766
  newValue.image = DEFAULT_IMAGE;
342
767
  }
343
768
  onChange(newValue);
344
- }, [currentValue, onChange]);
769
+ }, [
770
+ currentValue,
771
+ onChange
772
+ ]);
345
773
  // Handle solid color change
346
- const handleSolidChange = useCallback((solid) => {
347
- onChange({ ...currentValue, solid });
348
- }, [currentValue, onChange]);
774
+ const handleSolidChange = useCallback((solid)=>{
775
+ onChange({
776
+ ...currentValue,
777
+ solid
778
+ });
779
+ }, [
780
+ currentValue,
781
+ onChange
782
+ ]);
349
783
  // Handle gradient change
350
- const handleGradientChange = useCallback((gradient) => {
351
- onChange({ ...currentValue, gradient });
352
- }, [currentValue, onChange]);
784
+ const handleGradientChange = useCallback((gradient)=>{
785
+ onChange({
786
+ ...currentValue,
787
+ gradient
788
+ });
789
+ }, [
790
+ currentValue,
791
+ onChange
792
+ ]);
353
793
  // Handle image change
354
- const handleImageChange = useCallback((image) => {
355
- onChange({ ...currentValue, image });
356
- }, [currentValue, onChange]);
794
+ const handleImageChange = useCallback((image)=>{
795
+ onChange({
796
+ ...currentValue,
797
+ image
798
+ });
799
+ }, [
800
+ currentValue,
801
+ onChange
802
+ ]);
357
803
  // Handle overlay toggle
358
- const handleOverlayToggle = useCallback((checked) => {
804
+ const handleOverlayToggle = useCallback((checked)=>{
359
805
  if (checked) {
360
- onChange({ ...currentValue, overlay: { ...DEFAULT_OVERLAY, enabled: true } });
806
+ onChange({
807
+ ...currentValue,
808
+ overlay: {
809
+ ...DEFAULT_OVERLAY,
810
+ enabled: true
811
+ }
812
+ });
813
+ } else {
814
+ onChange({
815
+ ...currentValue,
816
+ overlay: {
817
+ ...DEFAULT_OVERLAY,
818
+ enabled: false
819
+ }
820
+ });
361
821
  }
362
- else {
363
- onChange({ ...currentValue, overlay: { ...DEFAULT_OVERLAY, enabled: false } });
364
- }
365
- }, [currentValue, onChange]);
822
+ }, [
823
+ currentValue,
824
+ onChange
825
+ ]);
366
826
  // Handle overlay type change
367
- const handleOverlayTypeChange = useCallback((type) => {
827
+ const handleOverlayTypeChange = useCallback((type)=>{
368
828
  const currentOverlay = currentValue.overlay || DEFAULT_OVERLAY;
369
829
  onChange({
370
830
  ...currentValue,
@@ -373,46 +833,218 @@ function BackgroundFieldInner({ value, onChange, label, readOnly, apiEndpoint =
373
833
  type,
374
834
  enabled: true,
375
835
  // Initialize gradient if switching to gradient and not set
376
- gradient: type === 'gradient' && !currentOverlay.gradient ? DEFAULT_GRADIENT : currentOverlay.gradient,
377
- },
836
+ gradient: type === 'gradient' && !currentOverlay.gradient ? DEFAULT_GRADIENT : currentOverlay.gradient
837
+ }
378
838
  });
379
- }, [currentValue, onChange]);
839
+ }, [
840
+ currentValue,
841
+ onChange
842
+ ]);
380
843
  // Handle overlay solid color change
381
- const handleOverlaySolidChange = useCallback((solid) => {
844
+ const handleOverlaySolidChange = useCallback((solid)=>{
382
845
  const currentOverlay = currentValue.overlay || DEFAULT_OVERLAY;
383
846
  onChange({
384
847
  ...currentValue,
385
- overlay: { ...currentOverlay, solid, enabled: true },
848
+ overlay: {
849
+ ...currentOverlay,
850
+ solid,
851
+ enabled: true
852
+ }
386
853
  });
387
- }, [currentValue, onChange]);
854
+ }, [
855
+ currentValue,
856
+ onChange
857
+ ]);
388
858
  // Handle overlay gradient change
389
- const handleOverlayGradientChange = useCallback((gradient) => {
859
+ const handleOverlayGradientChange = useCallback((gradient)=>{
390
860
  const currentOverlay = currentValue.overlay || DEFAULT_OVERLAY;
391
861
  onChange({
392
862
  ...currentValue,
393
- overlay: { ...currentOverlay, gradient, enabled: true },
863
+ overlay: {
864
+ ...currentOverlay,
865
+ gradient,
866
+ enabled: true
867
+ }
394
868
  });
395
- }, [currentValue, onChange]);
869
+ }, [
870
+ currentValue,
871
+ onChange
872
+ ]);
396
873
  // Handle clear
397
- const handleClear = useCallback(() => {
874
+ const handleClear = useCallback(()=>{
398
875
  onChange(null);
399
- }, [onChange]);
876
+ }, [
877
+ onChange
878
+ ]);
400
879
  const overlayEnabled = currentValue.overlay?.enabled ?? false;
401
880
  const overlayType = currentValue.overlay?.type ?? 'solid';
402
- return (_jsxs("div", { className: "puck-field", style: styles.container, children: [_jsxs("div", { style: styles.header, children: [label && _jsx("label", { style: styles.label, children: label }), value && !readOnly && (_jsx("button", { type: "button", onClick: handleClear, title: "Clear background", style: styles.clearButton, children: _jsx(X, { style: { width: '16px', height: '16px' } }) }))] }), _jsx(BackgroundPreview, { value: currentValue }), _jsxs("div", { style: styles.tabContainer, children: [_jsx(TabButton, { active: currentType === 'none', onClick: () => handleTypeChange('none'), disabled: readOnly, children: "None" }), _jsx(TabButton, { active: currentType === 'solid', onClick: () => handleTypeChange('solid'), disabled: readOnly, children: "Solid" }), _jsx(TabButton, { active: currentType === 'gradient', onClick: () => handleTypeChange('gradient'), disabled: readOnly, children: "Gradient" }), _jsx(TabButton, { active: currentType === 'image', onClick: () => handleTypeChange('image'), disabled: readOnly, children: "Image" })] }), _jsxs("div", { style: styles.contentContainer, children: [currentType === 'none' && (_jsx("div", { style: styles.emptyContent, children: "No background selected" })), currentType === 'solid' && (_jsx(ColorPickerField, { value: currentValue.solid || null, onChange: handleSolidChange, readOnly: readOnly, showOpacity: showOpacity, presets: colorPresets })), currentType === 'gradient' && (_jsx(GradientEditor, { value: currentValue.gradient || null, onChange: handleGradientChange, readOnly: readOnly })), currentType === 'image' && (_jsxs("div", { style: styles.imageOptionsContainer, children: [_jsx(ImageOptions, { value: currentValue.image || DEFAULT_IMAGE, onChange: handleImageChange, readOnly: readOnly, apiEndpoint: apiEndpoint }), currentValue.image?.media && (_jsxs("div", { style: styles.overlaySection, children: [_jsxs("label", { style: styles.checkboxRow, children: [_jsx("input", { type: "checkbox", checked: overlayEnabled, onChange: (e) => handleOverlayToggle(e.target.checked), disabled: readOnly, style: styles.checkbox }), _jsx("span", { style: styles.checkboxLabel, children: "Enable overlay" })] }), overlayEnabled && (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '12px' }, children: [_jsxs("div", { style: styles.tabContainer, children: [_jsx(TabButton, { active: overlayType === 'solid', onClick: () => handleOverlayTypeChange('solid'), disabled: readOnly, children: "Solid Color" }), _jsx(TabButton, { active: overlayType === 'gradient', onClick: () => handleOverlayTypeChange('gradient'), disabled: readOnly, children: "Gradient" })] }), overlayType === 'solid' ? (_jsx(ColorPickerField, { value: currentValue.overlay?.solid || null, onChange: handleOverlaySolidChange, readOnly: readOnly, showOpacity: true })) : (_jsx(GradientEditor, { value: currentValue.overlay?.gradient || null, onChange: handleOverlayGradientChange, readOnly: readOnly }))] }))] }))] }))] })] }));
881
+ return /*#__PURE__*/ _jsxs("div", {
882
+ className: "puck-field",
883
+ style: styles.container,
884
+ children: [
885
+ /*#__PURE__*/ _jsxs("div", {
886
+ style: styles.header,
887
+ children: [
888
+ label && /*#__PURE__*/ _jsx("label", {
889
+ style: styles.label,
890
+ children: label
891
+ }),
892
+ value && !readOnly && /*#__PURE__*/ _jsx("button", {
893
+ type: "button",
894
+ onClick: handleClear,
895
+ title: "Clear background",
896
+ style: styles.clearButton,
897
+ children: /*#__PURE__*/ _jsx(X, {
898
+ style: {
899
+ width: '16px',
900
+ height: '16px'
901
+ }
902
+ })
903
+ })
904
+ ]
905
+ }),
906
+ /*#__PURE__*/ _jsx(BackgroundPreview, {
907
+ value: currentValue
908
+ }),
909
+ /*#__PURE__*/ _jsxs("div", {
910
+ style: styles.tabContainer,
911
+ children: [
912
+ /*#__PURE__*/ _jsx(TabButton, {
913
+ active: currentType === 'none',
914
+ onClick: ()=>handleTypeChange('none'),
915
+ disabled: readOnly,
916
+ children: "None"
917
+ }),
918
+ /*#__PURE__*/ _jsx(TabButton, {
919
+ active: currentType === 'solid',
920
+ onClick: ()=>handleTypeChange('solid'),
921
+ disabled: readOnly,
922
+ children: "Solid"
923
+ }),
924
+ /*#__PURE__*/ _jsx(TabButton, {
925
+ active: currentType === 'gradient',
926
+ onClick: ()=>handleTypeChange('gradient'),
927
+ disabled: readOnly,
928
+ children: "Gradient"
929
+ }),
930
+ /*#__PURE__*/ _jsx(TabButton, {
931
+ active: currentType === 'image',
932
+ onClick: ()=>handleTypeChange('image'),
933
+ disabled: readOnly,
934
+ children: "Image"
935
+ })
936
+ ]
937
+ }),
938
+ /*#__PURE__*/ _jsxs("div", {
939
+ style: styles.contentContainer,
940
+ children: [
941
+ currentType === 'none' && /*#__PURE__*/ _jsx("div", {
942
+ style: styles.emptyContent,
943
+ children: "No background selected"
944
+ }),
945
+ currentType === 'solid' && /*#__PURE__*/ _jsx(ColorPickerField, {
946
+ value: currentValue.solid || null,
947
+ onChange: handleSolidChange,
948
+ readOnly: readOnly,
949
+ showOpacity: showOpacity,
950
+ presets: colorPresets
951
+ }),
952
+ currentType === 'gradient' && /*#__PURE__*/ _jsx(GradientEditor, {
953
+ value: currentValue.gradient || null,
954
+ onChange: handleGradientChange,
955
+ readOnly: readOnly
956
+ }),
957
+ currentType === 'image' && /*#__PURE__*/ _jsxs("div", {
958
+ style: styles.imageOptionsContainer,
959
+ children: [
960
+ /*#__PURE__*/ _jsx(ImageOptions, {
961
+ value: currentValue.image || DEFAULT_IMAGE,
962
+ onChange: handleImageChange,
963
+ readOnly: readOnly,
964
+ apiEndpoint: apiEndpoint
965
+ }),
966
+ currentValue.image?.media && /*#__PURE__*/ _jsxs("div", {
967
+ style: styles.overlaySection,
968
+ children: [
969
+ /*#__PURE__*/ _jsxs("label", {
970
+ style: styles.checkboxRow,
971
+ children: [
972
+ /*#__PURE__*/ _jsx("input", {
973
+ type: "checkbox",
974
+ checked: overlayEnabled,
975
+ onChange: (e)=>handleOverlayToggle(e.target.checked),
976
+ disabled: readOnly,
977
+ style: styles.checkbox
978
+ }),
979
+ /*#__PURE__*/ _jsx("span", {
980
+ style: styles.checkboxLabel,
981
+ children: "Enable overlay"
982
+ })
983
+ ]
984
+ }),
985
+ overlayEnabled && /*#__PURE__*/ _jsxs("div", {
986
+ style: {
987
+ display: 'flex',
988
+ flexDirection: 'column',
989
+ gap: '12px'
990
+ },
991
+ children: [
992
+ /*#__PURE__*/ _jsxs("div", {
993
+ style: styles.tabContainer,
994
+ children: [
995
+ /*#__PURE__*/ _jsx(TabButton, {
996
+ active: overlayType === 'solid',
997
+ onClick: ()=>handleOverlayTypeChange('solid'),
998
+ disabled: readOnly,
999
+ children: "Solid Color"
1000
+ }),
1001
+ /*#__PURE__*/ _jsx(TabButton, {
1002
+ active: overlayType === 'gradient',
1003
+ onClick: ()=>handleOverlayTypeChange('gradient'),
1004
+ disabled: readOnly,
1005
+ children: "Gradient"
1006
+ })
1007
+ ]
1008
+ }),
1009
+ overlayType === 'solid' ? /*#__PURE__*/ _jsx(ColorPickerField, {
1010
+ value: currentValue.overlay?.solid || null,
1011
+ onChange: handleOverlaySolidChange,
1012
+ readOnly: readOnly,
1013
+ showOpacity: true
1014
+ }) : /*#__PURE__*/ _jsx(GradientEditor, {
1015
+ value: currentValue.overlay?.gradient || null,
1016
+ onChange: handleOverlayGradientChange,
1017
+ readOnly: readOnly
1018
+ })
1019
+ ]
1020
+ })
1021
+ ]
1022
+ })
1023
+ ]
1024
+ })
1025
+ ]
1026
+ })
1027
+ ]
1028
+ });
403
1029
  }
404
- export const BackgroundField = memo(BackgroundFieldInner);
1030
+ export const BackgroundField = /*#__PURE__*/ memo(BackgroundFieldInner);
405
1031
  // =============================================================================
406
1032
  // Field Configuration Factory
407
1033
  // =============================================================================
408
1034
  /**
409
1035
  * Creates a Puck field configuration for background selection
410
- */
411
- export function createBackgroundField(config = {}) {
1036
+ */ export function createBackgroundField(config = {}) {
412
1037
  return {
413
1038
  type: 'custom',
414
1039
  label: config.label,
415
- render: ({ value, onChange, readOnly }) => (_jsx(BackgroundField, { value: value, onChange: onChange, label: config.label, readOnly: readOnly, apiEndpoint: config.apiEndpoint, showOpacity: config.showOpacity, colorPresets: config.colorPresets })),
1040
+ render: ({ value, onChange, readOnly })=>/*#__PURE__*/ _jsx(BackgroundField, {
1041
+ value: value,
1042
+ onChange: onChange,
1043
+ label: config.label,
1044
+ readOnly: readOnly,
1045
+ apiEndpoint: config.apiEndpoint,
1046
+ showOpacity: config.showOpacity,
1047
+ colorPresets: config.colorPresets
1048
+ })
416
1049
  };
417
1050
  }
418
- //# sourceMappingURL=BackgroundField.js.map