@drawnagency/primitives 0.1.118 → 0.1.120
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/dist/{chunk-O37AV27P.js → chunk-5JYHTHVR.js} +28 -0
- package/dist/{chunk-W72BPGR3.js → chunk-BZKHHUIN.js} +44 -8
- package/dist/{chunk-4NSOKEA7.js → chunk-HFHM4MNK.js} +12 -7
- package/dist/{chunk-CEFFP3CH.js → chunk-HZTPF6OK.js} +304 -83
- package/dist/{chunk-RIITGTV3.js → chunk-LQHBC7C6.js} +37 -2
- package/dist/{chunk-VY3IFGE3.js → chunk-QAMAIDXZ.js} +1 -1
- package/dist/{chunk-HRX3XJBU.js → chunk-RIN2QCYJ.js} +9 -11
- package/dist/{chunk-ZOTRHHUB.js → chunk-UNFPATDE.js} +8 -10
- package/dist/{chunk-ERLIL4RU.js → chunk-UZBFVVTC.js} +35 -37
- package/dist/{chunk-67P34WNW.js → chunk-ZKVQMIMJ.js} +3 -20
- package/dist/collab/rebase.js +4 -5
- package/dist/components/chat/ChatComposer.d.ts +0 -4
- package/dist/components/chat/ChatComposer.d.ts.map +1 -1
- package/dist/components/chat/ChatPanel.d.ts +2 -3
- package/dist/components/chat/ChatPanel.d.ts.map +1 -1
- package/dist/components/chat/markdown.d.ts +2 -3
- package/dist/components/chat/markdown.d.ts.map +1 -1
- package/dist/components/editor/AudienceIndicator.d.ts +3 -1
- package/dist/components/editor/AudienceIndicator.d.ts.map +1 -1
- package/dist/components/editor/IndicatorPill.d.ts +3 -1
- package/dist/components/editor/IndicatorPill.d.ts.map +1 -1
- package/dist/components/editor/PagesModal.d.ts +0 -2
- package/dist/components/editor/PagesModal.d.ts.map +1 -1
- package/dist/components/editor/SectionBulkEditModal.d.ts +25 -0
- package/dist/components/editor/SectionBulkEditModal.d.ts.map +1 -0
- package/dist/components/editor/StatusIndicator.d.ts +3 -1
- package/dist/components/editor/StatusIndicator.d.ts.map +1 -1
- package/dist/components/editor/index.js +28 -26
- package/dist/components/primitives/index.js +11 -15
- package/dist/components/sections/brand-guide.js +10 -13
- package/dist/components/sections/register-schemas.js +16 -21
- package/dist/components/sections/register.js +16 -21
- package/dist/components/shared/Popover.d.ts +1 -1
- package/dist/components/shared/Popover.d.ts.map +1 -1
- package/dist/components/shared/SectionSummaryRow.d.ts +1 -1
- package/dist/components/shell/AudienceChips.d.ts +1 -3
- package/dist/components/shell/AudienceChips.d.ts.map +1 -1
- package/dist/components/shell/EditorModal.d.ts.map +1 -1
- package/dist/components/shell/EditorShell.d.ts +0 -34
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsModal.d.ts.map +1 -1
- package/dist/hooks/useSortableNavRow.d.ts +1 -1
- package/dist/hooks/useSortableRow.d.ts +1 -1
- package/dist/index.js +83 -90
- package/dist/lib/index-ops.js +5 -6
- package/dist/lib/index.js +27 -32
- package/dist/lib/pages.d.ts +0 -2
- package/dist/lib/pages.d.ts.map +1 -1
- package/dist/lib/sidecars.js +2 -2
- package/dist/lib/site-validation.js +13 -14
- package/dist/lib/storage-tier.js +4 -4
- package/dist/schemas/index.js +42 -45
- package/dist/schemas/site-config.d.ts +1 -277
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/package.json +2 -42
- package/src/components/chat/ChatComposer.tsx +0 -4
- package/src/components/chat/ChatPanel.tsx +2 -3
- package/src/components/chat/markdown.ts +2 -3
- package/src/components/editor/AudienceIndicator.tsx +8 -4
- package/src/components/editor/IndicatorPill.tsx +4 -0
- package/src/components/editor/PagesModal.tsx +1 -15
- package/src/components/editor/SectionBulkEditModal.tsx +328 -0
- package/src/components/editor/StatusIndicator.tsx +7 -6
- package/src/components/shared/Popover.tsx +17 -4
- package/src/components/shared/SectionSummaryRow.tsx +1 -1
- package/src/components/shell/AudienceChips.tsx +1 -3
- package/src/components/shell/EditorModal.tsx +5 -2
- package/src/components/shell/EditorShell.tsx +15 -119
- package/src/components/shell/SiteSettingsModal.tsx +0 -11
- package/src/lib/pages.ts +0 -22
- package/src/schemas/index.ts +0 -4
- package/src/schemas/site-config.ts +4 -32
- package/dist/chunk-4TZJZU2T.js +0 -92
- package/dist/chunk-DIMDRBFK.js +0 -11
- package/dist/chunk-FV7JQRCN.js +0 -94
- package/dist/chunk-IIDKW7AV.js +0 -41
- package/dist/chunk-JCDZAFX2.js +0 -224
- package/dist/chunk-MM7KZS5C.js +0 -30
- package/dist/chunk-QQ3S3P5P.js +0 -38
- package/dist/chunk-TEOAKGZA.js +0 -784
- package/dist/chunk-VAYZJKVR.js +0 -209
- package/dist/components/editor/SectionOrderingModal.d.ts +0 -10
- package/dist/components/editor/SectionOrderingModal.d.ts.map +0 -1
- package/dist/components/shell/DocInspector.d.ts +0 -18
- package/dist/components/shell/DocInspector.d.ts.map +0 -1
- package/dist/components/shell/DocumentEditorOverlay.d.ts +0 -29
- package/dist/components/shell/DocumentEditorOverlay.d.ts.map +0 -1
- package/dist/components/shell/DocumentPresentOverlay.d.ts +0 -30
- package/dist/components/shell/DocumentPresentOverlay.d.ts.map +0 -1
- package/dist/components/shell/SiteSettingsDecks.d.ts +0 -13
- package/dist/components/shell/SiteSettingsDecks.d.ts.map +0 -1
- package/dist/deck/DeckComponentView.d.ts +0 -13
- package/dist/deck/DeckComponentView.d.ts.map +0 -1
- package/dist/deck/DeckPlayer.d.ts +0 -26
- package/dist/deck/DeckPlayer.d.ts.map +0 -1
- package/dist/deck/DeckSlideView.d.ts +0 -17
- package/dist/deck/DeckSlideView.d.ts.map +0 -1
- package/dist/deck/DeckStage.d.ts +0 -16
- package/dist/deck/DeckStage.d.ts.map +0 -1
- package/dist/deck/components/DeckImage.d.ts +0 -14
- package/dist/deck/components/DeckImage.d.ts.map +0 -1
- package/dist/deck/components/DeckImageGrid.d.ts +0 -27
- package/dist/deck/components/DeckImageGrid.d.ts.map +0 -1
- package/dist/deck/components/DeckRichText.d.ts +0 -22
- package/dist/deck/components/DeckRichText.d.ts.map +0 -1
- package/dist/deck/components/DeckVideo.d.ts +0 -15
- package/dist/deck/components/DeckVideo.d.ts.map +0 -1
- package/dist/deck/editing.d.ts +0 -50
- package/dist/deck/editing.d.ts.map +0 -1
- package/dist/deck/flip.d.ts +0 -11
- package/dist/deck/flip.d.ts.map +0 -1
- package/dist/deck/index.d.ts +0 -24
- package/dist/deck/index.d.ts.map +0 -1
- package/dist/deck/index.js +0 -51
- package/dist/deck/layouts/CenteredTextLayout.d.ts +0 -12
- package/dist/deck/layouts/CenteredTextLayout.d.ts.map +0 -1
- package/dist/deck/layouts/ColumnSplitLayout.d.ts +0 -14
- package/dist/deck/layouts/ColumnSplitLayout.d.ts.map +0 -1
- package/dist/deck/layouts/FullBleedImageLayout.d.ts +0 -14
- package/dist/deck/layouts/FullBleedImageLayout.d.ts.map +0 -1
- package/dist/deck/media.d.ts +0 -33
- package/dist/deck/media.d.ts.map +0 -1
- package/dist/deck/tokens.d.ts +0 -22
- package/dist/deck/tokens.d.ts.map +0 -1
- package/dist/deck/useStageScale.d.ts +0 -10
- package/dist/deck/useStageScale.d.ts.map +0 -1
- package/dist/deck-builder/DeckBuilderApp.d.ts +0 -30
- package/dist/deck-builder/DeckBuilderApp.d.ts.map +0 -1
- package/dist/deck-builder/DeckBuilderTopBar.d.ts +0 -24
- package/dist/deck-builder/DeckBuilderTopBar.d.ts.map +0 -1
- package/dist/deck-builder/DeckChatPanel.d.ts +0 -45
- package/dist/deck-builder/DeckChatPanel.d.ts.map +0 -1
- package/dist/deck-builder/DeckEditor.d.ts +0 -37
- package/dist/deck-builder/DeckEditor.d.ts.map +0 -1
- package/dist/deck-builder/DeckLibrary.d.ts +0 -22
- package/dist/deck-builder/DeckLibrary.d.ts.map +0 -1
- package/dist/deck-builder/DeckSlideSurface.d.ts +0 -31
- package/dist/deck-builder/DeckSlideSurface.d.ts.map +0 -1
- package/dist/deck-builder/deck-api.d.ts +0 -76
- package/dist/deck-builder/deck-api.d.ts.map +0 -1
- package/dist/deck-builder/deck-chat-client.d.ts +0 -44
- package/dist/deck-builder/deck-chat-client.d.ts.map +0 -1
- package/dist/deck-builder/deck-chat-history.d.ts +0 -10
- package/dist/deck-builder/deck-chat-history.d.ts.map +0 -1
- package/dist/deck-builder/index.d.ts +0 -13
- package/dist/deck-builder/index.d.ts.map +0 -1
- package/dist/deck-builder/index.js +0 -1498
- package/dist/deck-builder/starter-deck.d.ts +0 -23
- package/dist/deck-builder/starter-deck.d.ts.map +0 -1
- package/dist/deck-builder/types.d.ts +0 -29
- package/dist/deck-builder/types.d.ts.map +0 -1
- package/dist/deck-builder/useSortableSlide.d.ts +0 -29
- package/dist/deck-builder/useSortableSlide.d.ts.map +0 -1
- package/dist/document/assets/fonts/albra-grotesk-bold.woff +0 -0
- package/dist/document/assets/fonts/albra-grotesk-regular.woff +0 -0
- package/dist/document/assets/fonts/kapra-neue-expanded-medium.woff +0 -0
- package/dist/document/assets/fonts/kapra-neue-expanded-regular.woff +0 -0
- package/dist/document/components/DocCoverPage.d.ts +0 -11
- package/dist/document/components/DocCoverPage.d.ts.map +0 -1
- package/dist/document/components/DocPage.d.ts +0 -10
- package/dist/document/components/DocPage.d.ts.map +0 -1
- package/dist/document/components/DocRail.d.ts +0 -28
- package/dist/document/components/DocRail.d.ts.map +0 -1
- package/dist/document/components/DocSectionPage.d.ts +0 -12
- package/dist/document/components/DocSectionPage.d.ts.map +0 -1
- package/dist/document/components/DocViewer.d.ts +0 -21
- package/dist/document/components/DocViewer.d.ts.map +0 -1
- package/dist/document/components/Wordmark.d.ts +0 -4
- package/dist/document/components/Wordmark.d.ts.map +0 -1
- package/dist/document/components/measure.d.ts +0 -7
- package/dist/document/components/measure.d.ts.map +0 -1
- package/dist/document/components/useDocPages.d.ts +0 -12
- package/dist/document/components/useDocPages.d.ts.map +0 -1
- package/dist/document/engine/blocks.d.ts +0 -2
- package/dist/document/engine/blocks.d.ts.map +0 -1
- package/dist/document/engine/harvest.d.ts +0 -3
- package/dist/document/engine/harvest.d.ts.map +0 -1
- package/dist/document/engine/masonry.d.ts +0 -26
- package/dist/document/engine/masonry.d.ts.map +0 -1
- package/dist/document/engine/paginate.d.ts +0 -43
- package/dist/document/engine/paginate.d.ts.map +0 -1
- package/dist/document/engine/settings.d.ts +0 -91
- package/dist/document/engine/settings.d.ts.map +0 -1
- package/dist/document/engine/types.d.ts +0 -44
- package/dist/document/engine/types.d.ts.map +0 -1
- package/dist/document/index.d.ts +0 -13
- package/dist/document/index.d.ts.map +0 -1
- package/dist/document/index.js +0 -1030
- package/dist/document/styles/document.css +0 -217
- package/dist/lib/deck-access.d.ts +0 -86
- package/dist/lib/deck-access.d.ts.map +0 -1
- package/dist/lib/deck-access.js +0 -58
- package/dist/lib/deck-dexie.d.ts +0 -88
- package/dist/lib/deck-dexie.d.ts.map +0 -1
- package/dist/lib/deck-dexie.js +0 -22
- package/dist/lib/deck-edit.d.ts +0 -67
- package/dist/lib/deck-edit.d.ts.map +0 -1
- package/dist/lib/deck-media-assets.d.ts +0 -27
- package/dist/lib/deck-media-assets.d.ts.map +0 -1
- package/dist/lib/deck-media-assets.js +0 -25
- package/dist/lib/deck-media-refs.d.ts +0 -35
- package/dist/lib/deck-media-refs.d.ts.map +0 -1
- package/dist/lib/deck-media-refs.js +0 -36
- package/dist/lib/deck-tool.d.ts +0 -25
- package/dist/lib/deck-tool.d.ts.map +0 -1
- package/dist/lib/deck-tool.js +0 -58
- package/dist/lib/document-input.d.ts +0 -25
- package/dist/lib/document-input.d.ts.map +0 -1
- package/dist/schemas/deck-meta.d.ts +0 -85
- package/dist/schemas/deck-meta.d.ts.map +0 -1
- package/dist/schemas/deck-meta.js +0 -64
- package/dist/schemas/deck.d.ts +0 -954
- package/dist/schemas/deck.d.ts.map +0 -1
- package/dist/schemas/deck.js +0 -65
- package/src/components/editor/SectionOrderingModal.tsx +0 -80
- package/src/components/shell/DocInspector.tsx +0 -314
- package/src/components/shell/DocumentEditorOverlay.tsx +0 -179
- package/src/components/shell/DocumentPresentOverlay.tsx +0 -87
- package/src/components/shell/SiteSettingsDecks.tsx +0 -41
- package/src/deck/DeckComponentView.tsx +0 -28
- package/src/deck/DeckPlayer.tsx +0 -166
- package/src/deck/DeckSlideView.tsx +0 -38
- package/src/deck/DeckStage.tsx +0 -39
- package/src/deck/components/DeckImage.tsx +0 -38
- package/src/deck/components/DeckImageGrid.tsx +0 -254
- package/src/deck/components/DeckRichText.tsx +0 -111
- package/src/deck/components/DeckVideo.tsx +0 -81
- package/src/deck/editing.tsx +0 -201
- package/src/deck/flip.ts +0 -70
- package/src/deck/index.ts +0 -30
- package/src/deck/layouts/CenteredTextLayout.tsx +0 -29
- package/src/deck/layouts/ColumnSplitLayout.tsx +0 -69
- package/src/deck/layouts/FullBleedImageLayout.tsx +0 -58
- package/src/deck/media.tsx +0 -46
- package/src/deck/tokens.ts +0 -57
- package/src/deck/useStageScale.ts +0 -44
- package/src/deck-builder/DeckBuilderApp.tsx +0 -572
- package/src/deck-builder/DeckBuilderTopBar.tsx +0 -62
- package/src/deck-builder/DeckChatPanel.tsx +0 -334
- package/src/deck-builder/DeckEditor.tsx +0 -258
- package/src/deck-builder/DeckLibrary.tsx +0 -195
- package/src/deck-builder/DeckSlideSurface.tsx +0 -55
- package/src/deck-builder/deck-api.ts +0 -177
- package/src/deck-builder/deck-chat-client.ts +0 -129
- package/src/deck-builder/deck-chat-history.ts +0 -62
- package/src/deck-builder/index.ts +0 -12
- package/src/deck-builder/starter-deck.ts +0 -86
- package/src/deck-builder/types.ts +0 -24
- package/src/deck-builder/useSortableSlide.ts +0 -102
- package/src/document/assets/fonts/albra-grotesk-bold.woff +0 -0
- package/src/document/assets/fonts/albra-grotesk-regular.woff +0 -0
- package/src/document/assets/fonts/kapra-neue-expanded-medium.woff +0 -0
- package/src/document/assets/fonts/kapra-neue-expanded-regular.woff +0 -0
- package/src/document/components/DocCoverPage.tsx +0 -45
- package/src/document/components/DocPage.tsx +0 -40
- package/src/document/components/DocRail.tsx +0 -189
- package/src/document/components/DocSectionPage.tsx +0 -48
- package/src/document/components/DocViewer.tsx +0 -313
- package/src/document/components/Wordmark.tsx +0 -18
- package/src/document/components/measure.tsx +0 -133
- package/src/document/components/useDocPages.ts +0 -95
- package/src/document/engine/blocks.ts +0 -116
- package/src/document/engine/harvest.ts +0 -95
- package/src/document/engine/masonry.ts +0 -158
- package/src/document/engine/paginate.ts +0 -232
- package/src/document/engine/settings.ts +0 -125
- package/src/document/engine/types.ts +0 -64
- package/src/document/index.ts +0 -18
- package/src/document/styles/document.css +0 -217
- package/src/lib/deck-access.ts +0 -132
- package/src/lib/deck-dexie.ts +0 -190
- package/src/lib/deck-edit.ts +0 -196
- package/src/lib/deck-media-assets.ts +0 -57
- package/src/lib/deck-media-refs.ts +0 -67
- package/src/lib/deck-tool.ts +0 -95
- package/src/lib/document-input.ts +0 -57
- package/src/schemas/deck-meta.ts +0 -88
- package/src/schemas/deck.ts +0 -478
- package/dist/{chunk-DJABADOO.js → chunk-AJ2QOAZI.js} +3 -3
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
/* Document artifact rendering — physical units only. This file styles the
|
|
2
|
-
artifact itself (editor canvas AND print route), so no Tailwind utilities
|
|
3
|
-
and no viewport-relative units. 11×17 tabloid landscape = 17in × 11in. */
|
|
4
|
-
|
|
5
|
-
/* ---- Drawn brand fonts ---------------------------------------------- */
|
|
6
|
-
/* Albra Grotesk (sans body) · Kapra Neue Expanded (uppercase labels).
|
|
7
|
-
Self-hosted, resolved relative to this file so bundlers can locate them
|
|
8
|
-
without a public root. */
|
|
9
|
-
@font-face {
|
|
10
|
-
font-family: "Albra Grotesk";
|
|
11
|
-
src: url("../assets/fonts/albra-grotesk-regular.woff") format("woff");
|
|
12
|
-
font-weight: 400;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
font-display: swap;
|
|
15
|
-
}
|
|
16
|
-
@font-face {
|
|
17
|
-
font-family: "Albra Grotesk";
|
|
18
|
-
src: url("../assets/fonts/albra-grotesk-bold.woff") format("woff");
|
|
19
|
-
font-weight: 600;
|
|
20
|
-
font-style: normal;
|
|
21
|
-
font-display: swap;
|
|
22
|
-
}
|
|
23
|
-
@font-face {
|
|
24
|
-
font-family: "Kapra Neue Expanded";
|
|
25
|
-
src: url("../assets/fonts/kapra-neue-expanded-regular.woff") format("woff");
|
|
26
|
-
font-weight: 400;
|
|
27
|
-
font-style: normal;
|
|
28
|
-
font-display: swap;
|
|
29
|
-
}
|
|
30
|
-
@font-face {
|
|
31
|
-
font-family: "Kapra Neue Expanded";
|
|
32
|
-
src: url("../assets/fonts/kapra-neue-expanded-medium.woff") format("woff");
|
|
33
|
-
font-weight: 700;
|
|
34
|
-
font-style: normal;
|
|
35
|
-
font-display: swap;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* ---- page chrome ------------------------------------------------------ */
|
|
39
|
-
|
|
40
|
-
.deck-page {
|
|
41
|
-
position: relative;
|
|
42
|
-
width: 17in;
|
|
43
|
-
height: 11in;
|
|
44
|
-
background: #fff;
|
|
45
|
-
color: #1a1a1a;
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.deck-chrome {
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: 0.5in;
|
|
52
|
-
left: 0.6in;
|
|
53
|
-
right: 0.6in;
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: flex-end;
|
|
56
|
-
justify-content: space-between;
|
|
57
|
-
border-bottom: 1px solid #1a1a1a;
|
|
58
|
-
padding-bottom: 0.1in;
|
|
59
|
-
z-index: 10;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.deck-crumb {
|
|
63
|
-
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
|
64
|
-
font-size: 9pt;
|
|
65
|
-
letter-spacing: 0.12em;
|
|
66
|
-
text-transform: uppercase;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* The wordmark SVG's viewBox includes an under-swash flourish below the
|
|
70
|
-
letters' baseline. The clip wrapper truncates the glyph so the hairline
|
|
71
|
-
rule slices INTO the letter bottoms (per the reference deck): the cut
|
|
72
|
-
falls at ~viewBox y=100.5 of 154.474 (0.407 / 0.625), removing the
|
|
73
|
-
under-swash, the D's descender loop, and the rounded letter bottoms.
|
|
74
|
-
The negative margin cancels .deck-chrome's padding-bottom so the cut
|
|
75
|
-
edge lands exactly on the rule, while the breadcrumb keeps its normal
|
|
76
|
-
gap above the rule. */
|
|
77
|
-
.deck-wordmark-clip {
|
|
78
|
-
height: 0.407in;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
margin-bottom: -0.1in;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.deck-wordmark {
|
|
84
|
-
height: 0.625in;
|
|
85
|
-
width: auto;
|
|
86
|
-
display: block;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.deck-body {
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: 1.35in;
|
|
92
|
-
left: 0.6in;
|
|
93
|
-
right: 0.6in;
|
|
94
|
-
bottom: 0.6in;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/* Bleed layouts (cover) paint the whole page; chrome layers above via
|
|
98
|
-
.deck-chrome's z-index — layering only, chrome treatment is untouched. */
|
|
99
|
-
.deck-bleed {
|
|
100
|
-
position: absolute;
|
|
101
|
-
inset: 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* ---- title card (document cover) --------------------------------------- */
|
|
105
|
-
|
|
106
|
-
.layout-titlecard {
|
|
107
|
-
position: absolute;
|
|
108
|
-
inset: 0;
|
|
109
|
-
color: #fff;
|
|
110
|
-
}
|
|
111
|
-
.layout-titlecard__masthead {
|
|
112
|
-
position: absolute;
|
|
113
|
-
top: 0.5in;
|
|
114
|
-
left: 0.6in;
|
|
115
|
-
right: 0.6in;
|
|
116
|
-
display: flex;
|
|
117
|
-
align-items: center;
|
|
118
|
-
gap: 0.3in;
|
|
119
|
-
}
|
|
120
|
-
.layout-titlecard__wordmark { height: 0.4in; width: auto; color: #fff; flex: none; }
|
|
121
|
-
.layout-titlecard__rule { flex: 1; height: 1px; background: #fff; }
|
|
122
|
-
/* Optional cover image: the band between the masthead rule (~1.1in) and the
|
|
123
|
-
title lockup (~3.2in from the page bottom). Image is 50% of the band's
|
|
124
|
-
height, natural aspect ratio, left-aligned to the content margin, its
|
|
125
|
-
center anchored at 45% of the band (top 20% + half of 50%). */
|
|
126
|
-
.layout-titlecard__image {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 1.1in;
|
|
129
|
-
bottom: 3.2in;
|
|
130
|
-
left: 0.6in;
|
|
131
|
-
right: 0.6in;
|
|
132
|
-
}
|
|
133
|
-
.layout-titlecard__image img {
|
|
134
|
-
position: absolute;
|
|
135
|
-
top: 20%;
|
|
136
|
-
left: 0;
|
|
137
|
-
height: 50%;
|
|
138
|
-
width: auto;
|
|
139
|
-
max-width: 100%;
|
|
140
|
-
object-fit: contain;
|
|
141
|
-
}
|
|
142
|
-
.layout-titlecard__lockup {
|
|
143
|
-
position: absolute;
|
|
144
|
-
left: 0.6in;
|
|
145
|
-
bottom: 1.1in;
|
|
146
|
-
right: 0.6in;
|
|
147
|
-
}
|
|
148
|
-
.layout-titlecard__title {
|
|
149
|
-
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
|
150
|
-
font-size: 40pt;
|
|
151
|
-
letter-spacing: 0.14em;
|
|
152
|
-
text-transform: uppercase;
|
|
153
|
-
margin: 0 0 0.25in;
|
|
154
|
-
}
|
|
155
|
-
.layout-titlecard__titlerule { display: block; width: 100%; height: 1px; margin-bottom: 0.18in; }
|
|
156
|
-
.layout-titlecard__label {
|
|
157
|
-
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
|
158
|
-
font-size: 10pt;
|
|
159
|
-
letter-spacing: 0.12em;
|
|
160
|
-
text-transform: uppercase;
|
|
161
|
-
margin: 0;
|
|
162
|
-
}
|
|
163
|
-
.layout-titlecard__date {
|
|
164
|
-
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
|
165
|
-
font-size: 10pt;
|
|
166
|
-
letter-spacing: 0.12em;
|
|
167
|
-
text-transform: uppercase;
|
|
168
|
-
margin: 0.04in 0 0;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* ---- document pages ----------------------------------------------------- */
|
|
172
|
-
|
|
173
|
-
.pdoc-title {
|
|
174
|
-
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
|
175
|
-
font-size: 22pt;
|
|
176
|
-
letter-spacing: 0.04em;
|
|
177
|
-
text-transform: uppercase;
|
|
178
|
-
margin: 0;
|
|
179
|
-
height: 0.9in; /* = DOC_GEOM.titleBandIn; keep in sync */
|
|
180
|
-
}
|
|
181
|
-
/* Sub-page context line inside the title band (uppercase inherits from
|
|
182
|
-
.pdoc-title). Sized to sit with the title within the fixed 0.9in band. */
|
|
183
|
-
.pdoc-kicker {
|
|
184
|
-
display: block;
|
|
185
|
-
font-size: 9pt;
|
|
186
|
-
letter-spacing: 0.12em;
|
|
187
|
-
color: #999999;
|
|
188
|
-
margin-bottom: 0.05in;
|
|
189
|
-
}
|
|
190
|
-
.pdoc-text { position: absolute; }
|
|
191
|
-
.pdoc-h2, .pdoc-h3 {
|
|
192
|
-
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
|
193
|
-
text-transform: uppercase;
|
|
194
|
-
letter-spacing: 0.04em;
|
|
195
|
-
line-height: 1.3;
|
|
196
|
-
margin: 0;
|
|
197
|
-
}
|
|
198
|
-
.pdoc-h2 { font-size: 14pt; }
|
|
199
|
-
.pdoc-h3 { font-size: 11pt; letter-spacing: 0.08em; }
|
|
200
|
-
.pdoc-prose {
|
|
201
|
-
font-family: "Albra Grotesk", Helvetica, Arial, sans-serif;
|
|
202
|
-
font-size: 12.5pt;
|
|
203
|
-
line-height: 1.55;
|
|
204
|
-
margin: 0;
|
|
205
|
-
}
|
|
206
|
-
/* Self-contained prose: renders identically with or without Tailwind
|
|
207
|
-
preflight. The editor loads preflight but the /print route and the
|
|
208
|
-
hidden measurer do not, so pin every element the upstream sanitizer
|
|
209
|
-
allows to zero margins and give lists explicit markers — otherwise
|
|
210
|
-
measured heights (and page counts) diverge across surfaces. */
|
|
211
|
-
.pdoc-prose :where(p, ul, ol, li, blockquote, h1, h2, h3, h4, h5, h6, pre, hr) { margin: 0; }
|
|
212
|
-
.pdoc-prose ul { list-style: disc; }
|
|
213
|
-
.pdoc-prose ol { list-style: decimal; }
|
|
214
|
-
.pdoc-prose ul, .pdoc-prose ol { padding-left: 0.25in; }
|
|
215
|
-
.pdoc-img { position: absolute; overflow: hidden; }
|
|
216
|
-
.pdoc-img img { width: 100%; height: 100%; display: block; }
|
|
217
|
-
.pdoc-measure { position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { DeckOwner } from "../schemas/deck-meta";
|
|
2
|
-
/**
|
|
3
|
-
* Who is asking. Built from the request's identity — a signed audience cookie
|
|
4
|
-
* (with the credential username when the site has named credentials) or an
|
|
5
|
-
* editor session — and deliberately NOT an Astro `locals`: the decision below
|
|
6
|
-
* is pure, so it is testable the way `audiencePasses` is.
|
|
7
|
-
*
|
|
8
|
-
* `audience` (no username) is the env-mode standalone case: a shared password
|
|
9
|
-
* per audience means there is no person to attribute to (ADR 0002).
|
|
10
|
-
*/
|
|
11
|
-
export type DeckIdentity = {
|
|
12
|
-
kind: "viewer";
|
|
13
|
-
username: string;
|
|
14
|
-
audience: string;
|
|
15
|
-
} | {
|
|
16
|
-
kind: "editor";
|
|
17
|
-
userId: string;
|
|
18
|
-
} | {
|
|
19
|
-
kind: "audience";
|
|
20
|
-
audience: string;
|
|
21
|
-
};
|
|
22
|
-
/** The owner to record on a deck this identity is creating. */
|
|
23
|
-
export declare function deckOwnerFor(identity: DeckIdentity): DeckOwner;
|
|
24
|
-
/**
|
|
25
|
-
* Ownership. Credential-keyed for viewers (the username is the person-level
|
|
26
|
-
* key — an audience change must not hand a deck to someone else, and must not
|
|
27
|
-
* take it away from its author), user-id-keyed for editors, and audience-keyed
|
|
28
|
-
* for the env-mode fallback.
|
|
29
|
-
*
|
|
30
|
-
* An audience-owned deck is owned by everyone in that audience, which is
|
|
31
|
-
* exactly the attribution loss ADR 0002 accepts for env-mode portals. The
|
|
32
|
-
* reverse does not hold: an identity with no username cannot claim a
|
|
33
|
-
* credential-owned deck.
|
|
34
|
-
*/
|
|
35
|
-
export declare function isDeckOwner(owner: DeckOwner, identity: DeckIdentity): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* May this identity see and change this deck? Owner, or any editor — editors
|
|
38
|
-
* are super-admins over every deck on the site regardless of audience config
|
|
39
|
-
* (feasibility decision 9).
|
|
40
|
-
*
|
|
41
|
-
* One function for read and for write because today they are the same rule:
|
|
42
|
-
* a deck is private to its owner (Deck Visibility). Audience grants and Public
|
|
43
|
-
* Links (#36/#37) widen READ only, and that is when the two split.
|
|
44
|
-
*/
|
|
45
|
-
export declare function canAccessDeck(owner: DeckOwner, identity: DeckIdentity): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* May this identity CREATE a deck? Editors always (super-admins); everyone else
|
|
48
|
-
* only from a deck-enabled audience — `deckBuilder.audiences`, strict opt-in
|
|
49
|
-
* exactly like `chatbot.audiences`, so an empty list means no viewer may.
|
|
50
|
-
*
|
|
51
|
-
* Creation rights are AUDIENCE-keyed while ownership of the result is
|
|
52
|
-
* CREDENTIAL-keyed (`deckOwnerFor`); the two deliberately do not share a key.
|
|
53
|
-
* An `audience` identity (env-mode standalone, shared password, no named
|
|
54
|
-
* credential) passes when its audience is listed: that is a deliberate opt-in
|
|
55
|
-
* by the editor, and the resulting deck is audience-owned — the attribution
|
|
56
|
-
* loss ADR 0002 accepts, not an accident. What the list prevents is the DEFAULT
|
|
57
|
-
* audience being enabled implicitly, i.e. anyone holding the site password
|
|
58
|
-
* writing to the client's repo.
|
|
59
|
-
*/
|
|
60
|
-
export declare function canCreateDeck(identity: DeckIdentity, deckAudiences: readonly string[]): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* The Deck Draft partition key for an identity.
|
|
63
|
-
*
|
|
64
|
-
* A Deck Draft lives in one browser until it is published (ADR 0002), and a
|
|
65
|
-
* browser PROFILE is shared between people far more often than an account is.
|
|
66
|
-
* Keyed by site alone, two viewers signing into the same portal on one machine
|
|
67
|
-
* saw each other's unpublished drafts in the grid, could open and read them,
|
|
68
|
-
* and could publish another person's never-published draft under their own
|
|
69
|
-
* ownership; a signed-out user's drafts simply waited for whoever came next.
|
|
70
|
-
*
|
|
71
|
-
* The partition mirrors `deckOwnerFor` exactly, so a draft can only ever be
|
|
72
|
-
* published under the identity that staged it.
|
|
73
|
-
*
|
|
74
|
-
* DIGESTED, not spelled out, because the value becomes an IndexedDB database
|
|
75
|
-
* NAME and any script on the origin can enumerate those — a raw username there
|
|
76
|
-
* would disclose who last used the browser. This is NOT a security boundary:
|
|
77
|
-
* IndexedDB is per-origin and isolates nothing between people sharing a
|
|
78
|
-
* profile. It bounds accidents, not somebody with the keyboard.
|
|
79
|
-
*
|
|
80
|
-
* Switching identity leaves the previous identity's database in place,
|
|
81
|
-
* untouched and unread. That is deliberate — the alternative is destroying a
|
|
82
|
-
* colleague's unpublished work on sign-in — so orphaned drafts persist until
|
|
83
|
-
* the browser's own storage eviction takes them.
|
|
84
|
-
*/
|
|
85
|
-
export declare function deckDraftScope(identity: DeckIdentity): string;
|
|
86
|
-
//# sourceMappingURL=deck-access.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deck-access.d.ts","sourceRoot":"","sources":["../../src/lib/deck-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3C,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAS9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO,CAS7E;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO,CAE/E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAG/F;AAgBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAW7D"}
|
package/dist/lib/deck-access.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import "../chunk-JSBRDJBE.js";
|
|
2
|
-
|
|
3
|
-
// src/lib/deck-access.ts
|
|
4
|
-
function deckOwnerFor(identity) {
|
|
5
|
-
switch (identity.kind) {
|
|
6
|
-
case "viewer":
|
|
7
|
-
return { kind: "viewer", username: identity.username, audience: identity.audience };
|
|
8
|
-
case "editor":
|
|
9
|
-
return { kind: "editor", userId: identity.userId };
|
|
10
|
-
case "audience":
|
|
11
|
-
return { kind: "audience", audience: identity.audience };
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function isDeckOwner(owner, identity) {
|
|
15
|
-
switch (owner.kind) {
|
|
16
|
-
case "viewer":
|
|
17
|
-
return identity.kind === "viewer" && identity.username === owner.username;
|
|
18
|
-
case "editor":
|
|
19
|
-
return identity.kind === "editor" && identity.userId === owner.userId;
|
|
20
|
-
case "audience":
|
|
21
|
-
return (identity.kind === "viewer" || identity.kind === "audience") && identity.audience === owner.audience;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function canAccessDeck(owner, identity) {
|
|
25
|
-
return identity.kind === "editor" || isDeckOwner(owner, identity);
|
|
26
|
-
}
|
|
27
|
-
function canCreateDeck(identity, deckAudiences) {
|
|
28
|
-
if (identity.kind === "editor") return true;
|
|
29
|
-
return deckAudiences.includes(identity.audience);
|
|
30
|
-
}
|
|
31
|
-
function digest(input) {
|
|
32
|
-
const half = (offset) => {
|
|
33
|
-
let hash = offset;
|
|
34
|
-
for (let i = 0; i < input.length; i++) {
|
|
35
|
-
hash ^= input.charCodeAt(i);
|
|
36
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
37
|
-
}
|
|
38
|
-
return hash.toString(16).padStart(8, "0");
|
|
39
|
-
};
|
|
40
|
-
return half(2166136261) + half(2147483647);
|
|
41
|
-
}
|
|
42
|
-
function deckDraftScope(identity) {
|
|
43
|
-
switch (identity.kind) {
|
|
44
|
-
case "viewer":
|
|
45
|
-
return digest(`viewer:${identity.username}@${identity.audience}`);
|
|
46
|
-
case "editor":
|
|
47
|
-
return digest(`editor:${identity.userId}`);
|
|
48
|
-
case "audience":
|
|
49
|
-
return digest(`audience:${identity.audience}`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
canAccessDeck,
|
|
54
|
-
canCreateDeck,
|
|
55
|
-
deckDraftScope,
|
|
56
|
-
deckOwnerFor,
|
|
57
|
-
isDeckOwner
|
|
58
|
-
};
|
package/dist/lib/deck-dexie.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { type Deck } from "../schemas/deck";
|
|
2
|
-
/**
|
|
3
|
-
* Deck Draft staging — the deck builder's half of the editor's unsaved-state
|
|
4
|
-
* model (`./dexie.ts`), and the reason the authoring loop performs no server
|
|
5
|
-
* writes at all (ADR 0002). A draft lives in this browser only until an
|
|
6
|
-
* explicit publish; nothing here ever talks to the network.
|
|
7
|
-
*
|
|
8
|
-
* A SEPARATE database from the editor's `brand-portal-{siteId}`, not a table on
|
|
9
|
-
* it. The builder is a VIEWER surface: opening the editor's connection from it
|
|
10
|
-
* would run the editor's upgrade chain (11 versions, several of which clear
|
|
11
|
-
* caches) in a viewer's browser, and would hold a connection open that blocks
|
|
12
|
-
* the editor's next schema bump. Nothing here needs the editor's rows.
|
|
13
|
-
*
|
|
14
|
-
* Keyed by site AND by identity scope (`deckDraftScope`). One browser profile
|
|
15
|
-
* routinely serves several people, and drafts are unpublished work — see that
|
|
16
|
-
* function for what the scope is, why it is a digest, and what happens to the
|
|
17
|
-
* databases an identity leaves behind.
|
|
18
|
-
*/
|
|
19
|
-
export interface DeckDraftRow {
|
|
20
|
-
/** Deck id — also the directory name on the decks branch. */
|
|
21
|
-
deckId: string;
|
|
22
|
-
deck: Deck;
|
|
23
|
-
/**
|
|
24
|
-
* The published version this draft was based on, and the `baseVersion` the
|
|
25
|
-
* next publish sends. `null` means the deck has never been published, which
|
|
26
|
-
* is exactly what POST /api/decks wants to be told to create it.
|
|
27
|
-
*/
|
|
28
|
-
baseVersion: string | null;
|
|
29
|
-
/**
|
|
30
|
-
* The published deck's serialized bytes AT `baseVersion`, or null when it has
|
|
31
|
-
* never been published. Stored rather than a dirty flag because the flag has
|
|
32
|
-
* to survive a reload, and re-deriving it would mean a server read — which is
|
|
33
|
-
* the one thing a draft must not need. Comparing bytes also makes an
|
|
34
|
-
* edit-then-undo correctly report "no unpublished changes".
|
|
35
|
-
*/
|
|
36
|
-
publishedText: string | null;
|
|
37
|
-
updatedAt: string;
|
|
38
|
-
}
|
|
39
|
-
export declare function initDeckDraftStore(siteId: string, scope: string): void;
|
|
40
|
-
/** Every staged draft, newest first. Drives the builder's deck grid. */
|
|
41
|
-
export declare function listDeckDrafts(): Promise<DeckDraftRow[]>;
|
|
42
|
-
export declare function getDeckDraft(deckId: string): Promise<DeckDraftRow | null>;
|
|
43
|
-
/**
|
|
44
|
-
* Stage a deck edit. `baseVersion`/`publishedText` are carried forward from the
|
|
45
|
-
* existing row rather than taken as arguments: an edit never changes what the
|
|
46
|
-
* server holds, and letting a caller pass them is how a draft would come to
|
|
47
|
-
* claim it was published when it was not.
|
|
48
|
-
*/
|
|
49
|
-
export declare function putDeckDraft(deck: Deck): Promise<DeckDraftRow>;
|
|
50
|
-
/**
|
|
51
|
-
* Record what the server now holds — after a publish, or after loading a
|
|
52
|
-
* published deck into the draft. The deck body is restated from `deck` so the
|
|
53
|
-
* row and its published baseline can never disagree.
|
|
54
|
-
*
|
|
55
|
-
* `updatedAt` is an argument because the two callers mean different things by
|
|
56
|
-
* it. A publish genuinely changed the deck, so "now" is right. Merely OPENING a
|
|
57
|
-
* published deck changes nothing, and stamping "now" there sorted it to the top
|
|
58
|
-
* of the grid — reading a deck must not reorder the library — so that caller
|
|
59
|
-
* passes the sidecar's own timestamp.
|
|
60
|
-
*/
|
|
61
|
-
export declare function markDeckDraftPublished(deck: Deck, version: string, updatedAt?: string): Promise<DeckDraftRow>;
|
|
62
|
-
/**
|
|
63
|
-
* Record a successful publish WITHOUT touching the working deck (#39).
|
|
64
|
-
*
|
|
65
|
-
* The difference from `markDeckDraftPublished` is the whole point: that
|
|
66
|
-
* function restates the body from its argument, which is a pre-request snapshot
|
|
67
|
-
* at the publish call site, so an edit landing during the round-trip was
|
|
68
|
-
* silently discarded. #35 could answer that with a lock because its only other
|
|
69
|
-
* writer was a chat turn; inline editing cannot — locking a text field the
|
|
70
|
-
* author is mid-word in is worse than the race it prevents.
|
|
71
|
-
*
|
|
72
|
-
* So this re-reads the row and writes back only the publish BASELINE: what the
|
|
73
|
-
* server now holds (`baseVersion`) and the bytes it holds (`publishedText`,
|
|
74
|
-
* serialized from the deck that was actually sent). `deck` stays whatever is
|
|
75
|
-
* current by now, which makes `hasUnpublishedChanges` correctly report the
|
|
76
|
-
* mid-flight edit as unpublished rather than losing it.
|
|
77
|
-
*
|
|
78
|
-
* Returns null when the row is gone (deleted during the round-trip) — recreating
|
|
79
|
-
* it would resurrect a deck the author just removed.
|
|
80
|
-
*/
|
|
81
|
-
export declare function recordDeckPublish(deckId: string, publishedDeck: Deck, version: string): Promise<DeckDraftRow | null>;
|
|
82
|
-
export declare function deleteDeckDraft(deckId: string): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Does this row differ from what was published? A never-published draft always
|
|
85
|
-
* has changes — there is nothing on the server to match.
|
|
86
|
-
*/
|
|
87
|
-
export declare function hasUnpublishedChanges(row: DeckDraftRow): boolean;
|
|
88
|
-
//# sourceMappingURL=deck-dexie.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deck-dexie.d.ts","sourceRoot":"","sources":["../../src/lib/deck-dexie.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,WAAW,YAAY;IAC3B,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACnB;AAkBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAUtE;AAOD,wEAAwE;AACxE,wBAAsB,cAAc,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAG9D;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAE/E;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAoBpE;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAUnH;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAsB1H;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAEhE"}
|
package/dist/lib/deck-dexie.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
deleteDeckDraft,
|
|
3
|
-
getDeckDraft,
|
|
4
|
-
hasUnpublishedChanges,
|
|
5
|
-
initDeckDraftStore,
|
|
6
|
-
listDeckDrafts,
|
|
7
|
-
markDeckDraftPublished,
|
|
8
|
-
putDeckDraft,
|
|
9
|
-
recordDeckPublish
|
|
10
|
-
} from "../chunk-FV7JQRCN.js";
|
|
11
|
-
import "../chunk-VAYZJKVR.js";
|
|
12
|
-
import "../chunk-JSBRDJBE.js";
|
|
13
|
-
export {
|
|
14
|
-
deleteDeckDraft,
|
|
15
|
-
getDeckDraft,
|
|
16
|
-
hasUnpublishedChanges,
|
|
17
|
-
initDeckDraftStore,
|
|
18
|
-
listDeckDrafts,
|
|
19
|
-
markDeckDraftPublished,
|
|
20
|
-
putDeckDraft,
|
|
21
|
-
recordDeckPublish
|
|
22
|
-
};
|
package/dist/lib/deck-edit.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type Deck, type DeckRichText, type DeckSlide } from "../schemas/deck";
|
|
2
|
-
/**
|
|
3
|
-
* Direct-manipulation edits to a Deck Draft (#39).
|
|
4
|
-
*
|
|
5
|
-
* Every operation here is PURE and ends in `parseDeck`, which is what makes
|
|
6
|
-
* "a manual edit is always schema-valid" a property of this module rather than
|
|
7
|
-
* of its callers. It also means the schema owns the refusals: duplicating past
|
|
8
|
-
* `DECK_MAX_SLIDES` and deleting the last slide are reported with the same
|
|
9
|
-
* messages the authoring loop's validation retry reads, not with a second copy
|
|
10
|
-
* of those rules written here.
|
|
11
|
-
*
|
|
12
|
-
* The scope line is the product decision recorded in CONTEXT.md — "chat
|
|
13
|
-
* authors, direct manipulation adjusts". There is deliberately no operation
|
|
14
|
-
* here that changes a Layout, adds or removes a Deck Component, or composes a
|
|
15
|
-
* grid. Text leaves and slide order are the whole vocabulary.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Which Deck Component within a slide's Layout. A slide-local coordinate: the
|
|
19
|
-
* runtime renders one slide and has no idea which one, so the slide index stays
|
|
20
|
-
* an argument at the call site.
|
|
21
|
-
*/
|
|
22
|
-
declare const DECK_TEXT_SLOTS: readonly ["content", "overlay", "left", "right"];
|
|
23
|
-
export type DeckTextSlot = (typeof DECK_TEXT_SLOTS)[number];
|
|
24
|
-
declare const DECK_TEXT_FIELDS: readonly ["kicker", "heading", "subheading", "paragraphs", "bullets"];
|
|
25
|
-
export type DeckTextField = (typeof DECK_TEXT_FIELDS)[number];
|
|
26
|
-
/**
|
|
27
|
-
* A single editable text LEAF — always a plain string in the schema.
|
|
28
|
-
*
|
|
29
|
-
* That "always a leaf" framing is what keeps inline editing free of a
|
|
30
|
-
* formatting UI without ever destroying a mark: a paragraph carrying spans is
|
|
31
|
-
* edited one span at a time (`span`), so `bold`/`italic` are untouched by an
|
|
32
|
-
* edit that only ever writes `text`. A plain-string line has no `span`.
|
|
33
|
-
*/
|
|
34
|
-
export interface DeckTextPath {
|
|
35
|
-
slot: DeckTextSlot;
|
|
36
|
-
field: DeckTextField;
|
|
37
|
-
/** Index into `paragraphs`/`bullets`. Absent for the three single-line fields. */
|
|
38
|
-
line?: number;
|
|
39
|
-
/** Index into that line's spans, when the line is a span run rather than a string. */
|
|
40
|
-
span?: number;
|
|
41
|
-
}
|
|
42
|
-
export type DeckEditResult = {
|
|
43
|
-
ok: true;
|
|
44
|
-
deck: Deck;
|
|
45
|
-
} | {
|
|
46
|
-
ok: false;
|
|
47
|
-
errors: string[];
|
|
48
|
-
};
|
|
49
|
-
/** The rich text a slot holds, or null when that slot holds something else. */
|
|
50
|
-
export declare function richTextAt(slide: DeckSlide, slot: DeckTextSlot): DeckRichText | null;
|
|
51
|
-
/**
|
|
52
|
-
* Commit an inline text edit.
|
|
53
|
-
*
|
|
54
|
-
* Rejecting (rather than clamping) an over-long or emptied field is deliberate:
|
|
55
|
-
* the caps are the schema's, and a silent truncation is an edit the author did
|
|
56
|
-
* not make. The caller shows the schema's own message and leaves the draft
|
|
57
|
-
* untouched.
|
|
58
|
-
*/
|
|
59
|
-
export declare function applyDeckTextEdit(deck: Deck, slideIndex: number, path: DeckTextPath, text: string): DeckEditResult;
|
|
60
|
-
/** Move a slide to a new index. `to` is the destination in the POST-removal list. */
|
|
61
|
-
export declare function moveDeckSlide(deck: Deck, from: number, to: number): DeckEditResult;
|
|
62
|
-
/** Duplicate a slide, inserting the copy directly after the original. */
|
|
63
|
-
export declare function duplicateDeckSlide(deck: Deck, index: number): DeckEditResult;
|
|
64
|
-
/** Remove a slide. Removing the only one is refused by the schema, by design. */
|
|
65
|
-
export declare function removeDeckSlide(deck: Deck, index: number): DeckEditResult;
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=deck-edit.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deck-edit.d.ts","sourceRoot":"","sources":["../../src/lib/deck-edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EAET,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAOH,QAAA,MAAM,eAAe,kDAAmD,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,QAAA,MAAM,gBAAgB,uEAAwE,CAAC;AAC/F,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAUxF,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,CAWpF;AA+CD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,CAgBlH;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc,CAOlF;AAgBD,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAU5E;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAIzE"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { DeckMediaAsset } from "../schemas/deck";
|
|
2
|
-
import type { MediaManifest } from "../media/types";
|
|
3
|
-
import type { MediaProvider } from "../media/provider";
|
|
4
|
-
/**
|
|
5
|
-
* The production side of the deck runtime's media seam: the site's image
|
|
6
|
-
* manifest, resolved to the `mediaAssets` map `DeckPlayer` takes.
|
|
7
|
-
*
|
|
8
|
-
* A MAP, not a `DeckMediaResolver` function, because the builder mounts across
|
|
9
|
-
* an Astro island boundary and a function prop cannot survive that trip. It is
|
|
10
|
-
* built server-side, where the manifest and the media provider live.
|
|
11
|
-
*
|
|
12
|
-
* This replaces the dev preview route's generated plates
|
|
13
|
-
* (`core/src/lib/dev-deck-preview.ts`), which stay exactly where they are —
|
|
14
|
-
* they keep that route working offline and with no GitHub credentials.
|
|
15
|
-
*/
|
|
16
|
-
export declare function deckMediaAssets(manifest: MediaManifest, sizes: number[], provider: MediaProvider,
|
|
17
|
-
/**
|
|
18
|
-
* The audience boundary, when the caller has one. Only these ids resolve.
|
|
19
|
-
*
|
|
20
|
-
* The builder's map must match the catalog the model is offered (#35, decided
|
|
21
|
-
* 2026-08-07) or the two disagree about what exists — and because this map
|
|
22
|
-
* travels as ISLAND PROPS, an unfiltered one also puts every asset's filename
|
|
23
|
-
* and alt text in the page source of a creator who cannot see those pages.
|
|
24
|
-
* Omitted means no filtering, which is what the dev preview route wants.
|
|
25
|
-
*/
|
|
26
|
-
allowIds?: ReadonlySet<string>): Record<string, DeckMediaAsset>;
|
|
27
|
-
//# sourceMappingURL=deck-media-assets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deck-media-assets.d.ts","sourceRoot":"","sources":["../../src/lib/deck-media-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,MAAM,EAAE,EACf,QAAQ,EAAE,aAAa;AACvB;;;;;;;;GAQG;AACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0BhC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import "../chunk-JSBRDJBE.js";
|
|
2
|
-
|
|
3
|
-
// src/lib/deck-media-assets.ts
|
|
4
|
-
function deckMediaAssets(manifest, sizes, provider, allowIds) {
|
|
5
|
-
const assets = {};
|
|
6
|
-
for (const [id, item] of Object.entries(manifest.images)) {
|
|
7
|
-
if (item.hidden) continue;
|
|
8
|
-
if (allowIds && !allowIds.has(id)) continue;
|
|
9
|
-
const resolved = provider.resolve(item, sizes);
|
|
10
|
-
if (!resolved) continue;
|
|
11
|
-
assets[id] = {
|
|
12
|
-
src: resolved.src,
|
|
13
|
-
alt: item.alt,
|
|
14
|
-
// The manifest always knows the intrinsic size, and supplying it is what
|
|
15
|
-
// lets the image grid reserve aspect-correct space before a byte loads.
|
|
16
|
-
width: resolved.width,
|
|
17
|
-
height: resolved.height,
|
|
18
|
-
...resolved.tag === "video" && resolved.poster ? { poster: resolved.poster } : {}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return assets;
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
deckMediaAssets
|
|
25
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every portal media reference a deck makes, extracted from RAW deck JSON.
|
|
3
|
-
*
|
|
4
|
-
* Publish-time GC builds its keep-set from the site's manifests and deletes
|
|
5
|
-
* every other bucket object (ADR 0002's "GC must learn the decks branch"), so a
|
|
6
|
-
* deck referencing an asset the editor later removed from portal content would
|
|
7
|
-
* otherwise have its media deleted underneath it.
|
|
8
|
-
*
|
|
9
|
-
* Deliberately untyped and structural rather than a walk over `Deck`: the media
|
|
10
|
-
* reference union lands with the image/grid components (#31), and this has to
|
|
11
|
-
* work the day it does without a second change here. It matches the union's
|
|
12
|
-
* discriminator shape — `{ kind: "portal", id: string }` — wherever it appears
|
|
13
|
-
* in the tree, at any depth, in any component. Staying schema-free is also what
|
|
14
|
-
* keeps this module off the deck-schema carrier list (tests/deck/viewer-isolation).
|
|
15
|
-
*/
|
|
16
|
-
/** One reference, with the path an author (or a model) can act on. */
|
|
17
|
-
export interface DeckMediaRefSite {
|
|
18
|
-
/** `slides[2].layout.media` — the ref object's own path, not its `id` field. */
|
|
19
|
-
path: string;
|
|
20
|
-
id: string;
|
|
21
|
-
}
|
|
22
|
-
export declare function deckMediaRefSites(deck: unknown): DeckMediaRefSite[];
|
|
23
|
-
export declare function deckMediaIds(deck: unknown): Set<string>;
|
|
24
|
-
/**
|
|
25
|
-
* Media references the catalog does not contain — the server-side half of media
|
|
26
|
-
* grounding (#35).
|
|
27
|
-
*
|
|
28
|
-
* The deck schema constrains a media id's CHARSET; only the catalog can say
|
|
29
|
-
* whether an id exists, so membership is checked here rather than in the schema
|
|
30
|
-
* (which is also read by the runtime, where no catalog is in hand). One line per
|
|
31
|
-
* offending reference, in the same `path: message` shape `formatDeckIssues`
|
|
32
|
-
* produces, so the authoring loop can hand both lists back in one tool_result.
|
|
33
|
-
*/
|
|
34
|
-
export declare function deckUnknownMediaIssues(deck: unknown, catalogIds: ReadonlySet<string>): string[];
|
|
35
|
-
//# sourceMappingURL=deck-media-refs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deck-media-refs.d.ts","sourceRoot":"","sources":["../../src/lib/deck-media-refs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAgBnE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAO/F"}
|