@drawnagency/primitives 0.1.81 → 0.1.83
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-P4ZNHZMP.js → chunk-56J4QMF4.js} +2 -2
- package/dist/{chunk-ZEXR7JYQ.js → chunk-665DW3HR.js} +1 -1
- package/dist/{chunk-PJOHAWNV.js → chunk-DO3ZENLN.js} +1 -1
- package/dist/{chunk-EVNEMJZ6.js → chunk-E3MTIMOG.js} +2 -2
- package/dist/{chunk-FN4NKUZU.js → chunk-EP3LVOXZ.js} +1 -1
- package/dist/{chunk-WP5UX4MI.js → chunk-FM4M4Q2W.js} +12 -3
- 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/DocViewer.d.ts +4 -1
- package/dist/document/components/DocViewer.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 +132 -35
- 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 +43 -1
- 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/components/shell/EditorShell.tsx +3 -2
- package/src/document/components/DocRail.tsx +10 -6
- package/src/document/components/DocSectionPage.tsx +4 -1
- package/src/document/components/DocViewer.tsx +27 -11
- 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/src/schemas/site-config.ts +1 -1
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
export const PREAMBLE_ID = "__preamble";
|
|
9
9
|
|
|
10
|
+
// Page-split boundary level for one parent section. Sub-headings are the
|
|
11
|
+
// deepest deck boundary (internal convention, 2026-07-19) — sub_sub_heading
|
|
12
|
+
// sections always stay in-page as level-3 text blocks.
|
|
13
|
+
export type SplitAt = "none" | "sub_heading";
|
|
14
|
+
|
|
10
15
|
// Breadcrumb metadata shown in the page chrome. Single definition — the
|
|
11
16
|
// harness carried this shape in two places (deck/DeckPage.tsx's `DeckMeta`
|
|
12
17
|
// and lib/deck/schema.ts's zod-inferred `DeckMeta`); the engine only needs
|
|
@@ -39,12 +44,17 @@ export type TextBlock =
|
|
|
39
44
|
| { kind: "heading"; level: 2 | 3; text: string }
|
|
40
45
|
| { kind: "prose"; html: string };
|
|
41
46
|
|
|
42
|
-
// A
|
|
47
|
+
// A page-producing chunk: a link_heading section (or the preamble), or — when
|
|
48
|
+
// the parent's splitAt says so — a sub heading section.
|
|
43
49
|
export interface Chunk {
|
|
44
|
-
id: string; //
|
|
50
|
+
id: string; // boundary heading's section id, or PREAMBLE_ID
|
|
45
51
|
title: string;
|
|
46
52
|
textBlocks: TextBlock[];
|
|
47
53
|
images: DocImage[];
|
|
54
|
+
// Sub-chunk fields; absent on top-level chunks.
|
|
55
|
+
parentId?: string;
|
|
56
|
+
kicker?: string; // masthead context line — the parent link_heading title
|
|
57
|
+
depth?: 1;
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
export interface DocSourceContent {
|
|
@@ -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;
|
|
@@ -25,7 +25,7 @@ export type SectionMeta = z.infer<typeof SectionMetaSchema>;
|
|
|
25
25
|
// add its first segment here (the test in Step 1 guards the known set). This is
|
|
26
26
|
// the single source of truth for reserved slugs; the schema, uniquePageSlug, and
|
|
27
27
|
// /api/save all import it.
|
|
28
|
-
export const RESERVED_SLUGS = ["edit", "api", "login", "set-password", "404", "present"] as const;
|
|
28
|
+
export const RESERVED_SLUGS = ["edit", "api", "login", "set-password", "404", "present", "print"] as const;
|
|
29
29
|
|
|
30
30
|
// Subset of RESERVED_SLUGS the index schema hard-rejects at parse time. Only
|
|
31
31
|
// slugs reserved since before client sites existed may hard-fail here: parse-
|