efficient-web-builder 5.4.0 → 6.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 (141) hide show
  1. package/CHANGELOG.md +272 -0
  2. package/README.md +44 -0
  3. package/dist/components/ApplyCornersToSiblings.js +1 -1
  4. package/dist/components/Banner.js +1 -1
  5. package/dist/components/BlockGapField.js +1 -1
  6. package/dist/components/BlogPostSource.js +1 -1
  7. package/dist/components/Breadcrumb.js +1 -1
  8. package/dist/components/CardShadowField.js +1 -1
  9. package/dist/components/CategoryBar.js +1 -1
  10. package/dist/components/ChatSettingsPanel.js +1 -1
  11. package/dist/components/ClearColoursDialog.js +1 -1
  12. package/dist/components/CornersField.js +1 -1
  13. package/dist/components/DocBody.js +5 -5
  14. package/dist/components/DuplicateToPageMenu.js +1 -1
  15. package/dist/components/FAQ.js +1 -1
  16. package/dist/components/Flex.js +1 -1
  17. package/dist/components/Footprint.js +3 -3
  18. package/dist/components/HeadingAudit.js +1 -1
  19. package/dist/components/HeroImageField.js +1 -1
  20. package/dist/components/HeroSection.js +2 -2
  21. package/dist/components/HeroSingle.js +1 -1
  22. package/dist/components/HeroSlide.js +1 -1
  23. package/dist/components/HoverEffectField.js +1 -1
  24. package/dist/components/ImageFocusRow.js +1 -1
  25. package/dist/components/IntegrationsSection.js +1 -1
  26. package/dist/components/IntroBleed.js +1 -1
  27. package/dist/components/KeyFeatures.js +1 -1
  28. package/dist/components/LocationsGroupedField.js +1 -1
  29. package/dist/components/MediaUploadField.js +1 -1
  30. package/dist/components/MultiSelectField.js +1 -1
  31. package/dist/components/PagesPanel.js +1 -1
  32. package/dist/components/PartInkControl.js +1 -1
  33. package/dist/components/PartResetDot.js +1 -1
  34. package/dist/components/PartSettingsPanel.js +1 -1
  35. package/dist/components/PartTextBox.js +1 -1
  36. package/dist/components/PhotographyField.js +1 -1
  37. package/dist/components/ProcessSteps.js +1 -1
  38. package/dist/components/SearchSelectField.d.ts +1 -1
  39. package/dist/components/SearchSelectField.js +1 -1
  40. package/dist/components/SectionEditor.js +1 -1
  41. package/dist/components/SectionTextEntries.js +1 -1
  42. package/dist/components/SectionThemePicker.js +1 -1
  43. package/dist/components/Series.js +1 -1
  44. package/dist/components/ShadowColourField.js +1 -1
  45. package/dist/components/SideSpaceField.js +1 -1
  46. package/dist/components/SiteFields.js +1 -1
  47. package/dist/components/SiteWidthField.js +1 -1
  48. package/dist/components/SlotChildRows.js +1 -1
  49. package/dist/components/SocialLinksPanel.js +1 -1
  50. package/dist/components/SourceStatus.js +1 -1
  51. package/dist/components/SpecStrip.js +1 -1
  52. package/dist/components/Split.js +1 -1
  53. package/dist/components/StandaloneSectionEditor.js +1 -1
  54. package/dist/components/StatsParagraph.js +1 -1
  55. package/dist/components/StorefrontLinkField.js +1 -1
  56. package/dist/components/StylesPanel.js +1 -1
  57. package/dist/components/SwitchToBoxFooter.js +1 -1
  58. package/dist/components/Testimonials.js +1 -1
  59. package/dist/components/TextStyleRow.js +1 -1
  60. package/dist/components/TextStylesField.js +1 -1
  61. package/dist/components/ThemeCard.js +1 -1
  62. package/dist/components/ThemeColourField.js +1 -1
  63. package/dist/components/ThemeField.js +1 -1
  64. package/dist/components/TickerSection.js +1 -1
  65. package/dist/components/TickerSettingsPanel.js +1 -1
  66. package/dist/components/TitleWithButtons.js +1 -1
  67. package/dist/components/WebsiteScreenParts.js +1 -1
  68. package/dist/components/WebsiteSettingsPanel.js +1 -1
  69. package/dist/components/WidthFollowField.js +1 -1
  70. package/dist/components/preview-devices.js +1 -1
  71. package/dist/components/socialIcons.js +1 -1
  72. package/dist/components/storefront-editor.css +61 -157
  73. package/dist/components/useLocationsTree.js +1 -1
  74. package/dist/components/useSocialSettings.d.ts +2 -2
  75. package/dist/lib/content/block-sources.d.ts +20 -0
  76. package/dist/lib/content/block-sources.js +1 -0
  77. package/dist/lib/content/ink.d.ts +36 -0
  78. package/dist/lib/content/ink.js +1 -0
  79. package/dist/lib/content/product-page.js +1 -1
  80. package/dist/lib/content/record-types.d.ts +21 -0
  81. package/dist/lib/content/record-types.js +1 -0
  82. package/dist/lib/content/section-surface.js +1 -1
  83. package/dist/lib/content/social-links.d.ts +1 -1
  84. package/dist/lib/content/social-links.js +1 -1
  85. package/dist/lib/editor-words-catalogue.d.ts +1184 -0
  86. package/dist/lib/editor-words-catalogue.js +11 -0
  87. package/dist/lib/editor-words.d.ts +15 -0
  88. package/dist/lib/editor-words.js +1 -0
  89. package/dist/lib/links/link-picker-setup.d.ts +1 -1
  90. package/dist/lib/links/link-picker-setup.js +1 -1
  91. package/dist/lib/links/page-link-rules.d.ts +0 -1
  92. package/dist/lib/links/page-link-rules.js +1 -1
  93. package/dist/lib/puck/ColourControl.js +1 -1
  94. package/dist/lib/puck/MarkupToolbar.js +1 -1
  95. package/dist/lib/puck/apply-card-corners.js +1 -1
  96. package/dist/lib/puck/block-source-fields.d.ts +5 -0
  97. package/dist/lib/puck/block-source-fields.js +1 -0
  98. package/dist/lib/puck/blocks/general/Breadcrumb/render.js +1 -1
  99. package/dist/lib/puck/blocks/general/Cards/render.js +1 -1
  100. package/dist/lib/puck/blocks/general/CategoryBar/render.js +1 -1
  101. package/dist/lib/puck/blocks/general/Chart/render.js +2 -2
  102. package/dist/lib/puck/blocks/general/DocBody/render.js +1 -1
  103. package/dist/lib/puck/blocks/general/DocMasthead/render.js +1 -1
  104. package/dist/lib/puck/blocks/general/DocTabs/render.js +1 -1
  105. package/dist/lib/puck/blocks/general/FAQ/render.js +1 -1
  106. package/dist/lib/puck/blocks/general/Footprint/render.js +2 -2
  107. package/dist/lib/puck/blocks/general/HeroSingle/render.js +1 -1
  108. package/dist/lib/puck/blocks/general/HeroSlide/render.js +1 -1
  109. package/dist/lib/puck/blocks/general/KeyFeatures/render.js +1 -1
  110. package/dist/lib/puck/blocks/general/Logos/render.js +1 -1
  111. package/dist/lib/puck/blocks/general/Masthead/render.js +1 -1
  112. package/dist/lib/puck/blocks/general/OrderSummary/fields.js +1 -1
  113. package/dist/lib/puck/blocks/general/OrderSummary/render.js +1 -1
  114. package/dist/lib/puck/blocks/general/PaymentBadges/render.js +1 -1
  115. package/dist/lib/puck/blocks/general/ProcessSteps/render.js +1 -1
  116. package/dist/lib/puck/blocks/general/Series/render.js +1 -1
  117. package/dist/lib/puck/blocks/general/StatsParagraph/render.js +1 -1
  118. package/dist/lib/puck/blocks/general/Testimonials/render.js +1 -1
  119. package/dist/lib/puck/blocks/general/Timeline/render.js +2 -2
  120. package/dist/lib/puck/blocks/general/TimelineTrack/render.js +1 -1
  121. package/dist/lib/puck/blocks/scaffold.js +1 -1
  122. package/dist/lib/puck/controls.d.ts +1 -1
  123. package/dist/lib/puck/controls.js +1 -1
  124. package/dist/lib/puck/editor-page-context.d.ts +1 -0
  125. package/dist/lib/puck/editor-page-context.js +1 -1
  126. package/dist/lib/puck/footer-block-row-name.js +1 -1
  127. package/dist/lib/puck/page-root-fields.d.ts +4 -1
  128. package/dist/lib/puck/page-root-fields.js +1 -1
  129. package/dist/lib/puck/registry.js +1 -1
  130. package/dist/lib/puck/theme-swatches.js +1 -1
  131. package/dist/lib/source-rules/editor-chrome-note.js +1 -1
  132. package/dist/lib/source-rules/editor-words.d.ts +26 -0
  133. package/dist/lib/source-rules/editor-words.js +3 -0
  134. package/dist/lib/source-rules/mirrored-rows-agree.js +1 -1
  135. package/dist/lib/source-rules/part-style-naming.js +1 -1
  136. package/dist/lib/source-rules/social-icons-import.js +4 -4
  137. package/dist/lib/source-rules/support/label-extraction.js +2 -2
  138. package/dist/lib/theme-save-message.js +1 -1
  139. package/package.json +7 -6
  140. package/dist/lib/image-focus.d.ts +0 -16
  141. package/dist/lib/image-focus.js +0 -1
@@ -356,7 +356,7 @@
356
356
  padding: 0;
357
357
  border: 0;
358
358
  background: none;
359
- font: 600 12.5px/1.3 var(--sf-font);
359
+ font: 600 12px/1.3 var(--sf-font);
360
360
  color: var(--sf-text);
361
361
  text-align: left;
362
362
  cursor: pointer;
@@ -366,7 +366,7 @@
366
366
  }
367
367
  .sf-addside-sitewide-desc {
368
368
  font-weight: 400;
369
- font-size: 11.5px;
369
+ font-size: 12px;
370
370
  color: var(--sf-muted);
371
371
  }
372
372
 
@@ -502,12 +502,12 @@
502
502
  color: var(--sf-on-accent);
503
503
  border-radius: var(--radius-lg);
504
504
  padding: 8px 14px;
505
- font-size: 12.5px;
505
+ font-size: 12px;
506
506
  font-weight: 600;
507
507
  box-shadow: 0 4px 12px var(--sf-accent-shadow);
508
508
  }
509
509
  .sf-addcard-plus {
510
- font-size: 15px;
510
+ font-size: 16px;
511
511
  line-height: 1;
512
512
  margin-top: -1px;
513
513
  }
@@ -518,12 +518,12 @@
518
518
  padding: 0 2px 2px;
519
519
  }
520
520
  .sf-addcard-name {
521
- font-size: 12.5px;
521
+ font-size: 12px;
522
522
  font-weight: 600;
523
523
  color: var(--sf-text);
524
524
  }
525
525
  .sf-addcard-desc {
526
- font-size: 10.5px;
526
+ font-size: 11px;
527
527
  line-height: 1.35;
528
528
  color: var(--sf-muted);
529
529
  }
@@ -553,7 +553,7 @@
553
553
  color: var(--sf-text);
554
554
  }
555
555
  .sf-addempty-sub {
556
- font-size: 12.5px;
556
+ font-size: 12px;
557
557
  }
558
558
 
559
559
  /* ── Center: device-framed preview (wraps Puck.Preview) ──────────────── */
@@ -925,7 +925,7 @@
925
925
  came to hang 6px OUTSIDE the panel at every width under 280 (measured: gap
926
926
  -6.0px at 260 and at 220, against 0.0 at the default 320). One name, read
927
927
  by the padding, by the narrow override, and by anything that undoes it. */
928
- --sf-insp-pad-x: 14px;
928
+ --sf-insp-pad-x: 16px;
929
929
  padding: 4px var(--sf-insp-pad-x) 18px;
930
930
 
931
931
  /* THE DROPDOWN ARROW, WRITTEN ONCE — card 66399.c.
@@ -946,7 +946,12 @@
946
946
  --sf-select-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>");
947
947
  }
948
948
 
949
- /* …AND THE 14 IS A DIFFERENT COST AT EACH END OF A PANEL THE MERCHANT DRAGS
949
+ /* 2026-10-13: THE WIDE PADDING IS 16, AND THE LINE 284. 14 was off the
950
+ spacing scale (Lewis 2026-10-12: 2 / 4 / 8 / 12 / 16 …) and a value off it
951
+ goes UP. The content width card 66212 protects stays 241px; at 16 each side
952
+ that needs a 285px panel, so the query below reads `< 284px`. The note that
953
+ follows is card 66212's own, written at 14.
954
+ …AND THE 14 IS A DIFFERENT COST AT EACH END OF A PANEL THE MERCHANT DRAGS
950
955
  (card 66212). One number, held at every width from 220 to 560:
951
956
 
952
957
  320px default 308 client (1px seam + 11px scrollbar) − 28 = 280 content
@@ -986,7 +991,7 @@
986
991
  and 10 has nothing to spare, and type is paid vertically as well — card 66206
987
992
  has just set the row rhythm to 16px, which shrinking type would hand straight
988
993
  back. The padding was the horizontal cost, so the padding is what moved. */
989
- @container (width < 280px) {
994
+ @container (width < 284px) {
990
995
  .sf-insp-body {
991
996
  /* The TOKEN, not `padding-inline` — so everything that reads the padding
992
997
  narrows with it, instead of only the padding itself. */
@@ -1004,7 +1009,7 @@
1004
1009
  background: var(--sf-field-bg);
1005
1010
  border-radius: var(--sf-field-radius);
1006
1011
  padding: 8px 11px;
1007
- font-size: 13px;
1012
+ font-size: 14px;
1008
1013
  color: var(--sf-field-text);
1009
1014
  font-family: var(--sf-font);
1010
1015
  }
@@ -1105,7 +1110,7 @@
1105
1110
  background-position: calc(100% - 12px) calc(50% + 3px);
1106
1111
  border-radius: var(--sf-field-radius);
1107
1112
  padding: 8px 11px;
1108
- font-size: 13px;
1113
+ font-size: 14px;
1109
1114
  color: var(--sf-field-text);
1110
1115
  cursor: pointer;
1111
1116
  }
@@ -1177,7 +1182,7 @@
1177
1182
  background: var(--sf-field-bg);
1178
1183
  border-radius: var(--sf-field-radius);
1179
1184
  padding: 8px 11px;
1180
- font-size: 13px;
1185
+ font-size: 14px;
1181
1186
  font-family: var(--sf-font);
1182
1187
  color: var(--sf-field-text);
1183
1188
  text-align: left;
@@ -1189,7 +1194,7 @@
1189
1194
  box-shadow: 0 0 0 3px var(--sf-accent-ring);
1190
1195
  }
1191
1196
  .sf-multi-caret {
1192
- font-size: 10px;
1197
+ font-size: 11px;
1193
1198
  color: var(--sf-text-secondary);
1194
1199
  flex: none;
1195
1200
  }
@@ -1391,7 +1396,7 @@
1391
1396
  border: 0;
1392
1397
  background: transparent;
1393
1398
  border-radius: max(calc(var(--sf-field-radius) - 2px), 2px);
1394
- font-size: 13px;
1399
+ font-size: 14px;
1395
1400
  font-family: var(--sf-font);
1396
1401
  color: var(--sf-field-text);
1397
1402
  text-align: left;
@@ -1541,7 +1546,7 @@
1541
1546
  border: none;
1542
1547
  background: transparent;
1543
1548
  font-family: var(--sf-font);
1544
- font-size: 13px;
1549
+ font-size: 14px;
1545
1550
  color: var(--sf-text);
1546
1551
  outline: none;
1547
1552
  }
@@ -1609,7 +1614,7 @@
1609
1614
  }
1610
1615
  .sf-page-draft {
1611
1616
  flex: none;
1612
- font-size: 10px;
1617
+ font-size: 11px;
1613
1618
  font-weight: 600;
1614
1619
  color: var(--sf-muted);
1615
1620
  text-transform: uppercase;
@@ -1692,7 +1697,7 @@
1692
1697
  background: transparent;
1693
1698
  color: var(--sf-accent-text);
1694
1699
  font-family: var(--sf-font);
1695
- font-size: 13px;
1700
+ font-size: 14px;
1696
1701
  font-weight: 600;
1697
1702
  cursor: pointer;
1698
1703
  }
@@ -2146,7 +2151,7 @@
2146
2151
  background: var(--sf-chip-bg);
2147
2152
  border-radius: var(--sf-field-radius);
2148
2153
  padding: 8px 11px;
2149
- font-size: 13px;
2154
+ font-size: 14px;
2150
2155
  color: var(--sf-text-secondary);
2151
2156
  font-family: var(--sf-font);
2152
2157
  cursor: default;
@@ -2517,7 +2522,7 @@
2517
2522
  border-radius: var(--sf-field-radius);
2518
2523
  background: var(--sf-field-bg);
2519
2524
  color: var(--sf-field-text);
2520
- font-size: 13px;
2525
+ font-size: 14px;
2521
2526
  text-align: left;
2522
2527
  cursor: pointer;
2523
2528
  }
@@ -2537,7 +2542,7 @@
2537
2542
  so it reads quieter than everything else on the row. */
2538
2543
  .sf-chooser-meta {
2539
2544
  flex: none;
2540
- font-size: 10px;
2545
+ font-size: 11px;
2541
2546
  text-transform: uppercase;
2542
2547
  letter-spacing: 0.05em;
2543
2548
  color: var(--sf-disabled);
@@ -2573,7 +2578,7 @@
2573
2578
  border: 0;
2574
2579
  background: none;
2575
2580
  text-align: left;
2576
- font-size: 13px;
2581
+ font-size: 14px;
2577
2582
  color: var(--sf-text-secondary);
2578
2583
  cursor: pointer;
2579
2584
  }
@@ -2694,7 +2699,7 @@
2694
2699
  color: var(--sf-disabled);
2695
2700
  }
2696
2701
  .sf-scale-a--lg {
2697
- font-size: 15px;
2702
+ font-size: 16px;
2698
2703
  color: var(--sf-muted);
2699
2704
  }
2700
2705
  /* The "Auto" button that clears an optional number back to the built-in. */
@@ -2879,7 +2884,7 @@
2879
2884
  glyph and it keeps its accessible name in `aria-label`. */
2880
2885
  .sf-rung--glyph {
2881
2886
  flex: 0 0 34px;
2882
- font-size: 13px;
2887
+ font-size: 14px;
2883
2888
  line-height: 18px;
2884
2889
  text-align: center;
2885
2890
  }
@@ -3058,7 +3063,7 @@
3058
3063
  .sf-theme-warn {
3059
3064
  flex: none;
3060
3065
  margin-left: auto;
3061
- font-size: 10px;
3066
+ font-size: 11px;
3062
3067
  font-weight: 700;
3063
3068
  color: var(--status-warning-soft-ink);
3064
3069
  white-space: nowrap;
@@ -3164,7 +3169,7 @@
3164
3169
  }
3165
3170
  .sf-readability-head {
3166
3171
  margin-bottom: 7px;
3167
- font-size: 10px;
3172
+ font-size: 11px;
3168
3173
  font-weight: 700;
3169
3174
  letter-spacing: 0.06em;
3170
3175
  text-transform: uppercase;
@@ -3348,7 +3353,7 @@
3348
3353
  min-width: 0;
3349
3354
  }
3350
3355
  .sf-preview-pin-label {
3351
- font-size: 13px;
3356
+ font-size: 14px;
3352
3357
  font-weight: 500;
3353
3358
  color: var(--sf-text);
3354
3359
  }
@@ -3369,7 +3374,7 @@
3369
3374
  .sf-colstep-value {
3370
3375
  min-width: 14px;
3371
3376
  text-align: center;
3372
- font-size: 13px;
3377
+ font-size: 14px;
3373
3378
  font-weight: 500;
3374
3379
  color: var(--sf-text);
3375
3380
  }
@@ -3471,11 +3476,12 @@
3471
3476
  SCOPED TO THE NARROW PANEL, on the container card 66212 already put on
3472
3477
  `.sf-panel` — the same rule, one level down: that card paid the horizontal
3473
3478
  cost out of the body's padding, and this pays the rest out of the strip's.
3474
- Above 280px nothing changes, so all 23 `segmented()` call sites and the four
3479
+ Above 284px (280 until the body's padding went 14 → 16 on 2026-10-13: one
3480
+ edge, one number) nothing changes, so all 23 `segmented()` call sites and the four
3475
3481
  panels that draw their own label rows are byte-identical at every width where
3476
3482
  they already fit. A `.sf-seg2` that is not inside a `.sf-panel` matches no
3477
3483
  container and is untouched by construction. */
3478
- @container (width < 280px) {
3484
+ @container (width < 284px) {
3479
3485
  .sf-seg2 button {
3480
3486
  padding-inline: 6px;
3481
3487
  }
@@ -3657,7 +3663,7 @@ input.sf-list-marking {
3657
3663
  }
3658
3664
  .sf-formsummary-warn {
3659
3665
  margin: 0;
3660
- font-size: 11.5px;
3666
+ font-size: 12px;
3661
3667
  line-height: 1.45;
3662
3668
  color: var(--sf-danger);
3663
3669
  }
@@ -3670,26 +3676,7 @@ input.sf-list-marking {
3670
3676
  /* THE MEDIA ROW IS efficient-easel's `ImageBox` since blueprint step 4.8
3671
3677
  (`es-pick-image-*`, efficient-easel/pick.css): the picture, its name under
3672
3678
  it, Replace and Remove. What stays here is the shop's own around it — the
3673
- button the focus row borrows, the drop's live regions, and the template's
3674
- inert slot. */
3675
- .sf-image-btn {
3676
- border: 1px solid var(--sf-btn-border);
3677
- background: var(--sf-panel);
3678
- color: var(--sf-btn-text);
3679
- border-radius: var(--radius-md);
3680
- padding: 4px 10px;
3681
- font-size: 12px;
3682
- font-weight: 500;
3683
- cursor: pointer;
3684
- transition: background 0.12s;
3685
- }
3686
- .sf-image-btn:hover:not(:disabled) {
3687
- background: var(--sf-hover);
3688
- }
3689
- .sf-image-btn:disabled {
3690
- cursor: default;
3691
- opacity: 0.55;
3692
- }
3679
+ drop's live regions and the template's inert slot. */
3693
3680
  /* Loading / error line under the slot, so a slow or failed picker round-trip is
3694
3681
  visible instead of nothing happening. */
3695
3682
  .sf-image-status {
@@ -3729,109 +3716,26 @@ ul.sf-image-status {
3729
3716
  /* ── The image FOCUS point (card 66226) ──────────────────────────────────────
3730
3717
  WHICH PART OF A BACKGROUND IMAGE SURVIVES ITS CROP, as any point on the
3731
3718
  picture rather than as one of nine. The `Image focus` row opens (the shared
3732
- .sf-style-head grammar, see components/ImageFocusRow.tsx), shows the whole
3733
- photograph, and a press or an arrow key puts the point where the merchant
3734
- wants it. The stored value is the same CSS `object-position` string it has
3735
- always been.
3719
+ .sf-style-head grammar, see components/ImageFocusRow.tsx) onto
3720
+ efficient-shell's `ImageFocusPoint`, which draws the whole photograph, the
3721
+ dot and its crosshair with the kit's own classes (efficient-shell#375); no
3722
+ rule here styles it.
3736
3723
 
3737
3724
  ⚠️ THE MEDIA ROW'S OWN FRAME IS NOT RESTYLED, EVER. `.es-pick-image-frame`
3738
3725
  stays `cover` because that is what the PAGE will look like, and that
3739
- is its job. This block is a second frame, on screen only while a merchant is
3740
- actually setting the point, because a `cover` view cannot express a point it
3741
- has already cropped away. */
3742
- .sf-focus {
3743
- display: flex;
3744
- flex-direction: column;
3745
- gap: 6px;
3746
- }
3747
- /* THE PHOTOGRAPH IS A REAL <button>, not a div wearing a tabIndex. What this
3748
- card replaced is a `role="radiogroup"` a keyboard could already drive, so the
3749
- successor has to earn its place in the tab order the same way. `touch-action`
3750
- is off so a drag on a phone moves the point instead of scrolling the panel. */
3751
- .sf-focus-canvas {
3752
- display: flex;
3753
- align-items: center;
3754
- justify-content: center;
3755
- min-height: 150px;
3756
- padding: 0;
3757
- border: 1px solid var(--sf-line);
3758
- border-radius: var(--radius-md);
3759
- background: var(--sf-preview-bg);
3760
- cursor: crosshair;
3761
- touch-action: none;
3762
- }
3763
- .sf-focus-canvas:focus-visible {
3764
- outline: 2px solid var(--sf-accent);
3765
- outline-offset: 1px;
3766
- }
3767
- /* Shrink-wraps the picture. The marker and crosshairs are positioned against
3768
- THIS and not against the canvas, because a whole photograph in a fixed-height
3769
- box is letterboxed — measuring against the box would land the marker on a
3770
- different pixel for every aspect ratio, and the merchant would watch the dot
3771
- drift away from where they pressed. */
3772
- .sf-focus-pane {
3773
- position: relative;
3774
- display: inline-block;
3775
- max-width: 100%;
3776
- line-height: 0;
3777
- }
3778
- .sf-focus-img {
3779
- display: block;
3780
- width: auto;
3781
- height: auto;
3782
- max-width: 100%;
3783
- max-height: 150px;
3784
- object-fit: contain;
3785
- }
3786
- .sf-focus-cross {
3787
- position: absolute;
3788
- background: color-mix(in srgb, var(--status-on-solid) 45%, transparent);
3789
- pointer-events: none;
3790
- }
3791
- .sf-focus-cross--h {
3792
- right: 0;
3793
- left: 0;
3794
- height: 1px;
3795
- }
3796
- .sf-focus-cross--v {
3797
- top: 0;
3798
- bottom: 0;
3799
- width: 1px;
3800
- }
3801
- /* Drawn in white with a dark ring rather than in a panel token: it sits on a
3802
- merchant's own photograph, which can be any colour, and a token that read
3803
- correctly against the panel would vanish against half of them. White and the
3804
- ring are the shell's own on-media pair (`--status-on-solid`, the media
3805
- scrim), which do not change with the theme for the same reason. */
3806
- .sf-focus-marker {
3807
- position: absolute;
3808
- width: 18px;
3809
- height: 18px;
3810
- border: 2px solid var(--status-on-solid);
3811
- border-radius: 50%;
3812
- box-shadow: 0 0 0 1.5px var(--rosh-media-scrim-button), 0 1px 5px var(--rosh-media-scrim-button);
3813
- transform: translate(-50%, -50%);
3814
- pointer-events: none;
3815
- }
3816
- .sf-focus-bar {
3817
- display: flex;
3818
- align-items: center;
3819
- gap: 8px;
3820
- }
3821
- .sf-focus-hint {
3822
- min-width: 0;
3823
- flex: 1;
3824
- font-size: 11px;
3825
- color: var(--sf-muted);
3826
- }
3827
- /* THE PHOTOGRAPH IS NEVER ON SCREEN TWICE. The 96px crop belongs to the
3828
- Background image field and this row belongs to `imageFocal` — two sibling
3829
- Puck fields, which cannot reach each other from React — so the crop stands
3830
- down for as long as a focus session is open, and comes back the moment it
3831
- closes. The `:has()` on Puck's own field wrapper is this stylesheet's
3832
- established idiom for exactly that problem (see the `[data-sf-bucket]` and
3833
- `[data-sf-no-control]` rules above). */
3834
- .es-insp-rows:has([data-sf-focusing]) .es-pick-image-frame {
3726
+ is its job. The focus part is a second frame, on screen only while a
3727
+ merchant is actually setting the point, because a `cover` view cannot
3728
+ express a point it has already cropped away.
3729
+
3730
+ THE PHOTOGRAPH IS NEVER ON SCREEN TWICE. The 96px crop belongs to the
3731
+ Background image field and the focus row belongs to `imageFocal` — two
3732
+ sibling Puck fields, which cannot reach each other from React — so the crop
3733
+ stands down for as long as the part is open (its root carries
3734
+ `data-image-focus`), and comes back the moment it closes. The `:has()` on
3735
+ Puck's own field wrapper is this stylesheet's established idiom for exactly
3736
+ that problem (see the `[data-sf-bucket]` and `[data-sf-no-control]` rules
3737
+ above). */
3738
+ .es-insp-rows:has([data-image-focus]) .es-pick-image-frame {
3835
3739
  display: none;
3836
3740
  }
3837
3741
 
@@ -3859,7 +3763,7 @@ ul.sf-image-status {
3859
3763
  same six classes wearing one name. */
3860
3764
  .sf-note {
3861
3765
  padding: 14px 16px;
3862
- font-size: 13px;
3766
+ font-size: 14px;
3863
3767
  line-height: 1.5;
3864
3768
  color: var(--sf-muted);
3865
3769
  }
@@ -4044,7 +3948,7 @@ ul.sf-image-status {
4044
3948
  background: none;
4045
3949
  text-align: left;
4046
3950
  /* E6 — a field label is never smaller than 12px, and an option is a label. */
4047
- font-size: 13px;
3951
+ font-size: 14px;
4048
3952
  color: var(--sf-field-text);
4049
3953
  border-radius: max(calc(var(--sf-field-radius) - 2px), 2px);
4050
3954
  cursor: pointer;
@@ -4121,7 +4025,7 @@ ul.sf-image-status {
4121
4025
  it read at 13px and wrapped, taking "Edit style" over two lines with it. So
4122
4026
  it keeps its look exactly and takes an honest name. */
4123
4027
  .sf-part-style-state {
4124
- font-size: 11.5px;
4028
+ font-size: 12px;
4125
4029
  color: var(--sf-text-secondary);
4126
4030
  }
4127
4031
  /* The override count. A chip rather than plain text because it is a NUMBER a
@@ -4133,7 +4037,7 @@ ul.sf-image-status {
4133
4037
  padding: 2px 9px;
4134
4038
  background: var(--sf-accent-tint);
4135
4039
  color: var(--sf-accent-text);
4136
- font-size: 10.5px;
4040
+ font-size: 11px;
4137
4041
  font-weight: 700;
4138
4042
  font-variant-numeric: tabular-nums;
4139
4043
  }
@@ -4407,7 +4311,7 @@ ul.sf-image-status {
4407
4311
  background: var(--sf-field-bg);
4408
4312
  border-radius: 999px;
4409
4313
  padding: 4px 11px;
4410
- font-size: 11.5px;
4314
+ font-size: 12px;
4411
4315
  font-weight: 600;
4412
4316
  color: var(--sf-icon);
4413
4317
  cursor: pointer;
@@ -4530,7 +4434,7 @@ ul.sf-image-status {
4530
4434
 
4531
4435
  /* How many the filter left. Without it an empty-looking strip is a mystery. */
4532
4436
  .sf-gallery-count {
4533
- font-size: 10.5px;
4437
+ font-size: 11px;
4534
4438
  color: var(--sf-disabled);
4535
4439
  margin-top: 7px;
4536
4440
  }
@@ -1 +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
+ "use client";import{jsx as t,jsxs as d,Fragment as ke}from"react/jsx-runtime";import{Fragment as Q,useEffect as V,useRef as G}from"react";import{useTreeDrag as X}from"efficient-easel/drag";import{ImageIcon as me,TextLinesIcon as ve,TrashIcon as Z}from"efficient-easel/icons";import{Subtree as b,TreeRow as I,TreeRowAction as ee,TreeSeam as oe}from"efficient-easel/tree";import{useEaselStrings as xe}from"efficient-easel/strings";import{decodeLocationPartId as fe,encodeLocationPartId as he,usePreviewLocationPart as Le}from"./PreviewLocationPartContext.js";import{PUCK_MODE as we}from"./SectionEditor.js";import{say as g,sayCount as Ie}from"../lib/editor-words.js";import{useLocationsFocus as Pe,setLocationsFocus as p}from"../lib/puck/locations-focus.js";import{bucketsOf as ne,moveGroup as te,moveCity as re,addCity as Ce,addGroup as Se,deleteGroup as $e,deleteCity as Te,absCityIndex as ce,groupLabelOf as De,cardKey as se}from"../lib/puck/locations-tree.js";const le="ContactLocations";function Me({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 Fe({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 Oe({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 T=c=>({parentId:`locations-${c}`,slot:"groups"}),j=(c,k)=>({parentId:`locations-${c}`,slot:`cities:${k}`});function He(c,k){const{readOnly:P,selected:C}=k,f=xe().tree,v=k.data?.content??[],ie=c.kind===we.kind,D=G(null);V(()=>{const o=C?.type===le?String(C.props.id):null;o&&o!==D.current&&p({level:"groups"}),D.current=o},[C?.props.id]);const{selectedLocationPartId:ae,setSelectedLocationPartId:A,setSelectHandler:N}=Le(),s=Pe(),y=(o,e)=>{const r=v[o];r&&k.replace(o,{type:r.type,props:{...r.props,locations:e}})},h=o=>{const e=v[o]?.props?.locations;return Array.isArray(e)?e:[]},R=X({keyOf:o=>`group:${o.si}:${o.index}`,readOnly:!!P,canDrop:(o,e)=>e.parentId===T(o.si).parentId&&e.slot==="groups",onDrop:(o,e)=>{y(o.si,te(h(o.si),o.index,e.index)),s.level==="city"&&p({level:"groups"})},onStep:(o,e)=>{y(o.si,te(h(o.si),o.index,e<0?o.index-1:o.index+2)),s.level==="city"&&p({level:"groups"})}}),M=X({keyOf:o=>`city:${o.si}:${o.group}:${o.index}`,readOnly:!!P,canDrop:(o,e)=>e.parentId===T(o.si).parentId&&e.slot.startsWith("cities:"),onDrop:(o,e)=>{const r=e.slot.slice(7);y(o.si,re(h(o.si),o.group,o.index,r,e.index)),p({level:"group",key:r})},onStep:(o,e)=>{y(o.si,re(h(o.si),o.group,o.index,o.group,e<0?o.index-1:o.index+2)),s.level==="city"&&p({level:"group",key:o.group})}}),z=G(v);z.current=v;const _=G(()=>{});V(()=>{N(o=>{const e=fe(o);if(!e)return;const r=z.current.findIndex(S=>S.props?.id===e.nodeId);r<0||_.current(r,{level:e.part,index:e.index})})},[N]);const l=(o,e)=>{D.current=v[o]?.props?.id??null,k.select(o),p(e),c.reveal();const r=v[o]?.props?.id;typeof r=="string"&&(e.level==="image"||e.level==="map")?A(he(r,e.index,e.level)):A(null),typeof r=="string"&&k.scrollTo(r)};return _.current=l,{renderLocationTree:(o,e,{rowClick:r,isCollapsed:S,toggleCollapse:B})=>{const x=h(e),de=ne(x),L=String(o.props.id),w=ie&&C?.props.id===L,E=n=>t(oe,{...P?{}:R.seam({place:{...T(e),index:n}})},`seam:${L}:groups:${n}`),W=(n,u)=>t(oe,{...P?{}:M.seam({place:{...j(e,n),index:u}})},`seam:${L}:cities:${n}:${u}`);return d(ke,{children:[t(I,{icon:t(ve,{size:13}),name:g("Texts"),words:f,onSelect:()=>l(e,{level:"texts"}),selected:w&&s.level==="texts",rowProps:{onClick:r(()=>l(e,{level:"texts"}))}}),de.map((n,u)=>{const F=`${L}::grp::${n.key}`,K=S(F),pe=w&&s.level==="group"&&s.key===n.key,U=n.name||n.key?De(n.key,n.name):g("Ungrouped"),H={...j(e,n.key),index:n.cards.length},Y=M.row({item:{si:e,group:n.key,index:-1},place:H,into:H,canDrag:!1},{onClick:r(()=>l(e,{level:"group",key:n.key}))}),$=R.row({item:{si:e,index:u},place:{...T(e),index:u}},Y.rowProps);return d(Q,{children:[u===0&&E(0),t(I,{icon:t(Me,{size:13}),name:U,words:f,onSelect:()=>l(e,{level:"group",key:n.key}),selected:pe,draggable:$.draggable,dragging:$.dragging,drop:$.drop??Y.drop,fold:{open:!K,label:g("group"),onToggle:()=>B(F)},actions:t(ee,{kind:"delete",label:Ie("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",n.cards.length,{label:U}),onClick:()=>{y(e,$e(x,n.key)),p({level:"groups"})},children:t(Z,{size:15})}),rowProps:$.rowProps,children:t("span",{className:"es-group-count",children:n.cards.length})}),!K&&d(b,{children:[n.cards.map((m,a)=>{const i=ce(x,n.key,a),ue=w&&s.level==="city"&&s.index===i,O=String(m?.name??"")||g("City"),q=`${L}::city::${se(m)}`,J=S(q),{rowProps:ge,...ye}=M.row({item:{si:e,group:n.key,index:a},place:{...j(e,n.key),index:a}},{onClick:r(()=>l(e,{level:"city",index:i}))});return d(Q,{children:[a===0&&W(n.key,0),t(I,{icon:t(Fe,{size:13}),name:O,words:f,onSelect:()=>l(e,{level:"city",index:i}),selected:ue,...ye,fold:{open:!J,label:O,onToggle:()=>B(q)},actions:t(ee,{kind:"delete",label:g("Delete {name}",{name:O}),onClick:()=>{y(e,Te(x,n.key,a)),p({level:"group",key:n.key})},children:t(Z,{size:15})}),rowProps:ge}),!J&&d(b,{children:[t(I,{icon:t(me,{size:13}),name:g("Image"),words:f,onSelect:()=>l(e,{level:"image",index:i}),selected:w&&s.level==="image"&&s.index===i,rowProps:{onClick:r(()=>l(e,{level:"image",index:i}))}}),t(I,{icon:t(Oe,{size:13}),name:g("Map"),words:f,onSelect:()=>l(e,{level:"map",index:i}),selected:w&&s.level==="map"&&s.index===i,rowProps:{onClick:r(()=>l(e,{level:"map",index:i}))}})]}),W(n.key,a+1)]},se(m))}),d("button",{type:"button",className:"sf-add-card",onClick:()=>{const m=Ce(x,n.key);y(e,m);const a=ne(m).find(i=>i.key===n.key);p(a&&a.cards.length?{level:"city",index:ce(m,n.key,a.cards.length-1)}:{level:"group",key:n.key})},children:[t("span",{className:"sf-plus sf-plus--sm",children:"+"}),g("Add city")]})]}),E(u+1)]},F)}),d("button",{type:"button",className:"sf-add-card",onClick:()=>{const{cards:n,key:u}=Se(x);y(e,n),l(e,{level:"group",key:u})},children:[t("span",{className:"sf-plus sf-plus--sm",children:"+"}),g("Add group")]})]})},sectionPressed:o=>{o?.type===le&&p({level:"groups"})}}}export{le as LOCATIONS_TYPE,He as useLocationsTree};
@@ -7,8 +7,8 @@ export declare function useSocialSettings({ token, siteId, enabled, }: {
7
7
  siteId: string | null;
8
8
  enabled: boolean;
9
9
  }): {
10
- links: Partial<Record<"facebook" | "instagram" | "pinterest" | "tiktok" | "whatsapp" | "youtube" | "x" | "linkedin", string>>;
11
- rows: Record<"facebook" | "instagram" | "pinterest" | "tiktok" | "whatsapp" | "youtube" | "x" | "linkedin", SocialRowState>;
10
+ links: Partial<Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "x" | "linkedin" | "line" | "wechat", string>>;
11
+ rows: Record<"facebook" | "instagram" | "pinterest" | "telegram" | "tiktok" | "whatsapp" | "youtube" | "x" | "linkedin" | "line" | "wechat", SocialRowState>;
12
12
  canSave: boolean;
13
13
  saveLink: (platform: SocialPlatform, value: string) => Promise<SocialSaveOutcome>;
14
14
  };
@@ -0,0 +1,20 @@
1
+ export declare const BLOCK_SOURCE_PROP = "dataSource";
2
+ export declare const BLOCK_SOURCE_OPTIONS_PROP = "dataSourceOptions";
3
+ export declare const BLOCK_SOURCE_ROWS_PROP = "dataRows";
4
+ export type SourceRow = Readonly<Record<string, string>>;
5
+ export interface BlockSourceSpec {
6
+ key: string;
7
+ label: string;
8
+ blocks: readonly string[];
9
+ sample?: readonly SourceRow[];
10
+ }
11
+ export declare function registerBlockSources(sources: readonly BlockSourceSpec[]): void;
12
+ export declare function blockSources(block?: string): readonly BlockSourceSpec[];
13
+ export declare function blockSourceSpec(key: string): BlockSourceSpec | null;
14
+ export declare function blockSourcesRevision(): number;
15
+ export declare function declaredBlockSource(props?: Record<string, unknown> | null): string;
16
+ export declare function servedRows(props?: Record<string, unknown> | null): readonly SourceRow[] | null;
17
+ export declare function sourcedRows(props: Record<string, unknown> | null | undefined, editing: boolean, fallback?: readonly SourceRow[]): {
18
+ rows: readonly SourceRow[];
19
+ sample: boolean;
20
+ };
@@ -0,0 +1 @@
1
+ const c="dataSource",b="dataSourceOptions",i="dataRows",a=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,f=Symbol.for("efficient.block-sources");function n(){const e=globalThis;return e[f]??={sources:new Map,revision:0}}function u(e){if(typeof e.key!="string"||!a.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>l(t)).filter(t=>t!==null)}:{}}}function O(e){const t=e.map(u),o=n();for(const r of t)o.sources.set(r.key,r);t.length&&(o.revision+=1)}function d(e){const t=[...n().sources.values()];return e===void 0?t:t.filter(o=>o.blocks.includes(e))}function p(e){return n().sources.get(e)??null}function m(){return n().revision}function k(e){const t=e?.[c];return typeof t=="string"?t.trim():""}function l(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t={};for(const[o,r]of Object.entries(e))typeof r=="string"&&r&&(t[o]=r);return Object.keys(t).length?t:null}function y(e){const t=e?.[i];return Array.isArray(t)?t.map(l).filter(o=>o!==null):null}function S(e,t,o=[]){const r=y(e);if(r!==null&&(r.length||!t))return{rows:r,sample:!1};if(!t)return{rows:[],sample:!1};const s=p(k(e))?.sample;return{rows:s?.length?s:o,sample:!0}}export{b as BLOCK_SOURCE_OPTIONS_PROP,c as BLOCK_SOURCE_PROP,i as BLOCK_SOURCE_ROWS_PROP,p as blockSourceSpec,d as blockSources,m as blockSourcesRevision,k as declaredBlockSource,O as registerBlockSources,y as servedRows,S as sourcedRows};
@@ -0,0 +1,36 @@
1
+ export declare const SECTION_PALETTE: readonly [{
2
+ readonly role: "bg";
3
+ readonly token: "--bg";
4
+ readonly ink: false;
5
+ }, {
6
+ readonly role: "fg";
7
+ readonly token: "--fg";
8
+ readonly ink: true;
9
+ }, {
10
+ readonly role: "surface";
11
+ readonly token: "--site-surface";
12
+ readonly ink: false;
13
+ }, {
14
+ readonly role: "surface-2";
15
+ readonly token: "--site-surface-2";
16
+ readonly ink: false;
17
+ }, {
18
+ readonly role: "line";
19
+ readonly token: "--site-line";
20
+ readonly ink: true;
21
+ }, {
22
+ readonly role: "muted";
23
+ readonly token: "--fg-dim";
24
+ readonly ink: true;
25
+ }];
26
+ type PaletteEntry = (typeof SECTION_PALETTE)[number];
27
+ type InkEntry = Extract<PaletteEntry, {
28
+ ink: true;
29
+ }>;
30
+ export declare const INK: readonly InkEntry[];
31
+ export type InkRole = InkEntry["role"];
32
+ export type InkSource = Readonly<Record<InkRole, string>>;
33
+ export declare function inkStyle(source: InkSource): Record<string, string>;
34
+ export declare const ON_MEDIA_INK: InkSource;
35
+ export declare const ON_MEDIA_INK_STYLE: Readonly<Record<string, string>>;
36
+ export {};
@@ -0,0 +1 @@
1
+ const n=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],l=n.filter(e=>e.ink);function i(e){const r={color:e.fg};for(const{role:o,token:t}of l)r[t]=e[o];return r}const f={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},s=Object.freeze(i(f));export{l as INK,f as ON_MEDIA_INK,s as ON_MEDIA_INK_STYLE,n as SECTION_PALETTE,i as inkStyle};
@@ -1 +1 @@
1
- const o="product",r="tyre",c=[o,r];function d(t){return c.includes(t)}const u="productType",l={[o]:"alloy-wheel",[r]:"tyre"},p=["alloy-wheel","tyre"];function P(t,e){return n(e)??l[t]??null}function n(t){const e=t?.[u];return typeof e=="string"&&p.includes(e)?e:null}function i(t){const e=t?.root;return n(e?.props)}function s(t,e){return P(t,e)!==null}const T="dynamic";export{T as DYNAMIC_PRODUCT_PROP,c as DYNAMIC_TEMPLATE_SLUGS,o as PRODUCT_PAGE_SLUG,u as TEMPLATE_PRODUCT_TYPE_PROP,r as TYRE_PAGE_SLUG,n as declaredTemplateProductKind,d as isDynamicTemplateSlug,s as isProductTemplatePage,i as layoutDeclaredProductKind,P as templateProductKind};
1
+ import{drawsProduct as r}from"./record-types.js";const n="product",o="tyre",c=[n,o];function a(t){return c.includes(t)}const l="productType",d={[n]:"alloy-wheel",[o]:"tyre"},i=["alloy-wheel","tyre"];function p(t,e){return r(e)?u(e)??d[t]??null:null}function u(t){if(!r(t))return null;const e=t?.[l];return typeof e=="string"&&i.includes(e)?e:null}function s(t){const e=t?.root;return u(e?.props)}function T(t,e){return p(t,e)!==null}const _="dynamic";export{_ as DYNAMIC_PRODUCT_PROP,c as DYNAMIC_TEMPLATE_SLUGS,n as PRODUCT_PAGE_SLUG,l as TEMPLATE_PRODUCT_TYPE_PROP,o as TYRE_PAGE_SLUG,u as declaredTemplateProductKind,a as isDynamicTemplateSlug,T as isProductTemplatePage,s as layoutDeclaredProductKind,p as templateProductKind};
@@ -0,0 +1,21 @@
1
+ export declare const PRODUCT_RECORD_TYPE = "product";
2
+ export declare const TEMPLATE_RECORD_TYPE_PROP = "recordType";
3
+ export type RecordFieldKind = "text" | "date";
4
+ export interface RecordFieldSpec {
5
+ key: string;
6
+ label: string;
7
+ kind: RecordFieldKind;
8
+ }
9
+ export interface RecordTypeSpec {
10
+ key: string;
11
+ label: string;
12
+ fields: readonly RecordFieldSpec[];
13
+ }
14
+ export declare function registerRecordTypes(types: readonly RecordTypeSpec[]): void;
15
+ export declare function recordTypes(): readonly RecordTypeSpec[];
16
+ export declare function recordTypeSpec(key: string): RecordTypeSpec | null;
17
+ export declare function recordTypesRevision(): number;
18
+ export declare function declaredRecordType(rootProps?: Record<string, unknown> | null): string;
19
+ export declare function layoutRecordType(layout: unknown): string;
20
+ export declare function drawsProduct(rootProps?: Record<string, unknown> | null): boolean;
21
+ export declare function recordFields(key: string, kinds?: readonly RecordFieldKind[]): readonly RecordFieldSpec[];
@@ -0,0 +1 @@
1
+ const t="product",f="recordType",i={key:t,label:"Product",fields:[]},l=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,a=/^[a-z][A-Za-z0-9]*$/,u=["text","date"],n=new Map;let s=0;function y(e){if(typeof e.key!="string"||!l.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===t)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);const o=new Set;for(const r of e.fields){if(typeof r.key!="string"||!a.test(r.key)||o.has(r.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(r.key)}.`);if(!u.includes(r.kind))throw new Error(`The field ${r.key} of ${e.key} has no kind ${JSON.stringify(r.kind)}.`);o.add(r.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(r=>({...r}))}}function k(e){const o=e.map(y);for(const r of o)n.set(r.key,r);o.length&&(s+=1)}function h(){return[i,...n.values()]}function p(e){return e===t?i:n.get(e)??null}function T(){return s}function c(e){const o=e?.[f];return typeof o!="string"?t:o.trim()||t}function w(e){const o=e?.root;return c(o&&typeof o=="object"?o.props:null)}function E(e){return c(e)===t}function x(e,o){const r=p(e)?.fields??[];return o?r.filter(d=>o.includes(d.kind)):r}export{t as PRODUCT_RECORD_TYPE,f as TEMPLATE_RECORD_TYPE_PROP,c as declaredRecordType,E as drawsProduct,w as layoutRecordType,x as recordFields,p as recordTypeSpec,h as recordTypes,T as recordTypesRevision,k as registerRecordTypes};
@@ -1 +1 @@
1
- const a=-1,c="sf-section-accent",o="Color",E=new Set(["CategoryBar","DocTabs"]),f=new Set(["Flex"]),n=0;function r(e){return e===-1?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:n}function u(e){return e??-1}function s(e){const t=`--theme-preset-${e}`;return{"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`,"--sf-sec-bg":`var(${t}-bg, var(--theme-bg))`,"--sf-sec-fg":`var(${t}-fg, var(--theme-fg))`,"--sf-sec-surface":`var(${t}-surface, var(--theme-surface))`,"--sf-sec-surface-2":`var(${t}-surface-2, var(--theme-surface-2))`,"--sf-sec-line":`var(${t}-line, var(--theme-line))`,"--sf-sec-muted":`var(${t}-muted, var(--theme-muted))`}}function T(e){const t=r(e.sectionAccent);return t===null?null:{className:c,style:s(t)}}export{c as SECTION_ACCENT_CLASS,n as SECTION_ACCENT_DEFAULT,a as SECTION_ACCENT_INHERIT,E as SECTION_THEME_EXCLUDED,o as SECTION_THEME_GROUP_LABEL,f as SECTION_THEME_NESTED_READING,u as nestedAccentValue,r as resolveSectionAccent,s as sectionAccentVars,T as sectionThemeWrap};
1
+ import{SECTION_PALETTE as o}from"./ink.js";const r=-1,s="sf-section-accent",C="Color",f=new Set(["CategoryBar","DocTabs"]),i=new Set(["Flex"]),E=0;function a(e){return e===r?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:E}function l(e){return e??r}function T(e){const t=`--theme-preset-${e}`,c={"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`};for(const{role:n}of o)c[`--sf-sec-${n}`]=`var(${t}-${n}, var(--theme-${n}))`;return c}function p(e){const t=a(e.sectionAccent);return t===null?null:{className:s,style:T(t)}}export{s as SECTION_ACCENT_CLASS,E as SECTION_ACCENT_DEFAULT,r as SECTION_ACCENT_INHERIT,f as SECTION_THEME_EXCLUDED,C as SECTION_THEME_GROUP_LABEL,i as SECTION_THEME_NESTED_READING,l as nestedAccentValue,a as resolveSectionAccent,T as sectionAccentVars,p as sectionThemeWrap};
@@ -1,4 +1,4 @@
1
- export declare const SOCIAL_PLATFORMS: readonly ["instagram", "facebook", "tiktok", "youtube", "x", "linkedin", "pinterest", "whatsapp"];
1
+ export declare const SOCIAL_PLATFORMS: readonly ["instagram", "facebook", "tiktok", "youtube", "x", "linkedin", "pinterest", "whatsapp", "telegram", "line", "wechat"];
2
2
  export type SocialPlatform = (typeof SOCIAL_PLATFORMS)[number];
3
3
  export declare const SOCIAL_PLATFORM_LABELS: Record<SocialPlatform, string>;
4
4
  export type SocialLinks = Partial<Record<SocialPlatform, string>>;