@format.dev/vue 0.2.0 → 0.3.0
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/index.cjs +106 -39
- package/dist/index.d.cts +147 -44
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +156 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, h, mergeProps, normalizeStyle, onMounted, openBlock, ref, renderSlot, resolveDynamicComponent, unref, useAttrs, useSlots, withCtx } from "vue";
|
|
2
2
|
|
|
3
3
|
//#region src/Template.vue
|
|
4
|
-
const _sfc_main$
|
|
4
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "Template",
|
|
6
6
|
setup(__props) {
|
|
7
7
|
const attrs = useAttrs();
|
|
@@ -21,19 +21,19 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
var Template_default = _sfc_main$
|
|
24
|
+
var Template_default = _sfc_main$19;
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/engine-target.ts
|
|
28
|
-
const engineTarget = "0.
|
|
28
|
+
const engineTarget = "0.3.0";
|
|
29
29
|
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/sdk-version.ts
|
|
32
|
-
const sdkVersion = "0.
|
|
32
|
+
const sdkVersion = "0.3.0";
|
|
33
33
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/Document.vue
|
|
36
|
-
const _sfc_main$
|
|
36
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
37
37
|
inheritAttrs: false,
|
|
38
38
|
__name: "Document",
|
|
39
39
|
props: {
|
|
@@ -41,6 +41,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
subject: {},
|
|
42
42
|
author: {},
|
|
43
43
|
keywords: {},
|
|
44
|
+
lang: {},
|
|
44
45
|
fonts: {}
|
|
45
46
|
},
|
|
46
47
|
setup(__props) {
|
|
@@ -55,6 +56,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
55
56
|
"data-subject": __props.subject,
|
|
56
57
|
"data-author": __props.author,
|
|
57
58
|
"data-keywords": keywordsString.value,
|
|
59
|
+
"data-lang": __props.lang,
|
|
58
60
|
"data-fonts": __props.fonts
|
|
59
61
|
}, {
|
|
60
62
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
@@ -66,16 +68,17 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
66
68
|
"data-subject",
|
|
67
69
|
"data-author",
|
|
68
70
|
"data-keywords",
|
|
71
|
+
"data-lang",
|
|
69
72
|
"data-fonts"
|
|
70
73
|
]);
|
|
71
74
|
};
|
|
72
75
|
}
|
|
73
76
|
});
|
|
74
|
-
var Document_default = _sfc_main$
|
|
77
|
+
var Document_default = _sfc_main$18;
|
|
75
78
|
|
|
76
79
|
//#endregion
|
|
77
80
|
//#region src/Layout.vue
|
|
78
|
-
const _sfc_main$
|
|
81
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
79
82
|
__name: "Layout",
|
|
80
83
|
props: {
|
|
81
84
|
id: {},
|
|
@@ -109,11 +112,11 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
109
112
|
};
|
|
110
113
|
}
|
|
111
114
|
});
|
|
112
|
-
var Layout_default = _sfc_main$
|
|
115
|
+
var Layout_default = _sfc_main$17;
|
|
113
116
|
|
|
114
117
|
//#endregion
|
|
115
118
|
//#region src/Flow.vue
|
|
116
|
-
const _sfc_main$
|
|
119
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
117
120
|
__name: "Flow",
|
|
118
121
|
props: {
|
|
119
122
|
splitGranularity: {},
|
|
@@ -138,11 +141,11 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
138
141
|
};
|
|
139
142
|
}
|
|
140
143
|
});
|
|
141
|
-
var Flow_default = _sfc_main$
|
|
144
|
+
var Flow_default = _sfc_main$16;
|
|
142
145
|
|
|
143
146
|
//#endregion
|
|
144
147
|
//#region src/Stream.vue
|
|
145
|
-
const _sfc_main$
|
|
148
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
146
149
|
__name: "Stream",
|
|
147
150
|
setup(__props) {
|
|
148
151
|
return (_ctx, _cache) => {
|
|
@@ -153,11 +156,11 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
153
156
|
};
|
|
154
157
|
}
|
|
155
158
|
});
|
|
156
|
-
var Stream_default = _sfc_main$
|
|
159
|
+
var Stream_default = _sfc_main$15;
|
|
157
160
|
|
|
158
161
|
//#endregion
|
|
159
162
|
//#region src/PageBreak.vue
|
|
160
|
-
const _sfc_main$
|
|
163
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
161
164
|
__name: "PageBreak",
|
|
162
165
|
setup(__props) {
|
|
163
166
|
return (_ctx, _cache) => {
|
|
@@ -165,11 +168,11 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
165
168
|
};
|
|
166
169
|
}
|
|
167
170
|
});
|
|
168
|
-
var PageBreak_default = _sfc_main$
|
|
171
|
+
var PageBreak_default = _sfc_main$14;
|
|
169
172
|
|
|
170
173
|
//#endregion
|
|
171
174
|
//#region src/PageCounter.vue
|
|
172
|
-
const _sfc_main$
|
|
175
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
173
176
|
__name: "PageCounter",
|
|
174
177
|
props: {
|
|
175
178
|
type: {},
|
|
@@ -187,11 +190,11 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
187
190
|
};
|
|
188
191
|
}
|
|
189
192
|
});
|
|
190
|
-
var PageCounter_default = _sfc_main$
|
|
193
|
+
var PageCounter_default = _sfc_main$13;
|
|
191
194
|
|
|
192
195
|
//#endregion
|
|
193
196
|
//#region src/PageNumber.vue
|
|
194
|
-
const _sfc_main$
|
|
197
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
195
198
|
__name: "PageNumber",
|
|
196
199
|
props: {
|
|
197
200
|
as: {},
|
|
@@ -204,11 +207,11 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
204
207
|
};
|
|
205
208
|
}
|
|
206
209
|
});
|
|
207
|
-
var PageNumber_default = _sfc_main$
|
|
210
|
+
var PageNumber_default = _sfc_main$12;
|
|
208
211
|
|
|
209
212
|
//#endregion
|
|
210
213
|
//#region src/PageCount.vue
|
|
211
|
-
const _sfc_main$
|
|
214
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
212
215
|
__name: "PageCount",
|
|
213
216
|
props: {
|
|
214
217
|
as: {},
|
|
@@ -221,11 +224,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
221
224
|
};
|
|
222
225
|
}
|
|
223
226
|
});
|
|
224
|
-
var PageCount_default = _sfc_main$
|
|
227
|
+
var PageCount_default = _sfc_main$11;
|
|
225
228
|
|
|
226
229
|
//#endregion
|
|
227
230
|
//#region src/Counter.vue
|
|
228
|
-
const _sfc_main$
|
|
231
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
229
232
|
__name: "Counter",
|
|
230
233
|
props: {
|
|
231
234
|
name: {},
|
|
@@ -260,11 +263,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
260
263
|
};
|
|
261
264
|
}
|
|
262
265
|
});
|
|
263
|
-
var Counter_default = _sfc_main$
|
|
266
|
+
var Counter_default = _sfc_main$10;
|
|
264
267
|
|
|
265
268
|
//#endregion
|
|
266
269
|
//#region src/Ref.vue
|
|
267
|
-
const _sfc_main$
|
|
270
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
268
271
|
__name: "Ref",
|
|
269
272
|
props: {
|
|
270
273
|
to: {},
|
|
@@ -293,11 +296,47 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
293
296
|
};
|
|
294
297
|
}
|
|
295
298
|
});
|
|
296
|
-
var Ref_default = _sfc_main$
|
|
299
|
+
var Ref_default = _sfc_main$9;
|
|
300
|
+
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region src/RunningHead.vue
|
|
303
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
304
|
+
__name: "RunningHead",
|
|
305
|
+
props: {
|
|
306
|
+
match: {},
|
|
307
|
+
show: {},
|
|
308
|
+
within: {},
|
|
309
|
+
format: {},
|
|
310
|
+
counterStyle: {},
|
|
311
|
+
rangeSeparator: {},
|
|
312
|
+
as: { default: "span" }
|
|
313
|
+
},
|
|
314
|
+
setup(__props) {
|
|
315
|
+
return (_ctx, _cache) => {
|
|
316
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
317
|
+
"data-type": "running-head",
|
|
318
|
+
"data-match": __props.match,
|
|
319
|
+
"data-show": __props.show,
|
|
320
|
+
"data-within": __props.within,
|
|
321
|
+
"data-format": __props.format,
|
|
322
|
+
"data-counter-style": __props.counterStyle,
|
|
323
|
+
"data-range-separator": __props.rangeSeparator
|
|
324
|
+
}, null, 8, [
|
|
325
|
+
"data-match",
|
|
326
|
+
"data-show",
|
|
327
|
+
"data-within",
|
|
328
|
+
"data-format",
|
|
329
|
+
"data-counter-style",
|
|
330
|
+
"data-range-separator"
|
|
331
|
+
]);
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
var RunningHead_default = _sfc_main$8;
|
|
297
336
|
|
|
298
337
|
//#endregion
|
|
299
338
|
//#region src/TableOfContents.vue
|
|
300
|
-
const _sfc_main$
|
|
339
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
301
340
|
__name: "TableOfContents",
|
|
302
341
|
props: {
|
|
303
342
|
collect: {},
|
|
@@ -305,7 +344,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
305
344
|
repeatHead: {
|
|
306
345
|
type: Boolean,
|
|
307
346
|
default: void 0
|
|
308
|
-
}
|
|
347
|
+
},
|
|
348
|
+
within: {}
|
|
309
349
|
},
|
|
310
350
|
setup(__props) {
|
|
311
351
|
return (_ctx, _cache) => {
|
|
@@ -313,23 +353,25 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
313
353
|
"data-type": "toc",
|
|
314
354
|
"data-collect": __props.collect,
|
|
315
355
|
"data-leader": __props.leader,
|
|
316
|
-
"data-repeat-head": __props.repeatHead === void 0 ? void 0 : __props.repeatHead ? "true" : "false"
|
|
356
|
+
"data-repeat-head": __props.repeatHead === void 0 ? void 0 : __props.repeatHead ? "true" : "false",
|
|
357
|
+
"data-within": __props.within
|
|
317
358
|
}, {
|
|
318
359
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
319
360
|
_: 3
|
|
320
361
|
}, 8, [
|
|
321
362
|
"data-collect",
|
|
322
363
|
"data-leader",
|
|
323
|
-
"data-repeat-head"
|
|
364
|
+
"data-repeat-head",
|
|
365
|
+
"data-within"
|
|
324
366
|
]);
|
|
325
367
|
};
|
|
326
368
|
}
|
|
327
369
|
});
|
|
328
|
-
var TableOfContents_default = _sfc_main$
|
|
370
|
+
var TableOfContents_default = _sfc_main$7;
|
|
329
371
|
|
|
330
372
|
//#endregion
|
|
331
373
|
//#region src/Footnote.vue
|
|
332
|
-
const _sfc_main$
|
|
374
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
333
375
|
__name: "Footnote",
|
|
334
376
|
setup(__props) {
|
|
335
377
|
return (_ctx, _cache) => {
|
|
@@ -340,11 +382,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
340
382
|
};
|
|
341
383
|
}
|
|
342
384
|
});
|
|
343
|
-
var Footnote_default = _sfc_main$
|
|
385
|
+
var Footnote_default = _sfc_main$6;
|
|
344
386
|
|
|
345
387
|
//#endregion
|
|
346
388
|
//#region src/Footnotes.vue
|
|
347
|
-
const _sfc_main$
|
|
389
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
348
390
|
__name: "Footnotes",
|
|
349
391
|
props: {
|
|
350
392
|
counterStyle: {},
|
|
@@ -372,11 +414,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
372
414
|
};
|
|
373
415
|
}
|
|
374
416
|
});
|
|
375
|
-
var Footnotes_default = _sfc_main$
|
|
417
|
+
var Footnotes_default = _sfc_main$5;
|
|
376
418
|
|
|
377
419
|
//#endregion
|
|
378
420
|
//#region src/CounterDef.vue
|
|
379
|
-
const _sfc_main$
|
|
421
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
380
422
|
__name: "CounterDef",
|
|
381
423
|
props: {
|
|
382
424
|
name: {},
|
|
@@ -392,11 +434,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
392
434
|
};
|
|
393
435
|
}
|
|
394
436
|
});
|
|
395
|
-
var CounterDef_default = _sfc_main$
|
|
437
|
+
var CounterDef_default = _sfc_main$4;
|
|
396
438
|
|
|
397
439
|
//#endregion
|
|
398
440
|
//#region src/Numbering.vue
|
|
399
|
-
const _sfc_main$
|
|
441
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
400
442
|
__name: "Numbering",
|
|
401
443
|
props: {
|
|
402
444
|
counterStyle: {},
|
|
@@ -418,11 +460,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
418
460
|
};
|
|
419
461
|
}
|
|
420
462
|
});
|
|
421
|
-
var Numbering_default = _sfc_main$
|
|
463
|
+
var Numbering_default = _sfc_main$3;
|
|
422
464
|
|
|
423
465
|
//#endregion
|
|
424
466
|
//#region src/NumberingRule.vue
|
|
425
|
-
const _sfc_main$
|
|
467
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
426
468
|
__name: "NumberingRule",
|
|
427
469
|
props: {
|
|
428
470
|
match: {},
|
|
@@ -458,7 +500,30 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
458
500
|
};
|
|
459
501
|
}
|
|
460
502
|
});
|
|
461
|
-
var NumberingRule_default = _sfc_main$
|
|
503
|
+
var NumberingRule_default = _sfc_main$2;
|
|
504
|
+
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region src/Bookmarks.vue
|
|
507
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
508
|
+
__name: "Bookmarks",
|
|
509
|
+
props: {
|
|
510
|
+
numbers: {
|
|
511
|
+
type: Boolean,
|
|
512
|
+
default: void 0
|
|
513
|
+
},
|
|
514
|
+
separator: {}
|
|
515
|
+
},
|
|
516
|
+
setup(__props) {
|
|
517
|
+
return (_ctx, _cache) => {
|
|
518
|
+
return openBlock(), createBlock(Template_default, {
|
|
519
|
+
"data-type": "bookmarks",
|
|
520
|
+
"data-numbers": __props.numbers === void 0 ? void 0 : __props.numbers ? "true" : "false",
|
|
521
|
+
"data-separator": __props.separator
|
|
522
|
+
}, null, 8, ["data-numbers", "data-separator"]);
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
var Bookmarks_default = _sfc_main$1;
|
|
462
527
|
|
|
463
528
|
//#endregion
|
|
464
529
|
//#region src/Scope.vue
|
|
@@ -520,5 +585,5 @@ function css(parts, ...vals) {
|
|
|
520
585
|
}
|
|
521
586
|
|
|
522
587
|
//#endregion
|
|
523
|
-
export { Counter_default as Counter, CounterDef_default as CounterDef, Document_default as Document, Flow_default as Flow, Footnote_default as Footnote, Footnotes_default as Footnotes, Layout_default as Layout, Numbering_default as Numbering, NumberingRule_default as NumberingRule, PageBreak_default as PageBreak, PageCount_default as PageCount, PageNumber_default as PageNumber, Ref_default as Ref, Scope_default as Scope, SplitGranularity, Stream_default as Stream, TableOfContents_default as TableOfContents, TocLeader, css };
|
|
588
|
+
export { Bookmarks_default as Bookmarks, Counter_default as Counter, CounterDef_default as CounterDef, Document_default as Document, Flow_default as Flow, Footnote_default as Footnote, Footnotes_default as Footnotes, Layout_default as Layout, Numbering_default as Numbering, NumberingRule_default as NumberingRule, PageBreak_default as PageBreak, PageCount_default as PageCount, PageNumber_default as PageNumber, Ref_default as Ref, RunningHead_default as RunningHead, Scope_default as Scope, SplitGranularity, Stream_default as Stream, TableOfContents_default as TableOfContents, TocLeader, css };
|
|
524
589
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["engineTarget: string","sdkVersion: string"],"sources":["../src/Template.vue","../src/engine-target.ts","../src/sdk-version.ts","../src/Document.vue","../src/Layout.vue","../src/Flow.vue","../src/Stream.vue","../src/PageBreak.vue","../src/PageCounter.vue","../src/PageNumber.vue","../src/PageCount.vue","../src/Counter.vue","../src/Ref.vue","../src/TableOfContents.vue","../src/Footnote.vue","../src/Footnotes.vue","../src/CounterDef.vue","../src/Numbering.vue","../src/NumberingRule.vue","../src/Scope.vue","../src/types.ts","../src/utils.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { h, ref, onMounted, type VNode, useAttrs } from 'vue'\n\nconst attrs = useAttrs()\nconst slots = defineSlots<{\n\tdefault?: () => VNode[]\n}>()\n\nconst tpl = ref<HTMLTemplateElement | null>(null)\n\nonMounted(() => {\n\tconst el = tpl.value\n\tif (!el) return\n\n\t// vue will render children incorrectly as direct child nodes,\n\t// so we need to move them into the template.content manually\n\tif (el.content.childNodes.length === 0) {\n\t\tconst children = Array.from(el.childNodes)\n\t\tchildren.forEach(node => el.content.appendChild(node))\n\t}\n})\n\nconst render = () => h('template', { ...attrs, ref: tpl }, slots.default?.() ?? [])\n</script>\n\n<template>\n\t<render />\n</template>\n","// The released engine version targeted by documents built from this package.\n// Each build supplies `FORMAT_ENGINE_TARGET` for itself, so the same source can\n// be built against different engines. It has to arrive as a free identifier,\n// because `define` substitutes those and not import bindings; see\n// build/release/README.md.\ndeclare const FORMAT_ENGINE_TARGET: string\n\nexport const engineTarget: string = FORMAT_ENGINE_TARGET\n","// The Format release this package belongs to, written into every document it\n// renders as `data-sdk`. It names the SDK/toolchain that produced the markup,\n// which is a different question from the engine that will lay it out\n// (`data-engine`) and from the client that will submit it.\n//\n// Each build supplies `FORMAT_JS_VERSION` for itself, so the same source can be\n// built at different release numbers. It has to arrive as a free identifier,\n// because `define` substitutes those and not import bindings; see\n// build/release/README.md.\ndeclare const FORMAT_JS_VERSION: string\n\nexport const sdkVersion: string = FORMAT_JS_VERSION\n","<script lang=\"ts\">\nimport type { FontMode } from './types'\n\n/**\n * Props the Format runtime passes to a document entry function. The\n * generic parameter is the shape of the active data variant.\n *\n * In `<script setup>`:\n *\n * import type { RenderProps } from '@format.dev/vue'\n * import type { Invoice } from './types'\n *\n * defineProps<RenderProps<Invoice>>()\n */\nexport interface RenderProps<T = unknown> {\n\tdata: T\n}\n\nexport interface DocumentProps {\n\ttitle: string\n\tsubject?: string\n\tauthor?: string\n\tkeywords?: string[]\n\t/**\n\t * How the PDF embeds its fonts — file size against rendering quality. Leave\n\t * unset for most documents; set `'fidelity'` when exact text rendering\n\t * matters more than file size.\n\t *\n\t * - Compact (the default) keeps files small: the fonts embed as subset CID\n\t * instances, so the optical size is fixed and strokes can look slightly\n\t * heavier in some viewers (for example macOS Preview).\n\t * - Fidelity gives the best-looking output: text keeps its exact optical\n\t * sizing and renders at the same weight in every PDF viewer. The cost is a\n\t * larger file, since the fonts embed as Type 3.\n\t */\n\tfonts?: FontMode\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport Template from './Template.vue'\nimport { engineTarget } from './engine-target'\nimport { sdkVersion } from './sdk-version'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = defineProps<DocumentProps>()\n\nconst keywordsString = computed(() => props.keywords?.join(', ') || undefined)\n</script>\n\n<template>\n\t<Template\n\t\t:data-sdk=\"sdkVersion\"\n\t\t:data-engine=\"engineTarget\"\n\t\tdata-type=\"document\"\n\t\t:data-title=\"title\"\n\t\t:data-subject=\"subject\"\n\t\t:data-author=\"author\"\n\t\t:data-keywords=\"keywordsString\"\n\t\t:data-fonts=\"fonts\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { PaginationStrategy, SplitGranularity } from './types'\n\nexport interface LayoutProps {\n\t/** Design label, mirrored to each page as `data-layout-id` for CSS. Optional:\n\t * when omitted, the engine generates one from the Layout's document position. */\n\tid?: string\n\twidth: number\n\theight: number\n\tpaginationStrategy?: PaginationStrategy\n\tsplitGranularity?: SplitGranularity\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport Template from './Template.vue'\n\nconst props = defineProps<LayoutProps>()\n\nconst widthPx = computed(() => `${props.width}px`)\nconst heightPx = computed(() => `${props.height}px`)\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"layout\"\n\t\t:data-id=\"id\"\n\t\t:data-width=\"widthPx\"\n\t\t:data-height=\"heightPx\"\n\t\t:data-pagination-strategy=\"paginationStrategy\"\n\t\t:data-split-granularity=\"splitGranularity\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { PaginationStrategy, SplitGranularity } from './types'\n\nexport interface FlowProps {\n\tsplitGranularity?: SplitGranularity\n\tpaginationStrategy?: PaginationStrategy\n\tscope?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\ndefineProps<FlowProps>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"flow\"\n\t\t:data-split-granularity=\"splitGranularity\"\n\t\t:data-pagination-strategy=\"paginationStrategy\"\n\t\t:data-scope=\"scope\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script setup lang=\"ts\">\nimport Template from './Template.vue'\n</script>\n\n<template>\n\t<Template data-type=\"stream\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script setup lang=\"ts\">\nimport Template from './Template.vue'\n</script>\n\n<template>\n\t<Template data-type=\"page-break\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface PageCounterBaseProps {\n\t/**\n\t * HTML tag to render. Defaults to `span`. Use `div` (or another block-level\n\t * element) when the counter needs its own line.\n\t */\n\tas?: string\n\t/**\n\t * CSS `<counter-style>` used to format the counter — e.g. `decimal`,\n\t * `lower-roman`, `upper-alpha`, or a custom `@counter-style` name. Sets\n\t * `--page-counter-style` inline; defaults to `decimal` from the base\n\t * stylesheet when omitted.\n\t */\n\tcounterStyle?: CounterStyle\n}\n\nexport interface PageCounterProps extends PageCounterBaseProps {\n\ttype: 'page-number' | 'page-count'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type CSSProperties } from 'vue'\n\nconst props = withDefaults(defineProps<PageCounterProps>(), {\n\tas: 'span'\n})\n\nconst style = computed<CSSProperties | undefined>(() =>\n\tprops.counterStyle ? ({ '--page-counter-style': props.counterStyle } as CSSProperties) : undefined\n)\n</script>\n\n<template>\n\t<component :is=\"as\" :data-type=\"type\" :style=\"style\" />\n</template>\n","<script lang=\"ts\">\nimport type { PageCounterBaseProps } from './PageCounter.vue'\nexport type PageNumberProps = PageCounterBaseProps\n</script>\n\n<script setup lang=\"ts\">\nimport PageCounter from './PageCounter.vue'\n\nconst props = defineProps<PageNumberProps>()\n</script>\n\n<template>\n\t<PageCounter type=\"page-number\" v-bind=\"props\" />\n</template>\n","<script lang=\"ts\">\nimport type { PageCounterBaseProps } from './PageCounter.vue'\nexport type PageCountProps = PageCounterBaseProps\n</script>\n\n<script setup lang=\"ts\">\nimport PageCounter from './PageCounter.vue'\n\nconst props = defineProps<PageCountProps>()\n</script>\n\n<template>\n\t<PageCounter type=\"page-count\" v-bind=\"props\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface CounterProps {\n\t/**\n\t * The counter to read or advance. Counters are created on first use, so any\n\t * name works — `figure`, `table`, `step`. The same name shares one running\n\t * value across the whole document.\n\t */\n\tname: string\n\t/**\n\t * Read the current value without advancing it. Use this to refer back to a\n\t * number you already showed, e.g. \"see Figure <Counter name='figure' peek />\".\n\t */\n\tpeek?: boolean\n\t/**\n\t * Reset the counter to 0 at this point and render nothing — the start of a\n\t * fresh run (a new chapter restarting its figures).\n\t */\n\treset?: boolean\n\t/**\n\t * Set the counter to an exact value and show it. Mutually exclusive with `by`;\n\t * setting both is a runtime error in dev, since Vue props can't express the\n\t * either/or a TypeScript union would (the React SDK rejects it at compile time).\n\t */\n\tset?: number\n\t/**\n\t * How much to advance by before showing the value. Defaults to 1.\n\t */\n\tby?: number\n\t/**\n\t * Join the whole nested chain of this counter with the given separator — the\n\t * `counters()` read, for nested lists: `join=\".\"` shows `1.2.1`. Without it,\n\t * only the innermost value is shown.\n\t */\n\tjoin?: string\n\t/**\n\t * HTML tag to render. Defaults to `span`.\n\t */\n\tas?: string\n\t/**\n\t * CSS `<counter-style>` used to format the value — e.g. `decimal`,\n\t * `lower-roman`, `upper-alpha`. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n}\n</script>\n\n<!--\n\tA counter whose value survives pagination. Unlike a CSS counter, which resets\n\ton every page, this is resolved by Format before pages are split, so the\n\tnumber stays correct wherever the content lands.\n\n\tBy default it advances the counter and shows the new value — the usual \"this\n\tis Figure N\" case. `peek` reads without advancing, `set` jumps to a value, and\n\t`reset` starts the count over. These three are mutually exclusive; when more\n\tthan one is set, `reset` wins, then `set`, then `peek`. `by` applies only to\n\tthe default advance.\n\n\tGive the counter an `id` to make it referenceable. A `<Ref to=\"that-id\" />`\n\tthen prints the exact value this counter showed, and `<Ref to=\"that-id\" page />`\n\tthe page it landed on — the same way a heading's id yields its section number.\n-->\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<CounterProps>(), {\n\tas: 'span'\n})\n\n// defineProps can't express the set/by XOR the React SDK enforces at the type\n// level, so this runtime check covers it in dev; keep it when editing the props\nif (\n\ttypeof process !== 'undefined' &&\n\tprocess.env?.NODE_ENV !== 'production' &&\n\tprops.set !== undefined &&\n\tprops.by !== undefined\n) {\n\tconsole.error(\n\t\t'<Counter>: `set` and `by` are mutually exclusive; `set` jumps to an exact value and wins, `by` is ignored.'\n\t)\n}\n\nconst action = computed(() => (props.reset ? 'reset' : props.set !== undefined ? 'set' : props.peek ? 'peek' : 'next'))\n\n// data-value seeds both actions: the exact value for `set`, the step size for `next`\nconst value = computed(() => (props.set !== undefined ? props.set : action.value === 'next' ? props.by : undefined))\n</script>\n\n<template>\n\t<component\n\t\t:is=\"as\"\n\t\tdata-type=\"counter\"\n\t\t:data-name=\"name\"\n\t\t:data-action=\"action\"\n\t\t:data-value=\"value\"\n\t\t:data-join=\"join\"\n\t\t:data-counter-style=\"counterStyle\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface RefProps {\n\t/**\n\t * The `id` to point at. Put an id on a heading to reference its section number,\n\t * or on a `<Counter>` to reference the value that counter printed. The target\n\t * can appear anywhere in the document, before or after this reference.\n\t */\n\tto: string\n\t/**\n\t * Read a named counter's value as it stood at the target, e.g. `counter=\"figure\"`\n\t * for the figure count at that point in the document. Omit it to show the\n\t * target's own number — a heading's section number, or the value a\n\t * `<Counter id=\"…\">` printed.\n\t */\n\tcounter?: string\n\t/**\n\t * Show the page the target landed on, e.g. \"see page 12\". Resolved after\n\t * pagination. Takes precedence over `counter`.\n\t */\n\tpage?: boolean\n\t/**\n\t * HTML tag to render. Defaults to `span`.\n\t */\n\tas?: string\n\t/**\n\t * CSS `<counter-style>` used to format the value. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n}\n</script>\n\n<!--\n\tA cross-reference to a numbered element — \"see Section 2.1\" or \"Figure 3\".\n\tPoint it at an `id`: a heading's id yields its section number, a `<Counter>`'s\n\tid yields the value that counter printed. Add `page` for the page the target\n\tlanded on, or `counter` to read a named counter's running value at the target.\n\n\tReferences resolve before pages are split and can point forward to an element\n\tthat appears later in the document.\n\n\t\t<figcaption>Figure <Counter name=\"figure\" id=\"flow\" />: the data flow</figcaption>\n\t\tThen, anywhere else in the document:\n\t\t<p>The method (see Section <Ref to=\"method\" />) reads Figure <Ref to=\"flow\" />,\n\t\t shown in full on page <Ref to=\"flow\" page />.</p>\n-->\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<RefProps>(), {\n\tas: 'span'\n})\n\nconst counter = computed(() => (props.page ? undefined : props.counter))\nconst page = computed(() => (props.page ? '' : undefined))\n</script>\n\n<template>\n\t<component\n\t\t:is=\"as\"\n\t\tdata-type=\"ref\"\n\t\t:data-to=\"to\"\n\t\t:data-counter=\"counter\"\n\t\t:data-page=\"page\"\n\t\t:data-counter-style=\"counterStyle\" />\n</template>\n","<script lang=\"ts\">\nimport type { TocLeader } from './types'\n\nexport interface TableOfContentsProps {\n\t/**\n\t * CSS selector for the headings to list. Defaults to `h1, h2, h3`.\n\t */\n\tcollect?: string\n\t/**\n\t * The dot leader between each entry's title and its page number. The default,\n\t * `dots`, draws it; `none` leaves the run between them blank.\n\t */\n\tleader?: TocLeader\n\t/**\n\t * Repeat the leading content with the nav on every page the contents spans, like a\n\t * running header. Off by default: the leading content shows once, above the entries.\n\t */\n\trepeatHead?: boolean\n}\n</script>\n\n<!--\n\tA table of contents. Format fills it after laying out the document: one entry per\n\theading the `collect` selector matches, each with the heading's number, its\n\ttitle, and the page it landed on.\n\n\tThe entries are flat anchors in a `<div data-type=\"toc-entries\">` inside a\n\t`<nav data-type=\"toc\">`: each is an `<a data-type=\"toc-entry\" data-depth=\"N\">`\n\t(depth 0 at the top of the outline) holding `toc-number`, `toc-title`, and\n\t`toc-page` spans. Depth is data, not nesting, so the stylesheet indents and sizes\n\tby depth and a long contents paginates by breaking between anchors. Style it through\n\tthe `data-type` hooks and the `--toc-*` custom properties (root size, per-depth size\n\tand indent, page-number size, leader, and vertical rhythm). A `class` or `style` set\n\ton `<TableOfContents>` carries onto the nav. Set `leader=\"none\"` to omit the dot leader\n\tentirely, so no leader is drawn between a title and its page number.\n\n\tThe default slot is leading content shown above the entries — put a \"Contents\" heading\n\tthere. It shows once by default; set `repeatHead` to repeat it with the nav per page.\n\n\t\t<TableOfContents collect=\"h1, h2\">\n\t\t\t<h2>Contents</h2>\n\t\t</TableOfContents>\n\n\tGive a collected heading a `data-toc-description` and its entry gains a\n\t`toc-description` line under the title:\n\n\t\t<h1 data-toc-description=\"Defining the studio's personality and direction.\">\n\t\t\tVisual Positioning\n\t\t</h1>\n-->\n<script setup lang=\"ts\">\nimport { type VNode } from 'vue'\nimport Template from './Template.vue'\n\nwithDefaults(defineProps<TableOfContentsProps>(), { repeatHead: undefined })\ndefineSlots<{\n\t/** Leading content shown once above the entries, e.g. a \"Contents\" heading. */\n\tdefault?: () => VNode[]\n}>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"toc\"\n\t\t:data-collect=\"collect\"\n\t\t:data-leader=\"leader\"\n\t\t:data-repeat-head=\"repeatHead === undefined ? undefined : repeatHead ? 'true' : 'false'\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<!--\n\tA footnote. Write the note's text as the children, at the point it's\n\treferenced; Format leaves a numbered marker inline and moves the text to the\n\tfooter of whichever page the marker lands on. Footnotes are numbered\n\tcontinuously through the document.\n\n\tPair it with a `<Footnotes />` region in the Layout to control where the notes\n\tsit; without one, Format adds a footer area to each page that needs it.\n\n\t\t<p>The result holds<Footnote>under the stated assumptions</Footnote>.</p>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n</script>\n\n<template>\n\t<!-- a template so the note's text stays inert and out of the inline flow until\n\t\tthe engine moves it to the footer, leaving just the marker behind -->\n\t<Template data-type=\"footnote\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface FootnotesProps {\n\t/**\n\t * The counter style for the note numbers and their inline markers. Defaults to\n\t * the document's numbering style, or `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * Restart the numbering on each page, so every page's footer reads 1, 2, 3 rather\n\t * than a count that runs the whole document. For a per-page footer in a Layout; the\n\t * inline markers renumber to match. Off by default (continuous numbering).\n\t */\n\trestartEachPage?: boolean\n\t/**\n\t * Whether the leading content (a heading, a rule) repeats in every page's footer. On by\n\t * default for a per-page Layout footer; an inline endnotes block shows it once. Set `false`\n\t * to show a Layout footer's head on its first page only.\n\t */\n\trepeatHead?: boolean\n}\n</script>\n\n<!--\n\tThe region that collects a page's footnotes, authored as a `<template>` Format\n\tfills. In a Layout it is a per-page footer gathering the notes whose markers\n\tlanded there; in a flow's content it is an endnotes list. Format renders it as an\n\t`<aside data-type=\"footnotes\">` holding a `<dl data-type=\"footnote-entries\">`, where\n\teach note is a `<dt data-type=\"footnote-number\">` term and a\n\t`<dd data-type=\"footnote-content\">` definition; style the list as a grid with your\n\town CSS. A `class` or `style` set on `<Footnotes>` carries onto the rendered `<aside>`.\n\n\tPut a heading or rule inside `<Footnotes>` to render it above the generated list,\n\tthe way a table of contents renders its leading content above the entries:\n\n\t\t<Footnotes>\n\t\t\t<h4>Notes</h4>\n\t\t</Footnotes>\n\n\tOmit it and Format adds a plain footer to each page that has footnotes.\n-->\n<script setup lang=\"ts\">\nimport { type VNode } from 'vue'\nimport Template from './Template.vue'\n\nwithDefaults(defineProps<FootnotesProps>(), { repeatHead: undefined })\ndefineSlots<{\n\t/** Optional leading content, for a heading or rule above the generated note list. */\n\tdefault?: () => VNode[]\n}>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"footnotes\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-restart-each-page=\"restartEachPage ? '' : undefined\"\n\t\t:data-repeat-head=\"repeatHead === undefined ? undefined : repeatHead ? 'true' : 'false'\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nexport interface CounterDefProps {\n\t/** The counter this defines. Shared by name across the document. */\n\tname: string\n\t/**\n\t * The counter this one restarts under, if any: whenever that owner advances, this\n\t * counter returns to 0. A `figure` set to restart under `chapter` reads \"Figure 2.1\".\n\t * The restart cascades, so a new chapter zeros section and, under section, figure.\n\t */\n\tresetEach?: string\n}\n</script>\n\n<!--\n\tDeclares one counter's behaviour, used as <CounterDef> inside <Numbering>. Name the\n\tcounter and, optionally, the owner counter it restarts under. A counter with an owner\n\treturns to 0 every time the owner's value changes; one with no owner restarts only when\n\tyou reset or set it yourself.\n\n\t\t<Numbering>\n\t\t\t<CounterDef name=\"figure\" resetEach=\"chapter\" />\n\t\t\t<NumberingRule match=\"figcaption\" counter=\"figure\" format=\"Figure {chapter}.{figure}: \" />\n\t\t</Numbering>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\ndefineProps<CounterDefProps>()\n</script>\n\n<template>\n\t<Template data-type=\"counter-def\" :data-name=\"name\" :data-reset-each=\"resetEach\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface NumberingProps {\n\t/**\n\t * The default counter style for every counter the document numbers. Per-rule,\n\t * per-Counter, and per-Footnotes styles override it. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * Whether headings `h1` through `h6` get the built-in hierarchical numbers. On by\n\t * default. Set `false` when your own rules number the headings; that removes the\n\t * built-in restarts between heading levels as well as the built-in numbers.\n\t */\n\tdefaultHeadings?: boolean\n}\n</script>\n\n<!--\n\tTurns on document-wide numbering. By default it numbers headings `h1` through\n\t`h6` hierarchically — `1`, `1.1`, `1.1.1` — with each level resetting the ones\n\tbeneath it. Add <NumberingRule> children to number other things; they add to the\n\tdefault headings. To number headings your own way, set `:default-headings=\"false\"`\n\tand write rules for them.\n\n\tNumbers are resolved before pages are split, so they stay correct across page\n\tbreaks where plain CSS counters would reset.\n\n\t\t<Document title=\"Report\">\n\t\t\t<Numbering />\n\t\t\t...\n\t\t</Document>\n-->\n<script setup lang=\"ts\">\nimport { type VNode } from 'vue'\nimport Template from './Template.vue'\n\n// Vue casts an omitted boolean prop to false, which would switch the default\n// headings off; the undefined default keeps an omitted prop omitted\nwithDefaults(defineProps<NumberingProps>(), { defaultHeadings: undefined })\ndefineSlots<{\n\t/** Optional `<NumberingRule>` and `<CounterDef>` children that extend the scheme. */\n\tdefault?: () => VNode[]\n}>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"numbering\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-default-headings=\"defaultHeadings === undefined ? undefined : defaultHeadings ? 'true' : 'false'\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface NumberingRuleProps {\n\t/**\n\t * CSS selector for the elements this rule numbers, e.g. `h2`, `figure figcaption`,\n\t * `.step`. Every match advances the counter in document order.\n\t */\n\tmatch: string\n\t/**\n\t * The counter this rule advances. Defaults to the selector, so a single-tag\n\t * rule needs no separate name.\n\t */\n\tcounter?: string\n\t/**\n\t * The text inserted into each match, with `{counter}` placeholders. For\n\t * example `Figure {figure}: ` or `{chapter:upper-roman}. `. A placeholder may\n\t * carry its own style after a colon. When omitted, the rule advances the\n\t * counter but inserts nothing — pair it with a <Counter> read.\n\t */\n\tformat?: string\n\t/**\n\t * How much to advance the counter on each match. Defaults to 1. Set to `0` to insert\n\t * a counter's value without advancing it.\n\t */\n\tincrement?: number\n\t/**\n\t * Set the counter to this exact value on each match instead of advancing it.\n\t * Mutually exclusive with `increment`; setting both is a runtime error in dev,\n\t * since Vue props can't express the either/or a TypeScript union would.\n\t */\n\tset?: number\n\t/**\n\t * Default `<counter-style>` for placeholders in `format`. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * Where the formatted number goes relative to the matched element:\n\t * `before` its content (the default), `after` it, or `none` to only keep the\n\t * counter running. To restart a counter under another, declare it with\n\t * `<CounterDef resetEach>`; to nest a counter, mark the container `data-scope`.\n\t */\n\tinsert?: 'before' | 'after' | 'none'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\nconst props = defineProps<NumberingRuleProps>()\n\n// defineProps can't express the set/increment XOR a TS union would, so this\n// runtime check enforces it in dev; keep it when editing the props above\nif (\n\ttypeof process !== 'undefined' &&\n\tprocess.env?.NODE_ENV !== 'production' &&\n\tprops.set !== undefined &&\n\tprops.increment !== undefined\n) {\n\tconsole.error(\n\t\t'<NumberingRule>: `set` and `increment` are mutually exclusive; `set` forces an exact value and wins, `increment` is ignored.'\n\t)\n}\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"numbering-rule\"\n\t\t:data-match=\"match\"\n\t\t:data-counter=\"counter\"\n\t\t:data-format=\"format\"\n\t\t:data-increment=\"increment\"\n\t\t:data-set=\"set\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-insert=\"insert\" />\n</template>\n","<script lang=\"ts\">\nexport interface ScopeProps {\n\t/**\n\t * The counter to open a fresh nested instance for across this wrapper's content — a\n\t * level of a nested list. Pass several space-separated to scope more than one. A\n\t * `<Counter join>` inside reads the whole open stack.\n\t */\n\tcounter: string\n}\n</script>\n\n<!--\n\tOpens a counter scope around its children and adds no element to the output: a\n\t<Scope> is the fallback for nesting content that has no element of its own to carry\n\tthe scope. When the content already sits in a container or a <Flow>, mark that\n\tdirectly (<ol data-scope=\"item\">, <Flow scope=\"item\">) instead of wrapping.\n\n\t\t<Scope counter=\"item\">\n\t\t\t<Counter name=\"item\" join=\".\" /> First\n\t\t\t<Scope counter=\"item\">\n\t\t\t\t<Counter name=\"item\" join=\".\" /> Nested\n\t\t\t</Scope>\n\t\t</Scope>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\ndefineProps<ScopeProps>()\n</script>\n\n<template>\n\t<Template :data-scope=\"counter\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","/** How a Layout or Flow decides where pages break: `auto` on overflow\n * and at PageBreak markers, `manual` at PageBreak markers only. */\nexport type PaginationStrategy = 'auto' | 'manual'\n\n/**\n * How a Flow splits content that overflows a page: at a `sentence`, `word`, or\n * `grapheme` boundary, or `none` to keep the block whole and move it to the next\n * page intact. Use the constant (`SplitGranularity.None`) or the plain string\n * (`'none'`); both are accepted.\n */\nexport const SplitGranularity = {\n\tSentence: 'sentence',\n\tWord: 'word',\n\tGrapheme: 'grapheme',\n\tNone: 'none'\n} as const\n\nexport type SplitGranularity = (typeof SplitGranularity)[keyof typeof SplitGranularity]\n\n/**\n * The dot leader between a contents entry's title and its page number. The default,\n * `dots`, draws it; `none` leaves the run between them blank. Use the constant\n * (`TocLeader.None`) or the plain string (`'none'`); both are accepted.\n */\nexport const TocLeader = {\n\tDots: 'dots',\n\tNone: 'none'\n} as const\n\nexport type TocLeader = (typeof TocLeader)[keyof typeof TocLeader]\n\n/**\n * How the PDF embeds its fonts. Mirrors `FontMode` in `@format.dev/fonts`, which owns\n * the canonical list and the default.\n */\nexport type FontMode = 'fidelity' | 'compact'\n\n/**\n * A CSS `<counter-style>` name. The predefined styles autocomplete; any custom\n * `@counter-style` name you define is accepted too.\n */\nexport type CounterStyle =\n\t| 'decimal'\n\t| 'decimal-leading-zero'\n\t| 'lower-roman'\n\t| 'upper-roman'\n\t| 'lower-alpha'\n\t| 'upper-alpha'\n\t| 'lower-latin'\n\t| 'upper-latin'\n\t| 'lower-greek'\n\t| (string & {})\n","/**\n * Tagged template for authoring CSS, typically inside a `<style>` element.\n * Returns the string from the raw segments, so CSS escapes (`\\2014`,\n * icon-font codepoints, escaped selectors) survive intact. Interpolated\n * `null`, `undefined`, and `false` collapse to an empty string for clean\n * conditional rules. The `css` name also lets editors and the Format docs\n * highlighter treat the contents as CSS.\n */\nexport function css(parts: TemplateStringsArray, ...vals: unknown[]): string {\n\tlet out = parts.ra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["../src/Template.vue","../src/engine-target.ts","../src/sdk-version.ts","../src/Document.vue","../src/Layout.vue","../src/Flow.vue","../src/Stream.vue","../src/PageBreak.vue","../src/PageCounter.vue","../src/PageNumber.vue","../src/PageCount.vue","../src/Counter.vue","../src/Ref.vue","../src/RunningHead.vue","../src/TableOfContents.vue","../src/Footnote.vue","../src/Footnotes.vue","../src/CounterDef.vue","../src/Numbering.vue","../src/NumberingRule.vue","../src/Bookmarks.vue","../src/Scope.vue","../src/types.ts","../src/utils.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { h, ref, onMounted, type VNode, useAttrs } from 'vue'\n\nconst attrs = useAttrs()\nconst slots = defineSlots<{\n\tdefault?: () => VNode[]\n}>()\n\nconst tpl = ref<HTMLTemplateElement | null>(null)\n\nonMounted(() => {\n\tconst el = tpl.value\n\tif (!el) return\n\n\t// vue will render children incorrectly as direct child nodes,\n\t// so we need to move them into the template.content manually\n\tif (el.content.childNodes.length === 0) {\n\t\tconst children = Array.from(el.childNodes)\n\t\tchildren.forEach(node => el.content.appendChild(node))\n\t}\n})\n\nconst render = () => h('template', { ...attrs, ref: tpl }, slots.default?.() ?? [])\n</script>\n\n<template>\n\t<render />\n</template>\n","// The released engine version targeted by documents built from this package.\n// Each build supplies `FORMAT_ENGINE_TARGET` for itself, so the same source can\n// be built against different engines. It has to arrive as a free identifier,\n// because `define` substitutes those and not import bindings; see\n// build/release/README.md.\ndeclare const FORMAT_ENGINE_TARGET: string\n\nexport const engineTarget: string = FORMAT_ENGINE_TARGET\n","// The Format release this package belongs to, written into every document it\n// renders as `data-sdk`. It names the SDK/toolchain that produced the markup,\n// which is a different question from the engine that will lay it out\n// (`data-engine`) and from the client that will submit it.\n//\n// Each build supplies `FORMAT_JS_VERSION` for itself, so the same source can be\n// built at different release numbers. It has to arrive as a free identifier,\n// because `define` substitutes those and not import bindings; see\n// build/release/README.md.\ndeclare const FORMAT_JS_VERSION: string\n\nexport const sdkVersion: string = FORMAT_JS_VERSION\n","<script lang=\"ts\">\nimport type { FontMode } from './types'\n\n/**\n * Props the Format runtime passes to a document entry function. The\n * generic parameter is the shape of the active data variant.\n *\n * In `<script setup>`:\n *\n * import type { RenderProps } from '@format.dev/vue'\n * import type { Invoice } from './types'\n *\n * defineProps<RenderProps<Invoice>>()\n */\nexport interface RenderProps<T = unknown> {\n\tdata: T\n}\n\nexport interface DocumentProps {\n\ttitle: string\n\tsubject?: string\n\tauthor?: string\n\tkeywords?: string[]\n\t/**\n\t * The language the document is written in, as a BCP 47 language tag such as\n\t * `'fr'` or `'pt-BR'`. Format adds it to your PDF, and screen readers use it to\n\t * choose the right voice and pronunciation. Format also applies that language's\n\t * conventions for quotation marks and letter case to every page. Set it on\n\t * every document: without it, your PDF has no language and doesn't meet\n\t * accessibility standards such as WCAG and PDF/UA. Format ignores invalid tags,\n\t * such as `'en_US'` or `'english'`. To mark a passage in a different language,\n\t * add a `lang` attribute to its element.\n\t */\n\tlang?: string\n\t/**\n\t * Selects the versions of Format's built-in Sans, Serif, and Mono fonts.\n\t * `compact` (default) uses static fonts for smaller PDFs. `fidelity` uses\n\t * variable fonts, preserving optical sizing where supported, but typically\n\t * produces larger PDFs. Custom fonts are used as supplied in either mode.\n\t */\n\tfonts?: FontMode\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport Template from './Template.vue'\nimport { engineTarget } from './engine-target'\nimport { sdkVersion } from './sdk-version'\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = defineProps<DocumentProps>()\n\nconst keywordsString = computed(() => props.keywords?.join(', ') || undefined)\n</script>\n\n<template>\n\t<Template\n\t\t:data-sdk=\"sdkVersion\"\n\t\t:data-engine=\"engineTarget\"\n\t\tdata-type=\"document\"\n\t\t:data-title=\"title\"\n\t\t:data-subject=\"subject\"\n\t\t:data-author=\"author\"\n\t\t:data-keywords=\"keywordsString\"\n\t\t:data-lang=\"lang\"\n\t\t:data-fonts=\"fonts\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { PaginationStrategy, SplitGranularity } from './types'\n\nexport interface LayoutProps {\n\t/** Design label, mirrored to each page as `data-layout-id` for CSS. Optional:\n\t * when omitted, the engine generates one from the Layout's document position. */\n\tid?: string\n\twidth: number\n\theight: number\n\tpaginationStrategy?: PaginationStrategy\n\tsplitGranularity?: SplitGranularity\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport Template from './Template.vue'\n\nconst props = defineProps<LayoutProps>()\n\nconst widthPx = computed(() => `${props.width}px`)\nconst heightPx = computed(() => `${props.height}px`)\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"layout\"\n\t\t:data-id=\"id\"\n\t\t:data-width=\"widthPx\"\n\t\t:data-height=\"heightPx\"\n\t\t:data-pagination-strategy=\"paginationStrategy\"\n\t\t:data-split-granularity=\"splitGranularity\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { PaginationStrategy, SplitGranularity } from './types'\n\nexport interface FlowProps {\n\tsplitGranularity?: SplitGranularity\n\tpaginationStrategy?: PaginationStrategy\n\tscope?: string\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\ndefineProps<FlowProps>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"flow\"\n\t\t:data-split-granularity=\"splitGranularity\"\n\t\t:data-pagination-strategy=\"paginationStrategy\"\n\t\t:data-scope=\"scope\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script setup lang=\"ts\">\nimport Template from './Template.vue'\n</script>\n\n<template>\n\t<Template data-type=\"stream\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script setup lang=\"ts\">\nimport Template from './Template.vue'\n</script>\n\n<template>\n\t<Template data-type=\"page-break\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface PageCounterBaseProps {\n\t/**\n\t * HTML tag to render. Defaults to `span`. Use `div` (or another block-level\n\t * element) when the counter needs its own line.\n\t */\n\tas?: string\n\t/**\n\t * CSS `<counter-style>` used to format the counter — e.g. `decimal`,\n\t * `lower-roman`, `upper-alpha`, or a custom `@counter-style` name. Sets\n\t * `--page-counter-style` inline; defaults to `decimal` from the base\n\t * stylesheet when omitted.\n\t */\n\tcounterStyle?: CounterStyle\n}\n\nexport interface PageCounterProps extends PageCounterBaseProps {\n\ttype: 'page-number' | 'page-count'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type CSSProperties } from 'vue'\n\nconst props = withDefaults(defineProps<PageCounterProps>(), {\n\tas: 'span'\n})\n\nconst style = computed<CSSProperties | undefined>(() =>\n\tprops.counterStyle ? ({ '--page-counter-style': props.counterStyle } as CSSProperties) : undefined\n)\n</script>\n\n<template>\n\t<component :is=\"as\" :data-type=\"type\" :style=\"style\" />\n</template>\n","<script lang=\"ts\">\nimport type { PageCounterBaseProps } from './PageCounter.vue'\nexport type PageNumberProps = PageCounterBaseProps\n</script>\n\n<script setup lang=\"ts\">\nimport PageCounter from './PageCounter.vue'\n\nconst props = defineProps<PageNumberProps>()\n</script>\n\n<template>\n\t<PageCounter type=\"page-number\" v-bind=\"props\" />\n</template>\n","<script lang=\"ts\">\nimport type { PageCounterBaseProps } from './PageCounter.vue'\nexport type PageCountProps = PageCounterBaseProps\n</script>\n\n<script setup lang=\"ts\">\nimport PageCounter from './PageCounter.vue'\n\nconst props = defineProps<PageCountProps>()\n</script>\n\n<template>\n\t<PageCounter type=\"page-count\" v-bind=\"props\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface CounterProps {\n\t/**\n\t * The counter to read or advance. Counters are created on first use, so any\n\t * name works — `figure`, `table`, `step`. The same name shares one running\n\t * value across the whole document.\n\t */\n\tname: string\n\t/**\n\t * Read the current value without advancing it. Use this to refer back to a\n\t * number you already showed, e.g. \"see Figure <Counter name='figure' peek />\".\n\t */\n\tpeek?: boolean\n\t/**\n\t * Reset the counter to 0 at this point and render nothing — the start of a\n\t * fresh run (a new chapter restarting its figures).\n\t */\n\treset?: boolean\n\t/**\n\t * Set the counter to an exact value and show it. Mutually exclusive with `by`;\n\t * setting both is a runtime error in dev, since Vue props can't express the\n\t * either/or a TypeScript union would (the React SDK rejects it at compile time).\n\t */\n\tset?: number\n\t/**\n\t * How much to advance by before showing the value. Defaults to 1.\n\t */\n\tby?: number\n\t/**\n\t * Join the whole nested chain of this counter with the given separator — the\n\t * `counters()` read, for nested lists: `join=\".\"` shows `1.2.1`. Without it,\n\t * only the innermost value is shown.\n\t */\n\tjoin?: string\n\t/**\n\t * HTML tag to render. Defaults to `span`.\n\t */\n\tas?: string\n\t/**\n\t * CSS `<counter-style>` used to format the value — e.g. `decimal`,\n\t * `lower-roman`, `upper-alpha`. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n}\n</script>\n\n<!--\n\tA counter whose value survives pagination. Unlike a CSS counter, which resets\n\ton every page, this is resolved by Format before pages are split, so the\n\tnumber stays correct wherever the content lands.\n\n\tBy default it advances the counter and shows the new value — the usual \"this\n\tis Figure N\" case. `peek` reads without advancing, `set` jumps to a value, and\n\t`reset` starts the count over. These three are mutually exclusive; when more\n\tthan one is set, `reset` wins, then `set`, then `peek`. `by` applies only to\n\tthe default advance.\n\n\tGive the counter an `id` to make it referenceable. A `<Ref to=\"that-id\" />`\n\tthen prints the exact value this counter showed, and `<Ref to=\"that-id\" page />`\n\tthe page it landed on — the same way a heading's id yields its section number.\n-->\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<CounterProps>(), {\n\tas: 'span'\n})\n\n// defineProps can't express the set/by XOR the React SDK enforces at the type\n// level, so this runtime check covers it in dev; keep it when editing the props\nif (\n\ttypeof process !== 'undefined' &&\n\tprocess.env?.NODE_ENV !== 'production' &&\n\tprops.set !== undefined &&\n\tprops.by !== undefined\n) {\n\tconsole.error(\n\t\t'<Counter>: `set` and `by` are mutually exclusive; `set` jumps to an exact value and wins, `by` is ignored.'\n\t)\n}\n\nconst action = computed(() => (props.reset ? 'reset' : props.set !== undefined ? 'set' : props.peek ? 'peek' : 'next'))\n\n// data-value seeds both actions: the exact value for `set`, the step size for `next`\nconst value = computed(() => (props.set !== undefined ? props.set : action.value === 'next' ? props.by : undefined))\n</script>\n\n<template>\n\t<component\n\t\t:is=\"as\"\n\t\tdata-type=\"counter\"\n\t\t:data-name=\"name\"\n\t\t:data-action=\"action\"\n\t\t:data-value=\"value\"\n\t\t:data-join=\"join\"\n\t\t:data-counter-style=\"counterStyle\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface RefProps {\n\t/**\n\t * The `id` to point at. Put an id on a heading to reference its section number,\n\t * or on a `<Counter>` to reference the value that counter printed. The target\n\t * can appear anywhere in the document, before or after this reference.\n\t */\n\tto: string\n\t/**\n\t * Read a named counter's value as it stood at the target, e.g. `counter=\"figure\"`\n\t * for the figure count at that point in the document. Omit it to show the\n\t * target's own number — a heading's section number, or the value a\n\t * `<Counter id=\"…\">` printed.\n\t */\n\tcounter?: string\n\t/**\n\t * Show the page the target landed on, e.g. \"see page 12\". Resolved after\n\t * pagination. Takes precedence over `counter`.\n\t */\n\tpage?: boolean\n\t/**\n\t * HTML tag to render. Defaults to `span`.\n\t */\n\tas?: string\n\t/**\n\t * CSS `<counter-style>` used to format the value. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n}\n</script>\n\n<!--\n\tA cross-reference to a numbered element — \"see Section 2.1\" or \"Figure 3\".\n\tPoint it at an `id`: a heading's id yields its section number, a `<Counter>`'s\n\tid yields the value that counter printed. Add `page` for the page the target\n\tlanded on, or `counter` to read a named counter's running value at the target.\n\n\tReferences resolve before pages are split and can point forward to an element\n\tthat appears later in the document.\n\n\t\t<figcaption>Figure <Counter name=\"figure\" id=\"flow\" />: the data flow</figcaption>\n\t\tThen, anywhere else in the document:\n\t\t<p>The method (see Section <Ref to=\"method\" />) reads Figure <Ref to=\"flow\" />,\n\t\t shown in full on page <Ref to=\"flow\" page />.</p>\n-->\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<RefProps>(), {\n\tas: 'span'\n})\n\nconst counter = computed(() => (props.page ? undefined : props.counter))\nconst page = computed(() => (props.page ? '' : undefined))\n</script>\n\n<template>\n\t<component\n\t\t:is=\"as\"\n\t\tdata-type=\"ref\"\n\t\t:data-to=\"to\"\n\t\t:data-counter=\"counter\"\n\t\t:data-page=\"page\"\n\t\t:data-counter-style=\"counterStyle\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle, RunningHeadElement, RunningHeadShow } from './types'\n\nexport interface RunningHeadProps {\n\t/**\n\t * CSS selector for the headings to follow, e.g. `h1`. Like a `<NumberingRule>`'s\n\t * `match`, it matches the content that flows across pages, without the scaffolding\n\t * around it: select on the heading itself, e.g. `h1` rather than `main h1`.\n\t */\n\tmatch: string\n\t/**\n\t * Which match to show on each page. `first` (the default) shows the first match on\n\t * the page; `start` shows the match the page opens with, else the section the page\n\t * continues; `last` shows the last match; `firstExcept` shows nothing on a page\n\t * where a match appears; `range` shows the first and last section the page holds.\n\t * A page with no match shows the section carried over from earlier pages.\n\t */\n\tshow?: RunningHeadShow\n\t/**\n\t * CSS selector for the headings that enclose the followed ones, e.g. `h1` for a\n\t * running head that follows `h2` sections. A match ends the current section, and\n\t * only sections of the chapter in effect are shown. A chapter running head and a\n\t * section running head on one page agree when they use the same `show` other\n\t * than `range`, or when the chapter uses `start` beside a section `range`.\n\t */\n\twithin?: string\n\t/**\n\t * The number to show, with `{counter}` placeholders read where the heading sits,\n\t * e.g. `{h1:decimal-leading-zero}.`. Defaults to the number the heading shows.\n\t */\n\tformat?: string\n\t/**\n\t * Default `<counter-style>` for placeholders in `format`. Defaults to the\n\t * document's numbering style, or `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * The text between the first and last section when `show` is `range`. Defaults to\n\t * an en dash with a space either side.\n\t */\n\trangeSeparator?: string\n\t/**\n\t * HTML tag to render: `span` (the default), `div`, `p`, a heading, or a sectioning\n\t * element such as `header`. The text goes in a shadow root, which only these\n\t * elements can hold.\n\t */\n\tas?: RunningHeadElement\n}\n</script>\n\n<!--\n\tNames, in a page's header or footer, the section the page belongs to: the title\n\tof the heading `match` picks out, with its number. Place it in a Layout's\n\tscaffolding, and Format fills it on every page once the page's content is placed,\n\tso a chapter that starts halfway down a page is named correctly. The heading, its\n\ttable of contents entry, and the running head always show the same number and\n\ttitle.\n\n\tSet `data-running-head` on a heading to show a shorter title (an empty value shows\n\tnothing for it), and `data-running-head-reset` on any element to end the current\n\tsection, e.g. on an appendix's title page. For the heading's PDF bookmark, set\n\t`data-bookmark` the same way.\n\n\tThe box keeps one size whatever text lands in it: one line tall, or as many lines\n\tas `--running-head-lines` sets. Give it a width in your layout, such as a grid\n\tcolumn; text that doesn't fit is cut off, with an ellipsis when the box holds its\n\tlines. The text sits in the box's own shadow root, where your selectors don't\n\treach: style it with `::part()`, such as `::part(title)`.\n\n\t\t<Numbering>\n\t\t\t<NumberingRule match=\"h1\" format=\"{h1:decimal-leading-zero}.\" />\n\t\t</Numbering>\n\t\t<Layout id=\"page\" :width=\"595\" :height=\"842\">\n\t\t\t<header>\n\t\t\t\t<RunningHead match=\"h1\" show=\"start\" />\n\t\t\t\t<PageNumber />\n\t\t\t</header>\n\t\t\t<Flow>\n\t\t\t\t<h1>General information</h1>\n\t\t\t\t...\n\t\t\t</Flow>\n\t\t</Layout>\n-->\n<script setup lang=\"ts\">\nwithDefaults(defineProps<RunningHeadProps>(), {\n\tas: 'span'\n})\n</script>\n\n<template>\n\t<component\n\t\t:is=\"as\"\n\t\tdata-type=\"running-head\"\n\t\t:data-match=\"match\"\n\t\t:data-show=\"show\"\n\t\t:data-within=\"within\"\n\t\t:data-format=\"format\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-range-separator=\"rangeSeparator\" />\n</template>\n","<script lang=\"ts\">\nimport type { TocLeader } from './types'\n\nexport interface TableOfContentsProps {\n\t/**\n\t * CSS selector for the headings to list. Defaults to `h1, h2, h3`. Like a\n\t * `<NumberingRule>`'s `match`, it matches the content that flows across pages,\n\t * without the scaffolding around it.\n\t */\n\tcollect?: string\n\t/**\n\t * The dot leader between each entry's title and its page number. The default,\n\t * `dots`, draws it; `none` leaves the run between them blank.\n\t */\n\tleader?: TocLeader\n\t/**\n\t * Repeat the leading content with the nav on every page the contents spans, like a\n\t * running header. Off by default: the leading content shows once, above the entries.\n\t */\n\trepeatHead?: boolean\n\t/**\n\t * CSS selector for the headings that enclose the listed ones, e.g. `h1` for a\n\t * chapter's list of its sections. Place the contents after the chapter's heading:\n\t * it lists the headings up to the next match. It runs independently of every other\n\t * contents, so a book's contents can list every chapter while each chapter lists\n\t * its own sections. Without it, a contents runs to the next contents without\n\t * `within`.\n\t */\n\twithin?: string\n}\n</script>\n\n<!--\n\tA table of contents. Format fills it after laying out the document: one entry per\n\theading the `collect` selector matches, each with the heading's number, its\n\ttitle, and the page it landed on.\n\n\tThe entries are flat anchors in a `<div data-type=\"toc-entries\">` inside a\n\t`<nav data-type=\"toc\">`: each is an `<a data-type=\"toc-entry\" data-depth=\"N\">`\n\t(depth 0 at the top of the outline) holding `toc-number`, `toc-title`, and\n\t`toc-page` spans. Depth is data, not nesting, so the stylesheet indents and sizes\n\tby depth and a long contents paginates by breaking between anchors. Style it through\n\tthe `data-type` hooks and the `--toc-*` custom properties (root size, per-depth size\n\tand indent, page-number size, leader, and vertical rhythm). A `class` or `style` set\n\ton `<TableOfContents>` carries onto the nav. Set `leader=\"none\"` to omit the dot leader\n\tentirely, so no leader is drawn between a title and its page number.\n\n\tThe default slot is leading content shown above the entries — put a \"Contents\" heading\n\tthere. It shows once by default; set `repeatHead` to repeat it with the nav per page.\n\n\tPlace it directly in a `<Flow>` or its `<Stream>`. Inside other content, such as a\n\t`<section>`, it renders nothing.\n\n\tA contents lists the headings after it, up to the next contents without `within`.\n\tSet `within` to give one its own section instead, such as a chapter's sections\n\tbeside the book's chapters:\n\n\t\t<TableOfContents collect=\"h1\">…</TableOfContents>\n\n\t\t<h1>Admissions</h1>\n\t\t<TableOfContents collect=\"h2\" within=\"h1\" />\n\t\t<h2>Requirements</h2>\n\n\t\t<TableOfContents collect=\"h1, h2\">\n\t\t\t<h2>Contents</h2>\n\t\t</TableOfContents>\n\n\tGive a collected heading a `data-toc-description` and its entry gains a\n\t`toc-description` line under the title:\n\n\t\t<h1 data-toc-description=\"Defining the studio's personality and direction.\">\n\t\t\tVisual Positioning\n\t\t</h1>\n-->\n<script setup lang=\"ts\">\nimport { type VNode } from 'vue'\nimport Template from './Template.vue'\n\nwithDefaults(defineProps<TableOfContentsProps>(), { repeatHead: undefined })\ndefineSlots<{\n\t/** Leading content shown once above the entries, e.g. a \"Contents\" heading. */\n\tdefault?: () => VNode[]\n}>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"toc\"\n\t\t:data-collect=\"collect\"\n\t\t:data-leader=\"leader\"\n\t\t:data-repeat-head=\"repeatHead === undefined ? undefined : repeatHead ? 'true' : 'false'\"\n\t\t:data-within=\"within\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<!--\n\tA footnote. Write the note's text as the children, at the point it's\n\treferenced; Format leaves a numbered marker inline and moves the text to the\n\tfooter of whichever page the marker lands on. Footnotes are numbered\n\tcontinuously through the document.\n\n\tPair it with a `<Footnotes />` region in the Layout to control where the notes\n\tsit; without one, Format adds a footer area to each page that needs it.\n\n\t\t<p>The result holds<Footnote>under the stated assumptions</Footnote>.</p>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n</script>\n\n<template>\n\t<!-- a template so the note's text stays inert and out of the inline flow until\n\t\tthe engine moves it to the footer, leaving just the marker behind -->\n\t<Template data-type=\"footnote\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface FootnotesProps {\n\t/**\n\t * The counter style for the note numbers and their inline markers. Defaults to\n\t * the document's numbering style, or `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * Restart the numbering on each page, so every page's footer reads 1, 2, 3 rather\n\t * than a count that runs the whole document. For a per-page footer in a Layout; the\n\t * inline markers renumber to match. Off by default (continuous numbering).\n\t */\n\trestartEachPage?: boolean\n\t/**\n\t * Whether the leading content (a heading, a rule) repeats in every page's footer. On by\n\t * default for a per-page Layout footer; an inline endnotes block shows it once. Set `false`\n\t * to show a Layout footer's head on its first page only.\n\t */\n\trepeatHead?: boolean\n}\n</script>\n\n<!--\n\tThe region that collects a page's footnotes, authored as a `<template>` Format\n\tfills. In a Layout it is a per-page footer gathering the notes whose markers\n\tlanded there; in a flow's content it is an endnotes list. Format renders it as an\n\t`<aside data-type=\"footnotes\">` holding a `<dl data-type=\"footnote-entries\">`, where\n\teach note is a `<dt data-type=\"footnote-number\">` term and a\n\t`<dd data-type=\"footnote-content\">` definition; style the list as a grid with your\n\town CSS. A `class` or `style` set on `<Footnotes>` carries onto the rendered `<aside>`.\n\n\tPut a heading or rule inside `<Footnotes>` to render it above the generated list,\n\tthe way a table of contents renders its leading content above the entries:\n\n\t\t<Footnotes>\n\t\t\t<h4>Notes</h4>\n\t\t</Footnotes>\n\n\tOmit it and Format adds a plain footer to each page that has footnotes.\n-->\n<script setup lang=\"ts\">\nimport { type VNode } from 'vue'\nimport Template from './Template.vue'\n\nwithDefaults(defineProps<FootnotesProps>(), { repeatHead: undefined })\ndefineSlots<{\n\t/** Optional leading content, for a heading or rule above the generated note list. */\n\tdefault?: () => VNode[]\n}>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"footnotes\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-restart-each-page=\"restartEachPage ? '' : undefined\"\n\t\t:data-repeat-head=\"repeatHead === undefined ? undefined : repeatHead ? 'true' : 'false'\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nexport interface CounterDefProps {\n\t/** The counter this defines. Shared by name across the document. */\n\tname: string\n\t/**\n\t * The counter this one restarts under, if any: whenever that owner advances, this\n\t * counter returns to 0. A `figure` set to restart under `chapter` reads \"Figure 2.1\".\n\t * The restart cascades, so a new chapter zeros section and, under section, figure.\n\t */\n\tresetEach?: string\n}\n</script>\n\n<!--\n\tDeclares one counter's behaviour, used as <CounterDef> inside <Numbering>. Name the\n\tcounter and, optionally, the owner counter it restarts under. A counter with an owner\n\treturns to 0 every time the owner's value changes; one with no owner restarts only when\n\tyou reset or set it yourself.\n\n\t\t<Numbering>\n\t\t\t<CounterDef name=\"figure\" resetEach=\"chapter\" />\n\t\t\t<NumberingRule match=\"figcaption\" counter=\"figure\" format=\"Figure {chapter}.{figure}: \" />\n\t\t</Numbering>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\ndefineProps<CounterDefProps>()\n</script>\n\n<template>\n\t<Template data-type=\"counter-def\" :data-name=\"name\" :data-reset-each=\"resetEach\" />\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface NumberingProps {\n\t/**\n\t * The default counter style for every counter the document numbers. Per-rule,\n\t * per-Counter, and per-Footnotes styles override it. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * Whether headings `h1` through `h6` get the built-in hierarchical numbers. On by\n\t * default. Set `false` when your own rules number the headings; that removes the\n\t * built-in restarts between heading levels as well as the built-in numbers.\n\t */\n\tdefaultHeadings?: boolean\n}\n</script>\n\n<!--\n\tTurns on document-wide numbering. By default it numbers headings `h1` through\n\t`h6` hierarchically — `1`, `1.1`, `1.1.1` — with each level resetting the ones\n\tbeneath it. Add <NumberingRule> children to number other things; they add to the\n\tdefault headings. To number headings your own way, set `:default-headings=\"false\"`\n\tand write rules for them.\n\n\tNumbers are resolved before pages are split, so they stay correct across page\n\tbreaks where plain CSS counters would reset.\n\n\t\t<Document title=\"Report\" lang=\"en\">\n\t\t\t<Numbering />\n\t\t\t...\n\t\t</Document>\n-->\n<script setup lang=\"ts\">\nimport { type VNode } from 'vue'\nimport Template from './Template.vue'\n\n// Vue casts an omitted boolean prop to false, which would switch the default\n// headings off; the undefined default keeps an omitted prop omitted\nwithDefaults(defineProps<NumberingProps>(), { defaultHeadings: undefined })\ndefineSlots<{\n\t/** Optional `<NumberingRule>` and `<CounterDef>` children that extend the scheme. */\n\tdefault?: () => VNode[]\n}>()\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"numbering\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-default-headings=\"defaultHeadings === undefined ? undefined : defaultHeadings ? 'true' : 'false'\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","<script lang=\"ts\">\nimport type { CounterStyle } from './types'\n\nexport interface NumberingRuleProps {\n\t/**\n\t * CSS selector for the elements this rule numbers, e.g. `h2`, `figure figcaption`,\n\t * `.step`. Every match advances the counter in document order. It matches the\n\t * content that flows across pages, without the Layout or Flow scaffolding around\n\t * it: when a Layout wraps its Flow in `<main>`, `main h2` matches nothing.\n\t */\n\tmatch: string\n\t/**\n\t * The counter this rule advances. Defaults to the selector, so a single-tag\n\t * rule needs no separate name.\n\t */\n\tcounter?: string\n\t/**\n\t * The text inserted into each match, with `{counter}` placeholders. For\n\t * example `Figure {figure}: ` or `{chapter:upper-roman}. `. A placeholder may\n\t * carry its own style after a colon. When omitted, the rule advances the\n\t * counter but inserts nothing — pair it with a <Counter> read.\n\t */\n\tformat?: string\n\t/**\n\t * How much to advance the counter on each match. Defaults to 1. Set to `0` to insert\n\t * a counter's value without advancing it.\n\t */\n\tincrement?: number\n\t/**\n\t * Set the counter to this exact value on each match instead of advancing it.\n\t * Mutually exclusive with `increment`; setting both is a runtime error in dev,\n\t * since Vue props can't express the either/or a TypeScript union would.\n\t */\n\tset?: number\n\t/**\n\t * Default `<counter-style>` for placeholders in `format`. Defaults to `decimal`.\n\t */\n\tcounterStyle?: CounterStyle\n\t/**\n\t * Where the formatted number goes relative to the matched element:\n\t * `before` its content (the default), `after` it, or `none` to only keep the\n\t * counter running. To restart a counter under another, declare it with\n\t * `<CounterDef resetEach>`; to nest a counter, mark the container `data-scope`.\n\t */\n\tinsert?: 'before' | 'after' | 'none'\n}\n</script>\n\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\nconst props = defineProps<NumberingRuleProps>()\n\n// defineProps can't express the set/increment XOR a TS union would, so this\n// runtime check enforces it in dev; keep it when editing the props above\nif (\n\ttypeof process !== 'undefined' &&\n\tprocess.env?.NODE_ENV !== 'production' &&\n\tprops.set !== undefined &&\n\tprops.increment !== undefined\n) {\n\tconsole.error(\n\t\t'<NumberingRule>: `set` and `increment` are mutually exclusive; `set` forces an exact value and wins, `increment` is ignored.'\n\t)\n}\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"numbering-rule\"\n\t\t:data-match=\"match\"\n\t\t:data-counter=\"counter\"\n\t\t:data-format=\"format\"\n\t\t:data-increment=\"increment\"\n\t\t:data-set=\"set\"\n\t\t:data-counter-style=\"counterStyle\"\n\t\t:data-insert=\"insert\" />\n</template>\n","<script lang=\"ts\">\nexport interface BookmarksProps {\n\t/**\n\t * Whether bookmarks include the numbers `<Numbering>` adds to headings. On by\n\t * default. Set `false` to show titles alone, such as \"Fees\" instead of \"3 Fees\".\n\t * Text you write in a heading always stays, including digits and the value of a\n\t * `<Counter>`.\n\t */\n\tnumbers?: boolean\n\t/**\n\t * The text between each number and its title, such as `\". \"` for \"3. Fees\".\n\t * Defaults to a space, as on the page. An empty string joins them, as in \"3Fees\".\n\t */\n\tseparator?: string\n}\n</script>\n\n<!--\n\tControls how heading numbers appear in the PDF's bookmarks, the clickable outline\n\tthat PDF viewers show beside the pages. By default, each bookmark matches its\n\theading, number included. Set :numbers=\"false\" to leave the numbers out, or set\n\tseparator to change the text between each number and its title. The pages, the\n\ttable of contents, and the running heads keep their numbers. Place one directly\n\tinside <Document>.\n\n\t\t<Document title=\"Handbook\">\n\t\t\t<Numbering />\n\t\t\t<Bookmarks separator=\". \" />\n\t\t\t...\n\t\t</Document>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\n// Vue casts an omitted boolean prop to false, which would switch the numbers off; the\n// undefined default keeps an omitted prop omitted\nwithDefaults(defineProps<BookmarksProps>(), { numbers: undefined })\n</script>\n\n<template>\n\t<Template\n\t\tdata-type=\"bookmarks\"\n\t\t:data-numbers=\"numbers === undefined ? undefined : numbers ? 'true' : 'false'\"\n\t\t:data-separator=\"separator\" />\n</template>\n","<script lang=\"ts\">\nexport interface ScopeProps {\n\t/**\n\t * The counter to open a fresh nested instance for across this wrapper's content — a\n\t * level of a nested list. Pass several space-separated to scope more than one. A\n\t * `<Counter join>` inside reads the whole open stack.\n\t */\n\tcounter: string\n}\n</script>\n\n<!--\n\tOpens a counter scope around its children and adds no element to the output: a\n\t<Scope> is the fallback for nesting content that has no element of its own to carry\n\tthe scope. When the content already sits in a container or a <Flow>, mark that\n\tdirectly (<ol data-scope=\"item\">, <Flow scope=\"item\">) instead of wrapping.\n\n\t\t<Scope counter=\"item\">\n\t\t\t<Counter name=\"item\" join=\".\" /> First\n\t\t\t<Scope counter=\"item\">\n\t\t\t\t<Counter name=\"item\" join=\".\" /> Nested\n\t\t\t</Scope>\n\t\t</Scope>\n-->\n<script setup lang=\"ts\">\nimport Template from './Template.vue'\n\ndefineProps<ScopeProps>()\n</script>\n\n<template>\n\t<Template :data-scope=\"counter\">\n\t\t<slot></slot>\n\t</Template>\n</template>\n","/** How a Layout or Flow decides where pages break: `auto` on overflow\n * and at PageBreak markers, `manual` at PageBreak markers only. */\nexport type PaginationStrategy = 'auto' | 'manual'\n\n/**\n * Which matched heading a `<RunningHead>` shows on a page: the `first` or `last`\n * match on the page, the one the page `start`s with, `firstExcept` to show nothing\n * on a page where a match appears, or the `range` of sections the page holds. On a\n * page with no match, each shows the section carried over from earlier pages.\n */\nexport type RunningHeadShow = 'first' | 'start' | 'last' | 'firstExcept' | 'range'\n\n/**\n * The elements a `<RunningHead>` can render as: those that can hold a shadow root,\n * where its text goes.\n */\nexport type RunningHeadElement =\n\t| 'span'\n\t| 'div'\n\t| 'p'\n\t| 'h1'\n\t| 'h2'\n\t| 'h3'\n\t| 'h4'\n\t| 'h5'\n\t| 'h6'\n\t| 'header'\n\t| 'footer'\n\t| 'nav'\n\t| 'section'\n\t| 'article'\n\t| 'aside'\n\t| 'blockquote'\n\t| 'main'\n\t| 'body'\n\n/**\n * How a Flow splits content that overflows a page: at a `sentence`, `word`, or\n * `grapheme` boundary, or `none` to keep the block whole and move it to the next\n * page intact. Use the constant (`SplitGranularity.None`) or the plain string\n * (`'none'`); both are accepted.\n */\nexport const SplitGranularity = {\n\tSentence: 'sentence',\n\tWord: 'word',\n\tGrapheme: 'grapheme',\n\tNone: 'none'\n} as const\n\nexport type SplitGranularity = (typeof SplitGranularity)[keyof typeof SplitGranularity]\n\n/**\n * The dot leader between a contents entry's title and its page number. The default,\n * `dots`, draws it; `none` leaves the run between them blank. Use the constant\n * (`TocLeader.None`) or the plain string (`'none'`); both are accepted.\n */\nexport const TocLeader = {\n\tDots: 'dots',\n\tNone: 'none'\n} as const\n\nexport type TocLeader = (typeof TocLeader)[keyof typeof TocLeader]\n\n/**\n * How the PDF embeds its fonts. Mirrors `FontMode` in `@format.dev/fonts`, which owns\n * the canonical list and the default.\n */\nexport type FontMode = 'fidelity' | 'compact'\n\n/**\n * A CSS `<counter-style>` name. The predefined styles autocomplete; any custom\n * `@counter-style` name you define is accepted too.\n */\nexport type CounterStyle =\n\t| 'decimal'\n\t| 'decimal-leading-zero'\n\t| 'lower-roman'\n\t| 'upper-roman'\n\t| 'lower-alpha'\n\t| 'upper-alpha'\n\t| 'lower-latin'\n\t| 'upper-latin'\n\t| 'lower-greek'\n\t| (string & {})\n","/**\n * Tagged template for authoring CSS, typically inside a `<style>` element.\n * Returns the string from the raw segments, so CSS escapes (`\\2014`,\n * icon-font codepoints, escaped selectors) survive intact. Interpolated\n * `null`, `undefined`, and `false` collapse to an empty string for clean\n * conditional rules. The `css` name also lets editors and the Format docs\n * highlighter treat the contents as CSS.\n */\nexport function css(parts: TemplateStringsArray, ...vals: unknown[]): string {\n\tlet out = parts.raw[0] ?? ''\n\tfor (let i = 0; i < vals.length; i++) {\n\t\tconst v = vals[i]\n\t\tout += (v == null || v === false ? '' : String(v)) + parts.raw[i + 1]!\n\t}\n\treturn out\n}\n"],"mappings":";;;;;;EAGA,MAAM,QAAQ,UAAS;EACvB,MAAM,QAAQ,UAAA;EAId,MAAM,MAAM,IAAgC,KAAI;AAEhD,kBAAgB;GACf,MAAM,KAAK,IAAI;AACf,OAAI,CAAC,GAAI;AAIT,OAAI,GAAG,QAAQ,WAAW,WAAW,EAEpC,CADiB,MAAM,KAAK,GAAG,WAAU,CAChC,SAAQ,SAAQ,GAAG,QAAQ,YAAY,KAAK,CAAA;IAEtD;EAED,MAAM,eAAe,EAAE,YAAY;GAAE,GAAG;GAAO,KAAK;GAAI,EAAG,MAAM,WAAU,IAAK,EAAE,CAAA;;AAIjF,UAAA,WAAA,EAAA,YAAU,OAAA;;;;;;;;ACnBX,MAAaA;;;;ACIb,MAAaC;;;;;;;;;;;;;;;;ECyCb,MAAM,QAAQ;EAEd,MAAM,iBAAiB,eAAe,MAAM,UAAU,KAAK,KAAI,IAAK,OAAS;;AAI5E,UAAA,WAAA,EAAA,YAWW,kBAAA;IAVT,YAAU,MAAA,WAAA;IACV,eAAa,MAAA,aAAA;IACd,aAAU;IACT,cAAY,QAAA;IACZ,gBAAc,QAAA;IACd,eAAa,QAAA;IACb,iBAAe,eAAA;IACf,aAAW,QAAA;IACX,cAAY,QAAA;;IACb,SAAA,cAAa,CAAb,WAAa,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EClDf,MAAM,QAAQ;EAEd,MAAM,UAAU,eAAe,GAAG,MAAM,MAAM,IAAG;EACjD,MAAM,WAAW,eAAe,GAAG,MAAM,OAAO,IAAG;;AAIlD,UAAA,WAAA,EAAA,YAQW,kBAAA;IAPV,aA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