@zudojs/docs 0.0.1

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 (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/dist/docsTypes/documentationContent.d.ts +80 -0
  4. package/dist/docsTypes/documentationContent.d.ts.map +1 -0
  5. package/dist/docsTypes/documentationContent.js +8 -0
  6. package/dist/docsTypes/documentationContent.js.map +1 -0
  7. package/dist/docsTypes/documentationDocument.d.ts +29 -0
  8. package/dist/docsTypes/documentationDocument.d.ts.map +1 -0
  9. package/dist/docsTypes/documentationDocument.js +8 -0
  10. package/dist/docsTypes/documentationDocument.js.map +1 -0
  11. package/dist/docsTypes/documentationMetadata.d.ts +60 -0
  12. package/dist/docsTypes/documentationMetadata.d.ts.map +1 -0
  13. package/dist/docsTypes/documentationMetadata.js +5 -0
  14. package/dist/docsTypes/documentationMetadata.js.map +1 -0
  15. package/dist/docsTypes/documentationNavigation.d.ts +34 -0
  16. package/dist/docsTypes/documentationNavigation.d.ts.map +1 -0
  17. package/dist/docsTypes/documentationNavigation.js +8 -0
  18. package/dist/docsTypes/documentationNavigation.js.map +1 -0
  19. package/dist/docsTypes/documentationProvider.d.ts +21 -0
  20. package/dist/docsTypes/documentationProvider.d.ts.map +1 -0
  21. package/dist/docsTypes/documentationProvider.js +8 -0
  22. package/dist/docsTypes/documentationProvider.js.map +1 -0
  23. package/dist/docsTypes/index.d.ts +11 -0
  24. package/dist/docsTypes/index.d.ts.map +1 -0
  25. package/dist/docsTypes/index.js +7 -0
  26. package/dist/docsTypes/index.js.map +1 -0
  27. package/dist/document/documentBuilder.core.d.ts +50 -0
  28. package/dist/document/documentBuilder.core.d.ts.map +1 -0
  29. package/dist/document/documentBuilder.core.js +78 -0
  30. package/dist/document/documentBuilder.core.js.map +1 -0
  31. package/dist/document/index.d.ts +8 -0
  32. package/dist/document/index.d.ts.map +1 -0
  33. package/dist/document/index.js +7 -0
  34. package/dist/document/index.js.map +1 -0
  35. package/dist/examples/examples.core.d.ts +38 -0
  36. package/dist/examples/examples.core.d.ts.map +1 -0
  37. package/dist/examples/examples.core.js +56 -0
  38. package/dist/examples/examples.core.js.map +1 -0
  39. package/dist/examples/index.d.ts +8 -0
  40. package/dist/examples/index.d.ts.map +1 -0
  41. package/dist/examples/index.js +7 -0
  42. package/dist/examples/index.js.map +1 -0
  43. package/dist/frontmatter/frontmatter.core.d.ts +7 -0
  44. package/dist/frontmatter/frontmatter.core.d.ts.map +1 -0
  45. package/dist/frontmatter/frontmatter.core.js +6 -0
  46. package/dist/frontmatter/frontmatter.core.js.map +1 -0
  47. package/dist/frontmatter/frontmatter.parser.d.ts +15 -0
  48. package/dist/frontmatter/frontmatter.parser.d.ts.map +1 -0
  49. package/dist/frontmatter/frontmatter.parser.js +82 -0
  50. package/dist/frontmatter/frontmatter.parser.js.map +1 -0
  51. package/dist/frontmatter/frontmatter.serializer.d.ts +9 -0
  52. package/dist/frontmatter/frontmatter.serializer.d.ts.map +1 -0
  53. package/dist/frontmatter/frontmatter.serializer.js +31 -0
  54. package/dist/frontmatter/frontmatter.serializer.js.map +1 -0
  55. package/dist/frontmatter/frontmatter.types.d.ts +26 -0
  56. package/dist/frontmatter/frontmatter.types.d.ts.map +1 -0
  57. package/dist/frontmatter/frontmatter.types.js +5 -0
  58. package/dist/frontmatter/frontmatter.types.js.map +1 -0
  59. package/dist/frontmatter/index.d.ts +8 -0
  60. package/dist/frontmatter/index.d.ts.map +1 -0
  61. package/dist/frontmatter/index.js +7 -0
  62. package/dist/frontmatter/index.js.map +1 -0
  63. package/dist/generator/generator.types.d.ts +11 -0
  64. package/dist/generator/generator.types.d.ts.map +1 -0
  65. package/dist/generator/generator.types.js +5 -0
  66. package/dist/generator/generator.types.js.map +1 -0
  67. package/dist/generator/generatorJson.core.d.ts +13 -0
  68. package/dist/generator/generatorJson.core.d.ts.map +1 -0
  69. package/dist/generator/generatorJson.core.js +36 -0
  70. package/dist/generator/generatorJson.core.js.map +1 -0
  71. package/dist/generator/generatorMarkdown.core.d.ts +10 -0
  72. package/dist/generator/generatorMarkdown.core.d.ts.map +1 -0
  73. package/dist/generator/generatorMarkdown.core.js +72 -0
  74. package/dist/generator/generatorMarkdown.core.js.map +1 -0
  75. package/dist/generator/generatorMarkdownNodes.d.ts +9 -0
  76. package/dist/generator/generatorMarkdownNodes.d.ts.map +1 -0
  77. package/dist/generator/generatorMarkdownNodes.js +64 -0
  78. package/dist/generator/generatorMarkdownNodes.js.map +1 -0
  79. package/dist/generator/index.d.ts +10 -0
  80. package/dist/generator/index.d.ts.map +1 -0
  81. package/dist/generator/index.js +9 -0
  82. package/dist/generator/index.js.map +1 -0
  83. package/dist/index.d.ts +19 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +28 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/navigation/index.d.ts +7 -0
  88. package/dist/navigation/index.d.ts.map +1 -0
  89. package/dist/navigation/index.js +7 -0
  90. package/dist/navigation/index.js.map +1 -0
  91. package/dist/navigation/navigation.core.d.ts +25 -0
  92. package/dist/navigation/navigation.core.d.ts.map +1 -0
  93. package/dist/navigation/navigation.core.js +85 -0
  94. package/dist/navigation/navigation.core.js.map +1 -0
  95. package/dist/registry/index.d.ts +7 -0
  96. package/dist/registry/index.d.ts.map +1 -0
  97. package/dist/registry/index.js +7 -0
  98. package/dist/registry/index.js.map +1 -0
  99. package/dist/registry/registry.core.d.ts +62 -0
  100. package/dist/registry/registry.core.d.ts.map +1 -0
  101. package/dist/registry/registry.core.js +90 -0
  102. package/dist/registry/registry.core.js.map +1 -0
  103. package/dist/utils/index.d.ts +7 -0
  104. package/dist/utils/index.d.ts.map +1 -0
  105. package/dist/utils/index.js +7 -0
  106. package/dist/utils/index.js.map +1 -0
  107. package/dist/utils/utils.helper.d.ts +34 -0
  108. package/dist/utils/utils.helper.d.ts.map +1 -0
  109. package/dist/utils/utils.helper.js +82 -0
  110. package/dist/utils/utils.helper.js.map +1 -0
  111. package/dist/validator/index.d.ts +11 -0
  112. package/dist/validator/index.d.ts.map +1 -0
  113. package/dist/validator/index.js +10 -0
  114. package/dist/validator/index.js.map +1 -0
  115. package/dist/validator/validator.types.d.ts +20 -0
  116. package/dist/validator/validator.types.d.ts.map +1 -0
  117. package/dist/validator/validator.types.js +5 -0
  118. package/dist/validator/validator.types.js.map +1 -0
  119. package/dist/validator/validatorAll/index.d.ts +8 -0
  120. package/dist/validator/validatorAll/index.d.ts.map +1 -0
  121. package/dist/validator/validatorAll/index.js +8 -0
  122. package/dist/validator/validatorAll/index.js.map +1 -0
  123. package/dist/validator/validatorAll/validatorAll.core.d.ts +10 -0
  124. package/dist/validator/validatorAll/validatorAll.core.d.ts.map +1 -0
  125. package/dist/validator/validatorAll/validatorAll.core.js +31 -0
  126. package/dist/validator/validatorAll/validatorAll.core.js.map +1 -0
  127. package/dist/validator/validatorAll/validatorNavigation.core.d.ts +10 -0
  128. package/dist/validator/validatorAll/validatorNavigation.core.d.ts.map +1 -0
  129. package/dist/validator/validatorAll/validatorNavigation.core.js +29 -0
  130. package/dist/validator/validatorAll/validatorNavigation.core.js.map +1 -0
  131. package/dist/validator/validatorDocument.core.d.ts +10 -0
  132. package/dist/validator/validatorDocument.core.d.ts.map +1 -0
  133. package/dist/validator/validatorDocument.core.js +45 -0
  134. package/dist/validator/validatorDocument.core.js.map +1 -0
  135. package/dist/validator/validatorDuplicates.core.d.ts +10 -0
  136. package/dist/validator/validatorDuplicates.core.d.ts.map +1 -0
  137. package/dist/validator/validatorDuplicates.core.js +28 -0
  138. package/dist/validator/validatorDuplicates.core.js.map +1 -0
  139. package/dist/validator/validatorLinks.core.d.ts +10 -0
  140. package/dist/validator/validatorLinks.core.d.ts.map +1 -0
  141. package/dist/validator/validatorLinks.core.js +56 -0
  142. package/dist/validator/validatorLinks.core.js.map +1 -0
  143. package/package.json +49 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zudojs Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @zudojs/docs
2
+
3
+ Documentation infrastructure with structured document model, registry, validation, navigation, frontmatter parsing, and markdown/JSON generation.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @zudojs/docs
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```typescript
14
+ import { createDocumentRegistry } from "@zudojs/docs";
15
+
16
+ const registry = createDocumentRegistry();
17
+
18
+ registry.register({
19
+ id: "getting-started",
20
+ title: "Getting Started",
21
+ content: "# Getting Started\n\nWelcome to Zudojs...",
22
+ });
23
+ ```
24
+
25
+ ## Features
26
+
27
+ - Document model with frontmatter
28
+ - Document registry and discovery
29
+ - Navigation tree generation
30
+ - Markdown and JSON generation
31
+ - Document validation
32
+
33
+ ## Use Cases
34
+
35
+ - API documentation
36
+ - User guides
37
+ - Knowledge bases
38
+ - Documentation sites
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Content model for documentation documents.
3
+ *
4
+ * Supports multiple content formats: markdown, MDX, HTML,
5
+ * and structured AST nodes for multi-format rendering.
6
+ */
7
+ /** A single node in a structured documentation AST. */
8
+ export type DocumentationNode = HeadingNode | ParagraphNode | CodeNode | ListNode | LinkNode | TableNode | QuoteNode | CalloutNode;
9
+ /** Heading node with level 1-6. */
10
+ export interface HeadingNode {
11
+ readonly type: "heading";
12
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
13
+ readonly value: string;
14
+ }
15
+ /** Paragraph node. */
16
+ export interface ParagraphNode {
17
+ readonly type: "paragraph";
18
+ readonly value: string;
19
+ }
20
+ /** Code block node. */
21
+ export interface CodeNode {
22
+ readonly type: "code";
23
+ readonly language?: string;
24
+ readonly value: string;
25
+ }
26
+ /** List node (ordered or unordered). */
27
+ export interface ListNode {
28
+ readonly type: "list";
29
+ readonly ordered: boolean;
30
+ readonly items: readonly string[];
31
+ }
32
+ /** Link node. */
33
+ export interface LinkNode {
34
+ readonly type: "link";
35
+ readonly href: string;
36
+ readonly value: string;
37
+ }
38
+ /** Table node. */
39
+ export interface TableNode {
40
+ readonly type: "table";
41
+ readonly headers: readonly string[];
42
+ readonly rows: readonly (readonly string[])[];
43
+ }
44
+ /** Blockquote node. */
45
+ export interface QuoteNode {
46
+ readonly type: "quote";
47
+ readonly value: string;
48
+ }
49
+ /** Callout/admonition node. */
50
+ export interface CalloutNode {
51
+ readonly type: "callout";
52
+ readonly kind: "note" | "warning" | "tip" | "danger";
53
+ readonly value: string;
54
+ }
55
+ /** Markdown content. */
56
+ export interface MarkdownContent {
57
+ readonly type: "markdown";
58
+ readonly value: string;
59
+ }
60
+ /** MDX content. */
61
+ export interface MDXContent {
62
+ readonly type: "mdx";
63
+ readonly value: string;
64
+ }
65
+ /** HTML content. */
66
+ export interface HTMLContent {
67
+ readonly type: "html";
68
+ readonly value: string;
69
+ }
70
+ /** Structured content using AST nodes. */
71
+ export interface StructuredContent {
72
+ readonly type: "structured";
73
+ readonly nodes: readonly DocumentationNode[];
74
+ }
75
+ /**
76
+ * Union of all supported content types.
77
+ * A document can use any of these formats.
78
+ */
79
+ export type DocumentationContent = MarkdownContent | MDXContent | HTMLContent | StructuredContent;
80
+ //# sourceMappingURL=documentationContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationContent.d.ts","sourceRoot":"","sources":["../../src/docsTypes/documentationContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uDAAuD;AACvD,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,WAAW,CAAC;AAEhB,mCAAmC;AACnC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,sBAAsB;AACtB,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,uBAAuB;AACvB,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,wCAAwC;AACxC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,iBAAiB;AACjB,MAAM,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BAAiB,EAAE,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC9B,eAAe,GAAG,UAAU,GAAG,WAAW,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Content model for documentation documents.
3
+ *
4
+ * Supports multiple content formats: markdown, MDX, HTML,
5
+ * and structured AST nodes for multi-format rendering.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=documentationContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationContent.js","sourceRoot":"","sources":["../../src/docsTypes/documentationContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Core document interface for documentation pages.
3
+ *
4
+ * Documents are the fundamental unit of content in the docs package.
5
+ * Each document has a stable ID, structured content, and metadata.
6
+ */
7
+ import type { DocumentationContent } from "./documentationContent.js";
8
+ import type { DocumentationCategory, DocumentationMetadata, DocumentationStatus } from "./documentationMetadata.js";
9
+ /**
10
+ * A documentation page.
11
+ *
12
+ * IDs must be stable dot-separated identifiers (e.g. "guides.http.routing").
13
+ * Titles can change without breaking links.
14
+ */
15
+ export interface DocumentationDocument {
16
+ readonly id: string;
17
+ readonly title: string;
18
+ readonly description?: string;
19
+ readonly content: DocumentationContent;
20
+ readonly category?: DocumentationCategory;
21
+ readonly tags?: readonly string[];
22
+ readonly version?: string;
23
+ readonly status?: DocumentationStatus;
24
+ readonly metadata?: DocumentationMetadata;
25
+ readonly deprecated?: boolean;
26
+ readonly deprecatedMessage?: string;
27
+ readonly visibility?: "SERVER" | "CLIENT";
28
+ }
29
+ //# sourceMappingURL=documentationDocument.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationDocument.d.ts","sourceRoot":"","sources":["../../src/docsTypes/documentationDocument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC3C"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Core document interface for documentation pages.
3
+ *
4
+ * Documents are the fundamental unit of content in the docs package.
5
+ * Each document has a stable ID, structured content, and metadata.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=documentationDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationDocument.js","sourceRoot":"","sources":["../../src/docsTypes/documentationDocument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Metadata and classification types for documentation.
3
+ */
4
+ /** High-level categories for documentation pages. */
5
+ export type DocumentationCategory = "introduction" | "guide" | "tutorial" | "reference" | "api" | "architecture" | "configuration" | "deployment" | "security" | "migration" | "examples";
6
+ /** Status of a documentation page. */
7
+ export type DocumentationStatus = "stable" | "experimental" | "beta" | "deprecated" | "internal";
8
+ /** API symbol kind for auto-generated references. */
9
+ export type APISymbolKind = "function" | "class" | "interface" | "type" | "enum" | "variable" | "namespace" | "method" | "property";
10
+ /** Source location for an API symbol. */
11
+ export interface SourceLocation {
12
+ readonly file: string;
13
+ readonly line: number;
14
+ readonly column?: number;
15
+ }
16
+ /** An API symbol extracted from source code. */
17
+ export interface APISymbol {
18
+ readonly name: string;
19
+ readonly kind: APISymbolKind;
20
+ readonly description?: string;
21
+ readonly source?: SourceLocation;
22
+ readonly deprecated?: boolean;
23
+ readonly examples?: readonly APIExample[];
24
+ readonly parameters?: readonly APIParameter[];
25
+ readonly returnType?: string;
26
+ }
27
+ /** An API example for documentation. */
28
+ export interface APIExample {
29
+ readonly id: string;
30
+ readonly title?: string;
31
+ readonly language: string;
32
+ readonly code: string;
33
+ readonly description?: string;
34
+ }
35
+ /** Parameter for an API symbol. */
36
+ export interface APIParameter {
37
+ readonly name: string;
38
+ readonly type?: string;
39
+ readonly description?: string;
40
+ readonly optional?: boolean;
41
+ readonly defaultValue?: string;
42
+ }
43
+ /** Metadata attached to a documentation document. */
44
+ export interface DocumentationMetadata {
45
+ readonly owner?: string;
46
+ readonly team?: string;
47
+ readonly createdAt?: Date;
48
+ readonly updatedAt?: Date;
49
+ readonly version?: string;
50
+ readonly ticket?: string;
51
+ readonly tags?: readonly string[];
52
+ }
53
+ /** A version entry for versioned documentation. */
54
+ export interface DocumentationVersion {
55
+ readonly version: string;
56
+ readonly label?: string;
57
+ readonly deprecated?: boolean;
58
+ readonly latest?: boolean;
59
+ }
60
+ //# sourceMappingURL=documentationMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationMetadata.d.ts","sourceRoot":"","sources":["../../src/docsTypes/documentationMetadata.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qDAAqD;AACrD,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,OAAO,GACP,UAAU,GACV,WA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,EAAE,MAAM,CAAC;CAC/B;AAED,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,qDAAqD;AACrD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Metadata and classification types for documentation.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=documentationMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationMetadata.js","sourceRoot":"","sources":["../../src/docsTypes/documentationMetadata.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Navigation model for documentation.
3
+ *
4
+ * Navigation is modeled separately from documents so that
5
+ * structure can be controlled independently of content.
6
+ */
7
+ /** A single item in the documentation navigation tree. */
8
+ export interface DocumentationNavigationItem {
9
+ readonly title: string;
10
+ readonly documentId?: string;
11
+ readonly children?: readonly DocumentationNavigationItem[];
12
+ }
13
+ /** Breadcrumb entry for a document. */
14
+ export interface DocumentationBreadcrumb {
15
+ readonly title: string;
16
+ readonly documentId?: string;
17
+ }
18
+ /** Search document for indexing. */
19
+ export interface SearchDocument {
20
+ readonly id: string;
21
+ readonly title: string;
22
+ readonly content: string;
23
+ readonly tags: readonly string[];
24
+ readonly path: string;
25
+ }
26
+ /** Search result returned from a search query. */
27
+ export interface SearchResult {
28
+ readonly id: string;
29
+ readonly title: string;
30
+ readonly path: string;
31
+ readonly excerpt?: string;
32
+ readonly score?: number;
33
+ }
34
+ //# sourceMappingURL=documentationNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationNavigation.d.ts","sourceRoot":"","sources":["../../src/docsTypes/documentationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0DAA0D;AAC1D,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,2BAA2B,EAAE,CAAC;CAC5D;AAED,uCAAuC;AACvC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,oCAAoC;AACpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Navigation model for documentation.
3
+ *
4
+ * Navigation is modeled separately from documents so that
5
+ * structure can be controlled independently of content.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=documentationNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationNavigation.js","sourceRoot":"","sources":["../../src/docsTypes/documentationNavigation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Provider and source loader types for documentation.
3
+ *
4
+ * Providers abstract where documentation comes from.
5
+ * Source loaders abstract how documentation is read.
6
+ */
7
+ import type { DocumentationDocument } from "./documentationDocument.js";
8
+ /** A provider that supplies documentation documents. */
9
+ export interface DocumentationProvider {
10
+ get(id: string): DocumentationDocument | undefined;
11
+ getAll(): readonly DocumentationDocument[];
12
+ }
13
+ /** Loads content from a documentation source. */
14
+ export interface DocumentationSourceLoader {
15
+ load(source: string): Promise<string>;
16
+ }
17
+ /** Sanitizer for rendered content (HTML, MDX). */
18
+ export interface DocumentationSanitizer {
19
+ sanitize(content: string): string;
20
+ }
21
+ //# sourceMappingURL=documentationProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationProvider.d.ts","sourceRoot":"","sources":["../../src/docsTypes/documentationProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,wDAAwD;AACxD,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAAC;IACnD,MAAM,IAAI,SAAS,qBAAqB,EAAE,CAAC;CAC5C;AAED,iDAAiD;AACjD,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACvC;AAED,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CACnC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Provider and source loader types for documentation.
3
+ *
4
+ * Providers abstract where documentation comes from.
5
+ * Source loaders abstract how documentation is read.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=documentationProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentationProvider.js","sourceRoot":"","sources":["../../src/docsTypes/documentationProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @zudojs/docs/docsTypes
3
+ *
4
+ * Core type definitions for the documentation model.
5
+ */
6
+ export type { DocumentationNode, HeadingNode, ParagraphNode, CodeNode, ListNode, LinkNode, TableNode, QuoteNode, CalloutNode, MarkdownContent, MDXContent, HTMLContent, StructuredContent, DocumentationContent, } from "./documentationContent.js";
7
+ export type { DocumentationCategory, DocumentationStatus, APISymbolKind, SourceLocation, APISymbol, APIParameter, DocumentationMetadata, DocumentationVersion, } from "./documentationMetadata.js";
8
+ export type { DocumentationDocument } from "./documentationDocument.js";
9
+ export type { DocumentationNavigationItem, DocumentationBreadcrumb, SearchDocument, SearchResult, } from "./documentationNavigation.js";
10
+ export type { DocumentationProvider, DocumentationSourceLoader, DocumentationSanitizer, } from "./documentationProvider.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docsTypes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,EACX,eAAe,EACf,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE,YAAY,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,YAAY,GACb,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/docs/docsTypes
3
+ *
4
+ * Core type definitions for the documentation model.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/docsTypes/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Fluent builder for creating documentation documents.
3
+ *
4
+ * Provides a chainable API that validates inputs and
5
+ * produces immutable DocumentationDocument objects.
6
+ */
7
+ import type { DocumentationContent, DocumentationDocument, DocumentationCategory, DocumentationMetadata, DocumentationStatus } from "../docsTypes/index.js";
8
+ /**
9
+ * Options for creating a document via the builder.
10
+ */
11
+ export interface DocumentBuilderOptions {
12
+ readonly id: string;
13
+ readonly title: string;
14
+ readonly description?: string;
15
+ readonly content: DocumentationContent;
16
+ readonly category?: DocumentationCategory;
17
+ readonly tags?: readonly string[];
18
+ readonly version?: string;
19
+ readonly status?: DocumentationStatus;
20
+ readonly metadata?: DocumentationMetadata;
21
+ readonly deprecated?: boolean;
22
+ readonly deprecatedMessage?: string;
23
+ readonly visibility?: "SERVER" | "CLIENT";
24
+ }
25
+ /**
26
+ * Creates a documentation document from structured options.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const doc = createDocument({
31
+ * id: "guides.http.routing",
32
+ * title: "HTTP Routing",
33
+ * content: { type: "markdown", value: "# Routing\n\n..." },
34
+ * category: "guide",
35
+ * tags: ["http", "routing"],
36
+ * });
37
+ * ```
38
+ */
39
+ export declare function createDocument(options: DocumentBuilderOptions): DocumentationDocument;
40
+ /**
41
+ * Creates a markdown document.
42
+ */
43
+ export declare function createMarkdownDocument(id: string, title: string, markdown: string, options?: Partial<DocumentBuilderOptions>): DocumentationDocument;
44
+ /**
45
+ * Creates a structured document from AST nodes.
46
+ */
47
+ export declare function createStructuredDocument(id: string, title: string, nodes: DocumentationContent extends {
48
+ readonly nodes: infer N;
49
+ } ? N : never, options?: Partial<DocumentBuilderOptions>): DocumentationDocument;
50
+ //# sourceMappingURL=documentBuilder.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentBuilder.core.d.ts","sourceRoot":"","sources":["../../src/document/documentBuilder.core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC3C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CAiBvB;AAoBD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACxC,qBAAqB,CAOvB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,oBAAoB,SAAS;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,EAC3E,OAAO,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACxC,qBAAqB,CAUvB"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Fluent builder for creating documentation documents.
3
+ *
4
+ * Provides a chainable API that validates inputs and
5
+ * produces immutable DocumentationDocument objects.
6
+ */
7
+ /**
8
+ * Creates a documentation document from structured options.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const doc = createDocument({
13
+ * id: "guides.http.routing",
14
+ * title: "HTTP Routing",
15
+ * content: { type: "markdown", value: "# Routing\n\n..." },
16
+ * category: "guide",
17
+ * tags: ["http", "routing"],
18
+ * });
19
+ * ```
20
+ */
21
+ export function createDocument(options) {
22
+ validateDocumentOptions(options);
23
+ return Object.freeze({
24
+ id: options.id,
25
+ title: options.title,
26
+ description: options.description,
27
+ content: options.content,
28
+ category: options.category,
29
+ tags: options.tags ? Object.freeze([...options.tags]) : undefined,
30
+ version: options.version,
31
+ status: options.status,
32
+ metadata: options.metadata,
33
+ deprecated: options.deprecated,
34
+ deprecatedMessage: options.deprecatedMessage,
35
+ visibility: options.visibility,
36
+ });
37
+ }
38
+ /**
39
+ * Validates document builder options.
40
+ * Throws on invalid input.
41
+ */
42
+ function validateDocumentOptions(options) {
43
+ if (!options.id || options.id.trim().length === 0) {
44
+ throw new Error("Document ID is required.");
45
+ }
46
+ if (!options.title || options.title.trim().length === 0) {
47
+ throw new Error("Document title is required.");
48
+ }
49
+ if (!options.content) {
50
+ throw new Error("Document content is required.");
51
+ }
52
+ }
53
+ /**
54
+ * Creates a markdown document.
55
+ */
56
+ export function createMarkdownDocument(id, title, markdown, options) {
57
+ return createDocument({
58
+ id,
59
+ title,
60
+ content: { type: "markdown", value: markdown },
61
+ ...options,
62
+ });
63
+ }
64
+ /**
65
+ * Creates a structured document from AST nodes.
66
+ */
67
+ export function createStructuredDocument(id, title, nodes, options) {
68
+ return createDocument({
69
+ id,
70
+ title,
71
+ content: {
72
+ type: "structured",
73
+ value: nodes,
74
+ },
75
+ ...options,
76
+ });
77
+ }
78
+ //# sourceMappingURL=documentBuilder.core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documentBuilder.core.js","sourceRoot":"","sources":["../../src/document/documentBuilder.core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAC5B,OAA+B;IAE/B,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAEjC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,KAAK,E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EAAE,KAAK,EAAE,QAAQ,EAAE;QAC9C,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,EAAU,EACV,KAAa,EACb,KAA2E,EAC3E,OAAyC;IAEzC,OAAO,cAAc,CAAC;QACpB,EAAE;QACF,KAAK;QACL,OAAO,EAAE;YACP,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,KAAK;SACsB;QACpC,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @zudojs/docs/document
3
+ *
4
+ * Document model and builder for creating documentation pages.
5
+ */
6
+ export { createDocument, createMarkdownDocument, createStructuredDocument, } from "./documentBuilder.core.js";
7
+ export type { DocumentBuilderOptions } from "./documentBuilder.core.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/document/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/docs/document
3
+ *
4
+ * Document model and builder for creating documentation pages.
5
+ */
6
+ export { createDocument, createMarkdownDocument, createStructuredDocument, } from "./documentBuilder.core.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/document/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Code example modeling and validation.
3
+ *
4
+ * Examples are first-class objects that can be validated,
5
+ * rendered, and included in generated documentation.
6
+ */
7
+ import type { DocumentationMetadata } from "../docsTypes/index.js";
8
+ /**
9
+ * A code example for documentation.
10
+ */
11
+ export interface DocumentationExample {
12
+ readonly id: string;
13
+ readonly title?: string;
14
+ readonly language: string;
15
+ readonly code: string;
16
+ readonly description?: string;
17
+ readonly metadata?: DocumentationMetadata;
18
+ }
19
+ /**
20
+ * Result of validating an example.
21
+ */
22
+ export interface ExampleValidationResult {
23
+ readonly valid: boolean;
24
+ readonly errors: readonly string[];
25
+ }
26
+ /**
27
+ * Validates a documentation example.
28
+ */
29
+ export declare function validateExample(example: DocumentationExample): ExampleValidationResult;
30
+ /**
31
+ * Renders an example as a markdown code block.
32
+ */
33
+ export declare function renderExampleMarkdown(example: DocumentationExample): string;
34
+ /**
35
+ * Renders an example as a JSON-serializable object.
36
+ */
37
+ export declare function exampleToJSON(example: DocumentationExample): Record<string, unknown>;
38
+ //# sourceMappingURL=examples.core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"examples.core.d.ts","sourceRoot":"","sources":["../../src/examples/examples.core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,oBAAoB,GAC5B,uBAAuB,CAmBzB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAkB3E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB"}