efficient-web-builder 1.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +2 -1
  3. package/dist/components/AddBlockRow.d.ts +1 -7
  4. package/dist/components/AddBlockRow.js +1 -1
  5. package/dist/components/AddChildRow.d.ts +1 -6
  6. package/dist/components/AddChildRow.js +1 -1
  7. package/dist/components/AddSidePanel.d.ts +2 -39
  8. package/dist/components/AddSidePanel.js +1 -1
  9. package/dist/components/BlockGapField.js +1 -1
  10. package/dist/components/BlogPostSource.js +1 -1
  11. package/dist/components/Breadcrumb.js +1 -1
  12. package/dist/components/Btn.js +1 -1
  13. package/dist/components/CardShadowField.js +1 -1
  14. package/dist/components/CategoryBar.js +1 -1
  15. package/dist/components/ChartSection.js +1 -1
  16. package/dist/components/ChatSettingsPanel.js +1 -1
  17. package/dist/components/ClearColoursDialog.js +1 -1
  18. package/dist/components/ContactLocations.js +5 -5
  19. package/dist/components/CornersField.d.ts +0 -1
  20. package/dist/components/CornersField.js +1 -1
  21. package/dist/components/DocBody.js +1 -1
  22. package/dist/components/DuplicateToPageMenu.js +1 -1
  23. package/dist/components/EditorScreenMount.d.ts +1 -0
  24. package/dist/components/EditorScreenMount.js +1 -0
  25. package/dist/components/EditorStoreProvider.d.ts +1 -0
  26. package/dist/components/EditorStoreProvider.js +1 -0
  27. package/dist/components/FeaturedCover.js +1 -1
  28. package/dist/components/FieldGlyph.js +1 -1
  29. package/dist/components/Footprint.js +1 -1
  30. package/dist/components/HeadingAudit.js +1 -1
  31. package/dist/components/HeroImageField.js +1 -1
  32. package/dist/components/HeroSection.d.ts +2 -6
  33. package/dist/components/HeroSection.js +4 -4
  34. package/dist/components/HoverEffectField.js +1 -1
  35. package/dist/components/ImageBlock.js +1 -1
  36. package/dist/components/ImageFocusRow.js +1 -1
  37. package/dist/components/KeepHint.d.ts +5 -0
  38. package/dist/components/KeepHint.js +1 -0
  39. package/dist/components/LocationsGroupedField.js +1 -1
  40. package/dist/components/LongRead.js +1 -1
  41. package/dist/components/MediaSidePanel.d.ts +1 -6
  42. package/dist/components/MediaSidePanel.js +1 -1
  43. package/dist/components/MediaUploadField.js +1 -1
  44. package/dist/components/MockupSection.js +1 -1
  45. package/dist/components/MultiSelectField.d.ts +4 -1
  46. package/dist/components/MultiSelectField.js +1 -1
  47. package/dist/components/NodeContextMenu.d.ts +2 -96
  48. package/dist/components/NodeContextMenu.js +1 -1
  49. package/dist/components/PageEditGuardNotices.d.ts +1 -1
  50. package/dist/components/PageEditGuardNotices.js +1 -1
  51. package/dist/components/PagesPanel.js +1 -1
  52. package/dist/components/PanelToggleIcon.d.ts +1 -3
  53. package/dist/components/PanelToggleIcon.js +1 -1
  54. package/dist/components/PartResetDot.js +1 -1
  55. package/dist/components/PartSettingsPanel.d.ts +5 -0
  56. package/dist/components/PartSettingsPanel.js +1 -1
  57. package/dist/components/PhotographyField.js +1 -1
  58. package/dist/components/PostCard.js +1 -1
  59. package/dist/components/PreviewDeviceContext.d.ts +2 -4
  60. package/dist/components/PreviewDeviceContext.js +1 -1
  61. package/dist/components/PreviewPartsContext.d.ts +1 -3
  62. package/dist/components/PreviewPartsContext.js +1 -1
  63. package/dist/components/ProcessSteps.js +1 -1
  64. package/dist/components/RMark.js +1 -1
  65. package/dist/components/Reel.js +1 -1
  66. package/dist/components/SearchSelectField.d.ts +3 -1
  67. package/dist/components/SearchSelectField.js +1 -1
  68. package/dist/components/SectionEditor.d.ts +2 -5
  69. package/dist/components/SectionEditor.js +1 -1
  70. package/dist/components/SectionEditorShell.d.ts +1 -1
  71. package/dist/components/SectionEditorShell.js +1 -1
  72. package/dist/components/SectionHeader.js +1 -1
  73. package/dist/components/SectionThemePicker.d.ts +3 -1
  74. package/dist/components/SectionThemePicker.js +1 -1
  75. package/dist/components/SectionThumbnail.js +1 -1
  76. package/dist/components/ShadowColourField.js +1 -1
  77. package/dist/components/SidePanelHead.d.ts +1 -23
  78. package/dist/components/SidePanelHead.js +1 -1
  79. package/dist/components/SideSpaceField.d.ts +0 -1
  80. package/dist/components/SideSpaceField.js +1 -1
  81. package/dist/components/SiteEditorProvider.d.ts +3 -10
  82. package/dist/components/SiteEditorProvider.js +1 -1
  83. package/dist/components/SiteWidthField.d.ts +0 -1
  84. package/dist/components/SiteWidthField.js +1 -1
  85. package/dist/components/SlotChildActionsContext.d.ts +2 -13
  86. package/dist/components/SlotChildActionsContext.js +1 -1
  87. package/dist/components/SlotChildRows.js +1 -1
  88. package/dist/components/SocialLinksPanel.js +1 -1
  89. package/dist/components/SourceStatus.js +1 -1
  90. package/dist/components/Split.js +1 -1
  91. package/dist/components/StandaloneSectionEditor.d.ts +1 -0
  92. package/dist/components/StandaloneSectionEditor.js +1 -1
  93. package/dist/components/StorefrontDocumentContext.d.ts +2 -67
  94. package/dist/components/StorefrontDocumentContext.js +1 -1
  95. package/dist/components/StorefrontEditor.d.ts +1 -0
  96. package/dist/components/StorefrontEditor.js +1 -1
  97. package/dist/components/StorefrontEditorChrome.d.ts +1 -1
  98. package/dist/components/StorefrontEditorChrome.js +1 -1
  99. package/dist/components/StorefrontLinkField.d.ts +9 -0
  100. package/dist/components/StorefrontLinkField.js +1 -1
  101. package/dist/components/StylesPanel.js +1 -1
  102. package/dist/components/Testimonials.js +1 -1
  103. package/dist/components/TextStylesField.js +1 -1
  104. package/dist/components/ThemeCard.js +1 -1
  105. package/dist/components/ThemeColourField.js +1 -1
  106. package/dist/components/ThemeField.js +1 -1
  107. package/dist/components/TickerSettingsPanel.js +1 -1
  108. package/dist/components/Timeline.js +1 -1
  109. package/dist/components/TimelineTrack.js +1 -1
  110. package/dist/components/TitleWithButtons.js +1 -1
  111. package/dist/components/UiIcon.d.ts +2 -10
  112. package/dist/components/UiIcon.js +1 -1
  113. package/dist/components/WebsiteScreenParts.d.ts +2 -0
  114. package/dist/components/WebsiteScreenParts.js +1 -0
  115. package/dist/components/WebsiteSettingsPanel.js +1 -1
  116. package/dist/components/WidthFollowField.js +1 -1
  117. package/dist/components/goldPhrases.js +1 -1
  118. package/dist/components/panel-widths.d.ts +2 -12
  119. package/dist/components/panel-widths.js +1 -1
  120. package/dist/components/storefront-editor.css +147 -1195
  121. package/dist/components/useFooterFocus.d.ts +2 -0
  122. package/dist/components/useFooterFocus.js +1 -0
  123. package/dist/components/useLocationsTree.d.ts +6 -0
  124. package/dist/components/useLocationsTree.js +1 -0
  125. package/dist/components/usePartBridge.d.ts +1 -9
  126. package/dist/components/usePartBridge.js +1 -1
  127. package/dist/components/usePinnedChromeSeed.d.ts +2 -0
  128. package/dist/components/usePinnedChromeSeed.js +1 -0
  129. package/dist/components/useSocialSettings.js +1 -1
  130. package/dist/components/useStorefrontBlogPosts.js +1 -1
  131. package/dist/lib/client-only.d.ts +1 -0
  132. package/dist/lib/client-only.js +1 -0
  133. package/dist/lib/content/contact.js +3 -3
  134. package/dist/lib/content/subscribe.js +1 -1
  135. package/dist/lib/content/view-tiers.d.ts +2 -6
  136. package/dist/lib/content/view-tiers.js +1 -1
  137. package/dist/lib/editor-admin-bridge.d.ts +2 -29
  138. package/dist/lib/editor-admin-bridge.js +1 -1
  139. package/dist/lib/editor-backend-error.d.ts +2 -0
  140. package/dist/lib/editor-backend-error.js +1 -0
  141. package/dist/lib/editor-blocks.d.ts +2 -2
  142. package/dist/lib/editor-chrome.d.ts +2 -52
  143. package/dist/lib/editor-chrome.js +1 -1
  144. package/dist/lib/editor-document-adapter.d.ts +3 -51
  145. package/dist/lib/editor-document-adapter.js +1 -1
  146. package/dist/lib/editor-document-addressing.d.ts +2 -0
  147. package/dist/lib/editor-document-addressing.js +1 -0
  148. package/dist/lib/editor-document-contract.d.ts +1 -0
  149. package/dist/lib/editor-document-contract.js +0 -0
  150. package/dist/lib/editor-document-hooks.d.ts +1 -15
  151. package/dist/lib/editor-document-switch.d.ts +2 -0
  152. package/dist/lib/editor-document-switch.js +1 -0
  153. package/dist/lib/editor-failure.d.ts +1 -4
  154. package/dist/lib/editor-failure.js +1 -1
  155. package/dist/lib/editor-host-inbound.d.ts +1 -1
  156. package/dist/lib/editor-host-inbound.js +1 -1
  157. package/dist/lib/editor-host.d.ts +2 -135
  158. package/dist/lib/editor-host.js +1 -1
  159. package/dist/lib/editor-key-scope.d.ts +1 -3
  160. package/dist/lib/editor-key-scope.js +1 -1
  161. package/dist/lib/editor-load-error.d.ts +1 -4
  162. package/dist/lib/editor-load-error.js +1 -1
  163. package/dist/lib/editor-media-panel.d.ts +2 -23
  164. package/dist/lib/editor-media-panel.js +1 -1
  165. package/dist/lib/editor-media-picker.d.ts +2 -12
  166. package/dist/lib/editor-media-picker.js +1 -1
  167. package/dist/lib/editor-page-lock.d.ts +1 -1
  168. package/dist/lib/editor-page-lock.js +1 -1
  169. package/dist/lib/editor-screen.d.ts +2 -0
  170. package/dist/lib/editor-screen.js +1 -0
  171. package/dist/lib/editor-section-templates.d.ts +1 -2
  172. package/dist/lib/editor-section-templates.js +1 -1
  173. package/dist/lib/editor-session-context.d.ts +1 -7
  174. package/dist/lib/editor-session-context.js +1 -1
  175. package/dist/lib/editor-session.d.ts +2 -45
  176. package/dist/lib/editor-session.js +1 -1
  177. package/dist/lib/editor-site-slug.js +1 -1
  178. package/dist/lib/editor-theme.d.ts +1 -1
  179. package/dist/lib/editor-theme.js +1 -1
  180. package/dist/lib/hero-arrows.d.ts +1 -1
  181. package/dist/lib/links/link-filters.d.ts +1 -0
  182. package/dist/lib/links/link-filters.js +0 -0
  183. package/dist/lib/links/link-picker-setup.d.ts +29 -0
  184. package/dist/lib/links/link-picker-setup.js +1 -0
  185. package/dist/lib/puck/ColourControl.d.ts +4 -1
  186. package/dist/lib/puck/ColourControl.js +1 -1
  187. package/dist/lib/puck/MarkupToolbar.js +1 -1
  188. package/dist/lib/puck/add-palette.d.ts +3 -9
  189. package/dist/lib/puck/add-palette.js +1 -1
  190. package/dist/lib/puck/add-target-types.d.ts +1 -0
  191. package/dist/lib/puck/add-target-types.js +0 -0
  192. package/dist/lib/puck/add-target.d.ts +2 -9
  193. package/dist/lib/puck/block-choice.d.ts +2 -0
  194. package/dist/lib/puck/block-choice.js +1 -0
  195. package/dist/lib/puck/block-offer.js +1 -1
  196. package/dist/lib/puck/block-types-in.d.ts +1 -1
  197. package/dist/lib/puck/block-types-in.js +1 -1
  198. package/dist/lib/puck/blocks/general/CategoryBar/fields.js +1 -1
  199. package/dist/lib/puck/blocks/general/Chart/fields.js +1 -1
  200. package/dist/lib/puck/blocks/general/FAQ/render.js +1 -1
  201. package/dist/lib/puck/blocks/general/FeaturedCover/render.js +1 -1
  202. package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
  203. package/dist/lib/puck/blocks/general/IntroBleed/render.js +1 -1
  204. package/dist/lib/puck/blocks/general/LogoBlock/fields.js +1 -1
  205. package/dist/lib/puck/blocks/general/LongRead/render.js +1 -1
  206. package/dist/lib/puck/blocks/general/Masthead/render.js +1 -1
  207. package/dist/lib/puck/blocks/general/Mockup/fields.js +1 -1
  208. package/dist/lib/puck/blocks/general/OrderSummary/render.js +1 -1
  209. package/dist/lib/puck/blocks/general/ParagraphsA/render.js +1 -1
  210. package/dist/lib/puck/blocks/general/PostCard/render.js +1 -1
  211. package/dist/lib/puck/blocks/general/ProcessSteps/render.js +1 -1
  212. package/dist/lib/puck/blocks/general/Series/render.js +1 -1
  213. package/dist/lib/puck/blocks/general/Split/render.js +1 -1
  214. package/dist/lib/puck/blocks/general/Testimonials/fields.js +1 -1
  215. package/dist/lib/puck/blocks/general/Testimonials/render.js +1 -1
  216. package/dist/lib/puck/blocks/general/TimelineTrack/render.js +1 -1
  217. package/dist/lib/puck/blocks/general/index.d.ts +2 -2
  218. package/dist/lib/puck/blocks/placeholders.js +1 -1
  219. package/dist/lib/puck/content-tree.d.ts +2 -43
  220. package/dist/lib/puck/content-tree.js +1 -1
  221. package/dist/lib/puck/controls.d.ts +11 -22
  222. package/dist/lib/puck/controls.js +1 -1
  223. package/dist/lib/puck/device-fields.d.ts +2 -24
  224. package/dist/lib/puck/device-fields.js +1 -1
  225. package/dist/lib/puck/field-buckets.d.ts +2 -0
  226. package/dist/lib/puck/field-buckets.js +1 -0
  227. package/dist/lib/puck/field-groups.d.ts +3 -3
  228. package/dist/lib/puck/field-groups.js +1 -1
  229. package/dist/lib/puck/field-markers.d.ts +2 -16
  230. package/dist/lib/puck/field-markers.js +1 -1
  231. package/dist/lib/puck/footer-block-row-name.d.ts +4 -0
  232. package/dist/lib/puck/footer-block-row-name.js +1 -0
  233. package/dist/lib/puck/footer-blocks.d.ts +2 -10
  234. package/dist/lib/puck/footer-blocks.js +1 -1
  235. package/dist/lib/puck/geocode-resolve.js +1 -1
  236. package/dist/lib/puck/hidable.d.ts +2 -9
  237. package/dist/lib/puck/hidable.js +1 -1
  238. package/dist/lib/puck/locations-tree.js +2 -2
  239. package/dist/lib/puck/neutralization-contracts.js +1 -1
  240. package/dist/lib/puck/palette-sections.d.ts +2 -0
  241. package/dist/lib/puck/palette-sections.js +1 -0
  242. package/dist/lib/puck/panel-fields.d.ts +2 -12
  243. package/dist/lib/puck/panel-fields.js +1 -1
  244. package/dist/lib/puck/panel-no-control-mark.d.ts +2 -7
  245. package/dist/lib/puck/panel-no-control-mark.js +1 -1
  246. package/dist/lib/puck/part-id.d.ts +1 -0
  247. package/dist/lib/puck/part-id.js +1 -0
  248. package/dist/lib/puck/part-rows.js +1 -1
  249. package/dist/lib/puck/pinned-seed-gate.d.ts +2 -12
  250. package/dist/lib/puck/pinned-seed-gate.js +1 -1
  251. package/dist/lib/puck/preview-click.d.ts +1 -2
  252. package/dist/lib/puck/preview-click.js +1 -1
  253. package/dist/lib/puck/preview-dom.d.ts +1 -6
  254. package/dist/lib/puck/preview-dom.js +1 -1
  255. package/dist/lib/puck/preview-events.d.ts +2 -0
  256. package/dist/lib/puck/preview-events.js +1 -0
  257. package/dist/lib/puck/preview-selection-context.d.ts +2 -19
  258. package/dist/lib/puck/preview-selection-context.js +1 -1
  259. package/dist/lib/puck/section-catalog.js +1 -1
  260. package/dist/lib/puck/section-descriptions.js +1 -1
  261. package/dist/lib/puck/section-doc.d.ts +1 -5
  262. package/dist/lib/puck/section-doc.js +1 -1
  263. package/dist/lib/puck/section-groups.d.ts +1 -1
  264. package/dist/lib/puck/slot-child-name.d.ts +2 -8
  265. package/dist/lib/puck/slot-child-name.js +1 -1
  266. package/dist/lib/puck/slot-heal.d.ts +1 -2
  267. package/dist/lib/puck/slot-heal.js +1 -1
  268. package/dist/lib/puck/slot-section-spec.d.ts +1 -0
  269. package/dist/lib/puck/slot-section-spec.js +0 -0
  270. package/dist/lib/puck/slot-specs.d.ts +2 -13
  271. package/dist/lib/puck/style-clipboard.d.ts +1 -19
  272. package/dist/lib/puck/style-clipboard.js +1 -1
  273. package/dist/lib/puck/text-control-kinds.d.ts +2 -13
  274. package/dist/lib/puck/text-control-kinds.js +1 -1
  275. package/dist/lib/puck/text-parts.d.ts +2 -5
  276. package/dist/lib/puck/text-parts.js +1 -1
  277. package/dist/lib/puck/tree-reveal.d.ts +1 -11
  278. package/dist/lib/puck/tree-reveal.js +1 -1
  279. package/dist/lib/puck/use-section-ops.d.ts +2 -25
  280. package/dist/lib/puck/use-section-ops.js +1 -1
  281. package/dist/lib/reel.d.ts +1 -1
  282. package/dist/lib/section-template-types.d.ts +1 -21
  283. package/dist/lib/sections/divider-style.js +1 -1
  284. package/dist/lib/sections/new-section-node.d.ts +2 -0
  285. package/dist/lib/sections/new-section-node.js +1 -0
  286. package/dist/lib/sections/product-card-style.js +1 -1
  287. package/dist/lib/sections/ticker-style.js +1 -1
  288. package/dist/lib/source-rules/accent-token-name.d.ts +20 -0
  289. package/dist/lib/source-rules/accent-token-name.js +4 -0
  290. package/dist/lib/source-rules/button-corners.d.ts +13 -0
  291. package/dist/lib/source-rules/button-corners.js +2 -0
  292. package/dist/lib/source-rules/editor-chrome-note.d.ts +16 -0
  293. package/dist/lib/source-rules/editor-chrome-note.js +13 -0
  294. package/dist/lib/source-rules/editor-context-menu.d.ts +5 -0
  295. package/dist/lib/source-rules/editor-context-menu.js +4 -0
  296. package/dist/lib/source-rules/editor-puck-drag-off.d.ts +8 -0
  297. package/dist/lib/source-rules/editor-puck-drag-off.js +4 -0
  298. package/dist/lib/source-rules/efficient-easel-version.d.ts +9 -0
  299. package/dist/lib/source-rules/efficient-easel-version.js +2 -0
  300. package/dist/lib/source-rules/every-button-follows-the-button-colour.d.ts +12 -0
  301. package/dist/lib/source-rules/every-button-follows-the-button-colour.js +7 -0
  302. package/dist/lib/source-rules/flat-theme-palette.d.ts +10 -0
  303. package/dist/lib/source-rules/flat-theme-palette.js +8 -0
  304. package/dist/lib/source-rules/full-width-means-full.d.ts +8 -0
  305. package/dist/lib/source-rules/full-width-means-full.js +2 -0
  306. package/dist/lib/source-rules/heading-ceiling-sweep.d.ts +11 -0
  307. package/dist/lib/source-rules/heading-ceiling-sweep.js +8 -0
  308. package/dist/lib/source-rules/label-hints.d.ts +7 -0
  309. package/dist/lib/source-rules/label-hints.js +5 -0
  310. package/dist/lib/source-rules/label-vocabulary.d.ts +14 -0
  311. package/dist/lib/source-rules/label-vocabulary.js +5 -0
  312. package/dist/lib/source-rules/mirrored-rows-agree.d.ts +19 -0
  313. package/dist/lib/source-rules/mirrored-rows-agree.js +10 -0
  314. package/dist/lib/source-rules/no-comment-in-jsx.d.ts +9 -0
  315. package/dist/lib/source-rules/no-comment-in-jsx.js +7 -0
  316. package/dist/lib/source-rules/no-glyph-rows.d.ts +15 -0
  317. package/dist/lib/source-rules/no-glyph-rows.js +4 -0
  318. package/dist/lib/source-rules/one-colour-control.d.ts +7 -0
  319. package/dist/lib/source-rules/one-colour-control.js +2 -0
  320. package/dist/lib/source-rules/one-dropdown.d.ts +10 -0
  321. package/dist/lib/source-rules/one-dropdown.js +4 -0
  322. package/dist/lib/source-rules/one-editable-list.d.ts +16 -0
  323. package/dist/lib/source-rules/one-editable-list.js +6 -0
  324. package/dist/lib/source-rules/one-editor-list.d.ts +7 -0
  325. package/dist/lib/source-rules/one-editor-list.js +3 -0
  326. package/dist/lib/source-rules/one-right-click.d.ts +10 -0
  327. package/dist/lib/source-rules/one-right-click.js +2 -0
  328. package/dist/lib/source-rules/one-switch.d.ts +9 -0
  329. package/dist/lib/source-rules/one-switch.js +7 -0
  330. package/dist/lib/source-rules/one-up-level-link.d.ts +16 -0
  331. package/dist/lib/source-rules/one-up-level-link.js +18 -0
  332. package/dist/lib/source-rules/panel-colour-tokens.d.ts +48 -0
  333. package/dist/lib/source-rules/panel-colour-tokens.js +20 -0
  334. package/dist/lib/source-rules/panel-no-divider-lines.d.ts +14 -0
  335. package/dist/lib/source-rules/panel-no-divider-lines.js +10 -0
  336. package/dist/lib/source-rules/panel-one-arrow.d.ts +21 -0
  337. package/dist/lib/source-rules/panel-one-arrow.js +1 -0
  338. package/dist/lib/source-rules/panel-one-hover.d.ts +8 -0
  339. package/dist/lib/source-rules/panel-one-hover.js +2 -0
  340. package/dist/lib/source-rules/panel-rows-use-the-shared-row.d.ts +23 -0
  341. package/dist/lib/source-rules/panel-rows-use-the-shared-row.js +22 -0
  342. package/dist/lib/source-rules/part-slider-fills-row.d.ts +11 -0
  343. package/dist/lib/source-rules/part-slider-fills-row.js +29 -0
  344. package/dist/lib/source-rules/part-style-naming.d.ts +10 -0
  345. package/dist/lib/source-rules/part-style-naming.js +2 -0
  346. package/dist/lib/source-rules/puck-document-surfaces.d.ts +16 -0
  347. package/dist/lib/source-rules/puck-document-surfaces.js +8 -0
  348. package/dist/lib/source-rules/reduced-motion.d.ts +26 -0
  349. package/dist/lib/source-rules/reduced-motion.js +9 -0
  350. package/dist/lib/source-rules/route-content-width.d.ts +22 -0
  351. package/dist/lib/source-rules/route-content-width.js +5 -0
  352. package/dist/lib/source-rules/rule.d.ts +21 -0
  353. package/dist/lib/source-rules/rule.js +1 -0
  354. package/dist/lib/source-rules/section-theme-preview.d.ts +9 -0
  355. package/dist/lib/source-rules/section-theme-preview.js +8 -0
  356. package/dist/lib/source-rules/site-gutter.d.ts +6 -0
  357. package/dist/lib/source-rules/site-gutter.js +4 -0
  358. package/dist/lib/source-rules/site-square-by-default.d.ts +17 -0
  359. package/dist/lib/source-rules/site-square-by-default.js +3 -0
  360. package/dist/lib/source-rules/site-width.d.ts +11 -0
  361. package/dist/lib/source-rules/site-width.js +7 -0
  362. package/dist/lib/source-rules/size-token-paints.d.ts +8 -0
  363. package/dist/lib/source-rules/size-token-paints.js +11 -0
  364. package/dist/lib/source-rules/social-icons-import.d.ts +6 -0
  365. package/dist/lib/source-rules/social-icons-import.js +6 -0
  366. package/dist/lib/source-rules/source-status-is-shared.d.ts +7 -0
  367. package/dist/lib/source-rules/source-status-is-shared.js +1 -0
  368. package/dist/lib/source-rules/style-face-matches-size.d.ts +10 -0
  369. package/dist/lib/source-rules/style-face-matches-size.js +4 -0
  370. package/dist/lib/source-rules/support/accent-rename-bytes.d.ts +5 -0
  371. package/dist/lib/source-rules/support/accent-rename-bytes.js +1 -0
  372. package/dist/lib/source-rules/support/css-box-model.d.ts +5 -0
  373. package/dist/lib/source-rules/support/css-box-model.js +1 -0
  374. package/dist/lib/source-rules/support/css-length.d.ts +2 -0
  375. package/dist/lib/source-rules/support/css-length.js +1 -0
  376. package/dist/lib/source-rules/support/css-rules.d.ts +12 -0
  377. package/dist/lib/source-rules/support/css-rules.js +1 -0
  378. package/dist/lib/source-rules/support/css-source.d.ts +2 -0
  379. package/dist/lib/source-rules/support/css-source.js +3 -0
  380. package/dist/lib/source-rules/support/label-extraction.d.ts +14 -0
  381. package/dist/lib/source-rules/support/label-extraction.js +5 -0
  382. package/dist/lib/source-rules/support/panel-select-cascade.d.ts +72 -0
  383. package/dist/lib/source-rules/support/panel-select-cascade.js +2 -0
  384. package/dist/lib/source-rules/support/part-slider-call-sites.d.ts +9 -0
  385. package/dist/lib/source-rules/support/part-slider-call-sites.js +17 -0
  386. package/dist/lib/source-rules/support/registry-source.d.ts +14 -0
  387. package/dist/lib/source-rules/support/registry-source.js +3 -0
  388. package/dist/lib/source-rules/support/ts-source.d.ts +2 -0
  389. package/dist/lib/source-rules/support/ts-source.js +3 -0
  390. package/dist/lib/source-rules/theme-mode-controls-gone.d.ts +10 -0
  391. package/dist/lib/source-rules/theme-mode-controls-gone.js +5 -0
  392. package/dist/lib/source-rules/upload-intake-guard.d.ts +11 -0
  393. package/dist/lib/source-rules/upload-intake-guard.js +6 -0
  394. package/dist/lib/source-rules/word-styles.d.ts +8 -0
  395. package/dist/lib/source-rules/word-styles.js +4 -0
  396. package/dist/lib/theme-row-persist.js +1 -1
  397. package/dist/lib/theme-save-message.js +1 -1
  398. package/dist/lib/web-backend.d.ts +4 -59
  399. package/dist/lib/web-backend.js +1 -1
  400. package/dist/lib/website-document-addressing.d.ts +2 -0
  401. package/dist/lib/website-document-addressing.js +1 -0
  402. package/dist/lib/website-host-inbound.d.ts +1 -0
  403. package/dist/lib/website-host-inbound.js +1 -0
  404. package/dist/lib/website-session.d.ts +5 -0
  405. package/dist/lib/website-session.js +1 -0
  406. package/package.json +18 -8
@@ -1,11 +1,11 @@
1
- "use client";import{jsx as c,jsxs as R}from"react/jsx-runtime";import{useCallback as p,useEffect as f,useId as Re,useRef as i,useState as b}from"react";import{markOverlayPortal as I}from"../lib/puck/overlay-portal.js";import Le from"./Ticker.js";import{HeroSlideStyleContext as Oe}from"./HeroSlide.js";import Te from"./HeroArrows.js";import He from"./Reel.js";import{usePreviewTicker as Ae}from"./PreviewTickerContext.js";import{useReducedMotion as Ce}from"./useReducedMotion.js";import{tk as W}from"./floating-editor/tokens.js";import{hasSectionHeight as Ie,resolveSectionHeight as Z}from"../lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ne}from"../lib/puck/header-clearance.js";import{nextReel as Me,normaliseHeroReelShape as Pe,reelShown as De}from"../lib/reel.js";import{arrowsShown as $e,arrowStep as Ve}from"../lib/hero-arrows.js";import{swipeEnabled as ze,swipeStep as Xe}from"../lib/hero-swipe.js";import{videoControlShown as qe,videoHeld as Ge}from"../lib/hero-video-control.js";const je=`
1
+ "use client";import{jsx as c,jsxs as R}from"react/jsx-runtime";import{useCallback as p,useEffect as f,useId as Re,useRef as i,useState as b}from"react";import{markOverlayPortal as I}from"../lib/puck/overlay-portal.js";import Le from"./Ticker.js";import{HeroSlideStyleContext as Oe}from"./HeroSlide.js";import Te from"./HeroArrows.js";import He from"./Reel.js";import{usePreviewTicker as Ae}from"./PreviewTickerContext.js";import{useReducedMotion as Ce}from"./useReducedMotion.js";import{tk as Z}from"./floating-editor/tokens.js";import{hasSectionHeight as Ie,resolveSectionHeight as ee}from"../lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ne}from"../lib/puck/header-clearance.js";import{nextReel as Me,normaliseHeroReelShape as Pe,reelShown as De}from"../lib/reel.js";import{arrowsShown as $e,arrowStep as Ve}from"../lib/hero-arrows.js";import{swipeEnabled as ze,swipeStep as Xe}from"../lib/hero-swipe.js";import{videoControlShown as qe,videoHeld as Ge}from"../lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as N}from"../lib/puck/preview-events.js";const je=`
2
2
  .hero-ticker-pick { cursor: pointer; }
3
3
  .hero-ticker-pick:hover {
4
- outline: 2px solid color-mix(in srgb, ${W.accent} 45%, transparent);
4
+ outline: 2px solid color-mix(in srgb, ${Z.accent} 45%, transparent);
5
5
  outline-offset: -2px;
6
6
  }
7
7
  .hero-ticker-pick[data-selected] {
8
- outline: 2px solid ${W.accent};
8
+ outline: 2px solid ${Z.accent};
9
9
  outline-offset: -2px;
10
10
  }
11
- `,Be="Play video",Ke="Hold video",Ye="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Fe="item",Ue=["","","","","",""],ee=new Map,te="hero-slider:goto";function Je(L,w){const h=L?.ownerDocument?.defaultView;if(h)return h.addEventListener(te,w),()=>h.removeEventListener(te,w)}function Qe({slides:L,alignment:w,textureOpacity:h,showTexture:re,textureColor:oe,phoneUpDown:ne,phoneSideways:se,autoplay:N,autoplayInterval:O,showTicker:ce,tickerItems:ae,heightDesktop:M,heightMobile:P,showPicker:ie,pickerShape:le,pickerPlacement:ue,showArrows:de,arrowsShape:me,arrowsPlacement:pe,editing:n}){const D=Ie(M,P),fe=D?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",he=D?{"--sf-hero-h-d":Z(M),"--sf-hero-h-m":Z(P)}:void 0,T=(ae??Ue.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:n?Fe:"").filter(Boolean),$=ce!==!1,u=i(null),V=i(null),z=i(null),X=i(null),q=i(null),G=Re(),E=i(G),[y,ve]=b([]),[xe,j]=b(0),v=i(0),[B,K]=b(!1),[g,ke]=b(!1),[Y,be]=b(null),H=Ce(),{selectedHeroId:we,select:F}=Ae(),S=p(()=>u.current?.querySelector(".hero-track")??null,[]),l=p((e,t=!1)=>{j(e),v.current=e,ee.set(E.current,e);const r=u.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);f(()=>{const e=u.current,t=e?.getAttribute("data-puck-component")||e?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||G;E.current=t,be(t);const r=ee.get(t);typeof r=="number"&&(j(r),v.current=r)},[]),f(()=>{const e=S();if(!e)return;const t=()=>{ve(o=>Me(o,e.querySelectorAll("[data-slide-name]")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[S]),f(()=>{if(!n)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=u.current,a=o?.getAttribute("data-puck-component")||o?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||E.current;r.id&&r.id!==a||l(r.index,!0)};return Je(u.current,e)},[n,l]);const s=y.length,d=Math.min(Math.max(xe,0),Math.max(0,s-1)),A=De({shown:ie,count:s}),U=$e({shown:de,count:s}),J=qe({editing:n,shown:d,slides:y}),Ee=Ge({editing:n,playing:g,controlShown:J}),_=ze({count:s,editing:n}),m=i(null),x=i(null),ye=p(e=>{if(m.current=null,x.current=null,!_||e.touches.length!==1)return;const t=e.touches[0];m.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[_]),ge=p(e=>{if(!m.current)return;if(e.touches.length!==1){m.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Se=p(()=>{const e=m.current,t=x.current;if(m.current=null,x.current=null,!_||!e||!t)return;const r=Xe(t.x-e.x,t.y-e.y,v.current,s);r!==v.current&&l(r)},[_,s,l]);f(()=>{if(n||!N||B||H||s<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((d+1)%s),t);return()=>window.clearTimeout(r)},[n,N,O,B,H,s,d,l]),f(()=>{const e=[V.current,z.current,X.current].filter(Boolean),t=e.map(o=>I(o)),r=o=>{const a=o.target,k=a.closest("[data-hero-nav]"),Q=k??a.closest("[data-idx]");if(!Q)return;o.stopPropagation(),o.preventDefault();const C=k?Ve(k.dataset.heroNav,v.current,s):Number(Q.dataset.idx);Number.isNaN(C)||(l(C,n),S()?.querySelectorAll("[data-slide-name]")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[s,l,S,n]),f(()=>{if(!n)return;const e=q.current;if(!e)return;const t=I(e),r=o=>{o.stopPropagation(),o.preventDefault();const a=u.current,k=a?.getAttribute("data-puck-component")||a?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||E.current;F(k)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[n,F,$,T.length]);const _e=p(e=>{if(!e)return;const t=I(e),r=o=>{o.stopPropagation(),o.preventDefault(),ke(a=>!a)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return c(Oe.Provider,{value:{alignment:w,textureOpacity:h,textureOn:re,textureColor:oe,quietVideo:Ee,phoneUpDown:ne,phoneSideways:se},children:R("div",{ref:u,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${fe} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:he,onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),onTouchStart:ye,onTouchMove:ge,onTouchEnd:Se,children:[c(L,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${d*100}%)`,transition:H?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),J&&c("div",{ref:_e,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ne} + 16px)`},children:R("button",{type:"button",className:Ye,children:[c("span",{"aria-hidden":"true",children:g?"\u275A\u275A":"\u25B6"}),g?Ke:Be]})}),(A||U)&&R("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[A&&c(He,{ref:V,slides:y,active:d,shape:Pe(le),placement:ue}),U&&c(Te,{ref:X,shape:me,placement:pe})]}),A&&c("div",{ref:z,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:y.map((e,t)=>c("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===d?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),$&&T.length>0&&R("div",{ref:q,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${n?" hero-ticker-pick":""}`,"data-selected":n&&Y!=null&&we===Y?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[n&&c("style",{children:je}),c(Le,{items:T,backdrop:"dark-media"})]})]})})}export{Ue as DEFAULT_TICKER_ITEMS,te as HERO_SLIDER_GOTO_EVENT,Ke as HERO_VIDEO_HOLD_LABEL,Be as HERO_VIDEO_PLAY_LABEL,Qe as default,Je as subscribeSliderGoto};
11
+ `,Be="Play video",Ke="Hold video",Ye="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Fe="item",Ue=["","","","","",""],te=new Map;function Je(L,w){const h=L?.ownerDocument?.defaultView;if(h)return h.addEventListener(N,w),()=>h.removeEventListener(N,w)}function Qe({slides:L,alignment:w,textureOpacity:h,showTexture:re,textureColor:oe,phoneUpDown:ne,phoneSideways:se,autoplay:M,autoplayInterval:O,showTicker:ce,tickerItems:ae,heightDesktop:P,heightMobile:D,showPicker:ie,pickerShape:le,pickerPlacement:ue,showArrows:de,arrowsShape:me,arrowsPlacement:pe,editing:n}){const $=Ie(P,D),fe=$?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",he=$?{"--sf-hero-h-d":ee(P),"--sf-hero-h-m":ee(D)}:void 0,T=(ae??Ue.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:n?Fe:"").filter(Boolean),V=ce!==!1,u=i(null),z=i(null),X=i(null),q=i(null),G=i(null),j=Re(),E=i(j),[y,ve]=b([]),[xe,B]=b(0),v=i(0),[K,Y]=b(!1),[g,ke]=b(!1),[F,be]=b(null),H=Ce(),{selectedHeroId:we,select:U}=Ae(),S=p(()=>u.current?.querySelector(".hero-track")??null,[]),l=p((e,t=!1)=>{B(e),v.current=e,te.set(E.current,e);const r=u.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);f(()=>{const e=u.current,t=e?.getAttribute("data-puck-component")||e?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j;E.current=t,be(t);const r=te.get(t);typeof r=="number"&&(B(r),v.current=r)},[]),f(()=>{const e=S();if(!e)return;const t=()=>{ve(o=>Me(o,e.querySelectorAll("[data-slide-name]")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[S]),f(()=>{if(!n)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=u.current,a=o?.getAttribute("data-puck-component")||o?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||E.current;r.id&&r.id!==a||l(r.index,!0)};return Je(u.current,e)},[n,l]);const s=y.length,d=Math.min(Math.max(xe,0),Math.max(0,s-1)),A=De({shown:ie,count:s}),J=$e({shown:de,count:s}),Q=qe({editing:n,shown:d,slides:y}),Ee=Ge({editing:n,playing:g,controlShown:Q}),_=ze({count:s,editing:n}),m=i(null),x=i(null),ye=p(e=>{if(m.current=null,x.current=null,!_||e.touches.length!==1)return;const t=e.touches[0];m.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[_]),ge=p(e=>{if(!m.current)return;if(e.touches.length!==1){m.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Se=p(()=>{const e=m.current,t=x.current;if(m.current=null,x.current=null,!_||!e||!t)return;const r=Xe(t.x-e.x,t.y-e.y,v.current,s);r!==v.current&&l(r)},[_,s,l]);f(()=>{if(n||!M||K||H||s<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((d+1)%s),t);return()=>window.clearTimeout(r)},[n,M,O,K,H,s,d,l]),f(()=>{const e=[z.current,X.current,q.current].filter(Boolean),t=e.map(o=>I(o)),r=o=>{const a=o.target,k=a.closest("[data-hero-nav]"),W=k??a.closest("[data-idx]");if(!W)return;o.stopPropagation(),o.preventDefault();const C=k?Ve(k.dataset.heroNav,v.current,s):Number(W.dataset.idx);Number.isNaN(C)||(l(C,n),S()?.querySelectorAll("[data-slide-name]")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[s,l,S,n]),f(()=>{if(!n)return;const e=G.current;if(!e)return;const t=I(e),r=o=>{o.stopPropagation(),o.preventDefault();const a=u.current,k=a?.getAttribute("data-puck-component")||a?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||E.current;U(k)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[n,U,V,T.length]);const _e=p(e=>{if(!e)return;const t=I(e),r=o=>{o.stopPropagation(),o.preventDefault(),ke(a=>!a)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return c(Oe.Provider,{value:{alignment:w,textureOpacity:h,textureOn:re,textureColor:oe,quietVideo:Ee,phoneUpDown:ne,phoneSideways:se},children:R("div",{ref:u,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${fe} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:he,onMouseEnter:()=>Y(!0),onMouseLeave:()=>Y(!1),onTouchStart:ye,onTouchMove:ge,onTouchEnd:Se,children:[c(L,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${d*100}%)`,transition:H?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Q&&c("div",{ref:_e,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ne} + 16px)`},children:R("button",{type:"button",className:Ye,children:[c("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),g?Ke:Be]})}),(A||J)&&R("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[A&&c(He,{ref:z,slides:y,active:d,shape:Pe(le),placement:ue}),J&&c(Te,{ref:q,shape:me,placement:pe})]}),A&&c("div",{ref:X,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:y.map((e,t)=>c("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===d?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),V&&T.length>0&&R("div",{ref:G,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${n?" hero-ticker-pick":""}`,"data-selected":n&&F!=null&&we===F?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[n&&c("style",{children:je}),c(Le,{items:T,backdrop:"dark-media"})]})]})})}export{Ue as DEFAULT_TICKER_ITEMS,N as HERO_SLIDER_GOTO_EVENT,Ke as HERO_VIDEO_HOLD_LABEL,Be as HERO_VIDEO_PLAY_LABEL,Qe as default,Je as subscribeSliderGoto};
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsField as l,SettingsSegmented as c}from"efficient-easel/panel";import{HoverIcon as s}from"efficient-easel/icons";import{HOVER_EFFECTS as h,DEFAULT_HOVER_EFFECT as E}from"../lib/theme.js";import{PartResetDot as d}from"./PartResetDot.js";import{SITE_STYLE_UNSET_LABEL as m}from"./SiteStyleUnset.js";const r={none:"None",lift:"Lift",highlight:"Highlight"},p="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function u({value:t,onChange:i,showHint:a=!0}){const o=t===null,f=t??E;return e(l,{label:"Hover effect",icon:e(s,{}),value:o?m:r[t],changed:!o,action:o?void 0:e(d,{label:"Hover effect",what:"change",onClear:()=>i(null)}),hint:a?p:void 0,children:e(c,{options:h.map(n=>({id:n,label:r[n]})),value:f,ariaLabel:"Hover effect",onChange:i})})}export{u as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as s,SettingsField as c,SettingsSegmented as d}from"efficient-easel/panel";import{HoverIcon as h}from"efficient-easel/icons";import{HOVER_EFFECTS as u,DEFAULT_HOVER_EFFECT as l}from"../lib/theme.js";const t={none:"None",lift:"Lift",highlight:"Highlight"},g="What a card does when a shopper points at it — or taps it, on a phone. Highlight is the effect your cards already use.";function p({value:o,onChange:i,showHint:f=!0}){const n=o===null,a=o??l;return e(c,{label:"Hover effect",icon:e(h,{}),value:t[a],changed:!n,action:e(s,{label:"Hover effect",changed:!n,detail:t[l],onReset:()=>i(null)}),hint:f?g:void 0,children:e(d,{options:u.map(r=>({id:r,label:t[r]})),value:a,ariaLabel:"Hover effect",onChange:i})})}export{p as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import N from"./BlockFrame.js";import{useSitePhotography as S}from"./SitePhotographyContext.js";import{media as x}from"../lib/media.js";import{imageCornerStyle as w}from"../lib/content/image-corners.js";import{imageFitClass as j,imageIsCropped as I,parseImageFit as C}from"../lib/content/image-fit.js";import{resolveImageTreatment as F}from"../lib/content/image-treatment.js";import{imageWidthStyle as $}from"../lib/content/image-width.js";const P={auto:"","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"};function B({src:r,alt:f,aspect:l,contained:d,grayscale:p,href:h,width:u,fit:g,focal:a,corners:y,cornerSides:b}){const o=F(p,S()),i=$(u),m=C(g,"cover"),c=w(y,b),n={...o.style??{},...a&&I(l,m)?{objectPosition:a}:{}},s=r?e("img",{src:x(r),alt:f,className:`h-full w-full ${l==="auto"?"":j(m)}${o.className?` ${o.className}`:""}`,...Object.keys(n).length?{style:n}:{}}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:"Image \u2014 set a path"}),t=(h??"").trim(),k=t&&r?t.startsWith("/")?e(v,{href:t,className:"block h-full w-full",children:s}):e("a",{href:t,className:"block h-full w-full",children:s}):s;return e(N,{contained:d,className:"py-6",children:e("figure",{...i?{style:i}:{},children:e("div",{className:`relative w-full overflow-hidden bg-surface ${P[l]}`,...c?{style:c}:{},children:k})})})}export{B as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import N from"./BlockFrame.js";import{useSitePhotography as S}from"./SitePhotographyContext.js";import{media as x}from"../lib/media.js";import{imageCornerStyle as w}from"../lib/content/image-corners.js";import{imageFitClass as j,imageIsCropped as I,parseImageFit as C}from"../lib/content/image-fit.js";import{resolveImageTreatment as F}from"../lib/content/image-treatment.js";import{imageWidthStyle as $}from"../lib/content/image-width.js";const P={auto:"","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"};function B({src:r,alt:f,aspect:l,contained:d,grayscale:p,href:h,width:u,fit:g,focal:a,corners:y,cornerSides:b}){const o=F(p,S()),i=$(u),m=C(g,"cover"),c=w(y,b),n={...o.style??{},...a&&I(l,m)?{objectPosition:a}:{}},s=r?e("img",{src:x(r),alt:f,className:`h-full w-full ${l==="auto"?"":j(m)}${o.className?` ${o.className}`:""}`,...Object.keys(n).length?{style:n}:{}}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:"Image — set a path"}),t=(h??"").trim(),k=t&&r?t.startsWith("/")?e(v,{href:t,className:"block h-full w-full",children:s}):e("a",{href:t,className:"block h-full w-full",children:s}):s;return e(N,{contained:d,className:"py-6",children:e("figure",{...i?{style:i}:{},children:e("div",{className:`relative w-full overflow-hidden bg-surface ${P[l]}`,...c?{style:c}:{},children:k})})})}export{B as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as a,Fragment as P}from"react/jsx-runtime";import{useRef as N,useState as F}from"react";import D from"./TextStyleRow.js";import{focalFromRect as k,formatFocal as $,nudgeFocal as C,parseFocal as R}from"../lib/image-focus.js";function j({label:c,value:t,onChange:l,image:i}){const[f,u]=F(!1),m=N(null),n=N(!1),{x:p,y:d}=R(t),g=(s,o)=>{const h=m.current?.getBoundingClientRect();if(!h)return;const y=k(h,s,o);l($(y.x,y.y))},b=s=>{const o=C(t,s.key,s.shiftKey);o!==null&&(s.preventDefault(),l(o))},x=s=>{s.currentTarget.setPointerCapture?.(s.pointerId),n.current=!0,g(s.clientX,s.clientY)},w=s=>{n.current&&g(s.clientX,s.clientY)},r=()=>{n.current=!1};return e(D,{styleKey:"imageFocal",label:c,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:f,onToggle:()=>u(s=>!s),children:f?e("div",{className:"sf-focus","data-sf-focusing":"",children:i?a(P,{children:[e("button",{type:"button",className:"sf-focus-canvas","aria-label":`${c}: ${t}. Use the arrow keys to move the point.`,onKeyDown:b,onPointerDown:x,onPointerMove:w,onPointerUp:r,onPointerCancel:r,onLostPointerCapture:r,children:a("span",{className:"sf-focus-pane",ref:m,children:[e("img",{className:"sf-focus-img",src:i,alt:"",draggable:!1}),e("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${d}%`}}),e("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${p}%`}}),e("span",{className:"sf-focus-marker",style:{left:`${p}%`,top:`${d}%`}})]})}),a("div",{className:"sf-focus-bar",children:[e("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),e("button",{type:"button",className:"sf-image-btn",onClick:()=>u(!1),children:"Done"})]})]}):e("p",{className:"sf-field-hint",children:"Choose a background image first \u2014 there\u2019s nothing to focus yet."})}):null})}export{j as default};
1
+ "use client";import{jsx as s,jsxs as a,Fragment as P}from"react/jsx-runtime";import{useRef as N,useState as F}from"react";import k from"./TextStyleRow.js";import{focalFromRect as D,formatFocal as $,nudgeFocal as C,parseFocal as R}from"../lib/image-focus.js";function j({label:c,value:t,onChange:l,image:i}){const[f,u]=F(!1),m=N(null),n=N(!1),{x:p,y:d}=R(t),g=(e,o)=>{const h=m.current?.getBoundingClientRect();if(!h)return;const y=D(h,e,o);l($(y.x,y.y))},b=e=>{const o=C(t,e.key,e.shiftKey);o!==null&&(e.preventDefault(),l(o))},x=e=>{e.currentTarget.setPointerCapture?.(e.pointerId),n.current=!0,g(e.clientX,e.clientY)},w=e=>{n.current&&g(e.clientX,e.clientY)},r=()=>{n.current=!1};return s(k,{styleKey:"imageFocal",label:c,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:f,onToggle:()=>u(e=>!e),children:f?s("div",{className:"sf-focus","data-sf-focusing":"",children:i?a(P,{children:[s("button",{type:"button",className:"sf-focus-canvas","aria-label":`${c}: ${t}. Use the arrow keys to move the point.`,onKeyDown:b,onPointerDown:x,onPointerMove:w,onPointerUp:r,onPointerCancel:r,onLostPointerCapture:r,children:a("span",{className:"sf-focus-pane",ref:m,children:[s("img",{className:"sf-focus-img",src:i,alt:"",draggable:!1}),s("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${d}%`}}),s("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${p}%`}}),s("span",{className:"sf-focus-marker",style:{left:`${p}%`,top:`${d}%`}})]})}),a("div",{className:"sf-focus-bar",children:[s("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),s("button",{type:"button",className:"sf-image-btn",onClick:()=>u(!1),children:"Done"})]})]}):s("p",{className:"es-field-hint sf-hint-keep",children:"Choose a background image first — there’s nothing to focus yet."})}):null})}export{j as default};
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ export declare const KEEP_HINT_CLASS = "sf-hint-keep";
3
+ export default function KeepHint({ children }: {
4
+ children: ReactNode;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";const n="sf-hint-keep";function s({children:e}){return t("span",{className:n,children:e})}export{n as KEEP_HINT_CLASS,s as default};
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as d,Fragment as z}from"react/jsx-runtime";import{useState as M}from"react";import{useEasel as j}from"efficient-easel/easel";import{ListField as E}from"efficient-easel/fields";import P from"./MediaUploadField.js";import{useLocationsHasTree as U}from"./LocationsTreeContext.js";import{CoordsField as $}from"../lib/puck/controls.js";import{useLocationsFocus as q,setLocationsFocus as f}from"../lib/puck/locations-focus.js";import{groupKeyOf as x,groupLabelOf as I,NEW_CITY as H,writeGroupCities as V,writeGroupOrder as Y}from"../lib/puck/locations-tree.js";import{useSectionOps as Z}from"../lib/puck/use-section-ops.js";import{ROOT_ZONE as J}from"../lib/puck/content-tree.js";import{CONTACT_LOCATIONS_DEFAULTS as F,parseLocationTileShape as Q}from"../lib/content/contact.js";function X(o){const t=[];return o.forEach((s,r)=>{const p=x(s);let l=t.find(a=>a.key===p);l||(l={key:p,name:String(s?.groupName??""),indices:[]},t.push(l)),l.indices.push(r)}),t}function S({children:o}){return e("div",{className:"sf-field-label",children:o})}function D({children:o}){return e("div",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim, #999)",margin:"14px 0 6px"},children:o})}const G={width:"100%",height:32,textAlign:"left",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"0 12px",fontSize:12,border:"1px solid var(--border-strong, #d0d0d0)",borderRadius:6,background:"transparent",color:"inherit",cursor:"inherit"},C={padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer"},W={...C,color:"#d85a30"};function w({label:o,value:t,placeholder:s,textarea:r,onChange:p}){return d("div",{className:"sf-field",children:[e(S,{children:o}),r?e("textarea",{value:t,placeholder:s,onChange:l=>p(l.target.value)}):e("input",{type:"text",value:t,placeholder:s,onChange:l=>p(l.target.value)})]})}const K=[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],ee=[{label:"Tall (3:4)",value:"tall"},{label:"Square",value:"square"},{label:"Wide (2:1)",value:"wide"}];function _({label:o,options:t,value:s,onChange:r}){return d("div",{className:"sf-field",children:[e(S,{children:o}),e("div",{style:{display:"flex",gap:4},children:t.map(p=>{const l=s===p.value;return e("button",{type:"button","aria-pressed":l,onClick:()=>r(p.value),style:{flex:1,padding:"6px 8px",fontSize:12,borderRadius:6,cursor:"pointer",border:`1px solid ${l?"var(--sf-accent, #2563eb)":"var(--border-strong, #d0d0d0)"}`,background:l?"var(--sf-accent, #2563eb)":"transparent",color:l?"#fff":"inherit",fontWeight:l?500:400},children:p.label},p.value)})})]})}function R({props:o,setSection:t,headOnly:s}){const r=a=>String(o[a]??""),p=o.mapTheme||F.mapTheme,l=F;return d(z,{children:[!s&&e(D,{children:"Section"}),e(w,{label:"Section number",value:r("sectionNumber"),placeholder:l.sectionNumber,onChange:a=>t({sectionNumber:a})}),e(w,{label:"Heading",textarea:!0,value:r("heading"),placeholder:l.heading,onChange:a=>t({heading:a})}),e(w,{label:"Body",textarea:!0,value:r("tagline"),placeholder:l.tagline,onChange:a=>t({tagline:a})}),s?null:d(z,{children:[e(D,{children:"City strip"}),e(w,{label:"Eyebrow",value:r("galleryKicker"),placeholder:l.galleryKicker,onChange:a=>t({galleryKicker:a})}),e(w,{label:"Hint",value:r("galleryHint"),placeholder:l.galleryHint,onChange:a=>t({galleryHint:a})}),e(_,{label:"Shape",options:ee,value:Q(o.imageShape),onChange:a=>t({imageShape:a})}),e(D,{children:"Map & Theme"}),e(_,{label:"Map theme",options:K,value:p,onChange:a=>t({mapTheme:a})})]})]})}function ne({cards:o,groupKey:t,onChange:s,onBack:r,onOpenCity:p,onNavigate:l}){const a=o.map((i,h)=>x(i)===t?h:-1).filter(i=>i>=0),m=String(o[a[0]]?.groupName??""),L=new Set(o.map(x).filter(i=>i!==t)),[y,N]=M(t),k=i=>s(o.map(h=>x(h)===t?{...h,...i}:h)),O=()=>{const i=y;if(i!==t){if(L.has(i)){N(t);return}s(o.map(h=>x(h)===t?{...h,group:i}:h)),l(i)}};return d("div",{className:"sf-field",children:[e("button",{type:"button",style:C,onClick:r,children:"\u2190 Section"}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:I(t,m)}),d("div",{className:"sf-field",children:[e(S,{children:"Group heading (optional)"}),e("input",{type:"text",value:y,placeholder:"e.g. Americas",onChange:i=>N(i.target.value),onBlur:O,onKeyDown:i=>{i.key==="Enter"&&i.target.blur()}}),L.has(y)&&y!==t&&e("div",{style:{marginTop:4,fontSize:11,color:"#d85a30"},children:"Another group already uses this heading \u2014 pick a different one."})]}),d("div",{className:"sf-field",children:[e(S,{children:"Group name (optional)"}),e("input",{type:"text",value:m,placeholder:"Shown beside the heading",onChange:i=>k({groupName:i.target.value})})]}),e(E,{label:"Cities in this group",noun:"city",items:a.map(i=>o[i]),onChange:i=>s(V(o,t,i)),newItem:()=>({...H,group:t,groupName:m}),open:null,onOpen:()=>{},renderItem:()=>null,removeOnRow:!1,canDuplicate:()=>!1,renderRow:(i,h)=>d("button",{type:"button",style:G,onClick:()=>p(a[h]),children:[e("span",{children:i?.name||"City"}),e("span",{"aria-hidden":"true",children:"\u203A"})]})}),e("div",{style:{marginTop:12},children:d("button",{type:"button",style:W,onClick:()=>{s(o.filter(i=>x(i)!==t)),r()},children:["Delete group (",a.length," ",a.length===1?"city":"cities",")"]})})]})}function te({value:o,onChange:t}){const s=Array.isArray(o)?o:[],r=q(),p=U(),l=X(s),{appState:a,selectedItem:m}=j(n=>n),L=Z(),y=m?.props??{},N=n=>{if(!m)return;const u=(a.data.content??[]).findIndex(g=>g.props.id===m.props.id);u<0||L.replaceComponent(J,u,{type:m.type,props:{...m.props,...n}})},k=(n,c)=>t(s.map((u,g)=>g===n?{...u,...c}:u)),O=()=>{const n=new Set(l.map(g=>g.key));let c=l.length+1,u=`Group ${c}`;for(;n.has(u);)u=`Group ${++c}`;return u};if(r.level==="texts")return d("div",{className:"sf-field",children:[e("button",{type:"button",style:C,onClick:()=>f({level:"groups"}),children:"\u2190 Locations"}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Texts"}),e(R,{props:y,setSection:N,headOnly:!0})]});if(r.level==="image"){const n=s[r.index];return n?d("div",{className:"sf-field",children:[d("button",{type:"button",style:C,onClick:()=>f({level:"city",index:r.index}),children:["\u2190 ",String(n.name??"")||"City"]}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Image"}),e(P,{value:n.photo||"",onChange:c=>k(r.index,{photo:c}),label:"Image",accept:"image/*"})]}):i()}if(r.level==="map"){const n=s[r.index];return n?d("div",{className:"sf-field",children:[d("button",{type:"button",style:C,onClick:()=>f({level:"city",index:r.index}),children:["\u2190 ",String(n.name??"")||"City"]}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Map"}),e($,{value:n.geocode,onChange:c=>k(r.index,{geocode:c}),label:"Coordinates"}),d("div",{className:"sf-field",children:[e(S,{children:"Directions link"}),e("input",{type:"text",value:String(n.mapsUrl??""),onChange:c=>k(r.index,{mapsUrl:c.target.value})})]})]}):i()}if(r.level==="city"){const n=r.index,c=s[n];if(!c)return i();const u=x(c),g=(b,T)=>k(n,{[b]:T}),v=(b,T,B=!1)=>d("div",{className:"sf-field",children:[e(S,{children:T}),B?e("textarea",{value:String(c[b]??""),onChange:A=>g(b,A.target.value)}):e("input",{type:"text",value:String(c[b]??""),onChange:A=>g(b,A.target.value)})]});return d("div",{className:"sf-field",children:[d("button",{type:"button",style:C,onClick:()=>f({level:"group",key:u}),children:["\u2190 ",I(u,String(c.groupName??""))]}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:c.name||"City"}),v("name","Location name"),v("state","State / Province"),v("country","Country"),v("address","Address",!0),v("phone","Phone"),v("hours","Opening hours"),v("timezone","Timezone chip"),e("div",{style:{marginTop:12},children:e("button",{type:"button",style:W,onClick:()=>{t(s.filter((b,T)=>T!==n)),f({level:"group",key:u})},children:"Delete city"})})]})}if(r.level==="group")return l.some(n=>n.key===r.key)?e(ne,{cards:s,groupKey:r.key,onChange:t,onBack:()=>f({level:"groups"}),onOpenCity:n=>f({level:"city",index:n}),onNavigate:n=>f({level:"group",key:n})},r.key):i();function i(){return d("div",{className:"sf-field",children:[e(R,{props:y,setSection:N}),!p&&e(z,{children:h()})]})}function h(){return e(E,{label:"Locations",noun:"group",items:l,onChange:n=>{const c=n.find(u=>!l.some(g=>g.key===u.key));t(Y(s,n.map(u=>u.key),u=>[{...H,group:u,groupName:""}])),c&&f({level:"group",key:c.key})},newItem:()=>({key:O(),name:"",indices:[]}),open:null,onOpen:()=>{},renderItem:()=>null,removeOnRow:!1,canDuplicate:()=>!1,above:l.length===0?e("div",{style:{fontSize:12,color:"var(--fg-dim, #999)",padding:"4px 0"},children:"No locations yet."}):void 0,renderRow:n=>d("button",{type:"button",style:G,onClick:()=>f({level:"group",key:n.key}),children:[e("span",{style:{fontWeight:500},children:I(n.key,n.name)}),d("span",{style:{color:"var(--fg-dim, #999)"},children:[n.indices.length," ",n.indices.length===1?"city":"cities"," \u203A"]})]})})}return i()}export{te as default};
1
+ "use client";import{jsx as e,Fragment as L,jsxs as m}from"react/jsx-runtime";import{useId as U,useState as q}from"react";import{InspectorUpLevel as N}from"efficient-easel/chrome";import{useEasel as $}from"efficient-easel/easel";import{ListField as D}from"efficient-easel/fields";import{SettingsField as E}from"efficient-easel/panel";import{ClockIcon as F,ContrastIcon as V,GlobeIcon as Y,LinkIcon as Z,LocationIcon as J,PhoneIcon as Q,SquareIcon as X,TypeIcon as O}from"efficient-easel/icons";import K from"./MediaUploadField.js";import{useLocationsHasTree as ee}from"./LocationsTreeContext.js";import{CoordsField as ne}from"../lib/puck/controls.js";import{useLocationsFocus as te,setLocationsFocus as f}from"../lib/puck/locations-focus.js";import{groupKeyOf as S,groupLabelOf as A,NEW_CITY as G,writeGroupCities as ie,writeGroupOrder as oe}from"../lib/puck/locations-tree.js";import{useSectionOps as re}from"../lib/puck/use-section-ops.js";import{ROOT_ZONE as le}from"../lib/puck/content-tree.js";import{CONTACT_LOCATIONS_DEFAULTS as H,parseLocationTileShape as ae}from"../lib/content/contact.js";function se(a){const t=[];return a.forEach((s,o)=>{const u=S(s);let l=t.find(i=>i.key===u);l||(l={key:u,name:String(s?.groupName??""),indices:[]},t.push(l)),l.indices.push(o)}),t}function z({children:a}){return e("div",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim, #999)",margin:"14px 0 6px"},children:a})}const W={width:"100%",height:32,textAlign:"left",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"0 12px",fontSize:12,border:"1px solid var(--border-strong, #d0d0d0)",borderRadius:6,background:"transparent",color:"inherit",cursor:"inherit"},ce={padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer"},_={...ce,color:"#d85a30"};function y({label:a,value:t,placeholder:s,textarea:o,icon:u,onChange:l,onBlur:i,onKeyDown:h}){const b=U();return e(E,{label:a,icon:u??e(O,{}),htmlFor:b,children:o?e("textarea",{id:b,value:t,placeholder:s,onChange:g=>l(g.target.value)}):e("input",{id:b,type:"text",value:t,placeholder:s,onChange:g=>l(g.target.value),onBlur:i,onKeyDown:h})})}const de=[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],pe=[{label:"Tall (3:4)",value:"tall"},{label:"Square",value:"square"},{label:"Wide (2:1)",value:"wide"}];function R({label:a,icon:t,options:s,value:o,onChange:u}){return e(E,{label:a,icon:t,children:e("div",{role:"group","aria-label":a,style:{display:"flex",gap:4,flex:1},children:s.map(l=>{const i=o===l.value;return e("button",{type:"button","aria-pressed":i,onClick:()=>u(l.value),style:{flex:1,padding:"6px 8px",fontSize:12,borderRadius:6,cursor:"pointer",border:`1px solid ${i?"var(--sf-accent, #2563eb)":"var(--border-strong, #d0d0d0)"}`,background:i?"var(--sf-accent, #2563eb)":"transparent",color:i?"#fff":"inherit",fontWeight:i?500:400},children:l.label},l.value)})})})}function B({props:a,setSection:t,headOnly:s}){const o=i=>String(a[i]??""),u=a.mapTheme||H.mapTheme,l=H;return m(L,{children:[!s&&e(z,{children:"Section"}),e(y,{label:"Section number",value:o("sectionNumber"),placeholder:l.sectionNumber,onChange:i=>t({sectionNumber:i})}),e(y,{label:"Heading",textarea:!0,value:o("heading"),placeholder:l.heading,onChange:i=>t({heading:i})}),e(y,{label:"Body",textarea:!0,value:o("tagline"),placeholder:l.tagline,onChange:i=>t({tagline:i})}),s?null:m(L,{children:[e(z,{children:"City strip"}),e(y,{label:"Eyebrow",value:o("galleryKicker"),placeholder:l.galleryKicker,onChange:i=>t({galleryKicker:i})}),e(y,{label:"Hint",value:o("galleryHint"),placeholder:l.galleryHint,onChange:i=>t({galleryHint:i})}),e(R,{label:"Shape",icon:e(X,{}),options:pe,value:ae(a.imageShape),onChange:i=>t({imageShape:i})}),e(z,{children:"Map & Theme"}),e(R,{label:"Map theme",icon:e(V,{}),options:de,value:u,onChange:i=>t({mapTheme:i})})]})]})}function ue({cards:a,groupKey:t,onChange:s,onBack:o,onOpenCity:u,onNavigate:l}){const i=a.map((r,p)=>S(r)===t?p:-1).filter(r=>r>=0),h=String(a[i[0]]?.groupName??""),b=new Set(a.map(S).filter(r=>r!==t)),[g,C]=q(t),k=r=>s(a.map(p=>S(p)===t?{...p,...r}:p)),I=()=>{const r=g;if(r!==t){if(b.has(r)){C(t);return}s(a.map(p=>S(p)===t?{...p,group:r}:p)),l(r)}};return m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:"Section",onSelect:o}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:A(t,h)}),e(y,{label:"Group heading",value:g,placeholder:"e.g. Americas",onChange:C,onBlur:I,onKeyDown:r=>{r.key==="Enter"&&r.currentTarget.blur()}}),b.has(g)&&g!==t&&e("p",{className:"sf-note sf-note--error",role:"alert",children:"Another group already uses this heading — pick a different one."}),e(y,{label:"Group name",value:h,placeholder:"Shown beside the heading",onChange:r=>k({groupName:r})}),e(D,{label:"Cities in this group",noun:"city",items:i.map(r=>a[r]),onChange:r=>s(ie(a,t,r)),newItem:()=>({...G,group:t,groupName:h}),open:null,onOpen:()=>{},renderItem:()=>null,removeOnRow:!1,canDuplicate:()=>!1,renderRow:(r,p)=>m("button",{type:"button",style:W,onClick:()=>u(i[p]),children:[e("span",{children:r?.name||"City"}),e("span",{"aria-hidden":"true",children:"›"})]})}),e("div",{style:{marginTop:12},children:m("button",{type:"button",style:_,onClick:()=>{s(a.filter(r=>S(r)!==t)),o()},children:["Delete group (",i.length," ",i.length===1?"city":"cities",")"]})})]})}function me({value:a,onChange:t}){const s=Array.isArray(a)?a:[],o=te(),u=ee(),l=se(s),{appState:i,selectedItem:h}=$(n=>n),b=re(),g=h?.props??{},C=n=>{if(!h)return;const d=(i.data.content??[]).findIndex(v=>v.props.id===h.props.id);d<0||b.replaceComponent(le,d,{type:h.type,props:{...h.props,...n}})},k=(n,c)=>t(s.map((d,v)=>v===n?{...d,...c}:d)),I=()=>{const n=new Set(l.map(v=>v.key));let c=l.length+1,d=`Group ${c}`;for(;n.has(d);)d=`Group ${++c}`;return d};if(o.level==="texts")return m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:"Locations",onSelect:()=>f({level:"groups"})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Texts"}),e(B,{props:g,setSection:C,headOnly:!0})]});if(o.level==="image"){const n=s[o.index];return n?m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:String(n.name??"")||"City",onSelect:()=>f({level:"city",index:o.index})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Image"}),e(K,{value:n.photo||"",onChange:c=>k(o.index,{photo:c}),label:"Image",accept:"image/*"})]}):r()}if(o.level==="map"){const n=s[o.index];return n?m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:String(n.name??"")||"City",onSelect:()=>f({level:"city",index:o.index})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Map"}),e(ne,{value:n.geocode,onChange:c=>k(o.index,{geocode:c}),label:"Coordinates"}),e(y,{label:"Directions link",icon:e(Z,{}),value:String(n.mapsUrl??""),onChange:c=>k(o.index,{mapsUrl:c})})]}):r()}if(o.level==="city"){const n=o.index,c=s[n];if(!c)return r();const d=S(c),v=(w,T)=>k(n,{[w]:T}),x=(w,T,M,P=!1)=>e(y,{label:T,icon:M,textarea:P,value:String(c[w]??""),onChange:j=>v(w,j)});return m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:A(d,String(c.groupName??"")),onSelect:()=>f({level:"group",key:d})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:c.name||"City"}),x("name","Location name",e(O,{})),x("state","State / Province",e(O,{})),x("country","Country",e(Y,{})),x("address","Address",e(J,{}),!0),x("phone","Phone",e(Q,{})),x("hours","Opening hours",e(F,{})),x("timezone","Timezone chip",e(F,{})),e("div",{style:{marginTop:12},children:e("button",{type:"button",style:_,onClick:()=>{t(s.filter((w,T)=>T!==n)),f({level:"group",key:d})},children:"Delete city"})})]})}if(o.level==="group")return l.some(n=>n.key===o.key)?e(ue,{cards:s,groupKey:o.key,onChange:t,onBack:()=>f({level:"groups"}),onOpenCity:n=>f({level:"city",index:n}),onNavigate:n=>f({level:"group",key:n})},o.key):r();function r(){return m("div",{className:"sf-locations-view",children:[e(B,{props:g,setSection:C}),!u&&e(L,{children:p()})]})}function p(){return e(D,{label:"Locations",noun:"group",items:l,onChange:n=>{const c=n.find(d=>!l.some(v=>v.key===d.key));t(oe(s,n.map(d=>d.key),d=>[{...G,group:d,groupName:""}])),c&&f({level:"group",key:c.key})},newItem:()=>({key:I(),name:"",indices:[]}),open:null,onOpen:()=>{},renderItem:()=>null,removeOnRow:!1,canDuplicate:()=>!1,above:l.length===0?e("div",{style:{fontSize:12,color:"var(--fg-dim, #999)",padding:"4px 0"},children:"No locations yet."}):void 0,renderRow:n=>m("button",{type:"button",style:W,onClick:()=>f({level:"group",key:n.key}),children:[e("span",{style:{fontWeight:500},children:A(n.key,n.name)}),m("span",{style:{color:"var(--fg-dim, #999)"},children:[n.indices.length," ",n.indices.length===1?"city":"cities"," ›"]})]})})}return r()}export{me as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r,Fragment as c}from"react/jsx-runtime";import{sectionRunsFullWidth as B}from"../lib/content/section-width.js";import{Fragment as N}from"react";import{SiteLink as S}from"../lib/site-runtime.js";import{stripMarkup as E}from"../lib/markup.js";import L from"./EditorialSectionHead.js";import C from"./Placeholder.js";import G from"./SectionEyebrow.js";import{renderGold as t,renderHeadline as z}from"./goldPhrases.js";function M({headNum:k,headTitle:m,headDesc:d,category:f,metaMiddle:g,readLabel:b,title:n,dek:h,quote:i,quoteAttribution:l,ctaText:u,ctaHref:w,image:j,imageLabel:v,metaPublished:s,metaReads:p,omitHead:x=!1,...F}){const y=[f?e("span",{className:"text-accent",children:t(f)}):null,g?e("span",{children:t(g)}):null,b?e("span",{children:t(b)}):null].filter(Boolean),_=!!s||!!p;return r("section",{className:B(F)?x?"border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20":x?"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20",children:[x?null:e(L,{num:k,title:m?z(m,!0):void 0,desc:d?t(d):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-[1100px]:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-[1100px]:border-r-0 max-[1100px]:border-b max-[1100px]:px-7 max-[1100px]:py-12",children:[y.length>0&&e("div",{className:"flex items-center gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:y.map((o,a)=>r(N,{children:[a>0&&e("span",{className:"opacity-40",children:"\xB7"}),o]},a))}),n&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4.2vw,68px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.035em]",children:z(n,!0)}),h&&e("p",{className:"font-serif text-[length:var(--size-body,22px)] italic leading-[1.45] text-fg",children:t(h)}),(i||l)&&r("blockquote",{className:"max-w-[520px] border-l-2 border-accent py-1.5 pl-[22px] font-serif text-[length:var(--size-body,17px)] italic leading-[1.6] text-fg-dim",children:[i&&r(c,{children:["\u201C",t(i),"\u201D"]}),l&&e("strong",{className:"mt-2.5 block font-display text-[length:var(--size-body,14px)] font-normal not-italic uppercase tracking-[0.22em] text-fg",children:t(l)})]}),u&&r(S,{href:w||"#",className:"inline-flex items-center gap-3.5 self-start border border-btn px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.3em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",children:[t(u)," ",e("span",{children:"\u2192"})]})]}),r("div",{className:"relative overflow-hidden bg-surface-2 max-[1100px]:aspect-[4/3]",children:[e(C,{label:"long-read",src:j||void 0,alt:E(n||"Long read"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:"linear-gradient(180deg, rgba(10,10,10,0.55) 0%, transparent 25%, transparent 60%, rgba(10,10,10,0.7) 100%)"}}),v&&e(G,{text:v,size:12,className:"absolute right-6 top-6 z-[2]"}),_&&e("div",{className:"absolute bottom-6 left-6 z-[2] font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.8] tracking-[0.22em] text-overlay-fg",children:[s?r(c,{children:[e("strong",{className:"font-normal text-accent",children:"Published"})," ",t(s)]}):null,p?r(c,{children:[e("strong",{className:"font-normal text-accent",children:"Reads in"})," ",t(p)]}):null].filter(Boolean).map((o,a)=>r(N,{children:[a>0&&e("br",{}),o]},a))})]})]})]})}export{M as default};
1
+ import{jsx as e,jsxs as r,Fragment as c}from"react/jsx-runtime";import{sectionRunsFullWidth as B}from"../lib/content/section-width.js";import{Fragment as N}from"react";import{SiteLink as S}from"../lib/site-runtime.js";import{stripMarkup as E}from"../lib/markup.js";import L from"./EditorialSectionHead.js";import C from"./Placeholder.js";import G from"./SectionEyebrow.js";import{renderGold as t,renderHeadline as z}from"./goldPhrases.js";function M({headNum:k,headTitle:m,headDesc:d,category:f,metaMiddle:g,readLabel:b,title:n,dek:h,quote:i,quoteAttribution:l,ctaText:u,ctaHref:w,image:j,imageLabel:v,metaPublished:s,metaReads:p,omitHead:x=!1,...F}){const y=[f?e("span",{className:"text-accent",children:t(f)}):null,g?e("span",{children:t(g)}):null,b?e("span",{children:t(b)}):null].filter(Boolean),_=!!s||!!p;return r("section",{className:B(F)?x?"border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20":x?"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20",children:[x?null:e(L,{num:k,title:m?z(m,!0):void 0,desc:d?t(d):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-[1100px]:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-[1100px]:border-r-0 max-[1100px]:border-b max-[1100px]:px-7 max-[1100px]:py-12",children:[y.length>0&&e("div",{className:"flex items-center gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:y.map((o,a)=>r(N,{children:[a>0&&e("span",{className:"opacity-40",children:"·"}),o]},a))}),n&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4.2vw,68px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.035em]",children:z(n,!0)}),h&&e("p",{className:"font-serif text-[length:var(--size-body,22px)] italic leading-[1.45] text-fg",children:t(h)}),(i||l)&&r("blockquote",{className:"max-w-[520px] border-l-2 border-accent py-1.5 pl-[22px] font-serif text-[length:var(--size-body,17px)] italic leading-[1.6] text-fg-dim",children:[i&&r(c,{children:["“",t(i),"”"]}),l&&e("strong",{className:"mt-2.5 block font-display text-[length:var(--size-body,14px)] font-normal not-italic uppercase tracking-[0.22em] text-fg",children:t(l)})]}),u&&r(S,{href:w||"#",className:"inline-flex items-center gap-3.5 self-start border border-btn px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.3em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",children:[t(u)," ",e("span",{children:"→"})]})]}),r("div",{className:"relative overflow-hidden bg-surface-2 max-[1100px]:aspect-[4/3]",children:[e(C,{label:"long-read",src:j||void 0,alt:E(n||"Long read"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:"linear-gradient(180deg, rgba(10,10,10,0.55) 0%, transparent 25%, transparent 60%, rgba(10,10,10,0.7) 100%)"}}),v&&e(G,{text:v,size:12,className:"absolute right-6 top-6 z-[2]"}),_&&e("div",{className:"absolute bottom-6 left-6 z-[2] font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.8] tracking-[0.22em] text-overlay-fg",children:[s?r(c,{children:[e("strong",{className:"font-normal text-accent",children:"Published"})," ",t(s)]}):null,p?r(c,{children:[e("strong",{className:"font-normal text-accent",children:"Reads in"})," ",t(p)]}):null].filter(Boolean).map((o,a)=>r(N,{children:[a>0&&e("br",{}),o]},a))})]})]})]})}export{M as default};
@@ -1,6 +1 @@
1
- import { type MediaPanelComponent, type MediaPickRequest } from "../lib/editor-media-panel.js";
2
- export default function MediaSidePanel({ panel: Panel, pick, onHide, }: {
3
- panel: MediaPanelComponent;
4
- pick: MediaPickRequest | null;
5
- onHide?: () => void;
6
- }): import("react").JSX.Element;
1
+ export { default } from "efficient-easel/screen/components/MediaSidePanel";
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as l,jsxs as r}from"react/jsx-runtime";import{MediaPanelHead as m,mediaPickKind as o}from"efficient-easel/chrome";import{useWebsiteName as u}from"./WebsiteSettingsPanel.js";import{settlePanelPick as t}from"../lib/editor-media-panel.js";function f({panel:a,pick:e,onHide:i}){const s=u();return r(l,{children:[n(m,{context:s,pick:e?{kind:o(e.accept),field:e.title||void 0}:null,onCancel:()=>e&&t(e.requestId,null),onHide:i}),n("div",{className:"sf-media-panel",children:n(a,{pick:e,onPick:d=>e&&t(e.requestId,d)})})]})}export{f as default};
1
+ "use client";import{default as f}from"efficient-easel/screen/components/MediaSidePanel";export{f as default};
@@ -1 +1 @@
1
- "use client";import{jsxs as p,jsx as e}from"react/jsx-runtime";import{SettingsField as g}from"efficient-easel/panel";import{ImageIcon as h,PlayIcon as v}from"efficient-easel/icons";import{ImageBox as E}from"efficient-easel/pick";import{useContext as N,useState as y}from"react";import{FileIntakeAlert as S,useFileIntake as B}from"efficient-shell/file-intake";import{StorefrontDocumentContext as F}from"./StorefrontDocumentContext.js";import{requestMediaPick as x}from"../lib/editor-media-picker.js";import{useEditorHost as C}from"../lib/editor-host.js";import{backendOf as O}from"../lib/editor-session.js";import{useEditorSession as P}from"../lib/editor-session-context.js";function w({value:k,onChange:l,label:t,accept:i,placeholder:j}){const m=C(),b=P(),[r,d]=y(!1),[c,a]=y(null),s=i.startsWith("video"),u=N(F),o=B({accept:i,maxSizeBytes:O(b).media.maxUploadBytes,acceptHint:s?"videos only":"images only",multiple:!1,disabled:r,onAccept:([n])=>{a(null),d(!0),x(m,{accept:i,title:t,file:n}).then(f=>{f&&l(f.url)}).catch(()=>a("Couldn\u2019t open the media picker \u2014 please try again.")).finally(()=>d(!1))}}),I=()=>(o.clearRejections(),a(null),x(m,{accept:i,title:t}).then(n=>n?.url??null));return u&&!u.capabilities.mediaEditing?e(g,{label:t,icon:s?e(v,{}):e(h,{}),children:p("div",{className:"sf-image-slot-inert",children:["Templates don\u2019t store ",s?"videos":"images"," \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."]})}):p("div",{children:[e(g,{label:t,icon:s?e(v,{}):e(h,{}),children:e("div",{className:`sf-image-drop${o.dragOver?" is-dragover":""}`,...o.zoneProps,children:e(E,{value:k,onChange:l,label:t,kind:s?"video":"image",placeholder:j,openLibrary:r?void 0:I})})}),r&&e("div",{className:"sf-image-status",role:"status",children:"Opening the picker\u2026"}),c&&e("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:c}),e(S,{rejections:o.rejections,className:"sf-image-status sf-image-status--error"})]})}export{w as default};
1
+ "use client";import{jsxs as p,jsx as e}from"react/jsx-runtime";import{SettingsField as g}from"efficient-easel/panel";import{ImageIcon as h,PlayIcon as v}from"efficient-easel/icons";import{ImageBox as E}from"efficient-easel/pick";import{useContext as N,useState as y}from"react";import{FileIntakeAlert as S,useFileIntake as B}from"efficient-shell/file-intake";import{StorefrontDocumentContext as F}from"./StorefrontDocumentContext.js";import{requestMediaPick as x}from"../lib/editor-media-picker.js";import{useEditorHost as C}from"../lib/editor-host.js";import{backendOf as O}from"../lib/website-session.js";import{useEditorSession as P}from"../lib/editor-session-context.js";function w({value:k,onChange:l,label:t,accept:i,placeholder:j}){const m=C(),b=P(),[r,d]=y(!1),[c,a]=y(null),s=i.startsWith("video"),u=N(F),o=B({accept:i,maxSizeBytes:O(b).media.maxUploadBytes,acceptHint:s?"videos only":"images only",multiple:!1,disabled:r,onAccept:([n])=>{a(null),d(!0),x(m,{accept:i,title:t,file:n}).then(f=>{f&&l(f.url)}).catch(()=>a("Couldn’t open the media picker — please try again.")).finally(()=>d(!1))}}),I=()=>(o.clearRejections(),a(null),x(m,{accept:i,title:t}).then(n=>n?.url??null));return u&&!u.capabilities.mediaEditing?e(g,{label:t,icon:s?e(v,{}):e(h,{}),children:p("div",{className:"sf-image-slot-inert",children:["Templates don’t store ",s?"videos":"images"," — this slot stays a placeholder. Each website picks its own after it’s created."]})}):p("div",{children:[e(g,{label:t,icon:s?e(v,{}):e(h,{}),children:e("div",{className:`sf-image-drop${o.dragOver?" is-dragover":""}`,...o.zoneProps,children:e(E,{value:k,onChange:l,label:t,kind:s?"video":"image",placeholder:j,openLibrary:r?void 0:I})})}),r&&e("div",{className:"sf-image-status",role:"status",children:"Opening the picker…"}),c&&e("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:c}),e(S,{rejections:o.rejections,className:"sf-image-status sf-image-status--error"})]})}export{w as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r,Fragment as $}from"react/jsx-runtime";import{renderGold as te,renderHeadline as ae}from"./goldPhrases.js";const C="#ffffff",d="#16181d",o="#5b6470",u="#9aa3ae",p="#f4f6f8",m="#e3e7ec",g="#1f9d55";function re({rows:n}){return e("div",{className:"flex flex-col gap-3",children:n.map((l,c)=>{const a=l.state??"ok",s=a==="no";return r("div",{className:"flex items-center gap-3 rounded-lg border px-4 py-3",style:{background:s?"#fbfbfc":p,borderColor:m},children:[a==="no"?e("span",{"aria-hidden":!0,className:"text-[15px] font-bold",style:{color:u},children:"\u2715"}):e("span",{"aria-hidden":!0,className:"h-[11px] w-[11px] flex-shrink-0 rounded-full",style:{background:a==="warn"?"var(--accent)":g}}),e("span",{className:"text-[14px] font-semibold",style:{color:s?u:d},children:l.lead}),e("span",{className:"text-[13px]",style:{color:s?u:o},children:l.detail}),(l.status??"").trim()&&e("span",{className:"ml-auto whitespace-nowrap text-[12px] font-bold",style:{color:a==="ok"?g:a==="warn"?"var(--accent)":u},children:l.status})]},c)})})}const I=["#c7cdd5","var(--accent)","#c7cdd5",g];function ne({columns:n}){return e("div",{className:"grid gap-2 rounded-xl p-3",style:{background:p,gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map((l,c)=>r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-baseline justify-between px-1",children:[e("span",{className:"font-mono text-[9px] font-semibold uppercase tracking-[0.14em]",style:{color:o},children:l.title}),e("span",{className:"font-mono text-[9px] font-bold",style:{color:"var(--accent)"},children:l.cards.length})]}),l.cards.map((a,s)=>r("div",{className:"rounded-md border px-2.5 py-2",style:{background:C,borderColor:c===n.length-1?"#bfe3ce":m},children:[e("span",{"aria-hidden":!0,className:"mb-1.5 block h-[8px] w-[8px] rounded-full",style:{background:I[c%I.length]}}),e("span",{className:"block text-[11px] font-semibold leading-snug",style:{color:d},children:a})]},s))]},c))})}function se({heading:n,bars:l}){const c=Math.max(...l.map(s=>s.value),0)||1,a=l.findIndex(s=>s.value===c);return r("div",{className:"border-t pt-4",style:{borderColor:m},children:[n.trim()&&e("div",{className:"mb-3 font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:n}),e("div",{className:"flex flex-col gap-2.5",children:l.map((s,i)=>r("div",{className:"flex items-center gap-3",children:[e("span",{className:"w-[84px] flex-shrink-0 text-[12px] font-bold",style:{color:d},children:s.label}),e("span",{className:"h-[12px] rounded-full",style:{width:`${Math.max(s.value/c*60,4)}%`,background:i===a?"var(--accent)":i%2?"#c7cdd5":"#9aa3ae"}}),r("span",{className:"text-[12px]",style:{color:o},children:[s.value,"%"]})]},i))})]})}function E({size:n}){const l=n/2;return r("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-hidden":!0,children:[e("circle",{cx:l,cy:l,r:l*.82,fill:"none",stroke:"#9aa3ae",strokeWidth:"2.5"}),e("circle",{cx:l,cy:l,r:l*.5,fill:"none",stroke:"var(--accent)",strokeWidth:"2"}),e("circle",{cx:l,cy:l,r:l*.14,fill:"var(--accent)"})]})}function ce({header:n,lines:l}){return r("div",{style:{background:"#0c0e11"},children:[r("div",{className:"relative flex items-center gap-2 px-4 py-3",style:{background:"#161a20"},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"absolute inset-x-0 text-center font-mono text-[11px]",style:{color:"rgba(244,246,242,0.45)"},children:n})]}),r("div",{className:"flex flex-col gap-1.5 px-5 py-5 font-mono text-[13px] leading-relaxed",children:[l.map((c,a)=>c.startsWith("$ ")?r("div",{children:[e("span",{style:{color:"var(--accent)"},children:"$ "}),e("span",{style:{color:"#f4f6f2"},children:c.slice(2)})]},a):c.startsWith("\u2713")?e("div",{style:{color:"#6fcf7e"},children:c},a):e("div",{style:{color:"rgba(244,246,242,0.55)"},children:c},a)),e("div",{"aria-hidden":!0,className:"mt-1 h-[15px] w-[8px]",style:{background:"var(--accent)"}})]})]})}function de({urlText:n,heroTitle:l,heroButton:c,products:a}){return r("div",{children:[r("div",{className:"flex items-center gap-2 px-4 py-3",style:{background:p},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"mx-auto rounded border px-6 py-1 text-[11px]",style:{background:C,borderColor:m,color:o},children:n}),e("span",{className:"w-[54px]","aria-hidden":!0})]}),r("div",{className:"relative overflow-hidden px-5 py-6",style:{background:d},children:[e("div",{className:"absolute -right-4 top-1/2 -translate-y-1/2 opacity-90",children:e(E,{size:104})}),l.trim()&&e("div",{className:"max-w-[240px] text-[15px] font-bold uppercase leading-snug tracking-wide text-white",children:l}),c.trim()&&e("div",{className:"mt-3 inline-block rounded px-3.5 py-1.5 text-[11px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:c})]}),a.length>0&&e("div",{className:"grid grid-cols-3 gap-3 p-4",children:a.map((s,i)=>r("div",{className:"overflow-hidden rounded-lg border",style:{borderColor:m},children:[e("div",{className:"flex items-center justify-center py-3",style:{background:p},children:e(E,{size:56})}),r("div",{className:"flex flex-col gap-1 p-2.5",children:[e("span",{className:"text-[10.5px] font-bold leading-tight",style:{color:d},children:s.name}),e("span",{className:"text-[11px] font-bold",style:{color:"var(--accent)"},children:s.price}),e("span",{className:"mt-0.5 rounded px-2 py-1 text-center text-[9px] font-bold text-white",style:{background:d},"aria-hidden":!0,children:"Add to cart"})]})]},i))})]})}function ie({eyebrow:n,title:l,body:c,variant:a="spec-card",cardHeader:s,badge:i,cardTitle:f,cardSubtitle:b,pills:F,tiles:W,rows:K,button:_,footnote:j,col1Title:T,col1Cards:G,col2Title:L,col2Cards:O,col3Title:P,col3Cards:z,col4Title:U,col4Cards:q,barsHeading:J,bars:Q,termLines:S,urlText:V,heroTitle:A,heroButton:X,products:Y,align:Z="right",editing:x=!1}={}){const y=(F??[]).filter(t=>x||(t.value??"").trim()),v=(W??[]).filter(t=>x||(t.label??"").trim()),N=(K??[]).filter(t=>x||(t.lead??"").trim()),k=[[T,G],[L,O],[P,z],[U,q]].map(([t,h])=>({title:(t??"").trim(),cards:(h??[]).map(le=>(le.text??"").trim()).filter(Boolean)})).filter(t=>t.title||t.cards.length>0),w=(Q??[]).map(t=>({label:(t.label??"").trim(),value:parseFloat(t.value??"")})).filter(t=>t.label&&Number.isFinite(t.value)),R=(S??[]).map(t=>t.text??"").filter(t=>x||t.trim()),D=(Y??[]).map(t=>({name:(t.name??"").trim(),price:(t.price??"").trim()})).filter(t=>t.name),H=!!(n??"").trim()||!!(l??"").trim(),ee=!!(s??"").trim()||!!(f??"").trim()||y.length>0||v.length>0||N.length>0||k.length>0||w.length>0||D.length>0||R.length>0||!!(A??"").trim();if(!x&&!H&&!ee)return null;const M=r("div",{className:`w-full overflow-hidden rounded-2xl shadow-[0_24px_60px_rgba(0,0,0,0.35)] ${a==="kanban"||a==="browser"||a==="terminal"?"max-w-[600px]":"max-w-[520px]"}`,style:{background:C},children:[a!=="terminal"&&(s??"").trim()&&r("div",{className:"flex items-center justify-between px-6 py-4",style:{background:d},children:[e("span",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-white",children:s}),(i??"").trim()&&r("span",{className:"flex items-center gap-2 font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-white",children:[e("span",{"aria-hidden":!0,className:"h-[9px] w-[9px] rounded-full",style:{background:g}}),i]})]}),a==="terminal"?e(ce,{header:s??"",lines:R}):a==="browser"?e(de,{urlText:V??"",heroTitle:A??"",heroButton:X??"",products:D}):r("div",{className:"flex flex-col gap-5 p-6",children:[((f??"").trim()||(b??"").trim())&&r("div",{children:[(f??"").trim()&&e("div",{className:"text-[22px] font-bold leading-tight",style:{color:d},children:f}),(b??"").trim()&&e("div",{className:"mt-1 text-[14px]",style:{color:o},children:b})]}),a==="fitment"&&y.length>0&&e("div",{className:"flex flex-wrap gap-2.5",children:y.map((t,h)=>r("span",{className:"flex items-baseline gap-2 rounded border px-4 py-2",style:{background:p,borderColor:m},children:[e("span",{className:"text-[11px]",style:{color:o},children:t.label}),e("span",{className:"text-[13px] font-bold",style:{color:d},children:t.value})]},h))}),a!=="fitment"&&v.length>0&&e("div",{className:"grid grid-cols-2 gap-3",children:v.map((t,h)=>r("div",{className:"rounded-lg px-4 py-3",style:{background:p},children:[e("div",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:t.label}),e("div",{className:"mt-1 text-[17px] font-bold",style:{color:d},children:t.value})]},h))}),N.length>0&&e(re,{rows:N}),(_??"").trim()&&e("div",{className:"self-start rounded-lg px-6 py-2.5 text-[14px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:_}),a==="kanban"&&k.length>0&&e(ne,{columns:k}),a==="claims"&&w.length>0&&e(se,{heading:J??"",bars:w}),(j??"").trim()&&e("div",{className:"border-t pt-4",style:{borderColor:m},children:e("span",{className:"text-[15px] font-bold",style:{color:"var(--accent)"},children:j})})]})]}),B=r("div",{children:[(n??"").trim()&&e("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[12px] font-semibold uppercase tracking-[0.16em] text-bg",children:te(n??"")}),(l??"").trim()&&e("h2",{className:"mt-5 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:ae(l??"",!1)}),(c??"").trim()&&e("p",{className:"mt-5 max-w-[46ch] text-[15px] leading-relaxed text-fg/65",children:c})]});return e("section",{className:"relative z-[2] border-y border-line bg-surface",children:e("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:grid-cols-2 max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:Z==="left"?r($,{children:[e("div",{className:"flex justify-center min-[960px]:justify-start",children:M}),B]}):r($,{children:[B,e("div",{className:"flex justify-center min-[960px]:justify-end",children:M})]})})})}export{ie as default};
1
+ import{jsx as e,jsxs as r,Fragment as $}from"react/jsx-runtime";import{renderGold as te,renderHeadline as ae}from"./goldPhrases.js";const C="#ffffff",d="#16181d",o="#5b6470",u="#9aa3ae",p="#f4f6f8",m="#e3e7ec",g="#1f9d55";function re({rows:n}){return e("div",{className:"flex flex-col gap-3",children:n.map((l,c)=>{const a=l.state??"ok",s=a==="no";return r("div",{className:"flex items-center gap-3 rounded-lg border px-4 py-3",style:{background:s?"#fbfbfc":p,borderColor:m},children:[a==="no"?e("span",{"aria-hidden":!0,className:"text-[15px] font-bold",style:{color:u},children:"✕"}):e("span",{"aria-hidden":!0,className:"h-[11px] w-[11px] flex-shrink-0 rounded-full",style:{background:a==="warn"?"var(--accent)":g}}),e("span",{className:"text-[14px] font-semibold",style:{color:s?u:d},children:l.lead}),e("span",{className:"text-[13px]",style:{color:s?u:o},children:l.detail}),(l.status??"").trim()&&e("span",{className:"ml-auto whitespace-nowrap text-[12px] font-bold",style:{color:a==="ok"?g:a==="warn"?"var(--accent)":u},children:l.status})]},c)})})}const I=["#c7cdd5","var(--accent)","#c7cdd5",g];function ne({columns:n}){return e("div",{className:"grid gap-2 rounded-xl p-3",style:{background:p,gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map((l,c)=>r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-baseline justify-between px-1",children:[e("span",{className:"font-mono text-[9px] font-semibold uppercase tracking-[0.14em]",style:{color:o},children:l.title}),e("span",{className:"font-mono text-[9px] font-bold",style:{color:"var(--accent)"},children:l.cards.length})]}),l.cards.map((a,s)=>r("div",{className:"rounded-md border px-2.5 py-2",style:{background:C,borderColor:c===n.length-1?"#bfe3ce":m},children:[e("span",{"aria-hidden":!0,className:"mb-1.5 block h-[8px] w-[8px] rounded-full",style:{background:I[c%I.length]}}),e("span",{className:"block text-[11px] font-semibold leading-snug",style:{color:d},children:a})]},s))]},c))})}function se({heading:n,bars:l}){const c=Math.max(...l.map(s=>s.value),0)||1,a=l.findIndex(s=>s.value===c);return r("div",{className:"border-t pt-4",style:{borderColor:m},children:[n.trim()&&e("div",{className:"mb-3 font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:n}),e("div",{className:"flex flex-col gap-2.5",children:l.map((s,i)=>r("div",{className:"flex items-center gap-3",children:[e("span",{className:"w-[84px] flex-shrink-0 text-[12px] font-bold",style:{color:d},children:s.label}),e("span",{className:"h-[12px] rounded-full",style:{width:`${Math.max(s.value/c*60,4)}%`,background:i===a?"var(--accent)":i%2?"#c7cdd5":"#9aa3ae"}}),r("span",{className:"text-[12px]",style:{color:o},children:[s.value,"%"]})]},i))})]})}function E({size:n}){const l=n/2;return r("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-hidden":!0,children:[e("circle",{cx:l,cy:l,r:l*.82,fill:"none",stroke:"#9aa3ae",strokeWidth:"2.5"}),e("circle",{cx:l,cy:l,r:l*.5,fill:"none",stroke:"var(--accent)",strokeWidth:"2"}),e("circle",{cx:l,cy:l,r:l*.14,fill:"var(--accent)"})]})}function ce({header:n,lines:l}){return r("div",{style:{background:"#0c0e11"},children:[r("div",{className:"relative flex items-center gap-2 px-4 py-3",style:{background:"#161a20"},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"absolute inset-x-0 text-center font-mono text-[11px]",style:{color:"rgba(244,246,242,0.45)"},children:n})]}),r("div",{className:"flex flex-col gap-1.5 px-5 py-5 font-mono text-[13px] leading-relaxed",children:[l.map((c,a)=>c.startsWith("$ ")?r("div",{children:[e("span",{style:{color:"var(--accent)"},children:"$ "}),e("span",{style:{color:"#f4f6f2"},children:c.slice(2)})]},a):c.startsWith("✓")?e("div",{style:{color:"#6fcf7e"},children:c},a):e("div",{style:{color:"rgba(244,246,242,0.55)"},children:c},a)),e("div",{"aria-hidden":!0,className:"mt-1 h-[15px] w-[8px]",style:{background:"var(--accent)"}})]})]})}function de({urlText:n,heroTitle:l,heroButton:c,products:a}){return r("div",{children:[r("div",{className:"flex items-center gap-2 px-4 py-3",style:{background:p},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"mx-auto rounded border px-6 py-1 text-[11px]",style:{background:C,borderColor:m,color:o},children:n}),e("span",{className:"w-[54px]","aria-hidden":!0})]}),r("div",{className:"relative overflow-hidden px-5 py-6",style:{background:d},children:[e("div",{className:"absolute -right-4 top-1/2 -translate-y-1/2 opacity-90",children:e(E,{size:104})}),l.trim()&&e("div",{className:"max-w-[240px] text-[15px] font-bold uppercase leading-snug tracking-wide text-white",children:l}),c.trim()&&e("div",{className:"mt-3 inline-block rounded px-3.5 py-1.5 text-[11px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:c})]}),a.length>0&&e("div",{className:"grid grid-cols-3 gap-3 p-4",children:a.map((s,i)=>r("div",{className:"overflow-hidden rounded-lg border",style:{borderColor:m},children:[e("div",{className:"flex items-center justify-center py-3",style:{background:p},children:e(E,{size:56})}),r("div",{className:"flex flex-col gap-1 p-2.5",children:[e("span",{className:"text-[10.5px] font-bold leading-tight",style:{color:d},children:s.name}),e("span",{className:"text-[11px] font-bold",style:{color:"var(--accent)"},children:s.price}),e("span",{className:"mt-0.5 rounded px-2 py-1 text-center text-[9px] font-bold text-white",style:{background:d},"aria-hidden":!0,children:"Add to cart"})]})]},i))})]})}function ie({eyebrow:n,title:l,body:c,variant:a="spec-card",cardHeader:s,badge:i,cardTitle:f,cardSubtitle:b,pills:F,tiles:W,rows:K,button:_,footnote:j,col1Title:T,col1Cards:G,col2Title:L,col2Cards:O,col3Title:P,col3Cards:z,col4Title:U,col4Cards:q,barsHeading:J,bars:Q,termLines:S,urlText:V,heroTitle:A,heroButton:X,products:Y,align:Z="right",editing:x=!1}={}){const y=(F??[]).filter(t=>x||(t.value??"").trim()),v=(W??[]).filter(t=>x||(t.label??"").trim()),N=(K??[]).filter(t=>x||(t.lead??"").trim()),k=[[T,G],[L,O],[P,z],[U,q]].map(([t,h])=>({title:(t??"").trim(),cards:(h??[]).map(le=>(le.text??"").trim()).filter(Boolean)})).filter(t=>t.title||t.cards.length>0),w=(Q??[]).map(t=>({label:(t.label??"").trim(),value:parseFloat(t.value??"")})).filter(t=>t.label&&Number.isFinite(t.value)),R=(S??[]).map(t=>t.text??"").filter(t=>x||t.trim()),D=(Y??[]).map(t=>({name:(t.name??"").trim(),price:(t.price??"").trim()})).filter(t=>t.name),H=!!(n??"").trim()||!!(l??"").trim(),ee=!!(s??"").trim()||!!(f??"").trim()||y.length>0||v.length>0||N.length>0||k.length>0||w.length>0||D.length>0||R.length>0||!!(A??"").trim();if(!x&&!H&&!ee)return null;const M=r("div",{className:`w-full overflow-hidden rounded-2xl shadow-[0_24px_60px_rgba(0,0,0,0.35)] ${a==="kanban"||a==="browser"||a==="terminal"?"max-w-[600px]":"max-w-[520px]"}`,style:{background:C},children:[a!=="terminal"&&(s??"").trim()&&r("div",{className:"flex items-center justify-between px-6 py-4",style:{background:d},children:[e("span",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-white",children:s}),(i??"").trim()&&r("span",{className:"flex items-center gap-2 font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-white",children:[e("span",{"aria-hidden":!0,className:"h-[9px] w-[9px] rounded-full",style:{background:g}}),i]})]}),a==="terminal"?e(ce,{header:s??"",lines:R}):a==="browser"?e(de,{urlText:V??"",heroTitle:A??"",heroButton:X??"",products:D}):r("div",{className:"flex flex-col gap-5 p-6",children:[((f??"").trim()||(b??"").trim())&&r("div",{children:[(f??"").trim()&&e("div",{className:"text-[22px] font-bold leading-tight",style:{color:d},children:f}),(b??"").trim()&&e("div",{className:"mt-1 text-[14px]",style:{color:o},children:b})]}),a==="fitment"&&y.length>0&&e("div",{className:"flex flex-wrap gap-2.5",children:y.map((t,h)=>r("span",{className:"flex items-baseline gap-2 rounded border px-4 py-2",style:{background:p,borderColor:m},children:[e("span",{className:"text-[11px]",style:{color:o},children:t.label}),e("span",{className:"text-[13px] font-bold",style:{color:d},children:t.value})]},h))}),a!=="fitment"&&v.length>0&&e("div",{className:"grid grid-cols-2 gap-3",children:v.map((t,h)=>r("div",{className:"rounded-lg px-4 py-3",style:{background:p},children:[e("div",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:t.label}),e("div",{className:"mt-1 text-[17px] font-bold",style:{color:d},children:t.value})]},h))}),N.length>0&&e(re,{rows:N}),(_??"").trim()&&e("div",{className:"self-start rounded-lg px-6 py-2.5 text-[14px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:_}),a==="kanban"&&k.length>0&&e(ne,{columns:k}),a==="claims"&&w.length>0&&e(se,{heading:J??"",bars:w}),(j??"").trim()&&e("div",{className:"border-t pt-4",style:{borderColor:m},children:e("span",{className:"text-[15px] font-bold",style:{color:"var(--accent)"},children:j})})]})]}),B=r("div",{children:[(n??"").trim()&&e("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[12px] font-semibold uppercase tracking-[0.16em] text-bg",children:te(n??"")}),(l??"").trim()&&e("h2",{className:"mt-5 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:ae(l??"",!1)}),(c??"").trim()&&e("p",{className:"mt-5 max-w-[46ch] text-[15px] leading-relaxed text-fg/65",children:c})]});return e("section",{className:"relative z-[2] border-y border-line bg-surface",children:e("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:grid-cols-2 max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:Z==="left"?r($,{children:[e("div",{className:"flex justify-center min-[960px]:justify-start",children:M}),B]}):r($,{children:[B,e("div",{className:"flex justify-center min-[960px]:justify-end",children:M})]})})})}export{ie as default};
@@ -1,3 +1,4 @@
1
+ import { type ReactNode } from "react";
1
2
  import { type FieldOption } from "efficient-easel/fields";
2
3
  interface Option {
3
4
  value: string;
@@ -11,6 +12,8 @@ interface Props {
11
12
  value: string[];
12
13
  onChange: (value: string[]) => void;
13
14
  emptyLabel?: string;
15
+ icon?: ReactNode;
16
+ hint?: ReactNode;
14
17
  }
15
- export default function MultiSelectField({ label, options, value, onChange, emptyLabel, }: Props): import("react").JSX.Element;
18
+ export default function MultiSelectField({ label, options, value, onChange, emptyLabel, icon, hint, }: Props): import("react").JSX.Element;
16
19
  export {};
@@ -1 +1 @@
1
- "use client";import{jsx as o,jsxs as c}from"react/jsx-runtime";import{useId as u}from"react";import{FieldSelect as m}from"efficient-easel/fields";function f(l){return l.map(({value:i,label:e,note:t})=>({value:i,label:e,...t?{meta:t}:{}}))}function p({label:l,options:i,value:e,onChange:t,emptyLabel:a="None"}){const s=u(),r=`${s}-label`,n=`${s}-button`,d=Array.isArray(e)?e:[];return c("div",{className:"sf-field sf-multi",children:[o("div",{className:"sf-field-label",id:r,children:l}),o(m,{id:n,multiple:!0,value:d,options:f(i),onChange:t,placeholder:a,ariaLabelledBy:`${r} ${n}`,inline:!0})]})}export{p as default,f as multiSelectOptions};
1
+ "use client";import{jsx as a}from"react/jsx-runtime";import{useId as m}from"react";import{FieldSelect as p}from"efficient-easel/fields";import{SettingsField as b}from"efficient-easel/panel";function f(i){return i.map(({value:l,label:e,note:t})=>({value:l,label:e,...t?{meta:t}:{}}))}function h({label:i,options:l,value:e,onChange:t,emptyLabel:c="None",icon:d,hint:u}){const o=m(),n=`${o}-label`,r=`${o}-button`,s=Array.isArray(e)?e:[];return a(b,{label:i,labelId:n,icon:d,hint:u,children:a(p,{id:r,multiple:!0,value:s,options:f(l),onChange:t,placeholder:c,ariaLabelledBy:`${n} ${r}`,inline:!0})})}export{h as default,f as multiSelectOptions};
@@ -1,96 +1,2 @@
1
- import { type EaselContextMenuItem } from "efficient-easel/menu";
2
- import { type NodeOps } from "efficient-easel/node-ops";
3
- import { type StyleSnapshot } from "efficient-easel/style-clipboard";
4
- import { type CanvasTarget } from "efficient-easel/canvas";
5
- export type NodeMenuTarget = {
6
- kind: "node";
7
- x: number;
8
- y: number;
9
- zone: string;
10
- index: number;
11
- } | {
12
- kind: "empty";
13
- x: number;
14
- y: number;
15
- } | {
16
- kind: "input";
17
- x: number;
18
- y: number;
19
- el: TextEl;
20
- };
21
- type TextEl = {
22
- value: string;
23
- selectionStart: number | null;
24
- selectionEnd: number | null;
25
- setRangeText: (t: string, s: number, e: number, m?: string) => void;
26
- select: () => void;
27
- focus: () => void;
28
- dispatchEvent: (e: Event) => boolean;
29
- };
30
- type NodeLike = {
31
- type: string;
32
- props: {
33
- [key: string]: unknown;
34
- id: string;
35
- };
36
- };
37
- export type NodeMenuHost = {
38
- nodesIn: (zone: string) => NodeLike[];
39
- nodeAt: (zone: string, index: number) => NodeLike | null;
40
- labelOf: (type: string, zone: string) => string;
41
- rowNameOf: (node: NodeLike, zone: string) => string;
42
- renamePropOf: (node: NodeLike, zone: string) => string | null;
43
- beginRename: (zone: string, index: number) => void;
44
- history: {
45
- hasPast: boolean;
46
- hasFuture: boolean;
47
- back: () => void;
48
- forward: () => void;
49
- };
50
- openAddSection: () => void;
51
- openPageSettings: () => void;
52
- collapseAll: () => void;
53
- onPasteRefused: () => void;
54
- document: unknown;
55
- nodeOps: Pick<NodeOps, "held" | "remove" | "duplicate" | "step" | "canStep" | "setProps" | "copy" | "cut" | "paste">;
56
- isPinned: (node: NodeLike, zone: string) => boolean;
57
- sectionBand: () => {
58
- floor: number;
59
- cap: number;
60
- };
61
- selectAt: (zone: string, index: number, id: string, parentType: string | null) => void;
62
- openAddInside: (zone: string, index: number) => void;
63
- locate: (id: string) => {
64
- zone: string;
65
- index: number;
66
- } | null;
67
- style?: {
68
- held: () => StyleSnapshot | null;
69
- canCopy: (node: NodeLike, zone: string) => boolean;
70
- copy: (node: NodeLike, zone: string) => void;
71
- paste: (zone: string, index: number, node: NodeLike) => void;
72
- };
73
- };
74
- export type ChainRung = {
75
- zone: string;
76
- index: number;
77
- node: NodeLike;
78
- parentType: string | null;
79
- };
80
- export declare function ancestorChain(host: NodeMenuHost, target: {
81
- zone: string;
82
- index: number;
83
- }): ChainRung[];
84
- export declare const EDITOR_NODE_CLIPBOARD: import("efficient-easel/node-ops").NodeClipboard;
85
- export declare function nodeMenuItems(host: NodeMenuHost, target: {
86
- zone: string;
87
- index: number;
88
- }): EaselContextMenuItem[];
89
- export declare function pageMenuItems(host: NodeMenuHost): EaselContextMenuItem[];
90
- export declare function textMenuItems(host: NodeMenuHost, el: TextEl): EaselContextMenuItem[];
91
- export declare function useNodeContextMenu(host: NodeMenuHost, canvas: CanvasTarget | null): {
92
- onEditorContextMenu: (e: React.MouseEvent) => void;
93
- menu: import("react").JSX.Element | null;
94
- closeMenu: () => void;
95
- };
96
- export {};
1
+ export { ancestorChain, EASEL_NODE_CLIPBOARD as EDITOR_NODE_CLIPBOARD, nodeMenuItems, pageMenuItems, textMenuItems, useNodeContextMenu } from "efficient-easel/screen/components/NodeContextMenu";
2
+ export type { ChainRung, NodeMenuHost, NodeMenuTarget } from "efficient-easel/screen/components/NodeContextMenu";
@@ -1 +1 @@
1
- "use client";import{jsx as p}from"react/jsx-runtime";import{useCallback as C,useState as w}from"react";import{EaselContextMenu as A}from"efficient-easel/menu";import{AddIcon as P,CopyIcon as I,LayersIcon as E,PasteIcon as O,RedoIcon as D,SettingsIcon as R,UndoIcon as S}from"efficient-easel/icons";import{ROOT_ID as z,ROOT_SLOT as _,zoneKey as T}from"efficient-easel/data";import{createNodeClipboard as B,nodeMenuItems as L}from"efficient-easel/node-ops";import{styleMenuItems as N}from"efficient-easel/style-clipboard";import{framePointToHost as X,useCanvasEvent as b}from"efficient-easel/canvas";import{duplicateBlocked as V}from"../lib/hero-group-placement.js";import{isLockedBlock as Y}from"../lib/puck/locked-blocks.js";import{ROOT_ZONE as y}from"../lib/puck/content-tree.js";import{canAddTo as U}from"../lib/puck/add-target.js";function Z(e,n){const o=[],l=new Set;let t={zone:n.zone,index:n.index};for(;t;){const i=e.nodeAt(t.zone,t.index);if(!i||l.has(i.props.id)||(l.add(i.props.id),o.push({zone:t.zone,index:t.index,node:i,parentType:null}),t.zone===y))break;const d=t.zone.lastIndexOf(":");if(d<=0)break;t=e.locate(t.zone.slice(0,d))}for(let i=0;i<o.length-1;i+=1)o[i].parentType=o[i+1].node.type;return o}const le=B();function M(e,n,o){if(n===y){const{floor:t,cap:i}=e.sectionBand();return{parentId:z,slot:_,index:Math.min(Math.max(o,t),i)}}const l=n.lastIndexOf(":");return{parentId:n.slice(0,l),slot:n.slice(l+1),index:o}}function j(e,n){const{zone:o,index:l}=n,t=e.nodeAt(o,l);if(!t)return[];const i=t.props.id,d=e.labelOf(t.type,o),a=!!t.props._hidden,c=e.nodeOps,r=e.isPinned(t,o),s=Y(t.type),u=!r&&!s&&!V(e.document,t),f=Z(e,n),x=c.held,k=x&&!r&&T(x.from)===o?M(e,o,l+1):null,h=e.style?N({held:e.style.held(),canCopy:e.style.canCopy(t,o),onCopy:()=>e.style?.copy(t,o),onPaste:()=>e.style?.paste(o,l,t)}):[];return L({title:d,layer:{group:"pick",items:f.map((m,v)=>({label:e.rowNameOf(m.node,m.zone),checked:v===0,onClick:()=>e.selectAt(m.zone,m.index,m.node.props.id,m.parentType)}))},actions:{addInside:U(t.type)?()=>e.openAddInside(o,l):void 0,duplicate:u?()=>c.duplicate(i):void 0,moveUp:c.canStep(i,-1)?()=>c.step(i,-1):void 0,moveDown:c.canStep(i,1)?()=>c.step(i,1):void 0,copy:r?void 0:()=>c.copy(i,d),cut:u?()=>c.cut(i,d):void 0,paste:x&&k?{label:x.label,run:()=>c.paste(k)}:void 0,rename:e.renamePropOf(t,o)?()=>e.beginRename(o,l):void 0,hide:!s&&!r?{hidden:a,run:()=>c.setProps(i,{_hidden:!a})}:void 0,delete:u?()=>c.remove(i):void 0},style:h,pinnedLine:r?"Pinned \u2014 can\u2019t be moved or deleted":void 0})}function H(e){const n=[];e.history.hasPast&&n.push({label:"Undo",icon:p(S,{}),shortcut:"\u2318Z",onClick:e.history.back}),e.history.hasFuture&&n.push({label:"Redo",icon:p(D,{}),shortcut:"\u21E7\u2318Z",onClick:e.history.forward});const o=[{label:"Add section",icon:p(P,{}),onClick:e.openAddSection}],l=e.nodeOps.held;if(l&&T(l.from)===y){const a=M(e,y,e.sectionBand().cap);o.push({label:`Paste ${l.label}`,icon:p(O,{}),shortcut:"\u2318V",onClick:()=>e.nodeOps.paste(a)})}const t=[{label:"Page settings",icon:p(R,{}),onClick:e.openPageSettings},{label:"Collapse all layers",icon:p(E,{}),onClick:e.collapseAll}],i=[n,o,t].filter(a=>a.length>0),d={label:"\u2014",onClick:()=>{}};return i.flatMap((a,c)=>c?[d,...a]:a)}function K(e,n){const o=n.selectionStart??0,l=n.selectionEnd??0,t=n.value.slice(o,l),i=s=>{n.focus(),n.setRangeText(s,o,l,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},d=[];t&&(d.push({label:"Copy",icon:p(I,{}),shortcut:"\u2318C",onClick:()=>navigator.clipboard?.writeText(t)}),d.push({label:"Cut",icon:p(I,{}),shortcut:"\u2318X",onClick:()=>{navigator.clipboard?.writeText(t),i("")}})),d.push({label:"Paste",icon:p(O,{}),shortcut:"\u2318V",onClick:()=>{navigator.clipboard?.readText().then(s=>{s&&i(s)}).catch(()=>e.onPasteRefused())}});const a=n.value?[{label:"Select all",shortcut:"\u2318A",onClick:()=>{n.focus(),n.select()}}]:[],c=[d,a].filter(s=>s.length>0),r={label:"\u2014",onClick:()=>{}};return c.flatMap((s,u)=>u?[r,...s]:s)}function F(e){const n=e?.closest?.("input, textarea");return!n||n instanceof HTMLInputElement&&!["text","search","url","email","tel","number",""].includes(n.type)?null:n}function g(e){return e.shiftKey}function se(e,n){const[o,l]=w(null),t=C(()=>l(null),[]),i=C(c=>{if(g(c))return;const r=c.target,s=F(r);if(s){c.preventDefault(),l({kind:"input",x:c.clientX,y:c.clientY,el:s});return}const u=r?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),f=u?e.locate(u):null;c.preventDefault(),l(f?{kind:"node",x:c.clientX,y:c.clientY,...f}:{kind:"empty",x:c.clientX,y:c.clientY})},[e]);b(n,"contextmenu",c=>{if(g(c)||!n)return;const s=(c.target?.closest?.("[data-puck-component]")??null)?.getAttribute("data-puck-component"),u=s?e.locate(s):null;c.preventDefault();const f=X(n.frame,c.clientX,c.clientY);l(u?{kind:"node",...f,...u}:{kind:"empty",...f})}),b(n,"mousedown",t),b(n,"scroll",t,{on:"window"});const a=o?p(A,{x:o.x,y:o.y,items:o.kind==="node"?j(e,o):o.kind==="input"?K(e,o.el):H(e),onClose:t}):null;return{onEditorContextMenu:i,menu:a,closeMenu:t}}export{le as EDITOR_NODE_CLIPBOARD,Z as ancestorChain,j as nodeMenuItems,H as pageMenuItems,K as textMenuItems,se as useNodeContextMenu};
1
+ "use client";import{ancestorChain as n,EASEL_NODE_CLIPBOARD as s,nodeMenuItems as o,pageMenuItems as u,textMenuItems as I,useNodeContextMenu as D}from"efficient-easel/screen/components/NodeContextMenu";export{s as EDITOR_NODE_CLIPBOARD,n as ancestorChain,o as nodeMenuItems,u as pageMenuItems,I as textMenuItems,D as useNodeContextMenu};
@@ -1 +1 @@
1
- export default function PageEditGuardNotices(): import("react").JSX.Element | null;
1
+ export { default } from "efficient-easel/screen/components/PageEditGuardNotices";
@@ -1 +1 @@
1
- "use client";import{jsx as a}from"react/jsx-runtime";import{EditNotice as c}from"efficient-easel/chrome";import{useStorefrontDocument as s}from"./StorefrontDocumentContext.js";function d(){const{capabilities:e,access:o,takeOverEditing:t,viewReadOnly:r,saveConflict:i,reloadFromServer:n}=s();return e.hasEditGuard?a(c,{access:o,conflict:i,noun:"page",onTakeOver:t,onViewReadOnly:r,onReload:n}):null}export{d as default};
1
+ "use client";import{default as f}from"efficient-easel/screen/components/PageEditGuardNotices";export{f as default};
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useCallback as ee,useEffect as q,useMemo as F,useState as c}from"react";import{useStorefrontDocument as te}from"./StorefrontDocumentContext.js";import g from"./UiIcon.js";import se from"./SidePanelHead.js";import{useWebsiteName as ae}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as ne}from"efficient-easel/chrome";import{AddIcon as le}from"efficient-easel/icons";import{PagesIcon as re}from"efficient-easel/rail";import{useEditorHost as oe}from"../lib/editor-host.js";import{bucketEditorPageRows as ie,isDynamicPageRow as ce}from"../lib/editor-page-rows.js";import{useEditorSession as de}from"../lib/editor-session-context.js";const G="sf-editor-pages-collapsed-groups",pe=r=>r.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),M=(r,b)=>{const o=pe(r)||"page";if(!b.has(o))return o;let p=2;for(;b.has(`${o}-${p}`);)p+=1;return`${o}-${p}`};function ue({onNavigate:r,onClose:b,activeSurface:o,onPreviewSurface:p}){const y=de().chrome?.pageRows,D=oe(),{adapter:d,capabilities:w,ready:N,currentSlug:L}=te(),J=ae(),[l,x]=c(null),[C,K]=c(""),[u,k]=c(!1),[v,m]=c(null),[R,h]=c(!1),[f,P]=c(""),S=ee(async()=>{if(N)try{x(await d.listPages())}catch{x([])}},[d,N]);q(()=>{x(null),S()},[S]);const[z,U]=c(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(G);return new Set(e?JSON.parse(e):[])}catch{return new Set}});q(()=>{try{window.localStorage.setItem(G,JSON.stringify([...z]))}catch{}},[z]);const Q=e=>U(s=>{const a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a}),V=F(()=>ie(l??[]),[l]),$=C.trim().toLowerCase(),O=e=>!$||e.toLowerCase().includes($),Y=e=>$?!0:!z.has(e),j=F(()=>new Set((l??[]).map(e=>e.slug)),[l]),W=()=>{if(w.pageCreationInAdminForm){D.send("storefront-editor:new-page");return}P(""),m(null),h(!0)},B=async()=>{const e=f.trim();if(!(!e||!N||u||!d.createPage)){k(!0),m(null);try{const s=await d.createPage({slug:M(e,j),title:e,layout:{}});await S(),h(!1),P(""),r(s.slug)}catch{m("Couldn\u2019t add the page \u2014 please retry.")}finally{k(!1)}}},T=async e=>{if(!(!N||u||!d.deletePage||(l??[]).length<=1)){k(!0);try{await d.deletePage(e.id);const s=(l??[]).filter(a=>a.id!==e.id);x(s),m(null),e.slug===L&&s[0]&&r(s[0].slug)}catch{m("Couldn\u2019t delete the page \u2014 please retry.")}finally{k(!1)}}},X=e=>D.send("storefront-editor:open-page",{slug:e}),Z=e=>{if(!O(e.label))return null;const s=!o&&e.slug===L,a=w.canDeletePagesInline&&(l??[]).length>1;return n("div",{className:`sf-row sf-prow ${s?"is-selected":""}`,onClick:()=>r(e.slug),children:[t("span",{className:"sf-chip",children:t(me,{})}),t("span",{className:"sf-row-name",children:e.label}),ce(e)&&t("span",{className:"sf-badge-dynamic",children:"Dynamic"}),e.kind==="lightbox"&&t("span",{className:"sf-badge-lightbox",children:"Lightbox"}),e.draft&&t("span",{className:"sf-page-draft",children:"draft"}),w.pageCreationInAdminForm&&t("button",{type:"button",className:"sf-page-edit",title:`Edit \u201C${e.label}\u201D in the admin`,"aria-label":`Edit ${e.label} in the admin`,onClick:i=>{i.stopPropagation(),X(e.slug)},children:t(g,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),a&&t("button",{type:"button",className:"sf-page-edit sf-page-edit--danger",disabled:u,title:`Delete \u201C${e.label}\u201D`,"aria-label":`Delete ${e.label}`,onClick:i=>{i.stopPropagation(),T(e)},children:t(g,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]},e.id)},A=(e,s,a)=>{const i=a.filter(Boolean);if(i.length===0)return null;const E=Y(e);return n("div",{className:"sf-pgroup",children:[n("button",{type:"button",className:"sf-pgroup-head","aria-expanded":E,onClick:()=>Q(e),children:[t(g,{name:"chevron-right",size:10,strokeWidth:2.6,rounded:!0,style:{transform:E?"rotate(90deg)":"none",transition:"transform 0.14s"}}),t("span",{className:"sf-pgroup-label",children:s}),t("span",{className:"sf-pgroup-count",children:i.length})]}),E&&t("div",{className:"sf-pgroup-body",children:i})]},e)},H=(y?.rows??[]).filter(e=>O(e.label)).map(e=>{const s=o===e.key;return n("div",{className:`sf-row sf-prow sf-prow--shop ${s?"is-selected":""}`,onClick:()=>p(e.key),title:`Preview the ${e.label} in the canvas`,children:[t("span",{className:"sf-chip",children:e.icon}),t("span",{className:"sf-row-name",children:e.label}),t("span",{className:"sf-badge-preview",children:"Preview"}),t("a",{className:"sf-page-edit",href:e.href,target:"_blank",rel:"noopener noreferrer",title:`Open the ${e.label} in a new tab`,"aria-label":`Open the ${e.label} in a new tab`,onClick:a=>a.stopPropagation(),children:t(g,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})})]},e.key)}),_=w.hasSiteSettings&&!!y,I=(()=>{if(l===null)return null;const e=[];let s=!1;for(const a of V)_&&!s&&a.key.startsWith("system:")&&(e.push(A("shop",y.title,H)),s=!0),e.push(A(a.key,a.label,a.rows.map(Z)));return _&&!s&&e.push(A("shop",y.title,H)),e})();return n("div",{className:"sf-pages",children:[t(se,{icon:t(re,{}),title:"Pages",context:J,actions:t(ne,{label:"New page",onClick:W,children:t(le,{size:15})}),onHide:b}),n("div",{className:"sf-pages-search",children:[t(g,{name:"search",size:14,rounded:!0}),t("input",{type:"search",className:"sf-pages-search-input",placeholder:"Search all pages\u2026",value:C,onChange:e=>K(e.target.value),"aria-label":"Search all pages"})]}),n("div",{className:"sf-pages-list sf-scroll",children:[v&&!R&&t("div",{className:"sf-note sf-note--error",role:"alert",children:v}),I===null?t("div",{className:"sf-note",children:"Loading\u2026"}):I.some(Boolean)?I:t("div",{className:"sf-note",children:C.trim()?"No pages match your search":"No pages yet"})]}),n("button",{type:"button",className:"sf-pages-new",onClick:W,children:[t("span",{className:"sf-plus",children:"+"}),"New page"]}),R&&t("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/30 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"sf-add-page-title",onClick:()=>h(!1),children:n("div",{className:"w-full max-w-sm rounded-lg bg-white p-5 shadow-xl",onClick:e=>e.stopPropagation(),children:[t("h2",{id:"sf-add-page-title",className:"text-[15px] font-semibold text-zinc-900",children:"Add a page"}),t("p",{className:"mt-1 text-[13px] leading-relaxed text-zinc-600",children:"Give the new template page a name. It starts blank \u2014 add sections once it opens."}),t("input",{autoFocus:!0,value:f,onChange:e=>P(e.target.value),onKeyDown:e=>{e.key==="Enter"&&B(),e.key==="Escape"&&h(!1)},placeholder:"e.g. About",className:"mt-3 w-full rounded-md border border-zinc-300 px-3 py-2 text-[13px] text-zinc-900 outline-none focus:border-blue-500"}),f.trim()&&n("p",{className:"mt-1.5 text-[12px] text-zinc-400",children:["URL: /",M(f,j)]}),v&&t("p",{className:"mt-2 text-[12px] text-red-600",role:"alert",children:v}),n("div",{className:"mt-4 flex justify-end gap-2",children:[t("button",{type:"button",onClick:()=>h(!1),className:"rounded-md border border-zinc-300 px-3 py-[7px] text-[13px] font-medium text-zinc-700 transition-colors hover:bg-zinc-100",children:"Cancel"}),t("button",{type:"button",onClick:()=>{B()},disabled:u||!f.trim(),className:"rounded-md bg-blue-600 px-3 py-[7px] text-[13px] font-medium text-white transition-colors hover:bg-blue-700 disabled:opacity-60",children:u?"Adding\u2026":"Add page"})]})]})})]})}function me(){return n("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),t("path",{d:"M14 3v5h5"})]})}export{ue as default};
1
+ "use client";import{jsx as t,jsxs as a,Fragment as ne}from"react/jsx-runtime";import{useCallback as ae,useEffect as G,useId as re,useMemo as M,useState as c}from"react";import{useStorefrontDocument as oe}from"./StorefrontDocumentContext.js";import f from"./UiIcon.js";import le from"./SidePanelHead.js";import{useWebsiteName as ie}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as ce}from"efficient-easel/chrome";import{Button as J,Dialog as de,FormField as pe,Input as ue,Tooltip as L}from"efficient-shell/ui";import{AddIcon as he}from"efficient-easel/icons";import{PagesIcon as me}from"efficient-easel/rail";import{useEditorHost as fe}from"../lib/editor-host.js";import{bucketEditorPageRows as ge,isDynamicPageRow as be}from"../lib/editor-page-rows.js";import{useEditorSession as we}from"../lib/editor-session-context.js";const K="sf-editor-pages-collapsed-groups",ye=o=>o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),U=(o,g)=>{const l=ye(o)||"page";if(!g.has(l))return l;let u=2;for(;g.has(`${l}-${u}`);)u+=1;return`${l}-${u}`};function Ne({onNavigate:o,onClose:g,activeSurface:l,onPreviewSurface:u}){const b=we().chrome?.pageRows,R=fe(),{adapter:d,capabilities:w,ready:y,currentSlug:z}=oe(),Q=ie(),[r,N]=c(null),[P,T]=c(""),[p,k]=c(!1),[v,h]=c(null),[O,C]=c(!1),[m,S]=c(""),F=re(),I=ae(async()=>{if(y)try{N(await d.listPages())}catch{N([])}},[d,y]);G(()=>{N(null),I()},[I]);const[$,V]=c(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(K);return new Set(e?JSON.parse(e):[])}catch{return new Set}});G(()=>{try{window.localStorage.setItem(K,JSON.stringify([...$]))}catch{}},[$]);const Y=e=>V(s=>{const n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n}),X=M(()=>ge(r??[]),[r]),x=P.trim().toLowerCase(),W=e=>!x||e.toLowerCase().includes(x),Z=e=>x?!0:!$.has(e),B=M(()=>new Set((r??[]).map(e=>e.slug)),[r]),j=()=>{if(w.pageCreationInAdminForm){R.send("storefront-editor:new-page");return}S(""),h(null),C(!0)},H=async()=>{const e=m.trim();if(!(!e||!y||p||!d.createPage)){k(!0),h(null);try{const s=await d.createPage({slug:U(e,B),title:e,layout:{}});await I(),C(!1),S(""),o(s.slug)}catch{h("Couldn’t add the page — please retry.")}finally{k(!1)}}},ee=async e=>{if(!(!y||p||!d.deletePage||(r??[]).length<=1)){k(!0);try{await d.deletePage(e.id);const s=(r??[]).filter(n=>n.id!==e.id);N(s),h(null),e.slug===z&&s[0]&&o(s[0].slug)}catch{h("Couldn’t delete the page — please retry.")}finally{k(!1)}}},te=e=>R.send("storefront-editor:open-page",{slug:e}),se=e=>{if(!W(e.label))return null;const s=!l&&e.slug===z,n=w.canDeletePagesInline&&(r??[]).length>1;return a("div",{className:`sf-row sf-prow ${s?"is-selected":""}`,onClick:()=>o(e.slug),children:[t("span",{className:"sf-chip",children:t(ke,{})}),t("span",{className:"sf-row-name",children:e.label}),be(e)&&t("span",{className:"sf-badge-dynamic",children:"Dynamic"}),e.kind==="lightbox"&&t("span",{className:"sf-badge-lightbox",children:"Lightbox"}),e.draft&&t("span",{className:"sf-page-draft",children:"draft"}),w.pageCreationInAdminForm&&t(L,{content:`Edit “${e.label}” in the admin`,children:t("button",{type:"button",className:"sf-page-edit","aria-label":`Edit ${e.label} in the admin`,onClick:i=>{i.stopPropagation(),te(e.slug)},children:t(f,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})})}),n&&t(L,{content:`Delete “${e.label}”`,children:t("button",{type:"button",className:"sf-page-edit sf-page-edit--danger",disabled:p,"aria-label":`Delete ${e.label}`,onClick:i=>{i.stopPropagation(),ee(e)},children:t(f,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})})]},e.id)},A=(e,s,n)=>{const i=n.filter(Boolean);if(i.length===0)return null;const E=Z(e);return a("div",{className:"sf-pgroup",children:[a("button",{type:"button",className:"sf-pgroup-head","aria-expanded":E,onClick:()=>Y(e),children:[t(f,{name:"chevron-right",size:10,strokeWidth:2.6,rounded:!0,style:{transform:E?"rotate(90deg)":"none",transition:"transform 0.14s"}}),t("span",{className:"sf-pgroup-label",children:s}),t("span",{className:"sf-pgroup-count",children:i.length})]}),E&&t("div",{className:"sf-pgroup-body",children:i})]},e)},_=(b?.rows??[]).filter(e=>W(e.label)).map(e=>{const s=l===e.key;return a("div",{className:`sf-row sf-prow sf-prow--shop ${s?"is-selected":""}`,onClick:()=>u(e.key),children:[t("span",{className:"sf-chip",children:e.icon}),t("span",{className:"sf-row-name",children:e.label}),t("span",{className:"sf-badge-preview",children:"Preview"}),t(L,{content:`Open the ${e.label} in a new tab`,children:t("a",{className:"sf-page-edit",href:e.href,target:"_blank",rel:"noopener noreferrer","aria-label":`Open the ${e.label} in a new tab`,onClick:n=>n.stopPropagation(),children:t(f,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})})})]},e.key)}),q=w.hasSiteSettings&&!!b,D=(()=>{if(r===null)return null;const e=[];let s=!1;for(const n of X)q&&!s&&n.key.startsWith("system:")&&(e.push(A("shop",b.title,_)),s=!0),e.push(A(n.key,n.label,n.rows.map(se)));return q&&!s&&e.push(A("shop",b.title,_)),e})();return a("div",{className:"sf-pages",children:[t(le,{icon:t(me,{}),title:"Pages",context:Q,actions:t(ce,{label:"New page",onClick:j,children:t(he,{size:15})}),onHide:g}),a("div",{className:"sf-pages-search",children:[t(f,{name:"search",size:14,rounded:!0}),t("input",{type:"search",className:"sf-pages-search-input",placeholder:"Search all pages…",value:P,onChange:e=>T(e.target.value),"aria-label":"Search all pages"})]}),a("div",{className:"sf-pages-list sf-scroll",children:[v&&!O&&t("div",{className:"sf-note sf-note--error",role:"alert",children:v}),D===null?t("div",{className:"sf-note",children:"Loading…"}):D.some(Boolean)?D:t("div",{className:"sf-note",children:P.trim()?"No pages match your search":"No pages yet"})]}),a("button",{type:"button",className:"sf-pages-new",onClick:j,children:[t("span",{className:"sf-plus",children:"+"}),"New page"]}),t(de,{open:O,onClose:()=>C(!1),size:"sm",title:"Add a page",description:"Give the new template page a name. It starts blank — add sections once it opens.",footer:a(ne,{children:[t(J,{variant:"secondary",onClick:()=>C(!1),children:"Cancel"}),t(J,{onClick:()=>{H()},disabled:p||!m.trim(),loading:p,children:p?"Adding…":"Add page"})]}),children:t(pe,{label:"Page name",htmlFor:F,hint:m.trim()?`URL: /${U(m,B)}`:void 0,error:v??void 0,children:t(ue,{id:F,value:m,invalid:!!v,onChange:e=>S(e.target.value),onKeyDown:e=>{e.key==="Enter"&&H()},placeholder:"e.g. About"})})})]})}function ke(){return a("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),t("path",{d:"M14 3v5h5"})]})}export{Ne as default};
@@ -1,3 +1 @@
1
- export default function PanelToggleIcon({ side }: {
2
- side: "left" | "right";
3
- }): import("react").JSX.Element;
1
+ export { default } from "efficient-easel/screen/components/PanelToggleIcon";
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";function o({side:t}){return r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,children:[e("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),e("path",{d:t==="left"?"M9 4v16":"M15 4v16"})]})}export{o as default};
1
+ "use client";import{default as f}from"efficient-easel/screen/components/PanelToggleIcon";export{f as default};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as t}from"react/jsx-runtime";function l({label:a,onClear:s,what:e="override"}){return r("button",{type:"button",className:"sf-part-mark",title:`Clear ${e}`,"aria-label":`Clear ${e}: ${a}`,onClick:s,children:r(o,{})})}function o(){return t("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[r("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),t("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[r("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),r("path",{d:"M13 2.5V5h-2.6"})]})]})}export{l as PartResetDot};
1
+ import{jsx as r,jsxs as t}from"react/jsx-runtime";import{Tooltip as s}from"efficient-shell/ui";function c({label:o,onClear:a,what:e="override"}){return r(s,{content:`Clear ${e}`,children:r("button",{type:"button",className:"sf-part-mark","aria-label":`Clear ${e}: ${o}`,onClick:a,children:r(i,{})})})}function i(){return t("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[r("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),t("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[r("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),r("path",{d:"M13 2.5V5h-2.6"})]})]})}export{c as PartResetDot};
@@ -36,6 +36,11 @@ export declare function partStyleName(props: Record<string, unknown>, propKey: s
36
36
  faceRole: FontRole;
37
37
  base: PartStyleBase;
38
38
  } | null, fonts: FontsValue): string | null;
39
+ export declare function PartStyleSelect({ face, base, onPick, }: {
40
+ face: PartFace;
41
+ base: PartStyleBase | null;
42
+ onPick: (role: FontRole | null) => void;
43
+ }): import("react").JSX.Element;
39
44
  export declare function PartStyleCard({ parts, onEditStyle, onClearAll, onFollowStyle, kindLabel, }: {
40
45
  parts: readonly PanelPart[];
41
46
  onEditStyle?: () => void;