@drawnagency/primitives 0.1.55 → 0.1.57

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 (173) hide show
  1. package/dist/auth/cookies.d.ts.map +1 -1
  2. package/dist/auth/index.js +1 -1
  3. package/dist/{chunk-24SUF2BC.js → chunk-ICLXLWQ5.js} +13 -74
  4. package/dist/chunk-NSCT3AMV.js +32 -0
  5. package/dist/{chunk-KDGYHU36.js → chunk-PRKUXM7E.js} +35 -10
  6. package/dist/{chunk-PUNXQK4M.js → chunk-PYWS3MOJ.js} +12 -2
  7. package/dist/chunk-TG43X7JO.js +123 -0
  8. package/dist/chunk-VKAGMEKE.js +90 -0
  9. package/dist/{chunk-B5VYSTPB.js → chunk-XTK4BR27.js} +1 -1
  10. package/dist/components/editor/ChildBlockWrapper.d.ts +19 -0
  11. package/dist/components/editor/ChildBlockWrapper.d.ts.map +1 -0
  12. package/dist/components/editor/ColSpanControl.d.ts +9 -0
  13. package/dist/components/editor/ColSpanControl.d.ts.map +1 -0
  14. package/dist/components/editor/SectionWrapper.d.ts +1 -1
  15. package/dist/components/editor/SectionWrapper.d.ts.map +1 -1
  16. package/dist/components/editor/SettingsForm.d.ts +5 -1
  17. package/dist/components/editor/SettingsForm.d.ts.map +1 -1
  18. package/dist/components/primitives/EditableGrid.d.ts.map +1 -1
  19. package/dist/components/primitives/IconPicker.d.ts +7 -1
  20. package/dist/components/primitives/IconPicker.d.ts.map +1 -1
  21. package/dist/components/sections/Container/Container.d.ts +20 -0
  22. package/dist/components/sections/Container/Container.d.ts.map +1 -0
  23. package/dist/components/sections/Container/ContainerSettingsForm.d.ts +17 -0
  24. package/dist/components/sections/Container/ContainerSettingsForm.d.ts.map +1 -0
  25. package/dist/components/sections/Container/index.d.ts +11 -0
  26. package/dist/components/sections/Container/index.d.ts.map +1 -0
  27. package/dist/components/sections/IconList/IconList.d.ts +1 -0
  28. package/dist/components/sections/IconList/IconList.d.ts.map +1 -1
  29. package/dist/components/sections/IconList/IconListSettings.d.ts +3 -4
  30. package/dist/components/sections/IconList/IconListSettings.d.ts.map +1 -1
  31. package/dist/components/sections/IconList/index.d.ts +1 -0
  32. package/dist/components/sections/IconList/index.d.ts.map +1 -1
  33. package/dist/components/sections/Media/MediaBlock.d.ts +19 -0
  34. package/dist/components/sections/Media/MediaBlock.d.ts.map +1 -0
  35. package/dist/components/sections/{MediaGrid → Media}/index.d.ts +15 -25
  36. package/dist/components/sections/Media/index.d.ts.map +1 -0
  37. package/dist/components/sections/Prose/index.d.ts.map +1 -1
  38. package/dist/components/sections/Spacer/Spacer.d.ts +2 -0
  39. package/dist/components/sections/Spacer/Spacer.d.ts.map +1 -0
  40. package/dist/components/sections/Spacer/index.d.ts +6 -0
  41. package/dist/components/sections/Spacer/index.d.ts.map +1 -0
  42. package/dist/components/sections/all-sections.d.ts +140 -0
  43. package/dist/components/sections/all-sections.d.ts.map +1 -0
  44. package/dist/components/sections/register-schemas.d.ts.map +1 -1
  45. package/dist/components/sections/register.d.ts.map +1 -1
  46. package/dist/components/shared/Tabs.d.ts +24 -0
  47. package/dist/components/shared/Tabs.d.ts.map +1 -0
  48. package/dist/components/shell/EditorShell.d.ts +2 -1
  49. package/dist/components/shell/EditorShell.d.ts.map +1 -1
  50. package/dist/components/shell/SiteSettingsModal.d.ts.map +1 -1
  51. package/dist/components/shell/blockMoveDispatch.d.ts +21 -0
  52. package/dist/components/shell/blockMoveDispatch.d.ts.map +1 -0
  53. package/dist/hooks/useBlockDnd.d.ts +48 -0
  54. package/dist/hooks/useBlockDnd.d.ts.map +1 -0
  55. package/dist/hooks/useEditorPublish.d.ts +2 -1
  56. package/dist/hooks/useEditorPublish.d.ts.map +1 -1
  57. package/dist/index.js +69 -48
  58. package/dist/lib/block-dnd.d.ts +42 -0
  59. package/dist/lib/block-dnd.d.ts.map +1 -0
  60. package/dist/lib/block-move.d.ts +31 -0
  61. package/dist/lib/block-move.d.ts.map +1 -0
  62. package/dist/lib/container-grid.d.ts +29 -0
  63. package/dist/lib/container-grid.d.ts.map +1 -0
  64. package/dist/lib/container-ops.d.ts +44 -0
  65. package/dist/lib/container-ops.d.ts.map +1 -0
  66. package/dist/lib/dexie.d.ts +12 -1
  67. package/dist/lib/dexie.d.ts.map +1 -1
  68. package/dist/lib/dexie.js +28 -3
  69. package/dist/lib/index.js +10 -7
  70. package/dist/lib/loader.d.ts.map +1 -1
  71. package/dist/lib/migrate-sections-transform.d.ts +12 -0
  72. package/dist/lib/migrate-sections-transform.d.ts.map +1 -0
  73. package/dist/lib/migrate-sections-transform.js +6 -0
  74. package/dist/lib/registry.d.ts +39 -2
  75. package/dist/lib/registry.d.ts.map +1 -1
  76. package/dist/lib/registry.js +26 -0
  77. package/dist/lib/sanitize.d.ts.map +1 -1
  78. package/dist/schemas/block.d.ts +20 -0
  79. package/dist/schemas/block.d.ts.map +1 -0
  80. package/dist/schemas/block.js +14 -0
  81. package/dist/schemas/index.js +10 -2
  82. package/dist/schemas/link.d.ts +7 -0
  83. package/dist/schemas/link.d.ts.map +1 -1
  84. package/dist/schemas/rich-text.d.ts +9 -0
  85. package/dist/schemas/rich-text.d.ts.map +1 -0
  86. package/dist/schemas/sections.d.ts +2 -0
  87. package/dist/schemas/sections.d.ts.map +1 -1
  88. package/dist/schemas/shared.d.ts +31 -0
  89. package/dist/schemas/shared.d.ts.map +1 -1
  90. package/dist/storage/index.d.ts +1 -0
  91. package/dist/storage/index.d.ts.map +1 -1
  92. package/dist/storage/types.d.ts +13 -1
  93. package/dist/storage/types.d.ts.map +1 -1
  94. package/package.json +13 -1
  95. package/src/auth/cookies.ts +6 -1
  96. package/src/components/brandguide/Colors.tsx +35 -33
  97. package/src/components/editor/ChildBlockWrapper.tsx +108 -0
  98. package/src/components/editor/ColSpanControl.tsx +56 -0
  99. package/src/components/editor/SectionWrapper.tsx +44 -20
  100. package/src/components/editor/SettingsForm.tsx +100 -73
  101. package/src/components/primitives/EditableGrid.tsx +40 -36
  102. package/src/components/primitives/IconPicker.tsx +116 -26
  103. package/src/components/sections/Container/Container.tsx +354 -0
  104. package/src/components/sections/Container/ContainerSettingsForm.tsx +113 -0
  105. package/src/components/sections/Container/index.tsx +51 -0
  106. package/src/components/sections/IconList/IconList.tsx +113 -43
  107. package/src/components/sections/IconList/IconListSettings.tsx +2 -2
  108. package/src/components/sections/IconList/index.tsx +1 -1
  109. package/src/components/sections/Media/MediaBlock.tsx +103 -0
  110. package/src/components/sections/Media/index.tsx +85 -0
  111. package/src/components/sections/Prose/index.tsx +1 -0
  112. package/src/components/sections/Spacer/Spacer.tsx +6 -0
  113. package/src/components/sections/Spacer/index.tsx +18 -0
  114. package/src/components/sections/all-sections.ts +40 -0
  115. package/src/components/sections/register-schemas.ts +13 -18
  116. package/src/components/sections/register.ts +3 -17
  117. package/src/components/shared/Tabs.tsx +63 -0
  118. package/src/components/shell/EditorShell.tsx +147 -18
  119. package/src/components/shell/SiteSettingsModal.tsx +41 -51
  120. package/src/components/shell/blockMoveDispatch.ts +40 -0
  121. package/src/hooks/useBlockDnd.ts +144 -0
  122. package/src/hooks/useEditorPublish.ts +17 -4
  123. package/src/lib/block-dnd.ts +58 -0
  124. package/src/lib/block-move.ts +236 -0
  125. package/src/lib/container-grid.ts +58 -0
  126. package/src/lib/container-ops.ts +159 -0
  127. package/src/lib/dexie.ts +47 -0
  128. package/src/lib/loader.ts +16 -4
  129. package/src/lib/migrate-sections-transform.ts +147 -0
  130. package/src/lib/registry.ts +48 -2
  131. package/src/lib/sanitize.ts +22 -1
  132. package/src/schemas/block.ts +40 -0
  133. package/src/schemas/link.ts +19 -1
  134. package/src/schemas/rich-text.ts +11 -0
  135. package/src/schemas/sections.ts +5 -1
  136. package/src/schemas/shared.ts +16 -0
  137. package/src/schemas/site-config.ts +3 -3
  138. package/src/storage/index.ts +1 -0
  139. package/src/storage/types.ts +17 -0
  140. package/dist/components/brandguide/DoDontList.d.ts +0 -16
  141. package/dist/components/brandguide/DoDontList.d.ts.map +0 -1
  142. package/dist/components/brandguide/DoDontMediaGrid.d.ts +0 -16
  143. package/dist/components/brandguide/DoDontMediaGrid.d.ts.map +0 -1
  144. package/dist/components/primitives/MediaSettingsForms.d.ts +0 -23
  145. package/dist/components/primitives/MediaSettingsForms.d.ts.map +0 -1
  146. package/dist/components/sections/DoDontList/index.d.ts +0 -21
  147. package/dist/components/sections/DoDontList/index.d.ts.map +0 -1
  148. package/dist/components/sections/DoDontMediaGrid/index.d.ts +0 -55
  149. package/dist/components/sections/DoDontMediaGrid/index.d.ts.map +0 -1
  150. package/dist/components/sections/MediaGrid/MediaGrid.d.ts +0 -17
  151. package/dist/components/sections/MediaGrid/MediaGrid.d.ts.map +0 -1
  152. package/dist/components/sections/MediaGrid/index.d.ts.map +0 -1
  153. package/dist/components/sections/SplitContent/SplitContent.d.ts +0 -14
  154. package/dist/components/sections/SplitContent/SplitContent.d.ts.map +0 -1
  155. package/dist/components/sections/SplitContent/index.d.ts +0 -13
  156. package/dist/components/sections/SplitContent/index.d.ts.map +0 -1
  157. package/src/components/brandguide/DoDontList.d.ts.map +0 -1
  158. package/src/components/brandguide/DoDontList.tsx +0 -67
  159. package/src/components/brandguide/DoDontMediaGrid.d.ts.map +0 -1
  160. package/src/components/brandguide/DoDontMediaGrid.tsx +0 -19
  161. package/src/components/primitives/MediaSettingsForms.tsx +0 -128
  162. package/src/components/sections/DoDontList/index.d.ts.map +0 -1
  163. package/src/components/sections/DoDontList/index.tsx +0 -45
  164. package/src/components/sections/DoDontMediaGrid/index.d.ts.map +0 -1
  165. package/src/components/sections/DoDontMediaGrid/index.tsx +0 -63
  166. package/src/components/sections/MediaGrid/MediaGrid.d.ts.map +0 -1
  167. package/src/components/sections/MediaGrid/MediaGrid.tsx +0 -239
  168. package/src/components/sections/MediaGrid/index.d.ts.map +0 -1
  169. package/src/components/sections/MediaGrid/index.tsx +0 -57
  170. package/src/components/sections/SplitContent/SplitContent.d.ts.map +0 -1
  171. package/src/components/sections/SplitContent/SplitContent.tsx +0 -84
  172. package/src/components/sections/SplitContent/index.d.ts.map +0 -1
  173. package/src/components/sections/SplitContent/index.tsx +0 -55
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerSettingsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/ContainerSettingsForm.tsx"],"names":[],"mappings":"AAMA,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,UAAU,0BAA0B;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CACpG;AAgBD,wBAAgB,qBAAqB,CAAC,EACpC,OAAW,EACX,IAAY,EACZ,aAAkB,EAClB,QAAa,EACb,QAAQ,GACT,EAAE,0BAA0B,2CAyE5B"}
@@ -0,0 +1,11 @@
1
+ declare const _default: import("../../..").SectionDefinition<{
2
+ type: "container";
3
+ content: {
4
+ children: import("../../..").Section<Record<string, unknown>>[];
5
+ columns: number;
6
+ flow: "row" | "column";
7
+ childDefaults?: Record<string, unknown> | undefined;
8
+ };
9
+ }>;
10
+ export default _default;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/index.tsx"],"names":[],"mappings":";;;;;;;;;AAiCA,wBAiBG"}
@@ -3,6 +3,7 @@ interface IconListItem {
3
3
  label: string;
4
4
  text: string;
5
5
  icon?: string;
6
+ dodont?: "do" | "dont";
6
7
  }
7
8
  interface Props {
8
9
  items: IconListItem[];
@@ -1 +1 @@
1
- {"version":3,"file":"IconList.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAShE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAK,EACL,IAAW,EACX,SAAgB,EAChB,SAAiB,EACjB,cAA+C,EAC/C,aAA0C,EAC1C,aAA8B,EAC9B,QAAQ,EACR,aAAa,GACd,EAAE,KAAK,2CAyCP"}
1
+ {"version":3,"file":"IconList.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAUhE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CACxB;AAED,UAAU,KAAK;IACb,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACjD;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,KAAK,EACL,IAAW,EACX,SAAgB,EAChB,SAAiB,EACjB,cAA+C,EAC/C,aAA0C,EAC1C,aAA8B,EAC9B,QAAQ,EACR,aAAa,GACd,EAAE,KAAK,2CAyCP"}
@@ -2,10 +2,9 @@ export declare function IconListSettings({ icon: initialIcon, showLabel: initial
2
2
  icon: string | null;
3
3
  showLabel: boolean;
4
4
  stackText: boolean;
5
- onChange: (values: {
6
- icon: string | null;
7
- showLabel: boolean;
8
- stackText: boolean;
5
+ onChange: (result: {
6
+ content: Record<string, unknown>;
7
+ options: Record<string, unknown>;
9
8
  }) => void;
10
9
  }): import("react/jsx-runtime").JSX.Element;
11
10
  //# sourceMappingURL=IconListSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconListSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconListSettings.tsx"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAC7F,2CAgEA"}
1
+ {"version":3,"file":"IconListSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/IconListSettings.tsx"],"names":[],"mappings":"AAMA,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CACpG,2CAgEA"}
@@ -5,6 +5,7 @@ declare const _default: import("../../..").SectionDefinition<{
5
5
  label: string;
6
6
  text: string;
7
7
  icon?: string | undefined;
8
+ dodont?: "do" | "dont" | undefined;
8
9
  }[];
9
10
  };
10
11
  options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkBA,wBAuBG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/IconList/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,wBAuBG"}
@@ -0,0 +1,19 @@
1
+ import type { SingleMediaReference } from "../../../schemas/shared";
2
+ import type { LinkValue } from "../../../schemas/link";
3
+ export interface MediaBlockProps {
4
+ refValue: SingleMediaReference;
5
+ options: {
6
+ square?: boolean;
7
+ showCaption?: boolean;
8
+ border?: boolean;
9
+ objectFit?: "cover" | "contain";
10
+ };
11
+ /** Per-item link (viewer: already resolved to kind:"external" upstream). */
12
+ link?: LinkValue;
13
+ /** Per-item do/dont badge. */
14
+ dodont?: "do" | "dont";
15
+ isEditMode: boolean;
16
+ onRefChange?: (ref: SingleMediaReference) => void;
17
+ }
18
+ export declare function MediaBlock({ refValue, options, link, dodont, isEditMode, onRefChange }: MediaBlockProps): import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=MediaBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Media/MediaBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAQvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;KAAE,CAAC;IACxG,4EAA4E;IAC5E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,eAAe,2CAkFvG"}
@@ -1,8 +1,7 @@
1
1
  declare const _default: import("../../..").SectionDefinition<{
2
- type: "media_grid";
2
+ type: "media";
3
3
  content: {
4
- columns: number;
5
- media: ({
4
+ ref: {
6
5
  imageId: string;
7
6
  type: "image";
8
7
  caption?: string | string[] | undefined;
@@ -22,33 +21,24 @@ declare const _default: import("../../..").SectionDefinition<{
22
21
  autoplay?: boolean | undefined;
23
22
  loop?: boolean | undefined;
24
23
  muted?: boolean | undefined;
25
- } | {
26
- imageId: string;
27
- type: "doDontImage";
28
- doDont: "do" | "dont";
29
- caption?: string | string[] | undefined;
30
- background?: string | undefined;
31
- invertFrom?: string | undefined;
32
- border?: boolean | undefined;
33
- objectFit?: "cover" | "contain" | undefined;
34
- } | {
35
- imageId: string;
36
- type: "linkedImage";
24
+ };
25
+ link?: {
26
+ kind: "external";
37
27
  href: string;
38
- caption?: string | string[] | undefined;
39
- background?: string | undefined;
40
- invertFrom?: string | undefined;
41
- border?: boolean | undefined;
42
- objectFit?: "cover" | "contain" | undefined;
43
- target?: string | undefined;
44
- linkText?: string | undefined;
45
- })[];
28
+ target: "_self" | "_blank";
29
+ } | {
30
+ kind: "internal";
31
+ pageId: string;
32
+ target: "_self" | "_blank";
33
+ anchorSectionId?: string | null | undefined;
34
+ } | undefined;
35
+ dodont?: "do" | "dont" | undefined;
46
36
  };
47
37
  options: {
48
38
  square?: boolean | undefined;
39
+ showCaption?: boolean | undefined;
49
40
  border?: boolean | undefined;
50
- crop?: boolean | undefined;
51
- showCaptions?: boolean | undefined;
41
+ objectFit?: "cover" | "contain" | undefined;
52
42
  };
53
43
  }>;
54
44
  export default _default;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Media/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,wBA4DG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Prose/index.tsx"],"names":[],"mappings":";;;;;;AAWA,wBAUG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Prose/index.tsx"],"names":[],"mappings":";;;;;;AAWA,wBAWG"}
@@ -0,0 +1,2 @@
1
+ export default function Spacer(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=Spacer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Spacer/Spacer.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,MAAM,4CAE7B"}
@@ -0,0 +1,6 @@
1
+ declare const _default: import("../../..").SectionDefinition<{
2
+ type: "spacer";
3
+ content: Record<string, never>;
4
+ }>;
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Spacer/index.tsx"],"names":[],"mappings":";;;;AAUA,wBAOG"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * The single ordered list of built-in section definitions.
3
+ *
4
+ * Both `register.ts` (full registration for rendering) and `register-schemas.ts`
5
+ * (schema-only registration for /api/save validation) derive from this one
6
+ * array, so the two can no longer drift — previously they hand-maintained
7
+ * parallel 11-entry lists, and a section added to one but not the other would
8
+ * make the editor render a type that save rejects with a 400 (or vice versa).
9
+ *
10
+ * Retired: split_content, media_grid, do_dont_grid, do_dont — fully decomposable
11
+ * into container sections. The loader fallback in mergeSiteContent transforms any
12
+ * legacy-typed JSON to container before validation.
13
+ */
14
+ export declare const allSectionDefs: (import("../..").SectionDefinition<{
15
+ type: "link_heading";
16
+ content: {
17
+ heading: string;
18
+ };
19
+ }> | import("../..").SectionDefinition<{
20
+ type: "sub_heading";
21
+ content: {
22
+ heading: string;
23
+ excludeFromNav?: boolean | undefined;
24
+ };
25
+ }> | import("../..").SectionDefinition<{
26
+ type: "sub_sub_heading";
27
+ content: {
28
+ heading: string;
29
+ excludeFromNav?: boolean | undefined;
30
+ };
31
+ }> | import("../..").SectionDefinition<{
32
+ type: "prose";
33
+ content: {
34
+ body: string;
35
+ };
36
+ }> | import("../..").SectionDefinition<{
37
+ type: "media";
38
+ content: {
39
+ ref: {
40
+ imageId: string;
41
+ type: "image";
42
+ caption?: string | string[] | undefined;
43
+ background?: string | undefined;
44
+ invertFrom?: string | undefined;
45
+ border?: boolean | undefined;
46
+ objectFit?: "cover" | "contain" | undefined;
47
+ } | {
48
+ imageId: string;
49
+ type: "video";
50
+ caption?: string | string[] | undefined;
51
+ background?: string | undefined;
52
+ invertFrom?: string | undefined;
53
+ border?: boolean | undefined;
54
+ objectFit?: "cover" | "contain" | undefined;
55
+ poster?: string | undefined;
56
+ autoplay?: boolean | undefined;
57
+ loop?: boolean | undefined;
58
+ muted?: boolean | undefined;
59
+ };
60
+ link?: {
61
+ kind: "external";
62
+ href: string;
63
+ target: "_self" | "_blank";
64
+ } | {
65
+ kind: "internal";
66
+ pageId: string;
67
+ target: "_self" | "_blank";
68
+ anchorSectionId?: string | null | undefined;
69
+ } | undefined;
70
+ dodont?: "do" | "dont" | undefined;
71
+ };
72
+ options: {
73
+ square?: boolean | undefined;
74
+ showCaption?: boolean | undefined;
75
+ border?: boolean | undefined;
76
+ objectFit?: "cover" | "contain" | undefined;
77
+ };
78
+ }> | import("../..").SectionDefinition<{
79
+ type: "button";
80
+ content: {
81
+ text: string;
82
+ link?: {
83
+ kind: "external";
84
+ href: string;
85
+ target: "_self" | "_blank";
86
+ } | {
87
+ kind: "internal";
88
+ pageId: string;
89
+ target: "_self" | "_blank";
90
+ anchorSectionId?: string | null | undefined;
91
+ } | undefined;
92
+ download?: boolean | undefined;
93
+ };
94
+ }> | import("../..").SectionDefinition<{
95
+ type: "colors";
96
+ content: {
97
+ colors: {
98
+ spaces: {
99
+ hex?: string | undefined;
100
+ rgb?: string | undefined;
101
+ cmyk?: string | undefined;
102
+ pantone?: string | undefined;
103
+ }[];
104
+ name?: string | undefined;
105
+ }[];
106
+ };
107
+ options?: {
108
+ label?: string | undefined;
109
+ columns?: number | undefined;
110
+ collapsing?: boolean | undefined;
111
+ showLabel?: boolean | undefined;
112
+ } | undefined;
113
+ }> | import("../..").SectionDefinition<{
114
+ type: "icon_list";
115
+ content: {
116
+ items: {
117
+ label: string;
118
+ text: string;
119
+ icon?: string | undefined;
120
+ dodont?: "do" | "dont" | undefined;
121
+ }[];
122
+ };
123
+ options?: {
124
+ icon?: string | null | undefined;
125
+ showLabel?: boolean | undefined;
126
+ stackText?: boolean | undefined;
127
+ } | undefined;
128
+ }> | import("../..").SectionDefinition<{
129
+ type: "container";
130
+ content: {
131
+ children: import("../..").Section<Record<string, unknown>>[];
132
+ columns: number;
133
+ flow: "row" | "column";
134
+ childDefaults?: Record<string, unknown> | undefined;
135
+ };
136
+ }> | import("../..").SectionDefinition<{
137
+ type: "spacer";
138
+ content: Record<string, never>;
139
+ }>)[];
140
+ //# sourceMappingURL=all-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"all-sections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/all-sections.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;GAYG;AAKH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"AAkBA,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD"}
1
+ {"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,IAAI,MAAM,CAShD"}
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register.ts"],"names":[],"mappings":"AAkBA,wBAAgB,wBAAwB,IAAI,MAAM,CAMjD"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register.ts"],"names":[],"mappings":"AAIA,wBAAgB,wBAAwB,IAAI,MAAM,CAMjD"}
@@ -0,0 +1,24 @@
1
+ import { type ReactNode } from "react";
2
+ export interface TabItem {
3
+ id: string;
4
+ label: string;
5
+ content: ReactNode;
6
+ }
7
+ interface TabsProps {
8
+ tabs: TabItem[];
9
+ /** Initial active tab when uncontrolled. Defaults to the first tab. */
10
+ defaultTabId?: string;
11
+ /** When provided, the component is controlled by the parent. */
12
+ activeTabId?: string;
13
+ onTabChange?: (id: string) => void;
14
+ /**
15
+ * When true, the tab-bar row uses -mx-6 to break out of the parent's px-6 padding
16
+ * (e.g. EditorModal's content wrapper) and re-pads with px-6 so buttons stay aligned.
17
+ * The tab panel inherits the parent's padding unchanged.
18
+ * Use only when the parent container has px-6; leave false for noPadding contexts.
19
+ */
20
+ fullBleedTabBar?: boolean;
21
+ }
22
+ export declare function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar }: TabsProps): import("react/jsx-runtime").JSX.Element;
23
+ export {};
24
+ //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,SAAS,2CAqChG"}
@@ -2,6 +2,7 @@ import type { Audience } from "../../auth/types";
2
2
  export { useMediaLibrary } from "./MediaLibraryContext";
3
3
  interface Props {
4
4
  headSha: string;
5
+ draftHeadSha?: string;
5
6
  siteId: string;
6
7
  audiences: Audience[];
7
8
  capabilities: {
@@ -17,5 +18,5 @@ interface Props {
17
18
  role: "owner" | "editor";
18
19
  } | null;
19
20
  }
20
- export default function EditorShell({ headSha, siteId, audiences: initialAudiences, capabilities, currentUser, }: Props): import("react/jsx-runtime").JSX.Element;
21
+ export default function EditorShell({ headSha, draftHeadSha, siteId, audiences: initialAudiences, capabilities, currentUser, }: Props): import("react/jsx-runtime").JSX.Element;
21
22
  //# sourceMappingURL=EditorShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAgEjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQxD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAO,EACP,MAAM,EACN,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EACZ,WAAW,GACZ,EAAE,KAAK,2CA22BP"}
1
+ {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../../src/components/shell/EditorShell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAqEjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQxD,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAIhB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAO,EACP,YAAY,EACZ,MAAM,EACN,SAAS,EAAE,gBAAgB,EAC3B,YAAY,EACZ,WAAW,GACZ,EAAE,KAAK,2CAg6BP"}
@@ -1 +1 @@
1
- {"version":3,"file":"SiteSettingsModal.d.ts","sourceRoot":"","sources":["../../../src/components/shell/SiteSettingsModal.tsx"],"names":[],"m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;IACjD,iBAAiB,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO,CAAC;QACf,aAAa,EAAE,OAAO,CAAC;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,cAAc,EAAE,OAAO,CAAC;QACxB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;KAAE,GAAG,IAAI,CAAC;CACjE;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,KAAK,2CA2FzI"}
@@ -0,0 +1,21 @@
1
+ import { type BlockMove, type BlockMoveState } from "../../lib/block-move";
2
+ import type { LoadedSection } from "../../lib/loader";
3
+ import type { SiteIndex } from "../../schemas/site-config";
4
+ import type { SectionContent } from "../../schemas/sections";
5
+ export interface BlockMoveDispatchDeps {
6
+ getState: () => BlockMoveState;
7
+ setSections: (updater: (prev: LoadedSection[]) => LoadedSection[]) => void;
8
+ setSiteIndex: (updater: (prev: SiteIndex) => SiteIndex) => void;
9
+ persistence: {
10
+ markSectionDirty: (id: string, content: SectionContent) => void;
11
+ markIndexDirty: () => void;
12
+ removeSection: (id: string) => void;
13
+ };
14
+ isRemote: (id: string) => boolean;
15
+ scheduleDelete: (id: string) => void;
16
+ markLocalChanges: () => void;
17
+ /** Latest content for a section id, for markSectionDirty after the move. */
18
+ newSectionContent: (id: string, sections: LoadedSection[]) => SectionContent;
19
+ }
20
+ export declare function makeBlockMoveDispatch(deps: BlockMoveDispatchDeps): (move: BlockMove) => void;
21
+ //# sourceMappingURL=blockMoveDispatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blockMoveDispatch.d.ts","sourceRoot":"","sources":["../../../src/components/shell/blockMoveDispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,cAAc,CAAC;IAC/B,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,IAAI,CAAC;IAC3E,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,KAAK,IAAI,CAAC;IAChE,WAAW,EAAE;QACX,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;QAChE,cAAc,EAAE,MAAM,IAAI,CAAC;QAC3B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;KACrC,CAAC;IACF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,4EAA4E;IAC5E,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,cAAc,CAAC;CAC9E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,qBAAqB,IACnC,MAAM,SAAS,UAiB5C"}
@@ -0,0 +1,48 @@
1
+ import type { Edge } from "@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge";
2
+ type AllowedEdges = Edge[];
3
+ export interface UseBlockDndArgs {
4
+ blockId: string;
5
+ containerId: string;
6
+ index: number;
7
+ isContainer: boolean;
8
+ /** ["left","right"] inside a row container, ["top","bottom"] at root */
9
+ allowedEdges: AllowedEdges;
10
+ enabled: boolean;
11
+ }
12
+ /**
13
+ * Wires a block as a unified drag source + drop target. Manages only this block's
14
+ * local hover edge + dragging flag — the actual move dispatch is centralized in the
15
+ * EditorContent monitor (a later task), so nested targets never double-fire. The edge
16
+ * indicator is shown only when this element is the innermost drop target.
17
+ *
18
+ * Callers must pass a stable `allowedEdges` array (module-level constant or memoized)
19
+ * to avoid re-subscribing on every render.
20
+ */
21
+ export declare function useBlockDnd({ blockId, containerId, index, isContainer, allowedEdges, enabled }: UseBlockDndArgs): {
22
+ dragRef: import("react").RefObject<HTMLDivElement | null>;
23
+ handleRef: import("react").RefObject<HTMLButtonElement | null>;
24
+ closestEdge: import("@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/types").Edge | null;
25
+ isDragging: boolean;
26
+ };
27
+ export interface UseBlockDropZoneArgs {
28
+ containerId: string;
29
+ index: number;
30
+ /** When set, the zone is a column-targeted drop (ghost/spacer): place at this 1-based column. */
31
+ toColumn?: number;
32
+ allowedEdges: AllowedEdges;
33
+ enabled: boolean;
34
+ }
35
+ /**
36
+ * A drop-target-ONLY zone (not draggable) — used for an empty container's first-drop
37
+ * area, where there are no child cells to act as targets. It advertises
38
+ * `{ dropContainerId, index }` and shows an edge indicator only when it is the innermost
39
+ * drop target. The actual move dispatch is centralized in the EditorContent monitor.
40
+ *
41
+ * Callers must pass a stable `allowedEdges` array (module-level constant or memoized).
42
+ */
43
+ export declare function useBlockDropZone({ containerId, index, toColumn, allowedEdges, enabled }: UseBlockDropZoneArgs): {
44
+ dropRef: import("react").RefObject<HTMLDivElement | null>;
45
+ closestEdge: import("@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/types").Edge | null;
46
+ };
47
+ export {};
48
+ //# sourceMappingURL=useBlockDnd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBlockDnd.d.ts","sourceRoot":"","sources":["../../src/hooks/useBlockDnd.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uDAAuD,CAAC;AAGlF,KAAK,YAAY,GAAG,IAAI,EAAE,CAAC;AAE3B,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,eAAe;;;;;EA0D/G;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,oBAAoB;;;EAyC7G"}
@@ -19,9 +19,10 @@ interface PublishDeps {
19
19
  onMediaPublished: (publishedItems: MediaItem[], publishedDeletions: string[]) => void;
20
20
  onShasUpdated: (savedSha: string | null, mainSha: string | null) => void;
21
21
  onPublishComplete?: () => void;
22
+ getBaseVersion: () => string | null;
22
23
  }
23
24
  export type PublishAction = "idle" | "saving" | "publishing";
24
- export declare function useEditorPublish({ flushNow, cancelPendingFlush, isConfigDirty, clearConfigDirty, siteIndexRef, siteConfig, sections, deletedSectionIds, onSuccess, mediaManifest, manifestDirty, clearManifestDirty, pendingMediaItems, pendingMediaDeletions, onMediaPublished, onShasUpdated, onPublishComplete, }: PublishDeps): {
25
+ export declare function useEditorPublish({ flushNow, cancelPendingFlush, isConfigDirty, clearConfigDirty, siteIndexRef, siteConfig, sections, deletedSectionIds, onSuccess, mediaManifest, manifestDirty, clearManifestDirty, pendingMediaItems, pendingMediaDeletions, onMediaPublished, onShasUpdated, onPublishComplete, getBaseVersion, }: PublishDeps): {
25
26
  publishAction: PublishAction;
26
27
  publishFeedback: string | null;
27
28
  handleSave: () => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"useEditorPublish.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorPublish.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAe/D,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,iBAAiB,EAAE,SAAS,EAAE,CAAC;IAC/B,qBAAq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