dune-react 0.0.31 → 0.0.33

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 (368) hide show
  1. package/dist/components/puck-base/article-card.d.ts +2 -2
  2. package/dist/components/puck-base/article-card.js +2 -2
  3. package/dist/components/puck-base/card.d.ts +2 -2
  4. package/dist/components/puck-base/card.js +2 -2
  5. package/dist/components/puck-base/index.d.ts +2 -1
  6. package/dist/components/puck-base/media.d.ts +12 -0
  7. package/dist/components/puck-base/media.js +576 -0
  8. package/dist/components/puck-base/social-links.d.ts +7 -0
  9. package/dist/components/puck-base/social-links.js +23 -0
  10. package/dist/components/puck-block/banner-sections/css-marquee-banner/css-marquee-banner.js +6 -6
  11. package/dist/components/puck-block/banner-sections/css-marquee-banner/index.d.ts +1 -1
  12. package/dist/components/puck-block/banner-sections/css-marquee-banner/index.js +2 -2
  13. package/dist/components/puck-block/banner-sections/dismissible-banner/index.d.ts +42 -0
  14. package/dist/components/puck-block/banner-sections/dual-row-marquee/dual-row-marquee.js +10 -10
  15. package/dist/components/puck-block/banner-sections/dual-row-marquee/index.d.ts +2 -2
  16. package/dist/components/puck-block/banner-sections/dual-row-marquee/index.js +3 -3
  17. package/dist/components/puck-block/banner-sections/props.d.ts +9 -12
  18. package/dist/components/puck-block/contact-sections/centered-form/centered-form.js +1 -5
  19. package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +1 -5
  20. package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -5
  21. package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +4 -8
  22. package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +1 -1
  23. package/dist/components/puck-block/contact-sections/form-with-media/index.js +2 -2
  24. package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -5
  25. package/dist/components/puck-block/contact-sections/header-info-fullwidth/header-info-fullwidth.js +4 -8
  26. package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.d.ts +1 -1
  27. package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.js +2 -2
  28. package/dist/components/puck-block/contact-sections/info-cards-media/index.d.ts +1 -1
  29. package/dist/components/puck-block/contact-sections/info-cards-media/index.js +2 -2
  30. package/dist/components/puck-block/contact-sections/info-cards-media/info-cards-media.js +4 -8
  31. package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +1 -1
  32. package/dist/components/puck-block/contact-sections/location-cards-grid/index.js +2 -2
  33. package/dist/components/puck-block/contact-sections/location-cards-grid/location-cards-grid.js +10 -14
  34. package/dist/components/puck-block/contact-sections/props.d.ts +5 -16
  35. package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +1 -1
  36. package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.d.ts +7 -2
  37. package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +1 -2
  38. package/dist/components/puck-block/contact-sections/tab-locations/index.d.ts +57 -8
  39. package/dist/components/puck-block/contact-sections/tab-locations/index.js +7 -7
  40. package/dist/components/puck-block/contact-sections/tab-locations/tab-locations.js +40 -47
  41. package/dist/components/puck-block/cta-sections/feature-card-cta/feature-card-cta.d.ts +2 -2
  42. package/dist/components/puck-block/cta-sections/feature-card-cta/feature-card-cta.js +2 -2
  43. package/dist/components/puck-block/cta-sections/feature-card-cta/index.js +2 -2
  44. package/dist/components/puck-block/cta-sections/mouse-track-cta/index.d.ts +1 -1
  45. package/dist/components/puck-block/cta-sections/mouse-track-cta/index.js +2 -2
  46. package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.d.ts +2 -2
  47. package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.js +6 -6
  48. package/dist/components/puck-block/cta-sections/props.d.ts +3 -3
  49. package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +1 -1
  50. package/dist/components/puck-block/cta-sections/side-media-cta/index.js +2 -2
  51. package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +4 -4
  52. package/dist/components/puck-block/cta-sections/text-block-cta/index.d.ts +2 -2
  53. package/dist/components/puck-block/cta-sections/text-block-cta/index.js +3 -3
  54. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.d.ts +3 -3
  55. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +10 -10
  56. package/dist/components/puck-block/faq-sections/icon-card-faq/icon-card-faq.d.ts +2 -2
  57. package/dist/components/puck-block/faq-sections/icon-card-faq/icon-card-faq.js +2 -2
  58. package/dist/components/puck-block/faq-sections/icon-card-faq/index.js +2 -2
  59. package/dist/components/puck-block/faq-sections/props.d.ts +3 -3
  60. package/dist/components/puck-block/feature-sections/feature-cards-grid/component.d.ts +2 -2
  61. package/dist/components/puck-block/feature-sections/feature-cards-grid/component.js +6 -6
  62. package/dist/components/puck-block/feature-sections/feature-cards-grid/index.d.ts +1 -1
  63. package/dist/components/puck-block/feature-sections/feature-cards-grid/index.js +3 -3
  64. package/dist/components/puck-block/feature-sections/feature-list-split/component.d.ts +2 -2
  65. package/dist/components/puck-block/feature-sections/feature-list-split/component.js +6 -6
  66. package/dist/components/puck-block/feature-sections/feature-list-split/index.d.ts +1 -1
  67. package/dist/components/puck-block/feature-sections/feature-list-split/index.js +3 -3
  68. package/dist/components/puck-block/feature-sections/props.d.ts +3 -3
  69. package/dist/components/puck-block/feature-sections/tab-feature/component.d.ts +2 -2
  70. package/dist/components/puck-block/feature-sections/tab-feature/component.js +12 -12
  71. package/dist/components/puck-block/feature-sections/tab-feature/index.d.ts +1 -1
  72. package/dist/components/puck-block/feature-sections/tab-feature/index.js +2 -2
  73. package/dist/components/puck-block/feature-sections/text-media-split/component.js +5 -5
  74. package/dist/components/puck-block/feature-sections/text-media-split/index.d.ts +1 -1
  75. package/dist/components/puck-block/feature-sections/text-media-split/index.js +2 -2
  76. package/dist/components/puck-block/feature-sections/text-only-section/component.d.ts +2 -2
  77. package/dist/components/puck-block/feature-sections/text-only-section/component.js +2 -2
  78. package/dist/components/puck-block/feature-sections/text-only-section/index.d.ts +1 -1
  79. package/dist/components/puck-block/feature-sections/text-only-section/index.js +2 -2
  80. package/dist/components/puck-block/footer-sections/centered-minimal-footer/centered-minimal-footer.js +9 -9
  81. package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +11 -0
  82. package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +3 -2
  83. package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +11 -0
  84. package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.d.ts +7 -2
  85. package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +9 -9
  86. package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +61 -10
  87. package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +3 -2
  88. package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +9 -9
  89. package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +61 -10
  90. package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +3 -3
  91. package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +61 -10
  92. package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +11 -0
  93. package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +61 -10
  94. package/dist/components/puck-block/footer-sections/props.d.ts +17 -10
  95. package/dist/components/puck-block/footer-sections/props.js +8 -0
  96. package/dist/components/puck-block/gallery-sections/asymmetric-grid/asymmetric-grid.js +7 -7
  97. package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.d.ts +1 -1
  98. package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.js +2 -2
  99. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/fullscreen-portfolio.js +12 -12
  100. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +1 -1
  101. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +2 -2
  102. package/dist/components/puck-block/gallery-sections/image-carousel/image-carousel.js +12 -12
  103. package/dist/components/puck-block/gallery-sections/image-carousel/index.d.ts +1 -1
  104. package/dist/components/puck-block/gallery-sections/image-carousel/index.js +2 -2
  105. package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.d.ts +1 -1
  106. package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.js +2 -2
  107. package/dist/components/puck-block/gallery-sections/interactive-portfolio/interactive-portfolio.js +14 -14
  108. package/dist/components/puck-block/gallery-sections/masonry-grid/index.d.ts +1 -1
  109. package/dist/components/puck-block/gallery-sections/masonry-grid/index.js +2 -2
  110. package/dist/components/puck-block/gallery-sections/masonry-grid/masonry-grid.js +7 -7
  111. package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +1 -1
  112. package/dist/components/puck-block/gallery-sections/portfolio-cards/index.js +2 -2
  113. package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +6 -6
  114. package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +1 -1
  115. package/dist/components/puck-block/gallery-sections/portfolio-divider/index.js +2 -2
  116. package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +9 -9
  117. package/dist/components/puck-block/gallery-sections/props.d.ts +8 -8
  118. package/dist/components/puck-block/gallery-sections/scroll-parallax/index.d.ts +1 -1
  119. package/dist/components/puck-block/gallery-sections/scroll-parallax/index.js +2 -2
  120. package/dist/components/puck-block/gallery-sections/scroll-parallax/scroll-parallax.js +11 -11
  121. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +1 -1
  122. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +5 -5
  123. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/scroll-parallax-portfolio.js +26 -26
  124. package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +1 -1
  125. package/dist/components/puck-block/gallery-sections/split-carousel/index.js +2 -2
  126. package/dist/components/puck-block/gallery-sections/split-carousel/split-carousel.js +6 -6
  127. package/dist/components/puck-block/gallery-sections/static-grid/index.d.ts +1 -1
  128. package/dist/components/puck-block/gallery-sections/static-grid/index.js +2 -2
  129. package/dist/components/puck-block/gallery-sections/static-grid/static-grid.js +7 -7
  130. package/dist/components/puck-block/header-sections/centered-navbar/centered-navbar.js +31 -24
  131. package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +92 -0
  132. package/dist/components/puck-block/header-sections/centered-navbar/index.js +9 -4
  133. package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +32 -25
  134. package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +92 -0
  135. package/dist/components/puck-block/header-sections/drawer-navbar/index.js +5 -3
  136. package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +27 -22
  137. package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +91 -3
  138. package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.js +3 -3
  139. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +23 -18
  140. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +91 -3
  141. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.js +3 -3
  142. package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +64 -0
  143. package/dist/components/puck-block/header-sections/mega-menu-navbar/index.js +3 -3
  144. package/dist/components/puck-block/header-sections/mega-menu-navbar/mega-menu-navbar.js +13 -6
  145. package/dist/components/puck-block/header-sections/props.d.ts +17 -5
  146. package/dist/components/puck-block/header-sections/props.js +8 -0
  147. package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +64 -0
  148. package/dist/components/puck-block/header-sections/standard-navbar/index.js +6 -4
  149. package/dist/components/puck-block/header-sections/standard-navbar/standard-navbar.js +9 -5
  150. package/dist/components/puck-block/hero-sections/carousel-hero/component.js +8 -8
  151. package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +1 -1
  152. package/dist/components/puck-block/hero-sections/carousel-hero/index.js +2 -2
  153. package/dist/components/puck-block/hero-sections/column-scroll-hero/component.d.ts +3 -3
  154. package/dist/components/puck-block/hero-sections/column-scroll-hero/component.js +14 -14
  155. package/dist/components/puck-block/hero-sections/column-scroll-hero/index.d.ts +2 -2
  156. package/dist/components/puck-block/hero-sections/column-scroll-hero/index.js +3 -3
  157. package/dist/components/puck-block/hero-sections/dual-marquee-hero/component.js +11 -11
  158. package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.d.ts +1 -1
  159. package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.js +2 -2
  160. package/dist/components/puck-block/hero-sections/fullscreen-hero/index.d.ts +1 -1
  161. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +5 -5
  162. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.d.ts +1 -1
  163. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.js +2 -2
  164. package/dist/components/puck-block/hero-sections/grid-expand-hero/component.js +16 -16
  165. package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +1 -1
  166. package/dist/components/puck-block/hero-sections/grid-expand-hero/index.js +2 -2
  167. package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/component.js +11 -11
  168. package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.d.ts +1 -1
  169. package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.js +2 -2
  170. package/dist/components/puck-block/hero-sections/media-text-hero/index.d.ts +1 -1
  171. package/dist/components/puck-block/hero-sections/mouse-track-hero/component.d.ts +3 -3
  172. package/dist/components/puck-block/hero-sections/mouse-track-hero/component.js +6 -6
  173. package/dist/components/puck-block/hero-sections/mouse-track-hero/index.js +3 -3
  174. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +1 -1
  175. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.js +2 -2
  176. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/multi-image-grid-hero.js +7 -7
  177. package/dist/components/puck-block/hero-sections/overlapping-image-hero/index.js +4 -4
  178. package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.d.ts +4 -4
  179. package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.js +16 -16
  180. package/dist/components/puck-block/hero-sections/parallax-images-hero/component.js +12 -12
  181. package/dist/components/puck-block/hero-sections/parallax-images-hero/index.d.ts +1 -1
  182. package/dist/components/puck-block/hero-sections/parallax-images-hero/index.js +2 -2
  183. package/dist/components/puck-block/hero-sections/props.d.ts +3 -3
  184. package/dist/components/puck-block/hero-sections/scatter-parallax-hero/component.js +5 -5
  185. package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.d.ts +1 -1
  186. package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.js +2 -2
  187. package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/component.js +5 -5
  188. package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.d.ts +1 -1
  189. package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.js +2 -2
  190. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/component.js +9 -9
  191. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.d.ts +1 -1
  192. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.js +2 -2
  193. package/dist/components/puck-block/hero-sections/split-hero/index.d.ts +1 -1
  194. package/dist/components/puck-block/hero-sections/stacked-hero/index.d.ts +1 -1
  195. package/dist/components/puck-block/hero-sections/sticky-expand-hero/component.js +12 -12
  196. package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +1 -1
  197. package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.js +2 -2
  198. package/dist/components/puck-block/hero-sections/sticky-video-hero/component.d.ts +2 -2
  199. package/dist/components/puck-block/hero-sections/sticky-video-hero/component.js +13 -13
  200. package/dist/components/puck-block/hero-sections/sticky-video-hero/index.d.ts +1 -1
  201. package/dist/components/puck-block/hero-sections/sticky-video-hero/index.js +3 -3
  202. package/dist/components/puck-block/hero-sections/tab-hero/component.d.ts +2 -2
  203. package/dist/components/puck-block/hero-sections/tab-hero/component.js +7 -6
  204. package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +4 -7
  205. package/dist/components/puck-block/hero-sections/tab-hero/index.js +2 -7
  206. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.d.ts +4 -4
  207. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +4 -4
  208. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/index.js +4 -4
  209. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +11 -11
  210. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.d.ts +1 -1
  211. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.js +2 -2
  212. package/dist/components/puck-block/hero-sections/zoom-grid-hero/component.js +7 -7
  213. package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.d.ts +1 -1
  214. package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.js +2 -2
  215. package/dist/components/puck-block/metrics-sections/center-media-stats/center-media-stats.js +5 -5
  216. package/dist/components/puck-block/metrics-sections/center-media-stats/index.d.ts +1 -1
  217. package/dist/components/puck-block/metrics-sections/center-media-stats/index.js +2 -2
  218. package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +4 -4
  219. package/dist/components/puck-block/metrics-sections/header-stats-row/index.d.ts +1 -1
  220. package/dist/components/puck-block/metrics-sections/header-stats-row/index.js +2 -2
  221. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.d.ts +2 -2
  222. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.js +3 -3
  223. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.d.ts +2 -2
  224. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.js +7 -7
  225. package/dist/components/puck-block/metrics-sections/props.d.ts +6 -6
  226. package/dist/components/puck-block/metrics-sections/split-stats/index.d.ts +1 -1
  227. package/dist/components/puck-block/metrics-sections/split-stats/index.js +2 -2
  228. package/dist/components/puck-block/metrics-sections/split-stats/split-stats.js +4 -4
  229. package/dist/components/puck-block/metrics-sections/tab-stats/index.d.ts +2 -2
  230. package/dist/components/puck-block/metrics-sections/tab-stats/index.js +3 -3
  231. package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.d.ts +3 -3
  232. package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +11 -11
  233. package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +13 -0
  234. package/dist/components/puck-block/pricing-sections/props.d.ts +2 -2
  235. package/dist/components/puck-block/pricing-sections/single-pricing-card/component.d.ts +2 -2
  236. package/dist/components/puck-block/pricing-sections/single-pricing-card/component.js +3 -3
  237. package/dist/components/puck-block/pricing-sections/split-pricing/component.d.ts +2 -2
  238. package/dist/components/puck-block/pricing-sections/split-pricing/component.js +4 -3
  239. package/dist/components/puck-block/pricing-sections/tab-pricing-grid/component.d.ts +2 -2
  240. package/dist/components/puck-block/pricing-sections/tab-single-pricing/component.d.ts +2 -2
  241. package/dist/components/puck-block/registry.generated.d.ts +796 -124
  242. package/dist/components/puck-block/showcase-sections/compact-timeline/component.d.ts +2 -2
  243. package/dist/components/puck-block/showcase-sections/compact-timeline/component.js +3 -3
  244. package/dist/components/puck-block/showcase-sections/compact-timeline/index.d.ts +2 -2
  245. package/dist/components/puck-block/showcase-sections/compact-timeline/index.js +2 -2
  246. package/dist/components/puck-block/showcase-sections/horizontal-timeline/component.d.ts +2 -2
  247. package/dist/components/puck-block/showcase-sections/horizontal-timeline/component.js +3 -3
  248. package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.d.ts +2 -2
  249. package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.js +2 -2
  250. package/dist/components/puck-block/showcase-sections/props.d.ts +2 -2
  251. package/dist/components/puck-block/showcase-sections/single-column-timeline/component.d.ts +2 -2
  252. package/dist/components/puck-block/showcase-sections/single-column-timeline/component.js +3 -3
  253. package/dist/components/puck-block/showcase-sections/single-column-timeline/index.d.ts +2 -2
  254. package/dist/components/puck-block/showcase-sections/single-column-timeline/index.js +2 -2
  255. package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/component.d.ts +2 -2
  256. package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/component.js +3 -3
  257. package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.d.ts +2 -2
  258. package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.js +2 -2
  259. package/dist/components/puck-block/showcase-sections/tab-timeline/component.d.ts +2 -2
  260. package/dist/components/puck-block/showcase-sections/tab-timeline/component.js +8 -8
  261. package/dist/components/puck-block/showcase-sections/tab-timeline/index.d.ts +2 -2
  262. package/dist/components/puck-block/showcase-sections/tab-timeline/index.js +2 -2
  263. package/dist/components/puck-block/showcase-sections/zigzag-timeline/component.d.ts +2 -2
  264. package/dist/components/puck-block/showcase-sections/zigzag-timeline/component.js +3 -3
  265. package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.d.ts +2 -2
  266. package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.js +2 -2
  267. package/dist/components/puck-block/team-sections/props.d.ts +2 -3
  268. package/dist/components/puck-block/team-sections/team-carousel/component.d.ts +2 -2
  269. package/dist/components/puck-block/team-sections/team-carousel/component.js +3 -3
  270. package/dist/components/puck-block/team-sections/team-grid/component.d.ts +2 -2
  271. package/dist/components/puck-block/team-sections/team-grid/component.js +3 -3
  272. package/dist/components/puck-block/team-sections/team-inline-card/component.d.ts +2 -2
  273. package/dist/components/puck-block/team-sections/team-inline-card/component.js +3 -3
  274. package/dist/components/puck-block/team-sections/team-sticky-scatter/component.d.ts +2 -2
  275. package/dist/components/puck-block/team-sections/team-sticky-scatter/component.js +3 -3
  276. package/dist/components/puck-block/team-sections/team-two-column/component.d.ts +2 -2
  277. package/dist/components/puck-block/team-sections/team-two-column/component.js +3 -3
  278. package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.d.ts +4 -4
  279. package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +8 -8
  280. package/dist/components/puck-block/testimonial-sections/centered-testimonial/component.d.ts +3 -3
  281. package/dist/components/puck-block/testimonial-sections/centered-testimonial/component.js +4 -4
  282. package/dist/components/puck-block/testimonial-sections/centered-testimonial/index.js +3 -3
  283. package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/component.d.ts +3 -3
  284. package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/component.js +3 -3
  285. package/dist/components/puck-block/testimonial-sections/image-testimonial/component.d.ts +3 -3
  286. package/dist/components/puck-block/testimonial-sections/image-testimonial/component.js +10 -10
  287. package/dist/components/puck-block/testimonial-sections/image-testimonial/index.d.ts +1 -1
  288. package/dist/components/puck-block/testimonial-sections/image-testimonial/index.js +3 -3
  289. package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/component.d.ts +3 -3
  290. package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/component.js +7 -7
  291. package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/index.d.ts +1 -1
  292. package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/index.js +3 -3
  293. package/dist/components/puck-block/testimonial-sections/marquee-testimonial/component.d.ts +2 -2
  294. package/dist/components/puck-block/testimonial-sections/marquee-testimonial/component.js +2 -2
  295. package/dist/components/puck-block/testimonial-sections/masonry-testimonial/component.d.ts +2 -2
  296. package/dist/components/puck-block/testimonial-sections/masonry-testimonial/component.js +2 -2
  297. package/dist/components/puck-block/testimonial-sections/props.d.ts +3 -4
  298. package/dist/components/puck-block/testimonial-sections/sticky-testimonial/component.d.ts +3 -2
  299. package/dist/components/puck-block/testimonial-sections/sticky-testimonial/component.js +6 -3
  300. package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.d.ts +4 -4
  301. package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +5 -5
  302. package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.d.ts +4 -4
  303. package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.js +6 -6
  304. package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.d.ts +3 -3
  305. package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.js +3 -3
  306. package/dist/components/puck-block/text-sections/blog-article/component.d.ts +4 -7
  307. package/dist/components/puck-block/text-sections/blog-article/component.js +9 -17
  308. package/dist/components/puck-block/text-sections/blog-article/index.d.ts +39 -14
  309. package/dist/components/puck-block/text-sections/blog-article/index.js +4 -10
  310. package/dist/components/puck-block/text-sections/props.d.ts +3 -3
  311. package/dist/components/puck-block/text-sections/prose-content/component.d.ts +2 -2
  312. package/dist/components/puck-block/text-sections/prose-content/component.js +3 -3
  313. package/dist/components/puck-block/text-sections/prose-content/index.d.ts +1 -1
  314. package/dist/components/puck-block/text-sections/prose-content/index.js +2 -2
  315. package/dist/components/puck-block/text-sections/prose-sidebar/component.d.ts +2 -2
  316. package/dist/components/puck-block/text-sections/prose-sidebar/index.d.ts +1 -1
  317. package/dist/components/puck-block/text-sections/side-media-content/component.js +5 -5
  318. package/dist/components/puck-block/text-sections/side-media-content/index.d.ts +1 -1
  319. package/dist/components/puck-block/text-sections/side-media-content/index.js +2 -2
  320. package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.d.ts +2 -2
  321. package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.js +4 -4
  322. package/dist/components/puck-block/text-sections/sticky-text-multi-image/index.d.ts +2 -2
  323. package/dist/components/puck-block/text-sections/sticky-text-multi-image/index.js +2 -2
  324. package/dist/components/puck-block/text-sections/text-header/component.d.ts +2 -2
  325. package/dist/components/puck-block/text-sections/text-header/index.d.ts +1 -1
  326. package/dist/components/puck-core/core/context/editor-context.d.ts +2 -0
  327. package/dist/components/puck-core/core/fields.d.ts +2 -2
  328. package/dist/components/puck-core/core/props/content.d.ts +3 -3
  329. package/dist/components/puck-core/core/props/index.d.ts +2 -2
  330. package/dist/components/puck-core/core/props/index.js +7 -0
  331. package/dist/components/puck-core/core/props/interactive.d.ts +44 -1
  332. package/dist/components/puck-core/core/props/interactive.js +24 -1
  333. package/dist/components/puck-core/core/props/media.d.ts +8 -8
  334. package/dist/components/puck-core/core/props/media.js +21 -21
  335. package/dist/components/puck-core/core/puck-fields-to-zod.d.ts +40 -0
  336. package/dist/components/puck-core/core/puck-fields-to-zod.js +113 -0
  337. package/dist/components/puck-core/core/social-icons.d.ts +5 -0
  338. package/dist/components/puck-core/core/social-icons.js +48 -0
  339. package/dist/components/puck-core/core/with-editable.js +9 -2
  340. package/dist/components/puck-core/fields/media-upload-field.d.ts +7 -0
  341. package/dist/components/puck-core/fields/{image-upload-field.js → media-upload-field.js} +71 -28
  342. package/dist/components/puck-core/index.d.ts +3 -2
  343. package/dist/components/shadcn/tabs.d.ts +2 -1
  344. package/dist/components/shadcn/tabs.js +21 -3
  345. package/dist/components/shadcn/video-iframe.d.ts +2 -1
  346. package/dist/components/shadcn/video-iframe.js +7 -6
  347. package/dist/index.js +18 -12
  348. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js +44 -0
  349. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js +43 -0
  350. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js +29 -0
  351. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js +665 -0
  352. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js +569 -0
  353. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js +410 -0
  354. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +74 -0
  355. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js +37 -0
  356. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +72 -0
  357. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js +314 -0
  358. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +95 -0
  359. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js +81 -0
  360. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js +51 -0
  361. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js +1345 -0
  362. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js +362 -0
  363. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +430 -0
  364. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js +8 -0
  365. package/package.json +3 -2
  366. package/dist/components/puck-base/image.d.ts +0 -6
  367. package/dist/components/puck-base/image.js +0 -360
  368. package/dist/components/puck-core/fields/image-upload-field.d.ts +0 -7
@@ -1,12 +1,12 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { CompoundImage } from "../../../puck-base/image.js";
2
+ import { CompoundMedia } from "../../../puck-base/media.js";
3
3
  import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
5
  const StickyTextMultiImage = (props) => {
6
6
  const {
7
7
  heading,
8
8
  prose,
9
- images = [],
9
+ medias = [],
10
10
  styles
11
11
  } = {
12
12
  ...StickyTextMultiImageDefaults,
@@ -22,7 +22,7 @@ const StickyTextMultiImage = (props) => {
22
22
  /* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
23
23
  /* @__PURE__ */ jsx("div", { className: "prose", dangerouslySetInnerHTML: { __html: prose } })
24
24
  ] });
25
- const imagesContent = /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 md:gap-8", children: images.map((img, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CompoundImage, { src: img.src, alt: img.alt, className: "w-full object-cover" }) }, index)) });
25
+ const imagesContent = /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 md:gap-8", children: medias.map((img, index) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CompoundMedia, { src: img.src, alt: img.alt, className: "w-full object-cover" }) }, index)) });
26
26
  return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 items-start gap-x-12 gap-y-16 md:gap-y-20 lg:grid-cols-[1fr_1.5fr] lg:gap-x-20", children: contentPosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
27
27
  textContent,
28
28
  imagesContent
@@ -34,7 +34,7 @@ const StickyTextMultiImage = (props) => {
34
34
  const StickyTextMultiImageDefaults = {
35
35
  heading: "Short heading goes here",
36
36
  prose: `<p>Morbi sed imperdiet in ipsum, adipiscing elit dui lectus. Tellus id scelerisque est ultricies ultricies. Duis est sit sed leo nisl, blandit elit sagittis. Quisque tristique consequat quam sed. Nisl at scelerisque amet nulla purus habitasse.</p><p>Nunc sed faucibus bibendum feugiat sed interdum. Ipsum egestas condimentum mi massa. In tincidunt pharetra consectetur sed duis facilisis metus.</p>`,
37
- images: [
37
+ medias: [
38
38
  { src: "https://picsum.photos/seed/sticky-img1/800/600", alt: "Placeholder image 1" },
39
39
  { src: "https://picsum.photos/seed/sticky-img2/800/600", alt: "Placeholder image 2" },
40
40
  { src: "https://picsum.photos/seed/sticky-img3/800/600", alt: "Placeholder image 3" }
@@ -11,7 +11,7 @@ declare const conf: {
11
11
  prose: {
12
12
  type: string;
13
13
  };
14
- images: {
14
+ medias: {
15
15
  readonly type: "array";
16
16
  readonly max: 10;
17
17
  readonly getItemSummary: (item: {
@@ -70,7 +70,7 @@ declare const conf: {
70
70
  };
71
71
  defaultProps: Partial<import("../props").TextSectionBaseProps> & {
72
72
  prose: string;
73
- images: import("@/components/puck-core/core/props/media").BaseImage[];
73
+ medias: import("@/components/puck-core/core/props/media").BaseMedia[];
74
74
  };
75
75
  render: (props: StickyTextMultiImageProps) => import("react/jsx-runtime").JSX.Element;
76
76
  };
@@ -1,13 +1,13 @@
1
1
  import { StickyTextMultiImage, StickyTextMultiImageDefaults } from "./component.js";
2
2
  import { headingField } from "../../../puck-core/core/props/content.js";
3
- import { imagesField } from "../../../puck-core/core/props/media.js";
3
+ import { mediasField } from "../../../puck-core/core/props/media.js";
4
4
  import { textStyleFields } from "../props.js";
5
5
  import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
6
6
  const conf = {
7
7
  fields: {
8
8
  heading: headingField,
9
9
  prose: { type: "textarea" },
10
- images: imagesField,
10
+ medias: mediasField,
11
11
  styles: {
12
12
  type: "object",
13
13
  label: "Styles",
@@ -1,6 +1,6 @@
1
- import type { TextComponentProps, TextSectionBaseProps, BaseImage } from "../props";
1
+ import type { TextComponentProps, TextSectionBaseProps, BaseMedia } from "../props";
2
2
  type TextHeaderExtra = {
3
- bgImage?: BaseImage;
3
+ bgImage?: BaseMedia;
4
4
  bgVideo?: string;
5
5
  };
6
6
  export type TextHeaderProps = TextComponentProps<TextHeaderExtra>;
@@ -256,7 +256,7 @@ declare const conf: {
256
256
  };
257
257
  };
258
258
  defaultProps: Partial<import("../props").TextSectionBaseProps> & {
259
- bgImage?: import("@/components/puck-core/core/props/media").BaseImage;
259
+ bgImage?: import("@/components/puck-core/core/props/media").BaseMedia;
260
260
  bgVideo?: string;
261
261
  };
262
262
  render: (props: TextHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -19,6 +19,8 @@ type EditorContextValue = {
19
19
  sitePages?: SitePage[];
20
20
  /** Google Maps API Key,用于 LocationField 地址搜索 */
21
21
  googleMapsApiKey?: string;
22
+ /** 品牌 ID,用于资产库归属 */
23
+ brandId?: string;
22
24
  };
23
25
  export declare const EditorContextProvider: import("react").Provider<EditorContextValue>;
24
26
  export declare const useEditorContext: () => EditorContextValue;
@@ -7,13 +7,13 @@
7
7
  * 迁移对照:
8
8
  * interactive.ts → action / button / badge / icon / link
9
9
  * content.ts → heading / description / feature / card
10
- * media.ts → image / gallery
10
+ * media.ts → media / medias
11
11
  * form.ts → form / field / location
12
12
  * section.ts → padding / sectionStyle
13
13
  */
14
14
  export { iconField as icon, actionField as action, actionDefaults, buttonField as button, buttonDefaults, buttonsField as buttons, badgeField as badge, } from "./props/interactive";
15
15
  export { headingField as heading, descriptionField as description, featuresField as features, contentFields, contentFieldsWithFeatures, cardField as card, cardsField as cards, } from "./props";
16
- export { imageField as image, imagesField as images, getPlaceholderImageUrl, image16x9Placeholder, image1x1Placeholder, image9x16Placeholder, } from "./props/media";
16
+ export { mediaField as media, mediasField as medias, getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, } from "./props/media";
17
17
  export { formFieldField as field, formFieldDefaults as fieldDefaults, formField as form, formDefaults, } from "./props/form";
18
18
  export { type MapLocation, getMapEmbedUrl, getDirectionsUrl, locationDefaults, locationField as location, } from "./props/form";
19
19
  export * from "./styles";
@@ -5,7 +5,7 @@
5
5
  * 每个 prop 按 Type → Field → Defaults 顺序排列
6
6
  */
7
7
  import type { IconName } from "./interactive";
8
- import type { BaseImage } from "./media";
8
+ import type { BaseMedia } from "./media";
9
9
  export declare const headingField: {
10
10
  readonly type: "text";
11
11
  readonly contentEditable: true;
@@ -19,8 +19,8 @@ export interface BaseFeatureItem {
19
19
  name?: string;
20
20
  description?: string;
21
21
  }
22
- export interface FeatureItemWithImage extends BaseFeatureItem {
23
- image?: BaseImage;
22
+ export interface FeatureItemWithMedia extends BaseFeatureItem {
23
+ media?: BaseMedia;
24
24
  }
25
25
  export type Feature = {
26
26
  icon?: IconName;
@@ -5,8 +5,8 @@
5
5
  * 使用方:import { BaseButton, buttonField, ... } from "@/components/puck-core/core/props"
6
6
  */
7
7
  export { type IconName, iconField, type ActionType, type Action, resolveActionUrl, actionField, actionDefaults, type ButtonVariant, type ButtonSize, type BaseButton, buttonField, buttonDefaults, buttonsField, type BadgeVariant, type BaseBadge, badgeField, type BaseLink, type BaseSocialLink, } from "./interactive";
8
- export { headingField, descriptionField, type BaseFeatureItem, type FeatureItemWithImage, type Feature, featuresField, cardField, cardsField, } from "./content";
9
- export { type BaseImage, imageField, imagesField, getPlaceholderImageUrl, image16x9Placeholder, image1x1Placeholder, image9x16Placeholder, } from "./media";
8
+ export { headingField, descriptionField, type BaseFeatureItem, type FeatureItemWithMedia, type Feature, featuresField, cardField, cardsField, } from "./content";
9
+ export { type BaseMedia, mediaField, mediasField, getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, } from "./media";
10
10
  export { fieldTypes, type FieldTypes, type CompoundFieldProps, formMethods, type FormMethods, type CompoundFormProps, type BaseFormFieldType, type BaseFormField, formFieldField, formFieldDefaults, formField, formDefaults, type MapLocation, getMapEmbedUrl, getDirectionsUrl, locationDefaults, locationField, } from "./form";
11
11
  export { type PaddingLevel, type SectionPadding, type BaseSectionStyle, type BaseSectionStyles, } from "./section";
12
12
  /** heading + description + badge + buttons */
@@ -2,6 +2,7 @@ import { buttonsField, badgeField } from "./interactive.js";
2
2
  import { actionDefaults, actionField, buttonDefaults, buttonField, iconField, resolveActionUrl } from "./interactive.js";
3
3
  import { descriptionField, headingField, featuresField } from "./content.js";
4
4
  import { cardField, cardsField } from "./content.js";
5
+ import { getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, mediaField, mediasField } from "./media.js";
5
6
  const contentFields = {
6
7
  heading: headingField,
7
8
  description: descriptionField,
@@ -28,7 +29,13 @@ export {
28
29
  contentFieldsWithFeatures,
29
30
  descriptionField,
30
31
  featuresField,
32
+ getPlaceholderMediaUrl,
31
33
  headingField,
32
34
  iconField,
35
+ media16x9Placeholder,
36
+ media1x1Placeholder,
37
+ media9x16Placeholder,
38
+ mediaField,
39
+ mediasField,
33
40
  resolveActionUrl
34
41
  };
@@ -238,7 +238,50 @@ export interface BaseLink {
238
238
  label: string;
239
239
  action?: Action;
240
240
  }
241
+ export type SocialPlatform = "twitter" | "facebook" | "instagram" | "linkedin" | "youtube" | "github" | "tiktok" | "discord";
241
242
  export interface BaseSocialLink {
242
- platform: string;
243
+ platform: SocialPlatform;
243
244
  url: string;
244
245
  }
246
+ export declare const socialLinksField: {
247
+ readonly type: "array";
248
+ readonly label: "Social Links";
249
+ readonly getItemSummary: (item: {
250
+ platform?: string;
251
+ }, i?: number) => string;
252
+ readonly arrayFields: {
253
+ readonly platform: {
254
+ readonly type: "select";
255
+ readonly label: "Platform";
256
+ readonly options: readonly [{
257
+ readonly label: "Twitter / X";
258
+ readonly value: "twitter";
259
+ }, {
260
+ readonly label: "Facebook";
261
+ readonly value: "facebook";
262
+ }, {
263
+ readonly label: "Instagram";
264
+ readonly value: "instagram";
265
+ }, {
266
+ readonly label: "LinkedIn";
267
+ readonly value: "linkedin";
268
+ }, {
269
+ readonly label: "YouTube";
270
+ readonly value: "youtube";
271
+ }, {
272
+ readonly label: "GitHub";
273
+ readonly value: "github";
274
+ }, {
275
+ readonly label: "TikTok";
276
+ readonly value: "tiktok";
277
+ }, {
278
+ readonly label: "Discord";
279
+ readonly value: "discord";
280
+ }];
281
+ };
282
+ readonly url: {
283
+ readonly type: "text";
284
+ readonly label: "URL";
285
+ };
286
+ };
287
+ };
@@ -106,6 +106,28 @@ const badgeField = {
106
106
  }
107
107
  }
108
108
  };
109
+ const socialLinksField = {
110
+ type: "array",
111
+ label: "Social Links",
112
+ getItemSummary: (item, i = 0) => item.platform || `Social ${i + 1}`,
113
+ arrayFields: {
114
+ platform: {
115
+ type: "select",
116
+ label: "Platform",
117
+ options: [
118
+ { label: "Twitter / X", value: "twitter" },
119
+ { label: "Facebook", value: "facebook" },
120
+ { label: "Instagram", value: "instagram" },
121
+ { label: "LinkedIn", value: "linkedin" },
122
+ { label: "YouTube", value: "youtube" },
123
+ { label: "GitHub", value: "github" },
124
+ { label: "TikTok", value: "tiktok" },
125
+ { label: "Discord", value: "discord" }
126
+ ]
127
+ },
128
+ url: { type: "text", label: "URL" }
129
+ }
130
+ };
109
131
  export {
110
132
  actionDefaults,
111
133
  actionField,
@@ -114,5 +136,6 @@ export {
114
136
  buttonField,
115
137
  buttonsField,
116
138
  iconField,
117
- resolveActionUrl
139
+ resolveActionUrl,
140
+ socialLinksField
118
141
  };
@@ -1,16 +1,16 @@
1
1
  /**
2
- * 媒体类 Props — 图片 / 视频 / 图库
2
+ * 媒体类 Props — 图片 / 视频 / Embed
3
3
  *
4
4
  * 每个 prop 按 Type → Field → Defaults 顺序排列
5
5
  */
6
6
  import type { Field } from "@puckeditor/core";
7
- export interface BaseImage {
7
+ export interface BaseMedia {
8
8
  src: string;
9
9
  alt?: string;
10
10
  aspectRatio?: "16x9" | "1x1" | "9x16" | "4x3" | "auto";
11
11
  className?: string;
12
12
  }
13
- export declare const imageField: {
13
+ export declare const mediaField: {
14
14
  type: "object";
15
15
  objectFields: {
16
16
  src: Field<string>;
@@ -19,20 +19,20 @@ export declare const imageField: {
19
19
  };
20
20
  };
21
21
  };
22
- export declare const getPlaceholderImageUrl: (size: string, text?: string) => string;
23
- export declare const image16x9Placeholder: {
22
+ export declare const getPlaceholderMediaUrl: (size: string, text?: string) => string;
23
+ export declare const media16x9Placeholder: {
24
24
  alt: string;
25
25
  src: string;
26
26
  };
27
- export declare const image1x1Placeholder: {
27
+ export declare const media1x1Placeholder: {
28
28
  alt: string;
29
29
  src: string;
30
30
  };
31
- export declare const image9x16Placeholder: {
31
+ export declare const media9x16Placeholder: {
32
32
  alt: string;
33
33
  src: string;
34
34
  };
35
- export declare const imagesField: {
35
+ export declare const mediasField: {
36
36
  readonly type: "array";
37
37
  readonly max: 10;
38
38
  readonly getItemSummary: (item: {
@@ -1,50 +1,50 @@
1
- import { ImageUploadField } from "../../fields/image-upload-field.js";
2
- const imageField = {
1
+ import { MediaUploadField } from "../../fields/media-upload-field.js";
2
+ const mediaField = {
3
3
  type: "object",
4
4
  objectFields: {
5
5
  src: {
6
6
  type: "custom",
7
- label: "Image",
8
- render: ImageUploadField
7
+ label: "Media",
8
+ render: MediaUploadField
9
9
  },
10
10
  alt: { type: "text" }
11
11
  }
12
12
  };
13
- const getPlaceholderImageUrl = (size, text = "Placeholder Image") => {
13
+ const getPlaceholderMediaUrl = (size, text = "Placeholder Image") => {
14
14
  const [w, h] = size.split("x");
15
15
  return `https://picsum.photos/seed/${encodeURIComponent(text)}/${w}/${h}`;
16
16
  };
17
- const image16x9Placeholder = {
17
+ const media16x9Placeholder = {
18
18
  alt: "16/9 aspect ratio accessible description of the image",
19
- src: getPlaceholderImageUrl("1920x1080")
19
+ src: getPlaceholderMediaUrl("1920x1080")
20
20
  };
21
- const image1x1Placeholder = {
21
+ const media1x1Placeholder = {
22
22
  alt: "1/1 aspect ratio An accessible description of the image",
23
- src: getPlaceholderImageUrl("1000x1000")
23
+ src: getPlaceholderMediaUrl("1000x1000")
24
24
  };
25
- const image9x16Placeholder = {
25
+ const media9x16Placeholder = {
26
26
  alt: "9/16 accessible description of the image",
27
- src: getPlaceholderImageUrl("1080x1920")
27
+ src: getPlaceholderMediaUrl("1080x1920")
28
28
  };
29
- const imagesField = {
29
+ const mediasField = {
30
30
  type: "array",
31
31
  max: 10,
32
32
  getItemSummary: (item, index = 0) => {
33
33
  if (item.alt) {
34
34
  return `${item.alt.slice(0, 12)}${item.alt.length > 12 ? "..." : ""}`;
35
35
  }
36
- return `Image ${index + 1}`;
36
+ return `Media ${index + 1}`;
37
37
  },
38
38
  arrayFields: {
39
- ...imageField.objectFields
39
+ ...mediaField.objectFields
40
40
  },
41
- defaultItemProps: image16x9Placeholder
41
+ defaultItemProps: media16x9Placeholder
42
42
  };
43
43
  export {
44
- getPlaceholderImageUrl,
45
- image16x9Placeholder,
46
- image1x1Placeholder,
47
- image9x16Placeholder,
48
- imageField,
49
- imagesField
44
+ getPlaceholderMediaUrl,
45
+ media16x9Placeholder,
46
+ media1x1Placeholder,
47
+ media9x16Placeholder,
48
+ mediaField,
49
+ mediasField
50
50
  };
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ type PuckFieldOption = {
3
+ label: string;
4
+ value: string;
5
+ };
6
+ type PuckField = {
7
+ type: string;
8
+ options?: PuckFieldOption[];
9
+ objectFields?: Record<string, PuckField>;
10
+ arrayFields?: Record<string, PuckField>;
11
+ max?: number;
12
+ ai?: {
13
+ instructions?: string;
14
+ exclude?: boolean;
15
+ stream?: boolean;
16
+ };
17
+ [key: string]: unknown;
18
+ };
19
+ /**
20
+ * Registry for custom field schemas.
21
+ * Key: custom field render component name or identifier.
22
+ * Value: Zod schema for that field.
23
+ *
24
+ * Pre-registered:
25
+ * - IconPickerField → string (icon name)
26
+ * - ActionField → Action object
27
+ * - MediaUploadField → string (URL)
28
+ * - LocationField → MapLocation object
29
+ */
30
+ export declare const customSchemaRegistry: Map<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
31
+ /**
32
+ * Convert a Puck component's `fields` config into a Zod schema at runtime.
33
+ *
34
+ * @example
35
+ * const schema = puckFieldsToZod(conf.fields);
36
+ * // Use with AI structured output:
37
+ * const result = schema.parse(aiOutput);
38
+ */
39
+ export declare function puckFieldsToZod(fields: Record<string, PuckField>): z.ZodObject<Record<string, z.ZodType>>;
40
+ export {};
@@ -0,0 +1,113 @@
1
+ import { object, string, enum as _enum, number, array, record, any, unknown } from "../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js";
2
+ const actionTypeValues = [
3
+ "page",
4
+ "external",
5
+ "scroll",
6
+ "email",
7
+ "phone",
8
+ "section",
9
+ "download",
10
+ "none"
11
+ ];
12
+ const actionSchema = object({
13
+ type: _enum(actionTypeValues).optional(),
14
+ pageUrl: string().optional(),
15
+ externalUrl: string().optional(),
16
+ openInNewTab: string().optional(),
17
+ email: string().optional(),
18
+ subject: string().optional(),
19
+ phone: string().optional(),
20
+ sectionId: string().optional(),
21
+ downloadUrl: string().optional()
22
+ }).optional();
23
+ const iconSchema = string().optional();
24
+ const mediaUploadSchema = string().optional();
25
+ const locationSchema = object({
26
+ address: string(),
27
+ lat: number(),
28
+ lng: number(),
29
+ zoom: number().optional(),
30
+ placeId: string().optional()
31
+ }).optional();
32
+ const customSchemaRegistry = /* @__PURE__ */ new Map([
33
+ ["IconPickerField", iconSchema],
34
+ ["ActionField", actionSchema],
35
+ ["MediaUploadField", mediaUploadSchema],
36
+ ["LocationField", locationSchema]
37
+ ]);
38
+ function resolveCustomField(field) {
39
+ const render = field.render;
40
+ const name = render == null ? void 0 : render.name;
41
+ if (name && customSchemaRegistry.has(name)) {
42
+ return customSchemaRegistry.get(name);
43
+ }
44
+ return any();
45
+ }
46
+ function withDescribe(schema, field) {
47
+ var _a;
48
+ const desc = (_a = field.ai) == null ? void 0 : _a.instructions;
49
+ return desc ? schema.describe(desc) : schema;
50
+ }
51
+ function puckFieldToZod(field) {
52
+ var _a, _b;
53
+ let schema;
54
+ switch (field.type) {
55
+ case "text":
56
+ case "textarea":
57
+ schema = string().optional();
58
+ break;
59
+ case "select":
60
+ case "radio": {
61
+ const values = (field.options ?? []).map((o) => o.value);
62
+ schema = values.length === 0 ? string().optional() : _enum(values).optional();
63
+ break;
64
+ }
65
+ case "object": {
66
+ if (!field.objectFields || Object.keys(field.objectFields).length === 0) {
67
+ schema = record(string(), unknown()).optional();
68
+ } else {
69
+ const shape = {};
70
+ for (const [k, v] of Object.entries(field.objectFields)) {
71
+ if ((_a = v.ai) == null ? void 0 : _a.exclude) continue;
72
+ shape[k] = puckFieldToZod(v);
73
+ }
74
+ schema = object(shape).optional();
75
+ }
76
+ break;
77
+ }
78
+ case "array": {
79
+ if (!field.arrayFields || Object.keys(field.arrayFields).length === 0) {
80
+ schema = array(unknown()).optional();
81
+ } else {
82
+ const itemShape = {};
83
+ for (const [k, v] of Object.entries(field.arrayFields)) {
84
+ if ((_b = v.ai) == null ? void 0 : _b.exclude) continue;
85
+ itemShape[k] = puckFieldToZod(v);
86
+ }
87
+ let arraySchema = array(object(itemShape));
88
+ if (field.max) arraySchema = arraySchema.max(field.max);
89
+ schema = arraySchema.optional();
90
+ }
91
+ break;
92
+ }
93
+ case "custom":
94
+ schema = resolveCustomField(field);
95
+ break;
96
+ default:
97
+ schema = any();
98
+ }
99
+ return withDescribe(schema, field);
100
+ }
101
+ function puckFieldsToZod(fields) {
102
+ var _a;
103
+ const shape = {};
104
+ for (const [key, field] of Object.entries(fields)) {
105
+ if ((_a = field.ai) == null ? void 0 : _a.exclude) continue;
106
+ shape[key] = puckFieldToZod(field);
107
+ }
108
+ return object(shape);
109
+ }
110
+ export {
111
+ customSchemaRegistry,
112
+ puckFieldsToZod
113
+ };
@@ -0,0 +1,5 @@
1
+ import type { SocialPlatform } from "./props/interactive";
2
+ export declare function SocialIcon({ platform, className, }: {
3
+ platform: SocialPlatform;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,48 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../../utils/css-utils.js";
3
+ function InstagramIcon(props) {
4
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9S287.7 141 224.1 141m0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7s74.7 33.5 74.7 74.7s-33.6 74.7-74.7 74.7m146.4-194.3c0 14.9-12 26.8-26.8 26.8c-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8s26.8 12 26.8 26.8m76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9c-26.2-26.2-58-34.4-93.9-36.2c-37-2.1-147.9-2.1-184.9 0c-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9c1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0c35.9-1.7 67.7-9.9 93.9-36.2c26.2-26.2 34.4-58 36.2-93.9c2.1-37 2.1-147.8 0-184.8M398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6c-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6c-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6c29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6c11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1" }) });
5
+ }
6
+ function FacebookIcon(props) {
7
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256c0 120 82.7 220.8 194.2 248.5V334.2h-52.8V256h52.8v-33.7c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287v175.9C413.8 494.8 512 386.9 512 256" }) });
8
+ }
9
+ function XTwitterIcon(props) {
10
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z" }) });
11
+ }
12
+ function YouTubeIcon(props) {
13
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M508.64 148.79c0-45-33.1-81.2-74-81.2C379.24 65 322.74 64 265 64h-18c-57.6 0-114.2 1-169.6 3.6C36.6 67.6 3.5 104 3.5 149C1 184.59-.06 220.19 0 255.79q-.15 53.4 3.4 106.9c0 45 33.1 81.5 73.9 81.5c58.2 2.7 117.9 3.9 178.6 3.8q91.2.3 178.6-3.8c40.9 0 74-36.5 74-81.5c2.4-35.7 3.5-71.3 3.4-107q.34-53.4-3.26-106.9M207 353.89v-196.5l145 98.2Z" }) });
14
+ }
15
+ function LinkedInIcon(props) {
16
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3M135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5c0 21.3-17.2 38.5-38.5 38.5m282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7c-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5c67.2 0 79.7 44.3 79.7 101.9z" }) });
17
+ }
18
+ function TikTokIcon(props) {
19
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M448 209.91a210.06 210.06 0 0 1-122.77-39.25v178.72A162.55 162.55 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121 121 0 0 0 1.86 22.17A122.18 122.18 0 0 0 381 102.39a121.43 121.43 0 0 0 67 20.14Z" }) });
20
+ }
21
+ function GitHubIcon(props) {
22
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 496 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6c-3.3.3-5.6-1.3-5.6-3.6c0-2 2.3-3.6 5.2-3.6c3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9c2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9c.3 2 2.9 3.3 5.9 2.6c2.9-.7 4.9-2.6 4.6-4.6c-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2c12.8 2.3 17.3-5.6 17.3-12.1c0-6.2-.3-40.4-.3-61.4c0 0-70 15-84.7-29.8c0 0-11.4-29.1-27.8-36.6c0 0-22.9-15.7 1.6-15.4c0 0 24.9 2 38.6 25.8c21.9 38.6 58.6 27.5 72.9 20.9c2.3-16 8.8-27.1 16-33.7c-55.9-6.2-112.3-14.3-112.3-110.5c0-27.5 7.6-41.3 23.6-58.9c-2.6-6.5-11.1-33.3 2.6-67.9c20.9-6.5 69 27 69 27c20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27c13.7 34.7 5.2 61.4 2.6 67.9c16 17.7 25.8 31.5 25.8 58.9c0 96.5-58.9 104.2-114.8 110.5c9.2 7.9 17 22.9 17 46.4c0 33.7-.3 75.4-.3 83.6c0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252C496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2c1.6 1.6 3.9 2.3 5.2 1c1.3-1 1-3.3-.7-5.2c-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9c1.6 1 3.6.7 4.3-.7c.7-1.3-.3-2.9-2.3-3.9c-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2c2.3 2.3 5.2 2.6 6.5 1c1.3-1.3.7-4.3-1.3-6.2c-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2c-1.4-2.3-4-3.3-5.6-2" }) });
23
+ }
24
+ function DiscordIcon(props) {
25
+ return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M524.531 69.836a1.5 1.5 0 0 0-.764-.7A485 485 0 0 0 404.081 32.03a1.82 1.82 0 0 0-1.923.91a338 338 0 0 0-14.9 30.6a447.9 447.9 0 0 0-134.426 0a310 310 0 0 0-15.135-30.6a1.89 1.89 0 0 0-1.924-.91a483.7 483.7 0 0 0-119.688 37.107a1.7 1.7 0 0 0-.788.676C39.068 183.651 18.186 294.69 28.43 404.354a2.02 2.02 0 0 0 .765 1.375a487.7 487.7 0 0 0 146.825 74.189a1.9 1.9 0 0 0 2.063-.676A348 348 0 0 0 208.12 430.4a1.86 1.86 0 0 0-1.019-2.588a321 321 0 0 1-45.868-21.853a1.885 1.885 0 0 1-.185-3.126a251 251 0 0 0 9.109-7.137a1.82 1.82 0 0 1 1.9-.256c96.229 43.917 200.41 43.917 295.5 0a1.81 1.81 0 0 1 1.924.233a235 235 0 0 0 9.132 7.16a1.884 1.884 0 0 1-.162 3.126a301.4 301.4 0 0 1-45.89 21.83a1.875 1.875 0 0 0-1 2.611a391 391 0 0 0 30.014 48.815a1.86 1.86 0 0 0 2.063.7A486 486 0 0 0 610.7 405.729a1.88 1.88 0 0 0 .765-1.352c12.264-126.783-20.532-236.912-86.934-334.541M222.491 337.58c-28.972 0-52.844-26.587-52.844-59.239s23.409-59.241 52.844-59.241c29.665 0 53.306 26.82 52.843 59.239c0 32.654-23.41 59.241-52.843 59.241m195.38 0c-28.971 0-52.843-26.587-52.843-59.239s23.409-59.241 52.843-59.241c29.667 0 53.307 26.82 52.844 59.239c0 32.654-23.177 59.241-52.844 59.241" }) });
26
+ }
27
+ const platformConfig = {
28
+ twitter: { icon: XTwitterIcon, color: "#000000" },
29
+ facebook: { icon: FacebookIcon, color: "#1877F2" },
30
+ instagram: { icon: InstagramIcon, color: "#E4405F" },
31
+ linkedin: { icon: LinkedInIcon, color: "#0A66C2" },
32
+ youtube: { icon: YouTubeIcon, color: "#FF0000" },
33
+ github: { icon: GitHubIcon, color: "#181717" },
34
+ tiktok: { icon: TikTokIcon, color: "#000000" },
35
+ discord: { icon: DiscordIcon, color: "#5865F2" }
36
+ };
37
+ function SocialIcon({
38
+ platform,
39
+ className = "size-6"
40
+ }) {
41
+ const config = platformConfig[platform];
42
+ if (!config) return null;
43
+ const { icon: Icon, color } = config;
44
+ return /* @__PURE__ */ jsx(Icon, { className: cn(className), style: { color } });
45
+ }
46
+ export {
47
+ SocialIcon
48
+ };
@@ -6,7 +6,7 @@ import { usePuckDispatch, usePuckAppState } from "./hooks.js";
6
6
  import { Pencil } from "lucide-react";
7
7
  import { useEditorContext } from "./context/editor-context.js";
8
8
  import set from "../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/set.js";
9
- const BLOCK_LEVEL_TYPES = /* @__PURE__ */ new Set(["image"]);
9
+ const BLOCK_LEVEL_TYPES = /* @__PURE__ */ new Set(["image", "media"]);
10
10
  function getComponentIdFromDOM(el) {
11
11
  if (!el) return null;
12
12
  const puckEl = el.closest("[data-puck-component]");
@@ -26,16 +26,20 @@ function withEditable(Component, config) {
26
26
  }, [isBlock]);
27
27
  const getLocation = useCallback(() => {
28
28
  const componentId = getComponentIdFromDOM(wrapperRef.current);
29
+ console.log("[withEditable] getLocation — componentId:", componentId, "hasData:", !!(appState == null ? void 0 : appState.data));
29
30
  if (!componentId || !(appState == null ? void 0 : appState.data)) return null;
30
31
  const component = findComponentById(appState.data, componentId);
32
+ console.log("[withEditable] getLocation — component found:", !!component);
31
33
  if (!component) return null;
32
34
  const propPath = findPropPath(component.props, props, config.fields);
35
+ console.log("[withEditable] getLocation — propPath:", propPath, "fieldKeys:", Object.keys(config.fields), "targetProps:", { src: props.src, alt: props.alt });
33
36
  if (propPath === null) return null;
34
37
  return { componentId, propPath };
35
38
  }, [appState == null ? void 0 : appState.data, props]);
36
39
  const handleSave = useCallback(
37
40
  (updated) => {
38
41
  const location = getLocation();
42
+ console.log("[withEditable] handleSave — location:", location, "updated:", updated);
39
43
  if (!location) return;
40
44
  dispatch({
41
45
  type: "setData",
@@ -86,7 +90,10 @@ function withEditable(Component, config) {
86
90
  {
87
91
  ref: portalRef,
88
92
  onClick: handleEdit,
89
- style: { transform: `scale(${inverseScale})`, transformOrigin: "center center" },
93
+ style: {
94
+ transform: `scale(${inverseScale})`,
95
+ transformOrigin: "center center"
96
+ },
90
97
  className: "flex h-8 w-8 items-center justify-center rounded-full bg-black/50 shadow-md backdrop-blur-sm",
91
98
  children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4 text-white" })
92
99
  }
@@ -0,0 +1,7 @@
1
+ interface MediaUploadFieldProps {
2
+ name: string;
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ }
6
+ export declare function MediaUploadField({ name, value, onChange, }: MediaUploadFieldProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};