@drawnagency/primitives 0.1.80 → 0.1.82
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-7XWER6YR.js → chunk-22GU6GNP.js} +3 -3
- package/dist/{chunk-4TVODHD2.js → chunk-5UDIQLGQ.js} +6 -6
- package/dist/{chunk-UNUJPLZV.js → chunk-6NRVX6NQ.js} +1 -1
- package/dist/{chunk-KVQFMVXE.js → chunk-DKXISNJ2.js} +2 -2
- package/dist/{chunk-RSITF24B.js → chunk-ETJYYUQX.js} +9 -3
- package/dist/{chunk-VI26O4E3.js → chunk-FDBZZ4AT.js} +1 -1
- package/dist/chunk-FM4M4Q2W.js +72 -0
- package/dist/{chunk-EMGLZQCM.js → chunk-MBJUWOM2.js} +1 -1
- package/dist/{chunk-2DDWWTRX.js → chunk-Q6LZOH5M.js} +1 -1
- package/dist/{chunk-QB5Q23G2.js → chunk-Y54G2XSC.js} +1 -1
- package/dist/{chunk-3LNKOLZP.js → chunk-YKOLOZB2.js} +1 -1
- package/dist/components/editor/PagesModal.d.ts +2 -0
- package/dist/components/editor/PagesModal.d.ts.map +1 -1
- package/dist/components/editor/index.js +6 -5
- package/dist/components/primitives/index.js +7 -6
- package/dist/components/sections/brand-guide.js +7 -6
- package/dist/components/sections/register-schemas.js +10 -9
- package/dist/components/sections/register.js +10 -9
- package/dist/components/shell/DocInspector.d.ts +18 -0
- package/dist/components/shell/DocInspector.d.ts.map +1 -0
- package/dist/components/shell/DocumentEditorOverlay.d.ts +29 -0
- package/dist/components/shell/DocumentEditorOverlay.d.ts.map +1 -0
- package/dist/components/shell/DocumentPresentOverlay.d.ts +30 -0
- package/dist/components/shell/DocumentPresentOverlay.d.ts.map +1 -0
- package/dist/components/shell/EditorShell.d.ts +34 -0
- package/dist/components/shell/EditorShell.d.ts.map +1 -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 +11 -0
- package/dist/document/components/DocCoverPage.d.ts.map +1 -0
- package/dist/document/components/DocPage.d.ts +10 -0
- package/dist/document/components/DocPage.d.ts.map +1 -0
- package/dist/document/components/DocRail.d.ts +28 -0
- package/dist/document/components/DocRail.d.ts.map +1 -0
- package/dist/document/components/DocSectionPage.d.ts +12 -0
- package/dist/document/components/DocSectionPage.d.ts.map +1 -0
- package/dist/document/components/DocViewer.d.ts +18 -0
- package/dist/document/components/DocViewer.d.ts.map +1 -0
- package/dist/document/components/Wordmark.d.ts +4 -0
- package/dist/document/components/Wordmark.d.ts.map +1 -0
- package/dist/document/components/measure.d.ts +7 -0
- package/dist/document/components/measure.d.ts.map +1 -0
- package/dist/document/components/useDocPages.d.ts +12 -0
- package/dist/document/components/useDocPages.d.ts.map +1 -0
- package/dist/document/engine/blocks.d.ts +2 -0
- package/dist/document/engine/blocks.d.ts.map +1 -0
- package/dist/document/engine/harvest.d.ts +3 -0
- package/dist/document/engine/harvest.d.ts.map +1 -0
- package/dist/document/engine/masonry.d.ts +26 -0
- package/dist/document/engine/masonry.d.ts.map +1 -0
- package/dist/document/engine/paginate.d.ts +43 -0
- package/dist/document/engine/paginate.d.ts.map +1 -0
- package/dist/document/engine/settings.d.ts +88 -0
- package/dist/document/engine/settings.d.ts.map +1 -0
- package/dist/document/engine/types.d.ts +44 -0
- package/dist/document/engine/types.d.ts.map +1 -0
- package/dist/document/index.d.ts +13 -0
- package/dist/document/index.d.ts.map +1 -0
- package/dist/document/index.js +965 -0
- package/dist/document/styles/document.css +217 -0
- package/dist/index.js +29 -28
- package/dist/lib/document-input.d.ts +25 -0
- package/dist/lib/document-input.d.ts.map +1 -0
- package/dist/lib/index.js +10 -9
- package/dist/lib/pages.d.ts +2 -0
- package/dist/lib/pages.d.ts.map +1 -1
- package/dist/media/index.js +4 -3
- package/dist/schemas/index.js +3 -2
- package/dist/schemas/site-config.d.ts +265 -1
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/components/editor/PagesModal.tsx +16 -2
- package/src/components/shell/DocInspector.tsx +323 -0
- package/src/components/shell/DocumentEditorOverlay.tsx +169 -0
- package/src/components/shell/DocumentPresentOverlay.tsx +87 -0
- package/src/components/shell/EditorShell.tsx +128 -5
- 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 +45 -0
- package/src/document/components/DocPage.tsx +40 -0
- package/src/document/components/DocRail.tsx +164 -0
- package/src/document/components/DocSectionPage.tsx +48 -0
- package/src/document/components/DocViewer.tsx +285 -0
- package/src/document/components/Wordmark.tsx +18 -0
- package/src/document/components/measure.tsx +117 -0
- package/src/document/components/useDocPages.ts +85 -0
- package/src/document/engine/blocks.ts +87 -0
- package/src/document/engine/harvest.ts +95 -0
- package/src/document/engine/masonry.ts +152 -0
- package/src/document/engine/paginate.ts +229 -0
- package/src/document/engine/settings.ts +88 -0
- package/src/document/engine/types.ts +64 -0
- package/src/document/index.ts +18 -0
- package/src/document/styles/document.css +217 -0
- package/src/lib/document-input.ts +57 -0
- package/src/lib/pages.ts +22 -0
- package/src/schemas/site-config.ts +22 -7
- /package/dist/{chunk-4YEOTFVU.js → chunk-YBVK254P.js} +0 -0
|
@@ -0,0 +1,217 @@
|
|
|
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; }
|
package/dist/index.js
CHANGED
|
@@ -12,19 +12,6 @@ import {
|
|
|
12
12
|
verifyAudienceToken,
|
|
13
13
|
verifySessionToken
|
|
14
14
|
} from "./chunk-EM5DFHDZ.js";
|
|
15
|
-
import {
|
|
16
|
-
CollabPeerSchema,
|
|
17
|
-
HEARTBEAT_INTERVAL_MS,
|
|
18
|
-
IndexUpdateMessageSchema,
|
|
19
|
-
LOCK_STALE_MS,
|
|
20
|
-
SavedMessageSchema,
|
|
21
|
-
SectionUpdateMessageSchema,
|
|
22
|
-
TakeoverMessageSchema
|
|
23
|
-
} from "./chunk-REM2NH7K.js";
|
|
24
|
-
import {
|
|
25
|
-
getCollabProvider,
|
|
26
|
-
setCollabProvider
|
|
27
|
-
} from "./chunk-2G2S36SY.js";
|
|
28
15
|
import {
|
|
29
16
|
BAKED_MEDIA_KEYS,
|
|
30
17
|
EXT_TO_MIME,
|
|
@@ -43,13 +30,26 @@ import {
|
|
|
43
30
|
resolveMedia,
|
|
44
31
|
sanitizeMediaName,
|
|
45
32
|
setMediaProvider
|
|
46
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YKOLOZB2.js";
|
|
34
|
+
import {
|
|
35
|
+
CollabPeerSchema,
|
|
36
|
+
HEARTBEAT_INTERVAL_MS,
|
|
37
|
+
IndexUpdateMessageSchema,
|
|
38
|
+
LOCK_STALE_MS,
|
|
39
|
+
SavedMessageSchema,
|
|
40
|
+
SectionUpdateMessageSchema,
|
|
41
|
+
TakeoverMessageSchema
|
|
42
|
+
} from "./chunk-REM2NH7K.js";
|
|
43
|
+
import {
|
|
44
|
+
getCollabProvider,
|
|
45
|
+
setCollabProvider
|
|
46
|
+
} from "./chunk-2G2S36SY.js";
|
|
47
47
|
import {
|
|
48
48
|
AudienceColorSchema,
|
|
49
49
|
AudienceNameSchema,
|
|
50
50
|
MediaGridOptionsSchema,
|
|
51
51
|
slugifyAudienceName
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-Y54G2XSC.js";
|
|
53
53
|
import {
|
|
54
54
|
AudienceSchema,
|
|
55
55
|
RoleSchema,
|
|
@@ -71,23 +71,17 @@ import {
|
|
|
71
71
|
loadStaticSiteContent,
|
|
72
72
|
mergeSiteContent,
|
|
73
73
|
safeRedirect
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-6NRVX6NQ.js";
|
|
75
|
+
import {
|
|
76
|
+
curatedIcons,
|
|
77
|
+
getIcon
|
|
78
|
+
} from "./chunk-WDSVHKAH.js";
|
|
75
79
|
import {
|
|
76
80
|
createEvent,
|
|
77
81
|
darkModeEvent,
|
|
78
82
|
editModeEvent,
|
|
79
83
|
navChangeEvent
|
|
80
84
|
} from "./chunk-677NTHAZ.js";
|
|
81
|
-
import {
|
|
82
|
-
isSameOriginRequest,
|
|
83
|
-
requireSessionSecret,
|
|
84
|
-
safeNextPath
|
|
85
|
-
} from "./chunk-S2L3BPLS.js";
|
|
86
|
-
import "./chunk-75P6HWPN.js";
|
|
87
|
-
import {
|
|
88
|
-
curatedIcons,
|
|
89
|
-
getIcon
|
|
90
|
-
} from "./chunk-WDSVHKAH.js";
|
|
91
85
|
import {
|
|
92
86
|
ensureSanitizer,
|
|
93
87
|
generateNavLinks,
|
|
@@ -97,9 +91,15 @@ import {
|
|
|
97
91
|
import {
|
|
98
92
|
cn
|
|
99
93
|
} from "./chunk-7EOSDFS3.js";
|
|
94
|
+
import {
|
|
95
|
+
isSameOriginRequest,
|
|
96
|
+
requireSessionSecret,
|
|
97
|
+
safeNextPath
|
|
98
|
+
} from "./chunk-S2L3BPLS.js";
|
|
100
99
|
import {
|
|
101
100
|
audiencePasses
|
|
102
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-YBVK254P.js";
|
|
102
|
+
import "./chunk-75P6HWPN.js";
|
|
103
103
|
import {
|
|
104
104
|
getSectionContentSchema,
|
|
105
105
|
getSectionSchema
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
TextLineSchema,
|
|
125
125
|
VariantSchema,
|
|
126
126
|
normalizeSiteIndex
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-ETJYYUQX.js";
|
|
128
128
|
import {
|
|
129
129
|
clearRegistry,
|
|
130
130
|
createRegistry,
|
|
@@ -136,6 +136,7 @@ import {
|
|
|
136
136
|
registerSchema,
|
|
137
137
|
registerSection
|
|
138
138
|
} from "./chunk-VKAGMEKE.js";
|
|
139
|
+
import "./chunk-FM4M4Q2W.js";
|
|
139
140
|
import "./chunk-NSCT3AMV.js";
|
|
140
141
|
import {
|
|
141
142
|
env
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MediaManifest } from "../schemas/media";
|
|
2
|
+
import type { Page } from "../schemas/site-config";
|
|
3
|
+
import type { LoadedSection } from "./loader";
|
|
4
|
+
import type { DocImage, DocSourceContent } from "../document";
|
|
5
|
+
/**
|
|
6
|
+
* Map a media manifest to the engine's pre-resolved image dictionary. Port of
|
|
7
|
+
* the harness's `portalImagesFrom` against the real MediaManifest type:
|
|
8
|
+
* - only `kind === "image"` entries (videos/animated skipped);
|
|
9
|
+
* - SVGs → `original.svg` for both preview and print;
|
|
10
|
+
* - other images: previewFile = largest variant ≤ 1080 (else the smallest),
|
|
11
|
+
* printFile = largest; images with zero variants are skipped.
|
|
12
|
+
* The manifest is already schema-parsed upstream, so no tolerant re-parse here.
|
|
13
|
+
*/
|
|
14
|
+
export declare function docImagesFrom(manifest: MediaManifest): Record<string, DocImage>;
|
|
15
|
+
/**
|
|
16
|
+
* Editor path: build the engine's source content from the caller's already-
|
|
17
|
+
* selected page + its draft sections, verbatim. No status/audience filtering —
|
|
18
|
+
* editors see everything (the shell passes in-memory draft content).
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildDraftDocumentInput(opts: {
|
|
21
|
+
page: Page;
|
|
22
|
+
sections: LoadedSection[];
|
|
23
|
+
manifest: MediaManifest;
|
|
24
|
+
}): DocSourceContent;
|
|
25
|
+
//# sourceMappingURL=document-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-input.d.ts","sourceRoot":"","sources":["../../src/lib/document-input.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAmB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/E;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAe/E;AAMD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;CACzB,GAAG,gBAAgB,CAOnB"}
|
package/dist/lib/index.js
CHANGED
|
@@ -7,19 +7,17 @@ import {
|
|
|
7
7
|
loadStaticSiteContent,
|
|
8
8
|
mergeSiteContent,
|
|
9
9
|
safeRedirect
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-6NRVX6NQ.js";
|
|
11
|
+
import {
|
|
12
|
+
curatedIcons,
|
|
13
|
+
getIcon
|
|
14
|
+
} from "../chunk-WDSVHKAH.js";
|
|
11
15
|
import {
|
|
12
16
|
createEvent,
|
|
13
17
|
darkModeEvent,
|
|
14
18
|
editModeEvent,
|
|
15
19
|
navChangeEvent
|
|
16
20
|
} from "../chunk-677NTHAZ.js";
|
|
17
|
-
import "../chunk-S2L3BPLS.js";
|
|
18
|
-
import "../chunk-75P6HWPN.js";
|
|
19
|
-
import {
|
|
20
|
-
curatedIcons,
|
|
21
|
-
getIcon
|
|
22
|
-
} from "../chunk-WDSVHKAH.js";
|
|
23
21
|
import {
|
|
24
22
|
ensureSanitizer,
|
|
25
23
|
generateNavLinks,
|
|
@@ -29,11 +27,13 @@ import {
|
|
|
29
27
|
import {
|
|
30
28
|
cn
|
|
31
29
|
} from "../chunk-7EOSDFS3.js";
|
|
30
|
+
import "../chunk-S2L3BPLS.js";
|
|
32
31
|
import {
|
|
33
32
|
audiencePasses
|
|
34
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-YBVK254P.js";
|
|
34
|
+
import "../chunk-75P6HWPN.js";
|
|
35
35
|
import "../chunk-TZQPOR5A.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-ETJYYUQX.js";
|
|
37
37
|
import {
|
|
38
38
|
clearRegistry,
|
|
39
39
|
createRegistry,
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
registerSchema,
|
|
46
46
|
registerSection
|
|
47
47
|
} from "../chunk-VKAGMEKE.js";
|
|
48
|
+
import "../chunk-FM4M4Q2W.js";
|
|
48
49
|
import "../chunk-NSCT3AMV.js";
|
|
49
50
|
import {
|
|
50
51
|
env
|
package/dist/lib/pages.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Page, SiteIndex, SectionMeta } from "../schemas/site-config";
|
|
2
|
+
import { type DocumentOptions } from "../document/engine/settings";
|
|
2
3
|
/**
|
|
3
4
|
* Display fallback for blank page titles. addPage creates pages with an empty
|
|
4
5
|
* title (the editor prompts for one), and closing the modal can leave it blank
|
|
@@ -16,6 +17,7 @@ export declare function reorderPages(index: SiteIndex, fromIndex: number, toInde
|
|
|
16
17
|
export declare function setHomePage(index: SiteIndex, pageId: string): SiteIndex;
|
|
17
18
|
export declare function setPageArchived(index: SiteIndex, pageId: string, archived: boolean): SiteIndex;
|
|
18
19
|
export declare function setPageFields(index: SiteIndex, pageId: string, patch: Partial<Pick<Page, "title" | "slug" | "showInNav">>): SiteIndex;
|
|
20
|
+
export declare function setPageDocument(index: SiteIndex, pageId: string, patch: Partial<DocumentOptions>): SiteIndex;
|
|
19
21
|
export declare function setPageAudience(index: SiteIndex, pageId: string, access: string[]): {
|
|
20
22
|
index: SiteIndex;
|
|
21
23
|
resetSectionIds: string[];
|
package/dist/lib/pages.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/lib/pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC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
16
|
resolveMedia,
|
|
17
17
|
sanitizeMediaName,
|
|
18
18
|
setMediaProvider
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-YKOLOZB2.js";
|
|
20
|
+
import "../chunk-YBVK254P.js";
|
|
21
21
|
import {
|
|
22
22
|
ImageManifestSchema,
|
|
23
23
|
MediaConfigSchema,
|
|
24
24
|
MediaFolderSchema,
|
|
25
25
|
MediaItemSchema,
|
|
26
26
|
VariantSchema
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-ETJYYUQX.js";
|
|
28
|
+
import "../chunk-FM4M4Q2W.js";
|
|
28
29
|
import "../chunk-JSBRDJBE.js";
|
|
29
30
|
export {
|
|
30
31
|
BAKED_MEDIA_KEYS,
|
package/dist/schemas/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
AudienceNameSchema,
|
|
4
4
|
MediaGridOptionsSchema,
|
|
5
5
|
slugifyAudienceName
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-Y54G2XSC.js";
|
|
7
7
|
import {
|
|
8
8
|
AudienceSchema,
|
|
9
9
|
RoleSchema,
|
|
@@ -40,8 +40,9 @@ import {
|
|
|
40
40
|
TextLineSchema,
|
|
41
41
|
VariantSchema,
|
|
42
42
|
normalizeSiteIndex
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-ETJYYUQX.js";
|
|
44
44
|
import "../chunk-VKAGMEKE.js";
|
|
45
|
+
import "../chunk-FM4M4Q2W.js";
|
|
45
46
|
import "../chunk-NSCT3AMV.js";
|
|
46
47
|
import "../chunk-JSBRDJBE.js";
|
|
47
48
|
export {
|