@agentshouse/mdmodel 0.1.0-alpha.9 → 0.1.0-c5a71fe539a49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API.md +303 -0
- package/README.md +34 -189
- package/dist/blocks.d.ts +11 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +62 -0
- package/dist/condition.d.ts +137 -0
- package/dist/condition.d.ts.map +1 -0
- package/dist/condition.js +394 -0
- package/dist/definition.d.ts +46 -27
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +485 -152
- package/dist/divide.d.ts +3 -0
- package/dist/divide.d.ts.map +1 -0
- package/dist/divide.js +310 -0
- package/dist/document.d.ts +12 -1
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +176 -124
- package/dist/fields.d.ts +4 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +3 -0
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -4
- package/dist/links.d.ts +1 -0
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +618 -224
- package/dist/paths.d.ts +5 -3
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +47 -37
- package/dist/profile.js +1 -3
- package/dist/project.d.ts +19 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +77 -94
- package/dist/references.d.ts +4 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +25 -0
- package/dist/refuse.d.ts.map +1 -1
- package/dist/refuse.js +2 -10
- package/dist/schema.d.ts +7 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +156 -41
- package/dist/sections.d.ts +2 -1
- package/dist/sections.d.ts.map +1 -1
- package/dist/sections.js +44 -66
- package/dist/types.d.ts +40 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -3
- package/dist/validate.d.ts +3 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +129 -142
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/yaml.d.ts +2 -0
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +262 -192
- package/fixtures/README.md +91 -56
- package/fixtures/cases/absent-optional-field/library/companies/acme.md +4 -0
- package/fixtures/cases/absent-optional-field/library/deals/lead.md +6 -0
- package/fixtures/cases/absent-optional-field/schema.yaml +56 -0
- package/fixtures/cases/attachment-reference-any-file/context.json +1 -0
- package/fixtures/cases/attachment-reference-any-file/expected.json +1 -0
- package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +15 -0
- package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/library/products/support.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/schema.yaml +32 -0
- package/fixtures/cases/attachment-reference-dangles/context.json +1 -0
- package/fixtures/cases/attachment-reference-dangles/expected.json +1 -0
- package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +15 -0
- package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/library/products/support.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/schema.yaml +32 -0
- package/fixtures/cases/attachment-reference-outside/context.json +1 -0
- package/fixtures/cases/attachment-reference-outside/expected.json +6 -0
- package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +4 -0
- package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +15 -0
- package/fixtures/cases/attachment-reference-outside/library/places/depot.md +4 -0
- package/fixtures/cases/attachment-reference-outside/library/products/seats.md +4 -0
- package/fixtures/cases/attachment-reference-outside/library/products/support.md +4 -0
- package/fixtures/cases/attachment-reference-outside/schema.yaml +32 -0
- package/fixtures/cases/binary-any-reference/expected.json +1 -2
- package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-document-collision/expected.json +1 -2
- package/fixtures/cases/binary-document-collision/schema.yaml +1 -0
- package/fixtures/cases/binary-link-outside-collection/expected.json +1 -2
- package/fixtures/cases/binary-link-outside-collection/schema.yaml +1 -0
- package/fixtures/cases/binary-prototype-reference/expected.json +1 -2
- package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-typed-reference/expected.json +1 -2
- package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
- package/fixtures/cases/boolean-field/context.json +1 -0
- package/fixtures/cases/boolean-field/expected.json +6 -0
- package/fixtures/cases/boolean-field/library/companies/acme.md +4 -0
- package/fixtures/cases/boolean-field/library/deals/renewal.md +31 -0
- package/fixtures/cases/boolean-field/schema.yaml +56 -0
- package/fixtures/cases/bracketed-link-definition/schema.yaml +6 -0
- package/fixtures/cases/closed-nested-object/context.json +1 -0
- package/fixtures/cases/closed-nested-object/expected.json +6 -0
- package/fixtures/cases/closed-nested-object/library/companies/acme.md +4 -0
- package/fixtures/cases/closed-nested-object/library/deals/renewal.md +32 -0
- package/fixtures/cases/closed-nested-object/schema.yaml +56 -0
- package/fixtures/cases/composed-root-reference/context.json +1 -0
- package/fixtures/cases/composed-root-reference/expected.json +6 -0
- package/fixtures/cases/composed-root-reference/library/a.md +5 -0
- package/fixtures/cases/composed-root-reference/schema.yaml +13 -0
- package/fixtures/cases/date-time-format/context.json +1 -0
- package/fixtures/cases/date-time-format/expected.json +6 -0
- package/fixtures/cases/date-time-format/library/companies/acme.md +4 -0
- package/fixtures/cases/date-time-format/library/deals/renewal.md +31 -0
- package/fixtures/cases/date-time-format/schema.yaml +56 -0
- package/fixtures/cases/declared-binary-links/schema.yaml +1 -0
- package/fixtures/cases/default-unfilled/context.json +1 -0
- package/fixtures/cases/default-unfilled/expected.json +6 -0
- package/fixtures/cases/default-unfilled/library/companies/acme.md +4 -0
- package/fixtures/cases/default-unfilled/library/deals/renewal.md +29 -0
- package/fixtures/cases/default-unfilled/schema.yaml +56 -0
- package/fixtures/cases/defs-pattern/context.json +1 -0
- package/fixtures/cases/defs-pattern/expected.json +6 -0
- package/fixtures/cases/defs-pattern/library/companies/acme.md +4 -0
- package/fixtures/cases/defs-pattern/library/deals/renewal.md +31 -0
- package/fixtures/cases/defs-pattern/schema.yaml +56 -0
- package/fixtures/cases/dependent-rule/context.json +1 -0
- package/fixtures/cases/dependent-rule/expected.json +6 -0
- package/fixtures/cases/dependent-rule/library/companies/acme.md +4 -0
- package/fixtures/cases/dependent-rule/library/deals/renewal.md +30 -0
- package/fixtures/cases/dependent-rule/schema.yaml +56 -0
- package/fixtures/cases/duplicate-link-definition/schema.yaml +6 -0
- package/fixtures/cases/email-format/context.json +1 -0
- package/fixtures/cases/email-format/expected.json +6 -0
- package/fixtures/cases/email-format/library/companies/acme.md +4 -0
- package/fixtures/cases/email-format/library/deals/renewal.md +31 -0
- package/fixtures/cases/email-format/schema.yaml +56 -0
- package/fixtures/cases/fenced-link-definition/schema.yaml +6 -0
- package/fixtures/cases/field-enum/expected.json +2 -3
- package/fixtures/cases/field-enum/schema.yaml +7 -0
- package/fixtures/cases/frontmatter-schema/context.json +1 -0
- package/fixtures/cases/frontmatter-schema/expected.json +5 -0
- package/fixtures/cases/frontmatter-schema/schema.yaml +5 -0
- package/fixtures/cases/integer-field/context.json +1 -0
- package/fixtures/cases/integer-field/expected.json +6 -0
- package/fixtures/cases/integer-field/library/companies/acme.md +4 -0
- package/fixtures/cases/integer-field/library/deals/renewal.md +31 -0
- package/fixtures/cases/integer-field/schema.yaml +56 -0
- package/fixtures/cases/interrupted-link-definition/schema.yaml +1 -0
- package/fixtures/cases/json-schema-constructs/context.json +1 -0
- package/fixtures/cases/json-schema-constructs/expected.json +1 -0
- package/fixtures/cases/json-schema-constructs/library/companies/acme.md +4 -0
- package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +31 -0
- package/fixtures/cases/json-schema-constructs/schema.yaml +56 -0
- package/fixtures/cases/list-of-objects-closed/context.json +1 -0
- package/fixtures/cases/list-of-objects-closed/expected.json +6 -0
- package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +32 -0
- package/fixtures/cases/list-of-objects-closed/schema.yaml +56 -0
- package/fixtures/cases/list-of-objects-item/context.json +1 -0
- package/fixtures/cases/list-of-objects-item/expected.json +6 -0
- package/fixtures/cases/list-of-objects-item/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +31 -0
- package/fixtures/cases/list-of-objects-item/schema.yaml +56 -0
- package/fixtures/cases/list-of-objects-reference/context.json +1 -0
- package/fixtures/cases/list-of-objects-reference/expected.json +6 -0
- package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +14 -0
- package/fixtures/cases/list-of-objects-reference/library/places/depot.md +4 -0
- package/fixtures/cases/list-of-objects-reference/library/products/seats.md +4 -0
- package/fixtures/cases/list-of-objects-reference/library/products/support.md +4 -0
- package/fixtures/cases/list-of-objects-reference/schema.yaml +32 -0
- package/fixtures/cases/list-size/context.json +1 -0
- package/fixtures/cases/list-size/expected.json +6 -0
- package/fixtures/cases/list-size/library/companies/acme.md +4 -0
- package/fixtures/cases/list-size/library/deals/renewal.md +31 -0
- package/fixtures/cases/list-size/schema.yaml +56 -0
- package/fixtures/cases/long-fence-link-definition/schema.yaml +1 -0
- package/fixtures/cases/malformed-definition/expected.json +2 -4
- package/fixtures/cases/malformed-definition/schema.yaml +3 -0
- package/fixtures/cases/member-document/context.json +1 -0
- package/fixtures/cases/member-document/expected.json +1 -0
- package/fixtures/cases/member-document/library/people/ana.md +5 -0
- package/fixtures/cases/member-document/schema.yaml +5 -0
- package/fixtures/cases/missing-binary-image/expected.json +1 -2
- package/fixtures/cases/missing-binary-image/schema.yaml +1 -0
- package/fixtures/cases/missing-binary-link/expected.json +1 -2
- package/fixtures/cases/missing-binary-link/schema.yaml +1 -0
- package/fixtures/cases/missing-required-field/expected.json +2 -3
- package/fixtures/cases/missing-required-field/schema.yaml +7 -0
- package/fixtures/cases/missing-section-item-kind/expected.json +2 -4
- package/fixtures/cases/missing-section-item-kind/schema.yaml +6 -0
- package/fixtures/cases/misspelled-key/context.json +1 -0
- package/fixtures/cases/misspelled-key/expected.json +6 -0
- package/fixtures/cases/misspelled-key/library/companies/acme.md +4 -0
- package/fixtures/cases/misspelled-key/library/deals/renewal.md +32 -0
- package/fixtures/cases/misspelled-key/schema.yaml +56 -0
- package/fixtures/cases/nested-defs/context.json +1 -0
- package/fixtures/cases/nested-defs/expected.json +6 -0
- package/fixtures/cases/nested-defs/library/deal.md +6 -0
- package/fixtures/cases/nested-defs/schema.yaml +11 -0
- package/fixtures/cases/nested-object-reference/context.json +1 -0
- package/fixtures/cases/nested-object-reference/expected.json +6 -0
- package/fixtures/cases/nested-object-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-object-reference/library/deals/renewal.md +14 -0
- package/fixtures/cases/nested-object-reference/library/places/depot.md +4 -0
- package/fixtures/cases/nested-object-reference/library/products/seats.md +4 -0
- package/fixtures/cases/nested-object-reference/library/products/support.md +4 -0
- package/fixtures/cases/nested-object-reference/schema.yaml +32 -0
- package/fixtures/cases/nested-reference/context.json +1 -0
- package/fixtures/cases/nested-reference/expected.json +1 -0
- package/fixtures/cases/nested-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-reference/library/deals/renewal.md +15 -0
- package/fixtures/cases/nested-reference/library/places/depot.md +4 -0
- package/fixtures/cases/nested-reference/library/products/seats.md +4 -0
- package/fixtures/cases/nested-reference/library/products/support.md +4 -0
- package/fixtures/cases/nested-reference/schema.yaml +32 -0
- package/fixtures/cases/nested-required-field/context.json +1 -0
- package/fixtures/cases/nested-required-field/expected.json +6 -0
- package/fixtures/cases/nested-required-field/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-required-field/library/deals/renewal.md +30 -0
- package/fixtures/cases/nested-required-field/schema.yaml +56 -0
- package/fixtures/cases/null-refused/context.json +1 -0
- package/fixtures/cases/null-refused/expected.json +6 -0
- package/fixtures/cases/null-refused/library/companies/acme.md +4 -0
- package/fixtures/cases/null-refused/library/deals/renewal.md +31 -0
- package/fixtures/cases/null-refused/schema.yaml +56 -0
- package/fixtures/cases/numeric-range/context.json +1 -0
- package/fixtures/cases/numeric-range/expected.json +6 -0
- package/fixtures/cases/numeric-range/library/companies/acme.md +4 -0
- package/fixtures/cases/numeric-range/library/deals/renewal.md +31 -0
- package/fixtures/cases/numeric-range/schema.yaml +56 -0
- package/fixtures/cases/one-of-variant/context.json +1 -0
- package/fixtures/cases/one-of-variant/expected.json +6 -0
- package/fixtures/cases/one-of-variant/library/companies/acme.md +4 -0
- package/fixtures/cases/one-of-variant/library/deals/renewal.md +31 -0
- package/fixtures/cases/one-of-variant/schema.yaml +56 -0
- package/fixtures/cases/open-map-value/context.json +1 -0
- package/fixtures/cases/open-map-value/expected.json +6 -0
- package/fixtures/cases/open-map-value/library/companies/acme.md +4 -0
- package/fixtures/cases/open-map-value/library/deals/renewal.md +31 -0
- package/fixtures/cases/open-map-value/schema.yaml +56 -0
- package/fixtures/cases/other-room-reference/context.json +1 -0
- package/fixtures/cases/other-room-reference/expected.json +6 -0
- package/fixtures/cases/other-room-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/other-room-reference/library/deals/renewal.md +14 -0
- package/fixtures/cases/other-room-reference/library/places/depot.md +4 -0
- package/fixtures/cases/other-room-reference/library/products/seats.md +4 -0
- package/fixtures/cases/other-room-reference/library/products/support.md +4 -0
- package/fixtures/cases/other-room-reference/schema.yaml +32 -0
- package/fixtures/cases/paragraph-link-definition/schema.yaml +1 -0
- package/fixtures/cases/prototype-field/expected.json +2 -3
- package/fixtures/cases/prototype-field/schema.yaml +6 -0
- package/fixtures/cases/quoted-link-definition/expected.json +1 -2
- package/fixtures/cases/quoted-link-definition/schema.yaml +1 -0
- package/fixtures/cases/referenced-missing-file/expected.json +0 -1
- package/fixtures/cases/referenced-missing-file/schema.yaml +11 -0
- package/fixtures/cases/remote-ref/context.json +1 -0
- package/fixtures/cases/remote-ref/expected.json +5 -0
- package/fixtures/cases/remote-ref/schema.yaml +3 -0
- package/fixtures/cases/second-member-document/context.json +1 -0
- package/fixtures/cases/second-member-document/expected.json +5 -0
- package/fixtures/cases/second-member-document/schema.yaml +4 -0
- package/fixtures/cases/section-item-enum/context.json +1 -0
- package/fixtures/cases/section-item-enum/expected.json +6 -0
- package/fixtures/cases/section-item-enum/library/task.md +8 -0
- package/fixtures/cases/section-item-enum/schema.yaml +3 -0
- package/fixtures/cases/section-item-kind/context.json +1 -0
- package/fixtures/cases/section-item-kind/expected.json +6 -0
- package/fixtures/cases/section-item-kind/library/task.md +8 -0
- package/fixtures/cases/section-item-kind/schema.yaml +3 -0
- package/fixtures/cases/section-items/context.json +1 -0
- package/fixtures/cases/section-items/expected.json +1 -0
- package/fixtures/cases/section-items/library/other.md +3 -0
- package/fixtures/cases/section-items/library/page.md +42 -0
- package/fixtures/cases/section-items/schema.yaml +10 -0
- package/fixtures/cases/section-reference-path/context.json +1 -0
- package/fixtures/cases/section-reference-path/expected.json +6 -0
- package/fixtures/cases/section-reference-path/library/other.md +3 -0
- package/fixtures/cases/section-reference-path/library/page.md +7 -0
- package/fixtures/cases/section-reference-path/schema.yaml +3 -0
- package/fixtures/cases/section-reference-type/context.json +1 -0
- package/fixtures/cases/section-reference-type/expected.json +6 -0
- package/fixtures/cases/section-reference-type/library/note.md +1 -0
- package/fixtures/cases/section-reference-type/library/page.md +7 -0
- package/fixtures/cases/section-reference-type/schema.yaml +3 -0
- package/fixtures/cases/shortcut-reference-link/context.json +1 -0
- package/fixtures/cases/shortcut-reference-link/expected.json +5 -0
- package/fixtures/cases/shortcut-reference-link/library/item.md +10 -0
- package/fixtures/cases/shortcut-reference-link/schema.yaml +6 -0
- package/fixtures/cases/string-length/context.json +1 -0
- package/fixtures/cases/string-length/expected.json +6 -0
- package/fixtures/cases/string-length/library/companies/acme.md +4 -0
- package/fixtures/cases/string-length/library/deals/renewal.md +31 -0
- package/fixtures/cases/string-length/schema.yaml +56 -0
- package/fixtures/cases/structured-section/expected.json +1 -2
- package/fixtures/cases/structured-section/schema.yaml +7 -0
- package/fixtures/cases/submission-keys/context.json +1 -0
- package/fixtures/cases/submission-keys/expected.json +1 -0
- package/fixtures/cases/submission-keys/library/notes/visitor.md +8 -0
- package/fixtures/cases/submission-keys/schema.yaml +4 -0
- package/fixtures/cases/text-field-kind/context.json +1 -0
- package/fixtures/cases/text-field-kind/expected.json +6 -0
- package/fixtures/cases/text-field-kind/library/page.md +4 -0
- package/fixtures/cases/text-field-kind/schema.yaml +4 -0
- package/fixtures/cases/truncated-link-definition/expected.json +1 -2
- package/fixtures/cases/truncated-link-definition/schema.yaml +1 -0
- package/fixtures/cases/types-folder-content/context.json +1 -0
- package/fixtures/cases/types-folder-content/expected.json +1 -0
- package/fixtures/cases/types-folder-content/library/types/task.md +4 -0
- package/fixtures/cases/types-folder-content/schema.yaml +4 -0
- package/fixtures/cases/unclosed-frontmatter/expected.json +1 -2
- package/fixtures/cases/undeclared-field/expected.json +2 -3
- package/fixtures/cases/undeclared-field/schema.yaml +6 -0
- package/fixtures/cases/unevaluated-items-closed/context.json +1 -0
- package/fixtures/cases/unevaluated-items-closed/expected.json +6 -0
- package/fixtures/cases/unevaluated-items-closed/library/trip.md +6 -0
- package/fixtures/cases/unevaluated-items-closed/schema.yaml +10 -0
- package/fixtures/cases/unknown-type/context.json +1 -0
- package/fixtures/cases/unknown-type/expected.json +6 -0
- package/fixtures/cases/unknown-type/library/item.md +3 -0
- package/fixtures/cases/unknown-type/schema.yaml +3 -0
- package/fixtures/cases/unlisted-reference-type/context.json +1 -0
- package/fixtures/cases/unlisted-reference-type/expected.json +5 -0
- package/fixtures/cases/unlisted-reference-type/schema.yaml +3 -0
- package/fixtures/cases/unresolved-link/expected.json +1 -2
- package/fixtures/cases/unresolved-link/schema.yaml +6 -0
- package/fixtures/cases/valid-typed-document/schema.yaml +16 -0
- package/fixtures/cases/wide-item-fence-link/schema.yaml +1 -0
- package/fixtures/division.json +409 -0
- package/fixtures/projection.json +90 -21
- package/package.json +3 -12
- package/dist/definition.js.map +0 -1
- package/dist/document.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/links.js.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/profile.js.map +0 -1
- package/dist/project.js.map +0 -1
- package/dist/refuse.js.map +0 -1
- package/dist/schema.js.map +0 -1
- package/dist/sections.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/validate.js.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/yaml.js.map +0 -1
- package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
- package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
- package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
- package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
- package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/field-enum/library/types/task.md +0 -8
- package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
- package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
- package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
- package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
- package/fixtures/cases/missing-section-item-kind/library/types/task.md +0 -7
- package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/prd-definition/library/types/task.md +0 -16
- package/fixtures/cases/prototype-field/library/types/task.md +0 -7
- package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
- package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
- package/fixtures/cases/structured-section/library/types/task.md +0 -8
- package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/undeclared-field/library/types/task.md +0 -7
- package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
- package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
- package/fixtures/cases/valid-typed-document/library/types/task.md +0 -13
- package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
- package/markdown-syntax-profile.md +0 -9
- /package/fixtures/cases/{prd-definition → absent-optional-field}/context.json +0 -0
- /package/fixtures/cases/{prd-definition → absent-optional-field}/expected.json +0 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "task:\n type: object\n properties:\n name: { type: string }\n status: { enum: [open, done] }\n required: [status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\nperson: {}\n",
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "a Document whose whole input fits the budget is one Span carrying its projection",
|
|
6
|
+
"file": "tasks/one.md",
|
|
7
|
+
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
8
|
+
"documentTargets": [],
|
|
9
|
+
"definition": "task",
|
|
10
|
+
"budget": 4096,
|
|
11
|
+
"expected": {
|
|
12
|
+
"ok": true,
|
|
13
|
+
"spans": [
|
|
14
|
+
{
|
|
15
|
+
"text": "Ship the release\n\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n",
|
|
16
|
+
"source": "Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "an input over the budget descends to whole heading nodes and packs adjacent siblings",
|
|
23
|
+
"file": "tasks/one.md",
|
|
24
|
+
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Notes\n\nNotes prose.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
25
|
+
"documentTargets": [],
|
|
26
|
+
"definition": "task",
|
|
27
|
+
"budget": 45,
|
|
28
|
+
"expected": {
|
|
29
|
+
"ok": true,
|
|
30
|
+
"spans": [
|
|
31
|
+
{
|
|
32
|
+
"text": "Ship the release\n\n\nPreamble prose.\n\n",
|
|
33
|
+
"source": "Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"text": "## Description\n\nBody of the description.\n\n",
|
|
37
|
+
"source": "## Description\n\nBody of the description.\n\n"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"text": "## Notes\n\nNotes prose.\n\n",
|
|
41
|
+
"source": "## Notes\n\nNotes prose.\n\n"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "a heading node over the budget divides into adjacent blocks carrying its own heading",
|
|
48
|
+
"file": "tasks/one.md",
|
|
49
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
50
|
+
"documentTargets": [],
|
|
51
|
+
"definition": "task",
|
|
52
|
+
"budget": 50,
|
|
53
|
+
"expected": {
|
|
54
|
+
"ok": true,
|
|
55
|
+
"spans": [
|
|
56
|
+
{
|
|
57
|
+
"text": "Task\n\n\n",
|
|
58
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"text": "## Overview\n\nFirst paragraph of the overview.\n\n",
|
|
62
|
+
"source": "## Overview\n\nFirst paragraph of the overview.\n\n"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"text": "## Overview\n\nSecond paragraph of the overview.\n\n",
|
|
66
|
+
"source": "Second paragraph of the overview.\n\n"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"text": "## Notes\n\nShort note.\n",
|
|
70
|
+
"source": "## Notes\n\nShort note.\n"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "a node continuation and the next whole sibling stay in their own Spans",
|
|
77
|
+
"file": "tasks/one.md",
|
|
78
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
79
|
+
"documentTargets": [],
|
|
80
|
+
"definition": "task",
|
|
81
|
+
"budget": 75,
|
|
82
|
+
"expected": {
|
|
83
|
+
"ok": true,
|
|
84
|
+
"spans": [
|
|
85
|
+
{
|
|
86
|
+
"text": "Task\n\n\n",
|
|
87
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"text": "## Overview\n\nFirst paragraph of the overview.\n\n",
|
|
91
|
+
"source": "## Overview\n\nFirst paragraph of the overview.\n\n"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"text": "## Overview\n\nSecond paragraph of the overview.\n\n",
|
|
95
|
+
"source": "Second paragraph of the overview.\n\n"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"text": "## Notes\n\nShort note.\n",
|
|
99
|
+
"source": "## Notes\n\nShort note.\n"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "a continuation Span carries its own node heading and never an ancestor heading",
|
|
106
|
+
"file": "tasks/one.md",
|
|
107
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nIntro line.\n\n### Detail\n\nDetail paragraph one.\n\nDetail paragraph two.\n",
|
|
108
|
+
"documentTargets": [],
|
|
109
|
+
"definition": "task",
|
|
110
|
+
"budget": 40,
|
|
111
|
+
"expected": {
|
|
112
|
+
"ok": true,
|
|
113
|
+
"spans": [
|
|
114
|
+
{
|
|
115
|
+
"text": "Task\n\n\n",
|
|
116
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"text": "## Overview\n\nIntro line.\n\n",
|
|
120
|
+
"source": "## Overview\n\nIntro line.\n\n"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"text": "### Detail\n\nDetail paragraph one.\n\n",
|
|
124
|
+
"source": "### Detail\n\nDetail paragraph one.\n\n"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"text": "### Detail\n\nDetail paragraph two.\n",
|
|
128
|
+
"source": "Detail paragraph two.\n"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "a block over the budget divides into sentences that repeat their predecessor",
|
|
135
|
+
"file": "tasks/one.md",
|
|
136
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nOne. Two. Three. Four.\n",
|
|
137
|
+
"documentTargets": [],
|
|
138
|
+
"definition": "task",
|
|
139
|
+
"budget": 30,
|
|
140
|
+
"expected": {
|
|
141
|
+
"ok": true,
|
|
142
|
+
"spans": [
|
|
143
|
+
{
|
|
144
|
+
"text": "Task\n\n\n",
|
|
145
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"text": "## Overview\n\nOne. Two. Three. ",
|
|
149
|
+
"source": "## Overview\n\nOne. Two. Three. "
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"text": "## Overview\n\nThree. Four.\n",
|
|
153
|
+
"source": "Three. Four.\n"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "a single sentence over the budget divides at a bound cut inside it",
|
|
160
|
+
"file": "tasks/one.md",
|
|
161
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\naaaa bbbb cccc dddd eeee\n",
|
|
162
|
+
"documentTargets": [],
|
|
163
|
+
"definition": "task",
|
|
164
|
+
"budget": 20,
|
|
165
|
+
"expected": {
|
|
166
|
+
"ok": true,
|
|
167
|
+
"spans": [
|
|
168
|
+
{
|
|
169
|
+
"text": "Task\n\n\n",
|
|
170
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"text": "## Overview\n\naaaa",
|
|
174
|
+
"source": "## Overview\n\naaaa"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"text": "## Overview\n\n bbbb",
|
|
178
|
+
"source": " bbbb"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"text": "## Overview\n\n cccc",
|
|
182
|
+
"source": " cccc"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"text": "## Overview\n\n dddd",
|
|
186
|
+
"source": " dddd"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"text": "## Overview\n\n eeee\n",
|
|
190
|
+
"source": " eeee\n"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "an untyped input with no definition descends the same ladder",
|
|
197
|
+
"file": "notes/one.md",
|
|
198
|
+
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n## Alpha\n\nAlpha one. Alpha two.\n\n### Deep\n\nDeep prose here.\n\n## Beta\n\nBeta prose.\n",
|
|
199
|
+
"documentTargets": [],
|
|
200
|
+
"definition": null,
|
|
201
|
+
"budget": 60,
|
|
202
|
+
"expected": {
|
|
203
|
+
"ok": true,
|
|
204
|
+
"spans": [
|
|
205
|
+
{
|
|
206
|
+
"text": "# Title\n\nIntro paragraph about the whole thing.\n\n",
|
|
207
|
+
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"text": "## Alpha\n\nAlpha one. Alpha two.\n\n",
|
|
211
|
+
"source": "## Alpha\n\nAlpha one. Alpha two.\n\n"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"text": "### Deep\n\nDeep prose here.\n\n",
|
|
215
|
+
"source": "### Deep\n\nDeep prose here.\n\n"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"text": "## Beta\n\nBeta prose.\n",
|
|
219
|
+
"source": "## Beta\n\nBeta prose.\n"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "a Document that declares the built-in any type divides its body after the fence",
|
|
226
|
+
"file": "notes/two.md",
|
|
227
|
+
"source": "---\ntype: any\ntitle: Note\n---\n\n## Notes\n\nRead it.\n",
|
|
228
|
+
"documentTargets": [],
|
|
229
|
+
"definition": null,
|
|
230
|
+
"budget": 4096,
|
|
231
|
+
"expected": {
|
|
232
|
+
"ok": true,
|
|
233
|
+
"spans": [
|
|
234
|
+
{
|
|
235
|
+
"text": "\n## Notes\n\nRead it.\n",
|
|
236
|
+
"source": "\n## Notes\n\nRead it.\n"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "an internal link embeds its label and addresses the destination the author wrote",
|
|
243
|
+
"file": "tasks/one.md",
|
|
244
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n## Notes\n\nShort note.\n",
|
|
245
|
+
"documentTargets": [
|
|
246
|
+
"plans/q3.md"
|
|
247
|
+
],
|
|
248
|
+
"definition": "task",
|
|
249
|
+
"budget": 50,
|
|
250
|
+
"expected": {
|
|
251
|
+
"ok": true,
|
|
252
|
+
"spans": [
|
|
253
|
+
{
|
|
254
|
+
"text": "Task\n\n\n",
|
|
255
|
+
"source": "Task\nstatus: open\n---\n\n"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"text": "## Overview\n\nRead the plan before starting.\n\n",
|
|
259
|
+
"source": "## Overview\n\nRead [the plan](../plans/q3.md) before starting.\n\n"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"text": "## Notes\n\nShort note.\n",
|
|
263
|
+
"source": "## Notes\n\nShort note.\n"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "a declared structured section stays outside the text and inside the extent",
|
|
270
|
+
"file": "tasks/one.md",
|
|
271
|
+
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n",
|
|
272
|
+
"documentTargets": [],
|
|
273
|
+
"definition": "task",
|
|
274
|
+
"budget": 4096,
|
|
275
|
+
"expected": {
|
|
276
|
+
"ok": true,
|
|
277
|
+
"spans": [
|
|
278
|
+
{
|
|
279
|
+
"text": "Task\n\n\nPreamble prose.\n\n## Notes\n\nShort note.\n",
|
|
280
|
+
"source": "Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "a Document that declares a type the caller supplies no definition for is refused",
|
|
287
|
+
"file": "tasks/one.md",
|
|
288
|
+
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
289
|
+
"documentTargets": [],
|
|
290
|
+
"definition": null,
|
|
291
|
+
"budget": 4096,
|
|
292
|
+
"expected": {
|
|
293
|
+
"ok": false,
|
|
294
|
+
"refusal": {
|
|
295
|
+
"file": "tasks/one.md",
|
|
296
|
+
"rule": "unknown-type",
|
|
297
|
+
"location": "type"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "a budget that cannot hold one whole character is refused before any division",
|
|
303
|
+
"file": "notes/one.md",
|
|
304
|
+
"source": "## Notes\n\nShort note.\n",
|
|
305
|
+
"documentTargets": [],
|
|
306
|
+
"definition": null,
|
|
307
|
+
"budget": 1,
|
|
308
|
+
"expected": {
|
|
309
|
+
"ok": false,
|
|
310
|
+
"refusal": {
|
|
311
|
+
"file": "notes/one.md",
|
|
312
|
+
"rule": "division-budget"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "a free-text value the author quoted embeds bare and addresses the quotes it was written with",
|
|
318
|
+
"file": "tasks/one.md",
|
|
319
|
+
"source": "---\ntype: task\nname: \"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n",
|
|
320
|
+
"documentTargets": [],
|
|
321
|
+
"definition": "task",
|
|
322
|
+
"budget": 4096,
|
|
323
|
+
"expected": {
|
|
324
|
+
"ok": true,
|
|
325
|
+
"spans": [
|
|
326
|
+
{
|
|
327
|
+
"text": "Ship: the release\n\n\nBody prose.\n",
|
|
328
|
+
"source": "\"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "sentence division reads every terminator and closer and drops a carry the budget cannot hold",
|
|
335
|
+
"file": "notes/three.md",
|
|
336
|
+
"source": "## Ask\n\nReady? Go! He said \"no.\" Then (silence.) Done.\n",
|
|
337
|
+
"documentTargets": [],
|
|
338
|
+
"definition": null,
|
|
339
|
+
"budget": 30,
|
|
340
|
+
"expected": {
|
|
341
|
+
"ok": true,
|
|
342
|
+
"spans": [
|
|
343
|
+
{
|
|
344
|
+
"text": "## Ask\n\nReady? Go! ",
|
|
345
|
+
"source": "## Ask\n\nReady? Go! "
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"text": "## Ask\n\nGo! He said \"no.\" ",
|
|
349
|
+
"source": "Go! He said \"no.\" "
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"text": "## Ask\n\nThen (silence.) Done.\n",
|
|
353
|
+
"source": "Then (silence.) Done.\n"
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "a heading with no body of its own leads the first child node instead of standing alone",
|
|
360
|
+
"file": "notes/four.md",
|
|
361
|
+
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n### Beta\n\nBeta prose.\n",
|
|
362
|
+
"documentTargets": [],
|
|
363
|
+
"definition": null,
|
|
364
|
+
"budget": 70,
|
|
365
|
+
"expected": {
|
|
366
|
+
"ok": true,
|
|
367
|
+
"spans": [
|
|
368
|
+
{
|
|
369
|
+
"text": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n",
|
|
370
|
+
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"text": "### Beta\n\nBeta prose.\n",
|
|
374
|
+
"source": "### Beta\n\nBeta prose.\n"
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "a heading the budget cannot hold beside any text is not repeated",
|
|
381
|
+
"file": "notes/five.md",
|
|
382
|
+
"source": "## An overview of the release\n\nFirst paragraph here.\n\nSecond paragraph here.\n",
|
|
383
|
+
"documentTargets": [],
|
|
384
|
+
"definition": null,
|
|
385
|
+
"budget": 25,
|
|
386
|
+
"expected": {
|
|
387
|
+
"ok": true,
|
|
388
|
+
"spans": [
|
|
389
|
+
{
|
|
390
|
+
"text": "## An overview of the",
|
|
391
|
+
"source": "## An overview of the"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"text": " release\n\nFirst paragraph",
|
|
395
|
+
"source": " release\n\nFirst paragraph"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"text": " here.\n\n",
|
|
399
|
+
"source": " here.\n\n"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"text": "Second paragraph here.\n",
|
|
403
|
+
"source": "Second paragraph here.\n"
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
}
|
package/fixtures/projection.json
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"task": "---\ntype: definition\nfields:\n name: { kind: text, required: true }\n aliases: { kind: list, of: text }\n title: { kind: string, required: true }\n status: { kind: enum, values: [open, done], required: true }\n owner: { kind: reference, to: person }\n due: { kind: date }\n estimate: { kind: number }\n labels: { kind: list, of: string }\nsections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, of: reference, to: person }\n Checklist: { kind: list, of: text }\n---\n",
|
|
4
|
-
"unreadable-task": "---\ntype: definition\nsections:\n Description: { kind: prose }\n---\n"
|
|
5
|
-
},
|
|
2
|
+
"schema": "$defs:\n line: { type: string }\ntask:\n type: object\n properties:\n name: { type: string }\n aliases: { type: array, items: { type: string } }\n title: { type: string, pattern: '\\S' }\n status: { enum: [open, done] }\n owner: { type: string, reference: person }\n reviewers: { type: array, items: { type: string, reference: person } }\n due: { type: string, format: date }\n estimate: { type: number }\n labels: { type: array, items: { type: string, pattern: '^[a-z]+$' } }\n contact:\n type: object\n properties:\n note: { type: string }\n email: { type: string, format: email }\n notes: { type: object, additionalProperties: { type: string } }\n backup: { $ref: '#/$defs/line', format: email }\n memo: { type: [string, 'null'] }\n steps:\n type: array\n items:\n type: object\n properties:\n title: { type: string }\n done: { type: boolean }\n required: [name, title, status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\n Checklist: { kind: list, items: { type: string } }\nperson: {}\n",
|
|
6
3
|
"cases": [
|
|
7
4
|
{
|
|
8
5
|
"name": "any body keeps labels and leaves every unsupplied destination authored",
|
|
@@ -70,6 +67,38 @@
|
|
|
70
67
|
"text": "Ship the release\n\nLaunch day\n\nCutover\n\n"
|
|
71
68
|
}
|
|
72
69
|
},
|
|
70
|
+
{
|
|
71
|
+
"name": "a typed Document projects its prose at any depth in document order and leaves every filtered value out",
|
|
72
|
+
"file": "tasks/twelve.md",
|
|
73
|
+
"source": "---\ntype: task\nname: Ship the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\nreviewers: [../people/bo.md]\ndue: 2026-09-30\ncontact:\n note: Call before noon\n email: ana@example.com\nsteps:\n - title: Tag the build\n done: true\n - title: Announce it\n done: false\n---\n\n## Description\n\nCut the release.\n\n## Acceptance\n\n- [Ana](../people/ana.md)\n\n## Checklist\n\n- Notes written\n",
|
|
74
|
+
"documentTargets": [],
|
|
75
|
+
"definition": "task",
|
|
76
|
+
"move": null,
|
|
77
|
+
"filtered": {
|
|
78
|
+
"field": "status",
|
|
79
|
+
"value": "done"
|
|
80
|
+
},
|
|
81
|
+
"expected": {
|
|
82
|
+
"ok": true,
|
|
83
|
+
"text": "Ship the release\n\nCall before noon\n\nTag the build\n\nAnnounce it\n\n\n## Description\n\nCut the release.\n\n## Checklist\n\n- Notes written\n"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "a typed Document projects the prose of an open map and a nullable string and leaves a formatted $ref out",
|
|
88
|
+
"file": "tasks/launch.md",
|
|
89
|
+
"source": "---\ntype: task\nname: Plan the launch\ntitle: Plan\nstatus: open\nnotes:\n monday: Book the room\n friday: Send the invite\nbackup: ana@example.com\nmemo: Bring slides\n---\n\n## Description\n\nLaunch.\n",
|
|
90
|
+
"documentTargets": [],
|
|
91
|
+
"definition": "task",
|
|
92
|
+
"move": null,
|
|
93
|
+
"filtered": {
|
|
94
|
+
"field": "backup",
|
|
95
|
+
"value": "bo@example.com"
|
|
96
|
+
},
|
|
97
|
+
"expected": {
|
|
98
|
+
"ok": true,
|
|
99
|
+
"text": "Plan the launch\n\nBook the room\n\nSend the invite\n\nBring slides\n\n\n## Description\n\nLaunch.\n"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
73
102
|
{
|
|
74
103
|
"name": "a typed Document projects its preamble and every section its type does not declare as structure",
|
|
75
104
|
"file": "tasks/one.md",
|
|
@@ -83,6 +112,14 @@
|
|
|
83
112
|
"href": "../plans/q3.md",
|
|
84
113
|
"to": "../plans/2026-q3.md"
|
|
85
114
|
},
|
|
115
|
+
"relabel": {
|
|
116
|
+
"from": "[the plan][plan] and",
|
|
117
|
+
"to": "[the roadmap][plan] and",
|
|
118
|
+
"expected": {
|
|
119
|
+
"ok": true,
|
|
120
|
+
"text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the roadmap and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
86
123
|
"expected": {
|
|
87
124
|
"ok": true,
|
|
88
125
|
"text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the plan and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
|
|
@@ -139,35 +176,32 @@
|
|
|
139
176
|
"refusal": {
|
|
140
177
|
"file": "tasks/one.md",
|
|
141
178
|
"rule": "unknown-type",
|
|
142
|
-
"version": "<package-version>",
|
|
143
179
|
"location": "type"
|
|
144
180
|
}
|
|
145
181
|
}
|
|
146
182
|
},
|
|
147
183
|
{
|
|
148
|
-
"name": "a
|
|
149
|
-
"file": "
|
|
150
|
-
"source": "
|
|
184
|
+
"name": "an image at a supplied Markdown document target is projected like its link",
|
|
185
|
+
"file": "notes/four.md",
|
|
186
|
+
"source": "Read [the plan](../plans/q3.md) and .\nAlso [the plan][plan] and ![the chart][plan].\n\n[plan]: ../plans/q3.md\n",
|
|
151
187
|
"documentTargets": [
|
|
152
188
|
"plans/q3.md",
|
|
153
189
|
"plans/2026-q3.md"
|
|
154
190
|
],
|
|
155
|
-
"definition":
|
|
156
|
-
"move":
|
|
191
|
+
"definition": null,
|
|
192
|
+
"move": {
|
|
193
|
+
"href": "../plans/q3.md",
|
|
194
|
+
"to": "../plans/2026-q3.md"
|
|
195
|
+
},
|
|
157
196
|
"expected": {
|
|
158
|
-
"ok":
|
|
159
|
-
"
|
|
160
|
-
"file": "types/task.md",
|
|
161
|
-
"rule": "definition-section-kind",
|
|
162
|
-
"version": "<package-version>",
|
|
163
|
-
"location": "Description"
|
|
164
|
-
}
|
|
197
|
+
"ok": true,
|
|
198
|
+
"text": "Read the plan and the chart.\nAlso the plan and the chart.\n\n"
|
|
165
199
|
}
|
|
166
200
|
},
|
|
167
201
|
{
|
|
168
|
-
"name": "
|
|
169
|
-
"file": "notes/
|
|
170
|
-
"source": "Read [
|
|
202
|
+
"name": "a shortcut reference link projects its label and its definition leaves the projection",
|
|
203
|
+
"file": "notes/five.md",
|
|
204
|
+
"source": "Read [Plan] and [the draft], then [plan](not a link).\nAlso [[Plan]], [ plan ], \\[Plan] and [Release plan].\n\n[plan]: ../plans/q3.md\n[release plan]: ../plans/q3.md\n",
|
|
171
205
|
"documentTargets": [
|
|
172
206
|
"plans/q3.md",
|
|
173
207
|
"plans/2026-q3.md"
|
|
@@ -177,9 +211,44 @@
|
|
|
177
211
|
"href": "../plans/q3.md",
|
|
178
212
|
"to": "../plans/2026-q3.md"
|
|
179
213
|
},
|
|
214
|
+
"links": [
|
|
215
|
+
{
|
|
216
|
+
"href": "../plans/q3.md",
|
|
217
|
+
"target": "plans/q3.md"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
180
220
|
"expected": {
|
|
181
221
|
"ok": true,
|
|
182
|
-
"text": "Read the plan
|
|
222
|
+
"text": "Read Plan and [the draft], then plan(not a link).\nAlso [Plan], plan , \\[Plan] and Release plan.\n\n"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "an image whose description holds a link projects both labels",
|
|
227
|
+
"file": "notes/six.md",
|
|
228
|
+
"source": "Read ](../plans/q4.md).\n",
|
|
229
|
+
"documentTargets": [
|
|
230
|
+
"plans/q3.md",
|
|
231
|
+
"plans/2026-q3.md",
|
|
232
|
+
"plans/q4.md"
|
|
233
|
+
],
|
|
234
|
+
"definition": null,
|
|
235
|
+
"move": {
|
|
236
|
+
"href": "../plans/q3.md",
|
|
237
|
+
"to": "../plans/2026-q3.md"
|
|
238
|
+
},
|
|
239
|
+
"links": [
|
|
240
|
+
{
|
|
241
|
+
"href": "../plans/q3.md",
|
|
242
|
+
"target": "plans/q3.md"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"href": "../plans/q4.md",
|
|
246
|
+
"target": "plans/q4.md"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"expected": {
|
|
250
|
+
"ok": true,
|
|
251
|
+
"text": "Read outer Plan.\n"
|
|
183
252
|
}
|
|
184
253
|
}
|
|
185
254
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/mdmodel",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c5a71fe539a49",
|
|
4
4
|
"description": "MD Type language, parser, validator, structured change application, Markdown syntax profile, and conformance fixtures",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,19 +21,10 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"fixtures",
|
|
24
|
+
"API.md",
|
|
24
25
|
"LICENSE",
|
|
25
|
-
"README.md"
|
|
26
|
-
"markdown-syntax-profile.md"
|
|
26
|
+
"README.md"
|
|
27
27
|
],
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/agentshouse/mdmodel.git",
|
|
31
|
-
"directory": "packages/mdmodel"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/agentshouse/mdmodel#readme",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/agentshouse/mdmodel/issues"
|
|
36
|
-
},
|
|
37
28
|
"dependencies": {
|
|
38
29
|
"@cfworker/json-schema": "4.1.1"
|
|
39
30
|
}
|
package/dist/definition.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/workspace/packages/mdmodel/src/definition.ts"],"sourcesContent":["import { typeNameFromPath } from './paths.js';\nimport { refusal } from './refuse.js';\nimport type { Document, Refusal } from './types.js';\n\nexport type TextSpec = { readonly kind: 'text'; readonly required: boolean };\n\nexport type ScalarSpec =\n | TextSpec\n | { readonly kind: 'string'; readonly required: boolean }\n | { readonly kind: 'number'; readonly required: boolean }\n | { readonly kind: 'date'; readonly required: boolean }\n | { readonly kind: 'enum'; readonly required: boolean; readonly values: readonly string[] }\n | { readonly kind: 'reference'; readonly required: boolean; readonly to: string };\n\nexport type ListSpec = {\n readonly kind: 'list';\n readonly required: boolean;\n readonly of: ScalarSpec;\n};\n\nexport type FieldSpec = ScalarSpec | ListSpec;\n\nexport type SectionSpec = TextSpec | ListSpec;\n\nexport type Definition = {\n readonly name: string;\n readonly file: string;\n readonly fields: Readonly<Record<string, FieldSpec>>;\n readonly sections: Readonly<Record<string, SectionSpec>>;\n};\n\nfunction refuse(file: string, rule: string, location?: string): Refusal {\n return location === undefined ? refusal(file, rule) : refusal(file, rule, { location });\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction requiredFlag(value: unknown): boolean | undefined {\n if (value === undefined) return false;\n if (typeof value === 'boolean') return value;\n return undefined;\n}\n\nfunction stringList(value: unknown): string[] | undefined {\n if (!Array.isArray(value) || value.length === 0) return undefined;\n if (!value.every((item) => typeof item === 'string' && item !== '')) return undefined;\n return value;\n}\n\nconst SCALAR_KINDS = new Set(['text', 'string', 'number', 'date', 'enum', 'reference']);\n\nfunction parseScalar(\n file: string,\n location: string,\n spec: Record<string, unknown>,\n required: boolean,\n): ScalarSpec | Refusal {\n const kind = spec.kind;\n if (kind === 'text') return { kind: 'text', required };\n if (kind === 'string') return { kind: 'string', required };\n if (kind === 'number') return { kind: 'number', required };\n if (kind === 'date') return { kind: 'date', required };\n if (kind === 'enum') {\n const values = stringList(spec.values);\n if (values === undefined) return refuse(file, 'definition-enum-values', location);\n return { kind: 'enum', required, values };\n }\n if (kind === 'reference') {\n if (typeof spec.to !== 'string' || spec.to === '')\n return refuse(file, 'definition-reference-to', location);\n return { kind: 'reference', required, to: spec.to };\n }\n return refuse(file, 'definition-field-kind', location);\n}\n\nfunction extraKeys(spec: Record<string, unknown>, allowed: readonly string[]): boolean {\n return Object.keys(spec).some((key) => !allowed.includes(key));\n}\n\nfunction parseList(\n file: string,\n location: string,\n spec: Record<string, unknown>,\n required: boolean,\n malformed: string,\n): ListSpec | Refusal {\n if (typeof spec.of !== 'string' || !SCALAR_KINDS.has(spec.of)) {\n return refuse(file, 'definition-list-of', location);\n }\n const allowed =\n spec.of === 'enum'\n ? ['kind', 'required', 'of', 'values']\n : spec.of === 'reference'\n ? ['kind', 'required', 'of', 'to']\n : ['kind', 'required', 'of'];\n if (extraKeys(spec, allowed)) return refuse(file, malformed, location);\n const inner = parseScalar(file, location, { ...spec, kind: spec.of }, false);\n if ('rule' in inner) return inner;\n return { kind: 'list', required, of: inner };\n}\n\nfunction parseField(file: string, location: string, value: unknown): FieldSpec | Refusal {\n if (!isRecord(value) || typeof value.kind !== 'string')\n return refuse(file, 'definition-field', location);\n const required = requiredFlag(value.required);\n if (required === undefined) return refuse(file, 'definition-field', location);\n if (value.kind === 'list') return parseList(file, location, value, required, 'definition-field');\n const allowed =\n value.kind === 'enum'\n ? ['kind', 'required', 'values']\n : value.kind === 'reference'\n ? ['kind', 'required', 'to']\n : ['kind', 'required'];\n if (extraKeys(value, allowed)) return refuse(file, 'definition-field', location);\n return parseScalar(file, location, value, required);\n}\n\nfunction parseSection(file: string, location: string, value: unknown): SectionSpec | Refusal {\n if (!isRecord(value) || (value.kind !== 'text' && value.kind !== 'list')) {\n return refuse(file, 'definition-section-kind', location);\n }\n const required = requiredFlag(value.required);\n if (required === undefined) return refuse(file, 'definition-section', location);\n if (value.kind === 'list')\n return parseList(file, location, value, required, 'definition-section');\n if (extraKeys(value, ['kind', 'required'])) return refuse(file, 'definition-section', location);\n return { kind: 'text', required };\n}\n\nexport function readDefinition(file: string, document: Document): Definition | Refusal {\n if (document.type !== 'definition') return refuse(file, 'definition-type');\n const name = typeNameFromPath(file);\n if (name === '') return refuse(file, 'definition-type');\n for (const key of Object.keys(document.fields)) {\n if (key !== 'type' && key !== 'fields' && key !== 'sections') {\n return refuse(file, 'definition-shape', key);\n }\n }\n const fieldsValue = document.fields.fields;\n const sectionsValue = document.fields.sections;\n if (fieldsValue !== undefined && !isRecord(fieldsValue))\n return refuse(file, 'definition-fields', 'fields');\n if (sectionsValue !== undefined && !isRecord(sectionsValue)) {\n return refuse(file, 'definition-sections', 'sections');\n }\n const fields: Record<string, FieldSpec> = Object.create(null);\n for (const [fieldName, spec] of Object.entries(fieldsValue ?? {})) {\n const parsed = parseField(file, fieldName, spec);\n if ('rule' in parsed) return parsed;\n fields[fieldName] = parsed;\n }\n const sections: Record<string, SectionSpec> = Object.create(null);\n for (const [sectionName, spec] of Object.entries(sectionsValue ?? {})) {\n const parsed = parseSection(file, sectionName, spec);\n if ('rule' in parsed) return parsed;\n sections[sectionName] = parsed;\n }\n return { name, file, fields, sections };\n}\n"],"names":["typeNameFromPath","refusal","refuse","file","rule","location","undefined","isRecord","value","Array","isArray","requiredFlag","stringList","length","every","item","SCALAR_KINDS","Set","parseScalar","spec","required","kind","values","to","extraKeys","allowed","Object","keys","some","key","includes","parseList","malformed","of","has","inner","parseField","parseSection","readDefinition","document","type","name","fields","fieldsValue","sectionsValue","sections","create","fieldName","entries","parsed","sectionName"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,aAAa;AAC9C,SAASC,OAAO,QAAQ,cAAc;AA8BtC,SAASC,OAAOC,IAAY,EAAEC,IAAY,EAAEC,QAAiB;IAC3D,OAAOA,aAAaC,YAAYL,QAAQE,MAAMC,QAAQH,QAAQE,MAAMC,MAAM;QAAEC;IAAS;AACvF;AAEA,SAASE,SAASC,KAAc;IAC9B,OAAOA,UAAU,QAAQ,OAAOA,UAAU,YAAY,CAACC,MAAMC,OAAO,CAACF;AACvE;AAEA,SAASG,aAAaH,KAAc;IAClC,IAAIA,UAAUF,WAAW,OAAO;IAChC,IAAI,OAAOE,UAAU,WAAW,OAAOA;IACvC,OAAOF;AACT;AAEA,SAASM,WAAWJ,KAAc;IAChC,IAAI,CAACC,MAAMC,OAAO,CAACF,UAAUA,MAAMK,MAAM,KAAK,GAAG,OAAOP;IACxD,IAAI,CAACE,MAAMM,KAAK,CAAC,CAACC,OAAS,OAAOA,SAAS,YAAYA,SAAS,KAAK,OAAOT;IAC5E,OAAOE;AACT;AAEA,MAAMQ,eAAe,IAAIC,IAAI;IAAC;IAAQ;IAAU;IAAU;IAAQ;IAAQ;CAAY;AAEtF,SAASC,YACPf,IAAY,EACZE,QAAgB,EAChBc,IAA6B,EAC7BC,QAAiB;IAEjB,MAAMC,OAAOF,KAAKE,IAAI;IACtB,IAAIA,SAAS,QAAQ,OAAO;QAAEA,MAAM;QAAQD;IAAS;IACrD,IAAIC,SAAS,UAAU,OAAO;QAAEA,MAAM;QAAUD;IAAS;IACzD,IAAIC,SAAS,UAAU,OAAO;QAAEA,MAAM;QAAUD;IAAS;IACzD,IAAIC,SAAS,QAAQ,OAAO;QAAEA,MAAM;QAAQD;IAAS;IACrD,IAAIC,SAAS,QAAQ;QACnB,MAAMC,SAASV,WAAWO,KAAKG,MAAM;QACrC,IAAIA,WAAWhB,WAAW,OAAOJ,OAAOC,MAAM,0BAA0BE;QACxE,OAAO;YAAEgB,MAAM;YAAQD;YAAUE;QAAO;IAC1C;IACA,IAAID,SAAS,aAAa;QACxB,IAAI,OAAOF,KAAKI,EAAE,KAAK,YAAYJ,KAAKI,EAAE,KAAK,IAC7C,OAAOrB,OAAOC,MAAM,2BAA2BE;QACjD,OAAO;YAAEgB,MAAM;YAAaD;YAAUG,IAAIJ,KAAKI,EAAE;QAAC;IACpD;IACA,OAAOrB,OAAOC,MAAM,yBAAyBE;AAC/C;AAEA,SAASmB,UAAUL,IAA6B,EAAEM,OAA0B;IAC1E,OAAOC,OAAOC,IAAI,CAACR,MAAMS,IAAI,CAAC,CAACC,MAAQ,CAACJ,QAAQK,QAAQ,CAACD;AAC3D;AAEA,SAASE,UACP5B,IAAY,EACZE,QAAgB,EAChBc,IAA6B,EAC7BC,QAAiB,EACjBY,SAAiB;IAEjB,IAAI,OAAOb,KAAKc,EAAE,KAAK,YAAY,CAACjB,aAAakB,GAAG,CAACf,KAAKc,EAAE,GAAG;QAC7D,OAAO/B,OAAOC,MAAM,sBAAsBE;IAC5C;IACA,MAAMoB,UACJN,KAAKc,EAAE,KAAK,SACR;QAAC;QAAQ;QAAY;QAAM;KAAS,GACpCd,KAAKc,EAAE,KAAK,cACV;QAAC;QAAQ;QAAY;QAAM;KAAK,GAChC;QAAC;QAAQ;QAAY;KAAK;IAClC,IAAIT,UAAUL,MAAMM,UAAU,OAAOvB,OAAOC,MAAM6B,WAAW3B;IAC7D,MAAM8B,QAAQjB,YAAYf,MAAME,UAAU;QAAE,GAAGc,IAAI;QAAEE,MAAMF,KAAKc,EAAE;IAAC,GAAG;IACtE,IAAI,UAAUE,OAAO,OAAOA;IAC5B,OAAO;QAAEd,MAAM;QAAQD;QAAUa,IAAIE;IAAM;AAC7C;AAEA,SAASC,WAAWjC,IAAY,EAAEE,QAAgB,EAAEG,KAAc;IAChE,IAAI,CAACD,SAASC,UAAU,OAAOA,MAAMa,IAAI,KAAK,UAC5C,OAAOnB,OAAOC,MAAM,oBAAoBE;IAC1C,MAAMe,WAAWT,aAAaH,MAAMY,QAAQ;IAC5C,IAAIA,aAAad,WAAW,OAAOJ,OAAOC,MAAM,oBAAoBE;IACpE,IAAIG,MAAMa,IAAI,KAAK,QAAQ,OAAOU,UAAU5B,MAAME,UAAUG,OAAOY,UAAU;IAC7E,MAAMK,UACJjB,MAAMa,IAAI,KAAK,SACX;QAAC;QAAQ;QAAY;KAAS,GAC9Bb,MAAMa,IAAI,KAAK,cACb;QAAC;QAAQ;QAAY;KAAK,GAC1B;QAAC;QAAQ;KAAW;IAC5B,IAAIG,UAAUhB,OAAOiB,UAAU,OAAOvB,OAAOC,MAAM,oBAAoBE;IACvE,OAAOa,YAAYf,MAAME,UAAUG,OAAOY;AAC5C;AAEA,SAASiB,aAAalC,IAAY,EAAEE,QAAgB,EAAEG,KAAc;IAClE,IAAI,CAACD,SAASC,UAAWA,MAAMa,IAAI,KAAK,UAAUb,MAAMa,IAAI,KAAK,QAAS;QACxE,OAAOnB,OAAOC,MAAM,2BAA2BE;IACjD;IACA,MAAMe,WAAWT,aAAaH,MAAMY,QAAQ;IAC5C,IAAIA,aAAad,WAAW,OAAOJ,OAAOC,MAAM,sBAAsBE;IACtE,IAAIG,MAAMa,IAAI,KAAK,QACjB,OAAOU,UAAU5B,MAAME,UAAUG,OAAOY,UAAU;IACpD,IAAII,UAAUhB,OAAO;QAAC;QAAQ;KAAW,GAAG,OAAON,OAAOC,MAAM,sBAAsBE;IACtF,OAAO;QAAEgB,MAAM;QAAQD;IAAS;AAClC;AAEA,OAAO,SAASkB,eAAenC,IAAY,EAAEoC,QAAkB;IAC7D,IAAIA,SAASC,IAAI,KAAK,cAAc,OAAOtC,OAAOC,MAAM;IACxD,MAAMsC,OAAOzC,iBAAiBG;IAC9B,IAAIsC,SAAS,IAAI,OAAOvC,OAAOC,MAAM;IACrC,KAAK,MAAM0B,OAAOH,OAAOC,IAAI,CAACY,SAASG,MAAM,EAAG;QAC9C,IAAIb,QAAQ,UAAUA,QAAQ,YAAYA,QAAQ,YAAY;YAC5D,OAAO3B,OAAOC,MAAM,oBAAoB0B;QAC1C;IACF;IACA,MAAMc,cAAcJ,SAASG,MAAM,CAACA,MAAM;IAC1C,MAAME,gBAAgBL,SAASG,MAAM,CAACG,QAAQ;IAC9C,IAAIF,gBAAgBrC,aAAa,CAACC,SAASoC,cACzC,OAAOzC,OAAOC,MAAM,qBAAqB;IAC3C,IAAIyC,kBAAkBtC,aAAa,CAACC,SAASqC,gBAAgB;QAC3D,OAAO1C,OAAOC,MAAM,uBAAuB;IAC7C;IACA,MAAMuC,SAAoChB,OAAOoB,MAAM,CAAC;IACxD,KAAK,MAAM,CAACC,WAAW5B,KAAK,IAAIO,OAAOsB,OAAO,CAACL,eAAe,CAAC,GAAI;QACjE,MAAMM,SAASb,WAAWjC,MAAM4C,WAAW5B;QAC3C,IAAI,UAAU8B,QAAQ,OAAOA;QAC7BP,MAAM,CAACK,UAAU,GAAGE;IACtB;IACA,MAAMJ,WAAwCnB,OAAOoB,MAAM,CAAC;IAC5D,KAAK,MAAM,CAACI,aAAa/B,KAAK,IAAIO,OAAOsB,OAAO,CAACJ,iBAAiB,CAAC,GAAI;QACrE,MAAMK,SAASZ,aAAalC,MAAM+C,aAAa/B;QAC/C,IAAI,UAAU8B,QAAQ,OAAOA;QAC7BJ,QAAQ,CAACK,YAAY,GAAGD;IAC1B;IACA,OAAO;QAAER;QAAMtC;QAAMuC;QAAQG;IAAS;AACxC"}
|