@agentshouse/mdmodel 0.1.0-ca34cd330fc15 → 0.1.0-ca3c1be3cd1a3
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 +227 -162
- package/README.md +28 -25
- 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 +24 -11
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +188 -128
- package/dist/divide.d.ts.map +1 -1
- package/dist/divide.js +5 -4
- package/dist/document.d.ts +14 -8
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +729 -135
- 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 +1 -1
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +2 -2
- 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 +870 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +472 -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 +42 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -9
- package/dist/indexed.d.ts +9 -0
- package/dist/indexed.d.ts.map +1 -0
- package/dist/indexed.js +55 -0
- package/dist/kinds.d.ts +20 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +199 -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/moment.d.ts +7 -0
- package/dist/moment.d.ts.map +1 -0
- package/dist/moment.js +18 -0
- package/dist/not-ready.d.ts +2 -0
- package/dist/not-ready.d.ts.map +1 -0
- package/dist/not-ready.js +5 -0
- package/dist/paths.d.ts +15 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +88 -19
- package/dist/pattern.d.ts.map +1 -1
- package/dist/pattern.js +4 -3
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +33 -60
- 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 +158 -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 +2 -2
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +1 -1
- 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 +136 -0
- package/dist/schema.d.ts +1 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +9 -73
- package/dist/types.d.ts +22 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +12 -6
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +217 -179
- package/dist/yaml.d.ts +4 -4
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +5 -12
- 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-section → conditional-long-text}/expected.json +3 -2
- package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/hosting.md +2 -2
- package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/payments.md +2 -2
- package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
- package/fixtures/cases/cross-room-link/library/clients/acme.md +1 -1
- package/fixtures/cases/cross-room-reference/library/clients/acme.md +4 -4
- package/fixtures/cases/cross-room-reference/schema.yaml +1 -2
- 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/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/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/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/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-another-type/library/note.md +1 -1
- 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 +86 -41
- package/fixtures/forms.json +347 -0
- package/fixtures/preamble.json +26 -5
- package/fixtures/projection.json +121 -18
- package/fixtures/queries.json +1150 -0
- package/package.json +10 -1
- package/dist/blocks.d.ts +0 -11
- package/dist/blocks.d.ts.map +0 -1
- package/dist/blocks.js +0 -91
- package/dist/condition.d.ts +0 -181
- package/dist/condition.d.ts.map +0 -1
- package/dist/condition.js +0 -633
- package/dist/links.d.ts +0 -29
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js +0 -831
- 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/conditional-section/schema.yaml +0 -14
- 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/{conditional-section → conditional-long-text}/context.json +0 -0
- /package/fixtures/cases/{missing-section-item-kind → equal-labels}/context.json +0 -0
- /package/fixtures/cases/{null-refused → labels-in-the-rooms-language}/context.json +0 -0
- /package/fixtures/cases/{section-items → labels-in-the-rooms-language}/expected.json +0 -0
- /package/fixtures/cases/{open-map-value → lazy-list-item}/context.json +0 -0
- /package/fixtures/cases/{section-item-kind → link-into-a-reserved-name}/context.json +0 -0
- /package/fixtures/cases/{section-item-enum → link-into-a-reserved-name-from-an-untyped-document}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-item-enum}/context.json +0 -0
- /package/fixtures/cases/{section-reference-path → list-item-kind}/context.json +0 -0
- /package/fixtures/cases/{section-reference-type → list-items}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
- /package/fixtures/cases/{structured-section → list-reference-path}/context.json +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/paths.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { decodeNamedCharacterReference } from 'decode-named-character-reference';
|
|
2
2
|
import { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';
|
|
3
|
-
|
|
3
|
+
const BACKSLASH = 0x5c;
|
|
4
|
+
const PUNCTUATION = /^[!-/:-@[-`{-~]$/;
|
|
5
|
+
function escapes(text, index) {
|
|
6
|
+
return text.charCodeAt(index) === BACKSLASH && PUNCTUATION.test(text[index + 1] ?? '');
|
|
7
|
+
}
|
|
4
8
|
export function dirname(path) {
|
|
5
9
|
const index = path.lastIndexOf('/');
|
|
6
10
|
return index === -1 ? '' : path.slice(0, index);
|
|
@@ -43,19 +47,23 @@ function referenceAt(text, at) {
|
|
|
43
47
|
end,
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
|
-
function
|
|
47
|
-
let
|
|
48
|
-
let i =
|
|
50
|
+
function spelled(written, from, stops) {
|
|
51
|
+
let text = '';
|
|
52
|
+
let i = from;
|
|
49
53
|
while (i < written.length) {
|
|
50
54
|
const escaped = escapes(written, i);
|
|
51
55
|
const reference = escaped || written[i] !== '&' ? null : referenceAt(written, i);
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
return {
|
|
55
|
-
|
|
56
|
+
const one = escaped ? written[i + 1] : (reference?.text ?? written[i]);
|
|
57
|
+
if (stops && (one.startsWith('?') || one.startsWith('#')))
|
|
58
|
+
return { text, end: i };
|
|
59
|
+
text += one;
|
|
56
60
|
i = escaped ? i + 2 : (reference?.end ?? i + 1);
|
|
57
61
|
}
|
|
58
|
-
return {
|
|
62
|
+
return { text, end: written.length };
|
|
63
|
+
}
|
|
64
|
+
function unescaped(written) {
|
|
65
|
+
const { text, end } = spelled(written, 0, true);
|
|
66
|
+
return { base: text, suffix: end };
|
|
59
67
|
}
|
|
60
68
|
function located(href) {
|
|
61
69
|
const written = href.trim();
|
|
@@ -107,18 +115,22 @@ function written(path) {
|
|
|
107
115
|
}
|
|
108
116
|
return text;
|
|
109
117
|
}
|
|
110
|
-
function
|
|
118
|
+
function roomAt(path) {
|
|
111
119
|
if (!path.startsWith(SHELL_ROOMS))
|
|
112
120
|
return null;
|
|
113
121
|
const rest = path.slice(SHELL_ROOMS.length);
|
|
114
122
|
const slash = rest.indexOf('/');
|
|
115
|
-
const handle = rest.slice(0, slash);
|
|
116
|
-
if (
|
|
123
|
+
const handle = slash === -1 ? rest : rest.slice(0, slash);
|
|
124
|
+
if (handle === '' || handle === '.' || handle === '..')
|
|
117
125
|
return null;
|
|
118
|
-
const within = normalize(rest.slice(slash + 1));
|
|
119
|
-
return within === null
|
|
126
|
+
const within = normalize(slash === -1 ? '' : rest.slice(slash + 1));
|
|
127
|
+
return within === null ? null : { handle, path: within };
|
|
120
128
|
}
|
|
121
|
-
|
|
129
|
+
function roomTargetOf(path) {
|
|
130
|
+
const room = roomAt(path);
|
|
131
|
+
return room === null || room.path === '' ? null : room;
|
|
132
|
+
}
|
|
133
|
+
function resolvedOf(from, href) {
|
|
122
134
|
const base = located(href).base;
|
|
123
135
|
if (base === '')
|
|
124
136
|
return { kind: 'skip' };
|
|
@@ -128,13 +140,15 @@ export function classifyHref(from, href) {
|
|
|
128
140
|
if (path === null)
|
|
129
141
|
return { kind: 'invalid' };
|
|
130
142
|
if (path.startsWith('/')) {
|
|
131
|
-
const room =
|
|
143
|
+
const room = roomAt(path);
|
|
132
144
|
return room === null ? { kind: 'invalid' } : { kind: 'room', ...room };
|
|
133
145
|
}
|
|
134
146
|
const resolved = normalize(join(dirname(from), path));
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
147
|
+
return resolved === null ? { kind: 'invalid' } : { kind: 'path', path: resolved };
|
|
148
|
+
}
|
|
149
|
+
export function classifyHref(from, href) {
|
|
150
|
+
const resolved = resolvedOf(from, href);
|
|
151
|
+
return 'path' in resolved && resolved.path === '' ? { kind: 'invalid' } : resolved;
|
|
138
152
|
}
|
|
139
153
|
export function roomTarget(href) {
|
|
140
154
|
const path = destinationPath(href);
|
|
@@ -148,6 +162,34 @@ export function target(from, href) {
|
|
|
148
162
|
const resolved = classifyHref(from, href);
|
|
149
163
|
return resolved.kind === 'path' ? resolved.path : null;
|
|
150
164
|
}
|
|
165
|
+
export function linkedPath(from, href) {
|
|
166
|
+
const resolved = located(href).base === '' ? { kind: 'path', path: from } : resolvedOf(from, href);
|
|
167
|
+
if (!('path' in resolved))
|
|
168
|
+
return null;
|
|
169
|
+
const written = href.trim();
|
|
170
|
+
const suffix = spelled(written, unescaped(written).suffix, false).text;
|
|
171
|
+
const hash = suffix.indexOf('#');
|
|
172
|
+
const fragment = hash === -1 ? '' : suffix.slice(hash + 1);
|
|
173
|
+
return {
|
|
174
|
+
handle: resolved.kind === 'room' ? resolved.handle : null,
|
|
175
|
+
path: resolved.path,
|
|
176
|
+
fragment: fragment === '' ? null : (decodedRun(fragment) ?? fragment),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
const LINK_KEY = /^\?key=([A-Za-z0-9._~-]+)(?:#|$)/u;
|
|
180
|
+
export function keyedLink(href) {
|
|
181
|
+
const written = href.trim();
|
|
182
|
+
if (!written.includes('?') && !written.includes('&'))
|
|
183
|
+
return null;
|
|
184
|
+
const key = LINK_KEY.exec(spelled(written, unescaped(written).suffix, false).text)?.[1];
|
|
185
|
+
if (key === undefined)
|
|
186
|
+
return null;
|
|
187
|
+
const room = roomTarget(href);
|
|
188
|
+
return room === null ? null : { ...room, key };
|
|
189
|
+
}
|
|
190
|
+
export function keyedDestination(path, key) {
|
|
191
|
+
return `${written(path)}?key=${key}`;
|
|
192
|
+
}
|
|
151
193
|
export function retarget(href, to) {
|
|
152
194
|
const trimmed = href.trim();
|
|
153
195
|
return written(to) + trimmed.slice(unescaped(trimmed).suffix);
|
|
@@ -173,3 +215,30 @@ export function shellTarget(href, handle) {
|
|
|
173
215
|
const path = normalize(decoded.slice(prefix.length));
|
|
174
216
|
return path === null || path === '' ? null : path;
|
|
175
217
|
}
|
|
218
|
+
function fitsBare(to) {
|
|
219
|
+
if (to === '' || to.startsWith('<'))
|
|
220
|
+
return false;
|
|
221
|
+
let depth = 0;
|
|
222
|
+
for (const character of to) {
|
|
223
|
+
if (/[\s\u0000-\u001f\u007f]/.test(character))
|
|
224
|
+
return false;
|
|
225
|
+
if (character === '(')
|
|
226
|
+
depth += 1;
|
|
227
|
+
else if (character === ')') {
|
|
228
|
+
if (depth === 0)
|
|
229
|
+
return false;
|
|
230
|
+
depth -= 1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return depth === 0;
|
|
234
|
+
}
|
|
235
|
+
function fitsBrackets(to) {
|
|
236
|
+
return to !== '' && !/[<>\n\r]/.test(to);
|
|
237
|
+
}
|
|
238
|
+
export function destinationText(to, bracketed) {
|
|
239
|
+
if (fitsBare(to))
|
|
240
|
+
return bracketed && fitsBrackets(to) ? `<${to}>` : to;
|
|
241
|
+
if (fitsBrackets(to))
|
|
242
|
+
return `<${to}>`;
|
|
243
|
+
return null;
|
|
244
|
+
}
|
package/dist/pattern.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../src/pattern.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,OAAQ,CAAC;AAMpC,qBAAa,gBAAiB,SAAQ,KAAK;CAAG;AAQ9C,MAAM,MAAM,OAAO,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../src/pattern.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,OAAQ,CAAC;AAMpC,qBAAa,gBAAiB,SAAQ,KAAK;CAAG;AAQ9C,MAAM,MAAM,OAAO,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAAE,CAAC;AAkUnE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAM5D;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAkBnD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,IAAI,CAM9C"}
|
package/dist/pattern.js
CHANGED
|
@@ -262,10 +262,11 @@ class Linear {
|
|
|
262
262
|
const marks = this.marks;
|
|
263
263
|
const budget = scope ?? { left: VISIT_BUDGET };
|
|
264
264
|
let seeds = [];
|
|
265
|
-
let
|
|
265
|
+
let wordBefore = false;
|
|
266
266
|
for (let at = 0;;) {
|
|
267
267
|
const point = at < text.length ? text.codePointAt(at) : -1;
|
|
268
|
-
const
|
|
268
|
+
const wordAt = word(point);
|
|
269
|
+
const across = wordBefore !== wordAt;
|
|
269
270
|
const generation = (this.generation += 1);
|
|
270
271
|
const active = [];
|
|
271
272
|
seeds.push(this.start);
|
|
@@ -291,7 +292,7 @@ class Linear {
|
|
|
291
292
|
for (const state of active)
|
|
292
293
|
if (atoms[alternates[state]].holds(point))
|
|
293
294
|
seeds.push(outs[state]);
|
|
294
|
-
|
|
295
|
+
wordBefore = wordAt;
|
|
295
296
|
at += point > 0xffff ? 2 : 1;
|
|
296
297
|
}
|
|
297
298
|
}
|
package/dist/project.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG3F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC;AAEzB,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAqCtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3E;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,MAAM,CAWxF;AAOD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,iBAAiB,GACzB,WAAW,CA4Bb;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAA2C,GACnD,UAAU,CAMZ"}
|
package/dist/project.js
CHANGED
|
@@ -1,42 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { roomTarget, target } from './paths.js';
|
|
1
|
+
import { bodyWith, readingOf } from './document.js';
|
|
2
|
+
import { classifyHref } from './paths.js';
|
|
4
3
|
import { refusal } from './refuse.js';
|
|
5
|
-
import { headingSpans } from './sections.js';
|
|
6
4
|
import { bodyStartOf } from './yaml.js';
|
|
7
|
-
function internalEdits(content,
|
|
5
|
+
function internalEdits(content, reading, file, documentTargets) {
|
|
8
6
|
const internal = new Set();
|
|
9
|
-
const uses =
|
|
7
|
+
const uses = reading.uses
|
|
10
8
|
.filter((use) => {
|
|
11
|
-
const resolved =
|
|
12
|
-
return resolved ===
|
|
13
|
-
? roomTarget(use.destination.href) !== null
|
|
14
|
-
: documentTargets.has(resolved);
|
|
9
|
+
const resolved = classifyHref(file, use.destination.href);
|
|
10
|
+
return (resolved.kind === 'room' || (resolved.kind === 'path' && documentTargets.has(resolved.path)));
|
|
15
11
|
})
|
|
16
12
|
.sort((left, right) => left.start - right.start);
|
|
17
13
|
const edits = [];
|
|
18
14
|
for (let index = uses.length - 1; index >= 0; index -= 1) {
|
|
19
15
|
const use = uses[index];
|
|
20
16
|
internal.add(use.destination.start);
|
|
21
|
-
const label = { start:
|
|
17
|
+
const label = { start: use.labelStart, end: use.labelEnd };
|
|
22
18
|
const inner = [];
|
|
23
19
|
for (let nested = index + 1; nested < uses.length; nested += 1) {
|
|
24
20
|
const edit = edits[uses.length - 1 - nested];
|
|
25
21
|
if (edit.start >= label.end)
|
|
26
22
|
break;
|
|
27
|
-
if (edit.
|
|
23
|
+
if (edit.end <= label.end)
|
|
28
24
|
inner.push(edit);
|
|
29
25
|
}
|
|
30
|
-
edits.push({
|
|
31
|
-
start: bodyStart + use.start,
|
|
32
|
-
end: bodyStart + use.end,
|
|
33
|
-
text: rangeText(content, label, inner),
|
|
34
|
-
});
|
|
26
|
+
edits.push({ start: use.start, end: use.end, text: rangeText(content, label, inner) });
|
|
35
27
|
}
|
|
36
|
-
for (const block of
|
|
28
|
+
for (const block of reading.definitions) {
|
|
37
29
|
if (!internal.has(block.destination.start))
|
|
38
30
|
continue;
|
|
39
|
-
edits.push({ start:
|
|
31
|
+
edits.push({ start: block.start, end: block.end, text: '' });
|
|
40
32
|
}
|
|
41
33
|
return edits.sort((left, right) => left.start - right.start);
|
|
42
34
|
}
|
|
@@ -66,57 +58,38 @@ export function rangeText(content, range, edits) {
|
|
|
66
58
|
}
|
|
67
59
|
return text + content.slice(cursor, range.end);
|
|
68
60
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
function proseValues(node, facts, values) {
|
|
73
|
-
if (facts === undefined)
|
|
74
|
-
return;
|
|
75
|
-
if (node.kind === 'scalar') {
|
|
76
|
-
if (facts.prose && typeof node.value === 'string')
|
|
77
|
-
values.push({ start: node.start, end: node.end, text: `${node.value}\n\n` });
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (node.kind === 'seq') {
|
|
81
|
-
for (const item of node.items)
|
|
82
|
-
proseValues(item, facts.items, values);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
for (const entry of node.entries)
|
|
86
|
-
proseValues(entry.value, memberFacts(facts, entry.key), values);
|
|
87
|
-
}
|
|
88
|
-
function freeTextValues(definition, document) {
|
|
89
|
-
const root = frontmatter(document);
|
|
90
|
-
if (root === null)
|
|
91
|
-
return [];
|
|
92
|
-
const values = [];
|
|
93
|
-
proseValues(root, definition.frontmatter, values);
|
|
94
|
-
return values;
|
|
61
|
+
function linked(edits, range) {
|
|
62
|
+
const at = firstEditFrom(edits, range.start);
|
|
63
|
+
return at < edits.length && edits[at].start < range.end;
|
|
95
64
|
}
|
|
96
65
|
export function projectionInput(document, file, context) {
|
|
97
66
|
const content = document.content;
|
|
98
67
|
const bodyStart = bodyStartOf(content);
|
|
99
|
-
const
|
|
68
|
+
const reading = readingOf(document);
|
|
69
|
+
const edits = internalEdits(content, reading, file, new Set(context.documentTargets));
|
|
100
70
|
const declared = document.type;
|
|
101
|
-
|
|
71
|
+
const definition = context.definition;
|
|
72
|
+
if (definition === undefined && declared !== undefined && declared !== 'any')
|
|
73
|
+
return { ok: false, refusal: refusal(file, 'unknown-type') };
|
|
74
|
+
const body = definition === undefined ? null : bodyWith(document, definition);
|
|
75
|
+
if (body === null || !('top' in body)) {
|
|
102
76
|
return {
|
|
103
77
|
ok: true,
|
|
104
78
|
input: { values: [], ranges: [{ start: bodyStart, end: content.length }], edits },
|
|
105
79
|
};
|
|
106
80
|
}
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
return { ok: true, input: { values: freeTextValues(definition, document), ranges, edits } };
|
|
81
|
+
const values = body.prose
|
|
82
|
+
.filter((one) => !one.markdown)
|
|
83
|
+
.map((one) => ({
|
|
84
|
+
start: one.start,
|
|
85
|
+
end: one.end,
|
|
86
|
+
text: `${linked(edits, one) ? rangeText(content, one, edits) : one.text}\n\n`,
|
|
87
|
+
}));
|
|
88
|
+
const ranges = [
|
|
89
|
+
...body.prose.filter((one) => one.markdown).map(({ start, end }) => ({ start, end })),
|
|
90
|
+
...body.free,
|
|
91
|
+
].sort((left, right) => left.start - right.start);
|
|
92
|
+
return { ok: true, input: { values, ranges, edits } };
|
|
120
93
|
}
|
|
121
94
|
export function project(document, file, context = { documentTargets: [] }) {
|
|
122
95
|
const result = projectionInput(document, file, context);
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { type Definition } from '../definition.js';
|
|
2
|
+
export type Value = string | number | boolean | null;
|
|
3
|
+
export type Predicate = Value | {
|
|
4
|
+
$eq: Value;
|
|
5
|
+
} | {
|
|
6
|
+
$ne: Value;
|
|
7
|
+
} | {
|
|
8
|
+
$in: readonly Value[];
|
|
9
|
+
} | {
|
|
10
|
+
$nin: readonly Value[];
|
|
11
|
+
} | {
|
|
12
|
+
$gt?: Value;
|
|
13
|
+
$gte?: Value;
|
|
14
|
+
$lt?: Value;
|
|
15
|
+
$lte?: Value;
|
|
16
|
+
} | {
|
|
17
|
+
$all: readonly Value[];
|
|
18
|
+
} | {
|
|
19
|
+
$size: number;
|
|
20
|
+
} | {
|
|
21
|
+
$exists: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
$prefix: string;
|
|
24
|
+
};
|
|
25
|
+
export type Where = {
|
|
26
|
+
$and?: readonly Where[];
|
|
27
|
+
$or?: readonly Where[];
|
|
28
|
+
[field: string]: Predicate | readonly Where[] | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type Related = {
|
|
31
|
+
types?: readonly string[];
|
|
32
|
+
where?: Where;
|
|
33
|
+
pathPrefix?: string;
|
|
34
|
+
};
|
|
35
|
+
export type Filter = {
|
|
36
|
+
rooms?: readonly string[];
|
|
37
|
+
types?: readonly string[];
|
|
38
|
+
where?: Where;
|
|
39
|
+
pathPrefix?: string;
|
|
40
|
+
outside?: readonly string[];
|
|
41
|
+
folder?: string;
|
|
42
|
+
paths?: readonly string[];
|
|
43
|
+
fileIds?: readonly string[];
|
|
44
|
+
hop?: Related & {
|
|
45
|
+
field: string;
|
|
46
|
+
};
|
|
47
|
+
backlinks?: Related & {
|
|
48
|
+
field?: string;
|
|
49
|
+
};
|
|
50
|
+
text?: string;
|
|
51
|
+
};
|
|
52
|
+
export type Key = 'room' | 'path' | 'type' | 'folder' | 'size' | 'created' | 'updated' | {
|
|
53
|
+
field: string;
|
|
54
|
+
};
|
|
55
|
+
export type GroupKey = 'room' | 'type' | 'folder' | 'subfolder' | {
|
|
56
|
+
field: string;
|
|
57
|
+
};
|
|
58
|
+
export type Select = 'all' | {
|
|
59
|
+
fields?: 'all' | readonly string[];
|
|
60
|
+
sections?: 'all' | readonly string[];
|
|
61
|
+
preamble?: true;
|
|
62
|
+
markdown?: true;
|
|
63
|
+
backlinks?: true;
|
|
64
|
+
change?: true;
|
|
65
|
+
fileId?: true;
|
|
66
|
+
revision?: true;
|
|
67
|
+
size?: true;
|
|
68
|
+
created?: true;
|
|
69
|
+
};
|
|
70
|
+
export type GroupSelect = {
|
|
71
|
+
size?: true;
|
|
72
|
+
updated?: true;
|
|
73
|
+
greatest?: {
|
|
74
|
+
field: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export type GroupOrder = 'count' | 'size' | 'updated' | 'greatest';
|
|
78
|
+
export type OrderOptions = {
|
|
79
|
+
nulls?: 'first' | 'last';
|
|
80
|
+
stringSort?: 'lexical' | 'locale';
|
|
81
|
+
locale?: string;
|
|
82
|
+
localeOptions?: Readonly<Record<string, unknown>>;
|
|
83
|
+
};
|
|
84
|
+
export type Direction = 'asc' | 'desc';
|
|
85
|
+
export type DocumentQuery = Filter & {
|
|
86
|
+
select: Select;
|
|
87
|
+
orderBy?: readonly ({
|
|
88
|
+
by: Key;
|
|
89
|
+
direction?: Direction;
|
|
90
|
+
} & OrderOptions)[];
|
|
91
|
+
limit?: number;
|
|
92
|
+
after?: string;
|
|
93
|
+
total?: true;
|
|
94
|
+
};
|
|
95
|
+
export type GroupQuery = Filter & {
|
|
96
|
+
groupBy: readonly GroupKey[];
|
|
97
|
+
select?: GroupSelect;
|
|
98
|
+
orderBy?: readonly {
|
|
99
|
+
by: GroupOrder | GroupKey;
|
|
100
|
+
direction?: Direction;
|
|
101
|
+
nulls?: 'first' | 'last';
|
|
102
|
+
}[];
|
|
103
|
+
limit?: number;
|
|
104
|
+
after?: string;
|
|
105
|
+
total?: true;
|
|
106
|
+
};
|
|
107
|
+
export type LocalQuery = DocumentQuery | GroupQuery;
|
|
108
|
+
export type QueryErrorCode = 'invalid-query' | 'unknown-type' | 'unknown-field' | 'wrong-kind';
|
|
109
|
+
export type RoomFacts = {
|
|
110
|
+
locator: string;
|
|
111
|
+
available: boolean;
|
|
112
|
+
types: readonly Definition[];
|
|
113
|
+
};
|
|
114
|
+
export type HeldRooms = {
|
|
115
|
+
listed: boolean;
|
|
116
|
+
rooms: readonly RoomFacts[];
|
|
117
|
+
};
|
|
118
|
+
export type Test = {
|
|
119
|
+
op: 'eq';
|
|
120
|
+
value: Value;
|
|
121
|
+
} | {
|
|
122
|
+
op: 'ne';
|
|
123
|
+
value: Value;
|
|
124
|
+
} | {
|
|
125
|
+
op: 'in';
|
|
126
|
+
values: readonly Value[];
|
|
127
|
+
} | {
|
|
128
|
+
op: 'nin';
|
|
129
|
+
values: readonly Value[];
|
|
130
|
+
} | {
|
|
131
|
+
op: 'range';
|
|
132
|
+
bounds: readonly (readonly ['gt' | 'gte' | 'lt' | 'lte', Value])[];
|
|
133
|
+
} | {
|
|
134
|
+
op: 'all';
|
|
135
|
+
values: readonly Value[];
|
|
136
|
+
} | {
|
|
137
|
+
op: 'size';
|
|
138
|
+
size: number;
|
|
139
|
+
} | {
|
|
140
|
+
op: 'exists';
|
|
141
|
+
exists: boolean;
|
|
142
|
+
} | {
|
|
143
|
+
op: 'prefix';
|
|
144
|
+
prefix: string;
|
|
145
|
+
};
|
|
146
|
+
export type Clause = {
|
|
147
|
+
every: readonly Clause[];
|
|
148
|
+
} | {
|
|
149
|
+
some: readonly Clause[];
|
|
150
|
+
} | {
|
|
151
|
+
field: string;
|
|
152
|
+
test: Test;
|
|
153
|
+
};
|
|
154
|
+
export type Scope = {
|
|
155
|
+
types: readonly string[] | null;
|
|
156
|
+
where: Clause | null;
|
|
157
|
+
pathPrefix: string | null;
|
|
158
|
+
};
|
|
159
|
+
export type KeyPlan = {
|
|
160
|
+
of: 'room';
|
|
161
|
+
} | {
|
|
162
|
+
of: 'path';
|
|
163
|
+
} | {
|
|
164
|
+
of: 'type';
|
|
165
|
+
} | {
|
|
166
|
+
of: 'folder';
|
|
167
|
+
} | {
|
|
168
|
+
of: 'subfolder';
|
|
169
|
+
} | {
|
|
170
|
+
of: 'size';
|
|
171
|
+
} | {
|
|
172
|
+
of: 'created';
|
|
173
|
+
} | {
|
|
174
|
+
of: 'updated';
|
|
175
|
+
} | {
|
|
176
|
+
of: 'field';
|
|
177
|
+
field: string;
|
|
178
|
+
};
|
|
179
|
+
export type DocumentShape = {
|
|
180
|
+
kind: 'documents';
|
|
181
|
+
fields: 'all' | readonly string[] | null;
|
|
182
|
+
sections: 'all' | readonly string[] | null;
|
|
183
|
+
preamble: boolean;
|
|
184
|
+
markdown: boolean;
|
|
185
|
+
backlinks: boolean;
|
|
186
|
+
change: boolean;
|
|
187
|
+
fileId: boolean;
|
|
188
|
+
revision: boolean;
|
|
189
|
+
size: boolean;
|
|
190
|
+
created: boolean;
|
|
191
|
+
orderBy: readonly {
|
|
192
|
+
key: KeyPlan;
|
|
193
|
+
options: OrderOptions & {
|
|
194
|
+
direction: Direction;
|
|
195
|
+
};
|
|
196
|
+
}[];
|
|
197
|
+
};
|
|
198
|
+
export type GroupShape = {
|
|
199
|
+
kind: 'groups';
|
|
200
|
+
groupBy: readonly KeyPlan[];
|
|
201
|
+
size: boolean;
|
|
202
|
+
updated: boolean;
|
|
203
|
+
greatest: string | null;
|
|
204
|
+
orderBy: readonly {
|
|
205
|
+
by: GroupOrder | number;
|
|
206
|
+
direction: Direction;
|
|
207
|
+
nulls: 'first' | 'last' | null;
|
|
208
|
+
}[];
|
|
209
|
+
};
|
|
210
|
+
export type Continuation = {
|
|
211
|
+
text: string;
|
|
212
|
+
values: readonly unknown[] | null;
|
|
213
|
+
};
|
|
214
|
+
export type QueryPlan = {
|
|
215
|
+
key: string;
|
|
216
|
+
rooms: readonly string[] | null;
|
|
217
|
+
root: Scope;
|
|
218
|
+
outside: readonly string[] | null;
|
|
219
|
+
folder: string | null;
|
|
220
|
+
paths: readonly string[] | null;
|
|
221
|
+
fileIds: readonly string[] | null;
|
|
222
|
+
hop: (Scope & {
|
|
223
|
+
field: string;
|
|
224
|
+
}) | null;
|
|
225
|
+
backlinks: (Scope & {
|
|
226
|
+
field: string | null;
|
|
227
|
+
}) | null;
|
|
228
|
+
text: string | null;
|
|
229
|
+
shape: DocumentShape | GroupShape;
|
|
230
|
+
limit: number | null;
|
|
231
|
+
after: Continuation | null;
|
|
232
|
+
total: boolean;
|
|
233
|
+
};
|
|
234
|
+
export type Place = readonly (string | number)[];
|
|
235
|
+
type At = Place | string;
|
|
236
|
+
export declare class QueryError extends Error {
|
|
237
|
+
readonly code: QueryErrorCode;
|
|
238
|
+
readonly place: Place;
|
|
239
|
+
readonly accepts: readonly string[];
|
|
240
|
+
readonly retryable = false;
|
|
241
|
+
constructor(code: QueryErrorCode, at: At, problem: string, accepts?: readonly string[]);
|
|
242
|
+
}
|
|
243
|
+
type Entries = Readonly<Record<string, unknown>>;
|
|
244
|
+
export declare function bodied(shape: DocumentShape): boolean;
|
|
245
|
+
export declare function invalid(at: At, problem: string, accepts?: readonly string[]): never;
|
|
246
|
+
export declare function placeText(at: Place): string;
|
|
247
|
+
export declare function known(value: Entries, allowed: readonly string[], at: At): void;
|
|
248
|
+
export declare function planOf(input: unknown, facts: HeldRooms): QueryPlan;
|
|
249
|
+
export declare function cursorOf(values: readonly unknown[]): string;
|
|
250
|
+
export declare function decodedCursor(text: string): readonly unknown[] | null;
|
|
251
|
+
export declare function queryKey(query: unknown): string;
|
|
252
|
+
export declare function identityOf(plan: QueryPlan): string;
|
|
253
|
+
export {};
|
|
254
|
+
//# sourceMappingURL=language.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/query/language.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,UAAU,EAGhB,MAAM,kBAAkB,CAAC;AAK1B,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAErD,MAAM,MAAM,SAAS,GACjB,KAAK,GACL;IAAE,GAAG,EAAE,KAAK,CAAA;CAAE,GACd;IAAE,GAAG,EAAE,KAAK,CAAA;CAAE,GACd;IAAE,GAAG,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,GAC1B;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,GAC1B;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,KAAK,EAAE,GAAG,SAAS,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,CAAC,E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