@agentshouse/mdmodel 0.1.0-c896b3d9398b1 → 0.1.0-c8ef006e419a0
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 +345 -279
- package/README.md +28 -29
- package/dist/body.d.ts +85 -0
- package/dist/body.d.ts.map +1 -0
- package/dist/body.js +1083 -0
- package/dist/built-in.d.ts +4 -0
- package/dist/built-in.d.ts.map +1 -0
- package/dist/built-in.js +19 -0
- package/dist/definition.d.ts +36 -11
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +434 -107
- package/dist/divide.d.ts.map +1 -1
- package/dist/divide.js +32 -21
- package/dist/document.d.ts +15 -6
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +961 -217
- package/dist/event.d.ts +77 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +200 -0
- package/dist/facts.d.ts +15 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +41 -0
- package/dist/fields.d.ts +3 -1
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +8 -1
- package/dist/form.d.ts +4 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +153 -0
- package/dist/house-model.d.ts +831 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +462 -0
- package/dist/house-references/crockford.d.ts +4 -0
- package/dist/house-references/crockford.d.ts.map +1 -0
- package/dist/house-references/crockford.js +3 -0
- package/dist/house-references/patterns.d.ts +9 -0
- package/dist/house-references/patterns.d.ts.map +1 -0
- package/dist/house-references/patterns.js +13 -0
- package/dist/index.d.ts +38 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -7
- package/dist/kinds.d.ts +18 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +150 -0
- package/dist/markdown.d.ts +75 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +265 -0
- package/dist/media-type.d.ts +72 -0
- package/dist/media-type.d.ts.map +1 -0
- package/dist/media-type.js +157 -0
- package/dist/paths.d.ts +20 -2
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +177 -16
- package/dist/pattern.d.ts +10 -0
- package/dist/pattern.d.ts.map +1 -0
- package/dist/pattern.js +356 -0
- package/dist/project.d.ts +1 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +61 -65
- package/dist/query/language.d.ts +254 -0
- package/dist/query/language.d.ts.map +1 -0
- package/dist/query/language.js +620 -0
- package/dist/query/match.d.ts +14 -0
- package/dist/query/match.d.ts.map +1 -0
- package/dist/query/match.js +150 -0
- package/dist/query/rows.d.ts +32 -0
- package/dist/query/rows.d.ts.map +1 -0
- package/dist/query/rows.js +161 -0
- package/dist/query/sql.d.ts +39 -0
- package/dist/query/sql.d.ts.map +1 -0
- package/dist/query/sql.js +285 -0
- package/dist/references.d.ts +1 -1
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +7 -2
- package/dist/refuse.d.ts +1 -0
- package/dist/refuse.d.ts.map +1 -1
- package/dist/refuse.js +1 -0
- package/dist/reserved.d.ts +6 -0
- package/dist/reserved.d.ts.map +1 -0
- package/dist/reserved.js +21 -0
- package/dist/room-types.d.ts +7 -0
- package/dist/room-types.d.ts.map +1 -0
- package/dist/room-types.js +137 -0
- package/dist/schema.d.ts +1 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +11 -24
- package/dist/types.d.ts +55 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +34 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +383 -142
- package/dist/yaml.d.ts +7 -3
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +110 -55
- package/fixtures/README.md +62 -25
- package/fixtures/cases/absent-link-dangles/library/item.md +1 -1
- package/fixtures/cases/absent-link-dangles/schema.yaml +2 -3
- package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
- package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
- package/fixtures/cases/absent-optional-field/schema.yaml +10 -11
- package/fixtures/cases/absolute-link/library/item.md +1 -1
- package/fixtures/cases/absolute-link/schema.yaml +2 -3
- package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
- package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
- package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
- package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
- package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
- package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
- package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
- package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
- package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
- package/fixtures/cases/binary-any-reference/expected.json +2 -1
- package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
- package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-typed-reference/expected.json +2 -1
- package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/boolean-field/expected.json +2 -1
- package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
- package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
- package/fixtures/cases/boolean-field/schema.yaml +10 -11
- package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
- package/fixtures/cases/bracketed-link-definition/schema.yaml +2 -3
- package/fixtures/cases/closed-nested-object/expected.json +2 -1
- package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
- package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
- package/fixtures/cases/closed-nested-object/schema.yaml +10 -11
- package/fixtures/cases/composed-root-reference/library/a.md +2 -2
- package/fixtures/cases/conditional-long-text/expected.json +7 -0
- package/fixtures/cases/conditional-long-text/library/questions/hosting.md +9 -0
- package/fixtures/cases/conditional-long-text/library/questions/payments.md +12 -0
- package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
- package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
- package/fixtures/cases/cross-room-link/schema.yaml +3 -0
- package/fixtures/cases/cross-room-reference/expected.json +1 -0
- package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
- package/fixtures/cases/cross-room-reference/schema.yaml +8 -0
- package/fixtures/cases/date-time-format/expected.json +2 -1
- package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
- package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
- package/fixtures/cases/date-time-format/schema.yaml +10 -11
- package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
- package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
- package/fixtures/cases/default-unfilled/schema.yaml +10 -11
- package/fixtures/cases/defs-pattern/expected.json +2 -1
- package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
- package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
- package/fixtures/cases/defs-pattern/schema.yaml +10 -11
- package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
- package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
- package/fixtures/cases/dependent-rule/schema.yaml +10 -11
- package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
- package/fixtures/cases/duplicate-link-definition/schema.yaml +2 -3
- package/fixtures/cases/email-format/expected.json +2 -1
- package/fixtures/cases/email-format/library/companies/acme.md +1 -1
- package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
- package/fixtures/cases/email-format/schema.yaml +10 -11
- package/fixtures/cases/equal-labels/expected.json +5 -0
- package/fixtures/cases/equal-labels/schema.yaml +4 -0
- package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
- package/fixtures/cases/fenced-link-definition/schema.yaml +2 -3
- package/fixtures/cases/field-enum/expected.json +2 -1
- package/fixtures/cases/field-enum/library/item.md +2 -2
- package/fixtures/cases/field-enum/schema.yaml +3 -4
- package/fixtures/cases/integer-field/expected.json +2 -1
- package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
- package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
- package/fixtures/cases/integer-field/schema.yaml +10 -11
- package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
- package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
- package/fixtures/cases/json-schema-constructs/schema.yaml +10 -11
- package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
- package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
- package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
- package/fixtures/cases/lazy-list-item/expected.json +3 -0
- package/fixtures/cases/lazy-list-item/library/item.md +10 -0
- package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
- package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
- package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
- package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
- package/fixtures/cases/list-item-enum/expected.json +7 -0
- package/fixtures/cases/list-item-enum/library/task.md +7 -0
- package/fixtures/cases/list-item-enum/schema.yaml +3 -0
- package/fixtures/cases/list-item-kind/context.json +1 -0
- package/fixtures/cases/list-item-kind/expected.json +7 -0
- package/fixtures/cases/list-item-kind/library/task.md +6 -0
- package/fixtures/cases/list-item-kind/schema.yaml +3 -0
- package/fixtures/cases/list-items/context.json +1 -0
- package/fixtures/cases/list-items/expected.json +1 -0
- package/fixtures/cases/list-items/library/page.md +26 -0
- package/fixtures/cases/list-items/schema.yaml +10 -0
- package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
- package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
- package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
- package/fixtures/cases/list-of-objects-closed/schema.yaml +10 -11
- package/fixtures/cases/list-of-objects-item/expected.json +2 -1
- package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
- package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
- package/fixtures/cases/list-of-objects-item/schema.yaml +10 -11
- package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
- package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
- package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
- package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
- package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
- package/fixtures/cases/list-reference-path/context.json +1 -0
- package/fixtures/cases/list-reference-path/expected.json +7 -0
- package/fixtures/cases/list-reference-path/library/page.md +5 -0
- package/fixtures/cases/list-reference-path/schema.yaml +3 -0
- package/fixtures/cases/list-reference-type/context.json +1 -0
- package/fixtures/cases/list-reference-type/expected.json +7 -0
- package/fixtures/cases/list-reference-type/library/page.md +6 -0
- package/fixtures/cases/list-reference-type/schema.yaml +3 -0
- package/fixtures/cases/list-size/expected.json +2 -1
- package/fixtures/cases/list-size/library/companies/acme.md +1 -1
- package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
- package/fixtures/cases/list-size/schema.yaml +10 -11
- package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
- package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
- package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
- package/fixtures/cases/malformed-list/context.json +1 -0
- package/fixtures/cases/malformed-list/expected.json +7 -0
- package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
- package/fixtures/cases/malformed-list/schema.yaml +6 -0
- package/fixtures/cases/member-document/library/people/ana.md +2 -2
- package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
- package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
- package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
- package/fixtures/cases/member-on-another-type/context.json +1 -0
- package/fixtures/cases/member-on-another-type/expected.json +6 -0
- package/fixtures/cases/member-on-another-type/library/note.md +4 -0
- package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
- package/fixtures/cases/missing-required-field/library/item.md +1 -1
- package/fixtures/cases/missing-required-field/schema.yaml +3 -4
- package/fixtures/cases/misspelled-key/expected.json +2 -1
- package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
- package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
- package/fixtures/cases/misspelled-key/schema.yaml +10 -11
- package/fixtures/cases/name-not-a-string/context.json +1 -0
- package/fixtures/cases/name-not-a-string/expected.json +5 -0
- package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
- package/fixtures/cases/nested-defs/expected.json +2 -1
- package/fixtures/cases/nested-defs/library/deal.md +3 -3
- package/fixtures/cases/nested-object-reference/expected.json +2 -1
- package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
- package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
- package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
- package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
- package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
- package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
- package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
- package/fixtures/cases/nested-reference/library/products/support.md +1 -1
- package/fixtures/cases/nested-required-field/expected.json +2 -1
- package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
- package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
- package/fixtures/cases/nested-required-field/schema.yaml +10 -11
- package/fixtures/cases/numeric-range/expected.json +2 -1
- package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
- package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
- package/fixtures/cases/numeric-range/schema.yaml +10 -11
- package/fixtures/cases/one-key-two-labels/context.json +1 -0
- package/fixtures/cases/one-key-two-labels/expected.json +5 -0
- package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
- package/fixtures/cases/one-key-two-types/context.json +1 -0
- package/fixtures/cases/one-key-two-types/expected.json +5 -0
- package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
- package/fixtures/cases/one-of-variant/expected.json +2 -1
- package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
- package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
- package/fixtures/cases/one-of-variant/schema.yaml +10 -11
- package/fixtures/cases/other-room-reference/expected.json +2 -1
- package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
- package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
- package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
- package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
- package/fixtures/cases/prototype-field/expected.json +2 -1
- package/fixtures/cases/prototype-field/library/item.md +2 -2
- package/fixtures/cases/prototype-field/schema.yaml +2 -3
- package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
- package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
- package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
- package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
- package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
- package/fixtures/cases/referenced-missing-file/schema.yaml +3 -4
- package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
- package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
- package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
- package/fixtures/cases/sections-keyword-refused/context.json +1 -0
- package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
- package/fixtures/cases/{structured-section → sections-keyword-refused}/schema.yaml +1 -2
- package/fixtures/cases/shortcut-reference-link/library/item.md +1 -1
- package/fixtures/cases/shortcut-reference-link/schema.yaml +2 -3
- package/fixtures/cases/string-length/expected.json +2 -1
- package/fixtures/cases/string-length/library/companies/acme.md +1 -1
- package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
- package/fixtures/cases/string-length/schema.yaml +10 -11
- package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
- package/fixtures/cases/text-field-kind/expected.json +1 -4
- package/fixtures/cases/text-field-kind/library/page.md +1 -1
- package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
- package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
- package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
- package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
- package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
- package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
- package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
- package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
- package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
- package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
- package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
- package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
- package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
- package/fixtures/cases/undeclared-field/expected.json +2 -1
- package/fixtures/cases/undeclared-field/library/item.md +2 -2
- package/fixtures/cases/undeclared-field/schema.yaml +2 -3
- package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
- package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
- package/fixtures/cases/unresolved-link/library/item.md +1 -1
- package/fixtures/cases/unresolved-link/schema.yaml +2 -3
- package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
- package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
- package/fixtures/cases/valid-typed-document/schema.yaml +5 -6
- package/fixtures/division.json +111 -66
- package/fixtures/forms.json +347 -0
- package/fixtures/preamble.json +26 -5
- package/fixtures/projection.json +121 -18
- package/fixtures/queries.json +964 -0
- package/package.json +19 -3
- package/dist/blocks.d.ts +0 -11
- package/dist/blocks.d.ts.map +0 -1
- package/dist/blocks.js +0 -62
- package/dist/condition.d.ts +0 -149
- package/dist/condition.d.ts.map +0 -1
- package/dist/condition.js +0 -497
- package/dist/links.d.ts +0 -26
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js +0 -774
- package/dist/profile.d.ts +0 -6
- package/dist/profile.d.ts.map +0 -1
- package/dist/profile.js +0 -5
- package/dist/sections.d.ts +0 -11
- package/dist/sections.d.ts.map +0 -1
- package/dist/sections.js +0 -57
- package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
- package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
- package/fixtures/cases/null-refused/expected.json +0 -6
- package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
- package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
- package/fixtures/cases/null-refused/schema.yaml +0 -56
- package/fixtures/cases/open-map-value/expected.json +0 -6
- package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
- package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
- package/fixtures/cases/open-map-value/schema.yaml +0 -56
- package/fixtures/cases/section-item-enum/expected.json +0 -6
- package/fixtures/cases/section-item-enum/library/task.md +0 -8
- package/fixtures/cases/section-item-enum/schema.yaml +0 -3
- package/fixtures/cases/section-item-kind/expected.json +0 -6
- package/fixtures/cases/section-item-kind/library/task.md +0 -8
- package/fixtures/cases/section-item-kind/schema.yaml +0 -3
- package/fixtures/cases/section-items/library/page.md +0 -42
- package/fixtures/cases/section-items/schema.yaml +0 -10
- package/fixtures/cases/section-reference-path/expected.json +0 -6
- package/fixtures/cases/section-reference-path/library/page.md +0 -7
- package/fixtures/cases/section-reference-path/schema.yaml +0 -3
- package/fixtures/cases/section-reference-type/expected.json +0 -6
- package/fixtures/cases/section-reference-type/library/page.md +0 -7
- package/fixtures/cases/section-reference-type/schema.yaml +0 -3
- package/fixtures/cases/structured-section/expected.json +0 -6
- /package/fixtures/cases/{missing-section-item-kind → conditional-long-text}/context.json +0 -0
- /package/fixtures/cases/{null-refused → cross-room-link}/context.json +0 -0
- /package/fixtures/cases/{section-items → cross-room-link}/expected.json +0 -0
- /package/fixtures/cases/{open-map-value → cross-room-reference}/context.json +0 -0
- /package/fixtures/cases/{section-item-enum → equal-labels}/context.json +0 -0
- /package/fixtures/cases/{section-item-kind → labels-in-the-rooms-language}/context.json +0 -0
- /package/fixtures/cases/{section-items → lazy-list-item}/context.json +0 -0
- /package/fixtures/cases/{section-reference-type → link-into-a-reserved-name}/context.json +0 -0
- /package/fixtures/cases/{section-reference-path → link-into-a-reserved-name-from-an-untyped-document}/context.json +0 -0
- /package/fixtures/cases/{structured-section → list-item-enum}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
- /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
- /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
package/dist/profile.d.ts
DELETED
package/dist/profile.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../src/profile.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;aAClC,IAAI,EAAE,0BAA0B;aAChC,IAAI,EAAE,MAAM;aACZ,GAAG,EAAE,gCAAgC;CAC7B,CAAC"}
|
package/dist/profile.js
DELETED
package/dist/sections.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Extent } from './types.js';
|
|
2
|
-
export type SectionSpan = {
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly headingStart: number;
|
|
5
|
-
readonly bodyStart: number;
|
|
6
|
-
readonly bodyEnd: number;
|
|
7
|
-
};
|
|
8
|
-
export declare function headingSpans(content: string, bodyStart: number): SectionSpan[];
|
|
9
|
-
export declare function sectionsRecord(spans: readonly SectionSpan[], content: string): Record<string, string>;
|
|
10
|
-
export declare function listItems(content: string, from: number, to: number): Extent[] | null;
|
|
11
|
-
//# sourceMappingURL=sections.d.ts.map
|
package/dist/sections.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../src/sections.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAIF,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE,CAc9E;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AASD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAoBpF"}
|
package/dist/sections.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { headingLines } from './blocks.js';
|
|
2
|
-
const ITEM = /^([ \t]*)([-*+]|\d+[.)])[ \t]+/;
|
|
3
|
-
export function headingSpans(content, bodyStart) {
|
|
4
|
-
const found = [];
|
|
5
|
-
for (const heading of headingLines(content, bodyStart, content.length)) {
|
|
6
|
-
if (heading.level !== 2)
|
|
7
|
-
continue;
|
|
8
|
-
if (found.length > 0)
|
|
9
|
-
found[found.length - 1] = { ...found[found.length - 1], bodyEnd: heading.start };
|
|
10
|
-
found.push({
|
|
11
|
-
name: heading.name,
|
|
12
|
-
headingStart: heading.start,
|
|
13
|
-
bodyStart: heading.next,
|
|
14
|
-
bodyEnd: content.length,
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return found;
|
|
18
|
-
}
|
|
19
|
-
export function sectionsRecord(spans, content) {
|
|
20
|
-
const record = Object.create(null);
|
|
21
|
-
for (const span of spans) {
|
|
22
|
-
if (record[span.name] === undefined)
|
|
23
|
-
record[span.name] = content.slice(span.bodyStart, span.bodyEnd);
|
|
24
|
-
}
|
|
25
|
-
return record;
|
|
26
|
-
}
|
|
27
|
-
function trimmed(content, extent) {
|
|
28
|
-
let { start, end } = extent;
|
|
29
|
-
while (start < end && /\s/.test(content[start]))
|
|
30
|
-
start += 1;
|
|
31
|
-
while (end > start && /\s/.test(content[end - 1]))
|
|
32
|
-
end -= 1;
|
|
33
|
-
return { start, end };
|
|
34
|
-
}
|
|
35
|
-
export function listItems(content, from, to) {
|
|
36
|
-
const items = [];
|
|
37
|
-
let indent;
|
|
38
|
-
let start = from;
|
|
39
|
-
while (start < to) {
|
|
40
|
-
const newline = content.indexOf('\n', start);
|
|
41
|
-
const end = newline === -1 || newline >= to ? to : newline;
|
|
42
|
-
const line = content.slice(start, end);
|
|
43
|
-
start = end + 1;
|
|
44
|
-
if (line.trim() === '')
|
|
45
|
-
continue;
|
|
46
|
-
const item = ITEM.exec(line);
|
|
47
|
-
if (item !== null && (indent === undefined || item[1].length === indent)) {
|
|
48
|
-
indent = item[1].length;
|
|
49
|
-
items.push({ start: end - line.length + item[0].length, end });
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
if (indent === undefined || /^\s*/.exec(line)[0].length <= indent)
|
|
53
|
-
return null;
|
|
54
|
-
items[items.length - 1] = { start: items.at(-1).start, end };
|
|
55
|
-
}
|
|
56
|
-
return items.map((item) => trimmed(content, item));
|
|
57
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: deal
|
|
3
|
-
title: null
|
|
4
|
-
company: ../companies/acme.md
|
|
5
|
-
stage: won
|
|
6
|
-
amount: 1200
|
|
7
|
-
probability: 0.5
|
|
8
|
-
open: false
|
|
9
|
-
closes_at: 2026-10-10T09:30:00Z
|
|
10
|
-
contact_email: ana@example.com
|
|
11
|
-
note: null
|
|
12
|
-
shipping:
|
|
13
|
-
city: Paris
|
|
14
|
-
country: FR
|
|
15
|
-
tags: [renewal, priority]
|
|
16
|
-
lines:
|
|
17
|
-
- product: seats
|
|
18
|
-
quantity: 10
|
|
19
|
-
- product: support
|
|
20
|
-
quantity: 1
|
|
21
|
-
blocks:
|
|
22
|
-
- kind: paragraph
|
|
23
|
-
text: Signed.
|
|
24
|
-
- { kind: quiz, question: Renew next year? }
|
|
25
|
-
attributes:
|
|
26
|
-
region: emea
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Description
|
|
30
|
-
|
|
31
|
-
The yearly renewal.
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
$defs:
|
|
2
|
-
address:
|
|
3
|
-
type: object
|
|
4
|
-
properties:
|
|
5
|
-
city: { type: string }
|
|
6
|
-
country: { type: string, pattern: '^[A-Z]{2}$' }
|
|
7
|
-
required: [city]
|
|
8
|
-
company:
|
|
9
|
-
properties:
|
|
10
|
-
name: { type: string }
|
|
11
|
-
deal:
|
|
12
|
-
type: object
|
|
13
|
-
properties:
|
|
14
|
-
title: { type: string, minLength: 1, maxLength: 40 }
|
|
15
|
-
company: { type: string, reference: company }
|
|
16
|
-
stage: { enum: [lead, proposal, won, lost], default: lead }
|
|
17
|
-
amount: { type: integer, minimum: 0 }
|
|
18
|
-
probability: { type: number, minimum: 0, maximum: 1 }
|
|
19
|
-
open: { type: boolean }
|
|
20
|
-
closes_at: { type: string, format: date-time }
|
|
21
|
-
contact_email: { type: string, format: email }
|
|
22
|
-
note: { type: [string, 'null'] }
|
|
23
|
-
shipping: { $ref: '#/$defs/address' }
|
|
24
|
-
tags: { type: array, items: { type: string }, maxItems: 3 }
|
|
25
|
-
lines:
|
|
26
|
-
type: array
|
|
27
|
-
items:
|
|
28
|
-
type: object
|
|
29
|
-
properties:
|
|
30
|
-
product: { type: string }
|
|
31
|
-
quantity: { type: integer, minimum: 1 }
|
|
32
|
-
required: [product, quantity]
|
|
33
|
-
blocks:
|
|
34
|
-
type: array
|
|
35
|
-
items:
|
|
36
|
-
oneOf:
|
|
37
|
-
- properties:
|
|
38
|
-
kind: { const: paragraph }
|
|
39
|
-
text: { type: string }
|
|
40
|
-
required: [kind, text]
|
|
41
|
-
- properties:
|
|
42
|
-
kind: { const: quiz }
|
|
43
|
-
question: { type: string }
|
|
44
|
-
required: [kind, question]
|
|
45
|
-
attributes:
|
|
46
|
-
type: object
|
|
47
|
-
additionalProperties: { type: string }
|
|
48
|
-
required: [title, company, stage]
|
|
49
|
-
if:
|
|
50
|
-
properties:
|
|
51
|
-
stage: { const: won }
|
|
52
|
-
required: [stage]
|
|
53
|
-
then:
|
|
54
|
-
required: [amount]
|
|
55
|
-
sections:
|
|
56
|
-
Description: { kind: text }
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: deal
|
|
3
|
-
title: Renewal
|
|
4
|
-
company: ../companies/acme.md
|
|
5
|
-
stage: won
|
|
6
|
-
amount: 1200
|
|
7
|
-
probability: 0.5
|
|
8
|
-
open: false
|
|
9
|
-
closes_at: 2026-10-10T09:30:00Z
|
|
10
|
-
contact_email: ana@example.com
|
|
11
|
-
note: null
|
|
12
|
-
shipping:
|
|
13
|
-
city: Paris
|
|
14
|
-
country: FR
|
|
15
|
-
tags: [renewal, priority]
|
|
16
|
-
lines:
|
|
17
|
-
- product: seats
|
|
18
|
-
quantity: 10
|
|
19
|
-
- product: support
|
|
20
|
-
quantity: 1
|
|
21
|
-
blocks:
|
|
22
|
-
- kind: paragraph
|
|
23
|
-
text: Signed.
|
|
24
|
-
- { kind: quiz, question: Renew next year? }
|
|
25
|
-
attributes:
|
|
26
|
-
region: 3
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Description
|
|
30
|
-
|
|
31
|
-
The yearly renewal.
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
$defs:
|
|
2
|
-
address:
|
|
3
|
-
type: object
|
|
4
|
-
properties:
|
|
5
|
-
city: { type: string }
|
|
6
|
-
country: { type: string, pattern: '^[A-Z]{2}$' }
|
|
7
|
-
required: [city]
|
|
8
|
-
company:
|
|
9
|
-
properties:
|
|
10
|
-
name: { type: string }
|
|
11
|
-
deal:
|
|
12
|
-
type: object
|
|
13
|
-
properties:
|
|
14
|
-
title: { type: string, minLength: 1, maxLength: 40 }
|
|
15
|
-
company: { type: string, reference: company }
|
|
16
|
-
stage: { enum: [lead, proposal, won, lost], default: lead }
|
|
17
|
-
amount: { type: integer, minimum: 0 }
|
|
18
|
-
probability: { type: number, minimum: 0, maximum: 1 }
|
|
19
|
-
open: { type: boolean }
|
|
20
|
-
closes_at: { type: string, format: date-time }
|
|
21
|
-
contact_email: { type: string, format: email }
|
|
22
|
-
note: { type: [string, 'null'] }
|
|
23
|
-
shipping: { $ref: '#/$defs/address' }
|
|
24
|
-
tags: { type: array, items: { type: string }, maxItems: 3 }
|
|
25
|
-
lines:
|
|
26
|
-
type: array
|
|
27
|
-
items:
|
|
28
|
-
type: object
|
|
29
|
-
properties:
|
|
30
|
-
product: { type: string }
|
|
31
|
-
quantity: { type: integer, minimum: 1 }
|
|
32
|
-
required: [product, quantity]
|
|
33
|
-
blocks:
|
|
34
|
-
type: array
|
|
35
|
-
items:
|
|
36
|
-
oneOf:
|
|
37
|
-
- properties:
|
|
38
|
-
kind: { const: paragraph }
|
|
39
|
-
text: { type: string }
|
|
40
|
-
required: [kind, text]
|
|
41
|
-
- properties:
|
|
42
|
-
kind: { const: quiz }
|
|
43
|
-
question: { type: string }
|
|
44
|
-
required: [kind, question]
|
|
45
|
-
attributes:
|
|
46
|
-
type: object
|
|
47
|
-
additionalProperties: { type: string }
|
|
48
|
-
required: [title, company, stage]
|
|
49
|
-
if:
|
|
50
|
-
properties:
|
|
51
|
-
stage: { const: won }
|
|
52
|
-
required: [stage]
|
|
53
|
-
then:
|
|
54
|
-
required: [amount]
|
|
55
|
-
sections:
|
|
56
|
-
Description: { kind: text }
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: page
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
[self]: page.md
|
|
6
|
-
|
|
7
|
-
## Estimates
|
|
8
|
-
|
|
9
|
-
- 3
|
|
10
|
-
- -1.5
|
|
11
|
-
|
|
12
|
-
## Counts
|
|
13
|
-
|
|
14
|
-
- 2
|
|
15
|
-
- 0
|
|
16
|
-
|
|
17
|
-
## Flags
|
|
18
|
-
|
|
19
|
-
- true
|
|
20
|
-
- false
|
|
21
|
-
|
|
22
|
-
## Dates
|
|
23
|
-
|
|
24
|
-
- 2026-10-06
|
|
25
|
-
|
|
26
|
-
## Stages
|
|
27
|
-
|
|
28
|
-
- draft
|
|
29
|
-
- done
|
|
30
|
-
|
|
31
|
-
## Related
|
|
32
|
-
|
|
33
|
-
- [the other page](other.md)
|
|
34
|
-
- [this page][self]
|
|
35
|
-
|
|
36
|
-
## Notes
|
|
37
|
-
|
|
38
|
-
- any text, [a link](other.md) included
|
|
39
|
-
|
|
40
|
-
## Summary
|
|
41
|
-
|
|
42
|
-
Free text with *emphasis*.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
page:
|
|
2
|
-
sections:
|
|
3
|
-
Estimates: { kind: list, items: { type: number } }
|
|
4
|
-
Counts: { kind: list, items: { type: integer } }
|
|
5
|
-
Flags: { kind: list, items: { type: boolean } }
|
|
6
|
-
Dates: { kind: list, items: { type: string, format: date } }
|
|
7
|
-
Stages: { kind: list, items: { enum: [draft, done] } }
|
|
8
|
-
Related: { kind: list, items: { type: string, reference: page } }
|
|
9
|
-
Notes: { kind: list, items: { type: string } }
|
|
10
|
-
Summary: { kind: text }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|