@leo-studio/leo-markup 0.0.0-stage → 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 (57) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +18 -2
  3. package/dist/agent-support.d.ts +10 -0
  4. package/dist/agent-support.d.ts.map +1 -0
  5. package/dist/agent-support.js +27 -0
  6. package/dist/agent-support.js.map +1 -0
  7. package/dist/ast-json.d.ts +104 -0
  8. package/dist/ast-json.d.ts.map +1 -0
  9. package/dist/ast-json.js +203 -0
  10. package/dist/ast-json.js.map +1 -0
  11. package/dist/authoring-lints.d.ts +79 -0
  12. package/dist/authoring-lints.d.ts.map +1 -0
  13. package/dist/authoring-lints.js +145 -0
  14. package/dist/authoring-lints.js.map +1 -0
  15. package/dist/block-inline.d.ts +74 -0
  16. package/dist/block-inline.d.ts.map +1 -0
  17. package/dist/block-inline.js +171 -0
  18. package/dist/block-inline.js.map +1 -0
  19. package/dist/fence.d.ts +14 -0
  20. package/dist/fence.d.ts.map +1 -0
  21. package/dist/fence.js +55 -0
  22. package/dist/fence.js.map +1 -0
  23. package/dist/index.d.ts +20 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +20 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/parity.d.ts +44 -0
  28. package/dist/parity.d.ts.map +1 -0
  29. package/dist/parity.js +80 -0
  30. package/dist/parity.js.map +1 -0
  31. package/dist/product-spec.d.ts +164 -0
  32. package/dist/product-spec.d.ts.map +1 -0
  33. package/dist/product-spec.js +240 -0
  34. package/dist/product-spec.js.map +1 -0
  35. package/dist/registry.d.ts +53 -0
  36. package/dist/registry.d.ts.map +1 -0
  37. package/dist/registry.js +483 -0
  38. package/dist/registry.js.map +1 -0
  39. package/dist/scanner.d.ts +40 -0
  40. package/dist/scanner.d.ts.map +1 -0
  41. package/dist/scanner.js +291 -0
  42. package/dist/scanner.js.map +1 -0
  43. package/dist/schema/leo-markup-ast.schema.json +217 -0
  44. package/dist/schema/vocabulary.json +382 -0
  45. package/dist/tree-text.d.ts +16 -0
  46. package/dist/tree-text.d.ts.map +1 -0
  47. package/dist/tree-text.js +320 -0
  48. package/dist/tree-text.js.map +1 -0
  49. package/dist/types.d.ts +211 -0
  50. package/dist/types.d.ts.map +1 -0
  51. package/dist/types.js +34 -0
  52. package/dist/types.js.map +1 -0
  53. package/dist/vocabulary.d.ts +293 -0
  54. package/dist/vocabulary.d.ts.map +1 -0
  55. package/dist/vocabulary.js +226 -0
  56. package/dist/vocabulary.js.map +1 -0
  57. package/package.json +43 -3
@@ -0,0 +1,382 @@
1
+ {
2
+ "version": 1,
3
+ "relations": [
4
+ {
5
+ "name": "decision",
6
+ "targets": [
7
+ "decision",
8
+ "suite-export"
9
+ ]
10
+ },
11
+ {
12
+ "name": "derived-from",
13
+ "targets": [
14
+ "audit-question"
15
+ ]
16
+ },
17
+ {
18
+ "name": "supersedes",
19
+ "targets": [
20
+ "decision"
21
+ ]
22
+ },
23
+ {
24
+ "name": "superseded-by",
25
+ "targets": [
26
+ "decision"
27
+ ]
28
+ },
29
+ {
30
+ "name": "adr",
31
+ "targets": [
32
+ "adr"
33
+ ]
34
+ },
35
+ {
36
+ "name": "implements",
37
+ "targets": [
38
+ "artifact",
39
+ "path",
40
+ "repo",
41
+ "bare",
42
+ "adr"
43
+ ]
44
+ },
45
+ {
46
+ "name": "depends-on",
47
+ "targets": [
48
+ "artifact",
49
+ "path",
50
+ "repo",
51
+ "bare",
52
+ "adr"
53
+ ]
54
+ },
55
+ {
56
+ "name": "amends",
57
+ "targets": [
58
+ "decision",
59
+ "bare",
60
+ "adr"
61
+ ]
62
+ },
63
+ {
64
+ "name": "exists",
65
+ "targets": [
66
+ "artifact",
67
+ "path",
68
+ "repo",
69
+ "bare",
70
+ "adr"
71
+ ]
72
+ },
73
+ {
74
+ "name": "todo",
75
+ "targets": [
76
+ "artifact"
77
+ ]
78
+ }
79
+ ],
80
+ "annotationRelations": [
81
+ "exists",
82
+ "todo",
83
+ "deferred",
84
+ "depends-on",
85
+ "supersedes",
86
+ "superseded-by"
87
+ ],
88
+ "targetFamilies": [
89
+ {
90
+ "family": "decision",
91
+ "form": "decision/<id>",
92
+ "meaning": "Decision in the current suite"
93
+ },
94
+ {
95
+ "family": "journey",
96
+ "form": "<slug>/journey/<id>",
97
+ "meaning": "Journey exported by a suite"
98
+ },
99
+ {
100
+ "family": "step",
101
+ "form": "<slug>/step/<journey-id>/<step-id>",
102
+ "meaning": "Step exported by a suite"
103
+ },
104
+ {
105
+ "family": "tree",
106
+ "form": "<slug>/tree/<id>",
107
+ "meaning": "IA tree exported by a suite"
108
+ },
109
+ {
110
+ "family": "node",
111
+ "form": "<slug>/node/<tree-id>/<node-id>",
112
+ "meaning": "Identified IA node exported by a suite"
113
+ },
114
+ {
115
+ "family": "failure",
116
+ "form": "failure/<id>",
117
+ "meaning": "Failure-mode row in the current suite"
118
+ },
119
+ {
120
+ "family": "fork",
121
+ "form": "fork/<id>",
122
+ "meaning": "Review-fork marker in the current suite"
123
+ },
124
+ {
125
+ "family": "adr",
126
+ "form": "adr/<id>",
127
+ "meaning": "ADR draft (D-<ulid>) or canonical ID"
128
+ },
129
+ {
130
+ "family": "path",
131
+ "form": "path/<repo-path>[#L<a>[-L<b>]]",
132
+ "meaning": "File or directory in the document's own repository"
133
+ },
134
+ {
135
+ "family": "repo",
136
+ "form": "repo/<repo-id>/<repo-path>[#L<a>[-L<b>]]",
137
+ "meaning": "File or directory in the named repository"
138
+ },
139
+ {
140
+ "family": "artifact",
141
+ "form": "artifact/<key>",
142
+ "meaning": "Logical implementation or evidence artifact"
143
+ },
144
+ {
145
+ "family": "audit",
146
+ "form": "audit/question/<ulid>",
147
+ "meaning": "Durable question identity in the audit ledger"
148
+ }
149
+ ],
150
+ "suiteExportFamilies": {
151
+ "decision": 1,
152
+ "journey": 1,
153
+ "step": 2,
154
+ "tree": 1,
155
+ "node": 2,
156
+ "failure": 1,
157
+ "fork": 1
158
+ },
159
+ "targetExamples": {
160
+ "bare": [
161
+ "D12",
162
+ "leo-studio"
163
+ ],
164
+ "decision": [
165
+ "decision/D12"
166
+ ],
167
+ "failure": [
168
+ "failure/stale-cache"
169
+ ],
170
+ "fork": [
171
+ "fork/review-1"
172
+ ],
173
+ "adr": [
174
+ "adr/D-01KVQHTWH8MQ",
175
+ "adr/00042"
176
+ ],
177
+ "artifact": [
178
+ "artifact/spec-matrix"
179
+ ],
180
+ "audit-question": [
181
+ "audit/question/01KVQHTWH8MQ"
182
+ ],
183
+ "path": [
184
+ "path/packages/leo-markup",
185
+ "path/src/scanner.ts#L12",
186
+ "path/src/scanner.ts#L12-L40"
187
+ ],
188
+ "repo": [
189
+ "repo/leo-mono/packages/leo-doc-core/src/scanner.ts",
190
+ "repo/pg-fs/docs/plans/leo-docs-hosting.plan.md#L3-L9"
191
+ ],
192
+ "suite-export": [
193
+ "leo-studio/decision/D3",
194
+ "leo-studio/journey/onboarding",
195
+ "leo-studio/step/onboarding/step-2",
196
+ "leo-studio/tree/ia",
197
+ "leo-studio/node/ia/sidebar",
198
+ "leo-studio/failure/stale-cache",
199
+ "leo-studio/fork/review-1"
200
+ ],
201
+ "unknown": [
202
+ "ticket/LEO-12"
203
+ ],
204
+ "invalid": [
205
+ "path/",
206
+ "repo/leo-mono",
207
+ "path/a.ts#L9-L3",
208
+ "audit/D1",
209
+ "journey/onboarding"
210
+ ]
211
+ },
212
+ "productSpecComponents": {
213
+ "documents": {
214
+ "props": {},
215
+ "children": [
216
+ "document"
217
+ ]
218
+ },
219
+ "document": {
220
+ "props": {
221
+ "path": {
222
+ "kind": "string",
223
+ "required": true
224
+ },
225
+ "title": {
226
+ "kind": "string",
227
+ "required": true
228
+ },
229
+ "role": {
230
+ "kind": "enum",
231
+ "required": true,
232
+ "values": [
233
+ "index",
234
+ "decisions",
235
+ "detail",
236
+ "glossary",
237
+ "audit"
238
+ ]
239
+ }
240
+ }
241
+ },
242
+ "journey": {
243
+ "props": {
244
+ "id": {
245
+ "kind": "string",
246
+ "required": true
247
+ },
248
+ "title": {
249
+ "kind": "string",
250
+ "required": true
251
+ }
252
+ },
253
+ "children": [
254
+ "step",
255
+ "scope"
256
+ ]
257
+ },
258
+ "step": {
259
+ "props": {
260
+ "id": {
261
+ "kind": "string",
262
+ "required": true
263
+ }
264
+ },
265
+ "children": [
266
+ "transition",
267
+ "ref",
268
+ "scope"
269
+ ]
270
+ },
271
+ "transition": {
272
+ "props": {
273
+ "to": {
274
+ "kind": "string",
275
+ "required": true
276
+ },
277
+ "when": {
278
+ "kind": "string",
279
+ "required": true
280
+ }
281
+ },
282
+ "children": []
283
+ },
284
+ "tree": {
285
+ "props": {
286
+ "id": {
287
+ "kind": "string",
288
+ "required": true
289
+ },
290
+ "title": {
291
+ "kind": "string"
292
+ }
293
+ },
294
+ "children": [
295
+ "node",
296
+ "scope"
297
+ ]
298
+ },
299
+ "node": {
300
+ "props": {
301
+ "label": {
302
+ "kind": "string",
303
+ "required": true
304
+ },
305
+ "id": {
306
+ "kind": "string"
307
+ }
308
+ },
309
+ "children": [
310
+ "node",
311
+ "scope",
312
+ "ref"
313
+ ]
314
+ },
315
+ "scope": {
316
+ "props": {
317
+ "increment": {
318
+ "kind": "string"
319
+ },
320
+ "deferred": {
321
+ "kind": "boolean"
322
+ },
323
+ "unassigned": {
324
+ "kind": "boolean"
325
+ }
326
+ }
327
+ },
328
+ "ref": {
329
+ "props": {
330
+ "relation": {
331
+ "kind": "string",
332
+ "required": true
333
+ },
334
+ "target": {
335
+ "kind": "string",
336
+ "required": true
337
+ }
338
+ },
339
+ "children": []
340
+ },
341
+ "decisions": {
342
+ "props": {},
343
+ "children": [
344
+ "decision"
345
+ ]
346
+ },
347
+ "decision": {
348
+ "props": {
349
+ "id": {
350
+ "kind": "string",
351
+ "required": true
352
+ },
353
+ "title": {
354
+ "kind": "string",
355
+ "required": true
356
+ },
357
+ "status": {
358
+ "kind": "enum",
359
+ "required": true,
360
+ "values": [
361
+ "accepted",
362
+ "superseded"
363
+ ]
364
+ },
365
+ "architectural": {
366
+ "kind": "boolean"
367
+ }
368
+ },
369
+ "children": [
370
+ "statement",
371
+ "rationale",
372
+ "ref"
373
+ ]
374
+ },
375
+ "statement": {
376
+ "props": {}
377
+ },
378
+ "rationale": {
379
+ "props": {}
380
+ }
381
+ }
382
+ }
@@ -0,0 +1,16 @@
1
+ import type { ProductSpecComponent } from './product-spec.js';
2
+ /** Parse a drawn `leo.tree` fence into the shared product-spec component model. */
3
+ export declare function parseLeoTreeText(body: string, options?: {
4
+ readonly title?: string;
5
+ readonly source?: string;
6
+ }): ProductSpecComponent | undefined;
7
+ /**
8
+ * Parse a numbered-list `leo.journey` fence into the shared product-spec component model.
9
+ * A `N.` line is a step (`#id` after the marker overrides the derived `step-N`), an arrow
10
+ * line is a transition, and other lines continue the step above.
11
+ */
12
+ export declare function parseLeoJourneyText(body: string, options?: {
13
+ readonly title?: string;
14
+ readonly source?: string;
15
+ }): ProductSpecComponent | undefined;
16
+ //# sourceMappingURL=tree-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-text.d.ts","sourceRoot":"","sources":["../src/tree-text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,oBAAoB,EAGvB,MAAM,mBAAmB,CAAC;AAkP3B,mFAAmF;AACnF,wBAAgB,gBAAgB,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GACpE,oBAAoB,GAAG,SAAS,CAgBlC;AA4HD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GACpE,oBAAoB,GAAG,SAAS,CAYlC"}