@dialecte/core 0.7.0 → 0.8.1
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/dist/assets/hub.worker-B1HcVDhn.js +2 -0
- package/dist/diagnostics/diagnostics.d.ts +4 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics/types.d.ts +6 -1
- package/dist/diagnostics/types.d.ts.map +1 -1
- package/dist/dialecte/create-dialecte-project.d.ts +11 -0
- package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
- package/dist/dialecte/create-project-factory.d.ts +14 -0
- package/dist/dialecte/create-project-factory.d.ts.map +1 -0
- package/dist/dialecte/define-dialecte.d.ts +12 -0
- package/dist/dialecte/define-dialecte.d.ts.map +1 -0
- package/dist/dialecte/dialecte.constants.d.ts +4 -0
- package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
- package/dist/dialecte/dialecte.types.d.ts +75 -0
- package/dist/dialecte/dialecte.types.d.ts.map +1 -0
- package/dist/dialecte/index.d.ts +4 -0
- package/dist/dialecte/index.d.ts.map +1 -0
- package/dist/{project-DIKdMMHx.js → dialecte-gIPrRzni.js} +8031 -8457
- package/dist/document/bind-extensions.d.ts +4 -1
- package/dist/document/bind-extensions.d.ts.map +1 -1
- package/dist/document/document.d.ts +58 -5
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/progress/progress.types.d.ts +21 -4
- package/dist/document/progress/progress.types.d.ts.map +1 -1
- package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
- package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
- package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
- package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
- package/dist/document/query/get/definition/get-definition.d.ts +2 -0
- package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
- package/dist/document/query/get/record/get-child.d.ts +2 -0
- package/dist/document/query/get/record/get-child.d.ts.map +1 -1
- package/dist/document/query/get/record/get-children.d.ts +2 -0
- package/dist/document/query/get/record/get-children.d.ts.map +1 -1
- package/dist/document/query/get/record/get-record.d.ts +2 -0
- package/dist/document/query/get/record/get-record.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
- package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records.d.ts +2 -0
- package/dist/document/query/get/record/get-records.d.ts.map +1 -1
- package/dist/document/query/get/record/load-live-records.d.ts +2 -0
- package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
- package/dist/document/query/get/record/resolve-record.d.ts +2 -0
- package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
- package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
- package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
- package/dist/document/query/get/tree/get-tree.d.ts +6 -0
- package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
- package/dist/document/query/main.d.ts +50 -15
- package/dist/document/query/main.d.ts.map +1 -1
- package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
- package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
- package/dist/document/query/tree-filter/omit.d.ts +8 -0
- package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
- package/dist/document/query/tree-filter/order.d.ts +5 -2
- package/dist/document/query/tree-filter/order.d.ts.map +1 -1
- package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
- package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
- package/dist/document/staged-operations.d.ts +5 -1
- package/dist/document/staged-operations.d.ts.map +1 -1
- package/dist/document/transaction/clone/clone.d.ts +2 -0
- package/dist/document/transaction/clone/clone.d.ts.map +1 -1
- package/dist/document/transaction/commit/commit.d.ts.map +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
- package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
- package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
- package/dist/document/transaction/create/create.d.ts +2 -0
- package/dist/document/transaction/create/create.d.ts.map +1 -1
- package/dist/document/transaction/guard.d.ts +5 -0
- package/dist/document/transaction/guard.d.ts.map +1 -1
- package/dist/document/transaction/index.d.ts +2 -0
- package/dist/document/transaction/index.d.ts.map +1 -1
- package/dist/document/transaction/main.d.ts +46 -16
- package/dist/document/transaction/main.d.ts.map +1 -1
- package/dist/document/transaction/stage-operations.d.ts.map +1 -1
- package/dist/document/transaction/update/update.d.ts +2 -0
- package/dist/document/transaction/update/update.d.ts.map +1 -1
- package/dist/document/types.d.ts +3 -5
- package/dist/document/types.d.ts.map +1 -1
- package/dist/document/types.extensions.d.ts.map +1 -1
- package/dist/engine-store-CIEqgPUb.js +348 -0
- package/dist/engine.constants-DBMjMmV9.js +98 -0
- package/dist/engine.d.ts +9 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +15805 -0
- package/dist/errors/codes.d.ts +451 -0
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/errors/errors.constants.d.ts +3 -0
- package/dist/errors/errors.constants.d.ts.map +1 -0
- package/dist/errors/errors.d.ts +10 -0
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/types.d.ts +14 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/helpers/assert-fixed.d.ts +3 -1
- package/dist/helpers/assert-fixed.d.ts.map +1 -1
- package/dist/helpers/assert-xml-characters.d.ts +35 -0
- package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
- package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
- package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
- package/dist/helpers/assert-xsi-type.d.ts +4 -0
- package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
- package/dist/helpers/converter.d.ts +21 -6
- package/dist/helpers/converter.d.ts.map +1 -1
- package/dist/helpers/evaluate-expectations.d.ts +21 -0
- package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
- package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
- package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
- package/dist/helpers/guard.d.ts +24 -4
- package/dist/helpers/guard.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/merge-extensions.d.ts +2 -0
- package/dist/helpers/merge-extensions.d.ts.map +1 -1
- package/dist/helpers/read-attributes.d.ts +4 -0
- package/dist/helpers/read-attributes.d.ts.map +1 -1
- package/dist/helpers/standardizing.d.ts +10 -0
- package/dist/helpers/standardizing.d.ts.map +1 -1
- package/dist/helpers/strip-attributes.d.ts +2 -0
- package/dist/helpers/strip-attributes.d.ts.map +1 -1
- package/dist/helpers-DVShv41E.js +489 -0
- package/dist/helpers.js +3 -439
- package/dist/in-process-link-DBeAOZRp.js +2791 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -12
- package/dist/perf/create-perf.d.ts +8 -1
- package/dist/perf/create-perf.d.ts.map +1 -1
- package/dist/perf/index.d.ts +1 -1
- package/dist/perf/index.d.ts.map +1 -1
- package/dist/perf/noop-perf.d.ts.map +1 -1
- package/dist/perf/perf.types.d.ts +65 -6
- package/dist/perf/perf.types.d.ts.map +1 -1
- package/dist/project/index.d.ts +7 -5
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/export-blob.d.ts +5 -2
- package/dist/project/io/export-blob.d.ts.map +1 -1
- package/dist/project/io/export-document.d.ts +5 -4
- package/dist/project/io/export-document.d.ts.map +1 -1
- package/dist/project/io/index.d.ts +1 -1
- package/dist/project/io/index.d.ts.map +1 -1
- package/dist/project/io/init-empty-document.d.ts +2 -0
- package/dist/project/io/init-empty-document.d.ts.map +1 -1
- package/dist/project/io/run-export.d.ts +19 -0
- package/dist/project/io/run-export.d.ts.map +1 -0
- package/dist/project/io/run-export.types.d.ts +45 -0
- package/dist/project/io/run-export.types.d.ts.map +1 -0
- package/dist/project/io/run-import.d.ts +15 -0
- package/dist/project/io/run-import.d.ts.map +1 -0
- package/dist/project/io/run-import.types.d.ts +19 -0
- package/dist/project/io/run-import.types.d.ts.map +1 -0
- package/dist/project/io/store-runtime.constants.d.ts +6 -0
- package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
- package/dist/project/io/store-runtime.d.ts +12 -0
- package/dist/project/io/store-runtime.d.ts.map +1 -0
- package/dist/project/io/store-runtime.types.d.ts +18 -0
- package/dist/project/io/store-runtime.types.d.ts.map +1 -0
- package/dist/project/project-channel.d.ts +11 -0
- package/dist/project/project-channel.d.ts.map +1 -0
- package/dist/project/project.constants.d.ts +12 -0
- package/dist/project/project.constants.d.ts.map +1 -0
- package/dist/project/project.d.ts +315 -31
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/state/document-lifecycle.d.ts +0 -12
- package/dist/project/state/document-lifecycle.d.ts.map +1 -1
- package/dist/project/state/document-state.d.ts +4 -0
- package/dist/project/state/document-state.d.ts.map +1 -1
- package/dist/project/types.d.ts +126 -60
- package/dist/project/types.d.ts.map +1 -1
- package/dist/project-key-Ch34EtFa.js +1435 -0
- package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
- package/dist/running-operations-vnijBvn7.js +76 -0
- package/dist/same-json-value-C6kUaoyt.js +1603 -0
- package/dist/sqlite.d.ts +5 -0
- package/dist/sqlite.d.ts.map +1 -0
- package/dist/sqlite.js +2671 -0
- package/dist/sqlite3.wasm +0 -0
- package/dist/store/apply-record-patch.d.ts +13 -0
- package/dist/store/apply-record-patch.d.ts.map +1 -0
- package/dist/store/closing-connections.d.ts +7 -0
- package/dist/store/closing-connections.d.ts.map +1 -0
- package/dist/store/closing-connections.types.d.ts +13 -0
- package/dist/store/closing-connections.types.d.ts.map +1 -0
- package/dist/store/commit-progress.d.ts +10 -0
- package/dist/store/commit-progress.d.ts.map +1 -0
- package/dist/store/compare-by-id.d.ts +10 -0
- package/dist/store/compare-by-id.d.ts.map +1 -0
- package/dist/store/document-path.constants.d.ts +20 -0
- package/dist/store/document-path.constants.d.ts.map +1 -0
- package/dist/store/document-path.d.ts +75 -0
- package/dist/store/document-path.d.ts.map +1 -0
- package/dist/store/document-path.types.d.ts +11 -0
- package/dist/store/document-path.types.d.ts.map +1 -0
- package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
- package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
- package/dist/store/engine/client/client.constants.d.ts +30 -0
- package/dist/store/engine/client/client.constants.d.ts.map +1 -0
- package/dist/store/engine/client/client.types.d.ts +200 -0
- package/dist/store/engine/client/client.types.d.ts.map +1 -0
- package/dist/store/engine/client/engine-client.d.ts +15 -0
- package/dist/store/engine/client/engine-client.d.ts.map +1 -0
- package/dist/store/engine/client/engine-control.d.ts +16 -0
- package/dist/store/engine/client/engine-control.d.ts.map +1 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.d.ts +11 -0
- package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
- package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
- package/dist/store/engine/client/worker-connector.d.ts +32 -0
- package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
- package/dist/store/engine/creation-refusal.d.ts +10 -0
- package/dist/store/engine/creation-refusal.d.ts.map +1 -0
- package/dist/store/engine/dialecte-refusal.d.ts +18 -0
- package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
- package/dist/store/engine/engine-store.d.ts +163 -0
- package/dist/store/engine/engine-store.d.ts.map +1 -0
- package/dist/store/engine/engine-store.types.d.ts +53 -0
- package/dist/store/engine/engine-store.types.d.ts.map +1 -0
- package/dist/store/engine/engine.constants.d.ts +14 -0
- package/dist/store/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/engine/engine.types.d.ts +165 -0
- package/dist/store/engine/engine.types.d.ts.map +1 -0
- package/dist/store/engine/host/engine-wire.d.ts +19 -0
- package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
- package/dist/store/engine/host/heartbeat.d.ts +33 -0
- package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
- package/dist/store/engine/host/host.constants.d.ts +13 -0
- package/dist/store/engine/host/host.constants.d.ts.map +1 -0
- package/dist/store/engine/host/host.types.d.ts +65 -0
- package/dist/store/engine/host/host.types.d.ts.map +1 -0
- package/dist/store/engine/host/store-events.d.ts +14 -0
- package/dist/store/engine/host/store-events.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.d.ts +46 -0
- package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
- package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-router.d.ts +9 -0
- package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.d.ts +13 -0
- package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.constants.d.ts +33 -0
- package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.types.d.ts +305 -0
- package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.worker.d.ts +2 -0
- package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.d.ts +10 -0
- package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
- package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
- package/dist/store/engine/project-key.d.ts +15 -0
- package/dist/store/engine/project-key.d.ts.map +1 -0
- package/dist/store/engine/wire/error-envelope.d.ts +25 -0
- package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
- package/dist/store/engine/wire/wire-values.d.ts +33 -0
- package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.constants.d.ts +116 -0
- package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.types.d.ts +119 -0
- package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
- package/dist/store/hub-public.d.ts +33 -0
- package/dist/store/hub-public.d.ts.map +1 -0
- package/dist/store/ignore-destroy-outcome.d.ts +6 -0
- package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-state.d.ts +46 -0
- package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.d.ts +105 -17
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/in-memory/types.d.ts +55 -1
- package/dist/store/in-memory/types.d.ts.map +1 -1
- package/dist/store/index.d.ts +8 -2
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/json-values.constants.d.ts +18 -0
- package/dist/store/json-values.constants.d.ts.map +1 -0
- package/dist/store/json-values.d.ts +40 -0
- package/dist/store/json-values.d.ts.map +1 -0
- package/dist/store/json-values.types.d.ts +18 -0
- package/dist/store/json-values.types.d.ts.map +1 -0
- package/dist/store/local/dexie-store.constants.d.ts +20 -0
- package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
- package/dist/store/local/dexie-store.d.ts +134 -5
- package/dist/store/local/dexie-store.d.ts.map +1 -1
- package/dist/store/local/types.d.ts +6 -0
- package/dist/store/local/types.d.ts.map +1 -1
- package/dist/store/lost-write.d.ts +32 -0
- package/dist/store/lost-write.d.ts.map +1 -0
- package/dist/store/lost-write.types.d.ts +4 -0
- package/dist/store/lost-write.types.d.ts.map +1 -0
- package/dist/store/open-connections.d.ts +4 -0
- package/dist/store/open-connections.d.ts.map +1 -0
- package/dist/store/open-connections.types.d.ts +17 -0
- package/dist/store/open-connections.types.d.ts.map +1 -0
- package/dist/store/own-import.d.ts +10 -0
- package/dist/store/own-import.d.ts.map +1 -0
- package/dist/store/project-name.d.ts +10 -0
- package/dist/store/project-name.d.ts.map +1 -0
- package/dist/store/resolve-store.d.ts +28 -4
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/running-operations.d.ts +7 -0
- package/dist/store/running-operations.d.ts.map +1 -0
- package/dist/store/running-operations.types.d.ts +10 -0
- package/dist/store/running-operations.types.d.ts.map +1 -0
- package/dist/store/same-json-value.d.ts +9 -0
- package/dist/store/same-json-value.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/blobs.d.ts +55 -0
- package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
- package/dist/store/sqlite/engine/commit.d.ts +20 -0
- package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
- package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
- package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
- package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/history.d.ts +114 -0
- package/dist/store/sqlite/engine/history.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
- package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-target.d.ts +23 -0
- package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-window.d.ts +23 -0
- package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
- package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
- package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
- package/dist/store/sqlite/engine/records.d.ts +117 -0
- package/dist/store/sqlite/engine/records.d.ts.map +1 -0
- package/dist/store/sqlite/engine/registry.d.ts +76 -0
- package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
- package/dist/store/sqlite/engine/schema.d.ts +57 -0
- package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
- package/dist/store/sqlite/engine/transaction.d.ts +12 -0
- package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
- package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.d.ts +22 -0
- package/dist/store/sqlite/list-projects.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.types.d.ts +28 -0
- package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
- package/dist/store/sqlite/load-sqlite.d.ts +11 -0
- package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-text.d.ts +20 -0
- package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
- package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.types.d.ts +36 -0
- package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
- package/dist/store/sqlite-storage.constants.d.ts +14 -0
- package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
- package/dist/store/sqlite-storage.d.ts +22 -0
- package/dist/store/sqlite-storage.d.ts.map +1 -0
- package/dist/store/sqlite-storage.types.d.ts +24 -0
- package/dist/store/sqlite-storage.types.d.ts.map +1 -0
- package/dist/store/store-errors.d.ts +51 -0
- package/dist/store/store-errors.d.ts.map +1 -0
- package/dist/store/store.constants.d.ts +15 -3
- package/dist/store/store.constants.d.ts.map +1 -1
- package/dist/store/store.types.d.ts +280 -16
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/store/stored-record.d.ts +16 -0
- package/dist/store/stored-record.d.ts.map +1 -0
- package/dist/store/unfinished-imports.d.ts +15 -0
- package/dist/store/unfinished-imports.d.ts.map +1 -0
- package/dist/store/write-outcome.d.ts +34 -0
- package/dist/store/write-outcome.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
- package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-xml/assert-xml.d.ts +23 -34
- package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
- package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
- package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
- package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
- package/dist/test/assert-xml/index.d.ts +1 -1
- package/dist/test/assert-xml/index.d.ts.map +1 -1
- package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
- package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
- package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
- package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
- package/dist/test/config.d.ts +5 -0
- package/dist/test/config.d.ts.map +1 -1
- package/dist/test/constant.d.ts +2 -0
- package/dist/test/constant.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.d.ts +32 -37
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.types.d.ts +99 -0
- package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
- package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers.d.ts +13 -0
- package/dist/test/create-test-helpers.d.ts.map +1 -0
- package/dist/test/create-test-helpers.types.d.ts +50 -0
- package/dist/test/create-test-helpers.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
- package/dist/test/generated/definition.generated.d.ts +5 -0
- package/dist/test/generated/definition.generated.d.ts.map +1 -1
- package/dist/test/in-memory-storage.setup.d.ts +2 -0
- package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
- package/dist/test/index.d.ts +6 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/normalize-uuids.constants.d.ts +3 -0
- package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
- package/dist/test/normalize-uuids.d.ts +12 -0
- package/dist/test/normalize-uuids.d.ts.map +1 -1
- package/dist/test/run-test-cases.d.ts +30 -11
- package/dist/test/run-test-cases.d.ts.map +1 -1
- package/dist/test/run-test-cases.type.d.ts +16 -0
- package/dist/test/run-test-cases.type.d.ts.map +1 -1
- package/dist/test/sqlite-storage.setup.d.ts +1 -0
- package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.d.ts +31 -0
- package/dist/test/test-dialecte-setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.types.d.ts +29 -0
- package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.d.ts +2722 -0
- package/dist/test/test-dialecte.d.ts.map +1 -0
- package/dist/test/test-dialecte.types.d.ts +3 -0
- package/dist/test/test-dialecte.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.worker.d.ts +2 -0
- package/dist/test/test-dialecte.worker.d.ts.map +1 -0
- package/dist/test/test-entry-environment.constants.d.ts +27 -0
- package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
- package/dist/test/test-record.d.ts +49 -1
- package/dist/test/test-record.d.ts.map +1 -1
- package/dist/test/test-storage/index.d.ts +5 -0
- package/dist/test/test-storage/index.d.ts.map +1 -0
- package/dist/test/test-storage/read-test-storage.d.ts +4 -0
- package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
- package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.types.d.ts +15 -0
- package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
- package/dist/test/test-storage/test-store-for.d.ts +19 -0
- package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
- package/dist/test/test-storage/use-test-storage.d.ts +14 -0
- package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
- package/dist/test/test-timing.constants.d.ts +15 -0
- package/dist/test/test-timing.constants.d.ts.map +1 -0
- package/dist/test/xml/engine-console.d.ts +6 -0
- package/dist/test/xml/engine-console.d.ts.map +1 -0
- package/dist/test/xml/engine.d.ts +3 -0
- package/dist/test/xml/engine.d.ts.map +1 -0
- package/dist/test/xml/index.d.ts +8 -0
- package/dist/test/xml/index.d.ts.map +1 -0
- package/dist/test/xml/malformed-xml-error.d.ts +5 -0
- package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
- package/dist/test/xml/print-node.d.ts +7 -0
- package/dist/test/xml/print-node.d.ts.map +1 -0
- package/dist/test/xml/select-nodes.d.ts +14 -0
- package/dist/test/xml/select-nodes.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
- package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.d.ts +14 -0
- package/dist/test/xml/with-xml-document.d.ts.map +1 -0
- package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
- package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
- package/dist/test/xml/xml.constants.d.ts +16 -0
- package/dist/test/xml/xml.constants.d.ts.map +1 -0
- package/dist/test/xml/xml.types.d.ts +31 -0
- package/dist/test/xml/xml.types.d.ts.map +1 -0
- package/dist/test/xsd/test-ext.xsd +226 -0
- package/dist/test/xsd/test.xsd +528 -0
- package/dist/test.js +3427 -406
- package/dist/types/dialecte-config.d.ts +6 -0
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/types/io.d.ts +5 -0
- package/dist/types/io.d.ts.map +1 -1
- package/dist/utils/attribute-rules.d.ts +16 -1
- package/dist/utils/attribute-rules.d.ts.map +1 -1
- package/dist/utils/child-occurrences.constants.d.ts +4 -0
- package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
- package/dist/utils/child-occurrences.d.ts +17 -0
- package/dist/utils/child-occurrences.d.ts.map +1 -0
- package/dist/utils/child-occurrences.types.d.ts +6 -0
- package/dist/utils/child-occurrences.types.d.ts.map +1 -0
- package/dist/utils/datatype.d.ts +4 -0
- package/dist/utils/datatype.d.ts.map +1 -1
- package/dist/utils/format-xml.d.ts +4 -0
- package/dist/utils/format-xml.d.ts.map +1 -1
- package/dist/utils/index.d.ts +5 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/invariant.d.ts +2 -0
- package/dist/utils/invariant.d.ts.map +1 -1
- package/dist/utils/namespaces.d.ts +15 -1
- package/dist/utils/namespaces.d.ts.map +1 -1
- package/dist/utils/order-children.d.ts +14 -3
- package/dist/utils/order-children.d.ts.map +1 -1
- package/dist/utils/order-children.types.d.ts +10 -0
- package/dist/utils/order-children.types.d.ts.map +1 -0
- package/dist/utils/particle-occurrences.d.ts +4 -0
- package/dist/utils/particle-occurrences.d.ts.map +1 -0
- package/dist/utils/required-choices.d.ts +17 -0
- package/dist/utils/required-choices.d.ts.map +1 -0
- package/dist/utils/required-choices.types.d.ts +15 -0
- package/dist/utils/required-choices.types.d.ts.map +1 -0
- package/dist/utils/resolve-definition.d.ts +4 -0
- package/dist/utils/resolve-definition.d.ts.map +1 -1
- package/dist/utils/save-to-disk.constants.d.ts +3 -0
- package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
- package/dist/utils/save-to-disk.d.ts +17 -5
- package/dist/utils/save-to-disk.d.ts.map +1 -1
- package/dist/utils/save-to-disk.types.d.ts +17 -0
- package/dist/utils/save-to-disk.types.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.constants.d.ts +5 -0
- package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.d.ts +15 -0
- package/dist/utils/seeded-uuid.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.types.d.ts +8 -0
- package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
- package/dist/utils/tell-listener.constants.d.ts +9 -0
- package/dist/utils/tell-listener.constants.d.ts.map +1 -0
- package/dist/utils/tell-listener.d.ts +24 -0
- package/dist/utils/tell-listener.d.ts.map +1 -0
- package/dist/utils/xml-characters.constants.d.ts +9 -0
- package/dist/utils/xml-characters.constants.d.ts.map +1 -0
- package/dist/utils/xml-characters.d.ts +8 -0
- package/dist/utils/xml-characters.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.constants.d.ts +8 -0
- package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.d.ts +19 -0
- package/dist/utils/xml-whitespace.d.ts.map +1 -0
- package/dist/utils/xsi-type.d.ts +4 -0
- package/dist/utils/xsi-type.d.ts.map +1 -1
- package/dist/utils/yield-to-queue.d.ts +6 -0
- package/dist/utils/yield-to-queue.d.ts.map +1 -0
- package/dist/utils-USNkj4sT.js +1275 -0
- package/dist/utils.js +1 -2
- package/dist/xml/build/document-root.d.ts +7 -0
- package/dist/xml/build/document-root.d.ts.map +1 -0
- package/dist/xml/build/index.d.ts +0 -5
- package/dist/xml/build/index.d.ts.map +1 -1
- package/dist/xml/build/record-element.d.ts +15 -0
- package/dist/xml/build/record-element.d.ts.map +1 -0
- package/dist/xml/build/record-element.types.d.ts +12 -0
- package/dist/xml/build/record-element.types.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.d.ts +7 -0
- package/dist/xml/build/write-xml-records.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.types.d.ts +11 -0
- package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
- package/dist/xml/build/xml-element.d.ts +79 -0
- package/dist/xml/build/xml-element.d.ts.map +1 -0
- package/dist/xml/build/xml-element.types.d.ts +34 -0
- package/dist/xml/build/xml-element.types.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.constants.d.ts +24 -0
- package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.d.ts +40 -0
- package/dist/xml/build/xml-writer.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.types.d.ts +34 -0
- package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
- package/dist/xml/dom/index.d.ts +3 -0
- package/dist/xml/dom/index.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
- package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/inspect-xml.d.ts +2 -0
- package/dist/xml/inspect-xml.d.ts.map +1 -1
- package/dist/xml/parse/index.d.ts +1 -1
- package/dist/xml/parse/index.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
- package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
- package/dist/xml/parse/parse-xml-document.d.ts +13 -2
- package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.types.d.ts +7 -2
- package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
- package/dist/xml/parse/parser.constants.d.ts +7 -0
- package/dist/xml/parse/parser.constants.d.ts.map +1 -0
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/package.json +88 -10
- package/skills/dialecte/SKILL.md +345 -0
- package/skills/dialecte/references/api.json +1830 -0
- package/skills/dialecte/references/api.md +557 -0
- package/skills/dialecte/references/core-api.md +205 -0
- package/skills/dialecte/references/testing.md +116 -0
- package/skills/dialecte-contributing/SKILL.md +374 -0
- package/skills/dialecte-contributing/references/code-rules.md +115 -0
- package/skills/dialecte-contributing/references/landing-changes.md +87 -0
- package/skills/dialecte-contributing/references/lot-in-a-package.md +45 -0
- package/skills/dialecte-contributing/references/perf.md +40 -0
- package/skills/dialecte-contributing/references/traps.md +109 -0
- package/skills/dialecte-lot/SKILL.md +526 -0
- package/skills/dialecte-lot/references/briefs.md +161 -0
- package/skills/dialecte-lot/references/model-tiers.md +52 -0
- package/skills/dialecte-lot/references/retro.md +51 -0
- package/skills/dialecte-lot/references/standard-check.md +45 -0
- package/skills/dialecte-lot/references/stations.md +110 -0
- package/dist/project/io/import-document.d.ts +0 -7
- package/dist/project/io/import-document.d.ts.map +0 -1
- package/dist/test/assert-xml/types.d.ts +0 -2
- package/dist/test/assert-xml/types.d.ts.map +0 -1
- package/dist/utils-DJN0Md0v.js +0 -624
- package/dist/xml/build/build-xml-document.d.ts +0 -10
- package/dist/xml/build/build-xml-document.d.ts.map +0 -1
- package/dist/xml/build/build-xml-document.types.d.ts +0 -22
- package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
- package/dist/xml/build/download-file.d.ts +0 -7
- package/dist/xml/build/download-file.d.ts.map +0 -1
- package/dist/xml/build/formatter.d.ts +0 -2
- package/dist/xml/build/formatter.d.ts.map +0 -1
- package/dist/xml/build/serialize.d.ts +0 -11
- package/dist/xml/build/serialize.d.ts.map +0 -1
- package/dist/xml/build/serialize.types.d.ts +0 -12
- package/dist/xml/build/serialize.types.d.ts.map +0 -1
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
# @dialecte/core API index
|
|
2
|
+
|
|
3
|
+
Generated from the source by `dialecte skills generate`: every public method of the project, document, query and transaction, with the first
|
|
4
|
+
paragraph of its JSDoc and its `@intent` tags. It is the same in the repository and in the installed
|
|
5
|
+
package, and `npm run skills:check` keeps it fresh.
|
|
6
|
+
|
|
7
|
+
Look up your need in the first table (what you are trying to do), then read the method's row. When a
|
|
8
|
+
method looks close to your need, read its JSDoc and its tests before ruling it out, and name what you
|
|
9
|
+
ruled out and why in your hand-over.
|
|
10
|
+
|
|
11
|
+
## When you need to...
|
|
12
|
+
|
|
13
|
+
<!-- dialecte-skills:generated intents -->
|
|
14
|
+
|
|
15
|
+
| When you need to... | Use |
|
|
16
|
+
| -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
|
|
17
|
+
| accumulate time spent in a hot per-node function | `doc.query.perf.time` |
|
|
18
|
+
| add a child without duplicating it | `tx.ensureChild` |
|
|
19
|
+
| add an attachment owned by a document | `project.addBlob` |
|
|
20
|
+
| add custom extensions next to a dialecte's base extensions | `@dialecte/core/helpers.mergeExtensions` |
|
|
21
|
+
| add error keys usable with invariant and throwDialecteError | `@dialecte/core.defineErrors` |
|
|
22
|
+
| add or update or delete elements and commit them | `doc.transaction` |
|
|
23
|
+
| announce how many steps a transaction or nested step has | `tx.progress.plan` |
|
|
24
|
+
| applied or not applied | `@dialecte/core.importOutcomeOf` |
|
|
25
|
+
| apply document updates in a custom store | `@dialecte/core.applyDocumentUpdates` |
|
|
26
|
+
| ask a user to confirm an edit | `doc.prepare` |
|
|
27
|
+
| assert a condition and throw a structured error | `@dialecte/core/utils.invariant` |
|
|
28
|
+
| assert exported XML in tests | `@dialecte/core/test.createXmlAssertions` |
|
|
29
|
+
| assert in a test that a document is structurally valid for its schema | `@dialecte/core/test.createXmlSchemaAssertions` |
|
|
30
|
+
| assert on store read counts in a test | `doc.query.perf.report` |
|
|
31
|
+
| assert that XML does not hold an element | `@dialecte/core/test.assertUnexpectedElementQueries` |
|
|
32
|
+
| assert that XML holds the elements XPath queries select | `@dialecte/core/test.assertExpectedElementQueries` |
|
|
33
|
+
| attach a blob to a record | `project.attachBlob` |
|
|
34
|
+
| attach an extension map to a query or a transaction | `@dialecte/core.bindExtensions` |
|
|
35
|
+
| attach meta to a diagnostic | `@dialecte/core.createDiagnostic` |
|
|
36
|
+
| bind a child frame again after its page rejoined the hub | `@dialecte/core/sqlite.adoptHubPort` |
|
|
37
|
+
| build a diagnostic from a dialecte's catalogue | `@dialecte/core.createDiagnostic` |
|
|
38
|
+
| build a path from the root | `doc.query.findAncestors` |
|
|
39
|
+
| build a tree record from a raw or tracked record | `@dialecte/core/helpers.toTreeRecord` |
|
|
40
|
+
| build a valid element from its content model | `@dialecte/core/utils.requiredChoices` |
|
|
41
|
+
| build new content in a transaction | `tx.addChild` |
|
|
42
|
+
| build the Error throwDialecteError would throw | `@dialecte/core.createDialecteError` |
|
|
43
|
+
| build typed test records for a dialecte | `@dialecte/core/test.createTestRecordFactory` |
|
|
44
|
+
| call extension functions as methods of an instance | `@dialecte/core.bindExtensions` |
|
|
45
|
+
| canonicalize attribute names before a write | `@dialecte/core/helpers.toFullAttributeArray` |
|
|
46
|
+
| capture a CPU profile of an async operation in DevTools | `doc.query.perf.profile` |
|
|
47
|
+
| cardinality of children | `@dialecte/core/utils.childOccurrences` |
|
|
48
|
+
| change a document | `doc.transaction` |
|
|
49
|
+
| change attribute values | `tx.update` |
|
|
50
|
+
| check a built document against expected element counts | `@dialecte/core/helpers.evaluateExpectations` |
|
|
51
|
+
| check a document exists | `project.getDocument` |
|
|
52
|
+
| check a document path is valid and free before registering it | `@dialecte/core.assertDocumentPlace` |
|
|
53
|
+
| check an element's tag with types | `@dialecte/core/helpers.isRecordOf` |
|
|
54
|
+
| check exported XML against the XSD structure (namespaces, allowed children, known and required attributes) | `@dialecte/core/test.createXmlSchemaAssertions` |
|
|
55
|
+
| check fixtures against the schema | `@dialecte/core/test.createTestHelpers` |
|
|
56
|
+
| check that a document imported in another tab can be opened | `project.getDocumentStatus` |
|
|
57
|
+
| check that a string is a tag name of the dialecte | `@dialecte/core/helpers.isElementOf` |
|
|
58
|
+
| check that a string is an attribute of an element | `@dialecte/core/helpers.isAttributeOf` |
|
|
59
|
+
| check that an element was removed from an export | `@dialecte/core/test.assertUnexpectedElementQueries` |
|
|
60
|
+
| check that an export holds an element | `@dialecte/core/test.assertExpectedElementQueries` |
|
|
61
|
+
| check the tag of a record's parent | `@dialecte/core/helpers.isParentOf` |
|
|
62
|
+
| check whether a child exists | `doc.query.getChild` |
|
|
63
|
+
| check whether a file or folder path is free | `@dialecte/core.pathHolderOf` |
|
|
64
|
+
| check whether a project exists on SQLite storage without opening it | `@dialecte/core/sqlite.listProjects` |
|
|
65
|
+
| check whether a wildcard admits a namespace | `@dialecte/core/utils.isNamespaceAllowedByWildcard` |
|
|
66
|
+
| check whether an attribute is declared for an element | `@dialecte/core/utils.getAttributeRules` |
|
|
67
|
+
| choose the store tests run on | `@dialecte/core/test.useTestStorage` |
|
|
68
|
+
| clean up leftover imports when a custom store opens | `@dialecte/core.removeUnfinishedImports` |
|
|
69
|
+
| clean up the imports a closed tab or a crash left behind | `@dialecte/core.removeUnfinishedImports` |
|
|
70
|
+
| close a nested progress plan | `tx.progress.endPlan` |
|
|
71
|
+
| close a project | `project.close` |
|
|
72
|
+
| close the project's database connection from a document | `doc.close` |
|
|
73
|
+
| collect descendants of given tag names under an element | `doc.query.findDescendants` |
|
|
74
|
+
| collect perf from the store engine | `doc.query.perf.snapshot` |
|
|
75
|
+
| collect results from every document | `project.queryAll` |
|
|
76
|
+
| collect timing spans and read a report of them | `@dialecte/core.createPerf` |
|
|
77
|
+
| combine extension modules into one registry | `@dialecte/core/helpers.mergeExtensions` |
|
|
78
|
+
| combine timings measured in a worker with the page's | `doc.query.perf.merge` |
|
|
79
|
+
| compare attributes ignoring schema defaults | `@dialecte/core/utils.isSchemaDefaultValue` |
|
|
80
|
+
| compare XML holding generated ids | `@dialecte/core/test.normalizeUuids` |
|
|
81
|
+
| compare xsi:type values written with different prefixes | `@dialecte/core/utils.canonicalXsiType` |
|
|
82
|
+
| connect a page to the origin's hub | `@dialecte/core/sqlite.connectHub` |
|
|
83
|
+
| copy a subtree with fresh ids | `tx.deepClone` |
|
|
84
|
+
| count store reads or cache hits in dev | `doc.query.perf.count` |
|
|
85
|
+
| count what a transaction will create | `@dialecte/core.summarizeOperations` |
|
|
86
|
+
| create a new element under a parent | `tx.addChild` |
|
|
87
|
+
| create a new empty document | `project.initEmptyDocument` |
|
|
88
|
+
| debug what the store holds | `project.getDatabaseInstance` |
|
|
89
|
+
| declare a dialecte package | `@dialecte/core.defineDialecte` |
|
|
90
|
+
| declare a dialecte's own error catalogue | `@dialecte/core.defineErrors` |
|
|
91
|
+
| delete a dialecte's project without opening it | `@dialecte/core.createProjectFactory` |
|
|
92
|
+
| delete a document from the project | `project.removeDocument` |
|
|
93
|
+
| delete a stored file | `project.removeBlob` |
|
|
94
|
+
| delete a subtree | `tx.delete` |
|
|
95
|
+
| delete a whole project | `project.destroy` |
|
|
96
|
+
| delete the whole project database from a document | `doc.destroy` |
|
|
97
|
+
| destructure several attributes at once | `doc.query.getAttributes` |
|
|
98
|
+
| detach a blob from a record | `project.detachBlob` |
|
|
99
|
+
| detect which config a file needs | `@dialecte/core.inspectXml` |
|
|
100
|
+
| download a document | `project.export` |
|
|
101
|
+
| download a stored file | `project.exportBlob` |
|
|
102
|
+
| download an exported document | `@dialecte/core/utils.saveToDisk` |
|
|
103
|
+
| drop attributes before cloning a record | `@dialecte/core/helpers.stripAttributes` |
|
|
104
|
+
| dry-run a transaction | `doc.prepare` |
|
|
105
|
+
| duplicate an element under another parent | `tx.deepClone` |
|
|
106
|
+
| end a timed section opened with start | `doc.query.perf.stop` |
|
|
107
|
+
| export a document from a store in batches | `@dialecte/core.runExport` |
|
|
108
|
+
| export a document to an XML file | `project.export` |
|
|
109
|
+
| expose a record factory in a dialecte's test entry | `@dialecte/core/test.createTestRecordFactory` |
|
|
110
|
+
| fail with a core or dialecte error key | `@dialecte/core.throwDialecteError` |
|
|
111
|
+
| fail with a dialecte error key | `@dialecte/core/utils.invariant` |
|
|
112
|
+
| fill a dropdown with allowed values | `@dialecte/core/utils.enumeratedValues` |
|
|
113
|
+
| fill an absent attribute with its schema default or fixed value | `@dialecte/core/utils.resolveSchemaAttributeValue` |
|
|
114
|
+
| filter child refs by tag name | `@dialecte/core/helpers.isChildOf` |
|
|
115
|
+
| filter one tag's elements by attribute | `doc.query.findByAttributes` |
|
|
116
|
+
| find a declared namespace by its prefix | `@dialecte/core/utils.resolveNamespaceByPrefix` |
|
|
117
|
+
| find a namespace by its config key | `@dialecte/core/utils.resolveNamespaceByScope` |
|
|
118
|
+
| find elements by attribute value | `doc.query.findByAttributes` |
|
|
119
|
+
| find nested elements at any depth below a scope | `doc.query.findDescendants` |
|
|
120
|
+
| find orphan blobs to clean up | `project.getStandaloneBlobs` |
|
|
121
|
+
| find outdated or lost projects on SQLite storage | `@dialecte/core/sqlite.listProjects` |
|
|
122
|
+
| find the enclosing element of a tag | `doc.query.findAncestors` |
|
|
123
|
+
| find the first match across every document | `project.queryFirst` |
|
|
124
|
+
| find the prefix to store an attribute under | `@dialecte/core/utils.resolvePrefixByNamespaceScope` |
|
|
125
|
+
| find which config a document uses | `doc.query.getDocumentInfo` |
|
|
126
|
+
| find which document holds a path | `@dialecte/core.pathHolderOf` |
|
|
127
|
+
| finish reporting progress for a step | `tx.progress.endPlan` |
|
|
128
|
+
| fix an invariance type error on a record or ref | `@dialecte/core/helpers.widen` |
|
|
129
|
+
| follow transaction progress | `doc.subscribe` |
|
|
130
|
+
| format XML fixtures inside test files | `@dialecte/core/utils.formatEmbeddedXml` |
|
|
131
|
+
| format XML for a snapshot or a fixture | `@dialecte/core/utils.formatXml` |
|
|
132
|
+
| get a document as a Blob | `project.export` |
|
|
133
|
+
| get a port to hand a child frame of another origin | `@dialecte/core/sqlite.connectHub` |
|
|
134
|
+
| get deterministic uuids in a test | `@dialecte/core/test.createMockRandomUUID` |
|
|
135
|
+
| get document metadata | `doc.query.getDocumentInfo` |
|
|
136
|
+
| get documents to test against | `@dialecte/core/test.createTestProject` |
|
|
137
|
+
| get every test helper of a dialecte | `@dialecte/core/test.createTestHelpers` |
|
|
138
|
+
| get one direct child by tag name | `doc.query.getChild` |
|
|
139
|
+
| get one result per file without a throw for a failed file | `project.import` |
|
|
140
|
+
| get or create a child | `tx.ensureChild` |
|
|
141
|
+
| get the dialecte config of a document | `project.getDocumentConfig` |
|
|
142
|
+
| get the Document of an id | `project.openDocument` |
|
|
143
|
+
| get the DOM of an exported XML file | `@dialecte/core.parseXmlDocument` |
|
|
144
|
+
| get the factory that creates a dialecte's projects | `@dialecte/core.createProjectFactory` |
|
|
145
|
+
| get the local name of a qualified name | `@dialecte/core/utils.extractLocalName` |
|
|
146
|
+
| get the ref of a record or a relationship | `@dialecte/core/helpers.toRef` |
|
|
147
|
+
| get the regular expressions an attribute value must match | `@dialecte/core/utils.valuePatterns` |
|
|
148
|
+
| get the root element | `doc.query.getRoot` |
|
|
149
|
+
| give a raw record a change status | `@dialecte/core/helpers.toTrackedRecord` |
|
|
150
|
+
| group edits into one undo step | `doc.transaction` |
|
|
151
|
+
| guard against a missing record | `@dialecte/core/utils.invariant` |
|
|
152
|
+
| handle a dialecte error in a catch block | `@dialecte/core.toDialecteError` |
|
|
153
|
+
| how many times a child may appear | `@dialecte/core/utils.childOccurrences` |
|
|
154
|
+
| implement exportFile of a custom store | `@dialecte/core.runExport` |
|
|
155
|
+
| implement importFile of a custom store | `@dialecte/core.runImport` |
|
|
156
|
+
| import a file into a store with core's import pipeline | `@dialecte/core.runImport` |
|
|
157
|
+
| import an XML file | `project.importFile` |
|
|
158
|
+
| import several XML files at once | `project.import` |
|
|
159
|
+
| indent XML without changing values | `@dialecte/core/utils.formatXml` |
|
|
160
|
+
| insert a child with attributes | `tx.addChild` |
|
|
161
|
+
| inspect the underlying database | `project.getDatabaseInstance` |
|
|
162
|
+
| iterate one level below an element | `doc.query.getChildren` |
|
|
163
|
+
| join the hub from an iframe of another origin | `@dialecte/core/sqlite.adoptHubPort` |
|
|
164
|
+
| know what an element may hold under its parent | `@dialecte/core/utils.resolveDefinition` |
|
|
165
|
+
| know what an xsi:type lets an element hold | `doc.query.getDefinition` |
|
|
166
|
+
| know whether an attribute is required | `@dialecte/core/utils.getAttributeRules` |
|
|
167
|
+
| know which schema a document uses | `project.getDocumentConfig` |
|
|
168
|
+
| know which schema value an absent attribute takes | `@dialecte/core/utils.resolveSchemaAttributeValue` |
|
|
169
|
+
| link a stored file to an element | `project.attachBlob` |
|
|
170
|
+
| list allowed attributes or enumeration values | `doc.query.getDefinition` |
|
|
171
|
+
| list direct children of one tag name | `doc.query.getChildren` |
|
|
172
|
+
| list every element of a tag in the whole document | `doc.query.getRecordsByTagName` |
|
|
173
|
+
| list the allowed values of an attribute | `@dialecte/core/utils.enumeratedValues` |
|
|
174
|
+
| list the ancestors of an element | `doc.query.findAncestors` |
|
|
175
|
+
| list the documents of a project | `project.getDocuments` |
|
|
176
|
+
| list the files attached to a document | `project.getBlobsByDocument` |
|
|
177
|
+
| list the files attached to one element | `project.getBlobsByRecord` |
|
|
178
|
+
| list the projects stored in the browser on SQLite storage | `@dialecte/core/sqlite.listProjects` |
|
|
179
|
+
| list the xsi:type values an element may take | `@dialecte/core/utils.admittedXsiTypes` |
|
|
180
|
+
| list unattached files | `project.getStandaloneBlobs` |
|
|
181
|
+
| listen to project events | `project.createChannel` |
|
|
182
|
+
| load a blob by id | `project.getBlob` |
|
|
183
|
+
| load a file into the project | `project.importFile` |
|
|
184
|
+
| load one element by id | `doc.query.getRecord` |
|
|
185
|
+
| load several elements by ref at once | `doc.query.getRecords` |
|
|
186
|
+
| look up an attribute of a held record in a pure function with no query | `@dialecte/core/helpers.readAttribute` |
|
|
187
|
+
| look up an attribute value on a record you already hold in an import hook | `@dialecte/core/helpers.readAttribute` |
|
|
188
|
+
| look up an element by an identifying attribute | `doc.query.findByAttributes` |
|
|
189
|
+
| look up the attribute values of a record you already hold in an import hook | `@dialecte/core/helpers.readAttributes` |
|
|
190
|
+
| look up the attributes of a held record in a pure function with no query | `@dialecte/core/helpers.readAttributes` |
|
|
191
|
+
| make generated ids reproducible | `@dialecte/core/utils.createSeededRandomUuid` |
|
|
192
|
+
| make sure a singleton container exists before adding under it | `tx.ensureChild` |
|
|
193
|
+
| make XPath assertions bound to a dialecte's namespaces | `@dialecte/core/test.createXmlAssertions` |
|
|
194
|
+
| map a prefix to its namespace URI | `@dialecte/core/utils.resolveNamespaceByPrefix` |
|
|
195
|
+
| map old ids to new ids | `tx.deepClone` |
|
|
196
|
+
| mark a progress step done | `tx.progress.nextStep` |
|
|
197
|
+
| measure how long an operation takes | `doc.query.perf.start` |
|
|
198
|
+
| measure how long operations take in development | `@dialecte/core.createPerf` |
|
|
199
|
+
| mock crypto.randomUUID | `@dialecte/core/test.createMockRandomUUID` |
|
|
200
|
+
| name the store table holding a document's blob data | `@dialecte/core.blobTableName` |
|
|
201
|
+
| name the store table holding a document's records | `@dialecte/core.recordTableName` |
|
|
202
|
+
| narrow a child relationship to one tag | `@dialecte/core/helpers.isChildOf` |
|
|
203
|
+
| narrow a diagnostic to a catalogue's codes | `@dialecte/core.isKnownDiagnostic` |
|
|
204
|
+
| narrow a parent relationship to one tag | `@dialecte/core/helpers.isParentOf` |
|
|
205
|
+
| narrow a record to a tree node | `@dialecte/core/helpers.isTreeRecord` |
|
|
206
|
+
| narrow a record to its raw shape | `@dialecte/core/helpers.isRawRecord` |
|
|
207
|
+
| narrow a record to its tracked shape | `@dialecte/core/helpers.isTrackedRecord` |
|
|
208
|
+
| narrow a record to one tag name | `@dialecte/core/helpers.isRecordOf` |
|
|
209
|
+
| narrow an attribute name before a typed read | `@dialecte/core/helpers.isAttributeOf` |
|
|
210
|
+
| narrow an error key for a switch | `@dialecte/core.isKnownDialecteError` |
|
|
211
|
+
| narrow an unknown tag name before a typed query | `@dialecte/core/helpers.isElementOf` |
|
|
212
|
+
| narrow attribute input | `@dialecte/core/helpers.isFullAttributeArray` |
|
|
213
|
+
| normalize attribute order after a hook | `@dialecte/core/utils.orderAttributesBySequence` |
|
|
214
|
+
| offer a dialecte's engine to the hub (`factory.spawner`) | `@dialecte/core/sqlite.connectHub` |
|
|
215
|
+
| offer type choices for an element | `@dialecte/core/utils.admittedXsiTypes` |
|
|
216
|
+
| one report across realms | `doc.query.perf.merge` |
|
|
217
|
+
| open a document to read or write it | `project.openDocument` |
|
|
218
|
+
| open a project in a test with a fixture imported | `@dialecte/core/test.createTestProject` |
|
|
219
|
+
| open a save dialog in the browser | `@dialecte/core/utils.saveToDisk` |
|
|
220
|
+
| open or create a project database | `project.open` |
|
|
221
|
+
| open projects of a dialecte from an app | `@dialecte/core.createProjectFactory` |
|
|
222
|
+
| open projects on SQLite storage in a child frame through its page's engine | `@dialecte/core/sqlite.adoptHubPort` |
|
|
223
|
+
| order nodes the way the export writes them | `@dialecte/core/utils.orderByConfigSequence` |
|
|
224
|
+
| parse XML into records | `project.importFile` |
|
|
225
|
+
| pass a per-element record or ref to an API typed with the element union | `@dialecte/core/helpers.widen` |
|
|
226
|
+
| pass a raw or tree record where a tracked record is expected | `@dialecte/core/helpers.toTrackedRecord` |
|
|
227
|
+
| pass a record where a raw record is expected | `@dialecte/core/helpers.toRawRecord` |
|
|
228
|
+
| pass a ref to a query | `@dialecte/core/helpers.toRef` |
|
|
229
|
+
| paste a tree read with getTree | `tx.deepClone` |
|
|
230
|
+
| peek at an XML file before importing it | `@dialecte/core.inspectXml` |
|
|
231
|
+
| pretty-print an XML string | `@dialecte/core/utils.formatXml` |
|
|
232
|
+
| preview changes before committing | `doc.prepare` |
|
|
233
|
+
| preview what a transaction would commit | `doc.query.getSnapshot` |
|
|
234
|
+
| print perf metrics to the console | `doc.query.perf.log` |
|
|
235
|
+
| project a filtered tree with select or omit | `doc.query.getTree` |
|
|
236
|
+
| prune a child from its parent | `tx.delete` |
|
|
237
|
+
| put attributes in schema order | `@dialecte/core/utils.orderAttributesBySequence` |
|
|
238
|
+
| query an export with XPath | `@dialecte/core.parseXmlDocument` |
|
|
239
|
+
| raise an error a consumer can read by key | `@dialecte/core.throwDialecteError` |
|
|
240
|
+
| react to document changes in a UI | `doc.subscribe` |
|
|
241
|
+
| read a blob with its file name | `project.exportBlob` |
|
|
242
|
+
| read a document's name or config key by id | `project.getDocument` |
|
|
243
|
+
| read a document's records from the local database directly | `@dialecte/core.recordTableName` |
|
|
244
|
+
| read a namespaced attribute | `doc.query.getAttribute` |
|
|
245
|
+
| read a subtree in document order | `doc.query.getTree` |
|
|
246
|
+
| read a subtree to copy it with deepClone | `doc.query.getTree` |
|
|
247
|
+
| read all attribute values of an element | `doc.query.getAttributes` |
|
|
248
|
+
| read an attached file's content | `project.getBlob` |
|
|
249
|
+
| read an attribute of an element | `doc.query.getAttribute` |
|
|
250
|
+
| read an attribute with its schema default | `doc.query.getAttribute` |
|
|
251
|
+
| read an attribute's default or fixed value | `@dialecte/core/utils.getAttributeRules` |
|
|
252
|
+
| read an export as an XMLDocument in the page | `@dialecte/core.parseXmlDocument` |
|
|
253
|
+
| read attributes of one namespace | `doc.query.getAttributes` |
|
|
254
|
+
| read collected perf metrics | `doc.query.perf.report` |
|
|
255
|
+
| read one attribute value | `doc.query.getAttribute` |
|
|
256
|
+
| read staged changes as XML or as a tree | `doc.query.getSnapshot` |
|
|
257
|
+
| read the attributes of an element | `doc.query.getAttributes` |
|
|
258
|
+
| read the definition of a record you hold without a query | `@dialecte/core/utils.resolveDefinition` |
|
|
259
|
+
| read the document name or extension | `doc.query.getDocumentInfo` |
|
|
260
|
+
| read the enumeration of a datatype | `@dialecte/core/utils.enumeratedValues` |
|
|
261
|
+
| read the exported XML as a DOM | `project.export` |
|
|
262
|
+
| read the root element or a version attribute without a full parse | `@dialecte/core.inspectXml` |
|
|
263
|
+
| read the schema definition of an element | `doc.query.getDefinition` |
|
|
264
|
+
| read the structured error from a caught value | `@dialecte/core.toDialecteError` |
|
|
265
|
+
| read the type an element names with xsi:type | `@dialecte/core/utils.resolveXsiType` |
|
|
266
|
+
| receive commits and imports made in other tabs | `project.createChannel` |
|
|
267
|
+
| recover after a connection lost during a write | `@dialecte/core.writeOutcomeOf` |
|
|
268
|
+
| recover after a connection lost during an import | `@dialecte/core.importOutcomeOf` |
|
|
269
|
+
| redo an undone change to a document | `project.redo` |
|
|
270
|
+
| refresh a record | `doc.query.getRecord` |
|
|
271
|
+
| refresh a view after a commit or an undo | `doc.subscribe` |
|
|
272
|
+
| register a dialecte's configs and extensions and hooks once | `@dialecte/core.defineDialecte` |
|
|
273
|
+
| register a dialecte's engine with the hub | `@dialecte/core.createProjectFactory` |
|
|
274
|
+
| register documents in a custom store | `@dialecte/core.assertDocumentPlace` |
|
|
275
|
+
| register this page's dialecte engines with the hub before any project opens | `@dialecte/core/sqlite.connectHub` |
|
|
276
|
+
| reindent xml template literals in source code | `@dialecte/core/utils.formatEmbeddedXml` |
|
|
277
|
+
| release the database connection when leaving a page | `project.close` |
|
|
278
|
+
| remove a blob for good | `project.removeBlob` |
|
|
279
|
+
| remove an element | `tx.delete` |
|
|
280
|
+
| remove attributes from a record | `@dialecte/core/helpers.stripAttributes` |
|
|
281
|
+
| remove one file and its records | `project.removeDocument` |
|
|
282
|
+
| rename an element through its name attribute | `tx.update` |
|
|
283
|
+
| rename or move a document by its path | `@dialecte/core.applyDocumentUpdates` |
|
|
284
|
+
| reopen a project after close | `project.open` |
|
|
285
|
+
| report a caught error as a dialecte error without throwing | `@dialecte/core.createDialecteError` |
|
|
286
|
+
| report an import or validation problem as a typed diagnostic | `@dialecte/core.createDiagnostic` |
|
|
287
|
+
| report progress of a long operation | `tx.progress.plan` |
|
|
288
|
+
| required or optional children of an element | `@dialecte/core/utils.childOccurrences` |
|
|
289
|
+
| reset perf metrics between measured scenarios | `doc.query.perf.reset` |
|
|
290
|
+
| resolve a list of children or relationships in one batched read | `doc.query.getRecords` |
|
|
291
|
+
| resolve a namespace scope to its prefix and URI | `@dialecte/core/utils.resolveNamespaceByScope` |
|
|
292
|
+
| resolve a ref or parent/child relationship to its record | `doc.query.getRecord` |
|
|
293
|
+
| resolve an xsi:type prefix to its namespace | `@dialecte/core/utils.resolveXsiType` |
|
|
294
|
+
| roll back a commit | `project.undo` |
|
|
295
|
+
| run node tests on the in-memory store | `@dialecte/core/test.useTestStorage` |
|
|
296
|
+
| run one query over all documents | `project.queryAll` |
|
|
297
|
+
| run table-driven test cases on a dialecte | `@dialecte/core/test.createTestRunner` |
|
|
298
|
+
| run tests on SQLite | `@dialecte/core/test.useTestStorage` |
|
|
299
|
+
| save a Blob as a file | `@dialecte/core/utils.saveToDisk` |
|
|
300
|
+
| save a blob to disk | `project.exportBlob` |
|
|
301
|
+
| save a document as XML | `project.export` |
|
|
302
|
+
| scan all elements of one type regardless of position | `doc.query.getRecordsByTagName` |
|
|
303
|
+
| search all documents of a project | `project.queryFirst` |
|
|
304
|
+
| seed crypto.randomUUID for a script or a test | `@dialecte/core/utils.createSeededRandomUuid` |
|
|
305
|
+
| send a worker's or another realm's timings to the page | `doc.query.perf.snapshot` |
|
|
306
|
+
| serve a dialecte's engine from a worker | `@dialecte/core/engine.serveDialecteEngine` |
|
|
307
|
+
| set an element's text value | `tx.update` |
|
|
308
|
+
| set or clear an attribute | `tx.update` |
|
|
309
|
+
| set up a dialecte package's tests | `@dialecte/core/test.createTestHelpers` |
|
|
310
|
+
| set up a new dialecte | `@dialecte/core.defineDialecte` |
|
|
311
|
+
| share one SQLite engine per project between the tabs of an app | `@dialecte/core.createProjectFactory` |
|
|
312
|
+
| ship a dialecte's SQLite engine in its package | `@dialecte/core/engine.serveDialecteEngine` |
|
|
313
|
+
| show a confirmation summary before commit | `@dialecte/core.summarizeOperations` |
|
|
314
|
+
| show a progress bar caption | `tx.progress.plan` |
|
|
315
|
+
| show how much space each project takes | `@dialecte/core/sqlite.listProjects` |
|
|
316
|
+
| show the files a project holds | `project.getDocuments` |
|
|
317
|
+
| show what a prepared transaction would produce | `doc.query.getSnapshot` |
|
|
318
|
+
| snapshot a document independently of random uuids | `@dialecte/core/test.normalizeUuids` |
|
|
319
|
+
| sort children in schema order | `@dialecte/core/utils.orderByConfigSequence` |
|
|
320
|
+
| split a document path into folders and file name | `@dialecte/core.parseDocumentPath` |
|
|
321
|
+
| start a document from scratch without a file | `project.initEmptyDocument` |
|
|
322
|
+
| start a walk from the top of the document | `doc.query.getRoot` |
|
|
323
|
+
| start working on a project | `project.open` |
|
|
324
|
+
| store a binary file in the project | `project.addBlob` |
|
|
325
|
+
| store blobs in a custom store | `@dialecte/core.blobTableName` |
|
|
326
|
+
| strip a record to its stored fields | `@dialecte/core/helpers.toRawRecord` |
|
|
327
|
+
| strip the prefix from an attribute name | `@dialecte/core/utils.extractLocalName` |
|
|
328
|
+
| summarize a prepared transaction per tag | `@dialecte/core.summarizeOperations` |
|
|
329
|
+
| tally calls of a hot function cheaply | `doc.query.perf.count` |
|
|
330
|
+
| tell a stored record from a tracked or tree record | `@dialecte/core/helpers.isRawRecord` |
|
|
331
|
+
| tell a tracked record from a raw or tree record | `@dialecte/core/helpers.isTrackedRecord` |
|
|
332
|
+
| tell a tree record from a raw or tracked record | `@dialecte/core/helpers.isTreeRecord` |
|
|
333
|
+
| tell an attribute array from an attribute value object | `@dialecte/core/helpers.isFullAttributeArray` |
|
|
334
|
+
| tell whether a value equals an attribute's default | `@dialecte/core/utils.isSchemaDefaultValue` |
|
|
335
|
+
| tell whether an import is running | `@dialecte/core.importOutcomeOf` |
|
|
336
|
+
| tell whether an import or a commit was applied | `@dialecte/core.writeOutcomeOf` |
|
|
337
|
+
| tell whether foreign attributes or elements are allowed | `@dialecte/core/utils.isNamespaceAllowedByWildcard` |
|
|
338
|
+
| tell which diagnostic an import reported | `@dialecte/core.isKnownDiagnostic` |
|
|
339
|
+
| tell which error was thrown | `@dialecte/core.isKnownDialecteError` |
|
|
340
|
+
| test a transaction against expected XML | `@dialecte/core/test.createTestRunner` |
|
|
341
|
+
| test what a prepared transaction would write | `@dialecte/core/helpers.evaluateExpectations` |
|
|
342
|
+
| the branches of a required choice | `@dialecte/core/utils.requiredChoices` |
|
|
343
|
+
| throw a structured error | `@dialecte/core.throwDialecteError` |
|
|
344
|
+
| time a callback without flooding the timeline | `doc.query.perf.time` |
|
|
345
|
+
| time a code section in dev | `doc.query.perf.start` |
|
|
346
|
+
| turn a record into a tree node | `@dialecte/core/helpers.toTreeRecord` |
|
|
347
|
+
| turn an attribute value object into an attribute array | `@dialecte/core/helpers.toFullAttributeArray` |
|
|
348
|
+
| undo the last change to a document | `project.undo` |
|
|
349
|
+
| unlink a file from an element | `project.detachBlob` |
|
|
350
|
+
| update and delete | `@dialecte/core.summarizeOperations` |
|
|
351
|
+
| update the progress caption | `tx.progress.nextStep` |
|
|
352
|
+
| use SQLite storage in an app (import `@dialecte/core/sqlite` once and open with `storage: { type: 'sqlite' }`) | `@dialecte/core.createProjectFactory` |
|
|
353
|
+
| validate a document path | `@dialecte/core.parseDocumentPath` |
|
|
354
|
+
| validate an attribute value against its datatype patterns | `@dialecte/core/utils.valuePatterns` |
|
|
355
|
+
| validate an exported XML file against the schema in a test | `@dialecte/core/test.createXmlSchemaAssertions` |
|
|
356
|
+
| verify a script's result before committing | `@dialecte/core/helpers.evaluateExpectations` |
|
|
357
|
+
| wait for a document from another realm | `project.getDocumentStatus` |
|
|
358
|
+
| walk children recursively | `doc.query.getTree` |
|
|
359
|
+
| walk definitions top-down | `@dialecte/core/utils.resolveDefinition` |
|
|
360
|
+
| which children an element must hold where its content model offers a choice | `@dialecte/core/utils.requiredChoices` |
|
|
361
|
+
| wipe every document of the project | `doc.destroy` |
|
|
362
|
+
| wipe the project database with every document | `project.destroy` |
|
|
363
|
+
| word a diagnostic for a user | `@dialecte/core.isKnownDiagnostic` |
|
|
364
|
+
| word an error for a user | `@dialecte/core.isKnownDialecteError` |
|
|
365
|
+
| write a dialecte package's engine worker file | `@dialecte/core/engine.serveDialecteEngine` |
|
|
366
|
+
| write an attribute in a declared or custom namespace | `@dialecte/core/utils.resolvePrefixByNamespaceScope` |
|
|
367
|
+
| write an xsi:type value the way core stores it | `@dialecte/core/utils.canonicalXsiType` |
|
|
368
|
+
|
|
369
|
+
<!-- /dialecte-skills:generated -->
|
|
370
|
+
|
|
371
|
+
## Methods
|
|
372
|
+
|
|
373
|
+
<!-- dialecte-skills:generated api -->
|
|
374
|
+
|
|
375
|
+
| Method | What it answers | Reach for it to |
|
|
376
|
+
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
377
|
+
| `doc.close` | Close the connection to the project's store, shared by every document of the project: after it, no document of this project can read or write. With a built-in store (local, in-memory), opening the project again gives a new store: documents opened before stay closed, open them again from the project. A custom store is reopened in place. To finish with the project, use `project.close`. | close the project's database connection from a document |
|
|
378
|
+
| `doc.destroy` | Delete the whole project database and let the connection go: every document of the project, its history and its blobs - not only this document; refused `PROJECT_OPEN_ELSEWHERE`, nothing removed and the connection kept, while another connection has the project open. To delete one document, use `project.removeDocument`. | delete the whole project database from a document; wipe every document of the project |
|
|
379
|
+
| `doc.prepare` | Build up operations without committing. Returns a PreparedTransaction with staged operations for preview, then call commit() to apply or discard() to throw away. | preview changes before committing; ask a user to confirm an edit; dry-run a transaction |
|
|
380
|
+
| `doc.query.findAncestors` | Walk the parent chain from an element upward, one store read per step; for the parent alone, `getRecord(record.parent)` is enough. | list the ancestors of an element; find the enclosing element of a tag; build a path from the root |
|
|
381
|
+
| `doc.query.findByAttributes` | Find records of one tag matching specific attribute values; it scans every element of that tag in the document. | find elements by attribute value; look up an element by an identifying attribute; filter one tag's elements by attribute |
|
|
382
|
+
| `doc.query.findDescendants` | Find all descendants of an element, grouped by tag name, in no guaranteed order: walk a `getTree` result for document order. | collect descendants of given tag names under an element; find nested elements at any depth below a scope |
|
|
383
|
+
| `doc.query.getAttribute` | Read a single attribute value of an element (a ref, a record or a relationship). | read an attribute of an element; read one attribute value; read a namespaced attribute; read an attribute with its schema default |
|
|
384
|
+
| `doc.query.getAttributes` | Read an element's attributes as a destructurable value object, each under the name it is stored by - what a write takes back. Get a record's attributes for a namespace scope, keyed by **local** name. Get a record's attributes for a custom namespace scope not declared in the config, keyed by local name. Get all attributes of a record as an array of full attribute objects. | read the attributes of an element; read all attribute values of an element; destructure several attributes at once; read attributes of one namespace |
|
|
385
|
+
| `doc.query.getChild` | Get the first direct child of an element matching a given tag name; it looks one level down only. | get one direct child by tag name; check whether a child exists |
|
|
386
|
+
| `doc.query.getChildren` | Get all direct children of an element matching a given tag name; it looks one level down only, no recursion. | list direct children of one tag name; iterate one level below an element |
|
|
387
|
+
| `doc.query.getDefinition` | The definition of an element in its context: the declaration its parent holds when the schema declares the tag several ways, and what the type it names with xsi:type lets it hold. | read the schema definition of an element; list allowed attributes or enumeration values; know what an xsi:type lets an element hold |
|
|
388
|
+
| `doc.query.getDocumentInfo` | Get the full metadata record of this document. | read the document name or extension; get document metadata; find which config a document uses |
|
|
389
|
+
| `doc.query.getRecord` | Get a single record by ref, record, or relationship, in one store read. | load one element by id; resolve a ref or parent/child relationship to its record; refresh a record |
|
|
390
|
+
| `doc.query.getRecords` | Get multiple records in a single call. | load several elements by ref at once; resolve a list of children or relationships in one batched read |
|
|
391
|
+
| `doc.query.getRecordsByTagName` | Get all records of a given tag name in the whole document, read from the tag index: the cheapest whole-document scan. | list every element of a tag in the whole document; scan all elements of one type regardless of position |
|
|
392
|
+
| `doc.query.getRoot` | Get the root element of the document. | get the root element; start a walk from the top of the document |
|
|
393
|
+
| `doc.query.getSnapshot` | Snapshot the (uncommitted) document state as a tree, XML string, or both: a view that includes staged changes. The stored file, to save or download, comes from `project.export`. | preview what a transaction would commit; read staged changes as XML or as a tree; show what a prepared transaction would produce |
|
|
394
|
+
| `doc.query.getTree` | Build a full tree structure from an element down. It loads the whole document unless it is a committed read with an id and a depth. | read a subtree in document order; walk children recursively; project a filtered tree with select or omit; read a subtree to copy it with deepClone |
|
|
395
|
+
| `doc.query.perf.count` (also `doc.perf.count`, `project.perf.count`) | O(1) tally for a hot per-node primitive (e.g. store round-trips, cache hits/misses) — cheaper than a span and safe in a node loop where per-call `start`/`stop` would flood the timeline. Surfaced as `count` in `report()`. | count store reads or cache hits in dev; tally calls of a hot function cheaply |
|
|
396
|
+
| `doc.query.perf.log` (also `doc.perf.log`, `project.perf.log`) | Print the perf report as a console table (`console.table(report())`). | print perf metrics to the console |
|
|
397
|
+
| `doc.query.perf.merge` (also `doc.perf.merge`, `project.perf.merge`) | Fold another realm's snapshot in under `<prefix>::<name>`: its spans placed on this realm's timeline (shifted by the difference of the two `timeOrigin`s), its tallies added to this one's. | combine timings measured in a worker with the page's; one report across realms |
|
|
398
|
+
| `doc.query.perf.profile` (also `doc.perf.profile`, `project.perf.profile`) | Run `fn` inside a DevTools CPU profile (no-op in node/headless). | capture a CPU profile of an async operation in DevTools |
|
|
399
|
+
| `doc.query.perf.report` (also `doc.perf.report`, `project.perf.report`) | Aggregate the timeline synchronously on demand — no `PerformanceObserver`. | read collected perf metrics; assert on store read counts in a test |
|
|
400
|
+
| `doc.query.perf.reset` (also `doc.perf.reset`, `project.perf.reset`) | Clear all marks + measures (bound memory between measured scenarios). | reset perf metrics between measured scenarios |
|
|
401
|
+
| `doc.query.perf.snapshot` (also `doc.perf.snapshot`, `project.perf.snapshot`) | This realm's spans (the shared timeline's; this perf's own with `timeline: false`) and this perf's tallies, to hand to another realm. | send a worker's or another realm's timings to the page; collect perf from the store engine |
|
|
402
|
+
| `doc.query.perf.start` (also `doc.perf.start`, `project.perf.start`) | Open a span. Name-keyed pair (like `console.time`); name = `layer::op`. | time a code section in dev; measure how long an operation takes |
|
|
403
|
+
| `doc.query.perf.stop` (also `doc.perf.stop`, `project.perf.stop`) | Close the most recent open span for `name`. Unmatched `stop` is a no-op. | end a timed section opened with start |
|
|
404
|
+
| `doc.query.perf.time` (also `doc.perf.time`, `project.perf.time`) | O(1) wall-time accumulator: runs `fn`, adds its elapsed time to a running total keyed by `name` WITHOUT emitting a timeline measure per call (unlike `start`/`stop`). Surfaced as calls/totalMs/avgMs in `report()`. Use to time a hot per-node primitive (e.g. the SAX handlers) where millions of measures would flood the timeline. | accumulate time spent in a hot per-node function; time a callback without flooding the timeline |
|
|
405
|
+
| `doc.subscribe` | Register a callback fired (synchronously, same-realm) whenever this document's shared state changes: progress steps + loading toggles during a transaction, undo/redo, and folded-in cross-realm commits. `terminal` is `true` for the final frame of an operation, letting a consumer flush it without coalescing. Returns an unsubscribe function. Wired from the owning Project's registry. | react to document changes in a UI; refresh a view after a commit or an undo; follow transaction progress |
|
|
406
|
+
| `doc.transaction` | Run `fn` against a new transaction and commit everything it staged as one undoable step; on a throw nothing is written. A second transaction started on this Document while one runs throws `CONCURRENT_TRANSACTION`. | change a document; add or update or delete elements and commit them; group edits into one undo step |
|
|
407
|
+
| `project.addBlob` | Add a blob owned by `documentId`. The binary lives in `blob_{documentId}`. Returns the generated blob id. | store a binary file in the project; add an attachment owned by a document |
|
|
408
|
+
| `project.attachBlob` | Reference an existing blob from an element of a document (optionally from one of its attributes) and tell other tabs. | link a stored file to an element; attach a blob to a record |
|
|
409
|
+
| `project.close` | Close the store and release resources, once the imports in flight (running and queued), the project's writes running (a Document's transaction or prepared commit included) and the work other realms' messages started have settled. Then the channel and the store are closed, `state.documents` is emptied and the Documents' subscriptions are dropped. From the call on, the project is closed: a new call throws `PROJECT_NOT_OPENED`, a Document opened before answers `STORE_CLOSED` (on a `custom` store opened again it writes but tells nothing: open it again). The stored documents stay. Runs in turn with the Project's other `open`, `close` and `destroy` calls. | close a project; release the database connection when leaving a page |
|
|
410
|
+
| `project.createChannel` | Convenience: a fresh BroadcastChannel on this project's channel. The caller owns it — call channel.close() when done listening. | listen to project events; receive commits and imports made in other tabs |
|
|
411
|
+
| `project.destroy` | Destroy the project - deletes the database entirely, every document with its history and blobs, once the imports in flight have landed; refused `PROJECT_OPEN_ELSEWHERE`, nothing removed, while another connection - a project or store of the name, in this page or another tab - has it open. To delete one document, use `removeDocument`. | delete a whole project; wipe the project database with every document |
|
|
412
|
+
| `project.detachBlob` | Drop the reference from an element of a document to a blob; the blob itself stays stored. | unlink a file from an element; detach a blob from a record |
|
|
413
|
+
| `project.export` | Export a document through the store: its file (`Blob`, formatted unless `indent: false`) and filename. On the page, `xmlDocument: true` also answers its DOM (parsed from the compact file: pass `indent: false` to export once) and `download` saves the formatted file (the save dialog is asked first). Two store exports made for one call may see two states of the document if a commit lands between them. | export a document to an XML file; get a document as a Blob; download a document; save a document as XML; read the exported XML as a DOM |
|
|
414
|
+
| `project.exportBlob` | Export a blob from the store: `{ entry, data, filename }`; `download` also saves it (the save dialog, or a browser download), under its name or the one given. | download a stored file; save a blob to disk; read a blob with its file name |
|
|
415
|
+
| `project.getBlob` | Read a stored blob: its metadata entry and its binary data, or `undefined` when the id is unknown. | read an attached file's content; load a blob by id |
|
|
416
|
+
| `project.getBlobsByDocument` | The blobs referenced from a document (any of their attachments points into it). | list the files attached to a document |
|
|
417
|
+
| `project.getBlobsByRecord` | The blobs referenced from one element of a document. | list the files attached to one element |
|
|
418
|
+
| `project.getDatabaseInstance` | Expose the store's own database object, for debugging: the Dexie instance on `local` (cast it: the type is the store's, `unknown` unless the Project's store type is given), `null` on `sqlite` and `inMemory`. | inspect the underlying database; debug what the store holds |
|
|
419
|
+
| `project.getDocument` | The metadata record of one document of the project, or `undefined` when it is unknown or still importing. | check a document exists; read a document's name or config key by id |
|
|
420
|
+
| `project.getDocumentConfig` | Get the dialecte config a document uses, or `undefined` for a document the project does not know. | get the dialecte config of a document; know which schema a document uses |
|
|
421
|
+
| `project.getDocuments` | The documents of the project; one still importing - here or in another realm - is not among them. | list the documents of a project; show the files a project holds |
|
|
422
|
+
| `project.getDocumentStatus` | Reconcile this realm's store against persisted state, then report the document's liveness and readiness: - `live` — the document is registered in this realm's registry (so `openDocument` will not throw DOCUMENT_NOT_REGISTERED). - `ready` — the store can serve the document's records (so reads / export will not throw, e.g. a missing per-document table). | check that a document imported in another tab can be opened; wait for a document from another realm |
|
|
423
|
+
| `project.getStandaloneBlobs` | The blobs of the project that no document references (no attachment). | list unattached files; find orphan blobs to clean up |
|
|
424
|
+
| `project.import` | Import Files into the project: one entry per file, in the order given. The files are imported one after the other - memory is bounded by one file's batches, the registry sees one import - and a file that fails is its own `failed` entry, the next file still attempted: nothing of a failed file lands (but an import whose engine was lost after it landed: see `importFile`). The call itself rejects only for what is about the call: an unknown `configKey`, a project not open, a `path` (`DOCUMENT_PATH_INVALID`: a path names one file, `importFile` takes it). | import several XML files at once; get one result per file without a throw for a failed file |
|
|
425
|
+
| `project.importFile` | Import one File into the project: the store registers, parses and stores it next to the data. The document is in the project state and broadcast once the store answers it `ready`; whatever fails before that, or an abort through `options.signal`, leaves nothing and is thrown (`PARSE_ERROR` for a malformed file, `IMPORT_ABORTED`, `IMPORT_FAILED` wrapping a foreign error). One refusal leaves its document: an import whose engine was lost after it landed is refused `STORE_ENGINE_LOST`, `meta.outcome` `applied`, its document in the state and broadcast. `options.onProgress` is told after each stored batch, never awaited. One file is in flight per project: a call made while another import runs waits for it. | import an XML file; load a file into the project; parse XML into records |
|
|
426
|
+
| `project.initEmptyDocument` | Register a new empty document in the project. Returns the new documentId. Records are added later via import or transactions. | create a new empty document; start a document from scratch without a file |
|
|
427
|
+
| `project.open` | Open a named project: resolve store, open DB connection, hydrate state. Must be called before import/export/openDocument. | open or create a project database; start working on a project; reopen a project after close |
|
|
428
|
+
| `project.openDocument` | Open a file-scoped Document for querying and mutating a specific file. | open a document to read or write it; get the Document of an id |
|
|
429
|
+
| `project.queryAll` | Run a query function across all documents, collect and flatten results. Iterates documents sequentially; merges all non-empty arrays. | collect results from every document; run one query over all documents |
|
|
430
|
+
| `project.queryFirst` | Run a query function across all documents, return the first non-undefined result. Iterates documents sequentially; stops at the first match. | find the first match across every document; search all documents of a project |
|
|
431
|
+
| `project.redo` | Re-apply the last undone transaction of a document and tell other tabs. Does nothing when there is nothing to redo. | redo an undone change to a document |
|
|
432
|
+
| `project.removeBlob` | Delete a blob and its binary data from the project and tell other tabs. Does nothing when the id is unknown. | delete a stored file; remove a blob for good |
|
|
433
|
+
| `project.removeDocument` | Remove one document from the project - its records, history and blobs - and tell other tabs. The other documents stay. | delete a document from the project; remove one file and its records |
|
|
434
|
+
| `project.undo` | Revert the last committed transaction of a document and tell other tabs. Does nothing when there is nothing to undo. | undo the last change to a document; roll back a commit |
|
|
435
|
+
| `tx.addChild` | Add a child element to a parent. It always creates one; `ensureChild` reuses an existing child. | create a new element under a parent; insert a child with attributes; build new content in a transaction |
|
|
436
|
+
| `tx.deepClone` | Deep-clone a subtree under a new parent. | copy a subtree with fresh ids; duplicate an element under another parent; paste a tree read with getTree; map old ids to new ids |
|
|
437
|
+
| `tx.delete` | Delete an element and its entire subtree. | remove an element; delete a subtree; prune a child from its parent |
|
|
438
|
+
| `tx.ensureChild` | Get an existing child record or create it under the given parent. | get or create a child; make sure a singleton container exists before adding under it; add a child without duplicating it |
|
|
439
|
+
| `tx.progress.endPlan` | Pop the innermost plan. Clears progress only once the stack is empty. | close a nested progress plan; finish reporting progress for a step |
|
|
440
|
+
| `tx.progress.nextStep` | Advance the innermost plan by one step (close-previous); optionally recaption. | mark a progress step done; update the progress caption |
|
|
441
|
+
| `tx.progress.plan` | Push a plan level (child of the current innermost, or the main if none). | report progress of a long operation; announce how many steps a transaction or nested step has; show a progress bar caption |
|
|
442
|
+
| `tx.update` | Update attributes of an existing element. | change attribute values; set or clear an attribute; rename an element through its name attribute; set an element's text value |
|
|
443
|
+
|
|
444
|
+
### `@dialecte/core`
|
|
445
|
+
|
|
446
|
+
| Function | What it answers | Reach for it to |
|
|
447
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
448
|
+
| `applyDocumentUpdates` | A document with the updates applied, its file name and its path kept one fact: a `path` moves and renames it (its `name` follows the file name, which must end with the document's own `extension`); a `name` on a document with a path rewrites the file name in it, the folders kept; both given must agree; a field given as `undefined` is left as it was, a key beyond `DOCUMENT_UPDATE_FIELDS` ignored. Refused with `DOCUMENT_PATH_INVALID` when the result breaks a rule; the document given is left as it was. Whether the place is free is the store's to check (`assertDocumentPlace`). | rename or move a document by its path; apply document updates in a custom store |
|
|
449
|
+
| `assertDocumentPlace` | Check a document to register against the registered ones: its path valid and ending with its file name (`DOCUMENT_PATH_INVALID`), then its place free (`DOCUMENT_PATH_TAKEN`). A document without a path passes. | check a document path is valid and free before registering it; register documents in a custom store |
|
|
450
|
+
| `bindExtensions` | The extension map bound to an instance (a Query or a Transaction): same shape, each function called with the instance. Each function in the map gets `instance` prepended as its first argument, so the public API signature has that argument stripped. | attach an extension map to a query or a transaction; call extension functions as methods of an instance |
|
|
451
|
+
| `blobTableName` | The name of the store table holding the blob data of the document `documentId`. | name the store table holding a document's blob data; store blobs in a custom store |
|
|
452
|
+
| `createDiagnostic` | Build a diagnostic of a catalogue: `severity`, `source` and the default `message` come from the entry, so a producer only says what the diagnostic is about. The `meta` and `related` given keep their type on the way out, so a dialecte's typed diagnostic (`Diagnostic<'x'> & { meta: {…} }`) is what this returns when it is given that `meta`. | report an import or validation problem as a typed diagnostic; build a diagnostic from a dialecte's catalogue; attach meta to a diagnostic |
|
|
453
|
+
| `createDialecteError` | Build the Error `throwDialecteError` throws, without throwing it — for a caller that reports an error it caught instead of raising one. | report a caught error as a dialecte error without throwing; build the Error throwDialecteError would throw |
|
|
454
|
+
| `createPerf` | Dev metrics on the platform User Timing API. Disabled builds get `NOOP_PERF`. | measure how long operations take in development; collect timing spans and read a report of them |
|
|
455
|
+
| `createProjectFactory` | The project factory of a dialecte: every config, the default key, the dialecte's extensions merged under the consumer's, and a fresh hooks instance per Project. It carries the declaration, `engineUrl`, the address of the dialecte's engine worker, for the store that spawns it, and `spawner`, the engine as a page registers it with the hub (`connectHub({ spawners })`). `destroyProject({ name })` deletes the dialecte's project of that name on SQLite storage without opening it (an outdated or lost one too). | open projects of a dialecte from an app; get the factory that creates a dialecte's projects; delete a dialecte's project without opening it; register a dialecte's engine with the hub; use SQLite storage in an app (import `@dialecte/core/sqlite` once and open with `storage: { type: 'sqlite' }`); share one SQLite engine per project between the tabs of an app |
|
|
456
|
+
| `defineDialecte` | Declare a dialecte once: its identity, its configs, its extensions and how its hooks are made. Core derives the rest: `createProjectFactory`, `createTestRunner`, `createTestProject` and, in a worker, the engine. The declaration is frozen. | declare a dialecte package; register a dialecte's configs and extensions and hooks once; set up a new dialecte |
|
|
457
|
+
| `defineErrors` | Declare the errors of a dialecte: each entry gets its property name as `key`, so it can be passed wherever a core key is — `throwDialecteError`, `invariant`. | declare a dialecte's own error catalogue; add error keys usable with invariant and throwDialecteError |
|
|
458
|
+
| `importOutcomeOf` | What became of an import, read from the registry: the document its `writeId` is on is `running` while `importing`, `applied` once `ready`; no document carries it after a failure, an abort or a removal - `not-applied`. A store that knows which imports run says so (`isRunning`): a document `importing` whose import does not run is what a failed import left when its removal failed too - `not-applied`, removed when a store of the project next opens. | tell whether an import is running; applied or not applied; recover after a connection lost during an import |
|
|
459
|
+
| `inspectXml` | Inspect an XML string for the first occurrence of each requested element name. Returns a typed report keyed by the requested names. | peek at an XML file before importing it; read the root element or a version attribute without a full parse; detect which config a file needs |
|
|
460
|
+
| `isKnownDiagnostic` | Whether a diagnostic is one the caller knows: an entry of one of the catalogues named, matched on the pair (`source`, `code`) - two dialectes may both have an `unresolved-reference`. Its `code` is then narrowed to those catalogues' codes, so a `switch` on it or a table read with it is checked. | tell which diagnostic an import reported; narrow a diagnostic to a catalogue's codes; word a diagnostic for a user |
|
|
461
|
+
| `isKnownDialecteError` | Whether a structured error is one the caller knows: a key of the core catalogue, or an entry of one of the catalogues named — same key, same code. Its `key` is then narrowed to those keys, so a `switch` on it or a table read with it is checked again. | tell which error was thrown; narrow an error key for a switch; word an error for a user |
|
|
462
|
+
| `parseDocumentPath` | A document's path read apart into its folders and its file name. A path is relative and written one way only: segments joined by `/`, none empty, none `.` or `..`, no backslash, no invisible format, separator or control character, well-formed and in Unicode NFC, each segment at most 255 UTF-8 bytes and the whole at most 1024. Nothing is rewritten: a path breaking a rule is refused with `DOCUMENT_PATH_INVALID`, `detail` naming the rule, `meta.path` the path as given. | validate a document path; split a document path into folders and file name |
|
|
463
|
+
| `parseXmlDocument` | The DOM of an XML file, in the page (a worker or Node has no `DOMParser`). Parse the compact export (`indent: false`) to get the document the stored records make, with no whitespace-only text node. A file that is not well-formed throws `PARSE_ERROR`, with what the parser said. | get the DOM of an exported XML file; read an export as an XMLDocument in the page; query an export with XPath |
|
|
464
|
+
| `pathHolderOf` | The document whose path clashes with `path`, the document `documentId` excepted: one at that very place, or one whose path is a folder of the other's - a file system holds no file and folder of one name. Paths compare exactly; a document without a path holds no place. None when the place is free. | find which document holds a path; check whether a file or folder path is free |
|
|
465
|
+
| `recordTableName` | The name of the store table holding the records of the document `documentId`. | name the store table holding a document's records; read a document's records from the local database directly |
|
|
466
|
+
| `removeUnfinishedImports` | Remove every document an import left `importing`: an import never outlives the store that ran it, so what a store finds `importing` when it opens is a leftover - a closed tab, a crash. A store shared by several connections names the imports still running (`isRunning`): they are kept. A row is read again before it goes, so an import that ended since the registry was listed stays. | clean up the imports a closed tab or a crash left behind; clean up leftover imports when a custom store opens |
|
|
467
|
+
| `runExport` | The export of one document, next to the data - what every store's `exportFile` runs. The records are read parent by parent, `batchSize` children per call in the order they are written (never the whole document in one call), and written as they come; each written batch becomes a part of the answered `Blob`, whose head (declaration and root start tag) is put in front at the end. A write on the document while it is exported restarts it once from the start; a second one fails it with `EXPORT_CONFLICT`. The progress listener and the abort come apart from the export's data, as a worker call carries them. | implement exportFile of a custom store; export a document from a store in batches |
|
|
468
|
+
| `runImport` | The import of one file, next to the data - what every store's `importFile` runs. It registers the document `importing` under the caller's `writeId`, parses the file with the dialecte's import session and stores it batch by batch, applies the session's writes, marks the document `ready`. A document is whole or absent: whatever fails, or an abort, removes it and is thrown (a foreign error as `IMPORT_FAILED`, its cause kept; diagnostics that are not plain JSON as `STORE_VALUE_NOT_JSON`). The progress listener and the abort come apart from the import's data, as a worker call carries them. | implement importFile of a custom store; import a file into a store with core's import pipeline |
|
|
469
|
+
| `summarizeOperations` | What staged operations write, counted per record as the commit merges them (a record created then updated is one creation; created then deleted, nothing): totals, and per tag in tag order. | count what a transaction will create; update and delete; summarize a prepared transaction per tag; show a confirmation summary before commit |
|
|
470
|
+
| `throwDialecteError` | Create a structured error and throw it. When `method` is omitted, the caller's name is extracted from the stack trace. | throw a structured error; fail with a core or dialecte error key; raise an error a consumer can read by key |
|
|
471
|
+
| `toDialecteError` | The structured error a caught value carries — thrown by `throwDialecteError` or `invariant` — or nothing when it is any other error or value. | read the structured error from a caught value; handle a dialecte error in a catch block |
|
|
472
|
+
| `writeOutcomeOf` | What became of a write - an import or a commit - read from the registry first, then from the history: `committed` says whether a history entry carries the id (a commit is applied whole or not at all, never running). | tell whether an import or a commit was applied; recover after a connection lost during a write |
|
|
473
|
+
|
|
474
|
+
### `@dialecte/core/test`
|
|
475
|
+
|
|
476
|
+
| Function | What it answers | Reach for it to |
|
|
477
|
+
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
478
|
+
| `assertExpectedElementQueries` | Asserts that each XPath query selects at least one node of the XML text, parsed once for all of them. A failure names the steps that matched, the step that failed, where the last match sits, what the failing step finds there without its predicates, and the XML around it. | assert that XML holds the elements XPath queries select; check that an export holds an element |
|
|
479
|
+
| `assertUnexpectedElementQueries` | Asserts that no XPath query selects a node of the XML text, parsed once for all of them. | assert that XML does not hold an element; check that an element was removed from an export |
|
|
480
|
+
| `createMockRandomUUID` | The `crypto.randomUUID` a test case's act runs with: UUID-shaped ids that follow from a seed (0 by default), the same sequence on every run. | get deterministic uuids in a test; mock crypto.randomUUID |
|
|
481
|
+
| `createTestHelpers` | Every test helper a dialecte needs, derived from its declaration: the runner, the test project, the record factory, the XPath assertions and the schema assertions. A fixture is checked against the schema of the config it is imported under, then by the dialecte's extra checks, before a case or a test project uses it. | get every test helper of a dialecte; set up a dialecte package's tests; check fixtures against the schema |
|
|
482
|
+
| `createTestProject` | Spin up a Project of the declared dialecte - every config, the default key, its extensions and its own hooks instance; core's own test dialecte when none is given - with the source (and optionally the target) imported under the default config. Returns project + pre-opened documents. Opened inside a running test, the project is destroyed when the test ends (after its other `onTestFinished` hooks); opened outside one (`beforeAll`), the caller destroys it. Spin up a Project from a config, extensions and hooks given one by one, with the source (and optionally the target) imported under the key `default`. | open a project in a test with a fixture imported; get documents to test against |
|
|
483
|
+
| `createTestRecordFactory` | A record factory bound to a dialecte config: given a record (its tag and fields) and a `type`, it builds a raw (default), tracked or tree record of that dialecte, standardized as core stores it. | build typed test records for a dialecte; expose a record factory in a dialecte's test entry |
|
|
484
|
+
| `createTestRunner` | The test runner of a declared dialecte: each case runs on a fresh project with every config, the default key, the dialecte's extensions and its own hooks instance, on the store `storage` names (the local one by default). A test runner from a config, extensions and one hooks instance shared by every case. | run table-driven test cases on a dialecte; test a transaction against expected XML |
|
|
485
|
+
| `createXmlAssertions` | The query assertions of a dialecte: XPath prefixes are its config's namespace keys, mapped to their URIs once here. Made once per dialecte (e.g. in scl's test entry) and offered beside `createTestProject`. | make XPath assertions bound to a dialecte's namespaces; assert exported XML in tests |
|
|
486
|
+
| `createXmlSchemaAssertions` | Structural schema assertions for tests, bound to a dialecte's generated `definition` and declared `namespaces`: `assertValidXml` (and its table form `assertValidXmlTestCases`) fails when an XML text holds an element in the wrong namespace, an element its parent may not hold, an unknown attribute or, with `requireComplete`, a missing required attribute. It is not a full XSD validation: it does not check the order of children, how many times a child occurs (min/max, a missing required child), attribute values (patterns, enumerations, datatypes) nor constraints across elements (unique keys, key references). Made once per dialecte (e.g. in scl's test entry) and offered beside `createTestProject`, like `createXmlAssertions`. | validate an exported XML file against the schema in a test; check exported XML against the XSD structure (namespaces, allowed children, known and required attributes); assert in a test that a document is structurally valid for its schema |
|
|
487
|
+
| `normalizeUuids` | Replace every uuid value in a serialized document with a stable, first-appearance token (`uuid-1`, `uuid-2`, …). The same uuid always maps to the same token, so relationships — a `templateUuid` pointing at an element's `uuid`, a reference's target — stay visible, while the result no longer depends on the random uuid VALUES. | snapshot a document independently of random uuids; compare XML holding generated ids |
|
|
488
|
+
| `useTestStorage` | The store the test helpers open their projects on when a call names none, for the whole process: the runner (`createTestRunner`), `createTestProject` and `createTestHelpers`. A runner's setup file calls it (`useTestStorage({ type: 'inMemory' })` for a node test project); a test file never does. A call's own `storage` (on the helper or on one call) still wins; `undefined` gives the project's own default back (the local store). In the test helpers `{ type: 'sqlite' }` is the SQLite engine run in the test's own process (its file in memory), in node as in a browser, once the setup file imports `@dialecte/core/sqlite` (as an app opts into SQLite storage). | choose the store tests run on; run node tests on the in-memory store; run tests on SQLite |
|
|
489
|
+
|
|
490
|
+
### `@dialecte/core/utils`
|
|
491
|
+
|
|
492
|
+
| Function | What it answers | Reach for it to |
|
|
493
|
+
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
494
|
+
| `admittedXsiTypes` | The types the record may name with xsi:type (Clark names): its declared type when named and not abstract, and its variants; where its parent leaves the declaration open, those any declaration of the tag admits. The record's own xsi:type is not read. | list the xsi:type values an element may take; offer type choices for an element |
|
|
495
|
+
| `canonicalXsiType` | The form core stores an xsi:type value in: the local name for a type in the dialecte's default namespace, the dialecte's prefix and the local name for a type in another namespace it declares. A value whose prefix is bound nowhere, or naming a namespace the dialecte does not declare, is kept as written. The value keeps what XML says it means: only the prefix it is written with changes. | write an xsi:type value the way core stores it; compare xsi:type values written with different prefixes |
|
|
496
|
+
| `childOccurrences` | How often each child may appear under an element, read from its resolved definition (`resolveDefinition`, or `query.getDefinition`): per child in `children.sequence` order, `{ min, max }` with `max` undefined for unbounded. An absent `minOccurs` is 0 and an absent `maxOccurs` unbounded, as the generator writes them; a sequence adds what its particles allow, a choice keeps the widest of its branches (0 when a branch lacks the child), a group's own occurrences multiply what it holds. A child the content model does not name (no model, or one only a variant holds) is optional and unbounded. | how many times a child may appear; required or optional children of an element; cardinality of children |
|
|
497
|
+
| `createSeededRandomUuid` | A stand-in for `crypto.randomUUID` whose ids follow from a seed: the same seed gives the same sequence, every id in the layout of a version 4 UUID - so a check that reads the layout of an id passes, and two runs of the same script mint the same ids. Not for ids that must be unguessable. | make generated ids reproducible; seed crypto.randomUUID for a script or a test |
|
|
498
|
+
| `enumeratedValues` | The values a datatype enumerates: its own enumeration, else those its union members enumerate - a member restricted by a pattern alone enumerates none. A qualified name's values are written `{uri}local`. | list the allowed values of an attribute; read the enumeration of a datatype; fill a dropdown with allowed values |
|
|
499
|
+
| `extractLocalName` | Local part of an attribute name — strips a namespace prefix if present (`a:b` → `b`). | strip the prefix from an attribute name; get the local name of a qualified name |
|
|
500
|
+
| `formatEmbeddedXml` | Reformat every XML snippet embedded in a JS/TS source string — a template literal preceded by a `/* xml *\/` marker comment — with `formatXml`, re-indented under the marker's own line with the closing backtick aligned to the statement. Leaves the rest of the source untouched. The reusable core of an `xmlfmt`-style step for test fixtures (see the `dialecte-xmlfmt` bin). | format XML fixtures inside test files; reindent xml template literals in source code |
|
|
501
|
+
| `formatXml` | Format an XML string to a canonical, readable shape: one structural tag per line, indented by depth, with pure-text leaves kept inline (`<Name ...>text</Name>`). | pretty-print an XML string; format XML for a snapshot or a fixture; indent XML without changing values |
|
|
502
|
+
| `getAttributeRules` | The schema rules of one attribute of an element where it sits: whether the element and the attribute are declared, whether the attribute is required or an identity field, its `fixed` and `default` values and its namespace. | know whether an attribute is required; read an attribute's default or fixed value; check whether an attribute is declared for an element |
|
|
503
|
+
| `invariant` | Assert a condition, throwing a structured DialecteError if it fails. | assert a condition and throw a structured error; guard against a missing record; fail with a dialecte error key |
|
|
504
|
+
| `isNamespaceAllowedByWildcard` | Whether a wildcard allows a namespace (`''` = none): the namespaces it lists, or every one it does not exclude. | check whether a wildcard admits a namespace; tell whether foreign attributes or elements are allowed |
|
|
505
|
+
| `isSchemaDefaultValue` | Whether a value equals the attribute's schema default for COMPARE: matches the `fixed` value if any, else the `default` (including an empty-string default). Compare sites drop attributes for which this is true so that an authored default-equal value and an absent attribute fold to the same thing. | compare attributes ignoring schema defaults; tell whether a value equals an attribute's default |
|
|
506
|
+
| `orderAttributesBySequence` | Put an element's attributes into canonical order: schema-sequence attributes first (in `sequence` order), then everything else sorted deterministically. Never drops attributes — reorders only — so it is safe to re-apply after an `afterStandardizedRecord` hook to normalize whatever the hook added or moved. | put attributes in schema order; normalize attribute order after a hook |
|
|
507
|
+
| `orderByConfigSequence` | Order a parent's child nodes by the config-declared child sequence. | sort children in schema order; order nodes the way the export writes them |
|
|
508
|
+
| `requiredChoices` | The choices an element's content model requires (`resolveDefinition`, or `query.getDefinition`): each one reached through groups that are all required, with how many times it is taken (the groups' own minimum occurrences multiplied) and its branches in order - per branch, how often it holds each child (as `childOccurrences` counts them) and the choices it requires in turn. `childOccurrences` reads a child of a choice of several branches as optional; this is where a valid instance learns it must take one branch. An optional choice, or one inside an optional group, is not listed. | which children an element must hold where its content model offers a choice; the branches of a required choice; build a valid element from its content model |
|
|
509
|
+
| `resolveDefinition` | The definition that applies to a record - the one rule every reader of the definition follows. A tag declared one way is its tag level. A tag declared several ways takes the declaration its parent holds in the record's namespace (the only namespace held there, for a record that has none yet); a parent whose wildcard admits it, or no parent, gives the global declaration of that namespace; a parent leaving it to the particle the record matches gives the tag level, the union, lenient where the declarations differ. The parent is read at its tag level unless the caller gives its resolved definition (`parentDefinition`, a top-down walk does). Then the record's `xsi:type`, when its declaration admits the type, gives what the type lets it hold. It takes a record, whose `parent` is always known (`null` for the root); a ref carries no parent, so a caller holding one uses `query.getDefinition(ref)`, which fetches the record first. | read the definition of a record you hold without a query; know what an element may hold under its parent; walk definitions top-down |
|
|
510
|
+
| `resolveNamespaceByPrefix` | Resolve a namespace declared in the config by its prefix (e.g. `ext`, `dev`). Returns `undefined` for an empty prefix or an unknown one — consumers cannot extend `config.namespaces`, so an unknown prefix is a caller error. | find a declared namespace by its prefix; map a prefix to its namespace URI |
|
|
511
|
+
| `resolveNamespaceByScope` | Resolve a namespace _scope_ string to its full `Namespace`. A scope is normally a `config.namespaces` key (e.g. `ext`, `dev`); as a fallback it is matched against declared prefixes. Returns `undefined` when the scope is neither a known key nor a known prefix — an authoring error, since a registered namespace must be referenced by key (use a full `{ prefix, uri }` object for custom namespaces). | find a namespace by its config key; resolve a namespace scope to its prefix and URI |
|
|
512
|
+
| `resolvePrefixByNamespaceScope` | Resolve the XML prefix to store attributes under for a namespace _scope_. The scope is normally a config namespace **key** (e.g. `ext`, `dev`), which we map to its declared prefix. If the scope is not a declared key it is treated as a raw prefix, so callers can still target custom namespaces the config is unaware of. | find the prefix to store an attribute under; write an attribute in a declared or custom namespace |
|
|
513
|
+
| `resolveSchemaAttributeValue` | The schema value to inject for an **absent** attribute, per the requested view. Derived entirely from `getAttributeRules`, so read, compare, and export share one source of truth. Returns `undefined` when nothing should be injected. A stored value always wins and is handled by the caller before this is consulted. | know which schema value an absent attribute takes; fill an absent attribute with its schema default or fixed value |
|
|
514
|
+
| `resolveXsiType` | The type a record names with xsi:type, read as core stores it (`storedNamespaceLookup`); `undefined` without xsi:type or when its prefix is bound nowhere. | read the type an element names with xsi:type; resolve an xsi:type prefix to its namespace |
|
|
515
|
+
| `saveToDisk` | Save a Blob to disk using the native File System Access API when available (Chrome / Edge) and falling back to a hidden anchor download (Safari / Firefox), also when the dialog is refused because the user's gesture lapsed. The user cancelling the dialog saves nothing; any other failure is thrown. | save a Blob as a file; download an exported document; open a save dialog in the browser |
|
|
516
|
+
| `valuePatterns` | The patterns of a datatype's own levels, each anchored to the whole value and compiled with the `u` flag the definition writes them for: a value must match every one (one pattern of a level is enough within it). | validate an attribute value against its datatype patterns; get the regular expressions an attribute value must match |
|
|
517
|
+
|
|
518
|
+
### `@dialecte/core/helpers`
|
|
519
|
+
|
|
520
|
+
| Function | What it answers | Reach for it to |
|
|
521
|
+
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
522
|
+
| `evaluateExpectations` | Check what a document holds against expectations written before the script that builds it, with no DOM: each expectation counts the elements of its tag (with its attribute values, under an element of its `under` scope) through the query, so a prepared transaction's `query` is checked on what `commit()` would write. Every expectation is answered, met or failed with the count found. | check a built document against expected element counts; verify a script's result before committing; test what a prepared transaction would write |
|
|
523
|
+
| `isAttributeOf` | Type predicate narrowing a string to a valid attribute name for a given record. | check that a string is an attribute of an element; narrow an attribute name before a typed read |
|
|
524
|
+
| `isChildOf` | Type predicate narrowing a relationship to a specific tag name. | filter child refs by tag name; narrow a child relationship to one tag |
|
|
525
|
+
| `isElementOf` | Type predicate narrowing a string to a valid element tag name for a given config. | check that a string is a tag name of the dialecte; narrow an unknown tag name before a typed query |
|
|
526
|
+
| `isFullAttributeArray` | Whether attributes come as an array of attribute objects (`FullAttributeObject[]`) rather than a value object. | tell an attribute array from an attribute value object; narrow attribute input |
|
|
527
|
+
| `isParentOf` | Type predicate narrowing a parent relationship to a specific tag name. | check the tag of a record's parent; narrow a parent relationship to one tag |
|
|
528
|
+
| `isRawRecord` | Whether a record is a `RawRecord`: the stored shape, without a change status or tree children. | tell a stored record from a tracked or tree record; narrow a record to its raw shape |
|
|
529
|
+
| `isRecordOf` | Whether a record is of the tag name given, narrowing its type to that element (raw, tracked or tree record alike). | narrow a record to one tag name; check an element's tag with types |
|
|
530
|
+
| `isTrackedRecord` | Whether a record is a `TrackedRecord`: a stored record with its change status, as queries return it. | tell a tracked record from a raw or tree record; narrow a record to its tracked shape |
|
|
531
|
+
| `isTreeRecord` | Whether a record is a `TreeRecord`: a node of a tree read, holding its child nodes. | tell a tree record from a raw or tracked record; narrow a record to a tree node |
|
|
532
|
+
| `mergeExtensions` | Merges named extension modules into the flat { query, transaction } registry | combine extension modules into one registry; add custom extensions next to a dialecte's base extensions |
|
|
533
|
+
| `readAttribute` | Read one attribute of a record you hold, the way `query.getAttribute` reads it - same `namespace` scope, same `defaults` fill, same `''` for an absent attribute - with no query: synchronous, for an import pass or a pure composer. `query.getAttribute` itself delegates to it once it has the record. | look up an attribute value on a record you already hold in an import hook; look up an attribute of a held record in a pure function with no query |
|
|
534
|
+
| `readAttributes` | Read the attributes of a record you hold, the way `query.getAttributes` reads them - each under the name it is stored by, or keyed by local name in a `namespace` scope, absent schema attributes filled per `defaults` - with no query: synchronous, for an import pass or a pure composer. `query.getAttributes` itself delegates to it once it has the record. Values are plain strings: for typed reads use the query. | look up the attribute values of a record you already hold in an import hook; look up the attributes of a held record in a pure function with no query |
|
|
535
|
+
| `stripAttributes` | Returns a new record with specified attribute names removed. Pure function — does not mutate the input. | remove attributes from a record; drop attributes before cloning a record |
|
|
536
|
+
| `toFullAttributeArray` | Converts attributes to FullAttributeObject array format and canonicalizes each attribute name to the two naming rules (see `canonicalizeAttributeName`), so records from import, create, and update share one stored name per attribute. | turn an attribute value object into an attribute array; canonicalize attribute names before a write |
|
|
537
|
+
| `toRawRecord` | A new `RawRecord` holding the seven stored fields of a raw, tracked or tree record (`id`, `tagName`, `namespace`, `attributes`, `value`, `parent`, `children`); a change status or tree children are left out. Only the record object is new: `attributes`, `parent` and `children` are the same arrays and objects as the record's, not cloned. | strip a record to its stored fields; pass a record where a raw record is expected |
|
|
538
|
+
| `toRef` | Convert a Ref, ParentRelationship, ChildRelationship, or Record to a Ref. ParentsOf/ChildrenOf are subsets of ElementsOf by design, so this is semantically safe. | get the ref of a record or a relationship; pass a ref to a query |
|
|
539
|
+
| `toTrackedRecord` | A new `TrackedRecord` of a raw, tracked or tree record: its stored fields (as `toRawRecord` takes them) and a change status - the `status` given, else the record's own, else `'unchanged'`. The field values are shared with the record, not cloned. | give a raw record a change status; pass a raw or tree record where a tracked record is expected |
|
|
540
|
+
| `toTreeRecord` | A new `TreeRecord` of a raw, tracked or tree record: its stored fields and change status as `toTrackedRecord` gives them, and its child nodes - the `tree` given, else the record's own, else `[]`. The field values and the `tree` array are shared with the record, not cloned. | turn a record into a tree node; build a tree record from a raw or tracked record |
|
|
541
|
+
| `widen` | Widen any per-element dialecte value to its element-union form — the same value, with its element type parameter widened from a specific `GenericElement` to `ElementsOf<GenericConfig>`. | pass a per-element record or ref to an API typed with the element union; fix an invariance type error on a record or ref |
|
|
542
|
+
|
|
543
|
+
### `@dialecte/core/engine`
|
|
544
|
+
|
|
545
|
+
| Function | What it answers | Reach for it to |
|
|
546
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
547
|
+
| `serveDialecteEngine` | Serve the dialecte's project engine from this worker, the one call of a dialecte package's engine worker file - today the SQLite engine on the origin's private file system (opfs-sahpool). The realm that spawned it (or the hub, through it) sends control messages - open the project, adopt a client's port, a client gone, close, destroy - handled one at a time and each answered once; every adopted port is served the engine's members. One project per worker. | serve a dialecte's engine from a worker; write a dialecte package's engine worker file; ship a dialecte's SQLite engine in its package |
|
|
548
|
+
|
|
549
|
+
### `@dialecte/core/sqlite`
|
|
550
|
+
|
|
551
|
+
| Function | What it answers | Reach for it to |
|
|
552
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
553
|
+
| `adoptHubPort` | Join the hub through a port a page made with `createHubPort` (a document that cannot reach the hub's script), and get that document's connection: a client only, whose liveness is that page's. A port nobody answers fails the join `STORE_CONNECTION_FAILED` once the welcome budget has passed. A document that connected already gets its connection - `undefined` when that one found no hub. One the hub dropped with its page (its calls refused `STORE_ENGINE_LOST`, `realm-dropped`) joins again on the new port, on its own: the page makes it one from `onRejoined`, and a join that fails leaves it dropped until the next one. | join the hub from an iframe of another origin; open projects on SQLite storage in a child frame through its page's engine; bind a child frame again after its page rejoined the hub |
|
|
554
|
+
| `connectHub` | Connect this page to the origin's hub, once, and get its connection (`HubRealm`: `realmId`, `createHubPort` to bind a child frame, `onRejoined`, the moment to bind child frames again after a freeze or a drop): a second call - from this copy of the library or another one of the same protocol - gets the same connection. Answers `undefined` where the browser has no SharedWorker, or the hub never welcomed the page (its script failed to load or was blocked, or it stayed silent): a later call tries again. A hub of another protocol refuses the page: `STORE_PROTOCOL_MISMATCH`; the browser refusing to make the hub's worker (a `DOMException`) is no hub, any other error thrown making it is thrown. The page registers the engines it can start whose worker is of its own origin (each dialecte's `factory.spawner`); a later call adds those it does not run yet - a project opened on `sqlite` adds its own as it opens - and one naming a dialecte the page runs at another version is refused `STORE_HUB_SPAWNERS_FIXED`, the connection kept. A document that joined through `adoptHubPort` hosts no engine: the spawners it names are not registered; neither are those of a page that cannot store (no private file system; two versions of one dialecte refused all the same): its own projects on `sqlite` are refused `STORE_UNAVAILABLE` unless its page bound it, its connection serving to hand ports to its children. An engine's files (the SQLite wasm) are fetched when the page first starts one. | register this page's dialecte engines with the hub before any project opens; connect a page to the origin's hub; offer a dialecte's engine to the hub (`factory.spawner`); get a port to hand a child frame of another origin |
|
|
555
|
+
| `listProjects` | The projects on SQLite storage of this origin - every dialecte's, or `dialecteId`'s - read from the origin's private file system alone (no engine started, no wasm loaded; a project whose engine runs is read too), sorted by dialecte and name: each one's state (`current`, `outdated`, `lost`, `new`, `unknown`), the bytes it takes and when it was last written. Where the browser gives no private file system (Node, a private window) it refuses `STORE_UNAVAILABLE`. | list the projects stored in the browser on SQLite storage; find outdated or lost projects on SQLite storage; show how much space each project takes; check whether a project exists on SQLite storage without opening it |
|
|
556
|
+
|
|
557
|
+
<!-- /dialecte-skills:generated -->
|