docusaurus-plugin-docusynx 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.
@@ -0,0 +1,234 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://docusynx.dev/schema/document-bundle-v1.json",
4
+ "title": "docusynx document bundle",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schemaVersion", "site", "documents", "assets", "hash"],
8
+ "properties": {
9
+ "schemaVersion": { "const": 1 },
10
+ "site": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["name", "baseUrl"],
14
+ "properties": {
15
+ "name": { "type": "string", "minLength": 1 },
16
+ "baseUrl": { "type": "string" },
17
+ "sourceBaseUrl": { "type": "string" },
18
+ "sourceCommit": { "type": "string" }
19
+ }
20
+ },
21
+ "documents": {
22
+ "type": "array",
23
+ "items": { "$ref": "#/$defs/document" }
24
+ },
25
+ "assets": {
26
+ "type": "array",
27
+ "items": { "$ref": "#/$defs/asset" }
28
+ },
29
+ "hash": { "$ref": "#/$defs/hash" }
30
+ },
31
+ "$defs": {
32
+ "hash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
33
+ "source": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["path"],
37
+ "properties": {
38
+ "path": { "type": "string", "minLength": 1 },
39
+ "url": { "type": "string" },
40
+ "commit": { "type": "string" }
41
+ }
42
+ },
43
+ "document": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": [
47
+ "id",
48
+ "title",
49
+ "route",
50
+ "order",
51
+ "source",
52
+ "blocks",
53
+ "hash"
54
+ ],
55
+ "properties": {
56
+ "id": { "type": "string", "minLength": 1 },
57
+ "title": { "type": "string", "minLength": 1 },
58
+ "route": { "type": "string", "pattern": "^/" },
59
+ "parentId": { "type": "string", "minLength": 1 },
60
+ "order": { "type": "integer", "minimum": 0 },
61
+ "source": { "$ref": "#/$defs/source" },
62
+ "blocks": {
63
+ "type": "array",
64
+ "items": { "$ref": "#/$defs/block" }
65
+ },
66
+ "hash": { "$ref": "#/$defs/hash" }
67
+ }
68
+ },
69
+ "asset": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["id", "path", "mimeType", "hash"],
73
+ "properties": {
74
+ "id": { "$ref": "#/$defs/hash" },
75
+ "path": { "type": "string", "pattern": "^assets/" },
76
+ "mimeType": { "type": "string" },
77
+ "hash": { "$ref": "#/$defs/hash" }
78
+ }
79
+ },
80
+ "inline": {
81
+ "oneOf": [
82
+ {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["type", "value"],
86
+ "properties": {
87
+ "type": { "const": "text" },
88
+ "value": { "type": "string" },
89
+ "marks": {
90
+ "type": "array",
91
+ "uniqueItems": true,
92
+ "items": {
93
+ "enum": [
94
+ "bold",
95
+ "italic",
96
+ "strikethrough",
97
+ "code"
98
+ ]
99
+ }
100
+ }
101
+ }
102
+ },
103
+ {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": ["type", "target", "children"],
107
+ "properties": {
108
+ "type": { "const": "link" },
109
+ "target": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": ["kind", "value"],
113
+ "properties": {
114
+ "kind": { "enum": ["url", "document"] },
115
+ "value": { "type": "string" }
116
+ }
117
+ },
118
+ "children": {
119
+ "type": "array",
120
+ "items": { "$ref": "#/$defs/inline" }
121
+ }
122
+ }
123
+ }
124
+ ]
125
+ },
126
+ "block": {
127
+ "type": "object",
128
+ "required": ["type"],
129
+ "properties": { "type": { "type": "string" } },
130
+ "oneOf": [
131
+ {
132
+ "properties": {
133
+ "type": { "const": "paragraph" },
134
+ "inlines": {
135
+ "type": "array",
136
+ "items": { "$ref": "#/$defs/inline" }
137
+ }
138
+ },
139
+ "required": ["inlines"]
140
+ },
141
+ {
142
+ "properties": {
143
+ "type": { "const": "heading" },
144
+ "level": {
145
+ "type": "integer",
146
+ "minimum": 1,
147
+ "maximum": 6
148
+ },
149
+ "inlines": {
150
+ "type": "array",
151
+ "items": { "$ref": "#/$defs/inline" }
152
+ }
153
+ },
154
+ "required": ["level", "inlines"]
155
+ },
156
+ {
157
+ "properties": {
158
+ "type": { "const": "code" },
159
+ "language": { "type": "string" },
160
+ "title": { "type": "string" },
161
+ "value": { "type": "string" }
162
+ },
163
+ "required": ["value"]
164
+ },
165
+ {
166
+ "properties": {
167
+ "type": { "const": "mermaid" },
168
+ "value": { "type": "string" }
169
+ },
170
+ "required": ["value"]
171
+ },
172
+ {
173
+ "properties": {
174
+ "type": { "const": "list" },
175
+ "ordered": { "type": "boolean" },
176
+ "items": {
177
+ "type": "array",
178
+ "items": {
179
+ "type": "array",
180
+ "items": { "$ref": "#/$defs/block" }
181
+ }
182
+ }
183
+ },
184
+ "required": ["ordered", "items"]
185
+ },
186
+ {
187
+ "properties": {
188
+ "type": { "const": "table" },
189
+ "header": { "$ref": "#/$defs/tableRows" },
190
+ "rows": {
191
+ "type": "array",
192
+ "items": { "$ref": "#/$defs/tableRows" }
193
+ }
194
+ },
195
+ "required": ["header", "rows"]
196
+ },
197
+ {
198
+ "properties": {
199
+ "type": { "const": "admonition" },
200
+ "kind": { "type": "string" },
201
+ "title": { "type": "string" },
202
+ "blocks": {
203
+ "type": "array",
204
+ "items": { "$ref": "#/$defs/block" }
205
+ }
206
+ },
207
+ "required": ["kind", "blocks"]
208
+ },
209
+ {
210
+ "properties": {
211
+ "type": { "const": "image" },
212
+ "assetId": { "$ref": "#/$defs/hash" },
213
+ "alt": { "type": "string" },
214
+ "title": { "type": "string" }
215
+ },
216
+ "required": ["assetId"]
217
+ },
218
+ { "properties": { "type": { "const": "thematicBreak" } } },
219
+ {
220
+ "properties": {
221
+ "type": { "const": "extension" },
222
+ "name": { "type": "string" },
223
+ "data": {}
224
+ },
225
+ "required": ["name", "data"]
226
+ }
227
+ ]
228
+ },
229
+ "tableRows": {
230
+ "type": "array",
231
+ "items": { "type": "array", "items": { "$ref": "#/$defs/inline" } }
232
+ }
233
+ }
234
+ }