@pagesmith/core 0.1.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.
Files changed (85) hide show
  1. package/README.md +481 -0
  2. package/assets/fonts/OFL.txt +7 -0
  3. package/assets/fonts/jetbrains-mono-variable.woff2 +0 -0
  4. package/assets/fonts/open-sans-variable.woff2 +0 -0
  5. package/assets/fonts.css +17 -0
  6. package/dist/ai/index.d.mts +41 -0
  7. package/dist/ai/index.d.mts.map +1 -0
  8. package/dist/ai/index.mjs +414 -0
  9. package/dist/ai/index.mjs.map +1 -0
  10. package/dist/assets/index.d.mts +31 -0
  11. package/dist/assets/index.d.mts.map +1 -0
  12. package/dist/assets/index.mjs +2 -0
  13. package/dist/assets-bX08zEJm.mjs +155 -0
  14. package/dist/assets-bX08zEJm.mjs.map +1 -0
  15. package/dist/content-config-fHPaFZ7i.d.mts +1128 -0
  16. package/dist/content-config-fHPaFZ7i.d.mts.map +1 -0
  17. package/dist/content-layer-B7fQ3im4.mjs +590 -0
  18. package/dist/content-layer-B7fQ3im4.mjs.map +1 -0
  19. package/dist/convert-DnuB6SVV.mjs +52 -0
  20. package/dist/convert-DnuB6SVV.mjs.map +1 -0
  21. package/dist/create/index.d.mts +20 -0
  22. package/dist/create/index.d.mts.map +1 -0
  23. package/dist/create/index.mjs +215 -0
  24. package/dist/create/index.mjs.map +1 -0
  25. package/dist/css/index.d.mts +2 -0
  26. package/dist/css/index.mjs +2 -0
  27. package/dist/css-ekIt2Fdb.mjs +19 -0
  28. package/dist/css-ekIt2Fdb.mjs.map +1 -0
  29. package/dist/heading-Dhvzlay-.d.mts +27 -0
  30. package/dist/heading-Dhvzlay-.d.mts.map +1 -0
  31. package/dist/index-BQ6B1-qG.d.mts +41 -0
  32. package/dist/index-BQ6B1-qG.d.mts.map +1 -0
  33. package/dist/index-CeNDTM-y.d.mts +7 -0
  34. package/dist/index-CeNDTM-y.d.mts.map +1 -0
  35. package/dist/index-DpRBzO8Q.d.mts +15 -0
  36. package/dist/index-DpRBzO8Q.d.mts.map +1 -0
  37. package/dist/index-sFCx17CD.d.mts +59 -0
  38. package/dist/index-sFCx17CD.d.mts.map +1 -0
  39. package/dist/index.d.mts +131 -0
  40. package/dist/index.d.mts.map +1 -0
  41. package/dist/index.mjs +56 -0
  42. package/dist/index.mjs.map +1 -0
  43. package/dist/jsx-runtime/index.d.mts +24 -0
  44. package/dist/jsx-runtime/index.d.mts.map +1 -0
  45. package/dist/jsx-runtime/index.mjs +88 -0
  46. package/dist/jsx-runtime/index.mjs.map +1 -0
  47. package/dist/loaders/index.d.mts +3 -0
  48. package/dist/loaders/index.mjs +2 -0
  49. package/dist/loaders-DyABmDrE.mjs +179 -0
  50. package/dist/loaders-DyABmDrE.mjs.map +1 -0
  51. package/dist/markdown/index.d.mts +3 -0
  52. package/dist/markdown/index.mjs +2 -0
  53. package/dist/markdown-Cj5X26FL.mjs +95 -0
  54. package/dist/markdown-Cj5X26FL.mjs.map +1 -0
  55. package/dist/runtime/index.d.mts +28 -0
  56. package/dist/runtime/index.d.mts.map +1 -0
  57. package/dist/runtime/index.mjs +90 -0
  58. package/dist/runtime/index.mjs.map +1 -0
  59. package/dist/schemas/index.d.mts +4 -0
  60. package/dist/schemas/index.mjs +2 -0
  61. package/dist/schemas-DJS7wOzd.mjs +47 -0
  62. package/dist/schemas-DJS7wOzd.mjs.map +1 -0
  63. package/dist/types-DUsjRE7Y.d.mts +28 -0
  64. package/dist/types-DUsjRE7Y.d.mts.map +1 -0
  65. package/dist/vite/index.d.mts +9878 -0
  66. package/dist/vite/index.d.mts.map +1 -0
  67. package/dist/vite/index.mjs +549 -0
  68. package/dist/vite/index.mjs.map +1 -0
  69. package/package.json +136 -0
  70. package/src/styles/code/inline.css +26 -0
  71. package/src/styles/content/alerts.css +87 -0
  72. package/src/styles/content/prose.css +225 -0
  73. package/src/styles/content/toc.css +87 -0
  74. package/src/styles/content.css +22 -0
  75. package/src/styles/foundations/reset.css +49 -0
  76. package/src/styles/foundations/tokens.css +66 -0
  77. package/src/styles/layout/grid.css +179 -0
  78. package/src/styles/layout/sidebar.css +18 -0
  79. package/src/styles/standalone.css +18 -0
  80. package/src/styles/viewport.css +20 -0
  81. package/templates/docs/content/README.md +18 -0
  82. package/templates/docs/content/guide/README.md +11 -0
  83. package/templates/docs/content/guide/getting-started/README.md +9 -0
  84. package/templates/docs/content/reference/README.md +11 -0
  85. package/templates/docs/pagesmith.config.json5 +15 -0
@@ -0,0 +1,1128 @@
1
+ import { r as LoaderType, t as Loader } from "./types-DUsjRE7Y.mjs";
2
+ import { r as MarkdownConfig } from "./heading-Dhvzlay-.mjs";
3
+ import { z } from "zod";
4
+
5
+ //#region ../../node_modules/@types/unist/index.d.ts
6
+ // ## Interfaces
7
+ /**
8
+ * Info associated with nodes by the ecosystem.
9
+ *
10
+ * This space is guaranteed to never be specified by unist or specifications
11
+ * implementing unist.
12
+ * But you can use it in utilities and plugins to store data.
13
+ *
14
+ * This type can be augmented to register custom data.
15
+ * For example:
16
+ *
17
+ * ```ts
18
+ * declare module 'unist' {
19
+ * interface Data {
20
+ * // `someNode.data.myId` is typed as `number | undefined`
21
+ * myId?: number | undefined
22
+ * }
23
+ * }
24
+ * ```
25
+ */
26
+ interface Data$1 {}
27
+ /**
28
+ * One place in a source file.
29
+ */
30
+ interface Point {
31
+ /**
32
+ * Line in a source file (1-indexed integer).
33
+ */
34
+ line: number;
35
+ /**
36
+ * Column in a source file (1-indexed integer).
37
+ */
38
+ column: number;
39
+ /**
40
+ * Character in a source file (0-indexed integer).
41
+ */
42
+ offset?: number | undefined;
43
+ }
44
+ /**
45
+ * Position of a node in a source document.
46
+ *
47
+ * A position is a range between two points.
48
+ */
49
+ interface Position {
50
+ /**
51
+ * Place of the first character of the parsed source region.
52
+ */
53
+ start: Point;
54
+ /**
55
+ * Place of the first character after the parsed source region.
56
+ */
57
+ end: Point;
58
+ }
59
+ /**
60
+ * Abstract unist node.
61
+ *
62
+ * The syntactic unit in unist syntax trees are called nodes.
63
+ *
64
+ * This interface is supposed to be extended.
65
+ * If you can use {@link Literal} or {@link Parent}, you should.
66
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
67
+ * nor parent, but still a node.
68
+ */
69
+ interface Node$1 {
70
+ /**
71
+ * Node type.
72
+ */
73
+ type: string;
74
+ /**
75
+ * Info from the ecosystem.
76
+ */
77
+ data?: Data$1 | undefined;
78
+ /**
79
+ * Position of a node in a source document.
80
+ *
81
+ * Nodes that are generated (not in the original source document) must not
82
+ * have a position.
83
+ */
84
+ position?: Position | undefined;
85
+ }
86
+ //#endregion
87
+ //#region ../../node_modules/@types/mdast/index.d.ts
88
+ // ## Enumeration
89
+ /**
90
+ * How phrasing content is aligned
91
+ * ({@link https://drafts.csswg.org/css-text/ | [CSSTEXT]}).
92
+ *
93
+ * * `'left'`: See the
94
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-left | left}
95
+ * value of the `text-align` CSS property
96
+ * * `'right'`: See the
97
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-right | right}
98
+ * value of the `text-align` CSS property
99
+ * * `'center'`: See the
100
+ * {@link https://drafts.csswg.org/css-text/#valdef-text-align-center | center}
101
+ * value of the `text-align` CSS property
102
+ * * `null`: phrasing content is aligned as defined by the host environment
103
+ *
104
+ * Used in GFM tables.
105
+ */
106
+ type AlignType = "center" | "left" | "right" | null;
107
+ /**
108
+ * Explicitness of a reference.
109
+ *
110
+ * `'shortcut'`: the reference is implicit, its identifier inferred from its
111
+ * content
112
+ * `'collapsed'`: the reference is explicit, its identifier inferred from its
113
+ * content
114
+ * `'full'`: the reference is explicit, its identifier explicitly set
115
+ */
116
+ type ReferenceType = "shortcut" | "collapsed" | "full";
117
+ // ## Mixin
118
+ /**
119
+ * Node with a fallback.
120
+ */
121
+ interface Alternative {
122
+ /**
123
+ * Equivalent content for environments that cannot represent the node as
124
+ * intended.
125
+ */
126
+ alt?: string | null | undefined;
127
+ }
128
+ /**
129
+ * Internal relation from one node to another.
130
+ *
131
+ * Whether the value of `identifier` is expected to be a unique identifier or
132
+ * not depends on the type of node including the Association.
133
+ * An example of this is that they should be unique on {@link Definition},
134
+ * whereas multiple {@link LinkReference}s can be non-unique to be associated
135
+ * with one definition.
136
+ */
137
+ interface Association {
138
+ /**
139
+ * Relation of association.
140
+ *
141
+ * `identifier` is a source value: character escapes and character
142
+ * references are not parsed.
143
+ *
144
+ * It can match another node.
145
+ *
146
+ * Its value must be normalized.
147
+ * To normalize a value, collapse markdown whitespace (`[\t\n\r ]+`) to a space,
148
+ * trim the optional initial and/or final space, and perform Unicode-aware
149
+ * case-folding.
150
+ */
151
+ identifier: string;
152
+ /**
153
+ * Relation of association, in parsed form.
154
+ *
155
+ * `label` is a `string` value: it works just like `title` on {@link Link}
156
+ * or a `lang` on {@link Code}: character escapes and character references
157
+ * are parsed.
158
+ *
159
+ * It can match another node.
160
+ */
161
+ label?: string | null | undefined;
162
+ }
163
+ /**
164
+ * Marker that is associated to another node.
165
+ */
166
+ interface Reference extends Association {
167
+ /**
168
+ * Explicitness of the reference.
169
+ */
170
+ referenceType: ReferenceType;
171
+ }
172
+ /**
173
+ * Reference to resource.
174
+ */
175
+ interface Resource {
176
+ /**
177
+ * URL to the referenced resource.
178
+ */
179
+ url: string;
180
+ /**
181
+ * Advisory information for the resource, such as would be appropriate for
182
+ * a tooltip.
183
+ */
184
+ title?: string | null | undefined;
185
+ }
186
+ // ## Interfaces
187
+ /**
188
+ * Info associated with mdast nodes by the ecosystem.
189
+ *
190
+ * This space is guaranteed to never be specified by unist or mdast.
191
+ * But you can use it in utilities and plugins to store data.
192
+ *
193
+ * This type can be augmented to register custom data.
194
+ * For example:
195
+ *
196
+ * ```ts
197
+ * declare module 'mdast' {
198
+ * interface Data {
199
+ * // `someNode.data.myId` is typed as `number | undefined`
200
+ * myId?: number | undefined
201
+ * }
202
+ * }
203
+ * ```
204
+ */
205
+ interface Data extends Data$1 {}
206
+ // ## Content maps
207
+ /**
208
+ * Union of registered mdast nodes that can occur where block content is
209
+ * expected.
210
+ *
211
+ * To register custom mdast nodes, add them to {@link BlockContentMap}.
212
+ * They will be automatically added here.
213
+ */
214
+ type BlockContent = BlockContentMap[keyof BlockContentMap];
215
+ /**
216
+ * Registry of all mdast nodes that can occur where {@link BlockContent} is
217
+ * expected.
218
+ *
219
+ * This interface can be augmented to register custom node types:
220
+ *
221
+ * ```ts
222
+ * declare module 'mdast' {
223
+ * interface BlockContentMap {
224
+ * // Allow using MDX ESM nodes defined by `remark-mdx`.
225
+ * mdxjsEsm: MdxjsEsm;
226
+ * }
227
+ * }
228
+ * ```
229
+ *
230
+ * For a union of all block content, see {@link RootContent}.
231
+ */
232
+ interface BlockContentMap {
233
+ blockquote: Blockquote;
234
+ code: Code;
235
+ heading: Heading;
236
+ html: Html;
237
+ list: List;
238
+ paragraph: Paragraph;
239
+ table: Table;
240
+ thematicBreak: ThematicBreak;
241
+ }
242
+ /**
243
+ * Union of registered mdast nodes that can occur where definition content is
244
+ * expected.
245
+ *
246
+ * To register custom mdast nodes, add them to {@link DefinitionContentMap}.
247
+ * They will be automatically added here.
248
+ */
249
+ type DefinitionContent = DefinitionContentMap[keyof DefinitionContentMap];
250
+ /**
251
+ * Registry of all mdast nodes that can occur where {@link DefinitionContent}
252
+ * is expected.
253
+ *
254
+ * This interface can be augmented to register custom node types:
255
+ *
256
+ * ```ts
257
+ * declare module 'mdast' {
258
+ * interface DefinitionContentMap {
259
+ * custom: Custom;
260
+ * }
261
+ * }
262
+ * ```
263
+ *
264
+ * For a union of all definition content, see {@link RootContent}.
265
+ */
266
+ interface DefinitionContentMap {
267
+ definition: Definition;
268
+ footnoteDefinition: FootnoteDefinition;
269
+ }
270
+ /**
271
+ * Union of registered mdast nodes that can occur where list content is
272
+ * expected.
273
+ *
274
+ * To register custom mdast nodes, add them to {@link ListContentMap}.
275
+ * They will be automatically added here.
276
+ */
277
+ type ListContent = ListContentMap[keyof ListContentMap];
278
+ /**
279
+ * Registry of all mdast nodes that can occur where {@link ListContent}
280
+ * is expected.
281
+ *
282
+ * This interface can be augmented to register custom node types:
283
+ *
284
+ * ```ts
285
+ * declare module 'mdast' {
286
+ * interface ListContentMap {
287
+ * custom: Custom;
288
+ * }
289
+ * }
290
+ * ```
291
+ *
292
+ * For a union of all list content, see {@link RootContent}.
293
+ */
294
+ interface ListContentMap {
295
+ listItem: ListItem;
296
+ }
297
+ /**
298
+ * Union of registered mdast nodes that can occur where phrasing content is
299
+ * expected.
300
+ *
301
+ * To register custom mdast nodes, add them to {@link PhrasingContentMap}.
302
+ * They will be automatically added here.
303
+ */
304
+ type PhrasingContent = PhrasingContentMap[keyof PhrasingContentMap];
305
+ /**
306
+ * Registry of all mdast nodes that can occur where {@link PhrasingContent}
307
+ * is expected.
308
+ *
309
+ * This interface can be augmented to register custom node types:
310
+ *
311
+ * ```ts
312
+ * declare module 'mdast' {
313
+ * interface PhrasingContentMap {
314
+ * // Allow using MDX JSX (text) nodes defined by `remark-mdx`.
315
+ * mdxJsxTextElement: MDXJSXTextElement;
316
+ * }
317
+ * }
318
+ * ```
319
+ *
320
+ * For a union of all phrasing content, see {@link RootContent}.
321
+ */
322
+ interface PhrasingContentMap {
323
+ break: Break;
324
+ delete: Delete;
325
+ emphasis: Emphasis;
326
+ footnoteReference: FootnoteReference;
327
+ html: Html;
328
+ image: Image;
329
+ imageReference: ImageReference;
330
+ inlineCode: InlineCode;
331
+ link: Link;
332
+ linkReference: LinkReference;
333
+ strong: Strong;
334
+ text: Text;
335
+ }
336
+ /**
337
+ * Union of registered mdast nodes that can occur in {@link Root}.
338
+ *
339
+ * To register custom mdast nodes, add them to {@link RootContentMap}.
340
+ * They will be automatically added here.
341
+ */
342
+ type RootContent = RootContentMap[keyof RootContentMap];
343
+ /**
344
+ * Registry of all mdast nodes that can occur as children of {@link Root}.
345
+ *
346
+ * > **Note**: {@link Root} does not need to be an entire document.
347
+ * > it can also be a fragment.
348
+ *
349
+ * This interface can be augmented to register custom node types:
350
+ *
351
+ * ```ts
352
+ * declare module 'mdast' {
353
+ * interface RootContentMap {
354
+ * // Allow using toml nodes defined by `remark-frontmatter`.
355
+ * toml: TOML;
356
+ * }
357
+ * }
358
+ * ```
359
+ *
360
+ * For a union of all {@link Root} children, see {@link RootContent}.
361
+ */
362
+ interface RootContentMap {
363
+ blockquote: Blockquote;
364
+ break: Break;
365
+ code: Code;
366
+ definition: Definition;
367
+ delete: Delete;
368
+ emphasis: Emphasis;
369
+ footnoteDefinition: FootnoteDefinition;
370
+ footnoteReference: FootnoteReference;
371
+ heading: Heading;
372
+ html: Html;
373
+ image: Image;
374
+ imageReference: ImageReference;
375
+ inlineCode: InlineCode;
376
+ link: Link;
377
+ linkReference: LinkReference;
378
+ list: List;
379
+ listItem: ListItem;
380
+ paragraph: Paragraph;
381
+ strong: Strong;
382
+ table: Table;
383
+ tableCell: TableCell;
384
+ tableRow: TableRow;
385
+ text: Text;
386
+ thematicBreak: ThematicBreak;
387
+ yaml: Yaml;
388
+ }
389
+ /**
390
+ * Union of registered mdast nodes that can occur where row content is
391
+ * expected.
392
+ *
393
+ * To register custom mdast nodes, add them to {@link RowContentMap}.
394
+ * They will be automatically added here.
395
+ */
396
+ type RowContent = RowContentMap[keyof RowContentMap];
397
+ /**
398
+ * Registry of all mdast nodes that can occur where {@link RowContent}
399
+ * is expected.
400
+ *
401
+ * This interface can be augmented to register custom node types:
402
+ *
403
+ * ```ts
404
+ * declare module 'mdast' {
405
+ * interface RowContentMap {
406
+ * custom: Custom;
407
+ * }
408
+ * }
409
+ * ```
410
+ *
411
+ * For a union of all row content, see {@link RootContent}.
412
+ */
413
+ interface RowContentMap {
414
+ tableCell: TableCell;
415
+ }
416
+ /**
417
+ * Union of registered mdast nodes that can occur where table content is
418
+ * expected.
419
+ *
420
+ * To register custom mdast nodes, add them to {@link TableContentMap}.
421
+ * They will be automatically added here.
422
+ */
423
+ type TableContent = TableContentMap[keyof TableContentMap];
424
+ /**
425
+ * Registry of all mdast nodes that can occur where {@link TableContent}
426
+ * is expected.
427
+ *
428
+ * This interface can be augmented to register custom node types:
429
+ *
430
+ * ```ts
431
+ * declare module 'mdast' {
432
+ * interface TableContentMap {
433
+ * custom: Custom;
434
+ * }
435
+ * }
436
+ * ```
437
+ *
438
+ * For a union of all table content, see {@link RootContent}.
439
+ */
440
+ interface TableContentMap {
441
+ tableRow: TableRow;
442
+ }
443
+ // ## Abstract nodes
444
+ /**
445
+ * Abstract mdast node that contains the smallest possible value.
446
+ *
447
+ * This interface is supposed to be extended if you make custom mdast nodes.
448
+ *
449
+ * For a union of all registered mdast literals, see {@link Literals}.
450
+ */
451
+ interface Literal extends Node {
452
+ /**
453
+ * Plain-text value.
454
+ */
455
+ value: string;
456
+ }
457
+ /**
458
+ * Abstract mdast node.
459
+ *
460
+ * This interface is supposed to be extended.
461
+ * If you can use {@link Literal} or {@link Parent}, you should.
462
+ * But for example in markdown, a thematic break (`***`) is neither literal nor
463
+ * parent, but still a node.
464
+ *
465
+ * To register custom mdast nodes, add them to {@link RootContentMap} and other
466
+ * places where relevant (such as {@link ElementContentMap}).
467
+ *
468
+ * For a union of all registered mdast nodes, see {@link Nodes}.
469
+ */
470
+ interface Node extends Node$1 {
471
+ /**
472
+ * Info from the ecosystem.
473
+ */
474
+ data?: Data | undefined;
475
+ }
476
+ /**
477
+ * Abstract mdast node that contains other mdast nodes (*children*).
478
+ *
479
+ * This interface is supposed to be extended if you make custom mdast nodes.
480
+ *
481
+ * For a union of all registered mdast parents, see {@link Parents}.
482
+ */
483
+ interface Parent extends Node {
484
+ /**
485
+ * List of children.
486
+ */
487
+ children: RootContent[];
488
+ }
489
+ // ## Concrete nodes
490
+ /**
491
+ * Markdown block quote.
492
+ */
493
+ interface Blockquote extends Parent {
494
+ /**
495
+ * Node type of mdast block quote.
496
+ */
497
+ type: "blockquote";
498
+ /**
499
+ * Children of block quote.
500
+ */
501
+ children: Array<BlockContent | DefinitionContent>;
502
+ /**
503
+ * Data associated with the mdast block quote.
504
+ */
505
+ data?: BlockquoteData | undefined;
506
+ }
507
+ /**
508
+ * Info associated with mdast block quote nodes by the ecosystem.
509
+ */
510
+ interface BlockquoteData extends Data {}
511
+ /**
512
+ * Markdown break.
513
+ */
514
+ interface Break extends Node {
515
+ /**
516
+ * Node type of mdast break.
517
+ */
518
+ type: "break";
519
+ /**
520
+ * Data associated with the mdast break.
521
+ */
522
+ data?: BreakData | undefined;
523
+ }
524
+ /**
525
+ * Info associated with mdast break nodes by the ecosystem.
526
+ */
527
+ interface BreakData extends Data {}
528
+ /**
529
+ * Markdown code (flow) (block).
530
+ */
531
+ interface Code extends Literal {
532
+ /**
533
+ * Node type of mdast code (flow).
534
+ */
535
+ type: "code";
536
+ /**
537
+ * Language of computer code being marked up.
538
+ */
539
+ lang?: string | null | undefined;
540
+ /**
541
+ * Custom information relating to the node.
542
+ *
543
+ * If the lang field is present, a meta field can be present.
544
+ */
545
+ meta?: string | null | undefined;
546
+ /**
547
+ * Data associated with the mdast code (flow).
548
+ */
549
+ data?: CodeData | undefined;
550
+ }
551
+ /**
552
+ * Info associated with mdast code (flow) (block) nodes by the ecosystem.
553
+ */
554
+ interface CodeData extends Data {}
555
+ /**
556
+ * Markdown definition.
557
+ */
558
+ interface Definition extends Node, Association, Resource {
559
+ /**
560
+ * Node type of mdast definition.
561
+ */
562
+ type: "definition";
563
+ /**
564
+ * Data associated with the mdast definition.
565
+ */
566
+ data?: DefinitionData | undefined;
567
+ }
568
+ /**
569
+ * Info associated with mdast definition nodes by the ecosystem.
570
+ */
571
+ interface DefinitionData extends Data {}
572
+ /**
573
+ * Markdown GFM delete (strikethrough).
574
+ */
575
+ interface Delete extends Parent {
576
+ /**
577
+ * Node type of mdast GFM delete.
578
+ */
579
+ type: "delete";
580
+ /**
581
+ * Children of GFM delete.
582
+ */
583
+ children: PhrasingContent[];
584
+ /**
585
+ * Data associated with the mdast GFM delete.
586
+ */
587
+ data?: DeleteData | undefined;
588
+ }
589
+ /**
590
+ * Info associated with mdast GFM delete nodes by the ecosystem.
591
+ */
592
+ interface DeleteData extends Data {}
593
+ /**
594
+ * Markdown emphasis.
595
+ */
596
+ interface Emphasis extends Parent {
597
+ /**
598
+ * Node type of mdast emphasis.
599
+ */
600
+ type: "emphasis";
601
+ /**
602
+ * Children of emphasis.
603
+ */
604
+ children: PhrasingContent[];
605
+ /**
606
+ * Data associated with the mdast emphasis.
607
+ */
608
+ data?: EmphasisData | undefined;
609
+ }
610
+ /**
611
+ * Info associated with mdast emphasis nodes by the ecosystem.
612
+ */
613
+ interface EmphasisData extends Data {}
614
+ /**
615
+ * Markdown GFM footnote definition.
616
+ */
617
+ interface FootnoteDefinition extends Parent, Association {
618
+ /**
619
+ * Node type of mdast GFM footnote definition.
620
+ */
621
+ type: "footnoteDefinition";
622
+ /**
623
+ * Children of GFM footnote definition.
624
+ */
625
+ children: Array<BlockContent | DefinitionContent>;
626
+ /**
627
+ * Data associated with the mdast GFM footnote definition.
628
+ */
629
+ data?: FootnoteDefinitionData | undefined;
630
+ }
631
+ /**
632
+ * Info associated with mdast GFM footnote definition nodes by the ecosystem.
633
+ */
634
+ interface FootnoteDefinitionData extends Data {}
635
+ /**
636
+ * Markdown GFM footnote reference.
637
+ */
638
+ interface FootnoteReference extends Association, Node {
639
+ /**
640
+ * Node type of mdast GFM footnote reference.
641
+ */
642
+ type: "footnoteReference";
643
+ /**
644
+ * Data associated with the mdast GFM footnote reference.
645
+ */
646
+ data?: FootnoteReferenceData | undefined;
647
+ }
648
+ /**
649
+ * Info associated with mdast GFM footnote reference nodes by the ecosystem.
650
+ */
651
+ interface FootnoteReferenceData extends Data {}
652
+ /**
653
+ * Markdown heading.
654
+ */
655
+ interface Heading extends Parent {
656
+ /**
657
+ * Node type of mdast heading.
658
+ */
659
+ type: "heading";
660
+ /**
661
+ * Heading rank.
662
+ *
663
+ * A value of `1` is said to be the highest rank and `6` the lowest.
664
+ */
665
+ depth: 1 | 2 | 3 | 4 | 5 | 6;
666
+ /**
667
+ * Children of heading.
668
+ */
669
+ children: PhrasingContent[];
670
+ /**
671
+ * Data associated with the mdast heading.
672
+ */
673
+ data?: HeadingData | undefined;
674
+ }
675
+ /**
676
+ * Info associated with mdast heading nodes by the ecosystem.
677
+ */
678
+ interface HeadingData extends Data {}
679
+ /**
680
+ * Markdown HTML.
681
+ */
682
+ interface Html extends Literal {
683
+ /**
684
+ * Node type of mdast HTML.
685
+ */
686
+ type: "html";
687
+ /**
688
+ * Data associated with the mdast HTML.
689
+ */
690
+ data?: HtmlData | undefined;
691
+ }
692
+ /**
693
+ * Info associated with mdast HTML nodes by the ecosystem.
694
+ */
695
+ interface HtmlData extends Data {}
696
+ /**
697
+ * Markdown image.
698
+ */
699
+ interface Image extends Alternative, Node, Resource {
700
+ /**
701
+ * Node type of mdast image.
702
+ */
703
+ type: "image";
704
+ /**
705
+ * Data associated with the mdast image.
706
+ */
707
+ data?: ImageData | undefined;
708
+ }
709
+ /**
710
+ * Info associated with mdast image nodes by the ecosystem.
711
+ */
712
+ interface ImageData extends Data {}
713
+ /**
714
+ * Markdown image reference.
715
+ */
716
+ interface ImageReference extends Alternative, Node, Reference {
717
+ /**
718
+ * Node type of mdast image reference.
719
+ */
720
+ type: "imageReference";
721
+ /**
722
+ * Data associated with the mdast image reference.
723
+ */
724
+ data?: ImageReferenceData | undefined;
725
+ }
726
+ /**
727
+ * Info associated with mdast image reference nodes by the ecosystem.
728
+ */
729
+ interface ImageReferenceData extends Data {}
730
+ /**
731
+ * Markdown code (text) (inline).
732
+ */
733
+ interface InlineCode extends Literal {
734
+ /**
735
+ * Node type of mdast code (text).
736
+ */
737
+ type: "inlineCode";
738
+ /**
739
+ * Data associated with the mdast code (text).
740
+ */
741
+ data?: InlineCodeData | undefined;
742
+ }
743
+ /**
744
+ * Info associated with mdast code (text) (inline) nodes by the ecosystem.
745
+ */
746
+ interface InlineCodeData extends Data {}
747
+ /**
748
+ * Markdown link.
749
+ */
750
+ interface Link extends Parent, Resource {
751
+ /**
752
+ * Node type of mdast link.
753
+ */
754
+ type: "link";
755
+ /**
756
+ * Children of link.
757
+ */
758
+ children: PhrasingContent[];
759
+ /**
760
+ * Data associated with the mdast link.
761
+ */
762
+ data?: LinkData | undefined;
763
+ }
764
+ /**
765
+ * Info associated with mdast link nodes by the ecosystem.
766
+ */
767
+ interface LinkData extends Data {}
768
+ /**
769
+ * Markdown link reference.
770
+ */
771
+ interface LinkReference extends Parent, Reference {
772
+ /**
773
+ * Node type of mdast link reference.
774
+ */
775
+ type: "linkReference";
776
+ /**
777
+ * Children of link reference.
778
+ */
779
+ children: PhrasingContent[];
780
+ /**
781
+ * Data associated with the mdast link reference.
782
+ */
783
+ data?: LinkReferenceData | undefined;
784
+ }
785
+ /**
786
+ * Info associated with mdast link reference nodes by the ecosystem.
787
+ */
788
+ interface LinkReferenceData extends Data {}
789
+ /**
790
+ * Markdown list.
791
+ */
792
+ interface List extends Parent {
793
+ /**
794
+ * Node type of mdast list.
795
+ */
796
+ type: "list";
797
+ /**
798
+ * Whether the items have been intentionally ordered (when `true`), or that
799
+ * the order of items is not important (when `false` or not present).
800
+ */
801
+ ordered?: boolean | null | undefined;
802
+ /**
803
+ * The starting number of the list, when the `ordered` field is `true`.
804
+ */
805
+ start?: number | null | undefined;
806
+ /**
807
+ * Whether one or more of the children are separated with a blank line from
808
+ * its siblings (when `true`), or not (when `false` or not present).
809
+ */
810
+ spread?: boolean | null | undefined;
811
+ /**
812
+ * Children of list.
813
+ */
814
+ children: ListContent[];
815
+ /**
816
+ * Data associated with the mdast list.
817
+ */
818
+ data?: ListData | undefined;
819
+ }
820
+ /**
821
+ * Info associated with mdast list nodes by the ecosystem.
822
+ */
823
+ interface ListData extends Data {}
824
+ /**
825
+ * Markdown list item.
826
+ */
827
+ interface ListItem extends Parent {
828
+ /**
829
+ * Node type of mdast list item.
830
+ */
831
+ type: "listItem";
832
+ /**
833
+ * Whether the item is a tasklist item (when `boolean`).
834
+ *
835
+ * When `true`, the item is complete.
836
+ * When `false`, the item is incomplete.
837
+ */
838
+ checked?: boolean | null | undefined;
839
+ /**
840
+ * Whether one or more of the children are separated with a blank line from
841
+ * its siblings (when `true`), or not (when `false` or not present).
842
+ */
843
+ spread?: boolean | null | undefined;
844
+ /**
845
+ * Children of list item.
846
+ */
847
+ children: Array<BlockContent | DefinitionContent>;
848
+ /**
849
+ * Data associated with the mdast list item.
850
+ */
851
+ data?: ListItemData | undefined;
852
+ }
853
+ /**
854
+ * Info associated with mdast list item nodes by the ecosystem.
855
+ */
856
+ interface ListItemData extends Data {}
857
+ /**
858
+ * Markdown paragraph.
859
+ */
860
+ interface Paragraph extends Parent {
861
+ /**
862
+ * Node type of mdast paragraph.
863
+ */
864
+ type: "paragraph";
865
+ /**
866
+ * Children of paragraph.
867
+ */
868
+ children: PhrasingContent[];
869
+ /**
870
+ * Data associated with the mdast paragraph.
871
+ */
872
+ data?: ParagraphData | undefined;
873
+ }
874
+ /**
875
+ * Info associated with mdast paragraph nodes by the ecosystem.
876
+ */
877
+ interface ParagraphData extends Data {}
878
+ /**
879
+ * Document fragment or a whole document.
880
+ *
881
+ * Should be used as the root of a tree and must not be used as a child.
882
+ */
883
+ interface Root extends Parent {
884
+ /**
885
+ * Node type of mdast root.
886
+ */
887
+ type: "root";
888
+ /**
889
+ * Data associated with the mdast root.
890
+ */
891
+ data?: RootData | undefined;
892
+ }
893
+ /**
894
+ * Info associated with mdast root nodes by the ecosystem.
895
+ */
896
+ interface RootData extends Data {}
897
+ /**
898
+ * Markdown strong.
899
+ */
900
+ interface Strong extends Parent {
901
+ /**
902
+ * Node type of mdast strong.
903
+ */
904
+ type: "strong";
905
+ /**
906
+ * Children of strong.
907
+ */
908
+ children: PhrasingContent[];
909
+ /**
910
+ * Data associated with the mdast strong.
911
+ */
912
+ data?: StrongData | undefined;
913
+ }
914
+ /**
915
+ * Info associated with mdast strong nodes by the ecosystem.
916
+ */
917
+ interface StrongData extends Data {}
918
+ /**
919
+ * Markdown GFM table.
920
+ */
921
+ interface Table extends Parent {
922
+ /**
923
+ * Node type of mdast GFM table.
924
+ */
925
+ type: "table";
926
+ /**
927
+ * How cells in columns are aligned.
928
+ */
929
+ align?: AlignType[] | null | undefined;
930
+ /**
931
+ * Children of GFM table.
932
+ */
933
+ children: TableContent[];
934
+ /**
935
+ * Data associated with the mdast GFM table.
936
+ */
937
+ data?: TableData | undefined;
938
+ }
939
+ /**
940
+ * Info associated with mdast GFM table nodes by the ecosystem.
941
+ */
942
+ interface TableData extends Data {}
943
+ /**
944
+ * Markdown GFM table row.
945
+ */
946
+ interface TableRow extends Parent {
947
+ /**
948
+ * Node type of mdast GFM table row.
949
+ */
950
+ type: "tableRow";
951
+ /**
952
+ * Children of GFM table row.
953
+ */
954
+ children: RowContent[];
955
+ /**
956
+ * Data associated with the mdast GFM table row.
957
+ */
958
+ data?: TableRowData | undefined;
959
+ }
960
+ /**
961
+ * Info associated with mdast GFM table row nodes by the ecosystem.
962
+ */
963
+ interface TableRowData extends Data {}
964
+ /**
965
+ * Markdown GFM table cell.
966
+ */
967
+ interface TableCell extends Parent {
968
+ /**
969
+ * Node type of mdast GFM table cell.
970
+ */
971
+ type: "tableCell";
972
+ /**
973
+ * Children of GFM table cell.
974
+ */
975
+ children: PhrasingContent[];
976
+ /**
977
+ * Data associated with the mdast GFM table cell.
978
+ */
979
+ data?: TableCellData | undefined;
980
+ }
981
+ /**
982
+ * Info associated with mdast GFM table cell nodes by the ecosystem.
983
+ */
984
+ interface TableCellData extends Data {}
985
+ /**
986
+ * Markdown text.
987
+ */
988
+ interface Text extends Literal {
989
+ /**
990
+ * Node type of mdast text.
991
+ */
992
+ type: "text";
993
+ /**
994
+ * Data associated with the mdast text.
995
+ */
996
+ data?: TextData | undefined;
997
+ }
998
+ /**
999
+ * Info associated with mdast text nodes by the ecosystem.
1000
+ */
1001
+ interface TextData extends Data {}
1002
+ /**
1003
+ * Markdown thematic break (horizontal rule).
1004
+ */
1005
+ interface ThematicBreak extends Node {
1006
+ /**
1007
+ * Node type of mdast thematic break.
1008
+ */
1009
+ type: "thematicBreak";
1010
+ /**
1011
+ * Data associated with the mdast thematic break.
1012
+ */
1013
+ data?: ThematicBreakData | undefined;
1014
+ }
1015
+ /**
1016
+ * Info associated with mdast thematic break nodes by the ecosystem.
1017
+ */
1018
+ interface ThematicBreakData extends Data {}
1019
+ /**
1020
+ * Markdown YAML.
1021
+ */
1022
+ interface Yaml extends Literal {
1023
+ /**
1024
+ * Node type of mdast YAML.
1025
+ */
1026
+ type: "yaml";
1027
+ /**
1028
+ * Data associated with the mdast YAML.
1029
+ */
1030
+ data?: YamlData | undefined;
1031
+ }
1032
+ /**
1033
+ * Info associated with mdast YAML nodes by the ecosystem.
1034
+ */
1035
+ interface YamlData extends Data {}
1036
+ //#endregion
1037
+ //#region src/validation/schema-validator.d.ts
1038
+ type ValidationIssue = {
1039
+ /** Field path (e.g. 'tags[0]') */field?: string; /** Human-readable error message */
1040
+ message: string; /** Error severity */
1041
+ severity: 'error' | 'warn';
1042
+ };
1043
+ type ValidationEntryResult = {
1044
+ slug: string;
1045
+ filePath: string;
1046
+ issues: ValidationIssue[];
1047
+ };
1048
+ type ValidationResult = {
1049
+ collection: string;
1050
+ entries: ValidationEntryResult[];
1051
+ errors: number;
1052
+ warnings: number;
1053
+ };
1054
+ //#endregion
1055
+ //#region src/validation/types.d.ts
1056
+ /** Context provided to each validator for a single content entry. */
1057
+ type ValidatorContext = {
1058
+ /** Absolute path to the source file */filePath: string; /** URL-friendly slug for this entry */
1059
+ slug: string; /** Collection name this entry belongs to */
1060
+ collection: string; /** Raw markdown body (after frontmatter extraction) */
1061
+ rawContent?: string; /** Parsed frontmatter / data */
1062
+ data: Record<string, any>; /** Pre-parsed MDAST tree shared across validators. */
1063
+ mdast?: Root;
1064
+ };
1065
+ /** A single-entry content validator. */
1066
+ type ContentValidator = {
1067
+ /** Unique validator name (used in error reporting) */name: string; /** Validate a content entry and return any issues found. */
1068
+ validate(ctx: ValidatorContext): ValidationIssue[] | Promise<ValidationIssue[]>;
1069
+ };
1070
+ //#endregion
1071
+ //#region src/schemas/collection.d.ts
1072
+ /** Raw entry before validation — what a loader returns plus file metadata. */
1073
+ type RawEntry = {
1074
+ data: Record<string, any>;
1075
+ content?: string;
1076
+ filePath: string;
1077
+ slug: string;
1078
+ };
1079
+ type CollectionComputed = Record<string, (entry: RawEntry) => any>;
1080
+ type Simplify<T> = { [K in keyof T]: T[K] } & {};
1081
+ type InferComputedFields<TComputed extends CollectionComputed | undefined> = TComputed extends CollectionComputed ? { [K in keyof TComputed]: Awaited<ReturnType<TComputed[K]>> } : {};
1082
+ type InferCollectionData<TCollection extends CollectionDef<any, any, any>> = Simplify<z.output<TCollection['schema']> & InferComputedFields<TCollection['computed']>>;
1083
+ type CollectionMap = Record<string, CollectionDef<any, any, any>>;
1084
+ type InferLoaderKind<TLoader extends LoaderType | Loader> = TLoader extends 'markdown' ? 'markdown' : TLoader extends Loader ? TLoader['kind'] : 'data';
1085
+ type InferCollectionLoaderKind<TCollection extends CollectionDef<any, any, any>> = InferLoaderKind<TCollection['loader']>;
1086
+ /** Collection definition — passed to defineCollection(). */
1087
+ type CollectionDef<S extends z.ZodType = z.ZodType, TComputed extends CollectionComputed | undefined = undefined, TLoader extends LoaderType | Loader = LoaderType | Loader> = {
1088
+ /** Loader type or custom Loader instance */loader: TLoader; /** Directory containing collection files (relative to rootDir) */
1089
+ directory: string; /** Zod schema for validating entry data */
1090
+ schema: S; /** Glob patterns to include (defaults based on loader type) */
1091
+ include?: string[]; /** Glob patterns to exclude */
1092
+ exclude?: string[]; /** Computed fields derived from entry data/content */
1093
+ computed?: TComputed; /** Custom validation hook (return string for error, undefined for pass) */
1094
+ validate?: (entry: RawEntry) => string | undefined; /** Filter entries (return false to exclude) */
1095
+ filter?: (entry: RawEntry) => boolean; /** Custom slug generation */
1096
+ slugify?: (filePath: string, directory: string) => string; /** Pre-validation transform */
1097
+ transform?: (entry: RawEntry) => RawEntry | Promise<RawEntry>; /** Custom content validators (appended to built-in markdown validators) */
1098
+ validators?: ContentValidator[]; /** Disable built-in markdown validators (link, code-block, heading) */
1099
+ disableBuiltinValidators?: boolean;
1100
+ };
1101
+ //#endregion
1102
+ //#region src/schemas/content-config.d.ts
1103
+ /** Content layer configuration — passed to defineConfig(). */
1104
+ type ContentLayerConfig = {
1105
+ /** Named collections */collections: CollectionMap; /** Root directory for resolving relative paths (defaults to cwd()) */
1106
+ root?: string; /** Markdown processing config (shared with the markdown pipeline). */
1107
+ markdown?: MarkdownConfig; /** Asset hashing config */
1108
+ assets?: {
1109
+ /** Enable content-hash filenames */hashFilenames?: boolean; /** Output directory for hashed assets */
1110
+ outputDir?: string;
1111
+ }; /** Enable in-memory caching of loaded entries */
1112
+ cache?: boolean; /** Load all entries eagerly on creation */
1113
+ eager?: boolean; /** Content plugins */
1114
+ plugins?: ContentPlugin[];
1115
+ };
1116
+ /** Plugin interface for processing + validation. */
1117
+ type ContentPlugin = {
1118
+ name: string; /** Rehype plugin for markdown AST transformation */
1119
+ rehypePlugin?: () => (tree: any) => void; /** Remark plugin for markdown AST transformation */
1120
+ remarkPlugin?: () => (tree: any) => void; /** Validate plugin-specific metadata on each entry */
1121
+ validate?: (entry: {
1122
+ data: Record<string, any>;
1123
+ content?: string;
1124
+ }) => string[];
1125
+ };
1126
+ //#endregion
1127
+ export { CollectionMap as a, RawEntry as c, ValidationEntryResult as d, ValidationIssue as f, CollectionDef as i, ContentValidator as l, ContentPlugin as n, InferCollectionData as o, ValidationResult as p, CollectionComputed as r, InferCollectionLoaderKind as s, ContentLayerConfig as t, ValidatorContext as u };
1128
+ //# sourceMappingURL=content-config-fHPaFZ7i.d.mts.map