@drawnagency/primitives 0.1.113 → 0.1.115
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.
- package/README.md +1 -1
- package/dist/auth/cookies.d.ts +39 -0
- package/dist/auth/cookies.d.ts.map +1 -1
- package/dist/auth/index.js +3 -3
- package/dist/chunk-4WQ36ZP7.js +83 -0
- package/dist/{chunk-REDDTTGJ.js → chunk-4Y2JQQZL.js} +19 -1
- package/dist/chunk-5GFACGSN.js +6 -0
- package/dist/{chunk-AHALSCQH.js → chunk-67P34WNW.js} +76 -131
- package/dist/{chunk-S2L3BPLS.js → chunk-7SX42OP4.js} +1 -1
- package/dist/{chunk-GGXZZ77Z.js → chunk-AASEGXNT.js} +18 -1
- package/dist/chunk-APIJPTFG.js +64 -0
- package/dist/{chunk-WKZ7OENC.js → chunk-BQ5TZZUE.js} +5 -1
- package/dist/chunk-CDBURDPX.js +90 -0
- package/dist/chunk-DFKTF3CH.js +0 -0
- package/dist/chunk-DIMDRBFK.js +11 -0
- package/dist/chunk-DJABADOO.js +131 -0
- package/dist/{chunk-NHN2LSIU.js → chunk-DJOGPSRU.js} +31 -68
- package/dist/{chunk-KR2MHTNJ.js → chunk-FHTKSELX.js} +610 -62
- package/dist/{chunk-WUJ3XNFI.js → chunk-GGYY3JQJ.js} +19 -24
- package/dist/chunk-GNF6KFQ7.js +18 -0
- package/dist/{chunk-FRE2CCLV.js → chunk-HHNPSKPT.js} +5 -79
- package/dist/{chunk-IINIZBQB.js → chunk-JCDZAFX2.js} +30 -10
- package/dist/chunk-JR24U7FJ.js +120 -0
- package/dist/{chunk-BDFTMGCL.js → chunk-JXATNKLV.js} +11 -10
- package/dist/{chunk-SW6PCQQD.js → chunk-KQA772WQ.js} +2 -1
- package/dist/{chunk-6BZ2KNTP.js → chunk-NX7TFHA4.js} +195 -65
- package/dist/{chunk-VWWY5TL5.js → chunk-O37AV27P.js} +14 -75
- package/dist/chunk-RIITGTV3.js +275 -0
- package/dist/{chunk-HBULBDGP.js → chunk-S37DZPHW.js} +1 -1
- package/dist/chunk-S7QRHUWO.js +8 -0
- package/dist/{chunk-Z7W3DQTR.js → chunk-T26HAKW3.js} +424 -42
- package/dist/{chunk-4I5OO5UB.js → chunk-TEOAKGZA.js} +0 -1
- package/dist/{chunk-GPPVYLEI.js → chunk-UUUSJDIG.js} +1 -1
- package/dist/chunk-VY3IFGE3.js +70 -0
- package/dist/chunk-WYOFQHKI.js +176 -0
- package/dist/{chunk-4RNF2DRG.js → chunk-XDEPXTBY.js} +0 -2
- package/dist/{chunk-DS4GCYV2.js → chunk-YV3YSZEB.js} +223 -16
- package/dist/collab/rebase.d.ts +2 -1
- package/dist/collab/rebase.d.ts.map +1 -1
- package/dist/collab/rebase.js +24 -9
- package/dist/components/brandguide/ColorsEditable.d.ts.map +1 -1
- package/dist/components/chat/ChatPanel.d.ts.map +1 -1
- package/dist/components/chat/ChatWidget.d.ts.map +1 -1
- package/dist/components/docfile/DocFilePane.d.ts.map +1 -1
- package/dist/components/editor/ChildBlockWrapper.d.ts.map +1 -1
- package/dist/components/editor/ConflictDialog.d.ts.map +1 -1
- package/dist/components/editor/DragHandle.d.ts +12 -2
- package/dist/components/editor/DragHandle.d.ts.map +1 -1
- package/dist/components/editor/DropEdgeIndicator.d.ts +15 -6
- package/dist/components/editor/DropEdgeIndicator.d.ts.map +1 -1
- package/dist/components/editor/NavGroupRow.d.ts +4 -1
- package/dist/components/editor/NavGroupRow.d.ts.map +1 -1
- package/dist/components/editor/PagesModal.d.ts.map +1 -1
- package/dist/components/editor/SectionWrapper.d.ts +1 -1
- package/dist/components/editor/SectionWrapper.d.ts.map +1 -1
- package/dist/components/editor/SettingsForm.d.ts.map +1 -1
- package/dist/components/editor/TagIndicator.d.ts +15 -0
- package/dist/components/editor/TagIndicator.d.ts.map +1 -0
- package/dist/components/editor/index.js +150 -79
- package/dist/components/primitives/DocumentDropZone.d.ts +1 -1
- package/dist/components/primitives/EditableGrid.d.ts.map +1 -1
- package/dist/components/primitives/EditableList.d.ts.map +1 -1
- package/dist/components/primitives/HeadingSection.d.ts +4 -1
- package/dist/components/primitives/HeadingSection.d.ts.map +1 -1
- package/dist/components/primitives/ResolvedMedia.d.ts +5 -1
- package/dist/components/primitives/ResolvedMedia.d.ts.map +1 -1
- package/dist/components/primitives/{defineHeadingSection.d.ts → define-heading-section.d.ts} +1 -1
- package/dist/components/primitives/define-heading-section.d.ts.map +1 -0
- package/dist/components/primitives/{gridDrop.d.ts → grid-drop.d.ts} +1 -1
- package/dist/components/primitives/grid-drop.d.ts.map +1 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/index.d.ts.map +1 -1
- package/dist/components/primitives/index.js +22 -154
- package/dist/components/sections/Button/CTAButton.d.ts.map +1 -1
- package/dist/components/sections/DoDontMedia/DoDontMediaBlock.d.ts +2 -6
- package/dist/components/sections/DoDontMedia/DoDontMediaBlock.d.ts.map +1 -1
- package/dist/components/sections/DoDontMedia/index.d.ts +8 -0
- package/dist/components/sections/DoDontMedia/index.d.ts.map +1 -1
- package/dist/components/sections/IconList/IconList.d.ts +2 -1
- package/dist/components/sections/IconList/IconList.d.ts.map +1 -1
- package/dist/components/sections/IconList/IconListSettings.d.ts +2 -1
- package/dist/components/sections/IconList/IconListSettings.d.ts.map +1 -1
- package/dist/components/sections/IconList/index.d.ts +1 -0
- package/dist/components/sections/IconList/index.d.ts.map +1 -1
- package/dist/components/sections/Media/MediaBlock.d.ts +2 -1
- package/dist/components/sections/Media/MediaBlock.d.ts.map +1 -1
- package/dist/components/sections/Media/index.d.ts +8 -0
- package/dist/components/sections/Media/index.d.ts.map +1 -1
- package/dist/components/sections/Reference/ReferenceList.d.ts +35 -0
- package/dist/components/sections/Reference/ReferenceList.d.ts.map +1 -0
- package/dist/components/sections/Reference/ReferenceSettings.d.ts +12 -0
- package/dist/components/sections/Reference/ReferenceSettings.d.ts.map +1 -0
- package/dist/components/sections/Reference/index.d.ts +9 -0
- package/dist/components/sections/Reference/index.d.ts.map +1 -0
- package/dist/components/sections/SectionSummary/SectionSummaryBlock.d.ts +38 -0
- package/dist/components/sections/SectionSummary/SectionSummaryBlock.d.ts.map +1 -0
- package/dist/components/sections/SectionSummary/SectionSummarySettings.d.ts +20 -0
- package/dist/components/sections/SectionSummary/SectionSummarySettings.d.ts.map +1 -0
- package/dist/components/sections/SectionSummary/index.d.ts +33 -0
- package/dist/components/sections/SectionSummary/index.d.ts.map +1 -0
- package/dist/components/sections/all-sections.d.ts +53 -0
- package/dist/components/sections/all-sections.d.ts.map +1 -1
- package/dist/components/sections/brand-guide.d.ts +41 -2
- package/dist/components/sections/brand-guide.d.ts.map +1 -1
- package/dist/components/sections/brand-guide.js +17 -10
- package/dist/components/sections/core-sections.d.ts +14 -0
- package/dist/components/sections/core-sections.d.ts.map +1 -1
- package/dist/components/sections/register-schemas.js +25 -18
- package/dist/components/sections/register.js +25 -18
- package/dist/components/shared/BrandSwatchesContext.d.ts +9 -0
- package/dist/components/shared/BrandSwatchesContext.d.ts.map +1 -0
- package/dist/components/shared/Button.d.ts +11 -3
- package/dist/components/shared/Button.d.ts.map +1 -1
- package/dist/components/shared/Checkbox.d.ts +6 -0
- package/dist/components/shared/Checkbox.d.ts.map +1 -1
- package/dist/components/shared/ConfirmDialog.d.ts +25 -0
- package/dist/components/shared/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/shared/ConfirmInline.d.ts +25 -0
- package/dist/components/shared/ConfirmInline.d.ts.map +1 -0
- package/dist/components/shared/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/shared/Fab.d.ts +11 -2
- package/dist/components/shared/Fab.d.ts.map +1 -1
- package/dist/components/shared/FabStack.d.ts +22 -0
- package/dist/components/shared/FabStack.d.ts.map +1 -0
- package/dist/components/shared/HistoryChangesModal.d.ts.map +1 -1
- package/dist/components/shared/HistoryPopover.d.ts.map +1 -1
- package/dist/components/shared/ImageBackgroundField.d.ts +9 -0
- package/dist/components/shared/ImageBackgroundField.d.ts.map +1 -0
- package/dist/components/shared/{UploadRejectionAlert.d.ts → InlineAlert.d.ts} +4 -2
- package/dist/components/shared/InlineAlert.d.ts.map +1 -0
- package/dist/components/shared/Input.d.ts +10 -0
- package/dist/components/shared/Input.d.ts.map +1 -1
- package/dist/components/shared/Navigation.d.ts.map +1 -1
- package/dist/components/shared/Notice.d.ts +10 -0
- package/dist/components/shared/Notice.d.ts.map +1 -0
- package/dist/components/shared/Popover.d.ts.map +1 -1
- package/dist/components/shared/ReferenceSourcesContext.d.ts +25 -0
- package/dist/components/shared/ReferenceSourcesContext.d.ts.map +1 -0
- package/dist/components/shared/Select.d.ts +3 -2
- package/dist/components/shared/Select.d.ts.map +1 -1
- package/dist/components/shared/SplitButton.d.ts.map +1 -1
- package/dist/components/shared/SummaryAnchorsContext.d.ts +10 -0
- package/dist/components/shared/SummaryAnchorsContext.d.ts.map +1 -0
- package/dist/components/shared/Textarea.d.ts +7 -0
- package/dist/components/shared/Textarea.d.ts.map +1 -1
- package/dist/components/shared/ToolbarFrame.d.ts +17 -0
- package/dist/components/shared/ToolbarFrame.d.ts.map +1 -0
- package/dist/components/shared/copy.d.ts +13 -0
- package/dist/components/shared/copy.d.ts.map +1 -0
- package/dist/components/shared/icons.d.ts +0 -12
- package/dist/components/shared/icons.d.ts.map +1 -1
- package/dist/components/shell/AudienceDetailsPanel.d.ts +7 -1
- package/dist/components/shell/AudienceDetailsPanel.d.ts.map +1 -1
- package/dist/components/shell/AudienceRow.d.ts.map +1 -1
- package/dist/components/shell/BugReportFAB.d.ts +7 -1
- package/dist/components/shell/BugReportFAB.d.ts.map +1 -1
- package/dist/components/shell/CredentialList.d.ts.map +1 -1
- package/dist/components/shell/DocInspector.d.ts.map +1 -1
- package/dist/components/shell/DocumentEditorOverlay.d.ts.map +1 -1
- package/dist/components/shell/EditorContext.d.ts +4 -0
- package/dist/components/shell/EditorContext.d.ts.map +1 -1
- package/dist/components/shell/EditorLoginForm.d.ts.map +1 -1
- package/dist/components/shell/EditorModal.d.ts.map +1 -1
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/HistoryToolbar.d.ts.map +1 -1
- package/dist/components/shell/MediaFolderTile.d.ts +4 -1
- package/dist/components/shell/MediaFolderTile.d.ts.map +1 -1
- package/dist/components/shell/MediaLibraryModal.d.ts.map +1 -1
- package/dist/components/shell/RestoreModal.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsChatbot.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsDisplay.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsModal.d.ts +3 -1
- package/dist/components/shell/SiteSettingsModal.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsTags.d.ts +13 -0
- package/dist/components/shell/SiteSettingsTags.d.ts.map +1 -0
- package/dist/components/shell/SiteSettingsUsers.d.ts.map +1 -1
- package/dist/components/shell/ViewerLoginForm.d.ts.map +1 -1
- package/dist/components/shell/{blockMoveDispatch.d.ts → block-move-dispatch.d.ts} +1 -1
- package/dist/components/shell/block-move-dispatch.d.ts.map +1 -0
- package/dist/components/shell/reference-sources.d.ts +22 -0
- package/dist/components/shell/reference-sources.d.ts.map +1 -0
- package/dist/deck/index.d.ts +2 -2
- package/dist/deck/index.d.ts.map +1 -1
- package/dist/deck/index.js +1 -3
- package/dist/deck-builder/index.js +10 -17
- package/dist/document/index.d.ts +2 -2
- package/dist/document/index.d.ts.map +1 -1
- package/dist/hooks/useBlockDnd.d.ts +11 -0
- package/dist/hooks/useBlockDnd.d.ts.map +1 -1
- package/dist/hooks/useBuildStatus.d.ts +1 -1
- package/dist/hooks/useBuildStatus.d.ts.map +1 -1
- package/dist/hooks/useDocumentUploads.d.ts +1 -1
- package/dist/hooks/useDocumentUploads.d.ts.map +1 -1
- package/dist/hooks/useEditorPersistence.d.ts +5 -1
- package/dist/hooks/useEditorPersistence.d.ts.map +1 -1
- package/dist/hooks/useEditorPublish.d.ts +6 -3
- package/dist/hooks/useEditorPublish.d.ts.map +1 -1
- package/dist/hooks/useMediaPipeline.d.ts.map +1 -1
- package/dist/hooks/useNotice.d.ts +19 -0
- package/dist/hooks/useNotice.d.ts.map +1 -0
- package/dist/hooks/useSortableNavRow.d.ts +11 -0
- package/dist/hooks/useSortableNavRow.d.ts.map +1 -1
- package/dist/hooks/useSortableRow.d.ts +11 -0
- package/dist/hooks/useSortableRow.d.ts.map +1 -1
- package/dist/hooks/useStackedEscape.d.ts +32 -0
- package/dist/hooks/useStackedEscape.d.ts.map +1 -0
- package/dist/index.js +95 -48
- package/dist/lib/audience-secret.js +2 -2
- package/dist/lib/block-dnd.d.ts +5 -0
- package/dist/lib/block-dnd.d.ts.map +1 -1
- package/dist/lib/block-move.d.ts.map +1 -1
- package/dist/lib/brand-swatches.d.ts +12 -0
- package/dist/lib/brand-swatches.d.ts.map +1 -0
- package/dist/lib/container-ops.d.ts +3 -2
- package/dist/lib/container-ops.d.ts.map +1 -1
- package/dist/lib/dexie.d.ts +7 -1
- package/dist/lib/dexie.d.ts.map +1 -1
- package/dist/lib/dexie.js +12 -3
- package/dist/lib/env.d.ts +4 -0
- package/dist/lib/env.d.ts.map +1 -1
- package/dist/lib/env.js +5 -3
- package/dist/lib/events.d.ts +1 -2
- package/dist/lib/events.d.ts.map +1 -1
- package/dist/lib/image-background.d.ts +8 -0
- package/dist/lib/image-background.d.ts.map +1 -0
- package/dist/lib/image-variant-plan.d.ts +42 -0
- package/dist/lib/image-variant-plan.d.ts.map +1 -0
- package/dist/lib/image-variant-plan.js +53 -0
- package/dist/lib/index-ops.d.ts.map +1 -1
- package/dist/lib/index-ops.js +21 -17
- package/dist/lib/index.d.ts +7 -4
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +55 -26
- package/dist/lib/loader.d.ts +25 -12
- package/dist/lib/loader.d.ts.map +1 -1
- package/dist/lib/media-ops.d.ts +73 -0
- package/dist/lib/media-ops.d.ts.map +1 -0
- package/dist/lib/media-ops.js +60 -0
- package/dist/lib/nav-tree.d.ts +7 -0
- package/dist/lib/nav-tree.d.ts.map +1 -1
- package/dist/lib/nav.d.ts +38 -0
- package/dist/lib/nav.d.ts.map +1 -1
- package/dist/lib/pages.d.ts +2 -1
- package/dist/lib/pages.d.ts.map +1 -1
- package/dist/lib/platform-broker.d.ts +4 -2
- package/dist/lib/platform-broker.d.ts.map +1 -1
- package/dist/lib/platform-broker.js +21 -13
- package/dist/lib/reference-type.d.ts +2 -0
- package/dist/lib/reference-type.d.ts.map +1 -0
- package/dist/lib/reference-validation.d.ts +31 -0
- package/dist/lib/reference-validation.d.ts.map +1 -0
- package/dist/lib/reference-validation.js +39 -0
- package/dist/lib/references.d.ts +74 -0
- package/dist/lib/references.d.ts.map +1 -0
- package/dist/lib/registry.d.ts +35 -0
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/lib/{safeRedirect.d.ts → safe-redirect.d.ts} +1 -1
- package/dist/lib/safe-redirect.d.ts.map +1 -0
- package/dist/lib/sidecar-diagnostics.d.ts +20 -0
- package/dist/lib/sidecar-diagnostics.d.ts.map +1 -0
- package/dist/lib/sidecars.d.ts +118 -0
- package/dist/lib/sidecars.d.ts.map +1 -0
- package/dist/lib/sidecars.js +23 -0
- package/dist/lib/slug.d.ts +2 -0
- package/dist/lib/slug.d.ts.map +1 -0
- package/dist/lib/storage-tier.d.ts +17 -0
- package/dist/lib/storage-tier.d.ts.map +1 -0
- package/dist/lib/storage-tier.js +29 -0
- package/dist/lib/tags.d.ts +64 -0
- package/dist/lib/tags.d.ts.map +1 -0
- package/dist/lib/theme-vars.d.ts +9 -0
- package/dist/lib/theme-vars.d.ts.map +1 -1
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +18 -14
- package/dist/media/queue.d.ts +2 -0
- package/dist/media/queue.d.ts.map +1 -1
- package/dist/media/utils.d.ts +2 -0
- package/dist/media/utils.d.ts.map +1 -1
- package/dist/media/{videoPoster.d.ts → video-poster.d.ts} +1 -1
- package/dist/media/video-poster.d.ts.map +1 -0
- package/dist/media/worker.d.ts +1 -35
- package/dist/media/worker.d.ts.map +1 -1
- package/dist/schemas/audience.js +2 -2
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +25 -13
- package/dist/schemas/media.d.ts +4 -0
- package/dist/schemas/media.d.ts.map +1 -1
- package/dist/schemas/shared.d.ts +26 -0
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/schemas/site-config.d.ts +6 -0
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/dist/schemas/tags.d.ts +27 -0
- package/dist/schemas/tags.d.ts.map +1 -0
- package/dist/storage/index.js +2 -1
- package/dist/storage/memory.d.ts +21 -0
- package/dist/storage/memory.d.ts.map +1 -0
- package/dist/storage/memory.js +129 -0
- package/dist/storage/types.d.ts +9 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/types/database.d.ts.map +1 -1
- package/package.json +26 -1
- package/src/auth/cookies.ts +111 -0
- package/src/collab/rebase.ts +29 -9
- package/src/components/brandguide/ColorSwatchSettings.tsx +1 -1
- package/src/components/brandguide/ColorsEditable.tsx +1 -0
- package/src/components/chat/ChatPanel.tsx +2 -3
- package/src/components/chat/ChatWidget.tsx +2 -3
- package/src/components/docfile/DocFilePane.tsx +4 -12
- package/src/components/editor/ChildBlockWrapper.tsx +13 -19
- package/src/components/editor/ConflictDialog.tsx +27 -35
- package/src/components/editor/DeleteButton.tsx +2 -2
- package/src/components/editor/DragHandle.tsx +16 -3
- package/src/components/editor/DropEdgeIndicator.tsx +36 -10
- package/src/components/editor/InsertButton.tsx +2 -2
- package/src/components/editor/NavGroupRow.tsx +43 -14
- package/src/components/editor/PagesModal.tsx +99 -26
- package/src/components/editor/SectionWrapper.tsx +64 -23
- package/src/components/editor/SettingsButton.tsx +2 -2
- package/src/components/editor/SettingsForm.tsx +19 -2
- package/src/components/editor/StatusIndicator.tsx +4 -4
- package/src/components/editor/TagIndicator.tsx +80 -0
- package/src/components/primitives/DocumentDropZone.tsx +1 -1
- package/src/components/primitives/EditableGrid.tsx +15 -14
- package/src/components/primitives/EditableList.tsx +27 -74
- package/src/components/primitives/HeadingSection.tsx +5 -2
- package/src/components/primitives/ResolvedMedia.tsx +13 -0
- package/src/components/primitives/{defineHeadingSection.tsx → define-heading-section.tsx} +1 -0
- package/src/components/primitives/index.ts +1 -1
- package/src/components/primitives/useEditablePlainText.ts +5 -5
- package/src/components/sections/Button/CTAButton.tsx +3 -1
- package/src/components/sections/DoDontMedia/DoDontMediaBlock.tsx +4 -4
- package/src/components/sections/DoDontMedia/index.tsx +12 -3
- package/src/components/sections/IconList/DoDontToggle.tsx +2 -2
- package/src/components/sections/IconList/IconList.tsx +70 -37
- package/src/components/sections/IconList/IconListSettings.tsx +55 -17
- package/src/components/sections/IconList/index.tsx +10 -3
- package/src/components/sections/LinkHeading/index.tsx +1 -1
- package/src/components/sections/Media/MediaBlock.tsx +13 -2
- package/src/components/sections/Media/index.tsx +12 -4
- package/src/components/sections/Reference/ReferenceList.tsx +214 -0
- package/src/components/sections/Reference/ReferenceSettings.tsx +159 -0
- package/src/components/sections/Reference/index.tsx +47 -0
- package/src/components/sections/SectionSummary/SectionSummaryBlock.tsx +476 -0
- package/src/components/sections/SectionSummary/SectionSummarySettings.tsx +126 -0
- package/src/components/sections/SectionSummary/index.tsx +149 -0
- package/src/components/sections/SubHeading/index.tsx +1 -1
- package/src/components/sections/SubSubHeading/index.tsx +1 -1
- package/src/components/sections/brand-guide.ts +4 -3
- package/src/components/sections/core-sections.ts +2 -0
- package/src/components/shared/BrandSwatchesContext.ts +13 -0
- package/src/components/shared/Button.tsx +47 -34
- package/src/components/shared/Checkbox.tsx +21 -12
- package/src/components/shared/ConfirmDialog.tsx +87 -0
- package/src/components/shared/ConfirmInline.tsx +90 -0
- package/src/components/shared/ErrorBoundary.tsx +6 -18
- package/src/components/shared/Fab.tsx +15 -5
- package/src/components/shared/FabStack.tsx +28 -0
- package/src/components/shared/HistoryChangesModal.tsx +43 -41
- package/src/components/shared/HistoryPopover.tsx +7 -20
- package/src/components/shared/ImageBackgroundField.tsx +92 -0
- package/src/components/shared/{UploadRejectionAlert.tsx → InlineAlert.tsx} +21 -5
- package/src/components/shared/Input.tsx +23 -7
- package/src/components/shared/Navigation.tsx +22 -17
- package/src/components/shared/Notice.tsx +59 -0
- package/src/components/shared/Popover.tsx +7 -11
- package/src/components/shared/ReferenceSourcesContext.ts +27 -0
- package/src/components/shared/Select.tsx +5 -2
- package/src/components/shared/SplitButton.tsx +11 -17
- package/src/components/shared/SummaryAnchorsContext.ts +11 -0
- package/src/components/shared/Textarea.tsx +17 -2
- package/src/components/shared/ToolbarFrame.tsx +28 -0
- package/src/components/shared/VideoSourceField.tsx +1 -1
- package/src/components/shared/copy.ts +18 -0
- package/src/components/shared/icons.tsx +1 -17
- package/src/components/shell/AudienceAddForm.tsx +2 -2
- package/src/components/shell/AudienceDetailsPanel.tsx +23 -5
- package/src/components/shell/AudienceRow.tsx +22 -15
- package/src/components/shell/BugReportFAB.tsx +50 -40
- package/src/components/shell/CredentialList.tsx +33 -13
- package/src/components/shell/DocInspector.tsx +3 -12
- package/src/components/shell/DocumentEditorOverlay.tsx +33 -23
- package/src/components/shell/EditorContext.tsx +7 -0
- package/src/components/shell/EditorLoginForm.tsx +26 -36
- package/src/components/shell/EditorModal.tsx +8 -10
- package/src/components/shell/EditorShell.tsx +501 -338
- package/src/components/shell/HistoryToolbar.tsx +24 -26
- package/src/components/shell/MediaFolderTile.tsx +8 -3
- package/src/components/shell/MediaLibraryModal.tsx +59 -60
- package/src/components/shell/ProcessingIndicator.tsx +2 -2
- package/src/components/shell/RestoreModal.tsx +17 -16
- package/src/components/shell/SetPasswordForm.tsx +3 -3
- package/src/components/shell/SiteSettingsChatbot.tsx +61 -42
- package/src/components/shell/SiteSettingsDisplay.tsx +10 -20
- package/src/components/shell/SiteSettingsModal.tsx +24 -2
- package/src/components/shell/SiteSettingsTags.tsx +143 -0
- package/src/components/shell/SiteSettingsUsers.tsx +36 -26
- package/src/components/shell/SiteSettingsViewerAccess.tsx +2 -2
- package/src/components/shell/ViewerLoginForm.tsx +5 -4
- package/src/components/shell/reference-sources.ts +36 -0
- package/src/deck/index.ts +2 -2
- package/src/document/index.ts +2 -2
- package/src/hooks/useBlockDnd.ts +11 -0
- package/src/hooks/useBuildStatus.ts +53 -6
- package/src/hooks/useDocumentUploads.ts +1 -1
- package/src/hooks/useEditorPersistence.ts +141 -35
- package/src/hooks/useEditorPublish.ts +27 -31
- package/src/hooks/useMediaPipeline.ts +30 -24
- package/src/hooks/useNotice.ts +45 -0
- package/src/hooks/useSortableNavRow.ts +11 -0
- package/src/hooks/useSortableRow.ts +22 -2
- package/src/hooks/useStackedEscape.ts +62 -0
- package/src/lib/block-dnd.ts +6 -1
- package/src/lib/block-move.ts +3 -0
- package/src/lib/brand-swatches.ts +32 -0
- package/src/lib/container-ops.ts +5 -3
- package/src/lib/dexie.ts +24 -2
- package/src/lib/env.ts +9 -0
- package/src/lib/events.ts +1 -2
- package/src/lib/image-background.ts +31 -0
- package/src/lib/image-variant-plan.ts +92 -0
- package/src/lib/index-ops.ts +9 -18
- package/src/lib/index.ts +20 -4
- package/src/lib/loader.ts +28 -88
- package/src/lib/media-ops.ts +112 -0
- package/src/lib/nav-tree.ts +104 -4
- package/src/lib/nav.ts +196 -36
- package/src/lib/pages.ts +2 -3
- package/src/lib/platform-broker.ts +32 -14
- package/src/lib/reference-type.ts +3 -0
- package/src/lib/reference-validation.ts +69 -0
- package/src/lib/references.ts +130 -0
- package/src/lib/registry.ts +37 -0
- package/src/lib/sidecar-diagnostics.ts +29 -0
- package/src/lib/sidecars.ts +221 -0
- package/src/lib/slug.ts +6 -0
- package/src/lib/storage-tier.ts +38 -0
- package/src/lib/tags.ts +165 -0
- package/src/lib/theme-vars.ts +23 -0
- package/src/media/index.ts +1 -1
- package/src/media/queue.ts +3 -0
- package/src/media/utils.ts +19 -1
- package/src/media/{videoPoster.ts → video-poster.ts} +2 -2
- package/src/media/worker.ts +17 -8
- package/src/schemas/index.ts +1 -0
- package/src/schemas/media.ts +7 -2
- package/src/schemas/shared.ts +24 -1
- package/src/schemas/site-config.ts +6 -1
- package/src/schemas/tags.ts +33 -0
- package/src/storage/memory.ts +178 -0
- package/src/storage/types.ts +16 -3
- package/src/types/database.ts +2 -0
- package/dist/chunk-DNY72JZN.js +0 -86
- package/dist/chunk-F2LYQPXV.js +0 -77
- package/dist/chunk-JH762VUH.js +0 -128
- package/dist/chunk-K7DYZXVU.js +0 -138
- package/dist/components/primitives/defineHeadingSection.d.ts.map +0 -1
- package/dist/components/primitives/gridDrop.d.ts.map +0 -1
- package/dist/components/shared/UploadRejectionAlert.d.ts.map +0 -1
- package/dist/components/shell/BuildStatusIndicator.d.ts +0 -7
- package/dist/components/shell/BuildStatusIndicator.d.ts.map +0 -1
- package/dist/components/shell/blockMoveDispatch.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -9
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/lib/grid.d.ts +0 -2
- package/dist/lib/grid.d.ts.map +0 -1
- package/dist/lib/safeRedirect.d.ts.map +0 -1
- package/dist/media/videoPoster.d.ts.map +0 -1
- package/src/components/brandguide/ColorSwatchSettings.d.ts.map +0 -1
- package/src/components/brandguide/Colors.d.ts.map +0 -1
- package/src/components/primitives/CustomParagraph.d.ts.map +0 -1
- package/src/components/primitives/EditableGrid.d.ts.map +0 -1
- package/src/components/primitives/EditablePlainText.d.ts.map +0 -1
- package/src/components/primitives/EditableRichText.d.ts.map +0 -1
- package/src/components/primitives/HeadingSection.d.ts.map +0 -1
- package/src/components/primitives/IconPicker.d.ts.map +0 -1
- package/src/components/primitives/LinkPopover.d.ts.map +0 -1
- package/src/components/primitives/MediaSettingsForms.d.ts.map +0 -1
- package/src/components/primitives/ResolvedMedia.d.ts.map +0 -1
- package/src/components/primitives/RichTextToolbar.d.ts.map +0 -1
- package/src/components/primitives/tiptap-presets.d.ts.map +0 -1
- package/src/components/primitives/useEditableCollection.d.ts.map +0 -1
- package/src/components/primitives/useEditablePlainText.d.ts.map +0 -1
- package/src/components/primitives/useEditableRichText.d.ts.map +0 -1
- package/src/components/sections/Button/CTAButton.d.ts.map +0 -1
- package/src/components/sections/Button/index.d.ts.map +0 -1
- package/src/components/sections/Colors/index.d.ts.map +0 -1
- package/src/components/sections/IconList/IconList.d.ts.map +0 -1
- package/src/components/sections/IconList/IconListSettings.d.ts.map +0 -1
- package/src/components/sections/IconList/index.d.ts.map +0 -1
- package/src/components/sections/LinkHeading/index.d.ts.map +0 -1
- package/src/components/sections/Prose/Prose.d.ts.map +0 -1
- package/src/components/sections/Prose/index.d.ts.map +0 -1
- package/src/components/sections/SubHeading/index.d.ts.map +0 -1
- package/src/components/sections/SubSubHeading/index.d.ts.map +0 -1
- package/src/components/sections/register-schemas.d.ts.map +0 -1
- package/src/components/shared/Button.d.ts.map +0 -1
- package/src/components/shared/Checkbox.d.ts.map +0 -1
- package/src/components/shared/FormLabel.d.ts.map +0 -1
- package/src/components/shared/IconButton.d.ts.map +0 -1
- package/src/components/shared/Input.d.ts.map +0 -1
- package/src/components/shared/Select.d.ts.map +0 -1
- package/src/components/shared/icons.d.ts.map +0 -1
- package/src/components/shell/BuildStatusIndicator.tsx +0 -59
- package/src/components/shell/MediaLibraryContext.d.ts.map +0 -1
- package/src/hooks/index.ts +0 -8
- package/src/hooks/useResolvedMedia.d.ts.map +0 -1
- package/src/lib/cn.d.ts.map +0 -1
- package/src/lib/grid.d.ts.map +0 -1
- package/src/lib/grid.ts +0 -7
- package/src/lib/icons.d.ts.map +0 -1
- package/src/lib/loader.d.ts.map +0 -1
- package/src/lib/nav.d.ts.map +0 -1
- package/src/lib/registry.d.ts.map +0 -1
- package/src/lib/sanitize.d.ts.map +0 -1
- package/src/media/github.d.ts.map +0 -1
- package/src/media/index.d.ts.map +0 -1
- package/src/media/queue.d.ts.map +0 -1
- package/src/media/resolve.d.ts.map +0 -1
- package/src/media/types.d.ts.map +0 -1
- package/src/media/utils.d.ts.map +0 -1
- package/src/media/videoPoster.d.ts.map +0 -1
- package/src/schemas/auth.d.ts.map +0 -1
- package/src/schemas/media-grid-options.d.ts.map +0 -1
- package/src/schemas/media.d.ts.map +0 -1
- package/src/schemas/sections.d.ts.map +0 -1
- package/src/schemas/shared.d.ts.map +0 -1
- package/src/schemas/site-config.d.ts.map +0 -1
- /package/dist/{chunk-B7VBSE5X.js → chunk-3JDTXOIG.js} +0 -0
- /package/dist/{chunk-CXZ5YJG4.js → chunk-L45X7DKX.js} +0 -0
- /package/src/components/primitives/{gridDrop.ts → grid-drop.ts} +0 -0
- /package/src/components/shell/{blockMoveDispatch.ts → block-move-dispatch.ts} +0 -0
- /package/src/lib/{safeRedirect.ts → safe-redirect.ts} +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { ZodType } from "zod";
|
|
2
|
+
import { type NavEntry } from "../schemas/nav";
|
|
3
|
+
import { type TagEntry } from "../schemas/tags";
|
|
4
|
+
import type { SiteIndex } from "../schemas/site-config";
|
|
5
|
+
import type { SidecarDiagnostic } from "./sidecar-diagnostics";
|
|
6
|
+
export type { SidecarDiagnostic };
|
|
7
|
+
/**
|
|
8
|
+
* One definition per Sidecar — a content file kept beside index.json rather than
|
|
9
|
+
* on it, so a writer that predates it cannot drop it (CONTEXT.md). Every rule a
|
|
10
|
+
* caller would otherwise re-implement per file lives behind these: lenient
|
|
11
|
+
* parse, lifting the wire key off an index before IndexSchema strips it, and the
|
|
12
|
+
* two places the Sidecars genuinely differ — how a list is repaired against the
|
|
13
|
+
* index, and how concurrent edits rebase. Pure and browser-safe: the editor uses
|
|
14
|
+
* it during hydration, and callers do their own I/O.
|
|
15
|
+
*/
|
|
16
|
+
export interface SidecarDefinition<E> {
|
|
17
|
+
/** Also the key the Sidecar travels under on the wire (`index.nav`, `index.tags`). */
|
|
18
|
+
name: "nav" | "tags";
|
|
19
|
+
path: string;
|
|
20
|
+
/** The key holding the entry list inside the file. */
|
|
21
|
+
fileKey: "entries" | "tags";
|
|
22
|
+
entrySchema: ZodType<E>;
|
|
23
|
+
fileSchema: ZodType<unknown>;
|
|
24
|
+
/** Total, pure and idempotent; also reports what it repaired. */
|
|
25
|
+
reconcile(entries: E[], index: SiteIndex): {
|
|
26
|
+
entries: E[];
|
|
27
|
+
diagnostics: SidecarDiagnostic[];
|
|
28
|
+
};
|
|
29
|
+
/** The list after a collab rebase; `undefined` when no side carries one. */
|
|
30
|
+
rebase(args: {
|
|
31
|
+
base: E[] | undefined;
|
|
32
|
+
local: E[] | undefined;
|
|
33
|
+
remote: E[] | undefined;
|
|
34
|
+
}): E[] | undefined;
|
|
35
|
+
/** Words for a declined write's warning. */
|
|
36
|
+
words: {
|
|
37
|
+
/** What the file holds: "navigation entries". */
|
|
38
|
+
entries: string;
|
|
39
|
+
/** What did not land: "Page grouping changes". */
|
|
40
|
+
changes: string;
|
|
41
|
+
/** What a valid payload is: "a valid navigation tree". */
|
|
42
|
+
valid: string;
|
|
43
|
+
/** The expected wire shape, for an agent that sent the wrong one. */
|
|
44
|
+
shape: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export declare const NAV: SidecarDefinition<NavEntry>;
|
|
48
|
+
export declare const TAGS: SidecarDefinition<TagEntry>;
|
|
49
|
+
export declare const SIDECARS: readonly SidecarDefinition<unknown>[];
|
|
50
|
+
/**
|
|
51
|
+
* A Sidecar as read. `degraded` means the file was present but held something
|
|
52
|
+
* this package version could not represent, so `entries` is missing it: the read
|
|
53
|
+
* is a Degraded read, never to be cached, posted back, or written over the file.
|
|
54
|
+
*/
|
|
55
|
+
export type SidecarRead<E> = {
|
|
56
|
+
entries: E[];
|
|
57
|
+
degraded: boolean;
|
|
58
|
+
};
|
|
59
|
+
/** Read a parsed Sidecar file. Absent (null/undefined) is an empty list, not degraded. */
|
|
60
|
+
export declare function readSidecar<E>(def: SidecarDefinition<E>, file: unknown): SidecarRead<E>;
|
|
61
|
+
/**
|
|
62
|
+
* Read a Sidecar file's raw text. Present-but-unparseable JSON is degraded, not
|
|
63
|
+
* absent: a site whose nav.json is corrupt still has groups, and treating it as
|
|
64
|
+
* "never had any" would let a writer replace them.
|
|
65
|
+
*/
|
|
66
|
+
export declare function readSidecarText<E>(def: SidecarDefinition<E>, text: string | undefined): SidecarRead<E>;
|
|
67
|
+
/**
|
|
68
|
+
* Lift the Sidecars off an index as it arrives on the wire, BEFORE anything
|
|
69
|
+
* parses it with IndexSchema — the parse strips unknown keys, and an index
|
|
70
|
+
* round-tripped through it has lost its Sidecars. A key the index does not carry
|
|
71
|
+
* is `undefined` (omitted: writers leave the file alone); a carried key is read
|
|
72
|
+
* with the file's per-entry leniency, into fresh objects that never alias the
|
|
73
|
+
* caller's.
|
|
74
|
+
*/
|
|
75
|
+
export declare function liftSidecars(rawIndex: unknown): {
|
|
76
|
+
nav?: SidecarRead<NavEntry>;
|
|
77
|
+
tags?: SidecarRead<TagEntry>;
|
|
78
|
+
};
|
|
79
|
+
/** The Sidecar file on the branch a write lands on, as the writer read it. */
|
|
80
|
+
export type SidecarFileState = {
|
|
81
|
+
kind: "absent";
|
|
82
|
+
} | {
|
|
83
|
+
kind: "present";
|
|
84
|
+
text: string;
|
|
85
|
+
}
|
|
86
|
+
/** The read itself failed, so nothing is known about the file. */
|
|
87
|
+
| {
|
|
88
|
+
kind: "unreadable";
|
|
89
|
+
};
|
|
90
|
+
export type SidecarWritePlan = {
|
|
91
|
+
action: "untouched";
|
|
92
|
+
} | {
|
|
93
|
+
action: "write";
|
|
94
|
+
path: string;
|
|
95
|
+
content: string;
|
|
96
|
+
}
|
|
97
|
+
/** Declined. The rest of the write still lands, so the warning is what tells the caller. */
|
|
98
|
+
| {
|
|
99
|
+
action: "skip";
|
|
100
|
+
warning: string;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* What a write does to one Sidecar file, given what was posted (from
|
|
104
|
+
* liftSidecars) and the file on the branch. Every Sidecar write REPLACES the
|
|
105
|
+
* file, and the posted list was built from what this package version could
|
|
106
|
+
* READ — so a file holding anything this version cannot fully parse (an entry
|
|
107
|
+
* from a newer package, or a corrupt file) is read-only: replacing it would
|
|
108
|
+
* destroy those entries with a clean write. The same holds for a posted
|
|
109
|
+
* Degraded read.
|
|
110
|
+
*
|
|
111
|
+
* Emptiness is judged on the POSTED list, before reconcile: an empty list never
|
|
112
|
+
* creates a file (every editor save carries the Sidecars, and nav's reconcile
|
|
113
|
+
* would turn [] into the page list), while an empty list over an existing file
|
|
114
|
+
* replaces it wholesale. A written list is reconciled against the index being
|
|
115
|
+
* written, so it never names a page or section that write removed.
|
|
116
|
+
*/
|
|
117
|
+
export declare function planSidecarWrite<E>(def: SidecarDefinition<E>, posted: SidecarRead<E> | undefined, branch: SidecarFileState, index: SiteIndex): SidecarWritePlan;
|
|
118
|
+
//# sourceMappingURL=sidecars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidecars.d.ts","sourceRoot":"","sources":["../../src/lib/sidecars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAiC,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,sFAAsF;IACtF,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC,CA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
|
9
|
+
} from "../chunk-DJABADOO.js";
|
|
10
|
+
import "../chunk-DJOGPSRU.js";
|
|
11
|
+
import "../chunk-4WQ36ZP7.js";
|
|
12
|
+
import "../chunk-GNF6KFQ7.js";
|
|
13
|
+
import "../chunk-4Y2JQQZL.js";
|
|
14
|
+
import "../chunk-JSBRDJBE.js";
|
|
15
|
+
export {
|
|
16
|
+
NAV,
|
|
17
|
+
SIDECARS,
|
|
18
|
+
TAGS,
|
|
19
|
+
liftSidecars,
|
|
20
|
+
planSidecarWrite,
|
|
21
|
+
readSidecar,
|
|
22
|
+
readSidecarText
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../src/lib/slug.ts"],"names":[],"mappings":"AAGA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DOCUMENT_GIT_MAX_BYTES, DOCUMENT_BUCKET_MAX_BYTES } from "../schemas/documents";
|
|
2
|
+
import { MEDIA_GIT_MAX_BYTES, MEDIA_BUCKET_MAX_BYTES, type MediaConfig } from "../schemas/media";
|
|
3
|
+
export { DOCUMENT_GIT_MAX_BYTES, DOCUMENT_BUCKET_MAX_BYTES, MEDIA_GIT_MAX_BYTES, MEDIA_BUCKET_MAX_BYTES };
|
|
4
|
+
/**
|
|
5
|
+
* The MCP connector's own document ceiling, half the bucket cap. The binding
|
|
6
|
+
* constraint is memory, not time: a presigned PUT cannot stream, so the whole
|
|
7
|
+
* body is buffered (peak about 2x the file). The browser path has no such
|
|
8
|
+
* limit because those bytes never pass through a function.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DOCUMENT_CONNECTOR_MAX_BYTES = 104857600;
|
|
11
|
+
export type StorageTier = "git" | "bucket" | "too_large";
|
|
12
|
+
type MediaLimits = Pick<MediaConfig, "maxFileSize" | "maxAssetSize">;
|
|
13
|
+
/** Media limits come from the site's `media` config; documents' are fixed. */
|
|
14
|
+
export declare function tierFor(kind: "document" | "media", bytes: number, media?: MediaLimits): StorageTier;
|
|
15
|
+
/** "2.5 MB", "100 MB" — one decimal at most, in binary megabytes. */
|
|
16
|
+
export declare function formatBytes(bytes: number): string;
|
|
17
|
+
//# sourceMappingURL=storage-tier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-tier.d.ts","sourceRoot":"","sources":["../../src/lib/storage-tier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAOjG,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,CAAC;AAE1G;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,YAAc,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzD,KAAK,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,cAAc,CAAC,CAAC;AAErE,8EAA8E;AAC9E,wBAAgB,OAAO,CACrB,IAAI,EAAE,UAAU,GAAG,OAAO,EAC1B,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,WAAwF,GAC9F,WAAW,CAKb;AAED,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MEDIA_BUCKET_MAX_BYTES,
|
|
3
|
+
MEDIA_GIT_MAX_BYTES
|
|
4
|
+
} from "../chunk-APIJPTFG.js";
|
|
5
|
+
import {
|
|
6
|
+
DOCUMENT_BUCKET_MAX_BYTES,
|
|
7
|
+
DOCUMENT_GIT_MAX_BYTES
|
|
8
|
+
} from "../chunk-BS5AQHZG.js";
|
|
9
|
+
import "../chunk-JSBRDJBE.js";
|
|
10
|
+
|
|
11
|
+
// src/lib/storage-tier.ts
|
|
12
|
+
var DOCUMENT_CONNECTOR_MAX_BYTES = 104857600;
|
|
13
|
+
function tierFor(kind, bytes, media = { maxFileSize: MEDIA_GIT_MAX_BYTES, maxAssetSize: MEDIA_BUCKET_MAX_BYTES }) {
|
|
14
|
+
const [gitMax, bucketMax] = kind === "document" ? [DOCUMENT_GIT_MAX_BYTES, DOCUMENT_BUCKET_MAX_BYTES] : [media.maxFileSize, media.maxAssetSize];
|
|
15
|
+
if (bytes <= gitMax) return "git";
|
|
16
|
+
return bytes <= bucketMax ? "bucket" : "too_large";
|
|
17
|
+
}
|
|
18
|
+
function formatBytes(bytes) {
|
|
19
|
+
return `${Math.round(bytes / 1024 / 1024 * 10) / 10} MB`;
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
DOCUMENT_BUCKET_MAX_BYTES,
|
|
23
|
+
DOCUMENT_CONNECTOR_MAX_BYTES,
|
|
24
|
+
DOCUMENT_GIT_MAX_BYTES,
|
|
25
|
+
MEDIA_BUCKET_MAX_BYTES,
|
|
26
|
+
MEDIA_GIT_MAX_BYTES,
|
|
27
|
+
formatBytes,
|
|
28
|
+
tierFor
|
|
29
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { TagEntry } from "../schemas/tags";
|
|
2
|
+
import type { SiteIndex } from "../schemas/site-config";
|
|
3
|
+
import { type SidecarDiagnostic } from "./sidecar-diagnostics";
|
|
4
|
+
/**
|
|
5
|
+
* Repair the tag sidecar against the current section set.
|
|
6
|
+
*
|
|
7
|
+
* Total, pure, and idempotent — the same contract as reconcileNav, for the same
|
|
8
|
+
* reason: tags.json survives writers that do not know it exists, so it can name
|
|
9
|
+
* sections an older writer (or an agent) has since deleted, and the repair has
|
|
10
|
+
* to happen on read rather than by rejecting content. It is deliberately NOT a
|
|
11
|
+
* schema refinement: parse-rejecting content would leave the editor unable to
|
|
12
|
+
* load the site it needs to repair it.
|
|
13
|
+
*
|
|
14
|
+
* Drops assignments to sections absent from `sections`, duplicate section ids
|
|
15
|
+
* within a tag, duplicate tag ids (first wins), and tags with no usable id. A
|
|
16
|
+
* tag with no assignments left is KEPT — the registry outlives its sections.
|
|
17
|
+
* Every entry is rebuilt key by key, so the output always parses as a
|
|
18
|
+
* TagsFile and never shares structure with the input (the editor holds this in
|
|
19
|
+
* React state, where a shared array would let a later edit mutate prior state).
|
|
20
|
+
*/
|
|
21
|
+
export declare function reconcileTags(entries: TagEntry[], sections: SiteIndex["sections"]): TagEntry[];
|
|
22
|
+
/** reconcileTags plus what the repair changed — what a validator reports. */
|
|
23
|
+
export declare function reconcileTagsReport(entries: TagEntry[], sections: SiteIndex["sections"]): {
|
|
24
|
+
entries: TagEntry[];
|
|
25
|
+
diagnostics: SidecarDiagnostic[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The ONLY sanctioned way to read the tags. Always reconciles, so callers never
|
|
29
|
+
* reason about whether index.tags is present, stale, or names deleted sections.
|
|
30
|
+
*/
|
|
31
|
+
export declare function siteTags(index: SiteIndex): TagEntry[];
|
|
32
|
+
/** Display fallback for blank tag labels — mirrors groupDisplayLabel. */
|
|
33
|
+
export declare function tagDisplayLabel(label: string): string;
|
|
34
|
+
/** The tag already using this name (case- and whitespace-insensitive) — what
|
|
35
|
+
* an inline create reuses, and what the registry refuses to duplicate. */
|
|
36
|
+
export declare function findTagByLabel(tags: TagEntry[], label: string): TagEntry | null;
|
|
37
|
+
export declare function addTag(index: SiteIndex, id: string, label: string, sectionId?: string): SiteIndex;
|
|
38
|
+
export declare function renameTag(index: SiteIndex, id: string, label: string): SiteIndex;
|
|
39
|
+
export declare function deleteTag(index: SiteIndex, id: string): SiteIndex;
|
|
40
|
+
export declare function setSectionTagged(index: SiteIndex, sectionId: string, tagId: string, tagged: boolean): SiteIndex;
|
|
41
|
+
/**
|
|
42
|
+
* Three-way merge of the tag sidecar for the collab rebase.
|
|
43
|
+
*
|
|
44
|
+
* Nav's rebase rule is "the remote's persisted tree wins", which is safe there
|
|
45
|
+
* because grouping is edited rarely. Tags are edited from every section's
|
|
46
|
+
* chrome, so the same rule would silently drop unsaved tagging whenever a peer
|
|
47
|
+
* saved anything at all. Instead, local edits are diffed against the clean
|
|
48
|
+
* baseline (`base`) and replayed onto the remote:
|
|
49
|
+
* - a tag created locally is appended; one deleted locally is dropped;
|
|
50
|
+
* - a local rename wins, otherwise the remote label stands;
|
|
51
|
+
* - per (tag, section) pair, a local add or remove is replayed;
|
|
52
|
+
* - a tag the REMOTE deleted stays deleted, local assignments included —
|
|
53
|
+
* persisted state beats unsaved edits to a tag that no longer exists.
|
|
54
|
+
* With no baseline to diff against, the remote wins (nav's rule). A remote with
|
|
55
|
+
* no tags at all (an older server that does not attach the sidecar) leaves the
|
|
56
|
+
* local tags intact rather than wiping them. Inputs are never mutated; the
|
|
57
|
+
* result is not reconciled — readers do that through siteTags.
|
|
58
|
+
*/
|
|
59
|
+
export declare function mergeTags(args: {
|
|
60
|
+
base: TagEntry[] | undefined;
|
|
61
|
+
local: TagEntry[] | undefined;
|
|
62
|
+
remote: TagEntry[] | undefined;
|
|
63
|
+
}): TagEntry[] | undefined;
|
|
64
|
+
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/lib/tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAErF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,U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AG,QAAQ,EAAE,GAAG,SAAS,CAsCzB"}
|
package/dist/lib/theme-vars.d.ts
CHANGED
|
@@ -27,5 +27,14 @@ export declare function accentVarValue(c?: Partial<ThemeColorConfig> | null): st
|
|
|
27
27
|
* the two brand tokens: `color-mix(in srgb, var(--color-on-primary) 70%, var(--color-primary))`.
|
|
28
28
|
*/
|
|
29
29
|
export declare function onPrimaryVarValue(c?: Partial<ThemeColorConfig> | null): string;
|
|
30
|
+
/**
|
|
31
|
+
* The full inline `<html style>` string both `Layout.astro` and
|
|
32
|
+
* `LoginLayout.astro` set at SSR time — one assembly point for the 9 custom
|
|
33
|
+
* properties instead of the same template literal copied into both files.
|
|
34
|
+
* Byte-for-byte identical to what those files built inline before this
|
|
35
|
+
* existed; changing the property order or defaults here is a client-facing
|
|
36
|
+
* change to every site's `<html>` tag, not a refactor.
|
|
37
|
+
*/
|
|
38
|
+
export declare function themeStyle(siteConfig?: SiteConfig | null): string;
|
|
30
39
|
export {};
|
|
31
40
|
//# sourceMappingURL=theme-vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-vars.d.ts","sourceRoot":"","sources":["../../src/lib/theme-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"theme-vars.d.ts","sourceRoot":"","sources":["../../src/lib/theme-vars.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIzD;;;;;;;;;;GAUG;AACH,KAAK,gBAAgB,GAAG,IAAI,CAC1B,UAAU,EACV,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,qBAAqB,GAAG,UAAU,CAC7F,CAAC;AASF,wBAAgB,eAAe,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,GAAG,MAAM,CAE5E;AAED,wBAAgB,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,GAAG,MAAM,CAE3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,GAAG,MAAM,CAI9E;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,CAYjE"}
|
package/dist/media/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from "./provider";
|
|
|
4
4
|
export * from "./utils";
|
|
5
5
|
export * from "./queue";
|
|
6
6
|
export * from "./resolve";
|
|
7
|
-
export { generateVideoPoster } from "./
|
|
7
|
+
export { generateVideoPoster } from "./video-poster";
|
|
8
8
|
export { composePreviewImage, type PreviewImageInputs } from "./compose-preview";
|
|
9
9
|
export declare function setMediaProvider(p: MediaProvider): void;
|
|
10
10
|
export declare function getMediaProvider(): MediaProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAKjF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAEvD;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAMhD"}
|
package/dist/media/index.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BAKED_MEDIA_KEYS,
|
|
3
|
-
EXT_TO_MIME,
|
|
4
|
-
MIME_TO_EXT,
|
|
5
3
|
ProcessingQueue,
|
|
6
4
|
composePreviewImage,
|
|
7
|
-
displayFilename,
|
|
8
|
-
displayFilenameExt,
|
|
9
|
-
displayName,
|
|
10
|
-
formatFileSize,
|
|
11
5
|
generateVideoPoster,
|
|
12
6
|
getMediaProvider,
|
|
13
|
-
hashFileBuffer,
|
|
14
|
-
mimeToExt,
|
|
15
7
|
rebindImageRef,
|
|
16
8
|
resolveLogo,
|
|
17
9
|
resolveManifestReferences,
|
|
18
10
|
resolveMedia,
|
|
19
|
-
sanitizeMediaName,
|
|
20
11
|
setMediaProvider
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import
|
|
12
|
+
} from "../chunk-HHNPSKPT.js";
|
|
13
|
+
import {
|
|
14
|
+
EXT_TO_MIME,
|
|
15
|
+
MIME_TO_EXT,
|
|
16
|
+
displayFilename,
|
|
17
|
+
displayFilenameExt,
|
|
18
|
+
displayName,
|
|
19
|
+
formatFileSize,
|
|
20
|
+
hashFileBuffer,
|
|
21
|
+
imageThumbnailUrl,
|
|
22
|
+
mediaThumbnailUrl,
|
|
23
|
+
mimeToExt,
|
|
24
|
+
sanitizeMediaName
|
|
25
|
+
} from "../chunk-CDBURDPX.js";
|
|
26
|
+
import "../chunk-S7QRHUWO.js";
|
|
23
27
|
import {
|
|
24
28
|
ImageManifestSchema,
|
|
25
29
|
MediaConfigSchema,
|
|
26
30
|
MediaFolderSchema,
|
|
27
31
|
MediaItemSchema,
|
|
28
32
|
VariantSchema
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-4TZJZU2T.js";
|
|
31
|
-
import "../chunk-GGXZZ77Z.js";
|
|
33
|
+
} from "../chunk-APIJPTFG.js";
|
|
32
34
|
import "../chunk-JSBRDJBE.js";
|
|
33
35
|
export {
|
|
34
36
|
BAKED_MEDIA_KEYS,
|
|
@@ -48,6 +50,8 @@ export {
|
|
|
48
50
|
generateVideoPoster,
|
|
49
51
|
getMediaProvider,
|
|
50
52
|
hashFileBuffer,
|
|
53
|
+
imageThumbnailUrl,
|
|
54
|
+
mediaThumbnailUrl,
|
|
51
55
|
mimeToExt,
|
|
52
56
|
rebindImageRef,
|
|
53
57
|
resolveLogo,
|
package/dist/media/queue.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MediaKind } from "./types";
|
|
2
|
+
import type { ImageVariantPlan } from "../lib/image-variant-plan";
|
|
2
3
|
export interface QueueInput {
|
|
3
4
|
buffer: ArrayBuffer;
|
|
4
5
|
originalName: string;
|
|
@@ -26,6 +27,7 @@ export interface QueueItem {
|
|
|
26
27
|
posterBlob?: Blob;
|
|
27
28
|
width: number;
|
|
28
29
|
height: number;
|
|
30
|
+
plan?: ImageVariantPlan;
|
|
29
31
|
};
|
|
30
32
|
}
|
|
31
33
|
export type QueueEvent = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/media/queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/media/queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,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KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACtC;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,MAAM,CAAK;gBAEP,OAAO,EAAE,YAAY;IAIjC,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAkB9B,SAAS,IAAI;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,EAAE,CAAA;KAAE;IAelF,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,eAAe;IA+DvB,OAAO,CAAC,aAAa;IAKrB,OAAO,IAAI,IAAI;CAUhB"}
|
package/dist/media/utils.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare function sanitizeMediaName(name: string): string;
|
|
|
4
4
|
export declare const MIME_TO_EXT: Record<string, string>;
|
|
5
5
|
export declare const EXT_TO_MIME: Record<string, string>;
|
|
6
6
|
export declare function mimeToExt(mime: string): string;
|
|
7
|
+
export declare function mediaThumbnailUrl(item: MediaItem): string | null;
|
|
8
|
+
export declare function imageThumbnailUrl(item: MediaItem | undefined): string | null;
|
|
7
9
|
export declare function displayFilenameExt(mime: string): string;
|
|
8
10
|
export declare function displayFilename(originalName: string, mimeType: string): string;
|
|
9
11
|
export declare function formatFileSize(bytes: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/media/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK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AiB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAOhE;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAE5E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQ9E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,GAAG,MAAM,CAEzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-poster.d.ts","sourceRoot":"","sources":["../../src/media/video-poster.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAiFhF"}
|
package/dist/media/worker.d.ts
CHANGED
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
type: "process";
|
|
3
|
-
id: string;
|
|
4
|
-
buffer: ArrayBuffer;
|
|
5
|
-
originalName: string;
|
|
6
|
-
mimeType: string;
|
|
7
|
-
hash: string;
|
|
8
|
-
kind: "image" | "animated" | "video";
|
|
9
|
-
sizes: number[];
|
|
10
|
-
quality: number;
|
|
11
|
-
}
|
|
12
|
-
interface ProgressMessage {
|
|
13
|
-
type: "progress";
|
|
14
|
-
id: string;
|
|
15
|
-
percent: number;
|
|
16
|
-
}
|
|
17
|
-
interface CompleteMessage {
|
|
18
|
-
type: "complete";
|
|
19
|
-
id: string;
|
|
20
|
-
variants: {
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
size: number;
|
|
24
|
-
blob: Blob;
|
|
25
|
-
}[];
|
|
26
|
-
primaryBlob: Blob;
|
|
27
|
-
posterBlob?: Blob;
|
|
28
|
-
width: number;
|
|
29
|
-
height: number;
|
|
30
|
-
}
|
|
31
|
-
interface ErrorMessage {
|
|
32
|
-
type: "error";
|
|
33
|
-
id: string;
|
|
34
|
-
message: string;
|
|
35
|
-
}
|
|
1
|
+
export {};
|
|
36
2
|
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/media/worker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/media/worker.ts"],"names":[],"mappings":""}
|
package/dist/schemas/audience.js
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
ViewerUsernameSchema,
|
|
9
9
|
normalizeUsername,
|
|
10
10
|
slugifyAudienceName
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-S37DZPHW.js";
|
|
12
|
+
import "../chunk-AASEGXNT.js";
|
|
13
13
|
import "../chunk-JSBRDJBE.js";
|
|
14
14
|
export {
|
|
15
15
|
AudienceColorSchema,
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MediaGridOptionsSchema
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import {
|
|
5
|
-
NavEntrySchema,
|
|
6
|
-
NavFileSchema
|
|
7
|
-
} from "../chunk-REDDTTGJ.js";
|
|
3
|
+
} from "../chunk-3JDTXOIG.js";
|
|
8
4
|
import {
|
|
9
5
|
getSectionContentSchema,
|
|
10
6
|
getSectionSchema,
|
|
@@ -14,11 +10,7 @@ import {
|
|
|
14
10
|
ChatbotConfigSchema,
|
|
15
11
|
ChatbotTaskSchema,
|
|
16
12
|
DeckBuilderConfigSchema,
|
|
17
|
-
ImageManifestSchema,
|
|
18
13
|
IndexSchema,
|
|
19
|
-
MediaConfigSchema,
|
|
20
|
-
MediaFolderSchema,
|
|
21
|
-
MediaItemSchema,
|
|
22
14
|
PageSchema,
|
|
23
15
|
PageStatusSchema,
|
|
24
16
|
RESERVED_SLUGS,
|
|
@@ -26,10 +18,24 @@ import {
|
|
|
26
18
|
SectionMetaSchema,
|
|
27
19
|
SiteConfigSchema,
|
|
28
20
|
StatusSchema,
|
|
29
|
-
VariantSchema,
|
|
30
21
|
normalizeSiteIndex
|
|
31
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-67P34WNW.js";
|
|
32
23
|
import "../chunk-4TZJZU2T.js";
|
|
24
|
+
import {
|
|
25
|
+
NavEntrySchema,
|
|
26
|
+
NavFileSchema,
|
|
27
|
+
TagEntrySchema,
|
|
28
|
+
TagsFileSchema
|
|
29
|
+
} from "../chunk-4Y2JQQZL.js";
|
|
30
|
+
import {
|
|
31
|
+
ImageManifestSchema,
|
|
32
|
+
MEDIA_BUCKET_MAX_BYTES,
|
|
33
|
+
MEDIA_GIT_MAX_BYTES,
|
|
34
|
+
MediaConfigSchema,
|
|
35
|
+
MediaFolderSchema,
|
|
36
|
+
MediaItemSchema,
|
|
37
|
+
VariantSchema
|
|
38
|
+
} from "../chunk-APIJPTFG.js";
|
|
33
39
|
import "../chunk-FTPETWXE.js";
|
|
34
40
|
import {
|
|
35
41
|
AudienceSchema,
|
|
@@ -47,14 +53,15 @@ import {
|
|
|
47
53
|
ViewerUsernameSchema,
|
|
48
54
|
normalizeUsername,
|
|
49
55
|
slugifyAudienceName
|
|
50
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-S37DZPHW.js";
|
|
51
57
|
import {
|
|
52
58
|
FontNameSchema,
|
|
53
59
|
HexColorSchema,
|
|
60
|
+
ImageBackgroundSchema,
|
|
54
61
|
MediaReferenceSchema,
|
|
55
62
|
SingleMediaReferenceSchema,
|
|
56
63
|
TextLineSchema
|
|
57
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-AASEGXNT.js";
|
|
58
65
|
import "../chunk-NSCT3AMV.js";
|
|
59
66
|
import {
|
|
60
67
|
DEFAULT_LINK,
|
|
@@ -92,10 +99,13 @@ export {
|
|
|
92
99
|
DocumentManifestSchema,
|
|
93
100
|
FontNameSchema,
|
|
94
101
|
HexColorSchema,
|
|
102
|
+
ImageBackgroundSchema,
|
|
95
103
|
ImageManifestSchema,
|
|
96
104
|
IndexSchema,
|
|
97
105
|
LinkTargetSchema,
|
|
98
106
|
LinkValueSchema,
|
|
107
|
+
MEDIA_BUCKET_MAX_BYTES,
|
|
108
|
+
MEDIA_GIT_MAX_BYTES,
|
|
99
109
|
MediaConfigSchema,
|
|
100
110
|
MediaFolderSchema,
|
|
101
111
|
MediaGridOptionsSchema,
|
|
@@ -115,6 +125,8 @@ export {
|
|
|
115
125
|
SiteConfigSchema,
|
|
116
126
|
SiteUserSchema,
|
|
117
127
|
StatusSchema,
|
|
128
|
+
TagEntrySchema,
|
|
129
|
+
TagsFileSchema,
|
|
118
130
|
TextLineSchema,
|
|
119
131
|
VIEWER_PASSWORD_MIN_LENGTH,
|
|
120
132
|
VariantSchema,
|
package/dist/schemas/media.d.ts
CHANGED
|
@@ -76,6 +76,10 @@ export declare const ImageManifestSchema: z.ZodObject<{
|
|
|
76
76
|
}, z.core.$strip>>>;
|
|
77
77
|
}, z.core.$strip>;
|
|
78
78
|
export type MediaManifest = z.infer<typeof ImageManifestSchema>;
|
|
79
|
+
/** Default git-tier cap for media (bytes); a site may override it as `media.maxFileSize`. */
|
|
80
|
+
export declare const MEDIA_GIT_MAX_BYTES = 5242880;
|
|
81
|
+
/** Default bucket-tier cap for media (bytes); a site may override it as `media.maxAssetSize`. */
|
|
82
|
+
export declare const MEDIA_BUCKET_MAX_BYTES = 209715200;
|
|
79
83
|
export declare const MediaConfigSchema: z.ZodObject<{
|
|
80
84
|
sizes: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
|
|
81
85
|
maxFileSize: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/schemas/media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAIpD,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,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AAM,sBAAsB,YAAc,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;;;iBAO5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -108,5 +108,31 @@ export declare const SingleMediaReferenceSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
108
108
|
}, z.core.$strip>], "type">;
|
|
109
109
|
export type SingleMediaReference = z.infer<typeof SingleMediaReferenceSchema>;
|
|
110
110
|
export declare const HexColorSchema: z.ZodString;
|
|
111
|
+
declare const ImageBackgroundSurfaceSchema: z.ZodEnum<{
|
|
112
|
+
none: "none";
|
|
113
|
+
light: "light";
|
|
114
|
+
dark: "dark";
|
|
115
|
+
}>;
|
|
116
|
+
export type ImageBackgroundSurface = z.infer<typeof ImageBackgroundSurfaceSchema>;
|
|
117
|
+
/** Per-placement backdrop painted behind an image (e.g. a dark plate under a
|
|
118
|
+
* white transparent logo). Absent = no backdrop. */
|
|
119
|
+
export declare const ImageBackgroundSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
120
|
+
mode: z.ZodLiteral<"theme">;
|
|
121
|
+
light: z.ZodEnum<{
|
|
122
|
+
none: "none";
|
|
123
|
+
light: "light";
|
|
124
|
+
dark: "dark";
|
|
125
|
+
}>;
|
|
126
|
+
dark: z.ZodEnum<{
|
|
127
|
+
none: "none";
|
|
128
|
+
light: "light";
|
|
129
|
+
dark: "dark";
|
|
130
|
+
}>;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
mode: z.ZodLiteral<"custom">;
|
|
133
|
+
color: z.ZodString;
|
|
134
|
+
}, z.core.$strip>], "mode">;
|
|
135
|
+
export type ImageBackground = z.infer<typeof ImageBackgroundSchema>;
|
|
111
136
|
export declare const FontNameSchema: z.ZodString;
|
|
137
|
+
export {};
|
|
112
138
|
//# sourceMappingURL=shared.d.ts.map
|