@graview/core 0.1.28 → 0.1.29
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/README.md +17 -0
- package/dist/amount-input.d.ts +21 -0
- package/dist/amount-input.d.ts.map +1 -0
- package/dist/amount-input.js +96 -0
- package/dist/amount-input.js.map +1 -0
- package/dist/answer-seen.d.ts +38 -0
- package/dist/answer-seen.d.ts.map +1 -0
- package/dist/answer-seen.js +122 -0
- package/dist/answer-seen.js.map +1 -0
- package/dist/app-places.d.ts +56 -0
- package/dist/app-places.d.ts.map +1 -0
- package/dist/app-places.js +153 -0
- package/dist/app-places.js.map +1 -0
- package/dist/arrange.d.ts +2 -2
- package/dist/arrange.d.ts.map +1 -1
- package/dist/arrange.js +2 -2
- package/dist/arrange.js.map +1 -1
- package/dist/arrangement-words.d.ts +3 -0
- package/dist/arrangement-words.d.ts.map +1 -0
- package/dist/arrangement-words.js +50 -0
- package/dist/arrangement-words.js.map +1 -0
- package/dist/arrangement.d.ts +25 -3
- package/dist/arrangement.d.ts.map +1 -1
- package/dist/arrangement.js +36 -32
- package/dist/arrangement.js.map +1 -1
- package/dist/arranging.d.ts.map +1 -1
- package/dist/arranging.js +19 -8
- package/dist/arranging.js.map +1 -1
- package/dist/bind.d.ts +3 -0
- package/dist/bind.d.ts.map +1 -1
- package/dist/bind.js.map +1 -1
- package/dist/capabilities.js +1 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/check.d.ts +3 -0
- package/dist/check.d.ts.map +1 -1
- package/dist/check.js +3 -0
- package/dist/check.js.map +1 -1
- package/dist/city.d.ts +58 -50
- package/dist/city.d.ts.map +1 -1
- package/dist/city.js +160 -147
- package/dist/city.js.map +1 -1
- package/dist/cli/check/brand.js +1 -1
- package/dist/cli/check/brand.js.map +1 -1
- package/dist/cli/check/clock-rules.d.ts +4 -0
- package/dist/cli/check/clock-rules.d.ts.map +1 -0
- package/dist/cli/check/clock-rules.js +26 -0
- package/dist/cli/check/clock-rules.js.map +1 -0
- package/dist/cli/check/field-sight.d.ts +11 -0
- package/dist/cli/check/field-sight.d.ts.map +1 -0
- package/dist/cli/check/field-sight.js +113 -0
- package/dist/cli/check/field-sight.js.map +1 -0
- package/dist/cli/check/index.d.ts +2 -0
- package/dist/cli/check/index.d.ts.map +1 -1
- package/dist/cli/check/index.js +2 -0
- package/dist/cli/check/index.js.map +1 -1
- package/dist/cli/check/lenses.d.ts +1 -1
- package/dist/cli/check/lenses.d.ts.map +1 -1
- package/dist/cli/check/lenses.js +43 -2
- package/dist/cli/check/lenses.js.map +1 -1
- package/dist/cli/check/relations.d.ts.map +1 -1
- package/dist/cli/check/relations.js +2 -1
- package/dist/cli/check/relations.js.map +1 -1
- package/dist/cli/check.d.ts.map +1 -1
- package/dist/cli/check.js +7 -4
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/describe.d.ts.map +1 -1
- package/dist/cli/describe.js +44 -3
- package/dist/cli/describe.js.map +1 -1
- package/dist/cli/docs.d.ts.map +1 -1
- package/dist/cli/docs.js +4 -3
- package/dist/cli/docs.js.map +1 -1
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/types.js +10 -1
- package/dist/cli/types.js.map +1 -1
- package/dist/clock-readers.d.ts +18 -0
- package/dist/clock-readers.d.ts.map +1 -0
- package/dist/clock-readers.js +70 -0
- package/dist/clock-readers.js.map +1 -0
- package/dist/clock.d.ts +30 -0
- package/dist/clock.d.ts.map +1 -0
- package/dist/clock.js +41 -0
- package/dist/clock.js.map +1 -0
- package/dist/columns.d.ts.map +1 -1
- package/dist/columns.js +2 -1
- package/dist/columns.js.map +1 -1
- package/dist/conformance/fixtures.d.ts.map +1 -1
- package/dist/conformance/fixtures.js +326 -43
- package/dist/conformance/fixtures.js.map +1 -1
- package/dist/days.d.ts +53 -4
- package/dist/days.d.ts.map +1 -1
- package/dist/days.js +136 -16
- package/dist/days.js.map +1 -1
- package/dist/describe.d.ts +1 -0
- package/dist/describe.d.ts.map +1 -1
- package/dist/describe.js +1 -0
- package/dist/describe.js.map +1 -1
- package/dist/document/act-findings.d.ts.map +1 -1
- package/dist/document/act-findings.js +13 -3
- package/dist/document/act-findings.js.map +1 -1
- package/dist/document/amount.d.ts +4 -0
- package/dist/document/amount.d.ts.map +1 -0
- package/dist/document/amount.js +22 -0
- package/dist/document/amount.js.map +1 -0
- package/dist/document/block-context.d.ts.map +1 -1
- package/dist/document/block-context.js +1 -0
- package/dist/document/block-context.js.map +1 -1
- package/dist/document/blocks.d.ts +13 -3
- package/dist/document/blocks.d.ts.map +1 -1
- package/dist/document/blocks.js +56 -12
- package/dist/document/blocks.js.map +1 -1
- package/dist/document/compile-checked.d.ts.map +1 -1
- package/dist/document/compile-checked.js +3 -2
- package/dist/document/compile-checked.js.map +1 -1
- package/dist/document/compile.d.ts.map +1 -1
- package/dist/document/compile.js +30 -7
- package/dist/document/compile.js.map +1 -1
- package/dist/document/compiled.d.ts +4 -2
- package/dist/document/compiled.d.ts.map +1 -1
- package/dist/document/compiled.js +50 -19
- package/dist/document/compiled.js.map +1 -1
- package/dist/document/describe-coverage.d.ts.map +1 -1
- package/dist/document/describe-coverage.js +2 -1
- package/dist/document/describe-coverage.js.map +1 -1
- package/dist/document/describe-place.d.ts +6 -2
- package/dist/document/describe-place.d.ts.map +1 -1
- package/dist/document/describe-place.js +14 -8
- package/dist/document/describe-place.js.map +1 -1
- package/dist/document/diff.d.ts +2 -0
- package/dist/document/diff.d.ts.map +1 -1
- package/dist/document/diff.js +34 -6
- package/dist/document/diff.js.map +1 -1
- package/dist/document/durations.d.ts +8 -0
- package/dist/document/durations.d.ts.map +1 -0
- package/dist/document/durations.js +82 -0
- package/dist/document/durations.js.map +1 -0
- package/dist/document/edit.d.ts +1 -1
- package/dist/document/edit.d.ts.map +1 -1
- package/dist/document/edit.js +195 -22
- package/dist/document/edit.js.map +1 -1
- package/dist/document/expr/evaluate.d.ts +1 -1
- package/dist/document/expr/evaluate.d.ts.map +1 -1
- package/dist/document/expr/evaluate.js +17 -4
- package/dist/document/expr/evaluate.js.map +1 -1
- package/dist/document/field-spec.d.ts.map +1 -1
- package/dist/document/field-spec.js +15 -1
- package/dist/document/field-spec.js.map +1 -1
- package/dist/document/format-findings.d.ts +4 -0
- package/dist/document/format-findings.d.ts.map +1 -0
- package/dist/document/format-findings.js +39 -0
- package/dist/document/format-findings.js.map +1 -0
- package/dist/document/format-rules.d.ts +8 -0
- package/dist/document/format-rules.d.ts.map +1 -0
- package/dist/document/format-rules.js +19 -0
- package/dist/document/format-rules.js.map +1 -0
- package/dist/document/format-words.d.ts +9 -0
- package/dist/document/format-words.d.ts.map +1 -0
- package/dist/document/format-words.js +29 -0
- package/dist/document/format-words.js.map +1 -0
- package/dist/document/graview-template.d.ts +2 -2
- package/dist/document/migrate.d.ts +1 -0
- package/dist/document/migrate.d.ts.map +1 -1
- package/dist/document/migrate.js +45 -1
- package/dist/document/migrate.js.map +1 -1
- package/dist/document/money.d.ts +14 -0
- package/dist/document/money.d.ts.map +1 -0
- package/dist/document/money.js +14 -0
- package/dist/document/money.js.map +1 -0
- package/dist/document/policy-words.d.ts +2 -0
- package/dist/document/policy-words.d.ts.map +1 -1
- package/dist/document/policy-words.js +19 -4
- package/dist/document/policy-words.js.map +1 -1
- package/dist/document/rule-line.d.ts.map +1 -1
- package/dist/document/rule-line.js +16 -12
- package/dist/document/rule-line.js.map +1 -1
- package/dist/document/rules.d.ts.map +1 -1
- package/dist/document/rules.js +6 -5
- package/dist/document/rules.js.map +1 -1
- package/dist/document/schema.d.ts +62 -19
- package/dist/document/schema.d.ts.map +1 -1
- package/dist/document/schema.js +30 -4
- package/dist/document/schema.js.map +1 -1
- package/dist/document/template-parse.d.ts.map +1 -1
- package/dist/document/template-parse.js +9 -2
- package/dist/document/template-parse.js.map +1 -1
- package/dist/document/template.d.ts +3 -13
- package/dist/document/template.d.ts.map +1 -1
- package/dist/document/template.js +24 -22
- package/dist/document/template.js.map +1 -1
- package/dist/document/thumbnail.d.ts.map +1 -1
- package/dist/document/thumbnail.js +4 -3
- package/dist/document/thumbnail.js.map +1 -1
- package/dist/document/to-document.d.ts +0 -1
- package/dist/document/to-document.d.ts.map +1 -1
- package/dist/document/to-document.js +19 -2
- package/dist/document/to-document.js.map +1 -1
- package/dist/document/view-specs.d.ts.map +1 -1
- package/dist/document/view-specs.js +3 -0
- package/dist/document/view-specs.js.map +1 -1
- package/dist/document/views.d.ts +2 -0
- package/dist/document/views.d.ts.map +1 -1
- package/dist/document/views.js +18 -6
- package/dist/document/views.js.map +1 -1
- package/dist/document.schema.json +63 -6
- package/dist/excerpt-of.d.ts +14 -0
- package/dist/excerpt-of.d.ts.map +1 -0
- package/dist/excerpt-of.js +120 -0
- package/dist/excerpt-of.js.map +1 -0
- package/dist/excerpt.d.ts +9 -0
- package/dist/excerpt.d.ts.map +1 -0
- package/dist/excerpt.js +43 -0
- package/dist/excerpt.js.map +1 -0
- package/dist/field-sight.d.ts +33 -0
- package/dist/field-sight.d.ts.map +1 -0
- package/dist/field-sight.js +313 -0
- package/dist/field-sight.js.map +1 -0
- package/dist/forms.d.ts +1 -0
- package/dist/forms.d.ts.map +1 -1
- package/dist/forms.js +1 -0
- package/dist/forms.js.map +1 -1
- package/dist/graph/archived.d.ts +25 -0
- package/dist/graph/archived.d.ts.map +1 -0
- package/dist/graph/archived.js +16 -0
- package/dist/graph/archived.js.map +1 -0
- package/dist/graph/diff.d.ts.map +1 -1
- package/dist/graph/diff.js +2 -1
- package/dist/graph/diff.js.map +1 -1
- package/dist/graph/graph.d.ts +37 -13
- package/dist/graph/graph.d.ts.map +1 -1
- package/dist/graph/graph.js +86 -40
- package/dist/graph/graph.js.map +1 -1
- package/dist/graph/tracked.d.ts +8 -8
- package/dist/graph/tracked.d.ts.map +1 -1
- package/dist/graph/tracked.js +15 -20
- package/dist/graph/tracked.js.map +1 -1
- package/dist/graph/types.d.ts +16 -8
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/graph/types.js.map +1 -1
- package/dist/import/coerce.d.ts +45 -0
- package/dist/import/coerce.d.ts.map +1 -0
- package/dist/import/coerce.js +252 -0
- package/dist/import/coerce.js.map +1 -0
- package/dist/import/csv.d.ts +16 -0
- package/dist/import/csv.d.ts.map +1 -0
- package/dist/import/csv.js +77 -0
- package/dist/import/csv.js.map +1 -0
- package/dist/import/index.d.ts +17 -0
- package/dist/import/index.d.ts.map +1 -0
- package/dist/import/index.js +13 -0
- package/dist/import/index.js.map +1 -0
- package/dist/import/mapping.d.ts +99 -0
- package/dist/import/mapping.d.ts.map +1 -0
- package/dist/import/mapping.js +182 -0
- package/dist/import/mapping.js.map +1 -0
- package/dist/import/rows.d.ts +116 -0
- package/dist/import/rows.d.ts.map +1 -0
- package/dist/import/rows.js +584 -0
- package/dist/import/rows.js.map +1 -0
- package/dist/index.d.ts +38 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -16
- package/dist/index.js.map +1 -1
- package/dist/invariants/engine.d.ts +5 -1
- package/dist/invariants/engine.d.ts.map +1 -1
- package/dist/invariants/engine.js +4 -3
- package/dist/invariants/engine.js.map +1 -1
- package/dist/invariants/types.d.ts +18 -3
- package/dist/invariants/types.d.ts.map +1 -1
- package/dist/json-schema.d.ts +1 -0
- package/dist/json-schema.d.ts.map +1 -1
- package/dist/json-schema.js +2 -0
- package/dist/json-schema.js.map +1 -1
- package/dist/labels.d.ts.map +1 -1
- package/dist/labels.js +2 -1
- package/dist/labels.js.map +1 -1
- package/dist/lines.d.ts +1 -0
- package/dist/lines.d.ts.map +1 -1
- package/dist/lines.js +5 -3
- package/dist/lines.js.map +1 -1
- package/dist/markdown.d.ts +102 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +460 -0
- package/dist/markdown.js.map +1 -0
- package/dist/mutations/arg-shape.d.ts +95 -0
- package/dist/mutations/arg-shape.d.ts.map +1 -0
- package/dist/mutations/arg-shape.js +101 -0
- package/dist/mutations/arg-shape.js.map +1 -0
- package/dist/mutations/define-mutation.d.ts +48 -2
- package/dist/mutations/define-mutation.d.ts.map +1 -1
- package/dist/mutations/define-mutation.js +103 -36
- package/dist/mutations/define-mutation.js.map +1 -1
- package/dist/mutations/derive-edits.d.ts +16 -1
- package/dist/mutations/derive-edits.d.ts.map +1 -1
- package/dist/mutations/derive-edits.js +67 -28
- package/dist/mutations/derive-edits.js.map +1 -1
- package/dist/mutations/derive-repeats.d.ts +8 -0
- package/dist/mutations/derive-repeats.d.ts.map +1 -0
- package/dist/mutations/derive-repeats.js +118 -0
- package/dist/mutations/derive-repeats.js.map +1 -0
- package/dist/mutations/derived-names.d.ts +20 -0
- package/dist/mutations/derived-names.d.ts.map +1 -0
- package/dist/mutations/derived-names.js +19 -0
- package/dist/mutations/derived-names.js.map +1 -0
- package/dist/mutations/form.d.ts +21 -1
- package/dist/mutations/form.d.ts.map +1 -1
- package/dist/mutations/form.js +19 -2
- package/dist/mutations/form.js.map +1 -1
- package/dist/mutations/invalid-arguments.d.ts +14 -0
- package/dist/mutations/invalid-arguments.d.ts.map +1 -0
- package/dist/mutations/invalid-arguments.js +18 -0
- package/dist/mutations/invalid-arguments.js.map +1 -0
- package/dist/mutations/keep-link.d.ts +27 -0
- package/dist/mutations/keep-link.d.ts.map +1 -0
- package/dist/mutations/keep-link.js +56 -0
- package/dist/mutations/keep-link.js.map +1 -0
- package/dist/mutations/kept-arguments.d.ts +26 -0
- package/dist/mutations/kept-arguments.d.ts.map +1 -0
- package/dist/mutations/kept-arguments.js +77 -0
- package/dist/mutations/kept-arguments.js.map +1 -0
- package/dist/mutations/node-ref.d.ts +0 -80
- package/dist/mutations/node-ref.d.ts.map +1 -1
- package/dist/mutations/node-ref.js +0 -93
- package/dist/mutations/node-ref.js.map +1 -1
- package/dist/mutations/types.d.ts +17 -1
- package/dist/mutations/types.d.ts.map +1 -1
- package/dist/mutations/words.d.ts +0 -13
- package/dist/mutations/words.d.ts.map +1 -1
- package/dist/mutations/words.js +1 -12
- package/dist/mutations/words.js.map +1 -1
- package/dist/ops/kept-fields.d.ts +7 -0
- package/dist/ops/kept-fields.d.ts.map +1 -0
- package/dist/ops/kept-fields.js +24 -0
- package/dist/ops/kept-fields.js.map +1 -0
- package/dist/ops/lineage.d.ts +37 -0
- package/dist/ops/lineage.d.ts.map +1 -0
- package/dist/ops/lineage.js +26 -0
- package/dist/ops/lineage.js.map +1 -0
- package/dist/ops/log.d.ts.map +1 -1
- package/dist/ops/log.js +1 -0
- package/dist/ops/log.js.map +1 -1
- package/dist/ops/provenance.d.ts +68 -0
- package/dist/ops/provenance.d.ts.map +1 -0
- package/dist/ops/provenance.js +83 -0
- package/dist/ops/provenance.js.map +1 -0
- package/dist/ops/types.d.ts +25 -0
- package/dist/ops/types.d.ts.map +1 -1
- package/dist/ops/withheld.d.ts +25 -2
- package/dist/ops/withheld.d.ts.map +1 -1
- package/dist/ops/withheld.js +6 -15
- package/dist/ops/withheld.js.map +1 -1
- package/dist/permissions/policy.d.ts +6 -1
- package/dist/permissions/policy.d.ts.map +1 -1
- package/dist/permissions/policy.js +29 -9
- package/dist/permissions/policy.js.map +1 -1
- package/dist/permissions/sight.d.ts +40 -2
- package/dist/permissions/sight.d.ts.map +1 -1
- package/dist/permissions/sight.js +25 -2
- package/dist/permissions/sight.js.map +1 -1
- package/dist/permissions/types.d.ts +21 -0
- package/dist/permissions/types.d.ts.map +1 -1
- package/dist/permissions/types.js.map +1 -1
- package/dist/places.d.ts +0 -49
- package/dist/places.d.ts.map +1 -1
- package/dist/places.js +2 -141
- package/dist/places.js.map +1 -1
- package/dist/provenance.d.ts +14 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/provenance.js +13 -0
- package/dist/provenance.js.map +1 -0
- package/dist/repeat-words.d.ts +13 -0
- package/dist/repeat-words.d.ts.map +1 -0
- package/dist/repeat-words.js +56 -0
- package/dist/repeat-words.js.map +1 -0
- package/dist/repeat.d.ts +59 -0
- package/dist/repeat.d.ts.map +1 -0
- package/dist/repeat.js +155 -0
- package/dist/repeat.js.map +1 -0
- package/dist/scaffold/project.d.ts.map +1 -1
- package/dist/scaffold/project.js +13 -0
- package/dist/scaffold/project.js.map +1 -1
- package/dist/scaffold/ui.js +2 -2
- package/dist/scene-districts.d.ts +2 -1
- package/dist/scene-districts.d.ts.map +1 -1
- package/dist/scene-districts.js +2 -1
- package/dist/scene-districts.js.map +1 -1
- package/dist/scene.d.ts +4 -2
- package/dist/scene.d.ts.map +1 -1
- package/dist/scene.js +2 -1
- package/dist/scene.js.map +1 -1
- package/dist/schema/amount-mark.d.ts +13 -0
- package/dist/schema/amount-mark.d.ts.map +1 -0
- package/dist/schema/amount-mark.js +20 -0
- package/dist/schema/amount-mark.js.map +1 -0
- package/dist/schema/amount-words.d.ts +12 -0
- package/dist/schema/amount-words.d.ts.map +1 -0
- package/dist/schema/amount-words.js +31 -0
- package/dist/schema/amount-words.js.map +1 -0
- package/dist/schema/app-link-field.d.ts +4 -0
- package/dist/schema/app-link-field.d.ts.map +1 -0
- package/dist/schema/app-link-field.js +19 -0
- package/dist/schema/app-link-field.js.map +1 -0
- package/dist/schema/app-link.d.ts +41 -0
- package/dist/schema/app-link.d.ts.map +1 -0
- package/dist/schema/app-link.js +40 -0
- package/dist/schema/app-link.js.map +1 -0
- package/dist/schema/define-node.d.ts +25 -94
- package/dist/schema/define-node.d.ts.map +1 -1
- package/dist/schema/define-node.js +3 -247
- package/dist/schema/define-node.js.map +1 -1
- package/dist/schema/field-words.d.ts +45 -0
- package/dist/schema/field-words.d.ts.map +1 -0
- package/dist/schema/field-words.js +124 -0
- package/dist/schema/field-words.js.map +1 -0
- package/dist/schema/json-schema.d.ts +6 -1
- package/dist/schema/json-schema.d.ts.map +1 -1
- package/dist/schema/json-schema.js +83 -2
- package/dist/schema/json-schema.js.map +1 -1
- package/dist/schema/markdown-field.d.ts +4 -0
- package/dist/schema/markdown-field.d.ts.map +1 -0
- package/dist/schema/markdown-field.js +20 -0
- package/dist/schema/markdown-field.js.map +1 -0
- package/dist/schema/markdown.d.ts +6 -0
- package/dist/schema/markdown.d.ts.map +1 -0
- package/dist/schema/markdown.js +27 -0
- package/dist/schema/markdown.js.map +1 -0
- package/dist/schema/reading.d.ts +86 -0
- package/dist/schema/reading.d.ts.map +1 -0
- package/dist/schema/reading.js +270 -0
- package/dist/schema/reading.js.map +1 -0
- package/dist/schema/repeat-field.d.ts +5 -0
- package/dist/schema/repeat-field.d.ts.map +1 -0
- package/dist/schema/repeat-field.js +20 -0
- package/dist/schema/repeat-field.js.map +1 -0
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/schema.js +5 -1
- package/dist/schema/schema.js.map +1 -1
- package/dist/schema/to-json-schema.d.ts +14 -0
- package/dist/schema/to-json-schema.d.ts.map +1 -0
- package/dist/schema/to-json-schema.js +616 -0
- package/dist/schema/to-json-schema.js.map +1 -0
- package/dist/schema/typed-field-builders.d.ts +8 -0
- package/dist/schema/typed-field-builders.d.ts.map +1 -0
- package/dist/schema/typed-field-builders.js +30 -0
- package/dist/schema/typed-field-builders.js.map +1 -0
- package/dist/schema/typed-field-of.d.ts +4 -0
- package/dist/schema/typed-field-of.d.ts.map +1 -0
- package/dist/schema/typed-field-of.js +14 -0
- package/dist/schema/typed-field-of.js.map +1 -0
- package/dist/schema/typed-fields.d.ts +11 -0
- package/dist/schema/typed-fields.d.ts.map +1 -0
- package/dist/schema/typed-fields.js +16 -0
- package/dist/schema/typed-fields.js.map +1 -0
- package/dist/schema/types.d.ts +14 -0
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/value-words.d.ts +21 -0
- package/dist/schema/value-words.d.ts.map +1 -0
- package/dist/schema/value-words.js +32 -0
- package/dist/schema/value-words.js.map +1 -0
- package/dist/search.d.ts +91 -4
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +288 -53
- package/dist/search.js.map +1 -1
- package/dist/seat.d.ts +19 -0
- package/dist/seat.d.ts.map +1 -0
- package/dist/seat.js +19 -0
- package/dist/seat.js.map +1 -0
- package/dist/seen.d.ts +15 -33
- package/dist/seen.d.ts.map +1 -1
- package/dist/seen.js +44 -135
- package/dist/seen.js.map +1 -1
- package/dist/store.d.ts +46 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +121 -22
- package/dist/store.js.map +1 -1
- package/dist/theme/types.d.ts +7 -1
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/types.js.map +1 -1
- package/dist/typed.d.ts +12 -3
- package/dist/typed.d.ts.map +1 -1
- package/dist/typed.js.map +1 -1
- package/dist/validate-graph.d.ts.map +1 -1
- package/dist/validate-graph.js +3 -10
- package/dist/validate-graph.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/views/types.d.ts +57 -8
- package/dist/views/types.d.ts.map +1 -1
- package/dist/views/types.js +22 -3
- package/dist/views/types.js.map +1 -1
- package/dist/village.d.ts +63 -0
- package/dist/village.d.ts.map +1 -0
- package/dist/village.js +143 -0
- package/dist/village.js.map +1 -0
- package/dist/watched.d.ts +12 -45
- package/dist/watched.d.ts.map +1 -1
- package/dist/watched.js +7 -119
- package/dist/watched.js.map +1 -1
- package/dist/words.d.ts +33 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +36 -0
- package/dist/words.js.map +1 -0
- package/package.json +37 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as z from "./zod.js";
|
|
2
|
+
/** What an app-link field holds: `@owner/app`, an id, or an absolute http(s) address. */
|
|
3
|
+
export declare const APP_ADDRESS: RegExp;
|
|
4
|
+
/** Whether a value is another app's address: `@owner/app`, an app id, or an absolute http(s) address, of at most 500 characters. */
|
|
5
|
+
export declare const isAppAddress: (value: unknown) => value is string;
|
|
6
|
+
/** Marks a schema as holding another app's address. */
|
|
7
|
+
export declare const markAppLink: <T extends object>(schema: T) => T;
|
|
8
|
+
/** Whether a field holds another app's address — under optional, default and nullable. */
|
|
9
|
+
export declare function isAppLinkField(schema: unknown): boolean;
|
|
10
|
+
/** A document's `app-link` field, in zod/mini: at most 500 characters. */
|
|
11
|
+
export declare const appLinkSchema: () => z.ZodMiniType;
|
|
12
|
+
/** Another app, as the host says it to this viewer: its name, its icon, its home's headline, and where it opens. */
|
|
13
|
+
export interface LinkedApp {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
/** A picture the host serves (a path on the host or an http(s) address), or an emoji or a letter or two. */
|
|
16
|
+
readonly icon?: string;
|
|
17
|
+
/** What the app's home says first, in a line. */
|
|
18
|
+
readonly headline?: string;
|
|
19
|
+
/** Where the app opens: a path on the host or an http(s) address. */
|
|
20
|
+
readonly href: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* THE HOST'S ANSWER for one address and one viewer: the app; `{ denied:
|
|
24
|
+
* true }` when this viewer may not open it (the field says "linked app (no
|
|
25
|
+
* access)" and nothing of it); or null when the host knows no such app (the
|
|
26
|
+
* field draws the address, plainly).
|
|
27
|
+
*/
|
|
28
|
+
export type AppResolution = LinkedApp | {
|
|
29
|
+
readonly denied: true;
|
|
30
|
+
} | null;
|
|
31
|
+
/**
|
|
32
|
+
* THE HOST'S WAY TO NAME ANOTHER APP (FR-171): handed to `mount`, `<Embed>`,
|
|
33
|
+
* `GraviewProvider` or the routed face as `resolveApp`. Asked once per
|
|
34
|
+
* address and viewer, and remembered; a throw is taken as null.
|
|
35
|
+
*/
|
|
36
|
+
export type ResolveApp = (address: string, viewer: {
|
|
37
|
+
readonly kind: string;
|
|
38
|
+
readonly id?: string | undefined;
|
|
39
|
+
readonly roles?: readonly string[] | undefined;
|
|
40
|
+
}) => Promise<AppResolution>;
|
|
41
|
+
//# sourceMappingURL=app-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-link.d.ts","sourceRoot":"","sources":["../../src/schema/app-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAsB9B,yFAAyF;AACzF,eAAO,MAAM,WAAW,QAAwE,CAAC;AAEjG,oIAAoI;AACpI,eAAO,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
+
* app could not point at a house in another. This is the first step there:
|
|
8
|
+
* a field whose value is ANOTHER APP'S ADDRESS — `@nick/house`, an id the
|
|
9
|
+
* host knows its apps by (`app_kf5eydr9z58jzf`), or the app's absolute
|
|
10
|
+
* `https:` address. The record keeps the address as any other value; what
|
|
11
|
+
* the address is CALLED, and whether this viewer may open it, is the
|
|
12
|
+
* host's to say (`ResolveApp`), and the field draws as that app's name,
|
|
13
|
+
* icon and home headline rather than as the address.
|
|
14
|
+
*
|
|
15
|
+
* A hosted page loads this up front to build a document's fields, so it
|
|
16
|
+
* holds that and no more; what draws one is `@graview/primitives`'s,
|
|
17
|
+
* fetched with the first drawn. A relation whose `to` is another app's
|
|
18
|
+
* kind, an expression that walks it and the history of the far value are
|
|
19
|
+
* left for 0.2.
|
|
20
|
+
*/
|
|
21
|
+
/** What an app-link field holds: `@owner/app`, an id, or an absolute http(s) address. */
|
|
22
|
+
export const APP_ADDRESS = /^(?:https?:\/\/[^\s<>"'`\\]+|@?[A-Za-z0-9][\w.~-]*(?:\/[\w.~-]+)*)$/;
|
|
23
|
+
/** Whether a value is another app's address: `@owner/app`, an app id, or an absolute http(s) address, of at most 500 characters. */
|
|
24
|
+
export const isAppAddress = (value) => typeof value === "string" && value.length < 501 && APP_ADDRESS.test(value);
|
|
25
|
+
/*
|
|
26
|
+
* WHICH FIELDS HOLD AN APP'S ADDRESS: a mark on the schema's def, as a file
|
|
27
|
+
* field is marked (`files.ts`), so a clone shares it, a refinement spreads it
|
|
28
|
+
* and a wrapper holds it inside.
|
|
29
|
+
*/
|
|
30
|
+
const APP_LINK = Symbol.for("@graview/core:app-link");
|
|
31
|
+
/** Marks a schema as holding another app's address. */
|
|
32
|
+
export const markAppLink = (schema) => (Object.defineProperty(defOf(schema), APP_LINK, { value: 1, enumerable: true }), schema);
|
|
33
|
+
/** Whether a field holds another app's address — under optional, default and nullable. */
|
|
34
|
+
export function isAppLinkField(schema) {
|
|
35
|
+
const def = defOf(schema);
|
|
36
|
+
return !!def && (def[APP_LINK] === 1 || isAppLinkField(def.innerType));
|
|
37
|
+
}
|
|
38
|
+
/** A document's `app-link` field, in zod/mini: at most 500 characters. */
|
|
39
|
+
export const appLinkSchema = () => markAppLink(z.string().check(z.maxLength(500), z.regex(APP_ADDRESS, "another app's address")));
|
|
40
|
+
//# sourceMappingURL=app-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-link.js","sourceRoot":"","sources":["../../src/schema/app-link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC;;;;;;;;;;;;;;;;;GAiBG;AAEH,yFAAyF;AACzF,MAAM,CAAC,MAAM,WAAW,GAAG,qEAAqE,CAAC;AAEjG,oIAAoI;AACpI,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAc,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE5I;;;;GAIG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;AAEtD,uDAAuD;AACvD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAmB,MAAS,EAAK,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAE,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEzJ,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,MAAe;IAC5C,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAwD,CAAC;IACjF,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,MAAM,aAAa,GAAG,GAAkB,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import type { FileValue } from "./files.js";
|
|
3
3
|
import type { AnyNodeDefinition, EdgeMap, EmptyEdgeMap, NodeDefinition, NodeDefinitionSpec } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* The single declaration everything else derives from. Views, agent tool
|
|
@@ -19,19 +19,6 @@ export declare function isCurrent(definition: AnyNodeDefinition | undefined, nod
|
|
|
19
19
|
id: string;
|
|
20
20
|
kind: string;
|
|
21
21
|
} & Record<string, unknown>, today?: string): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* WHAT TELLS TWO SAME-NAMED THINGS APART, among the nodes a person is
|
|
24
|
-
* choosing from. A single and its album are both "Blue Hour", and every
|
|
25
|
-
* picker, every ask and the Find strip listed "Blue Hour, Blue Hour": a
|
|
26
|
-
* choice nobody could make. For each node whose name another in the list
|
|
27
|
-
* shares, the first fact that differs between them — "single" and "album",
|
|
28
|
-
* or the dates — else its kind, else its id. Nodes with a name of their
|
|
29
|
-
* own get nothing.
|
|
30
|
-
*/
|
|
31
|
-
export declare function tellApart(nodes: readonly ({
|
|
32
|
-
id: string;
|
|
33
|
-
kind: string;
|
|
34
|
-
} & Record<string, unknown>)[], definitionOf: (kind: string) => AnyNodeDefinition | undefined): Map<string, string>;
|
|
35
22
|
/** Resolves a node's display label, honoring the declaration's override. */
|
|
36
23
|
export declare function labelOf(definition: AnyNodeDefinition | undefined, node: {
|
|
37
24
|
id: string;
|
|
@@ -50,11 +37,6 @@ export declare function labelOf(definition: AnyNodeDefinition | undefined, node:
|
|
|
50
37
|
* is a heading that ignores the limit it was given.
|
|
51
38
|
*/
|
|
52
39
|
export declare function summarize(text: string, max?: number): string;
|
|
53
|
-
/** Resolves a node's prose description, used for a11y and tool text. */
|
|
54
|
-
export declare function describeNode(definition: AnyNodeDefinition | undefined, node: {
|
|
55
|
-
id: string;
|
|
56
|
-
kind: string;
|
|
57
|
-
} & Record<string, unknown>): string;
|
|
58
40
|
/** One field, as a person sees it. */
|
|
59
41
|
export interface ReadableField {
|
|
60
42
|
readonly key: string;
|
|
@@ -64,6 +46,23 @@ export interface ReadableField {
|
|
|
64
46
|
* and its words are their names. A glance leaves them out of its words.
|
|
65
47
|
*/
|
|
66
48
|
readonly files?: readonly FileValue[];
|
|
49
|
+
/**
|
|
50
|
+
* ANOTHER APP'S ADDRESS (FR-171), where the field links to one: a record
|
|
51
|
+
* draws it as the app the host's `resolveApp` names, never as the
|
|
52
|
+
* address. A glance leaves it out of its words, as it does a file.
|
|
53
|
+
*/
|
|
54
|
+
readonly app?: string;
|
|
55
|
+
/**
|
|
56
|
+
* A DATE THAT MAY REPEAT (`repeat.ts`): its value says how and the next
|
|
57
|
+
* one ("Every Tuesday, next Oct 27"), and a record draws, beside it, the
|
|
58
|
+
* control that changes how it repeats (`<field>Repeat`).
|
|
59
|
+
*/
|
|
60
|
+
readonly repeats?: true;
|
|
61
|
+
/**
|
|
62
|
+
* WHERE A PHONE OR A PLACE TAKES ITS READER: a `tel:` link, or the
|
|
63
|
+
* reader's maps app. A face draws the value as a link to it.
|
|
64
|
+
*/
|
|
65
|
+
readonly href?: string;
|
|
67
66
|
/** The field name in words, after `display.labels` and humanizing. */
|
|
68
67
|
readonly label: string;
|
|
69
68
|
/** The value in words, after `display.format` and the built-in defaults: a day as a person reads it, a choice as it is declared. */
|
|
@@ -89,6 +88,13 @@ export interface ReadableField {
|
|
|
89
88
|
* edits it in a text area.
|
|
90
89
|
*/
|
|
91
90
|
readonly long: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* WRITTEN IN MARKDOWN (FR-180): the declaration says so
|
|
93
|
+
* (`markdownField()`, `{"type": "text", "format": "markdown"}`). A
|
|
94
|
+
* record's page draws it as prose; a glance says its start with the
|
|
95
|
+
* syntax taken out.
|
|
96
|
+
*/
|
|
97
|
+
readonly markdown?: true;
|
|
92
98
|
}
|
|
93
99
|
/** `effectiveFrom` shown to a person is a schema leaking through a surface. */
|
|
94
100
|
/**
|
|
@@ -108,13 +114,6 @@ export declare function humanizeField(field: string): string;
|
|
|
108
114
|
* so `plannedAt` never reaches a person from one surface while another says
|
|
109
115
|
* "Planned at".
|
|
110
116
|
*/
|
|
111
|
-
/**
|
|
112
|
-
* One of a field's values, as the declaration says it: its `display.format`
|
|
113
|
-
* where it has one ("SUV", "Plug-in hybrid"), else the value spoken. A
|
|
114
|
-
* filter that offered "suv" and "plug-in-hybrid" beside a record that said
|
|
115
|
-
* "SUV" and "Plug-in hybrid" read one field two ways.
|
|
116
|
-
*/
|
|
117
|
-
export declare function valueWords(definition: AnyNodeDefinition | undefined, key: string, value: unknown): string;
|
|
118
117
|
/**
|
|
119
118
|
* HOW MANY OF A KIND, in its words: "1 car", "3 cars", "1 test drive" —
|
|
120
119
|
* the noun for one, the plural for the rest. Sentences that took the kind's
|
|
@@ -149,18 +148,6 @@ export declare function pluralLabel(schema: {
|
|
|
149
148
|
readonly plural?: string;
|
|
150
149
|
} | undefined;
|
|
151
150
|
}, kind: string): string;
|
|
152
|
-
/**
|
|
153
|
-
* A RELATION IN WORDS, read from the end you are standing on (FR-142): from
|
|
154
|
-
* the kind that declares it, its `description`; from the far end, its
|
|
155
|
-
* `inverse`. Where the declaration says nothing, the key is spoken —
|
|
156
|
-
* "partOf" is "part of", never `partOf` — so a sentence a person reads never
|
|
157
|
-
* carries a key, whichever surface wrote it.
|
|
158
|
-
*/
|
|
159
|
-
export declare function edgeWords(schema: {
|
|
160
|
-
tryDefinition(kind: string): {
|
|
161
|
-
readonly edges?: unknown;
|
|
162
|
-
} | undefined;
|
|
163
|
-
}, ownerKind: string, edgeKind: string, direction: "out" | "in"): string;
|
|
164
151
|
export declare function fieldWords(definition: {
|
|
165
152
|
readonly display?: {
|
|
166
153
|
readonly labels?: Readonly<Record<string, string>>;
|
|
@@ -186,60 +173,4 @@ export declare function withArticle(word: string): string;
|
|
|
186
173
|
export declare function nounOf(definition: {
|
|
187
174
|
readonly noun?: string;
|
|
188
175
|
} | undefined, kind: string): string;
|
|
189
|
-
/**
|
|
190
|
-
* WHICH of a node's fields a person sees, and HOW each one reads.
|
|
191
|
-
*
|
|
192
|
-
* One implementation, because there were two: the record on a page and the
|
|
193
|
-
* summary on a card each decided this for themselves, and every rule — hide an
|
|
194
|
-
* ordering key, format minutes as a time, render a boolean as a word, drop a
|
|
195
|
-
* value the heading already said — had to be written into both and kept in
|
|
196
|
-
* step by hand. They diverged the day the second one was written, which is how
|
|
197
|
-
* a summary card ended up showing a list's ordering key as a chip reading "0"
|
|
198
|
-
* while the page beside it did not.
|
|
199
|
-
*
|
|
200
|
-
* `said` is what the surrounding view has already put on screen. A value the
|
|
201
|
-
* heading already carries is not information twice, it is the same sentence
|
|
202
|
-
* twice — and where the heading is a SHORTENED form of a field, an exact
|
|
203
|
-
* comparison never catches it, so the summary's stem is compared too.
|
|
204
|
-
*/
|
|
205
|
-
export declare function readableFields(node: Record<string, unknown>, definition: AnyNodeDefinition | undefined, options?: {
|
|
206
|
-
/** How many a GLANCE shows. Unset, every field: a record is read whole (W-156). */
|
|
207
|
-
readonly limit?: number;
|
|
208
|
-
readonly said?: readonly (string | undefined)[];
|
|
209
|
-
/**
|
|
210
|
-
* A GLANCE drops a value the heading already says as a WORD, not only as
|
|
211
|
-
* the whole heading: a vehicle's summary is headed "2027 Subaru Forester
|
|
212
|
-
* Sport", and "Year 2027 · Subaru" under it spent two of its three facts
|
|
213
|
-
* saying the heading again while the price never appeared. A record's
|
|
214
|
-
* full facts keep every field — that is where each is changed.
|
|
215
|
-
*/
|
|
216
|
-
readonly glance?: boolean;
|
|
217
|
-
}): readonly ReadableField[];
|
|
218
|
-
/**
|
|
219
|
-
* WHETHER A FIELD'S VALUE IS PROSE (FR-147): a string field declared to hold
|
|
220
|
-
* more than 500 characters — a document's `text`, or `z.string().max(5000)`
|
|
221
|
-
* in TypeScript — whatever it holds now, so an empty draft is still edited
|
|
222
|
-
* in a text area; or a value with a line break in it, or longer than 160
|
|
223
|
-
* characters.
|
|
224
|
-
*/
|
|
225
|
-
export declare function isLongText(definition: AnyNodeDefinition | undefined, key: string, value: unknown): boolean;
|
|
226
|
-
/** One run of a record's facts: under a group's title, or (the first) under none. */
|
|
227
|
-
export interface FieldSection<F extends {
|
|
228
|
-
readonly key: string;
|
|
229
|
-
} = ReadableField> {
|
|
230
|
-
readonly title?: string;
|
|
231
|
-
readonly fields: readonly F[];
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* A RECORD'S FACTS, IN THE SECTIONS ITS PAGE DECLARES (FR-148).
|
|
235
|
-
*
|
|
236
|
-
* `fields` are read as `readableFields` ordered them. Unsaid, one untitled
|
|
237
|
-
* section of all of them. With `display.page`, its `fields` first, untitled;
|
|
238
|
-
* each of its `groups` under its title; and what neither names under
|
|
239
|
-
* "Details" when there are groups, else after the first fields. A section
|
|
240
|
-
* with nothing to show is left out.
|
|
241
|
-
*/
|
|
242
|
-
export declare function pageSections<F extends {
|
|
243
|
-
readonly key: string;
|
|
244
|
-
}>(definition: AnyNodeDefinition | undefined, fields: readonly F[]): readonly FieldSection<F>[];
|
|
245
176
|
//# sourceMappingURL=define-node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-node.d.ts","sourceRoot":"","sources":["../../src/schema/define-node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAG7B,OAAO,
|
|
1
|
+
{"version":3,"file":"define-node.d.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2
2
|
import { capitalize } from "../capital.js";
|
|
3
|
-
import { filesOf } from "./files.js";
|
|
4
3
|
/**
|
|
5
4
|
* The single declaration everything else derives from. Views, agent tool
|
|
6
5
|
* schemas, drag legality, aggregate contents and accessibility labels all
|
|
@@ -35,48 +34,6 @@ export function isCurrent(definition, node, today) {
|
|
|
35
34
|
}
|
|
36
35
|
return !lifecycle.retired.includes(value);
|
|
37
36
|
}
|
|
38
|
-
/**
|
|
39
|
-
* WHAT TELLS TWO SAME-NAMED THINGS APART, among the nodes a person is
|
|
40
|
-
* choosing from. A single and its album are both "Blue Hour", and every
|
|
41
|
-
* picker, every ask and the Find strip listed "Blue Hour, Blue Hour": a
|
|
42
|
-
* choice nobody could make. For each node whose name another in the list
|
|
43
|
-
* shares, the first fact that differs between them — "single" and "album",
|
|
44
|
-
* or the dates — else its kind, else its id. Nodes with a name of their
|
|
45
|
-
* own get nothing.
|
|
46
|
-
*/
|
|
47
|
-
export function tellApart(nodes, definitionOf) {
|
|
48
|
-
const apart = new Map();
|
|
49
|
-
const byName = new Map();
|
|
50
|
-
for (const node of nodes) {
|
|
51
|
-
const name = labelOf(definitionOf(node.kind), node).trim().toLowerCase();
|
|
52
|
-
byName.set(name, [...(byName.get(name) ?? []), node]);
|
|
53
|
-
}
|
|
54
|
-
for (const same of byName.values()) {
|
|
55
|
-
if (same.length < 2)
|
|
56
|
-
continue;
|
|
57
|
-
const byKind = new Map();
|
|
58
|
-
for (const node of same)
|
|
59
|
-
byKind.set(node.kind, [...(byKind.get(node.kind) ?? []), node]);
|
|
60
|
-
for (const [kind, alike] of byKind) {
|
|
61
|
-
// One of its kind among namesakes of other kinds: the kind is what differs.
|
|
62
|
-
if (alike.length === 1) {
|
|
63
|
-
apart.set(alike[0].id, nounOf(definitionOf(kind), kind));
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
const facts = alike.map((node) => new Map(readableFields(node, definitionOf(node.kind)).map((field) => [field.key, field.alone])));
|
|
67
|
-
const keys = [...new Set(facts.flatMap((fact) => [...fact.keys()]))];
|
|
68
|
-
// A word before a number: "single" and "album" say more than two dates.
|
|
69
|
-
const wordy = (key) => facts.every((fact) => !/\d/.test(fact.get(key) ?? ""));
|
|
70
|
-
const ordered = [...keys.filter(wordy), ...keys.filter((key) => !wordy(key))];
|
|
71
|
-
const telling = ordered.find((key) => new Set(facts.map((fact) => fact.get(key) ?? "")).size === alike.length);
|
|
72
|
-
alike.forEach((node, at) => {
|
|
73
|
-
const fact = telling ? facts[at].get(telling) : undefined;
|
|
74
|
-
apart.set(node.id, fact ?? node.id);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return apart;
|
|
79
|
-
}
|
|
80
37
|
/** Resolves a node's display label, honoring the declaration's override. */
|
|
81
38
|
export function labelOf(definition, node) {
|
|
82
39
|
if (definition?.label) {
|
|
@@ -106,15 +63,6 @@ export function summarize(text, max = 60) {
|
|
|
106
63
|
// A trailing comma or full stop before the ellipsis reads as a typo.
|
|
107
64
|
return `${(boundary > max * 0.5 ? cut.slice(0, boundary) : cut).replace(/[\s,.;:]+$/, "")}…`;
|
|
108
65
|
}
|
|
109
|
-
/** Resolves a node's prose description, used for a11y and tool text. */
|
|
110
|
-
export function describeNode(definition, node) {
|
|
111
|
-
if (definition?.describe) {
|
|
112
|
-
return definition.describe(node);
|
|
113
|
-
}
|
|
114
|
-
return `${node.kind} ${labelOf(definition, node)}`;
|
|
115
|
-
}
|
|
116
|
-
/** Never shown: identity and the name, which the heading already is. */
|
|
117
|
-
const NOT_A_FIELD = new Set(["id", "kind", "label"]);
|
|
118
66
|
/** `effectiveFrom` shown to a person is a schema leaking through a surface. */
|
|
119
67
|
/**
|
|
120
68
|
* WHAT AN ACT IS CALLED, everywhere it is offered — the actions strip, the
|
|
@@ -139,16 +87,6 @@ export function humanizeField(field) {
|
|
|
139
87
|
* so `plannedAt` never reaches a person from one surface while another says
|
|
140
88
|
* "Planned at".
|
|
141
89
|
*/
|
|
142
|
-
/**
|
|
143
|
-
* One of a field's values, as the declaration says it: its `display.format`
|
|
144
|
-
* where it has one ("SUV", "Plug-in hybrid"), else the value spoken. A
|
|
145
|
-
* filter that offered "suv" and "plug-in-hybrid" beside a record that said
|
|
146
|
-
* "SUV" and "Plug-in hybrid" read one field two ways.
|
|
147
|
-
*/
|
|
148
|
-
export function valueWords(definition, key, value) {
|
|
149
|
-
const format = definition?.display?.format?.[key];
|
|
150
|
-
return format ? format(value) : typeof value === "string" ? humanizeField(value) : String(value);
|
|
151
|
-
}
|
|
152
90
|
/**
|
|
153
91
|
* HOW MANY OF A KIND, in its words: "1 car", "3 cars", "1 test drive" —
|
|
154
92
|
* the noun for one, the plural for the rest. Sentences that took the kind's
|
|
@@ -157,7 +95,8 @@ export function valueWords(definition, key, value) {
|
|
|
157
95
|
*/
|
|
158
96
|
export function counted(schema, kind, count) {
|
|
159
97
|
const definition = schema.tryDefinition(kind);
|
|
160
|
-
|
|
98
|
+
// A count is a figure, said in the page's locale like every other (W-198): "7,540 inspections", never "7540".
|
|
99
|
+
return `${numberAsRead(count)} ${count === 1 ? nounOf(definition, kind) : pluralOf(schema, kind).toLowerCase()}`;
|
|
161
100
|
}
|
|
162
101
|
/**
|
|
163
102
|
* WHAT A KIND'S RECORDS ARE CALLED TOGETHER, inside a sentence: its
|
|
@@ -177,19 +116,6 @@ export function pluralOf(schema, kind) {
|
|
|
177
116
|
export function pluralLabel(schema, kind) {
|
|
178
117
|
return capitalize(pluralOf(schema, kind));
|
|
179
118
|
}
|
|
180
|
-
/**
|
|
181
|
-
* A RELATION IN WORDS, read from the end you are standing on (FR-142): from
|
|
182
|
-
* the kind that declares it, its `description`; from the far end, its
|
|
183
|
-
* `inverse`. Where the declaration says nothing, the key is spoken —
|
|
184
|
-
* "partOf" is "part of", never `partOf` — so a sentence a person reads never
|
|
185
|
-
* carries a key, whichever surface wrote it.
|
|
186
|
-
*/
|
|
187
|
-
export function edgeWords(schema, ownerKind, edgeKind, direction) {
|
|
188
|
-
const edges = schema.tryDefinition(ownerKind)?.edges;
|
|
189
|
-
const declared = edges && Object.hasOwn(edges, edgeKind) ? edges[edgeKind] : undefined;
|
|
190
|
-
const said = direction === "out" ? declared?.description : declared?.inverse;
|
|
191
|
-
return said ?? humanizeField(edgeKind).toLowerCase();
|
|
192
|
-
}
|
|
193
119
|
export function fieldWords(definition, key) {
|
|
194
120
|
// A computed field's own label is its words too (FR-83), where the display does not say otherwise.
|
|
195
121
|
const computed = definition?.computed && Object.hasOwn(definition.computed, key) ? definition.computed[key] : undefined;
|
|
@@ -238,174 +164,4 @@ export function withArticle(word) {
|
|
|
238
164
|
export function nounOf(definition, kind) {
|
|
239
165
|
return definition?.noun ?? humanizeField(kind).toLowerCase();
|
|
240
166
|
}
|
|
241
|
-
/** Whether `line` carries `value` as whole words: "2027 Subaru Forester" says "Subaru" and "2027", not "Sub". */
|
|
242
|
-
function saysAsWords(line, value) {
|
|
243
|
-
if (value.length === 0)
|
|
244
|
-
return false;
|
|
245
|
-
const escaped = value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
246
|
-
return new RegExp(`(^|[\\s·,(/])${escaped}($|[\\s·,)/])`).test(line);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* WHICH of a node's fields a person sees, and HOW each one reads.
|
|
250
|
-
*
|
|
251
|
-
* One implementation, because there were two: the record on a page and the
|
|
252
|
-
* summary on a card each decided this for themselves, and every rule — hide an
|
|
253
|
-
* ordering key, format minutes as a time, render a boolean as a word, drop a
|
|
254
|
-
* value the heading already said — had to be written into both and kept in
|
|
255
|
-
* step by hand. They diverged the day the second one was written, which is how
|
|
256
|
-
* a summary card ended up showing a list's ordering key as a chip reading "0"
|
|
257
|
-
* while the page beside it did not.
|
|
258
|
-
*
|
|
259
|
-
* `said` is what the surrounding view has already put on screen. A value the
|
|
260
|
-
* heading already carries is not information twice, it is the same sentence
|
|
261
|
-
* twice — and where the heading is a SHORTENED form of a field, an exact
|
|
262
|
-
* comparison never catches it, so the summary's stem is compared too.
|
|
263
|
-
*/
|
|
264
|
-
export function readableFields(node, definition, options = {}) {
|
|
265
|
-
const display = definition?.display;
|
|
266
|
-
const skip = new Set([...NOT_A_FIELD, ...(display?.hide ?? [])]);
|
|
267
|
-
const said = (options.said ?? []).filter((text) => Boolean(text));
|
|
268
|
-
const stems = said
|
|
269
|
-
.filter((text) => text.endsWith("…"))
|
|
270
|
-
.map((text) => text.replace(/…$/, "").trim())
|
|
271
|
-
.filter((stem) => stem.length > 12);
|
|
272
|
-
const fields = [];
|
|
273
|
-
/*
|
|
274
|
-
* IN THE ORDER THE DECLARATION SAYS, NOT THE ORDER THE RECORD WAS WRITTEN
|
|
275
|
-
* IN (FR-148). This read `Object.entries(node)`, so a record created with
|
|
276
|
-
* three of its fields and given two more later read Status, Summary, Due,
|
|
277
|
-
* Draft, Subject line — the order of its writes, which nobody chose.
|
|
278
|
-
* A glance says what the declaration chose for it first (`display.glance`);
|
|
279
|
-
* a record's page, what its page chose (`display.page`); then the fields
|
|
280
|
-
* as the kind declares them, its computed ones after.
|
|
281
|
-
*/
|
|
282
|
-
// Unchosen, a glance leads with who made the record and when, where the kind's roles say (`fieldRoles.who`, `.when`).
|
|
283
|
-
const roles = definition?.fieldRoles;
|
|
284
|
-
const chosen = options.glance ? (display?.glance ?? [roles?.["who"], roles?.["when"]].filter((key) => !!key)) : pageOrder(display?.page);
|
|
285
|
-
const keys = [...new Set([...chosen, ...declaredOrder(definition), ...Object.keys(node)])].filter((key) => Object.hasOwn(node, key));
|
|
286
|
-
const entries = keys.map((key) => [key, node[key]]);
|
|
287
|
-
for (const [key, value] of entries) {
|
|
288
|
-
if (skip.has(key) || value === undefined || value === null)
|
|
289
|
-
continue;
|
|
290
|
-
const format = display?.format?.[key];
|
|
291
|
-
// A picture or a document (FR-162) is drawn, not said on a glance; its words are its names.
|
|
292
|
-
const files = format ? [] : filesOf(value);
|
|
293
|
-
if (files[0] && options.glance)
|
|
294
|
-
continue;
|
|
295
|
-
/*
|
|
296
|
-
* A NESTED OBJECT HAS NO ONE-LINE RENDERING, and inventing one is worse
|
|
297
|
-
* than leaving it to a view that knows what it is.
|
|
298
|
-
*
|
|
299
|
-
* That was true of an object and was not checked of an ARRAY of them,
|
|
300
|
-
* which fell through to `join(", ")` — so a piece of ground with a
|
|
301
|
-
* five-corner outline had a field on its record reading "[object
|
|
302
|
-
* Object], [object Object], [object Object], [object Object]". Nobody
|
|
303
|
-
* wrote that; nobody could have read it. The shape is drawn on the map
|
|
304
|
-
* and belongs there, not in a list of words.
|
|
305
|
-
*
|
|
306
|
-
* A declaration that HAS a one-line rendering says so with `format`,
|
|
307
|
-
* and then it is the declaration's sentence rather than this one's
|
|
308
|
-
* guess — "5 corners" is a useful thing to say and only the app knows
|
|
309
|
-
* that the numbers are corners.
|
|
310
|
-
*/
|
|
311
|
-
const nested = !files[0] &&
|
|
312
|
-
typeof value === "object" &&
|
|
313
|
-
(!Array.isArray(value) || value.some((one) => typeof one === "object" && one !== null));
|
|
314
|
-
if (nested && format === undefined)
|
|
315
|
-
continue;
|
|
316
|
-
const stored = files[0] ? files.map((file) => (file.caption ? `${file.name} — ${file.caption}` : file.name)).join(", ") : Array.isArray(value) ? value.join(", ") : typeof value === "boolean" ? (value ? "Yes" : "No") : String(value);
|
|
317
|
-
const text = format
|
|
318
|
-
? format(value)
|
|
319
|
-
: Array.isArray(value) || typeof value === "boolean"
|
|
320
|
-
? // Nobody says "false". A boolean is a state, and the words for a
|
|
321
|
-
// state are words.
|
|
322
|
-
stored
|
|
323
|
-
: /*
|
|
324
|
-
* A DAY AS A PERSON READS IT ("28 Aug 2026"), on a glance and in a
|
|
325
|
-
* record's facts alike; the edit control holds it as it is written
|
|
326
|
-
* (`stored`). And a CHOICE as it is declared — its `display.format`,
|
|
327
|
-
* else the value spoken — never the code it is kept as ("tue").
|
|
328
|
-
*/
|
|
329
|
-
typeof value === "string" && ISO_DAY.test(value)
|
|
330
|
-
? dayAsRead(value)
|
|
331
|
-
: typeof value === "string" && isChoice(definition, key)
|
|
332
|
-
? valueWords(definition, key, value)
|
|
333
|
-
: stored;
|
|
334
|
-
if (said.includes(text) || stems.some((stem) => text.startsWith(stem)))
|
|
335
|
-
continue;
|
|
336
|
-
if (options.glance && (typeof value === "string" || typeof value === "number") && said.some((line) => saysAsWords(line, text)))
|
|
337
|
-
continue;
|
|
338
|
-
const label = fieldWords(definition, key);
|
|
339
|
-
const alone =
|
|
340
|
-
// A yes or no the kind words itself ("Not yet inducted") is said whole; "Inducted: not yet inducted" said it twice (W-187).
|
|
341
|
-
typeof value === "number" ? `${label} ${text}` : typeof value === "boolean" && !format ? `${label}: ${text.toLowerCase()}` : text;
|
|
342
|
-
fields.push({ key, label, value: text, stored, alone, long: typeof value === "string" && isLongText(definition, key, text), ...(files[0] ? { files } : {}) });
|
|
343
|
-
if (options.limit !== undefined && fields.length >= options.limit)
|
|
344
|
-
break;
|
|
345
|
-
}
|
|
346
|
-
return fields;
|
|
347
|
-
}
|
|
348
|
-
/** Whether a field is one of a declared set of values (`z.enum`), under optional, default and nullable. */
|
|
349
|
-
function isChoice(definition, key) {
|
|
350
|
-
let at = definition?.fields?.shape?.[key];
|
|
351
|
-
for (let depth = 0; depth < 6 && at?._zod?.def?.innerType !== undefined; depth++)
|
|
352
|
-
at = at._zod.def.innerType;
|
|
353
|
-
return at?._zod?.def?.type === "enum";
|
|
354
|
-
}
|
|
355
|
-
/** The kind's fields as it declares them, then its computed fields. */
|
|
356
|
-
function declaredOrder(definition) {
|
|
357
|
-
const shape = definition?.fields?.shape;
|
|
358
|
-
return [...Object.keys(shape ?? {}), ...Object.keys(definition?.computed ?? {})];
|
|
359
|
-
}
|
|
360
|
-
/** Every field a page names, in the order it names them: its first fields, then each group's. */
|
|
361
|
-
function pageOrder(page) {
|
|
362
|
-
return [...(page?.fields ?? []), ...(page?.groups ?? []).flatMap((group) => group.fields)];
|
|
363
|
-
}
|
|
364
|
-
/** What a string field may hold beyond which it is prose: a document's `string` holds 500, its `text` 20,000. */
|
|
365
|
-
const PROSE_ALLOWED = 500;
|
|
366
|
-
/** A value this long, or with a line break in it, is read as prose whatever its field allows. */
|
|
367
|
-
const PROSE_LENGTH = 160;
|
|
368
|
-
/** The string schema under optional, default and nullable. */
|
|
369
|
-
function stringSchema(schema) {
|
|
370
|
-
let at = schema;
|
|
371
|
-
for (let depth = 0; depth < 6 && at?._zod?.def?.innerType !== undefined; depth++)
|
|
372
|
-
at = at._zod.def.innerType;
|
|
373
|
-
return at?._zod?.def?.type === "string" ? at._zod.def : undefined;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* WHETHER A FIELD'S VALUE IS PROSE (FR-147): a string field declared to hold
|
|
377
|
-
* more than 500 characters — a document's `text`, or `z.string().max(5000)`
|
|
378
|
-
* in TypeScript — whatever it holds now, so an empty draft is still edited
|
|
379
|
-
* in a text area; or a value with a line break in it, or longer than 160
|
|
380
|
-
* characters.
|
|
381
|
-
*/
|
|
382
|
-
export function isLongText(definition, key, value) {
|
|
383
|
-
const field = stringSchema(definition?.fields?.shape?.[key]);
|
|
384
|
-
if (field?.checks?.some((check) => check._zod?.def?.check === "max_length" && (check._zod.def.maximum ?? 0) > PROSE_ALLOWED))
|
|
385
|
-
return true;
|
|
386
|
-
return typeof value === "string" && (value.includes("\n") || value.length > PROSE_LENGTH);
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* A RECORD'S FACTS, IN THE SECTIONS ITS PAGE DECLARES (FR-148).
|
|
390
|
-
*
|
|
391
|
-
* `fields` are read as `readableFields` ordered them. Unsaid, one untitled
|
|
392
|
-
* section of all of them. With `display.page`, its `fields` first, untitled;
|
|
393
|
-
* each of its `groups` under its title; and what neither names under
|
|
394
|
-
* "Details" when there are groups, else after the first fields. A section
|
|
395
|
-
* with nothing to show is left out.
|
|
396
|
-
*/
|
|
397
|
-
export function pageSections(definition, fields) {
|
|
398
|
-
const page = definition?.display?.page;
|
|
399
|
-
const groups = page?.groups ?? [];
|
|
400
|
-
const byKey = new Map(fields.map((field) => [field.key, field]));
|
|
401
|
-
const named = new Set(pageOrder(page));
|
|
402
|
-
const pick = (keys) => keys.flatMap((key) => (byKey.has(key) ? [byKey.get(key)] : []));
|
|
403
|
-
const rest = fields.filter((field) => !named.has(field.key));
|
|
404
|
-
const sections = [
|
|
405
|
-
{ fields: [...pick(page?.fields ?? []), ...(groups.length > 0 ? [] : rest)] },
|
|
406
|
-
...groups.map((group) => ({ title: group.title, fields: pick(group.fields) })),
|
|
407
|
-
...(groups.length > 0 ? [{ title: "Details", fields: rest }] : []),
|
|
408
|
-
];
|
|
409
|
-
return sections.filter((section) => section.fields.length > 0);
|
|
410
|
-
}
|
|
411
167
|
//# sourceMappingURL=define-node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-node.js","sourceRoot":"","sources":["../../src/schema/define-node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAkB,MAAM,YAAY,CAAC;AAUrD;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAIxB,IAAO,EAAE,IAA8B;IACvC,OAAO;QACL,GAAG,IAAI;QACP,IAAI;QACJ,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAK,EAAQ,CAAM;KACtC,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,UAAyC,EACzC,IAA4D,EAC5D,KAAc;IAEd,MAAM,SAAS,GAAG,UAAU,EAAE,SAAS,CAAC;IACxC,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,SAAS,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC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