@drawnagency/primitives 0.1.81 → 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-ZEXR7JYQ.js → chunk-22GU6GNP.js} +1 -1
- package/dist/{chunk-P4ZNHZMP.js → chunk-5UDIQLGQ.js} +2 -2
- package/dist/{chunk-PJOHAWNV.js → chunk-6NRVX6NQ.js} +1 -1
- package/dist/{chunk-EVNEMJZ6.js → chunk-ETJYYUQX.js} +1 -1
- package/dist/{chunk-WP5UX4MI.js → chunk-FM4M4Q2W.js} +12 -3
- package/dist/{chunk-FN4NKUZU.js → chunk-Y54G2XSC.js} +1 -1
- package/dist/components/editor/index.js +2 -2
- package/dist/components/primitives/index.js +2 -2
- package/dist/components/sections/brand-guide.js +3 -3
- package/dist/components/sections/register-schemas.js +4 -4
- package/dist/components/sections/register.js +4 -4
- package/dist/components/shell/DocInspector.d.ts +1 -0
- package/dist/components/shell/DocInspector.d.ts.map +1 -1
- package/dist/components/shell/EditorShell.d.ts +3 -0
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/document/components/DocRail.d.ts +1 -0
- package/dist/document/components/DocRail.d.ts.map +1 -1
- package/dist/document/components/DocSectionPage.d.ts.map +1 -1
- package/dist/document/components/measure.d.ts +1 -0
- package/dist/document/components/measure.d.ts.map +1 -1
- package/dist/document/components/useDocPages.d.ts.map +1 -1
- package/dist/document/engine/harvest.d.ts +2 -2
- package/dist/document/engine/harvest.d.ts.map +1 -1
- package/dist/document/engine/masonry.d.ts +1 -0
- package/dist/document/engine/masonry.d.ts.map +1 -1
- package/dist/document/engine/paginate.d.ts +4 -1
- package/dist/document/engine/paginate.d.ts.map +1 -1
- package/dist/document/engine/settings.d.ts +18 -0
- package/dist/document/engine/settings.d.ts.map +1 -1
- package/dist/document/engine/types.d.ts +4 -0
- package/dist/document/engine/types.d.ts.map +1 -1
- package/dist/document/index.js +109 -25
- package/dist/document/styles/document.css +9 -0
- package/dist/index.js +4 -4
- package/dist/lib/index.js +3 -3
- package/dist/media/index.js +2 -2
- package/dist/schemas/index.js +3 -3
- package/dist/schemas/site-config.d.ts +42 -0
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/shell/DocInspector.tsx +46 -1
- package/src/components/shell/DocumentEditorOverlay.tsx +1 -1
- package/src/document/components/DocRail.tsx +10 -6
- package/src/document/components/DocSectionPage.tsx +4 -1
- package/src/document/components/DocViewer.tsx +1 -1
- package/src/document/components/measure.tsx +14 -2
- package/src/document/components/useDocPages.ts +25 -7
- package/src/document/engine/harvest.ts +21 -6
- package/src/document/engine/masonry.ts +64 -1
- package/src/document/engine/paginate.ts +24 -4
- package/src/document/engine/settings.ts +12 -1
- package/src/document/engine/types.ts +12 -2
- package/src/document/styles/document.css +9 -0
package/dist/document/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
documentOptionsSchema,
|
|
3
3
|
sectionSettingsSchema,
|
|
4
4
|
settingsFor
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-FM4M4Q2W.js";
|
|
6
6
|
import "../chunk-JSBRDJBE.js";
|
|
7
7
|
|
|
8
8
|
// src/document/engine/types.ts
|
|
@@ -120,20 +120,28 @@ function harvestInto(target, type, content, imagesById) {
|
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
function harvest(sections, pageTitle, imagesById) {
|
|
123
|
+
function harvest(sections, pageTitle, imagesById, splitAtFor = () => "none") {
|
|
124
124
|
const chunks = [];
|
|
125
|
-
|
|
126
|
-
let
|
|
125
|
+
const preamble = { id: PREAMBLE_ID, title: pageTitle, textBlocks: [], images: [] };
|
|
126
|
+
let parent = preamble;
|
|
127
|
+
let current = preamble;
|
|
128
|
+
let splitAt = splitAtFor(PREAMBLE_ID);
|
|
127
129
|
for (const section of sections) {
|
|
130
|
+
const heading = str(asRecord(section.content).heading);
|
|
128
131
|
if (section.type === "link_heading") {
|
|
129
|
-
|
|
132
|
+
parent = { id: section.id, title: heading, textBlocks: [], images: [] };
|
|
133
|
+
current = parent;
|
|
134
|
+
splitAt = splitAtFor(section.id);
|
|
135
|
+
chunks.push(parent);
|
|
136
|
+
} else if (section.type === "sub_heading" && splitAt === "sub_heading") {
|
|
137
|
+
current = { id: section.id, title: heading, textBlocks: [], images: [], parentId: parent.id, kicker: parent.title, depth: 1 };
|
|
130
138
|
chunks.push(current);
|
|
131
139
|
} else {
|
|
132
140
|
harvestInto(current, section.type, section.content, imagesById);
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
|
-
const
|
|
136
|
-
return
|
|
143
|
+
const keepPreamble = preamble.textBlocks.length > 0 || preamble.images.length > 0 || chunks.some((c) => c.parentId === PREAMBLE_ID);
|
|
144
|
+
return keepPreamble ? [preamble, ...chunks] : chunks;
|
|
137
145
|
}
|
|
138
146
|
|
|
139
147
|
// src/document/engine/masonry.ts
|
|
@@ -169,6 +177,49 @@ function layoutRows(images, o, fits) {
|
|
|
169
177
|
}
|
|
170
178
|
return { boxes, used: used ?? images.length, endY: y };
|
|
171
179
|
}
|
|
180
|
+
function layoutForcedRows(images, o, fits, n) {
|
|
181
|
+
const asp = images.map((im, i2) => effectiveAspect(im, fits[i2]));
|
|
182
|
+
const count = Math.min(n, images.length);
|
|
183
|
+
const rows = [];
|
|
184
|
+
let i = 0;
|
|
185
|
+
for (let r = 0; r < count; r++) {
|
|
186
|
+
const remainingRows = count - r;
|
|
187
|
+
const target = asp.slice(i).reduce((s, a) => s + a, 0) / remainingRows;
|
|
188
|
+
const row = [];
|
|
189
|
+
let sum = 0;
|
|
190
|
+
while (i < asp.length) {
|
|
191
|
+
if (row.length > 0) {
|
|
192
|
+
if (asp.length - (i + 1) < remainingRows - 1) break;
|
|
193
|
+
if (sum >= target - EPS) break;
|
|
194
|
+
}
|
|
195
|
+
row.push(i);
|
|
196
|
+
sum += asp[i];
|
|
197
|
+
i++;
|
|
198
|
+
}
|
|
199
|
+
rows.push(row);
|
|
200
|
+
}
|
|
201
|
+
const rowMeta = rows.map((row) => {
|
|
202
|
+
const gaps = o.gapIn * (row.length - 1);
|
|
203
|
+
const sumAspect = row.reduce((s, a) => s + asp[a], 0);
|
|
204
|
+
return { row, gaps, sumAspect, hIn: (o.bodyWIn - gaps) / sumAspect };
|
|
205
|
+
});
|
|
206
|
+
const rowGaps = o.gapIn * (rowMeta.length - 1);
|
|
207
|
+
const totalH = rowMeta.reduce((s, m) => s + m.hIn, 0);
|
|
208
|
+
const scale = totalH > 0 ? Math.min(1, Math.max(0, o.bodyHIn - rowGaps) / totalH) : 1;
|
|
209
|
+
const boxes = [];
|
|
210
|
+
let y = 0;
|
|
211
|
+
for (const m of rowMeta) {
|
|
212
|
+
const rowH = m.hIn * scale;
|
|
213
|
+
let x = 0;
|
|
214
|
+
for (const idx of m.row) {
|
|
215
|
+
const w = asp[idx] * rowH;
|
|
216
|
+
boxes.push({ asset: images[idx], xIn: x, yIn: y, wIn: w, hIn: rowH });
|
|
217
|
+
x += w + o.gapIn;
|
|
218
|
+
}
|
|
219
|
+
y += rowH + o.gapIn;
|
|
220
|
+
}
|
|
221
|
+
return { boxes, used: images.length, endY: y };
|
|
222
|
+
}
|
|
172
223
|
function layoutColumns(images, o, fits) {
|
|
173
224
|
const n = o.columns;
|
|
174
225
|
const colW = (o.bodyWIn - o.gapIn * (n - 1)) / n;
|
|
@@ -191,7 +242,7 @@ function layoutMasonryPage(images, o, fits = []) {
|
|
|
191
242
|
const r2 = layoutColumns(images, o, fits);
|
|
192
243
|
return { boxes: r2.boxes, used: r2.used };
|
|
193
244
|
}
|
|
194
|
-
const r = layoutRows(images, o, fits);
|
|
245
|
+
const r = typeof o.rows === "number" ? layoutForcedRows(images, o, fits, o.rows) : layoutRows(images, o, fits);
|
|
195
246
|
return { boxes: r.boxes, used: r.used };
|
|
196
247
|
}
|
|
197
248
|
|
|
@@ -203,6 +254,7 @@ var DOC_GEOM = {
|
|
|
203
254
|
gapIn: 0.15,
|
|
204
255
|
leftColWIn: 4.6,
|
|
205
256
|
colGutterIn: 0.4,
|
|
257
|
+
minTextColIn: 1,
|
|
206
258
|
minImageRegionIn: 1.2,
|
|
207
259
|
masonryTargetRowIn: 2.6,
|
|
208
260
|
// Top text fills at most this fraction of the body height below the title
|
|
@@ -225,7 +277,7 @@ function fitImages(images, layout, region, geom) {
|
|
|
225
277
|
yIn: region.yIn + r2 * (cellH + geom.gapIn),
|
|
226
278
|
wIn: cellW,
|
|
227
279
|
hIn: cellH,
|
|
228
|
-
fit:
|
|
280
|
+
fit: layout.fit
|
|
229
281
|
};
|
|
230
282
|
});
|
|
231
283
|
return { boxes: boxes2, used };
|
|
@@ -233,6 +285,7 @@ function fitImages(images, layout, region, geom) {
|
|
|
233
285
|
const r = layoutMasonryPage(images, {
|
|
234
286
|
mode: layout.flow,
|
|
235
287
|
columns: layout.columns,
|
|
288
|
+
rows: layout.rows,
|
|
236
289
|
bodyWIn: region.wIn,
|
|
237
290
|
bodyHIn: region.hIn,
|
|
238
291
|
gapIn: geom.gapIn,
|
|
@@ -248,12 +301,13 @@ function fitImages(images, layout, region, geom) {
|
|
|
248
301
|
}));
|
|
249
302
|
return { boxes, used: r.used };
|
|
250
303
|
}
|
|
251
|
-
function paginateChunk(chunk, settings, textHeightsIn, geom = DOC_GEOM) {
|
|
304
|
+
function paginateChunk(chunk, settings, textHeightsIn, geom = DOC_GEOM, naturalTextWIn) {
|
|
252
305
|
if (settings.excluded) return [];
|
|
253
306
|
if (chunk.textBlocks.length !== textHeightsIn.length) {
|
|
254
307
|
throw new Error("paginateChunk: textHeightsIn must match chunk.textBlocks");
|
|
255
308
|
}
|
|
256
309
|
if (chunk.textBlocks.length === 0 && chunk.images.length === 0) return [];
|
|
310
|
+
const colWIn = naturalTextWIn === void 0 ? geom.leftColWIn : Math.min(geom.leftColWIn, Math.max(geom.minTextColIn, naturalTextWIn + 0.05));
|
|
257
311
|
const pages = [];
|
|
258
312
|
let ti = 0;
|
|
259
313
|
let ii = 0;
|
|
@@ -261,7 +315,7 @@ function paginateChunk(chunk, settings, textHeightsIn, geom = DOC_GEOM) {
|
|
|
261
315
|
while (ti < chunk.textBlocks.length || ii < chunk.images.length) {
|
|
262
316
|
const cont = pages.length > 0;
|
|
263
317
|
const warnings = [];
|
|
264
|
-
const textW = settings.textPlacement === "top" ? geom.bodyWIn :
|
|
318
|
+
const textW = settings.textPlacement === "top" ? geom.bodyWIn : colWIn;
|
|
265
319
|
const capY = settings.textPlacement === "top" ? geom.titleBandIn + (geom.bodyHIn - geom.titleBandIn) * geom.topTextMaxFraction : geom.bodyHIn;
|
|
266
320
|
const placed = [];
|
|
267
321
|
let textEnd = top;
|
|
@@ -291,9 +345,9 @@ function paginateChunk(chunk, settings, textHeightsIn, geom = DOC_GEOM) {
|
|
|
291
345
|
let region;
|
|
292
346
|
if (settings.textPlacement === "leftColumn" && settings.imagePlacement === "right" && placed.length > 0) {
|
|
293
347
|
region = {
|
|
294
|
-
xIn:
|
|
348
|
+
xIn: colWIn + geom.colGutterIn,
|
|
295
349
|
yIn: top,
|
|
296
|
-
wIn: geom.bodyWIn -
|
|
350
|
+
wIn: geom.bodyWIn - colWIn - geom.colGutterIn,
|
|
297
351
|
hIn: geom.bodyHIn - top
|
|
298
352
|
};
|
|
299
353
|
} else {
|
|
@@ -312,6 +366,8 @@ function paginateChunk(chunk, settings, textHeightsIn, geom = DOC_GEOM) {
|
|
|
312
366
|
chunkId: chunk.id,
|
|
313
367
|
title: cont ? `${chunk.title} Cont.` : chunk.title,
|
|
314
368
|
cont,
|
|
369
|
+
kicker: chunk.kicker,
|
|
370
|
+
depth: chunk.depth,
|
|
315
371
|
textBlocks: placed,
|
|
316
372
|
textRegion,
|
|
317
373
|
imageBoxes: boxes,
|
|
@@ -324,6 +380,8 @@ function paginateChunk(chunk, settings, textHeightsIn, geom = DOC_GEOM) {
|
|
|
324
380
|
chunkId: chunk.id,
|
|
325
381
|
title: cont ? `${chunk.title} Cont.` : chunk.title,
|
|
326
382
|
cont,
|
|
383
|
+
kicker: chunk.kicker,
|
|
384
|
+
depth: chunk.depth,
|
|
327
385
|
textBlocks: placed,
|
|
328
386
|
textRegion,
|
|
329
387
|
imageBoxes: boxes,
|
|
@@ -378,7 +436,10 @@ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
|
378
436
|
var inch = (v) => `${v}in`;
|
|
379
437
|
function DocSectionPage({ page, meta, host }) {
|
|
380
438
|
return /* @__PURE__ */ jsxs3(DocPage, { meta, children: [
|
|
381
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ jsxs3("h2", { className: "pdoc-title", children: [
|
|
440
|
+
page.kicker ? /* @__PURE__ */ jsx3("span", { className: "pdoc-kicker", "aria-hidden": "true", children: page.kicker }) : null,
|
|
441
|
+
page.title
|
|
442
|
+
] }),
|
|
382
443
|
page.textRegion ? /* @__PURE__ */ jsx3(
|
|
383
444
|
"div",
|
|
384
445
|
{
|
|
@@ -452,6 +513,7 @@ function signatureFor(chunks, settingsMap) {
|
|
|
452
513
|
}
|
|
453
514
|
function useTextMeasurements(chunks, settingsMap) {
|
|
454
515
|
const [heights, setHeights] = useState(null);
|
|
516
|
+
const [textWidths, setTextWidths] = useState(null);
|
|
455
517
|
const [fontsReady, setFontsReady] = useState(false);
|
|
456
518
|
useEffect(() => {
|
|
457
519
|
let cancelled = false;
|
|
@@ -468,9 +530,11 @@ function useTextMeasurements(chunks, settingsMap) {
|
|
|
468
530
|
if (!fontsReady) return;
|
|
469
531
|
const containers = [];
|
|
470
532
|
const next = {};
|
|
533
|
+
const nextW = {};
|
|
471
534
|
for (const chunk of chunks) {
|
|
472
535
|
if (chunk.textBlocks.length === 0) {
|
|
473
536
|
next[chunk.id] = [];
|
|
537
|
+
nextW[chunk.id] = 0;
|
|
474
538
|
continue;
|
|
475
539
|
}
|
|
476
540
|
const container = document.createElement("div");
|
|
@@ -479,6 +543,7 @@ function useTextMeasurements(chunks, settingsMap) {
|
|
|
479
543
|
document.body.appendChild(container);
|
|
480
544
|
containers.push(container);
|
|
481
545
|
const measured = [];
|
|
546
|
+
let wMax = 0;
|
|
482
547
|
for (const block of chunk.textBlocks) {
|
|
483
548
|
const wrapper = document.createElement("div");
|
|
484
549
|
wrapper.className = blockClassName(block);
|
|
@@ -487,39 +552,56 @@ function useTextMeasurements(chunks, settingsMap) {
|
|
|
487
552
|
} else {
|
|
488
553
|
wrapper.innerHTML = block.html;
|
|
489
554
|
}
|
|
555
|
+
wrapper.style.width = "max-content";
|
|
556
|
+
wrapper.style.maxWidth = "100%";
|
|
490
557
|
container.appendChild(wrapper);
|
|
491
558
|
measured.push(wrapper.offsetHeight / PX_PER_IN);
|
|
559
|
+
wMax = Math.max(wMax, wrapper.getBoundingClientRect().width / PX_PER_IN);
|
|
492
560
|
}
|
|
493
561
|
next[chunk.id] = measured;
|
|
562
|
+
nextW[chunk.id] = wMax;
|
|
494
563
|
}
|
|
495
564
|
setHeights(next);
|
|
565
|
+
setTextWidths(nextW);
|
|
496
566
|
return () => {
|
|
497
567
|
for (const container of containers) container.remove();
|
|
498
568
|
};
|
|
499
569
|
}, [signature, fontsReady]);
|
|
500
|
-
return { heights };
|
|
570
|
+
return { heights, textWidths };
|
|
501
571
|
}
|
|
502
572
|
|
|
503
573
|
// src/document/components/useDocPages.ts
|
|
504
574
|
function useDocPages(input) {
|
|
505
575
|
const { source, sections } = input;
|
|
576
|
+
const splitSig = useMemo(() => {
|
|
577
|
+
const m = {};
|
|
578
|
+
for (const id of Object.keys(sections ?? {})) {
|
|
579
|
+
const v = settingsFor(sections, id).splitAt;
|
|
580
|
+
if (v !== "none") m[id] = v;
|
|
581
|
+
}
|
|
582
|
+
return JSON.stringify(m);
|
|
583
|
+
}, [sections]);
|
|
584
|
+
const splitAtFor = useMemo(() => {
|
|
585
|
+
const m = JSON.parse(splitSig);
|
|
586
|
+
return (id) => m[id] ?? "none";
|
|
587
|
+
}, [splitSig]);
|
|
506
588
|
const chunks = useMemo(
|
|
507
|
-
() => source ? harvest(source.sections, source.pageTitle, source.images) : [],
|
|
508
|
-
[source]
|
|
589
|
+
() => source ? harvest(source.sections, source.pageTitle, source.images, splitAtFor) : [],
|
|
590
|
+
[source, splitAtFor]
|
|
509
591
|
);
|
|
510
592
|
const settingsMap = useMemo(() => {
|
|
511
593
|
const map = {};
|
|
512
594
|
for (const c of chunks) map[c.id] = settingsFor(sections, c.id);
|
|
513
595
|
return map;
|
|
514
596
|
}, [chunks, sections]);
|
|
515
|
-
const { heights } = useTextMeasurements(chunks, settingsMap);
|
|
597
|
+
const { heights, textWidths } = useTextMeasurements(chunks, settingsMap);
|
|
516
598
|
const pages = useMemo(() => {
|
|
517
599
|
return chunks.flatMap((c) => {
|
|
518
600
|
const h = heights?.[c.id];
|
|
519
601
|
if (c.textBlocks.length > 0 && (!h || h.length !== c.textBlocks.length)) return [];
|
|
520
|
-
return paginateChunk(c, settingsMap[c.id], h ?? []);
|
|
602
|
+
return paginateChunk(c, settingsMap[c.id], h ?? [], DOC_GEOM, textWidths?.[c.id]);
|
|
521
603
|
});
|
|
522
|
-
}, [chunks, settingsMap, heights]);
|
|
604
|
+
}, [chunks, settingsMap, heights, textWidths]);
|
|
523
605
|
const measuring = useMemo(
|
|
524
606
|
() => chunks.some((c) => {
|
|
525
607
|
if (c.textBlocks.length === 0) return false;
|
|
@@ -554,16 +636,18 @@ function entryId(entry) {
|
|
|
554
636
|
if (entry.kind === "page") return entry.page.id;
|
|
555
637
|
return `ghost:${entry.chunkId}`;
|
|
556
638
|
}
|
|
639
|
+
var INDENT = ["", "pl-4", "pl-8"];
|
|
640
|
+
var indentClass = (level) => INDENT[Math.min(level, INDENT.length - 1)] || void 0;
|
|
557
641
|
function ThumbButton({
|
|
558
642
|
id,
|
|
559
643
|
selectedId,
|
|
560
644
|
scale,
|
|
561
645
|
label,
|
|
562
|
-
|
|
646
|
+
indentLevel,
|
|
563
647
|
onSelect,
|
|
564
648
|
children
|
|
565
649
|
}) {
|
|
566
|
-
return /* @__PURE__ */ jsx5("li", { className:
|
|
650
|
+
return /* @__PURE__ */ jsx5("li", { className: indentClass(indentLevel ?? 0), children: /* @__PURE__ */ jsxs5(
|
|
567
651
|
"button",
|
|
568
652
|
{
|
|
569
653
|
type: "button",
|
|
@@ -637,14 +721,14 @@ function DocRail({
|
|
|
637
721
|
selectedId,
|
|
638
722
|
scale,
|
|
639
723
|
label: entry.page.title,
|
|
640
|
-
|
|
724
|
+
indentLevel: (entry.page.depth ?? 0) + (entry.page.cont ? 1 : 0),
|
|
641
725
|
onSelect,
|
|
642
726
|
children: /* @__PURE__ */ jsx5(DocSectionPage, { page: entry.page, meta, host })
|
|
643
727
|
},
|
|
644
728
|
id
|
|
645
729
|
);
|
|
646
730
|
}
|
|
647
|
-
return /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs5(
|
|
731
|
+
return /* @__PURE__ */ jsx5("li", { className: indentClass(entry.depth ?? 0), children: /* @__PURE__ */ jsxs5(
|
|
648
732
|
"button",
|
|
649
733
|
{
|
|
650
734
|
type: "button",
|
|
@@ -701,7 +785,7 @@ function DocViewer({
|
|
|
701
785
|
const empty = chunk.textBlocks.length === 0 && chunk.images.length === 0;
|
|
702
786
|
if (s.excluded || empty) {
|
|
703
787
|
if (mode === "edit") {
|
|
704
|
-
list.push({ kind: "ghost", chunkId: chunk.id, title: chunk.title, reason: s.excluded ? "excluded" : "empty" });
|
|
788
|
+
list.push({ kind: "ghost", chunkId: chunk.id, title: chunk.title, reason: s.excluded ? "excluded" : "empty", depth: chunk.depth });
|
|
705
789
|
}
|
|
706
790
|
} else {
|
|
707
791
|
for (const page of pages.filter((p) => p.chunkId === chunk.id)) list.push({ kind: "page", page });
|
|
@@ -178,6 +178,15 @@
|
|
|
178
178
|
margin: 0;
|
|
179
179
|
height: 0.9in; /* = DOC_GEOM.titleBandIn; keep in sync */
|
|
180
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
|
+
}
|
|
181
190
|
.pdoc-text { position: absolute; }
|
|
182
191
|
.pdoc-h2, .pdoc-h3 {
|
|
183
192
|
font-family: "Kapra Neue Expanded", Helvetica, Arial, sans-serif;
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ import {
|
|
|
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,7 +71,7 @@ import {
|
|
|
71
71
|
loadStaticSiteContent,
|
|
72
72
|
mergeSiteContent,
|
|
73
73
|
safeRedirect
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-6NRVX6NQ.js";
|
|
75
75
|
import {
|
|
76
76
|
curatedIcons,
|
|
77
77
|
getIcon
|
|
@@ -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,7 +136,7 @@ import {
|
|
|
136
136
|
registerSchema,
|
|
137
137
|
registerSection
|
|
138
138
|
} from "./chunk-VKAGMEKE.js";
|
|
139
|
-
import "./chunk-
|
|
139
|
+
import "./chunk-FM4M4Q2W.js";
|
|
140
140
|
import "./chunk-NSCT3AMV.js";
|
|
141
141
|
import {
|
|
142
142
|
env
|
package/dist/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadStaticSiteContent,
|
|
8
8
|
mergeSiteContent,
|
|
9
9
|
safeRedirect
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-6NRVX6NQ.js";
|
|
11
11
|
import {
|
|
12
12
|
curatedIcons,
|
|
13
13
|
getIcon
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "../chunk-YBVK254P.js";
|
|
34
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,7 +45,7 @@ import {
|
|
|
45
45
|
registerSchema,
|
|
46
46
|
registerSection
|
|
47
47
|
} from "../chunk-VKAGMEKE.js";
|
|
48
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-FM4M4Q2W.js";
|
|
49
49
|
import "../chunk-NSCT3AMV.js";
|
|
50
50
|
import {
|
|
51
51
|
env
|
package/dist/media/index.js
CHANGED
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
MediaFolderSchema,
|
|
25
25
|
MediaItemSchema,
|
|
26
26
|
VariantSchema
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-ETJYYUQX.js";
|
|
28
|
+
import "../chunk-FM4M4Q2W.js";
|
|
29
29
|
import "../chunk-JSBRDJBE.js";
|
|
30
30
|
export {
|
|
31
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,9 +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-
|
|
45
|
+
import "../chunk-FM4M4Q2W.js";
|
|
46
46
|
import "../chunk-NSCT3AMV.js";
|
|
47
47
|
import "../chunk-JSBRDJBE.js";
|
|
48
48
|
export {
|
|
@@ -53,10 +53,18 @@ export declare const PageSchema: z.ZodObject<{
|
|
|
53
53
|
right: "right";
|
|
54
54
|
}>>;
|
|
55
55
|
dropTextOverflow: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
splitAt: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
none: "none";
|
|
58
|
+
sub_heading: "sub_heading";
|
|
59
|
+
}>>;
|
|
56
60
|
imageLayout: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
57
61
|
mode: z.ZodLiteral<"grid">;
|
|
58
62
|
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
59
63
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
64
|
+
fit: z.ZodDefault<z.ZodEnum<{
|
|
65
|
+
cover: "cover";
|
|
66
|
+
contain: "contain";
|
|
67
|
+
}>>;
|
|
60
68
|
}, z.core.$strip>, z.ZodObject<{
|
|
61
69
|
mode: z.ZodLiteral<"masonry">;
|
|
62
70
|
flow: z.ZodDefault<z.ZodEnum<{
|
|
@@ -64,6 +72,7 @@ export declare const PageSchema: z.ZodObject<{
|
|
|
64
72
|
columns: "columns";
|
|
65
73
|
}>>;
|
|
66
74
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
|
|
75
|
+
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
67
76
|
}, z.core.$strip>], "mode">>;
|
|
68
77
|
}, z.core.$strip>>>;
|
|
69
78
|
}, z.core.$strip>>;
|
|
@@ -109,10 +118,18 @@ declare const CanonicalIndexSchema: z.ZodObject<{
|
|
|
109
118
|
right: "right";
|
|
110
119
|
}>>;
|
|
111
120
|
dropTextOverflow: z.ZodDefault<z.ZodBoolean>;
|
|
121
|
+
splitAt: z.ZodDefault<z.ZodEnum<{
|
|
122
|
+
none: "none";
|
|
123
|
+
sub_heading: "sub_heading";
|
|
124
|
+
}>>;
|
|
112
125
|
imageLayout: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
113
126
|
mode: z.ZodLiteral<"grid">;
|
|
114
127
|
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
115
128
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
129
|
+
fit: z.ZodDefault<z.ZodEnum<{
|
|
130
|
+
cover: "cover";
|
|
131
|
+
contain: "contain";
|
|
132
|
+
}>>;
|
|
116
133
|
}, z.core.$strip>, z.ZodObject<{
|
|
117
134
|
mode: z.ZodLiteral<"masonry">;
|
|
118
135
|
flow: z.ZodDefault<z.ZodEnum<{
|
|
@@ -120,6 +137,7 @@ declare const CanonicalIndexSchema: z.ZodObject<{
|
|
|
120
137
|
columns: "columns";
|
|
121
138
|
}>>;
|
|
122
139
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
|
|
140
|
+
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
123
141
|
}, z.core.$strip>], "mode">>;
|
|
124
142
|
}, z.core.$strip>>>;
|
|
125
143
|
}, z.core.$strip>>;
|
|
@@ -177,10 +195,18 @@ export declare const IndexSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
177
195
|
right: "right";
|
|
178
196
|
}>>;
|
|
179
197
|
dropTextOverflow: z.ZodDefault<z.ZodBoolean>;
|
|
198
|
+
splitAt: z.ZodDefault<z.ZodEnum<{
|
|
199
|
+
none: "none";
|
|
200
|
+
sub_heading: "sub_heading";
|
|
201
|
+
}>>;
|
|
180
202
|
imageLayout: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
203
|
mode: z.ZodLiteral<"grid">;
|
|
182
204
|
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
183
205
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
206
|
+
fit: z.ZodDefault<z.ZodEnum<{
|
|
207
|
+
cover: "cover";
|
|
208
|
+
contain: "contain";
|
|
209
|
+
}>>;
|
|
184
210
|
}, z.core.$strip>, z.ZodObject<{
|
|
185
211
|
mode: z.ZodLiteral<"masonry">;
|
|
186
212
|
flow: z.ZodDefault<z.ZodEnum<{
|
|
@@ -188,6 +214,7 @@ export declare const IndexSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
188
214
|
columns: "columns";
|
|
189
215
|
}>>;
|
|
190
216
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
|
|
217
|
+
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
191
218
|
}, z.core.$strip>], "mode">>;
|
|
192
219
|
}, z.core.$strip>>>;
|
|
193
220
|
}, z.core.$strip>>;
|
|
@@ -234,14 +261,17 @@ export declare const IndexSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
234
261
|
textPlacement?: "top" | "leftColumn" | undefined;
|
|
235
262
|
imagePlacement?: "fullWidth" | "right" | undefined;
|
|
236
263
|
dropTextOverflow?: boolean | undefined;
|
|
264
|
+
splitAt?: "none" | "sub_heading" | undefined;
|
|
237
265
|
imageLayout?: {
|
|
238
266
|
mode: "grid";
|
|
239
267
|
rows?: 2 | 1 | 3 | undefined;
|
|
240
268
|
columns?: 2 | 4 | 3 | undefined;
|
|
269
|
+
fit?: "cover" | "contain" | undefined;
|
|
241
270
|
} | {
|
|
242
271
|
mode: "masonry";
|
|
243
272
|
flow?: "rows" | "columns" | undefined;
|
|
244
273
|
columns?: 2 | 4 | 3 | 5 | 6 | undefined;
|
|
274
|
+
rows?: 2 | 4 | 1 | 3 | "auto" | undefined;
|
|
245
275
|
} | undefined;
|
|
246
276
|
}> | undefined;
|
|
247
277
|
} | undefined;
|
|
@@ -289,14 +319,17 @@ export declare const IndexSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
289
319
|
textPlacement: "top" | "leftColumn";
|
|
290
320
|
imagePlacement: "fullWidth" | "right";
|
|
291
321
|
dropTextOverflow: boolean;
|
|
322
|
+
splitAt: "none" | "sub_heading";
|
|
292
323
|
imageLayout: {
|
|
293
324
|
mode: "grid";
|
|
294
325
|
rows: 2 | 1 | 3;
|
|
295
326
|
columns: 2 | 4 | 3;
|
|
327
|
+
fit: "cover" | "contain";
|
|
296
328
|
} | {
|
|
297
329
|
mode: "masonry";
|
|
298
330
|
flow: "rows" | "columns";
|
|
299
331
|
columns: 2 | 4 | 3 | 5 | 6;
|
|
332
|
+
rows: 2 | 4 | 1 | 3 | "auto";
|
|
300
333
|
};
|
|
301
334
|
}>;
|
|
302
335
|
} | undefined;
|
|
@@ -342,10 +375,18 @@ export declare const IndexSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
342
375
|
right: "right";
|
|
343
376
|
}>>;
|
|
344
377
|
dropTextOverflow: z.ZodDefault<z.ZodBoolean>;
|
|
378
|
+
splitAt: z.ZodDefault<z.ZodEnum<{
|
|
379
|
+
none: "none";
|
|
380
|
+
sub_heading: "sub_heading";
|
|
381
|
+
}>>;
|
|
345
382
|
imageLayout: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
346
383
|
mode: z.ZodLiteral<"grid">;
|
|
347
384
|
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>;
|
|
348
385
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
386
|
+
fit: z.ZodDefault<z.ZodEnum<{
|
|
387
|
+
cover: "cover";
|
|
388
|
+
contain: "contain";
|
|
389
|
+
}>>;
|
|
349
390
|
}, z.core.$strip>, z.ZodObject<{
|
|
350
391
|
mode: z.ZodLiteral<"masonry">;
|
|
351
392
|
flow: z.ZodDefault<z.ZodEnum<{
|
|
@@ -353,6 +394,7 @@ export declare const IndexSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
353
394
|
columns: "columns";
|
|
354
395
|
}>>;
|
|
355
396
|
columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
|
|
397
|
+
rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
356
398
|
}, z.core.$strip>], "mode">>;
|
|
357
399
|
}, z.core.$strip>>>;
|
|
358
400
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../src/schemas/site-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,iBAAiB;;;;;;;;;iBAI5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,cAAc,qEAAsE,CAAC;AAWlG,eAAO,MAAM,gBAAgB;;;EAA+B,CAAC;AAE7D,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../src/schemas/site-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,iBAAiB;;;;;;;;;iBAI5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,cAAc,qEAAsE,CAAC;AAWlG,eAAO,MAAM,gBAAgB;;;EAA+B,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AA0C9C,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CtB,CAAC;AAEL,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAyE,CAAC;AAElG,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7D,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,CAE1D;AAMD,eAAO,MAAM,iBAAiB;;;;;iBAM5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAwB5B,CAAC;AACL,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4B3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|