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
@@ -0,0 +1,2 @@
1
+ import type { ScreenBridges, ScreenCanvas, ScreenTree } from "../lib/editor-screen.js";
2
+ export declare function useFooterFocus(tree: ScreenTree, canvas: ScreenCanvas): Pick<ScreenBridges, "pinnedSource" | "holdCanvasOn" | "editPinnedSource">;
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as o,useRef as T}from"react";import{usePreviewFooter as v}from"./PreviewFooterContext.js";import{useStorefrontDocument as O}from"./StorefrontDocumentContext.js";import{SITE_FOOTER_SLUG as p}from"../lib/content/footer.js";import{FOOTER_TYPE as P}from"../lib/puck/footer-blocks.js";import{clearFooterReturn as R,readFooterReturn as E}from"../lib/puck/footer-return.js";import{pinPreviewToBottom as I,pinPreviewToSection as n}from"../lib/puck/preview-dom.js";function C(i,f){const{currentSlug:d,siteId:m,navigate:l,footerOriginSlug:c}=O(),{selected:u}=i,S=i.data?.content??[],F=f.refreshes,r=d===p,{editFooter:s}=v(),e=T(null);o(()=>{const t=u?.props.id;r&&typeof t=="string"&&(e.current?.(),e.current=n(t))},[u?.props.id,r]);const a=t=>{e.current?.(),e.current=n(t)};return o(()=>{if(!r||!c)return;const t=S.find(g=>g.type===P)?.props?.id;if(t)return e.current?.(),e.current=n(String(t)),()=>{e.current?.(),e.current=null}},[r,c,F]),o(()=>{if(!(r||!E()))return I(()=>R())},[]),{pinnedSource:r,holdCanvasOn:r?a:void 0,editPinnedSource:()=>s?s():l({kind:"page",slug:p,siteId:m??void 0})}}export{C as useFooterFocus};
@@ -0,0 +1,6 @@
1
+ import type { ScreenInspector, ScreenNode, ScreenTree, ScreenTreeFolds } from "../lib/editor-screen.js";
2
+ export declare const LOCATIONS_TYPE = "ContactLocations";
3
+ export declare function useLocationsTree(inspector: ScreenInspector, tree: ScreenTree): {
4
+ renderLocationTree: (section: ScreenNode, si: number, { rowClick, isCollapsed, toggleCollapse }: ScreenTreeFolds) => import("react").JSX.Element;
5
+ sectionPressed: (node: ScreenNode | undefined) => void;
6
+ };
@@ -0,0 +1 @@
1
+ "use client";import{jsx as t,jsxs as d,Fragment as ge}from"react/jsx-runtime";import{Fragment as q,useEffect as J,useRef as F}from"react";import{useTreeDrag as Q}from"efficient-easel/drag";import{ImageIcon as ye,TextLinesIcon as ke,TrashIcon as V}from"efficient-easel/icons";import{Subtree as X,TreeRow as L,TreeRowAction as Z,TreeSeam as b}from"efficient-easel/tree";import{decodeLocationPartId as ve,encodeLocationPartId as xe,usePreviewLocationPart as fe}from"./PreviewLocationPartContext.js";import{PUCK_MODE as he}from"./SectionEditor.js";import{useLocationsFocus as me,setLocationsFocus as p}from"../lib/puck/locations-focus.js";import{bucketsOf as ee,moveGroup as oe,moveCity as ne,addCity as Le,addGroup as Ie,deleteGroup as Pe,deleteCity as Ce,absCityIndex as te,groupLabelOf as Se,cardKey as re}from"../lib/puck/locations-tree.js";const ce="ContactLocations";function $e({size:c=13}){return d("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("circle",{cx:"12",cy:"12",r:"9"}),t("path",{d:"M3 12h18M12 3c2.6 2.6 2.6 15.4 0 18M12 3c-2.6 2.6-2.6 15.4 0 18"})]})}function we({size:c=13}){return d("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("path",{d:"M12 21s6-5 6-10a6 6 0 10-12 0c0 5 6 10 6 10z"}),t("circle",{cx:"12",cy:"11",r:"2"})]})}function Te({size:c=13}){return d("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("path",{d:"M9 4 3 6.5v13L9 17l6 3 6-2.5v-13L15 7z"}),t("path",{d:"M9 4v13M15 7v13"})]})}const $=c=>({parentId:`locations-${c}`,slot:"groups"}),O=(c,y)=>({parentId:`locations-${c}`,slot:`cities:${y}`});function _e(c,y){const{readOnly:I,selected:P}=y,v=y.data?.content??[],le=c.kind===he.kind,w=F(null);J(()=>{const o=P?.type===ce?String(P.props.id):null;o&&o!==w.current&&p({level:"groups"}),w.current=o},[P?.props.id]);const{selectedLocationPartId:se,setSelectedLocationPartId:G,setSelectHandler:j}=fe(),l=me(),g=(o,e)=>{const r=v[o];r&&y.replace(o,{type:r.type,props:{...r.props,locations:e}})},f=o=>{const e=v[o]?.props?.locations;return Array.isArray(e)?e:[]},A=Q({keyOf:o=>`group:${o.si}:${o.index}`,readOnly:!!I,canDrop:(o,e)=>e.parentId===$(o.si).parentId&&e.slot==="groups",onDrop:(o,e)=>{g(o.si,oe(f(o.si),o.index,e.index)),l.level==="city"&&p({level:"groups"})},onStep:(o,e)=>{g(o.si,oe(f(o.si),o.index,e<0?o.index-1:o.index+2)),l.level==="city"&&p({level:"groups"})}}),T=Q({keyOf:o=>`city:${o.si}:${o.group}:${o.index}`,readOnly:!!I,canDrop:(o,e)=>e.parentId===$(o.si).parentId&&e.slot.startsWith("cities:"),onDrop:(o,e)=>{const r=e.slot.slice(7);g(o.si,ne(f(o.si),o.group,o.index,r,e.index)),p({level:"group",key:r})},onStep:(o,e)=>{g(o.si,ne(f(o.si),o.group,o.index,o.group,e<0?o.index-1:o.index+2)),l.level==="city"&&p({level:"group",key:o.group})}}),N=F(v);N.current=v;const R=F(()=>{});J(()=>{j(o=>{const e=ve(o);if(!e)return;const r=N.current.findIndex(C=>C.props?.id===e.nodeId);r<0||R.current(r,{level:e.part,index:e.index})})},[j]);const s=(o,e)=>{w.current=v[o]?.props?.id??null,y.select(o),p(e),c.reveal();const r=v[o]?.props?.id;typeof r=="string"&&(e.level==="image"||e.level==="map")?G(xe(r,e.index,e.level)):G(null),typeof r=="string"&&y.scrollTo(r)};return R.current=s,{renderLocationTree:(o,e,{rowClick:r,isCollapsed:C,toggleCollapse:z})=>{const x=f(e),ie=ee(x),h=String(o.props.id),m=le&&P?.props.id===h,_=n=>t(b,{...I?{}:A.seam({place:{...$(e),index:n}})},`seam:${h}:groups:${n}`),B=(n,u)=>t(b,{...I?{}:T.seam({place:{...O(e,n),index:u}})},`seam:${h}:cities:${n}:${u}`);return d(ge,{children:[t(L,{icon:t(ke,{size:13}),name:"Texts",onSelect:()=>s(e,{level:"texts"}),selected:m&&l.level==="texts",rowProps:{onClick:r(()=>s(e,{level:"texts"}))}}),ie.map((n,u)=>{const D=`${h}::grp::${n.key}`,E=C(D),ae=m&&l.level==="group"&&l.key===n.key,W=Se(n.key,n.name),K={...O(e,n.key),index:n.cards.length},H=T.row({item:{si:e,group:n.key,index:-1},place:K,into:K,canDrag:!1},{onClick:r(()=>s(e,{level:"group",key:n.key}))}),S=A.row({item:{si:e,index:u},place:{...$(e),index:u}},H.rowProps);return d(q,{children:[u===0&&_(0),t(L,{icon:t($e,{size:13}),name:W,onSelect:()=>s(e,{level:"group",key:n.key}),selected:ae,draggable:S.draggable,dragging:S.dragging,drop:S.drop??H.drop,fold:{open:!E,label:"group",onToggle:()=>z(D)},actions:t(Z,{kind:"delete",label:`Delete ${W} group (${n.cards.length} ${n.cards.length===1?"city":"cities"})`,onClick:()=>{g(e,Pe(x,n.key)),p({level:"groups"})},children:t(V,{size:15})}),rowProps:S.rowProps,children:t("span",{className:"es-group-count",children:n.cards.length})}),!E&&d(X,{children:[n.cards.map((k,a)=>{const i=te(x,n.key,a),de=m&&l.level==="city"&&l.index===i,M=String(k?.name??"")||"City",U=`${h}::city::${re(k)}`,Y=C(U),{rowProps:pe,...ue}=T.row({item:{si:e,group:n.key,index:a},place:{...O(e,n.key),index:a}},{onClick:r(()=>s(e,{level:"city",index:i}))});return d(q,{children:[a===0&&B(n.key,0),t(L,{icon:t(we,{size:13}),name:M,onSelect:()=>s(e,{level:"city",index:i}),selected:de,...ue,fold:{open:!Y,label:M,onToggle:()=>z(U)},actions:t(Z,{kind:"delete",label:`Delete ${M}`,onClick:()=>{g(e,Ce(x,n.key,a)),p({level:"group",key:n.key})},children:t(V,{size:15})}),rowProps:pe}),!Y&&d(X,{children:[t(L,{icon:t(ye,{size:13}),name:"Image",onSelect:()=>s(e,{level:"image",index:i}),selected:m&&l.level==="image"&&l.index===i,rowProps:{onClick:r(()=>s(e,{level:"image",index:i}))}}),t(L,{icon:t(Te,{size:13}),name:"Map",onSelect:()=>s(e,{level:"map",index:i}),selected:m&&l.level==="map"&&l.index===i,rowProps:{onClick:r(()=>s(e,{level:"map",index:i}))}})]}),B(n.key,a+1)]},re(k))}),d("button",{type:"button",className:"sf-add-card",onClick:()=>{const k=Le(x,n.key);g(e,k);const a=ee(k).find(i=>i.key===n.key);p(a&&a.cards.length?{level:"city",index:te(k,n.key,a.cards.length-1)}:{level:"group",key:n.key})},children:[t("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add city"]})]}),_(u+1)]},D)}),d("button",{type:"button",className:"sf-add-card",onClick:()=>{const{cards:n,key:u}=Ie(x);g(e,n),s(e,{level:"group",key:u})},children:[t("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add group"]})]})},sectionPressed:o=>{o?.type===ce&&p({level:"groups"})}}}export{ce as LOCATIONS_TYPE,_e as useLocationsTree};
@@ -1,9 +1 @@
1
- import { type InspectorMode } from "./SectionEditor.js";
2
- export declare function usePartBridge({ mode, setMode, onOpenPart, }: {
3
- mode: InspectorMode;
4
- setMode: (update: (current: InspectorMode) => InspectorMode) => void;
5
- onOpenPart?: (nodeId: string) => void;
6
- }): {
7
- selectNode: (nodeId: string) => void;
8
- openPartId: string | null;
9
- };
1
+ export { usePartBridge } from "efficient-easel/screen/components/usePartBridge";
@@ -1 +1 @@
1
- "use client";import{useCallback as u,useEffect as I}from"react";import{useEasel as k}from"efficient-easel/easel";import{PUCK_MODE as P}from"./SectionEditor.js";import{usePreviewParts as K}from"./PreviewPartsContext.js";import{decodePartId as S,encodePartId as y}from"../lib/puck/text-parts.js";import{useSectionOps as E}from"../lib/puck/use-section-ops.js";function B({mode:n,setMode:t,onOpenPart:i}){const{getSelectorForId:d}=k(o=>o),a=E(),{setSelectedPartId:l,setSelectHandler:f}=K(),m=u(o=>{const r=S(o);if(!r)return;const{nodeId:p,propKey:c}=r;if(!c){t(e=>e.kind==="part"?P:e);return}t(e=>e.kind==="part"&&e.nodeId===p&&e.propKey===c?e:{kind:"part",nodeId:p,propKey:c}),i?.(p)},[t,i]);I(()=>{f(m)},[f,m]);const s=n.kind==="part"?y(n.nodeId,n.propKey):null;return I(()=>{l(s)},[s,l]),{selectNode:u(o=>{t(()=>P);const r=d(o);r&&a.select(r)},[t,d,a]),openPartId:s}}export{B as usePartBridge};
1
+ "use client";import{usePartBridge as t}from"efficient-easel/screen/components/usePartBridge";export{t as usePartBridge};
@@ -0,0 +1,2 @@
1
+ import type { ScreenDocumentOps } from "../lib/editor-screen.js";
2
+ export declare function usePinnedChromeSeed(ops: ScreenDocumentOps, config: unknown): void;
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as x,useRef as w}from"react";import{createNode as z,newId as Y}from"efficient-easel/data";import{useEaselApi as v}from"efficient-easel/easel";import{useStorefrontDocument as A}from"./StorefrontDocumentContext.js";import{SITE_FOOTER_SLUG as H}from"../lib/content/footer.js";import{boxFooterFromFooter as B}from"../lib/puck/box-footer.js";import{ROOT_ZONE as m,missingPinnedTypes as G,pinnedDuplicateIds as R}from"../lib/puck/content-tree.js";import{FOOTER_TYPE as r,HEADER_TYPE as h,buildDefaultFooterBlocks as _,buildDefaultHeaderNode as b}from"../lib/puck/footer-blocks.js";import{canSeedPinnedChrome as L}from"../lib/puck/pinned-seed-gate.js";import{siteFooterDocChrome as U,SITE_FOOTER_TYPE as S}from"../lib/puck/section-groups.js";function $(t,y){const{capabilities:I,currentSlug:N,docId:a,data:E,saveStatus:g}=A(),{hasSiteSettings:D,hasPinnedChrome:F}=I,T=N===H,O=v().getState,P=w(null);x(()=>{if(!L({docId:a,saveStatus:g,seededDocId:P.current})||(P.current=a,!F))return;const d=O().appState.data,n=d.content,f=E?.content??[],c=(e,s)=>e.some(o=>o?.type===s);if(!D){const e=new Set(R(n)),s=e.size?n.filter(i=>!e.has(i.props.id)):n;e.size&&t.setDocument({...d,content:s});const o=G(s,f);if(o.includes(r)){const i=s.length,u=t.insertSection(r,i);t.replaceComponent(m,i,{type:r,props:{id:u,blocks:_()}})}o.includes(h)&&t.insertNode(m,0,b());return}if(T){const e=U(n);if(e!==n&&t.setDocument({...d,content:[...e]}),!e.find(o=>o.type===r)&&!c(f,r)&&!c(e,S)&&!c(f,S)){const o=(u,C)=>z(y,u,C),i={type:r,props:{blocks:_()}};t.insertNode(m,e.length,B(i,o,Y(S)))}return}const l=n.filter(e=>e.type!==r),k=new Set(R(l)),p=k.size?l.filter(e=>!k.has(e.props.id)):l;p.length!==n.length&&t.setDocument({...d,content:p}),!c(p,h)&&!c(f,h)&&t.insertNode(m,0,b())},[a,g,E,O,t,D,F,T])}export{$ as usePinnedChromeSeed};
@@ -1 +1 @@
1
- "use client";import{useCallback as L,useEffect as A,useMemo as v,useRef as O,useState as C}from"react";import{EMPTY_SOCIAL_ROWS as b}from"./PreviewSocialContext.js";import{SOCIAL_PLATFORMS as d,normalizeSocialLinks as p}from"../lib/content/social-links.js";import{backendOf as w}from"../lib/editor-session.js";import{useEditorSession as y}from"../lib/editor-session-context.js";import{WebsiteBackendError as _}from"../lib/web-backend.js";const g="Could not save this link. Check your connection and try again.";function F(n,r){if(!(n instanceof _)||n.kind!=="invalid")return null;const s=n.fields?.[r];return typeof s=="string"&&s.trim()?s:null}function R(n){return Object.fromEntries(d.map(r=>[r,{value:n[r]??"",error:null}]))}function z({token:n,siteId:r,enabled:s}){const[c,i]=C(b),m=O(null),a=O(!1),h=y(),t=w(h).social,o=s&&!!n&&!!r&&!!t;A(()=>{if(!o||!n||!r||!t)return;m.current!==r&&(m.current=r,a.current=!1,i(b));let e=!1;return t.get({siteId:r}).then(l=>{!e&&!a.current&&i(R(l))}).catch(()=>{}),()=>{e=!0}},[o,n,r,t]);const S=L(async(e,l)=>{if(!o||!n||!r||!t)return{ok:!1,error:"There is no website to save to."};try{const f=await t.update({[e]:l.trim()},{siteId:r});return a.current=!0,i(u=>({...u,[e]:{value:f[e]??"",error:null}})),{ok:!0}}catch(f){const u=F(f,e)??g;return i(E=>({...E,[e]:{...E[e],error:u}})),{ok:!1,error:u}}},[o,n,r,t]),k=v(()=>p(Object.fromEntries(d.map(e=>[e,c[e].value]))),[c]);return v(()=>({links:k,rows:c,canSave:o,saveLink:S}),[k,c,o,S])}export{g as SOCIAL_SAVE_FAILED,F as socialFieldError,z as useSocialSettings};
1
+ "use client";import{useCallback as L,useEffect as A,useMemo as v,useRef as O,useState as C}from"react";import{EMPTY_SOCIAL_ROWS as b}from"./PreviewSocialContext.js";import{SOCIAL_PLATFORMS as d,normalizeSocialLinks as p}from"../lib/content/social-links.js";import{backendOf as w}from"../lib/website-session.js";import{useEditorSession as y}from"../lib/editor-session-context.js";import{WebsiteBackendError as _}from"../lib/web-backend.js";const g="Could not save this link. Check your connection and try again.";function F(n,r){if(!(n instanceof _)||n.kind!=="invalid")return null;const s=n.fields?.[r];return typeof s=="string"&&s.trim()?s:null}function R(n){return Object.fromEntries(d.map(r=>[r,{value:n[r]??"",error:null}]))}function z({token:n,siteId:r,enabled:s}){const[c,i]=C(b),m=O(null),a=O(!1),h=y(),t=w(h).social,o=s&&!!n&&!!r&&!!t;A(()=>{if(!o||!n||!r||!t)return;m.current!==r&&(m.current=r,a.current=!1,i(b));let e=!1;return t.get({siteId:r}).then(l=>{!e&&!a.current&&i(R(l))}).catch(()=>{}),()=>{e=!0}},[o,n,r,t]);const S=L(async(e,l)=>{if(!o||!n||!r||!t)return{ok:!1,error:"There is no website to save to."};try{const f=await t.update({[e]:l.trim()},{siteId:r});return a.current=!0,i(u=>({...u,[e]:{value:f[e]??"",error:null}})),{ok:!0}}catch(f){const u=F(f,e)??g;return i(E=>({...E,[e]:{...E[e],error:u}})),{ok:!1,error:u}}},[o,n,r,t]),k=v(()=>p(Object.fromEntries(d.map(e=>[e,c[e].value]))),[c]);return v(()=>({links:k,rows:c,canSave:o,saveLink:S}),[k,c,o,S])}export{g as SOCIAL_SAVE_FAILED,F as socialFieldError,z as useSocialSettings};
@@ -1 +1 @@
1
- "use client";import{getEditorSiteId as t}from"../lib/editor-site.js";import{backendOf as e}from"../lib/editor-session.js";import{makeSessionLoader as r}from"../lib/editor-session-loader.js";const f=r({fetch:async(n,o)=>await e().blog?.posts(o?{siteId:o}:void 0)??[],keyBy:t});export{f as loadStorefrontBlogPosts};
1
+ "use client";import{getEditorSiteId as t}from"../lib/editor-site.js";import{backendOf as e}from"../lib/website-session.js";import{makeSessionLoader as r}from"../lib/editor-session-loader.js";const f=r({fetch:async(n,o)=>await e().blog?.posts(o?{siteId:o}:void 0)??[],keyBy:t});export{f as loadStorefrontBlogPosts};
@@ -0,0 +1 @@
1
+ export { clientOnly } from "efficient-easel/screen/lib/client-only";
@@ -0,0 +1 @@
1
+ "use client";import{clientOnly as n}from"efficient-easel/screen/lib/client-only";export{n as clientOnly};
@@ -1,3 +1,3 @@
1
- import{slugify as o}from"../slugify.js";const r=["tall","square","wide"],i="tall";function n(e){return r.includes(String(e??""))?String(e):i}const l={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",apiKey:"",mapId:"",mapTheme:"auto"},s=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
2
- Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
3
- Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}];function u(e){const t=String(e??"").split(" \xB7 ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}const p="other",m={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};function h(e){return o(e)}export{s as CONTACT_LOCATIONS_CARDS_PLACEHOLDER,l as CONTACT_LOCATIONS_DEFAULTS,m as CONTACT_ROUTING_DEFAULTS,r as LOCATION_TILE_SHAPES,i as LOCATION_TILE_SHAPE_DEFAULT,p as OTHER_REASON_ID,n as parseLocationTileShape,h as slugifyGroupId,u as splitLegacyRegion};
1
+ import{slugify as o}from"../slugify.js";const r=["tall","square","wide"],i="tall";function n(e){return r.includes(String(e??""))?String(e):i}const l={sectionNumber:"· Locations",heading:"Our *locations.*",tagline:"Visit us in person — find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour · click to jump",apiKey:"",mapId:"",mapTheme:"auto"},s=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT · UTC +0",address:`Address line one
2
+ Address line two`,phone:"+00 000 0000",hours:"Mon–Fri 9:00–18:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT · UTC +0",address:`Address line one
3
+ Address line two`,phone:"+00 000 0000",hours:"Mon–Fri 9:00–18:00",lat:0,lng:0,mapsUrl:""}];function u(e){const t=String(e??"").split(" · ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}const p="other",m={routingNumber:"02 · Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A · Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B · Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C · Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D · Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 · Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below — we'll route it to whoever can help.",buttonText:"Send Message →",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail · Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail · Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail · Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail · Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon–Fri · 9:00–18:00"}]};function h(e){return o(e)}export{s as CONTACT_LOCATIONS_CARDS_PLACEHOLDER,l as CONTACT_LOCATIONS_DEFAULTS,m as CONTACT_ROUTING_DEFAULTS,r as LOCATION_TILE_SHAPES,i as LOCATION_TILE_SHAPE_DEFAULT,p as OTHER_REASON_ID,n as parseLocationTileShape,h as slugifyGroupId,u as splitLegacyRegion};
@@ -1,2 +1,2 @@
1
1
  import{authoredBoolean as d,authoredNumber as m,authoredString as f,authoredStringList as b}from"./authored-props.js";import{CART_DRAWER_SLUG as P}from"./cart-drawer.js";import{popupTextStyles as p}from"../popup/text-kinds.js";import{SITE_FOOTER_SLUG as h}from"./footer.js";const g="subscribe-popup",C="subscribe-popup",G="Pop up - SubscribePopup",S=[g,h,P];function H(r){return S.includes(r)}const L=["delay","scroll","exit"],x=["all","chosen"],O=["visit","days","never"],y=["right","left"],T={min:0,max:60},A={min:10,max:90},_={min:1,max:90},o={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
2
- *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},n=f,E=m,l=d,u=b;function s(r,e,t){return typeof e=="string"&&r.includes(e)?e:t}function a(r,e,t){const i=E(r,t);return Math.min(e.max,Math.max(e.min,Math.round(i)))}function B(r){return typeof r.hideAfter=="string"?s(O,r.hideAfter,o.hideAfter):r.oncePerSession===!0?"visit":r.oncePerSession===!1?"never":o.hideAfter}function U(r){return Array.isArray(r)?r.map(e=>typeof e=="string"?e.trim():"").filter(Boolean).map(e=>e.startsWith("/")?e:`/${e}`):[]}function c(r,e){if(r==null)return e;const t=i=>i.trim()?i:"";if(typeof r=="string")return t(r);if(typeof r=="object"&&"text"in r){const i=r.text;return typeof i=="string"?t(i):""}return e}function k(r,e){return Array.isArray(r)?u(r,[]):e}function I(r,e){return Array.isArray(r)?r.map(t=>{const i=t??{};return{label:n(i.label,""),value:n(i.value,"")}}).filter(t=>t.label||t.value):e}function v(r){const e=r??{},t=o;return{metaLabel:n(e.metaLabel,t.metaLabel),issueLabel:c(e.issueLabel,t.issueLabel),issueNumber:c(e.issueNumber,t.issueNumber),kicker:n(e.kicker,t.kicker),heading:n(e.heading,t.heading),deck:n(e.deck,t.deck),stats:I(e.stats,t.stats),formLabel:n(e.formLabel,t.formLabel),formHeading:n(e.formHeading,t.formHeading),formIntro:n(e.formIntro,t.formIntro),firstNameLabel:n(e.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:n(e.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:n(e.emailLabel,t.emailLabel),emailPlaceholder:n(e.emailPlaceholder,t.emailPlaceholder),interestsLabel:n(e.interestsLabel,t.interestsLabel),interests:u(e.interests,t.interests),frequencyLabel:n(e.frequencyLabel,t.frequencyLabel),frequencies:k(e.frequencies,t.frequencies),submitText:n(e.submitText,t.submitText),finePrint:n(e.finePrint,t.finePrint),dismissText:n(e.dismissText,t.dismissText),emailInvalidText:n(e.emailInvalidText,t.emailInvalidText),submitErrorText:n(e.submitErrorText,t.submitErrorText),successHeading:n(e.successHeading,t.successHeading),successBody:n(e.successBody,t.successBody),keepBrowsingText:n(e.keepBrowsingText,t.keepBrowsingText),formSlug:typeof e.formSlug=="string"?e.formSlug.trim():t.formSlug,autoOpen:l(e.autoOpen,t.autoOpen),autoOpenDelaySec:a(e.autoOpenDelaySec,T,t.autoOpenDelaySec),trigger:s(L,e.trigger,t.trigger),scrollPercent:a(e.scrollPercent,A,t.scrollPercent),showOn:s(x,e.showOn,t.showOn),showOnPages:U(e.showOnPages),hideAfter:B(e),hideDays:a(e.hideDays,_,t.hideDays),formSide:s(y,e.formSide,t.formSide),valuePanelOnPhone:l(e.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:e.sectionAccent,sectionCorners:e.sectionCorners,sectionCornerSides:e.sectionCornerSides,textStyles:p(e)}}export{_ as POPUP_DAYS_RANGE,T as POPUP_DELAY_RANGE,y as POPUP_FORM_SIDES,O as POPUP_HIDE_AFTER,A as POPUP_SCROLL_RANGE,x as POPUP_SHOW_ON,L as POPUP_TRIGGERS,o as SUBSCRIBE_POPUP_DEFAULTS,C as SUBSCRIBE_POPUP_KIND,G as SUBSCRIBE_POPUP_PAGE_TITLE,g as SUBSCRIBE_POPUP_SLUG,S as SYSTEM_PAGE_SLUGS,H as isSystemPageSlug,v as resolveSubscribeContent};
2
+ *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy — the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},n=f,E=m,l=d,u=b;function s(r,e,t){return typeof e=="string"&&r.includes(e)?e:t}function a(r,e,t){const i=E(r,t);return Math.min(e.max,Math.max(e.min,Math.round(i)))}function B(r){return typeof r.hideAfter=="string"?s(O,r.hideAfter,o.hideAfter):r.oncePerSession===!0?"visit":r.oncePerSession===!1?"never":o.hideAfter}function U(r){return Array.isArray(r)?r.map(e=>typeof e=="string"?e.trim():"").filter(Boolean).map(e=>e.startsWith("/")?e:`/${e}`):[]}function c(r,e){if(r==null)return e;const t=i=>i.trim()?i:"";if(typeof r=="string")return t(r);if(typeof r=="object"&&"text"in r){const i=r.text;return typeof i=="string"?t(i):""}return e}function k(r,e){return Array.isArray(r)?u(r,[]):e}function I(r,e){return Array.isArray(r)?r.map(t=>{const i=t??{};return{label:n(i.label,""),value:n(i.value,"")}}).filter(t=>t.label||t.value):e}function v(r){const e=r??{},t=o;return{metaLabel:n(e.metaLabel,t.metaLabel),issueLabel:c(e.issueLabel,t.issueLabel),issueNumber:c(e.issueNumber,t.issueNumber),kicker:n(e.kicker,t.kicker),heading:n(e.heading,t.heading),deck:n(e.deck,t.deck),stats:I(e.stats,t.stats),formLabel:n(e.formLabel,t.formLabel),formHeading:n(e.formHeading,t.formHeading),formIntro:n(e.formIntro,t.formIntro),firstNameLabel:n(e.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:n(e.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:n(e.emailLabel,t.emailLabel),emailPlaceholder:n(e.emailPlaceholder,t.emailPlaceholder),interestsLabel:n(e.interestsLabel,t.interestsLabel),interests:u(e.interests,t.interests),frequencyLabel:n(e.frequencyLabel,t.frequencyLabel),frequencies:k(e.frequencies,t.frequencies),submitText:n(e.submitText,t.submitText),finePrint:n(e.finePrint,t.finePrint),dismissText:n(e.dismissText,t.dismissText),emailInvalidText:n(e.emailInvalidText,t.emailInvalidText),submitErrorText:n(e.submitErrorText,t.submitErrorText),successHeading:n(e.successHeading,t.successHeading),successBody:n(e.successBody,t.successBody),keepBrowsingText:n(e.keepBrowsingText,t.keepBrowsingText),formSlug:typeof e.formSlug=="string"?e.formSlug.trim():t.formSlug,autoOpen:l(e.autoOpen,t.autoOpen),autoOpenDelaySec:a(e.autoOpenDelaySec,T,t.autoOpenDelaySec),trigger:s(L,e.trigger,t.trigger),scrollPercent:a(e.scrollPercent,A,t.scrollPercent),showOn:s(x,e.showOn,t.showOn),showOnPages:U(e.showOnPages),hideAfter:B(e),hideDays:a(e.hideDays,_,t.hideDays),formSide:s(y,e.formSide,t.formSide),valuePanelOnPhone:l(e.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:e.sectionAccent,sectionCorners:e.sectionCorners,sectionCornerSides:e.sectionCornerSides,textStyles:p(e)}}export{_ as POPUP_DAYS_RANGE,T as POPUP_DELAY_RANGE,y as POPUP_FORM_SIDES,O as POPUP_HIDE_AFTER,A as POPUP_SCROLL_RANGE,x as POPUP_SHOW_ON,L as POPUP_TRIGGERS,o as SUBSCRIBE_POPUP_DEFAULTS,C as SUBSCRIBE_POPUP_KIND,G as SUBSCRIBE_POPUP_PAGE_TITLE,g as SUBSCRIBE_POPUP_SLUG,S as SYSTEM_PAGE_SLUGS,H as isSystemPageSlug,v as resolveSubscribeContent};
@@ -1,6 +1,2 @@
1
- export type ViewTier = "desktop" | "tablet" | "mobile";
2
- export declare const VIEW_TIERS: ViewTier[];
3
- export declare const VIEW_TIER_LABEL: Record<ViewTier, string>;
4
- export declare const VIEW_TABLET_MIN = 720;
5
- export declare const VIEW_DESKTOP_MIN = 1100;
6
- export declare function viewTierForWidth(width: number): ViewTier;
1
+ export { VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIER_LABEL, VIEW_TIERS, viewTierForWidth } from "efficient-easel/screen/lib/content/view-tiers";
2
+ export type { ViewTier } from "efficient-easel/screen/lib/content/view-tiers";
@@ -1 +1 @@
1
- const p=["desktop","tablet","mobile"],r={desktop:"Desktop",tablet:"Tablet",mobile:"Mobile"},e=720,o=1100;function E(t){return t>=o?"desktop":t>=e?"tablet":"mobile"}export{o as VIEW_DESKTOP_MIN,e as VIEW_TABLET_MIN,p as VIEW_TIERS,r as VIEW_TIER_LABEL,E as viewTierForWidth};
1
+ import{VIEW_DESKTOP_MIN as _,VIEW_TABLET_MIN as T,VIEW_TIER_LABEL as W,VIEW_TIERS as r,viewTierForWidth as V}from"efficient-easel/screen/lib/content/view-tiers";export{_ as VIEW_DESKTOP_MIN,T as VIEW_TABLET_MIN,r as VIEW_TIERS,W as VIEW_TIER_LABEL,V as viewTierForWidth};
@@ -1,29 +1,2 @@
1
- import { type RefObject } from "react";
2
- import { type EditorSession } from "./editor-session.js";
3
- export interface AuthMessage {
4
- type?: string;
5
- token?: string;
6
- siteId?: string;
7
- brandId?: string;
8
- theme?: string;
9
- can?: unknown;
10
- }
11
- export type BridgedCapabilities = {
12
- canCreatePlatformTemplate: boolean;
13
- };
14
- export declare const NO_BRIDGED_CAPABILITIES: BridgedCapabilities;
15
- export declare function applyAuthGrant(d: AuthMessage & {
16
- token: string;
17
- }, opts?: {
18
- stampChromeTheme?: boolean;
19
- session?: EditorSession;
20
- }): void;
21
- export interface AdminBridge {
22
- token: string | null;
23
- tokenRef: RefObject<string | null>;
24
- capabilities: BridgedCapabilities;
25
- }
26
- export declare function useAdminBridge(handlers?: {
27
- onAuth?: (hadToken: boolean) => void;
28
- onMessage?: (data: unknown) => void;
29
- }): AdminBridge;
1
+ export { applyAuthGrant, NO_BRIDGED_CAPABILITIES, useAdminBridge } from "efficient-easel/screen/lib/admin-bridge";
2
+ export type { AdminBridge, AuthMessage, BridgedCapabilities } from "efficient-easel/screen/lib/admin-bridge";
@@ -1 +1 @@
1
- "use client";import{useEffect as p,useRef as u,useState as d}from"react";import{useEditorHost as T}from"./editor-host.js";import{currentEditorSession as g,setSessionBridgedSite as C}from"./editor-session.js";import{useEditorSession as A}from"./editor-session-context.js";import{applyEditorChromeTheme as E}from"./editor-theme.js";const y=500,h={canCreatePlatformTemplate:!1};function S(e){return!e||typeof e!="object"?h:{canCreatePlatformTemplate:e.canCreatePlatformTemplate===!0}}function R(e,n={}){const o=n.session??g();o.auth.token=e.token,o.auth.brandId=e.brandId??null,C(o,e.siteId),(n.stampChromeTheme??!0)&&E(e.theme)}function _(e){const[n,o]=d(null),s=u(null),[k,b]=d(h),a=u(e?.onAuth),c=u(e?.onMessage);p(()=>{a.current=e?.onAuth,c.current=e?.onMessage});const r=T(),i=A();return p(()=>{const f=r.subscribe(l=>{const t=l;if(t.type==="storefront-editor:auth"&&typeof t.token=="string"&&t.token){const I=!!s.current;s.current=t.token,o(t.token),R({...t,token:t.token},{stampChromeTheme:r.ownsDocument,session:i}),b(S(t.can)),a.current?.(I)}else c.current?.(l)});if(r.send("storefront-editor:ready"),!i.usesBridgedToken)return f;const m=window.setInterval(()=>{s.current?window.clearInterval(m):r.send("storefront-editor:ready")},y);return()=>{f(),window.clearInterval(m)}},[r,i]),{token:n,tokenRef:s,capabilities:k}}export{h as NO_BRIDGED_CAPABILITIES,R as applyAuthGrant,_ as useAdminBridge};
1
+ "use client";import{applyAuthGrant as t,NO_BRIDGED_CAPABILITIES as A,useAdminBridge as I}from"efficient-easel/screen/lib/admin-bridge";export{A as NO_BRIDGED_CAPABILITIES,t as applyAuthGrant,I as useAdminBridge};
@@ -0,0 +1,2 @@
1
+ export { hostLoadRefusalOf, hostUnreachableMessage, isBackendError, provideHostFailures, readHostFailure, STATUS_UNREACHABLE, WebsiteBackendError } from "efficient-easel/screen/lib/backend-error";
2
+ export type { HostFailure, WebsiteBackendErrorKind } from "efficient-easel/screen/lib/backend-error";
@@ -0,0 +1 @@
1
+ import{hostLoadRefusalOf as a,hostUnreachableMessage as o,isBackendError as s,provideHostFailures as t,readHostFailure as d,STATUS_UNREACHABLE as i,WebsiteBackendError as l}from"efficient-easel/screen/lib/backend-error";export{i as STATUS_UNREACHABLE,l as WebsiteBackendError,a as hostLoadRefusalOf,o as hostUnreachableMessage,s as isBackendError,t as provideHostFailures,d as readHostFailure};
@@ -1,5 +1,5 @@
1
1
  import type { ComponentConfig } from "efficient-easel/blocks";
2
- import { type EditorSession } from "./editor-session.js";
2
+ import { type EditorSession, type SessionBlocks } from "./editor-session.js";
3
3
  import { type BlockSet } from "./puck/section-catalog.js";
4
4
  export interface EditorBlockCategory {
5
5
  key: string;
@@ -16,5 +16,5 @@ export interface EditorBlocks {
16
16
  metadata?: Record<string, unknown>;
17
17
  }
18
18
  export type OfferedSets = Readonly<Record<BlockSet, boolean>>;
19
- export declare function offeredSets(blocks: EditorBlocks | null | undefined): OfferedSets;
19
+ export declare function offeredSets(blocks: EditorBlocks | SessionBlocks | null | undefined): OfferedSets;
20
20
  export declare function offeredSetsOf(session?: EditorSession): OfferedSets;
@@ -1,52 +1,2 @@
1
- import type { ComponentType, ReactNode, RefObject } from "react";
2
- export type EditorSurface = "page" | "section";
3
- export interface HostPanelProps {
4
- placeholderMode: boolean;
5
- tokenRef: RefObject<string | null>;
6
- siteId: string | null;
7
- websiteName: string | null;
8
- onOpenWebsiteSettings?: () => void;
9
- onAuthExpired: () => void;
10
- }
11
- export interface HostPageRow {
12
- key: string;
13
- label: string;
14
- href: string;
15
- icon: ReactNode;
16
- }
17
- export interface HostProduct {
18
- slug: string;
19
- name: string;
20
- href: string;
21
- }
22
- export interface HostLinkRowProps {
23
- value: string;
24
- onChange: (url: string) => void;
25
- pages: readonly {
26
- slug: string;
27
- layout?: unknown;
28
- }[];
29
- }
30
- export interface EditorChrome {
31
- wrap?: ComponentType<{
32
- surface: EditorSurface;
33
- children: ReactNode;
34
- }>;
35
- panels?: {
36
- header?: ComponentType<HostPanelProps>;
37
- chromePage?: ComponentType;
38
- };
39
- pageRows?: {
40
- title: string;
41
- rows: readonly HostPageRow[];
42
- };
43
- products?: {
44
- list(): Promise<readonly HostProduct[]>;
45
- };
46
- linkRow?: ComponentType<HostLinkRowProps>;
47
- }
48
- export declare function ChromeWrap({ wrap: Wrap, surface, children, }: {
49
- wrap: EditorChrome["wrap"] | undefined;
50
- surface: EditorSurface;
51
- children: ReactNode;
52
- }): import("react").JSX.Element;
1
+ export { ChromeWrap } from "efficient-easel/screen/lib/host-chrome";
2
+ export type { EaselChrome as EditorChrome, EaselSurface as EditorSurface, HostLinkRowProps, HostPageRow, HostPanelProps, HostProduct } from "efficient-easel/screen/lib/host-chrome";
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as a}from"react/jsx-runtime";function m({wrap:r,surface:t,children:e}){return r?n(r,{surface:t,children:e}):n(a,{children:e})}export{m as ChromeWrap};
1
+ "use client";import{ChromeWrap as o}from"efficient-easel/screen/lib/host-chrome";export{o as ChromeWrap};
@@ -1,55 +1,7 @@
1
1
  import { type OfferedSets } from "./editor-blocks.js";
2
- import type { EditorPageRow, SiteRecord, SiteRecordPatch, WebsiteBackend, WebsiteEditLock } from "./web-backend.js";
2
+ import type { EditorCapabilities, EditorDocument, EditorDocumentAdapter } from "./editor-document-contract.js";
3
+ import type { EditorPageRow, WebsiteBackend } from "./web-backend.js";
3
4
  export type { EditorPageRow };
4
- export type EditorCapabilities = {
5
- canPublish: boolean;
6
- hasSiteSettings: boolean;
7
- hasSiteTheme: boolean;
8
- placeholderFrames: boolean;
9
- mediaEditing: boolean;
10
- pageCreationInAdminForm: boolean;
11
- canDeletePagesInline: boolean;
12
- hasEditLock: boolean;
13
- hasEditGuard: boolean;
14
- hasPinnedChrome: boolean;
15
- explainsSiteSettings: boolean;
16
- hasSiteRecord: boolean;
17
- canEditSiteRecord: boolean;
18
- hasPreviewLink: boolean;
19
- hasCatalog: boolean;
20
- hasForms: boolean;
21
- hasBlog: boolean;
22
- offersCommerce: boolean;
23
- offersService: boolean;
24
- };
25
- export type EditorDocument = {
26
- id: string;
27
- layout: unknown;
28
- kind?: string | null;
29
- version?: string | null;
30
- };
31
- export interface EditorDocumentAdapter {
32
- capabilities: EditorCapabilities;
33
- resolve(slug: string): Promise<EditorDocument | null>;
34
- saveLayout(id: string, layout: Record<string, unknown>, version: string | null, clientId?: string): Promise<{
35
- version: string | null;
36
- }>;
37
- rereadVersion?(id: string): Promise<string | null>;
38
- publish?(id: string, version?: string): Promise<{
39
- version: string | null;
40
- }>;
41
- lock?: WebsiteEditLock;
42
- listPages(): Promise<EditorPageRow[]>;
43
- createPage?(input: {
44
- slug: string;
45
- title: string;
46
- layout: Record<string, unknown>;
47
- }): Promise<EditorPageRow>;
48
- deletePage?(id: string): Promise<void>;
49
- site?(): Promise<SiteRecord>;
50
- updateSite?(patch: SiteRecordPatch): Promise<SiteRecord>;
51
- templateName?(): Promise<string>;
52
- previewHref?(slug: string): string;
53
- }
5
+ export type { EditorCapabilities, EditorDocument, EditorDocumentAdapter };
54
6
  export declare function makeSitePageAdapter(siteId: string | undefined, backend?: WebsiteBackend, offered?: OfferedSets): EditorDocumentAdapter;
55
7
  export declare function makeTemplatePageAdapter(templateId: string, backend?: WebsiteBackend, offered?: OfferedSets): EditorDocumentAdapter;
@@ -1 +1 @@
1
- "use client";import{offeredSetsOf as c}from"./editor-blocks.js";import{backendOf as m,isEfficientBackend as u}from"./editor-session.js";function h(t,i){const s=i?{siteId:i}:void 0;return{resolve:e=>t.load({slug:e,...s}),saveLayout:(e,o,r,a)=>t.save(e,{layout:o},{version:r,clientId:a??""}),rereadVersion:t.version?e=>t.version(e):void 0,publish:t.publish?(e,o)=>t.publish(e,o?{version:o}:void 0):void 0,listPages:()=>t.list(s),createPage:t.create?e=>t.create({...e,...s}):void 0,deletePage:t.remove?e=>t.remove(e):void 0}}function v(t,i=m(),s=c()){const e=u(i),o=t?{siteId:t}:void 0,r=e?!!t:!0,a=i.site.update;return{capabilities:{canPublish:!!i.pages.publish,hasSiteSettings:e,hasSiteTheme:!!i.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!i.pages.create,canDeletePagesInline:!!i.pages.remove,hasEditLock:!!i.lock,hasEditGuard:!0,hasPinnedChrome:e&&s.commerce&&s.service,explainsSiteSettings:!1,hasSiteRecord:r,canEditSiteRecord:r&&!!a,hasPreviewLink:e||!!i.preview,hasCatalog:e&&s.commerce,hasForms:e&&s.service,hasBlog:!!i.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...h(i.pages,t),lock:i.lock,site:r?()=>i.site.get(o):void 0,updateSite:r&&a?n=>a(n,o):void 0,previewHref:i.preview?n=>i.preview.href(n):void 0}}function f(t,i=m(),s=c()){const e=u(i),o=i.templates,r=o?o.pages(t):{list:()=>Promise.reject(new Error(l)),load:()=>Promise.reject(new Error(l)),save:()=>Promise.reject(new Error(l))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!r.create,canDeletePagesInline:!!r.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:e&&s.commerce&&s.service,explainsSiteSettings:e,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:e&&s.commerce,hasForms:e&&s.service,hasBlog:!!i.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...h(r,void 0),publish:void 0,templateName:o?()=>o.get(t).then(a=>a.name):void 0}}const l="This editor's backend has no website templates.";export{v as makeSitePageAdapter,f as makeTemplatePageAdapter};
1
+ "use client";import{offeredSetsOf as c}from"./editor-blocks.js";import{isEfficientBackend as m}from"./editor-session.js";import{backendOf as u}from"./website-session.js";function h(t,i){const s=i?{siteId:i}:void 0;return{resolve:e=>t.load({slug:e,...s}),saveLayout:(e,o,r,a)=>t.save(e,{layout:o},{version:r,clientId:a??""}),rereadVersion:t.version?e=>t.version(e):void 0,publish:t.publish?(e,o)=>t.publish(e,o?{version:o}:void 0):void 0,listPages:()=>t.list(s),createPage:t.create?e=>t.create({...e,...s}):void 0,deletePage:t.remove?e=>t.remove(e):void 0}}function f(t,i=u(),s=c()){const e=m(i),o=t?{siteId:t}:void 0,r=e?!!t:!0,a=i.site.update;return{capabilities:{canPublish:!!i.pages.publish,hasSiteSettings:e,hasSiteTheme:!!i.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!i.pages.create,canDeletePagesInline:!!i.pages.remove,hasEditLock:!!i.lock,hasEditGuard:!0,hasPinnedChrome:e&&s.commerce&&s.service,explainsSiteSettings:!1,hasSiteRecord:r,canEditSiteRecord:r&&!!a,hasPreviewLink:e||!!i.preview,hasCatalog:e&&s.commerce,hasForms:e&&s.service,hasBlog:!!i.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...h(i.pages,t),lock:i.lock,site:r?()=>i.site.get(o):void 0,updateSite:r&&a?n=>a(n,o):void 0,previewHref:i.preview?n=>i.preview.href(n):void 0}}function g(t,i=u(),s=c()){const e=m(i),o=i.templates,r=o?o.pages(t):{list:()=>Promise.reject(new Error(l)),load:()=>Promise.reject(new Error(l)),save:()=>Promise.reject(new Error(l))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!r.create,canDeletePagesInline:!!r.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:e&&s.commerce&&s.service,explainsSiteSettings:e,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:e&&s.commerce,hasForms:e&&s.service,hasBlog:!!i.blog&&s.service,offersCommerce:s.commerce,offersService:s.service},...h(r,void 0),publish:void 0,templateName:o?()=>o.get(t).then(a=>a.name):void 0}}const l="This editor's backend has no website templates.";export{f as makeSitePageAdapter,g as makeTemplatePageAdapter};
@@ -0,0 +1,2 @@
1
+ export { NO_DOCUMENT_ADDRESSING } from "efficient-easel/screen/lib/document-addressing";
2
+ export type { DocumentAddressing } from "efficient-easel/screen/lib/document-addressing";
@@ -0,0 +1 @@
1
+ import{NO_DOCUMENT_ADDRESSING as o}from"efficient-easel/screen/lib/document-addressing";export{o as NO_DOCUMENT_ADDRESSING};
@@ -0,0 +1 @@
1
+ export type { EaselCapabilities as EditorCapabilities, EaselDocument as EditorDocument, EaselDocumentAdapter as EditorDocumentAdapter, EaselPageRow as EditorPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from "efficient-easel/screen/lib/document-contract";
File without changes
@@ -1,15 +1 @@
1
- import type { Data } from "efficient-easel/blocks";
2
- import type { EditorCapabilities } from "./editor-document-adapter.js";
3
- export interface OpeningDocument {
4
- slug: string;
5
- isTemplate: boolean;
6
- capabilities: EditorCapabilities;
7
- }
8
- export interface EditorDocumentHooks {
9
- opening?(document: OpeningDocument): (layout: Data) => Promise<Data>;
10
- stored?(layout: Data): Data;
11
- storedNode?<T extends {
12
- type: string;
13
- props?: Record<string, unknown>;
14
- }>(node: T): T;
15
- }
1
+ export type { EaselDocumentHooks as EditorDocumentHooks, OpeningDocument } from "efficient-easel/screen/lib/document-hooks";
@@ -0,0 +1,2 @@
1
+ export { resetForDocumentSwitch, saveStatusForNewDocument, saveStatusOf } from "efficient-easel/screen/lib/document-switch";
2
+ export type { DocumentSwitchSetters, SaveStatus } from "efficient-easel/screen/lib/document-switch";
@@ -0,0 +1 @@
1
+ import{resetForDocumentSwitch as o,saveStatusForNewDocument as r,saveStatusOf as s}from"efficient-easel/screen/lib/document-switch";export{o as resetForDocumentSwitch,r as saveStatusForNewDocument,s as saveStatusOf};
@@ -1,4 +1 @@
1
- import { type EditLockFailure } from "efficient-easel/edit-lock";
2
- export declare const PAGE_CONFLICT_CODE = "page_changed_elsewhere";
3
- export declare function readEditorFailure(err: unknown): EditLockFailure | null;
4
- export declare function isExpiredSession(err: unknown): boolean;
1
+ export { isExpiredSession, PAGE_CONFLICT_CODE, readEaselFailure as readEditorFailure } from "efficient-easel/screen/lib/failure";
@@ -1 +1 @@
1
- import{EDIT_LOCK_TAKEN as o}from"efficient-easel/edit-lock";import{STATUS_UNREACHABLE as d,isBackendError as c,readHostFailure as s}from"./web-backend.js";const i="page_changed_elsewhere",u={unauthorized:401,"changed-elsewhere":409,"lock-taken":409,"not-found":404,invalid:400,unavailable:d};function l(e){const n=s(e);if(n)return{status:n.status,data:n.data};if(!c(e))return null;const t=s(e.cause);if(t)return{status:t.status,data:t.data};const a=u[e.kind];return e.kind==="changed-elsewhere"?{status:a,data:{code:i,saved_by:e.conflict?.savedBy??"",saved_by_you:e.conflict?.savedByYou===!0,seconds_ago:e.conflict?.secondsAgo??0}}:e.kind==="lock-taken"?{status:a,data:{code:o,holder_name:e.holder?.name??"",seconds_since_seen:e.holder?.secondsSinceSeen??0,seconds_since_held:e.holder?.secondsSinceHeld??0}}:{status:a,data:null}}function f(e){return l(e)?.status===401}export{i as PAGE_CONFLICT_CODE,f as isExpiredSession,l as readEditorFailure};
1
+ import{isExpiredSession as a,PAGE_CONFLICT_CODE as i,readEaselFailure as s}from"efficient-easel/screen/lib/failure";export{i as PAGE_CONFLICT_CODE,a as isExpiredSession,s as readEditorFailure};
@@ -1 +1 @@
1
- export declare function routeSharedHostMessage(raw: unknown): boolean;
1
+ export { routeSharedHostMessage } from "efficient-easel/screen/lib/host-inbound";
@@ -1 +1 @@
1
- import{emitCollectionCategoriesChanged as d,emitHeaderMenusChanged as n,emitStorefrontFormsChanged as r}from"./editor-events.js";import{resolveFormEdit as o}from"./editor-form-window.js";import{resolveMediaPick as s}from"./editor-media-picker.js";function a(t){switch(t?.type){case"storefront-editor:category-updated":return d(),!0;case"storefront-editor:menus-updated":return n(),!0;case"storefront-editor:form-saved":{const e=t;return r(),e.requestId&&o(e.requestId,e.form??null),!0}case"storefront-editor:form-closed":{const e=t;return r(),e.requestId&&o(e.requestId,null),!0}case"storefront-editor:media-picked":{const e=t;return e.requestId&&s(e.requestId,e.media??null),!0}case"storefront-editor:media-pick-cancelled":{const e=t;return e.requestId&&s(e.requestId,null),!0}default:return!1}}export{a as routeSharedHostMessage};
1
+ import{routeSharedHostMessage as r}from"efficient-easel/screen/lib/host-inbound";export{r as routeSharedHostMessage};
@@ -1,135 +1,2 @@
1
- import { type ReactNode } from "react";
2
- import type { EditorTarget } from "../components/StorefrontDocumentContext.js";
3
- export interface HostPickedMedia {
4
- id: string;
5
- url: string;
6
- kind: "image" | "video";
7
- }
8
- export type SectionEditorTarget = {
9
- kind: "section";
10
- id: string;
11
- type?: string;
12
- name?: string;
13
- };
14
- export type EditorToHostMessage = {
15
- type: "storefront-editor:ready";
16
- } | {
17
- type: "storefront-editor:auth-expired";
18
- } | {
19
- type: "storefront-editor:dirty";
20
- } | {
21
- type: "storefront-editor:saved";
22
- } | {
23
- type: "storefront-editor:published";
24
- } | {
25
- type: "storefront-editor:save-failed";
26
- } | {
27
- type: "storefront-editor:navigated";
28
- target: EditorTarget;
29
- } | {
30
- type: "storefront-editor:open-media-picker";
31
- requestId: string;
32
- accept: string;
33
- title: string;
34
- file?: File;
35
- } | {
36
- type: "storefront-editor:open-form";
37
- requestId?: string;
38
- mode: "create" | "edit";
39
- formId?: string;
40
- } | {
41
- type: "storefront-editor:open-category";
42
- categoryId: string;
43
- name?: string;
44
- } | {
45
- type: "storefront-editor:open-product";
46
- slug: string;
47
- name?: string;
48
- } | {
49
- type: "storefront-editor:open-post";
50
- slug: string;
51
- title?: string;
52
- } | {
53
- type: "storefront-editor:open-menus";
54
- menuId?: string | null;
55
- } | {
56
- type: "storefront-editor:open-page";
57
- slug: string;
58
- } | {
59
- type: "storefront-editor:new-page";
60
- } | {
61
- type: "storefront-editor:save-as-template";
62
- siteId: string;
63
- slug: string;
64
- };
65
- export type HostToEditorMessage = {
66
- type: "storefront-editor:auth";
67
- token: string;
68
- siteId?: string;
69
- brandId?: string;
70
- theme?: string;
71
- can?: {
72
- canCreatePlatformTemplate?: boolean;
73
- };
74
- } | {
75
- type: "storefront-editor:navigate";
76
- target: EditorTarget | SectionEditorTarget;
77
- } | {
78
- type: "storefront-editor:category-updated";
79
- categoryId?: string;
80
- } | {
81
- type: "storefront-editor:menus-updated";
82
- } | {
83
- type: "storefront-editor:form-saved";
84
- requestId?: string;
85
- form?: {
86
- id: string;
87
- slug: string;
88
- };
89
- } | {
90
- type: "storefront-editor:form-closed";
91
- requestId?: string;
92
- } | {
93
- type: "storefront-editor:media-picked";
94
- requestId: string;
95
- media: HostPickedMedia;
96
- } | {
97
- type: "storefront-editor:media-pick-cancelled";
98
- requestId: string;
99
- };
100
- export type EditorMessageType = EditorToHostMessage["type"];
101
- type PayloadOf<T extends EditorMessageType> = Omit<Extract<EditorToHostMessage, {
102
- type: T;
103
- }>, "type">;
104
- export type SendToHost = <T extends EditorMessageType>(type: T, ...payload: Record<string, never> extends PayloadOf<T> ? [PayloadOf<T>?] : [PayloadOf<T>]) => void;
105
- export type InboundHostMessage = {
106
- type: string;
107
- } & Record<string, unknown>;
108
- export interface EditorHostAddress {
109
- search(): string;
110
- show(target: EditorTarget | SectionEditorTarget): void;
111
- load(target: EditorTarget): void;
112
- reload(): void;
113
- }
114
- export interface EditorHost {
115
- readonly connected: boolean;
116
- readonly ownsDocument: boolean;
117
- send: SendToHost;
118
- subscribe(listener: (message: InboundHostMessage) => void): () => void;
119
- readonly address: EditorHostAddress;
120
- }
121
- export declare const DETACHED_EDITOR_HOST: EditorHost;
122
- export declare const EditorHostContext: import("react").Context<EditorHost>;
123
- export declare function EditorHostProvider({ host, children }: {
124
- host: EditorHost;
125
- children: ReactNode;
126
- }): import("react").JSX.Element;
127
- export declare function useEditorHost(): EditorHost;
128
- export declare function createEditorHost(options: {
129
- onMessage: (message: EditorToHostMessage) => void;
130
- address: EditorHostAddress;
131
- }): {
132
- host: EditorHost;
133
- deliver: (message: HostToEditorMessage) => void;
134
- };
135
- export {};
1
+ export { createEaselHost as createEditorHost, DETACHED_EASEL_HOST as DETACHED_EDITOR_HOST, EaselHostContext as EditorHostContext, EaselHostProvider as EditorHostProvider, useEaselHost as useEditorHost } from "efficient-easel/screen/lib/host";
2
+ export type { EaselHost as EditorHost, EaselHostAddress as EditorHostAddress, EaselMessageType as EditorMessageType, EaselToHostMessage as EditorToHostMessage, HostPickedMedia, HostToEaselMessage as HostToEditorMessage, InboundHostMessage, SectionScreenTarget as SectionEditorTarget, SendToHost } from "efficient-easel/screen/lib/host";
@@ -1 +1 @@
1
- "use client";import{jsx as n}from"react/jsx-runtime";import{createContext as d,useContext as c}from"react";const i={connected:!1,ownsDocument:!0,send:()=>{},subscribe:()=>()=>{},address:{search:()=>"",show:()=>{},load:()=>{},reload:()=>{}}},s=d(i);function f({host:o,children:t}){return n(s.Provider,{value:o,children:t})}function E(){return c(s)}function m(o){const t=new Set;return{host:{connected:!0,ownsDocument:!1,send:((e,r)=>{o.onMessage({type:e,...r})}),subscribe(e){return t.add(e),()=>{t.delete(e)}},address:o.address},deliver:e=>{for(const r of[...t])r(e)}}}export{i as DETACHED_EDITOR_HOST,s as EditorHostContext,f as EditorHostProvider,m as createEditorHost,E as useEditorHost};
1
+ "use client";import{createEaselHost as o,DETACHED_EASEL_HOST as e,EaselHostContext as E,EaselHostProvider as r,useEaselHost as H}from"efficient-easel/screen/lib/host";export{e as DETACHED_EDITOR_HOST,E as EditorHostContext,r as EditorHostProvider,o as createEditorHost,H as useEditorHost};
@@ -1,3 +1 @@
1
- import { type RefObject } from "react";
2
- export declare function useEditorKeyTarget(rootRef: RefObject<HTMLElement | null>): EventTarget | null;
3
- export declare function useEditorUndoKeys(rootRef: RefObject<HTMLElement | null>): void;
1
+ export { useEaselKeyTarget as useEditorKeyTarget, useEaselUndoKeys as useEditorUndoKeys } from "efficient-easel/screen/lib/key-scope";
@@ -1 +1 @@
1
- "use client";import{useEffect as r,useState as s}from"react";import{bindUndoKeys as i,useEaselApi as c}from"efficient-easel/easel";import{useEditorHost as u}from"./editor-host.js";function d(e){const o=u(),[n,t]=s(null);return r(()=>t(e.current),[e]),o.ownsDocument?typeof document>"u"?null:document:n}function l(e){const o=u(),n=c(),t=d(e);r(()=>{if(!(o.ownsDocument||!t))return i(t,n)},[o,n,t])}export{d as useEditorKeyTarget,l as useEditorUndoKeys};
1
+ "use client";import{useEaselKeyTarget as a,useEaselUndoKeys as o}from"efficient-easel/screen/lib/key-scope";export{a as useEditorKeyTarget,o as useEditorUndoKeys};
@@ -1,4 +1 @@
1
- export declare function describeLoadFailure(e: unknown): string;
2
- export declare function hostLoadRefusal(e: unknown, document: {
3
- slug: string;
4
- }): string | null;
1
+ export { describeLoadFailure, hostLoadRefusal } from "efficient-easel/screen/lib/load-error";
@@ -1 +1 @@
1
- import{STATUS_UNREACHABLE as a,hostLoadRefusalOf as n,hostUnreachableMessage as r,isBackendError as i,readHostFailure as s}from"./web-backend.js";const o={unauthorized:"the editor's sign-in was refused (unauthorized).","changed-elsewhere":"the page changed while it was being opened (changed-elsewhere).","lock-taken":"somebody else holds this page (lock-taken).","not-found":"this page no longer exists (not-found).",invalid:"the backend refused the request (invalid).",unavailable:"the backend could not be reached (unavailable)."};function u(t){if(i(t))return s(t.cause)?u(t.cause):`${o[t.kind]} ${t.message}`.trim();const e=s(t);return e?e.status===a?`${r()} (no response)`:e.status===401||e.status===403?`the editor's sign-in was refused (${e.status}). Reload the console and open the editor again; if it keeps happening the bridged token is not valid for this site.`:e.status===404?"this page no longer exists (404).":e.status>=500?`the server failed (${e.status}). ${e.message}`:`the server refused the request (${e.status}). ${e.message}`:t instanceof Error?`${t.name}: ${t.message}`:String(t)}function h(t,e){return n(t,e)}export{u as describeLoadFailure,h as hostLoadRefusal};
1
+ import{describeLoadFailure as a,hostLoadRefusal as r}from"efficient-easel/screen/lib/load-error";export{a as describeLoadFailure,r as hostLoadRefusal};
@@ -1,23 +1,2 @@
1
- import { type ComponentType, type ReactNode } from "react";
2
- import type { HostPickedMedia } from "./editor-host.js";
3
- export interface MediaPickRequest {
4
- requestId: string;
5
- accept: string;
6
- title: string;
7
- file?: File | null;
8
- }
9
- export interface MediaPanelProps {
10
- pick: MediaPickRequest | null;
11
- onPick: (media: HostPickedMedia) => void;
12
- }
13
- export type MediaPanelComponent = ComponentType<MediaPanelProps>;
14
- export declare function MediaPanelProvider({ panel, children }: {
15
- panel: MediaPanelComponent | null;
16
- children: ReactNode;
17
- }): import("react").JSX.Element;
18
- export declare function useMediaPanel(): MediaPanelComponent | null;
19
- export declare function hasMediaPanel(): boolean;
20
- export declare function requestPanelPick(request: MediaPickRequest): Promise<HostPickedMedia | null>;
21
- export declare function settlePanelPick(requestId: string, media: HostPickedMedia | null): void;
22
- export declare function cancelPanelPick(): void;
23
- export declare function usePanelPick(): MediaPickRequest | null;
1
+ export { cancelPanelPick, hasMediaPanel, MediaPanelProvider, requestPanelPick, settlePanelPick, useMediaPanel, usePanelPick } from "efficient-easel/screen/lib/media-panel";
2
+ export type { MediaPanelComponent, MediaPanelProps, MediaPickRequest } from "efficient-easel/screen/lib/media-panel";