atom.io 0.32.4 → 0.33.0
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/chunk-Cl8Af3a2.js +11 -0
- package/dist/data/index.d.ts +28 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +66 -0
- package/dist/data/index.js.map +1 -0
- package/dist/devtools-CAg2k57t.js +0 -0
- package/dist/devtools-Jyn42mZm.css +311 -0
- package/dist/devtools-Jyn42mZm.css.map +1 -0
- package/dist/eslint-plugin/index.d.ts +36 -0
- package/dist/eslint-plugin/index.d.ts.map +1 -0
- package/dist/eslint-plugin/index.js +196 -0
- package/dist/eslint-plugin/index.js.map +1 -0
- package/{internal/dist → dist/internal}/index.d.ts +495 -378
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/index.js +3213 -0
- package/dist/internal/index.js.map +1 -0
- package/dist/introspection/index.d.ts +153 -0
- package/dist/introspection/index.d.ts.map +1 -0
- package/dist/introspection/index.js +520 -0
- package/dist/introspection/index.js.map +1 -0
- package/{json/dist → dist/json}/index.d.ts +38 -32
- package/dist/json/index.d.ts.map +1 -0
- package/dist/json/index.js +75 -0
- package/dist/json/index.js.map +1 -0
- package/dist/main/index.d.ts +691 -0
- package/dist/main/index.d.ts.map +1 -0
- package/dist/main/index.js +237 -0
- package/dist/main/index.js.map +1 -0
- package/{react/dist → dist/react}/index.d.ts +22 -11
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +91 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react-devtools/index.d.ts +194 -0
- package/dist/react-devtools/index.d.ts.map +1 -0
- package/dist/react-devtools/index.js +1274 -0
- package/dist/react-devtools/index.js.map +1 -0
- package/dist/realtime/index.d.ts +55 -0
- package/dist/realtime/index.d.ts.map +1 -0
- package/dist/realtime/index.js +113 -0
- package/dist/realtime/index.js.map +1 -0
- package/dist/realtime-client/index.d.ts +81 -0
- package/dist/realtime-client/index.d.ts.map +1 -0
- package/dist/realtime-client/index.js +376 -0
- package/dist/realtime-client/index.js.map +1 -0
- package/dist/realtime-react/index.d.ts +68 -0
- package/dist/realtime-react/index.d.ts.map +1 -0
- package/dist/realtime-react/index.js +182 -0
- package/dist/realtime-react/index.js.map +1 -0
- package/dist/realtime-server/index.d.ts +190 -0
- package/dist/realtime-server/index.d.ts.map +1 -0
- package/dist/realtime-server/index.js +795 -0
- package/dist/realtime-server/index.js.map +1 -0
- package/dist/realtime-testing/index.d.ts +60 -0
- package/dist/realtime-testing/index.d.ts.map +1 -0
- package/dist/realtime-testing/index.js +181 -0
- package/dist/realtime-testing/index.js.map +1 -0
- package/dist/transceivers/set-rtx/index.d.ts +44 -0
- package/dist/transceivers/set-rtx/index.d.ts.map +1 -0
- package/dist/transceivers/set-rtx/index.js +204 -0
- package/dist/transceivers/set-rtx/index.js.map +1 -0
- package/dist/web/index.d.ts +15 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +16 -0
- package/dist/web/index.js.map +1 -0
- package/package.json +65 -117
- package/{eslint-plugin/src → src/eslint-plugin}/index.ts +3 -1
- package/{eslint-plugin/src → src/eslint-plugin}/rules/explicit-state-types.ts +6 -1
- package/{eslint-plugin/src → src/eslint-plugin}/rules/synchronous-selector-dependencies.ts +14 -1
- package/{internal/src → src/internal}/families/index.ts +2 -0
- package/{internal/src → src/internal}/index.ts +1 -0
- package/{internal/src → src/internal}/junction.ts +3 -2
- package/{internal/src → src/internal}/lazy-map.ts +1 -1
- package/{internal/src → src/internal}/mutable/tracker-family.ts +2 -5
- package/{internal/src → src/internal}/mutable/tracker.ts +15 -9
- package/{internal/src → src/internal}/store/store.ts +59 -46
- package/{internal/src → src/internal}/subject.ts +1 -1
- package/{introspection/src → src/introspection}/auditor.ts +1 -1
- package/{introspection/src → src/introspection}/differ.ts +12 -1
- package/{introspection/src → src/introspection}/refinery.ts +18 -3
- package/{json/src → src/json}/entries.ts +1 -1
- package/{json/src → src/json}/select-json-family.ts +1 -1
- package/src/{realm.ts → main/realm.ts} +1 -1
- package/src/{silo.ts → main/silo.ts} +1 -1
- package/src/{transaction.ts → main/transaction.ts} +1 -1
- package/{react/src → src/react}/store-context.tsx +3 -1
- package/{react-devtools/src → src/react-devtools}/AtomIODevtools.tsx +1 -1
- package/{react-devtools/src → src/react-devtools}/Button.tsx +3 -1
- package/{react-devtools/src → src/react-devtools}/Updates.tsx +5 -1
- package/src/react-devtools/devtools.css +308 -0
- package/{react-devtools/src → src/react-devtools}/json-editor/index.ts +5 -2
- package/{react-devtools/src → src/react-devtools}/store.ts +3 -2
- package/{realtime/src → src/realtime}/shared-room-store.ts +28 -5
- package/src/realtime-client/realtime-client-stores/client-main-store.ts +23 -0
- package/src/realtime-client/realtime-client-stores/client-sync-store.ts +15 -0
- package/{realtime-react/src → src/realtime-react}/index.ts +1 -0
- package/{realtime-react/src → src/realtime-react}/on-mount.ts +1 -1
- package/{realtime-react/src → src/realtime-react}/realtime-context.tsx +5 -4
- package/{realtime-react/src → src/realtime-react}/use-single-effect.ts +1 -1
- package/{realtime-server/src → src/realtime-server}/realtime-server-stores/server-room-external-actions.ts +20 -19
- package/{realtime-server/src → src/realtime-server}/realtime-server-stores/server-room-external-store.ts +12 -7
- package/{realtime-server/src → src/realtime-server}/realtime-server-stores/server-sync-store.ts +13 -4
- package/{realtime-server/src → src/realtime-server}/realtime-server-stores/server-user-store.ts +26 -8
- package/{transceivers/set-rtx/src → src/transceivers/set-rtx}/set-rtx.ts +2 -2
- package/data/dist/index.d.ts +0 -31
- package/data/dist/index.js +0 -69
- package/data/package.json +0 -13
- package/dist/chunk-4LWKCEW3.js +0 -14
- package/dist/chunk-7SJVR7FZ.js +0 -4499
- package/dist/chunk-IR77IXS7.js +0 -526
- package/dist/chunk-PG57JXN4.js +0 -1035
- package/dist/chunk-PXB4YZDI.js +0 -153
- package/dist/chunk-Q6OOJWM4.js +0 -634
- package/dist/chunk-TJPLOX7Z.js +0 -81
- package/dist/chunk-U4K63VLA.js +0 -109
- package/dist/chunk-XWL6SNVU.js +0 -7
- package/dist/index.d.ts +0 -701
- package/dist/index.js +0 -2
- package/eslint-plugin/dist/index.d.ts +0 -51
- package/eslint-plugin/dist/index.js +0 -238
- package/eslint-plugin/package.json +0 -13
- package/internal/dist/index.js +0 -2
- package/internal/package.json +0 -13
- package/introspection/dist/index.d.ts +0 -149
- package/introspection/dist/index.js +0 -3
- package/introspection/package.json +0 -13
- package/json/dist/index.js +0 -2
- package/json/package.json +0 -13
- package/react/dist/index.js +0 -3
- package/react/package.json +0 -13
- package/react-devtools/dist/index.css +0 -309
- package/react-devtools/dist/index.d.ts +0 -169
- package/react-devtools/dist/index.js +0 -1481
- package/react-devtools/package.json +0 -13
- package/react-devtools/src/devtools.scss +0 -309
- package/realtime/dist/index.d.ts +0 -51
- package/realtime/dist/index.js +0 -3
- package/realtime/package.json +0 -13
- package/realtime-client/dist/index.d.ts +0 -41
- package/realtime-client/dist/index.js +0 -4
- package/realtime-client/package.json +0 -13
- package/realtime-client/src/realtime-client-stores/client-main-store.ts +0 -20
- package/realtime-client/src/realtime-client-stores/client-sync-store.ts +0 -15
- package/realtime-react/dist/index.d.ts +0 -39
- package/realtime-react/dist/index.js +0 -6
- package/realtime-react/package.json +0 -13
- package/realtime-server/dist/index.d.ts +0 -139
- package/realtime-server/dist/index.js +0 -4
- package/realtime-server/package.json +0 -13
- package/realtime-testing/dist/index.d.ts +0 -59
- package/realtime-testing/dist/index.js +0 -198
- package/realtime-testing/package.json +0 -13
- package/transceivers/set-rtx/dist/index.d.ts +0 -41
- package/transceivers/set-rtx/dist/index.js +0 -2
- package/transceivers/set-rtx/package.json +0 -13
- package/web/dist/index.d.ts +0 -9
- package/web/dist/index.js +0 -2
- package/web/package.json +0 -13
- /package/{data/src → src/data}/dict.ts +0 -0
- /package/{data/src → src/data}/index.ts +0 -0
- /package/{data/src → src/data}/struct-family.ts +0 -0
- /package/{data/src → src/data}/struct.ts +0 -0
- /package/{eslint-plugin/src → src/eslint-plugin}/rules/index.ts +0 -0
- /package/{eslint-plugin/src → src/eslint-plugin}/walk.ts +0 -0
- /package/{internal/src → src/internal}/arbitrary.ts +0 -0
- /package/{internal/src → src/internal}/atom/create-regular-atom.ts +0 -0
- /package/{internal/src → src/internal}/atom/create-standalone-atom.ts +0 -0
- /package/{internal/src → src/internal}/atom/dispose-atom.ts +0 -0
- /package/{internal/src → src/internal}/atom/index.ts +0 -0
- /package/{internal/src → src/internal}/atom/is-default.ts +0 -0
- /package/{internal/src → src/internal}/caching.ts +0 -0
- /package/{internal/src → src/internal}/capitalize.ts +0 -0
- /package/{internal/src → src/internal}/families/create-atom-family.ts +0 -0
- /package/{internal/src → src/internal}/families/create-readonly-selector-family.ts +0 -0
- /package/{internal/src → src/internal}/families/create-regular-atom-family.ts +0 -0
- /package/{internal/src → src/internal}/families/create-selector-family.ts +0 -0
- /package/{internal/src → src/internal}/families/create-writable-selector-family.ts +0 -0
- /package/{internal/src → src/internal}/families/dispose-from-store.ts +0 -0
- /package/{internal/src → src/internal}/families/find-in-store.ts +0 -0
- /package/{internal/src → src/internal}/families/get-family-of-token.ts +0 -0
- /package/{internal/src → src/internal}/families/init-family-member.ts +0 -0
- /package/{internal/src → src/internal}/families/seek-in-store.ts +0 -0
- /package/{internal/src → src/internal}/future.ts +0 -0
- /package/{internal/src → src/internal}/get-environment-data.ts +0 -0
- /package/{internal/src → src/internal}/get-state/get-from-store.ts +0 -0
- /package/{internal/src → src/internal}/get-state/index.ts +0 -0
- /package/{internal/src → src/internal}/get-state/read-or-compute-value.ts +0 -0
- /package/{internal/src → src/internal}/get-trace.ts +0 -0
- /package/{internal/src → src/internal}/ingest-updates/index.ts +0 -0
- /package/{internal/src → src/internal}/ingest-updates/ingest-atom-update.ts +0 -0
- /package/{internal/src → src/internal}/ingest-updates/ingest-creation-disposal.ts +0 -0
- /package/{internal/src → src/internal}/ingest-updates/ingest-selector-update.ts +0 -0
- /package/{internal/src → src/internal}/ingest-updates/ingest-transaction-update.ts +0 -0
- /package/{internal/src → src/internal}/install-into-store.ts +0 -0
- /package/{internal/src → src/internal}/join/edit-relations-in-store.ts +0 -0
- /package/{internal/src → src/internal}/join/find-relations-in-store.ts +0 -0
- /package/{internal/src → src/internal}/join/get-internal-relations-from-store.ts +0 -0
- /package/{internal/src → src/internal}/join/get-join.ts +0 -0
- /package/{internal/src → src/internal}/join/index.ts +0 -0
- /package/{internal/src → src/internal}/join/join-internal.ts +0 -0
- /package/{internal/src → src/internal}/keys.ts +0 -0
- /package/{internal/src → src/internal}/lineage.ts +0 -0
- /package/{internal/src → src/internal}/molecule.ts +0 -0
- /package/{internal/src → src/internal}/mutable/create-mutable-atom-family.ts +0 -0
- /package/{internal/src → src/internal}/mutable/create-mutable-atom.ts +0 -0
- /package/{internal/src → src/internal}/mutable/get-json-family.ts +0 -0
- /package/{internal/src → src/internal}/mutable/get-json-token.ts +0 -0
- /package/{internal/src → src/internal}/mutable/get-update-family.ts +0 -0
- /package/{internal/src → src/internal}/mutable/get-update-token.ts +0 -0
- /package/{internal/src → src/internal}/mutable/index.ts +0 -0
- /package/{internal/src → src/internal}/mutable/transceiver.ts +0 -0
- /package/{internal/src → src/internal}/not-found-error.ts +0 -0
- /package/{internal/src → src/internal}/operation.ts +0 -0
- /package/{internal/src → src/internal}/pretty-print.ts +0 -0
- /package/{internal/src → src/internal}/reserved-keys.ts +0 -0
- /package/{internal/src → src/internal}/selector/create-readonly-selector.ts +0 -0
- /package/{internal/src → src/internal}/selector/create-standalone-selector.ts +0 -0
- /package/{internal/src → src/internal}/selector/create-writable-selector.ts +0 -0
- /package/{internal/src → src/internal}/selector/dispose-selector.ts +0 -0
- /package/{internal/src → src/internal}/selector/get-selector-dependency-keys.ts +0 -0
- /package/{internal/src → src/internal}/selector/index.ts +0 -0
- /package/{internal/src → src/internal}/selector/register-selector.ts +0 -0
- /package/{internal/src → src/internal}/selector/trace-selector-atoms.ts +0 -0
- /package/{internal/src → src/internal}/selector/update-selector-atoms.ts +0 -0
- /package/{internal/src → src/internal}/set-state/become.ts +0 -0
- /package/{internal/src → src/internal}/set-state/copy-mutable-if-needed.ts +0 -0
- /package/{internal/src → src/internal}/set-state/emit-update.ts +0 -0
- /package/{internal/src → src/internal}/set-state/evict-downstream.ts +0 -0
- /package/{internal/src → src/internal}/set-state/index.ts +0 -0
- /package/{internal/src → src/internal}/set-state/set-atom-or-selector.ts +0 -0
- /package/{internal/src → src/internal}/set-state/set-atom.ts +0 -0
- /package/{internal/src → src/internal}/set-state/set-into-store.ts +0 -0
- /package/{internal/src → src/internal}/store/circular-buffer.ts +0 -0
- /package/{internal/src → src/internal}/store/counterfeit.ts +0 -0
- /package/{internal/src → src/internal}/store/deposit.ts +0 -0
- /package/{internal/src → src/internal}/store/index.ts +0 -0
- /package/{internal/src → src/internal}/store/withdraw.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/index.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/recall-state.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/subscribe-in-store.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/subscribe-to-root-atoms.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/subscribe-to-state.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/subscribe-to-timeline.ts +0 -0
- /package/{internal/src → src/internal}/subscribe/subscribe-to-transaction.ts +0 -0
- /package/{internal/src → src/internal}/timeline/create-timeline.ts +0 -0
- /package/{internal/src → src/internal}/timeline/index.ts +0 -0
- /package/{internal/src → src/internal}/timeline/time-travel.ts +0 -0
- /package/{internal/src → src/internal}/transaction/abort-transaction.ts +0 -0
- /package/{internal/src → src/internal}/transaction/act-upon-store.ts +0 -0
- /package/{internal/src → src/internal}/transaction/apply-transaction.ts +0 -0
- /package/{internal/src → src/internal}/transaction/assign-transaction-to-continuity.ts +0 -0
- /package/{internal/src → src/internal}/transaction/build-transaction.ts +0 -0
- /package/{internal/src → src/internal}/transaction/create-transaction.ts +0 -0
- /package/{internal/src → src/internal}/transaction/get-epoch-number.ts +0 -0
- /package/{internal/src → src/internal}/transaction/index.ts +0 -0
- /package/{internal/src → src/internal}/transaction/is-root-store.ts +0 -0
- /package/{internal/src → src/internal}/transaction/set-epoch-number.ts +0 -0
- /package/{internal/src → src/internal}/utility-types.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-atom-index.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-introspection-states.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-selector-index.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-timeline-family.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-timeline-index.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-transaction-index.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-transaction-logs.ts +0 -0
- /package/{introspection/src → src/introspection}/attach-type-selectors.ts +0 -0
- /package/{introspection/src → src/introspection}/index.ts +0 -0
- /package/{introspection/src → src/introspection}/sprawl.ts +0 -0
- /package/{json/src → src/json}/index.ts +0 -0
- /package/{json/src → src/json}/select-json.ts +0 -0
- /package/src/{atom.ts → main/atom.ts} +0 -0
- /package/src/{dispose-state.ts → main/dispose-state.ts} +0 -0
- /package/src/{find-state.ts → main/find-state.ts} +0 -0
- /package/src/{get-state.ts → main/get-state.ts} +0 -0
- /package/src/{index.ts → main/index.ts} +0 -0
- /package/src/{join.ts → main/join.ts} +0 -0
- /package/src/{logger.ts → main/logger.ts} +0 -0
- /package/src/{selector.ts → main/selector.ts} +0 -0
- /package/src/{set-state.ts → main/set-state.ts} +0 -0
- /package/src/{subscribe.ts → main/subscribe.ts} +0 -0
- /package/src/{timeline.ts → main/timeline.ts} +0 -0
- /package/src/{validators.ts → main/validators.ts} +0 -0
- /package/{react/src → src/react}/index.ts +0 -0
- /package/{react/src → src/react}/parse-state-overloads.ts +0 -0
- /package/{react/src → src/react}/use-i.ts +0 -0
- /package/{react/src → src/react}/use-json.ts +0 -0
- /package/{react/src → src/react}/use-o.ts +0 -0
- /package/{react/src → src/react}/use-tl.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/StateEditor.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/StateIndex.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/TimelineIndex.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/TransactionIndex.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/elastic-input/ElasticInput.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/elastic-input/NumberInput.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/elastic-input/TextInput.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/elastic-input/index.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/error-boundary/DefaultFallback.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/error-boundary/ReactErrorBoundary.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/error-boundary/index.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/index.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/default-components.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/developer-interface.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/array-editor.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/non-json.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/object-editor.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/primitive-editors.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/utilities/array-elements.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/utilities/cast-json.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/utilities/cast-to-json.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/editors-by-type/utilities/object-properties.ts +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/json-editor-internal.tsx +0 -0
- /package/{react-devtools/src → src/react-devtools}/json-editor/todo.md +0 -0
- /package/{realtime/src → src/realtime}/index.ts +0 -0
- /package/{realtime/src → src/realtime}/realtime-continuity.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/continuity/index.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/continuity/register-and-attempt-confirmed-update.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/continuity/use-conceal-state.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/continuity/use-reveal-state.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/index.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/pull-atom-family-member.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/pull-atom.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/pull-mutable-atom-family-member.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/pull-mutable-atom.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/pull-selector-family-member.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/pull-selector.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/push-state.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/realtime-client-stores/index.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/server-action.ts +0 -0
- /package/{realtime-client/src → src/realtime-client}/sync-continuity.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-pull-atom-family-member.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-pull-atom.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-pull-mutable-atom.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-pull-mutable-family-member.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-pull-selector-family-member.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-pull-selector.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-push.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-realtime-service.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-server-action.ts +0 -0
- /package/{realtime-react/src → src/realtime-react}/use-sync-continuity.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/README.md +0 -0
- /package/{realtime-server/src → src/realtime-server}/continuity/prepare-to-send-initial-payload.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/continuity/prepare-to-serve-transaction-request.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/continuity/prepare-to-sync-realtime-continuity.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/continuity/prepare-to-track-client-acknowledgement.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/continuity/subscribe-to-continuity-actions.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/continuity/subscribe-to-continuity-perpectives.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/index.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/ipc-sockets/child-socket.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/ipc-sockets/custom-socket.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/ipc-sockets/index.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/ipc-sockets/parent-socket.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-action-receiver.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-family-provider.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-mutable-family-provider.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-mutable-provider.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-server-stores/index.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-state-provider.ts +0 -0
- /package/{realtime-server/src → src/realtime-server}/realtime-state-receiver.ts +0 -0
- /package/{realtime-testing/src → src/realtime-testing}/index.ts +0 -0
- /package/{realtime-testing/src → src/realtime-testing}/setup-realtime-test.tsx +0 -0
- /package/{transceivers/set-rtx/src → src/transceivers/set-rtx}/index.ts +0 -0
- /package/{web/src → src/web}/index.ts +0 -0
- /package/{web/src → src/web}/persist-sync.ts +0 -0
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Json,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Func as Func$1, Store as Store$1 } from "atom.io/internal";
|
|
2
|
+
import { Canonical, Json, JsonInterface, stringified } from "atom.io/json";
|
|
3
|
+
import { Above, ActorToolkit, Anarchy, AtomFamilyToken, AtomIOLogger, AtomIOToken, AtomToken, Claim, CompoundFrom, CompoundTypedKey, FamilyMetadata, Hierarchy, JoinOptions, JoinStates, JoinToken, KeyedStateUpdate, Logger, MoleculeCreation, MoleculeDisposal, MoleculeTransfer, MutableAtomFamilyOptions, MutableAtomFamilyToken, MutableAtomOptions, MutableAtomToken, ReadableFamilyToken, ReadableToken, ReadonlySelectorFamilyOptions, ReadonlySelectorFamilyToken, ReadonlySelectorOptions, ReadonlySelectorToken, RegularAtomFamilyOptions, RegularAtomFamilyToken, RegularAtomOptions, RegularAtomToken, SelectorFamilyToken, SelectorToken, SetterToolkit, SingularTypedKey, StateCreation, StateDisposal, StateUpdate, TimelineManageable, TimelineOptions, TimelineToken, TimelineUpdate, TokenType, TransactionOptions, TransactionToken, TransactionUpdate, TransactionUpdateHandler, UpdateHandler, Vassal, WritableFamilyToken, WritableSelectorFamilyOptions, WritableSelectorFamilyToken, WritableSelectorOptions, WritableSelectorToken, WritableToken } from "atom.io";
|
|
4
|
+
import { SetRTX, SetRTXJson } from "atom.io/transceivers/set-rtx";
|
|
5
5
|
|
|
6
|
+
//#region src/internal/store/circular-buffer.d.ts
|
|
6
7
|
declare class CircularBuffer<T> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
protected _buffer: T[];
|
|
9
|
+
protected _index: number;
|
|
10
|
+
constructor(array: T[]);
|
|
11
|
+
constructor(length: number);
|
|
12
|
+
get buffer(): ReadonlyArray<T | undefined>;
|
|
13
|
+
get index(): number;
|
|
14
|
+
add(item: T): void;
|
|
15
|
+
copy(): CircularBuffer<T>;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/internal/store/counterfeit.d.ts
|
|
17
20
|
declare const FAMILY_MEMBER_TOKEN_TYPES: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
readonly atom_family: "atom";
|
|
22
|
+
readonly mutable_atom_family: "mutable_atom";
|
|
23
|
+
readonly selector_family: "selector";
|
|
24
|
+
readonly readonly_selector_family: "readonly_selector";
|
|
25
|
+
readonly molecule_family: "molecule";
|
|
23
26
|
};
|
|
24
27
|
declare function counterfeit<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J>;
|
|
25
28
|
declare function counterfeit<T, K extends Canonical, Key extends K>(token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T>;
|
|
@@ -30,180 +33,183 @@ declare function counterfeit<T, K extends Canonical, Key extends K>(token: Selec
|
|
|
30
33
|
declare function counterfeit<T, K extends Canonical, Key extends K>(token: WritableFamilyToken<T, K>, key: Key): WritableToken<T>;
|
|
31
34
|
declare function counterfeit<T, K extends Canonical, Key extends K>(token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T>;
|
|
32
35
|
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/internal/utility-types.d.ts
|
|
33
38
|
type Func = (...parameters: any[]) => any;
|
|
34
|
-
type Flat<R extends {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
[K in keyof R]: R[K];
|
|
38
|
-
};
|
|
39
|
-
type Count<N extends number, A extends any[] = []> = [
|
|
40
|
-
...A,
|
|
41
|
-
any
|
|
42
|
-
][`length`] extends N ? A[`length`] : A[`length`] | Count<N, [...A, any]>;
|
|
43
|
-
type Each<E extends any[]> = {
|
|
44
|
-
[P in Count<E[`length`]>]: E[P];
|
|
45
|
-
};
|
|
39
|
+
type Flat<R extends { [K in PropertyKey]: any }> = { [K in keyof R]: R[K] };
|
|
40
|
+
type Count<N extends number, A extends any[] = []> = [...A, any][`length`] extends N ? A[`length`] : A[`length`] | Count<N, [...A, any]>;
|
|
41
|
+
type Each<E extends any[]> = { [P in Count<E[`length`]>]: E[P] };
|
|
46
42
|
type Refinement<A, B extends A> = (a: A) => a is B;
|
|
47
43
|
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/internal/junction.d.ts
|
|
48
46
|
type JunctionEntriesBase<AType extends string, BType extends string, Content extends Json.Object | null> = {
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
readonly relations: ([AType, BType[]] | [BType, AType[]])[];
|
|
48
|
+
readonly contents: [string, Content][];
|
|
51
49
|
};
|
|
52
|
-
interface JunctionEntries<AType extends string, BType extends string, Content extends Json.Object | null> extends Json.Object, JunctionEntriesBase<AType, BType, Content> {
|
|
53
|
-
}
|
|
50
|
+
interface JunctionEntries<AType extends string, BType extends string, Content extends Json.Object | null> extends Json.Object, JunctionEntriesBase<AType, BType, Content> {}
|
|
54
51
|
type JunctionSchemaBase<ASide extends string, BSide extends string> = {
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
readonly between: [a: ASide, b: BSide];
|
|
53
|
+
readonly cardinality: `1:1` | `1:n` | `n:n`;
|
|
57
54
|
};
|
|
58
|
-
interface JunctionSchema<ASide extends string, BSide extends string> extends Json.Object, JunctionSchemaBase<ASide, BSide> {
|
|
59
|
-
}
|
|
55
|
+
interface JunctionSchema<ASide extends string, BSide extends string> extends Json.Object, JunctionSchemaBase<ASide, BSide> {}
|
|
60
56
|
type BaseExternalStoreConfiguration = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
addRelation: (a: string, b: string) => void;
|
|
58
|
+
deleteRelation: (a: string, b: string) => void;
|
|
59
|
+
replaceRelationsSafely: (a: string, bs: string[]) => void;
|
|
60
|
+
replaceRelationsUnsafely: (a: string, bs: string[]) => void;
|
|
61
|
+
getRelatedKeys(key: string): Set<string> | undefined;
|
|
62
|
+
has: (a: string, b?: string) => boolean;
|
|
67
63
|
};
|
|
68
64
|
type ExternalStoreWithContentConfiguration<Content extends Json.Object> = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
};
|
|
73
|
-
type Empty<Obj extends object> = {
|
|
74
|
-
[Key in keyof Obj]?: undefined;
|
|
65
|
+
getContent: (contentKey: string) => Content | undefined;
|
|
66
|
+
setContent: (contentKey: string, content: Content) => void;
|
|
67
|
+
deleteContent: (contentKey: string) => void;
|
|
75
68
|
};
|
|
69
|
+
type Empty<Obj extends object> = { [Key in keyof Obj]?: undefined };
|
|
76
70
|
type ExternalStoreConfiguration<Content extends Json.Object | null> = Content extends Json.Object ? BaseExternalStoreConfiguration & ExternalStoreWithContentConfiguration<Content> : BaseExternalStoreConfiguration & Empty<ExternalStoreWithContentConfiguration<Json.Object>>;
|
|
77
71
|
type JunctionAdvancedConfiguration<AType extends string, BType extends string, Content extends Json.Object | null> = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
warn?: (...args: any[]) => void;
|
|
73
|
+
externalStore?: ExternalStoreConfiguration<Content>;
|
|
74
|
+
isAType?: Refinement<string, AType>;
|
|
75
|
+
isBType?: Refinement<string, BType>;
|
|
76
|
+
isContent?: Refinement<unknown, Content>;
|
|
77
|
+
makeContentKey?: (a: AType, b: BType) => string;
|
|
84
78
|
};
|
|
85
79
|
type JunctionJSON<ASide extends string, AType extends string, BSide extends string, BType extends string, Content extends Json.Object | null> = JunctionEntries<AType, BType, Content> & JunctionSchema<ASide, BSide>;
|
|
86
|
-
declare class Junction<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
getRelatedKey(key: BType): AType | undefined;
|
|
130
|
-
replaceRelations(a: AType, relations: Content extends null ? BType[] : Record<BType, Content>, config?: {
|
|
131
|
-
reckless: boolean;
|
|
132
|
-
}): this;
|
|
133
|
-
replaceRelations(b: BType, relations: Content extends null ? AType[] : Record<AType, Content>, config?: {
|
|
134
|
-
reckless: boolean;
|
|
135
|
-
}): this;
|
|
136
|
-
getContent(a: AType, b: BType): Content | undefined;
|
|
137
|
-
getRelationEntries(input: Record<ASide, AType>): [BType, Content][];
|
|
138
|
-
getRelationEntries(input: Record<BSide, BType>): [AType, Content][];
|
|
139
|
-
has(a: AType, b?: BType): boolean;
|
|
140
|
-
has(b: BType, a?: AType): boolean;
|
|
80
|
+
declare class Junction<ASide extends string, AType extends string, BSide extends string, BType extends string, Content extends Json.Object | null = null> {
|
|
81
|
+
readonly a: ASide;
|
|
82
|
+
readonly b: BSide;
|
|
83
|
+
readonly cardinality: `1:1` | `1:n` | `n:n`;
|
|
84
|
+
readonly relations: Map<AType | BType, Set<AType> | Set<BType>>;
|
|
85
|
+
readonly contents: Map<string, Content>;
|
|
86
|
+
isAType?: Refinement<string, AType> | null;
|
|
87
|
+
isBType?: Refinement<string, BType> | null;
|
|
88
|
+
isContent: Refinement<unknown, Content> | null;
|
|
89
|
+
makeContentKey: (a: AType, b: BType) => string;
|
|
90
|
+
warn?: (...args: any[]) => void;
|
|
91
|
+
getRelatedKeys(key: AType): Set<BType> | undefined;
|
|
92
|
+
getRelatedKeys(key: BType): Set<AType> | undefined;
|
|
93
|
+
getRelatedKeys(key: AType | BType): Set<AType> | Set<BType> | undefined;
|
|
94
|
+
protected addRelation(a: AType, b: BType): void;
|
|
95
|
+
protected deleteRelation(a: AType, b: BType): void;
|
|
96
|
+
protected replaceRelationsUnsafely(a: AType, bs: BType[]): void;
|
|
97
|
+
protected replaceRelationsUnsafely(b: BType, as: AType[]): void;
|
|
98
|
+
protected replaceRelationsSafely(a: AType, bs: BType[]): void;
|
|
99
|
+
protected replaceRelationsSafely(b: BType, as: AType[]): void;
|
|
100
|
+
protected getContentInternal(contentKey: string): Content | undefined;
|
|
101
|
+
protected setContent(contentKey: string, content: Content): void;
|
|
102
|
+
protected deleteContent(contentKey: string): void;
|
|
103
|
+
constructor(data: JunctionSchema<ASide, BSide> & Partial<JunctionEntries<NoInfer<AType>, NoInfer<BType>, Content>>, config?: JunctionAdvancedConfiguration<AType, BType, Content>);
|
|
104
|
+
toJSON(): JunctionJSON<ASide, AType, BSide, BType, Content>;
|
|
105
|
+
set(a: AType, ...rest: Content extends null ? [b: BType] : [b: BType, content: Content]): this;
|
|
106
|
+
set(relation: { [Key in ASide]: AType } & { [Key in BSide]: BType }, ...rest: Content extends null ? [] | [void?: undefined] : [content: Content]): this;
|
|
107
|
+
delete(a: AType, b?: BType): this;
|
|
108
|
+
delete(b: BType, a?: AType): this;
|
|
109
|
+
delete(relation: { [Key in ASide]: AType } | { [Key in BSide]: BType } | ({ [Key in ASide]: AType } & { [Key in BSide]: BType }), b?: undefined): this;
|
|
110
|
+
getRelatedKey(key: AType): BType | undefined;
|
|
111
|
+
getRelatedKey(key: BType): AType | undefined;
|
|
112
|
+
replaceRelations(a: AType, relations: Content extends null ? BType[] : Record<BType, Content>, config?: {
|
|
113
|
+
reckless: boolean;
|
|
114
|
+
}): this;
|
|
115
|
+
replaceRelations(b: BType, relations: Content extends null ? AType[] : Record<AType, Content>, config?: {
|
|
116
|
+
reckless: boolean;
|
|
117
|
+
}): this;
|
|
118
|
+
getContent(a: AType, b: BType): Content | undefined;
|
|
119
|
+
getRelationEntries(input: Record<ASide, AType>): [BType, Content][];
|
|
120
|
+
getRelationEntries(input: Record<BSide, BType>): [AType, Content][];
|
|
121
|
+
has(a: AType, b?: BType): boolean;
|
|
122
|
+
has(b: BType, a?: AType): boolean;
|
|
141
123
|
}
|
|
142
124
|
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/internal/transaction/abort-transaction.d.ts
|
|
143
127
|
declare const abortTransaction: (store: Store) => void;
|
|
144
128
|
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/internal/transaction/act-upon-store.d.ts
|
|
145
131
|
declare function actUponStore<F extends Func>(store: Store, token: TransactionToken<F>, id: string): (...parameters: Parameters<F>) => ReturnType<F>;
|
|
146
132
|
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/internal/transaction/apply-transaction.d.ts
|
|
147
135
|
declare const applyTransaction: <F extends Func>(output: ReturnType<F>, store: Store) => void;
|
|
148
136
|
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/internal/transaction/assign-transaction-to-continuity.d.ts
|
|
149
139
|
declare function assignTransactionToContinuity(store: Store, continuityKey: string, transactionKey: string): void;
|
|
150
140
|
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/internal/transaction/is-root-store.d.ts
|
|
151
143
|
interface RootStore extends Store {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
144
|
+
transactionMeta: TransactionEpoch;
|
|
145
|
+
parent: null;
|
|
146
|
+
child: ChildStore | null;
|
|
155
147
|
}
|
|
156
148
|
interface ChildStore extends Store {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
149
|
+
transactionMeta: TransactionProgress<Func>;
|
|
150
|
+
parent: ChildStore | RootStore;
|
|
151
|
+
child: ChildStore | null;
|
|
160
152
|
}
|
|
161
153
|
declare function isRootStore(store: Store): store is RootStore;
|
|
162
154
|
declare function isChildStore(store: Store): store is ChildStore;
|
|
163
155
|
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/internal/transaction/build-transaction.d.ts
|
|
164
158
|
declare const buildTransaction: (store: Store, key: string, params: any[], id: string) => ChildStore;
|
|
165
159
|
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/internal/subject.d.ts
|
|
166
162
|
declare class Subject<T> {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
Subscriber: (value: T) => void;
|
|
164
|
+
subscribers: Map<string, this[`Subscriber`]>;
|
|
165
|
+
subscribe(key: string, subscriber: this[`Subscriber`]): () => void;
|
|
166
|
+
private unsubscribe;
|
|
167
|
+
next(value: T): void;
|
|
172
168
|
}
|
|
173
169
|
declare class StatefulSubject<T> extends Subject<T> {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
state: T;
|
|
171
|
+
constructor(initialState: T);
|
|
172
|
+
next(value: T): void;
|
|
177
173
|
}
|
|
178
174
|
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/internal/transaction/create-transaction.d.ts
|
|
179
177
|
type Transaction<F extends Func> = {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
178
|
+
key: string;
|
|
179
|
+
type: `transaction`;
|
|
180
|
+
install: (store: Store) => void;
|
|
181
|
+
subject: Subject<TransactionUpdate<F>>;
|
|
182
|
+
run: (parameters: Parameters<F>, id?: string) => ReturnType<F>;
|
|
185
183
|
};
|
|
186
184
|
declare function createTransaction<F extends Func>(store: Store, options: TransactionOptions<F>): TransactionToken<F>;
|
|
187
185
|
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/internal/transaction/get-epoch-number.d.ts
|
|
188
188
|
declare function getContinuityKey(store: RootStore, transactionKey: string): string | undefined;
|
|
189
189
|
declare function getEpochNumberOfContinuity(store: RootStore, continuityKey: string): number | undefined;
|
|
190
190
|
declare function getEpochNumberOfAction(store: Store, transactionKey: string): number | undefined;
|
|
191
191
|
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region src/internal/transaction/set-epoch-number.d.ts
|
|
192
194
|
declare function setEpochNumberOfContinuity(store: Store, continuityKey: string, newEpoch: number): void;
|
|
193
195
|
declare function setEpochNumberOfAction(store: Store, transactionKey: string, newEpoch: number): void;
|
|
194
196
|
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/internal/transaction/index.d.ts
|
|
195
199
|
declare const TRANSACTION_PHASES: readonly ["idle", "building", "applying"];
|
|
196
200
|
type TransactionPhase = (typeof TRANSACTION_PHASES)[number];
|
|
197
201
|
type TransactionProgress<F extends Func> = {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
phase: `applying` | `building`;
|
|
203
|
+
update: TransactionUpdate<F>;
|
|
204
|
+
toolkit: ActorToolkit;
|
|
201
205
|
};
|
|
202
206
|
type TransactionEpoch = {
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
epoch: Map<string, number>;
|
|
208
|
+
actionContinuities: Junction<`continuity`, string, `action`, string>;
|
|
205
209
|
};
|
|
206
210
|
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/internal/store/deposit.d.ts
|
|
207
213
|
declare function deposit<T>(state: RegularAtom<T>): RegularAtomToken<T>;
|
|
208
214
|
declare function deposit<T extends Transceiver<any>>(state: MutableAtom<T, any>): MutableAtomToken<T, any>;
|
|
209
215
|
declare function deposit<T>(state: Atom<T>): AtomToken<T>;
|
|
@@ -224,213 +230,196 @@ declare function deposit<T extends Func>(state: Transaction<T>): TransactionToke
|
|
|
224
230
|
declare function deposit<M extends TimelineManageable>(state: Timeline<M>): TimelineToken<M>;
|
|
225
231
|
declare function deposit(resource: AtomIOInternalResource): AtomIOToken;
|
|
226
232
|
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/internal/join/edit-relations-in-store.d.ts
|
|
227
235
|
declare function editRelationsInStore<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null>(token: JoinToken<ASide, AType, BSide, BType, Cardinality, Content>, change: (relations: Junction<ASide, AType, BSide, BType, Content>) => void, store: Store): void;
|
|
228
236
|
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/internal/join/find-relations-in-store.d.ts
|
|
229
239
|
declare function findRelationsInStore<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null>(token: JoinToken<ASide, AType, BSide, BType, Cardinality, Content>, key: AType | BType, store: Store): JoinStates<ASide, AType, BSide, BType, Cardinality, Content>;
|
|
230
240
|
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region src/internal/join/get-internal-relations-from-store.d.ts
|
|
231
243
|
declare function getInternalRelationsFromStore(token: JoinToken<any, any, any, any, any, any>, store: Store): MutableAtomFamilyToken<SetRTX<string>, SetRTXJson<string>, string>;
|
|
232
244
|
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/internal/molecule.d.ts
|
|
233
247
|
type Molecule<K extends Canonical> = {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
248
|
+
readonly key: K;
|
|
249
|
+
readonly stringKey: stringified<K>;
|
|
250
|
+
readonly dependsOn: `all` | `any`;
|
|
237
251
|
};
|
|
238
252
|
declare function makeRootMoleculeInStore<S extends string>(key: S, store?: Store): S;
|
|
239
253
|
declare function allocateIntoStore<H extends Hierarchy, V extends Vassal<H>, A extends Above<V, H>>(store: Store, provenance: A, key: V, dependsOn?: `all` | `any`): Claim<V>;
|
|
240
|
-
declare function fuseWithinStore<H extends Hierarchy, C extends CompoundFrom<H>, T extends C extends CompoundTypedKey<infer t, any, any> ? t : never, A extends C extends CompoundTypedKey<any, infer a, any> ? a : never, B extends C extends CompoundTypedKey<any, any, infer b> ? b : never>(store: Store, type: T, sideA: SingularTypedKey<A>, sideB: SingularTypedKey<B>): Claim<CompoundTypedKey<T, A, B>>;
|
|
254
|
+
declare function fuseWithinStore<H extends Hierarchy, C extends CompoundFrom<H>, T extends (C extends CompoundTypedKey<infer t, any, any> ? t : never), A extends (C extends CompoundTypedKey<any, infer a, any> ? a : never), B extends (C extends CompoundTypedKey<any, any, infer b> ? b : never)>(store: Store, type: T, sideA: SingularTypedKey<A>, sideB: SingularTypedKey<B>): Claim<CompoundTypedKey<T, A, B>>;
|
|
241
255
|
declare function deallocateFromStore<H extends Hierarchy, V extends Vassal<H>>(store: Store, claim: Claim<V>): void;
|
|
242
256
|
declare function claimWithinStore<H extends Hierarchy, V extends Exclude<Vassal<H>, CompoundTypedKey>, A extends Above<V, H>>(store: Store, newProvenance: A, claim: Claim<V>, exclusive?: `exclusive`): Claim<V>;
|
|
243
257
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
] | null, BType>;
|
|
263
|
-
} & {
|
|
264
|
-
readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[
|
|
265
|
-
BType,
|
|
266
|
-
Content
|
|
267
|
-
][], AType>;
|
|
268
|
-
} : {}) & {
|
|
269
|
-
readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType | null, BType>;
|
|
270
|
-
} & {
|
|
271
|
-
readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType[], AType>;
|
|
272
|
-
} : Cardinality extends `n:n` ? (Content extends Json.Object ? {
|
|
273
|
-
readonly [A in ASide as `${A}EntriesOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[
|
|
274
|
-
AType,
|
|
275
|
-
Content
|
|
276
|
-
][], BType>;
|
|
277
|
-
} & {
|
|
278
|
-
readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[
|
|
279
|
-
BType,
|
|
280
|
-
Content
|
|
281
|
-
][], AType>;
|
|
282
|
-
} : {}) & {
|
|
283
|
-
readonly [A in ASide as `${A}KeysOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType[], BType>;
|
|
284
|
-
} & {
|
|
285
|
-
readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType[], AType>;
|
|
286
|
-
} : never;
|
|
287
|
-
declare class Join<const ASide extends string, const AType extends string, const BSide extends string, const BType extends string, const Cardinality extends `1:1` | `1:n` | `n:n`, const Content extends Json.Object | null = null, const ContentKey extends CompoundTypedKey<`content`, ASide, BSide> = CompoundTypedKey<`content`, ASide, BSide>> {
|
|
288
|
-
private toolkit;
|
|
289
|
-
options: JoinOptions<ASide, AType, BSide, BType, Cardinality, Content>;
|
|
290
|
-
defaultContent: Content | undefined;
|
|
291
|
-
molecules: Map<string, Molecule<any>>;
|
|
292
|
-
relations: Junction<ASide, AType, BSide, BType, Content>;
|
|
293
|
-
states: JoinStateFamilies<ASide, AType, BSide, BType, Cardinality, Content>;
|
|
294
|
-
core: {
|
|
295
|
-
relatedKeysAtoms: MutableAtomFamilyToken<SetRTX<string>, SetRTXJson<string>, string>;
|
|
296
|
-
};
|
|
297
|
-
transact(toolkit: SetterToolkit, run: (join: Join<ASide, AType, BSide, BType, Cardinality, Content>) => void): void;
|
|
298
|
-
store: Store;
|
|
299
|
-
realm: Anarchy;
|
|
300
|
-
[Symbol.dispose](): void;
|
|
301
|
-
constructor(options: JoinOptions<ASide, AType, BSide, BType, Cardinality, Content>, defaultContent: Content | undefined, store?: Store);
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/internal/join/join-internal.d.ts
|
|
260
|
+
type JoinStateFamilies<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null> = Cardinality extends `1:1` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[AType, Content] | null, BType> } & { readonly [B in BSide as `${B}EntryOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[BType, Content] | null, AType> } : {}) & { readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType | null, BType> } & { readonly [B in BSide as `${B}KeyOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType | null, AType> } : Cardinality extends `1:n` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntryOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[AType, Content] | null, BType> } & { readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[BType, Content][], AType> } : {}) & { readonly [A in ASide as `${A}KeyOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType | null, BType> } & { readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType[], AType> } : Cardinality extends `n:n` ? (Content extends Json.Object ? { readonly [A in ASide as `${A}EntriesOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<[AType, Content][], BType> } & { readonly [B in BSide as `${B}EntriesOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<[BType, Content][], AType> } : {}) & { readonly [A in ASide as `${A}KeysOf${Capitalize<BSide>}`]: ReadonlySelectorFamilyToken<AType[], BType> } & { readonly [B in BSide as `${B}KeysOf${Capitalize<ASide>}`]: ReadonlySelectorFamilyToken<BType[], AType> } : never;
|
|
261
|
+
declare class Join<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null = null, ContentKey extends CompoundTypedKey<`content`, ASide, BSide> = CompoundTypedKey<`content`, ASide, BSide>> {
|
|
262
|
+
private toolkit;
|
|
263
|
+
options: JoinOptions<ASide, AType, BSide, BType, Cardinality, Content>;
|
|
264
|
+
defaultContent: Content | undefined;
|
|
265
|
+
molecules: Map<string, Molecule<any>>;
|
|
266
|
+
relations: Junction<ASide, AType, BSide, BType, Content>;
|
|
267
|
+
states: JoinStateFamilies<ASide, AType, BSide, BType, Cardinality, Content>;
|
|
268
|
+
core: {
|
|
269
|
+
relatedKeysAtoms: MutableAtomFamilyToken<SetRTX<string>, SetRTXJson<string>, string>;
|
|
270
|
+
};
|
|
271
|
+
transact(toolkit: SetterToolkit, run: (join: Join<ASide, AType, BSide, BType, Cardinality, Content>) => void): void;
|
|
272
|
+
store: Store;
|
|
273
|
+
realm: Anarchy;
|
|
274
|
+
[Symbol.dispose](): void;
|
|
275
|
+
constructor(options: JoinOptions<ASide, AType, BSide, BType, Cardinality, Content>, defaultContent: Content | undefined, store?: Store);
|
|
302
276
|
}
|
|
303
277
|
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region src/internal/join/get-join.d.ts
|
|
304
280
|
declare function getJoin<ASide extends string, AType extends string, BSide extends string, BType extends string, Cardinality extends `1:1` | `1:n` | `n:n`, Content extends Json.Object | null>(token: JoinToken<ASide, AType, BSide, BType, Cardinality, Content>, store: Store): Join<ASide, AType, BSide, BType, Cardinality, Content>;
|
|
305
281
|
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/internal/lineage.d.ts
|
|
306
284
|
interface Lineage {
|
|
307
|
-
|
|
308
|
-
|
|
285
|
+
parent: typeof this | null;
|
|
286
|
+
child: typeof this | null;
|
|
309
287
|
}
|
|
310
288
|
declare function newest<T extends Lineage>(scion: T): T;
|
|
311
289
|
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/internal/operation.d.ts
|
|
312
292
|
type OperationProgress = {
|
|
313
|
-
|
|
293
|
+
open: false;
|
|
314
294
|
} | {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
295
|
+
open: true;
|
|
296
|
+
done: Set<string>;
|
|
297
|
+
prev: Map<string, any>;
|
|
298
|
+
time: number;
|
|
299
|
+
token: WritableToken<any>;
|
|
320
300
|
};
|
|
321
301
|
declare const openOperation: (store: Store, token: WritableToken<any>) => number | undefined;
|
|
322
302
|
declare const closeOperation: (store: Store) => void;
|
|
323
303
|
declare const isDone: (store: Store, key: string) => boolean;
|
|
324
304
|
declare const markDone: (store: Store, key: string) => void;
|
|
325
305
|
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region src/internal/timeline/create-timeline.d.ts
|
|
326
308
|
type TimelineAtomUpdate<ManagedAtom extends TimelineManageable> = Flat<StateUpdate<TokenType<ManagedAtom>> & {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
309
|
+
key: string;
|
|
310
|
+
type: `atom_update`;
|
|
311
|
+
timestamp: number;
|
|
312
|
+
family?: FamilyMetadata;
|
|
331
313
|
}>;
|
|
332
314
|
type TimelineSelectorUpdate<ManagedAtom extends TimelineManageable> = {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
315
|
+
key: string;
|
|
316
|
+
type: `selector_update`;
|
|
317
|
+
timestamp: number;
|
|
318
|
+
atomUpdates: Omit<TimelineAtomUpdate<ManagedAtom>, `timestamp`>[];
|
|
337
319
|
};
|
|
338
320
|
type TimelineTransactionUpdate = Flat<TransactionUpdate<Func> & {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
321
|
+
key: string;
|
|
322
|
+
type: `transaction_update`;
|
|
323
|
+
timestamp: number;
|
|
342
324
|
}>;
|
|
343
325
|
type TimelineStateCreation<T extends ReadableToken<any>> = Flat<StateCreation<T> & {
|
|
344
|
-
|
|
326
|
+
timestamp: number;
|
|
345
327
|
}>;
|
|
346
328
|
type TimelineStateDisposal<T extends ReadableToken<any>> = Flat<StateDisposal<T> & {
|
|
347
|
-
|
|
329
|
+
timestamp: number;
|
|
348
330
|
}>;
|
|
349
331
|
type TimelineMoleculeCreation = Flat<MoleculeCreation & {
|
|
350
|
-
|
|
332
|
+
timestamp: number;
|
|
351
333
|
}>;
|
|
352
334
|
type TimelineMoleculeDisposal = Flat<MoleculeDisposal & {
|
|
353
|
-
|
|
335
|
+
timestamp: number;
|
|
354
336
|
}>;
|
|
355
337
|
type Timeline<ManagedAtom extends TimelineManageable> = {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
338
|
+
type: `timeline`;
|
|
339
|
+
key: string;
|
|
340
|
+
at: number;
|
|
341
|
+
shouldCapture?: (update: TimelineUpdate<ManagedAtom>, timeline: Timeline<ManagedAtom>) => boolean;
|
|
342
|
+
timeTraveling: `into_future` | `into_past` | null;
|
|
343
|
+
history: TimelineUpdate<ManagedAtom>[];
|
|
344
|
+
selectorTime: number | null;
|
|
345
|
+
transactionKey: string | null;
|
|
346
|
+
install: (store: Store) => void;
|
|
347
|
+
subject: Subject<TimelineUpdate<ManagedAtom> | `redo` | `undo`>;
|
|
348
|
+
subscriptions: Map<string, () => void>;
|
|
367
349
|
};
|
|
368
350
|
declare function createTimeline<ManagedAtom extends TimelineManageable>(store: Store, options: TimelineOptions<ManagedAtom>, data?: Timeline<ManagedAtom>): TimelineToken<ManagedAtom>;
|
|
369
351
|
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/internal/timeline/time-travel.d.ts
|
|
370
354
|
declare const timeTravel: (store: Store, action: `redo` | `undo`, token: TimelineToken<any>) => void;
|
|
371
355
|
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region src/internal/store/store.d.ts
|
|
372
358
|
declare class Store implements Lineage {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
moleculeCreation: Subject<MoleculeCreation>;
|
|
415
|
-
moleculeDisposal: Subject<MoleculeDisposal>;
|
|
416
|
-
};
|
|
417
|
-
operation: OperationProgress;
|
|
418
|
-
config: {
|
|
419
|
-
name: string;
|
|
420
|
-
lifespan: `ephemeral` | `immortal`;
|
|
421
|
-
};
|
|
422
|
-
loggers: AtomIOLogger[];
|
|
423
|
-
logger: Logger;
|
|
424
|
-
constructor(config: Store[`config`], store?: Store | null);
|
|
359
|
+
parent: Store | null;
|
|
360
|
+
child: Store | null;
|
|
361
|
+
valueMap: Map<string, any>;
|
|
362
|
+
defaults: Map<string, any>;
|
|
363
|
+
atoms: Map<string, Atom<any>>;
|
|
364
|
+
selectors: Map<string, WritableSelector<any>>;
|
|
365
|
+
readonlySelectors: Map<string, ReadonlySelector<any>>;
|
|
366
|
+
atomsThatAreDefault: Set<string>;
|
|
367
|
+
selectorAtoms: Junction<`selectorKey`, string, `atomKey`, string>;
|
|
368
|
+
selectorGraph: Junction<`upstreamSelectorKey`, string, `downstreamSelectorKey`, string, {
|
|
369
|
+
source: string;
|
|
370
|
+
}>;
|
|
371
|
+
trackers: Map<string, Tracker<Transceiver<any>>>;
|
|
372
|
+
families: Map<string, MutableAtomFamily<any, any, any> | ReadonlySelectorFamily<any, any> | RegularAtomFamily<any, any> | WritableSelectorFamily<any, any>>;
|
|
373
|
+
joins: Map<string, Join<any, any, any, any, any, any>>;
|
|
374
|
+
transactions: Map<string, Transaction<Func>>;
|
|
375
|
+
transactionMeta: TransactionEpoch | TransactionProgress<Func>;
|
|
376
|
+
timelines: Map<string, Timeline<any>>;
|
|
377
|
+
timelineTopics: Junction<`timelineKey`, string, `topicKey`, string, {
|
|
378
|
+
topicType: `atom_family` | `atom` | `molecule_family` | `molecule`;
|
|
379
|
+
}>;
|
|
380
|
+
disposalTraces: CircularBuffer<{
|
|
381
|
+
key: string;
|
|
382
|
+
trace: string;
|
|
383
|
+
}>;
|
|
384
|
+
molecules: Map<string, Molecule<Canonical>>;
|
|
385
|
+
moleculeJoins: Junction<`moleculeKey`, stringified<Canonical>, `joinKey`, string>;
|
|
386
|
+
moleculeGraph: Junction<`upstreamMoleculeKey`, stringified<Canonical> | `root`, `downstreamMoleculeKey`, stringified<Canonical>, {
|
|
387
|
+
source: stringified<Canonical>;
|
|
388
|
+
}>;
|
|
389
|
+
moleculeData: Junction<`moleculeKey`, stringified<Canonical>, `stateFamilyKey`, string>;
|
|
390
|
+
miscResources: Map<string, Disposable>;
|
|
391
|
+
on: StoreEventCarrier;
|
|
392
|
+
operation: OperationProgress;
|
|
393
|
+
config: {
|
|
394
|
+
name: string;
|
|
395
|
+
lifespan: `ephemeral` | `immortal`;
|
|
396
|
+
};
|
|
397
|
+
loggers: AtomIOLogger[];
|
|
398
|
+
logger: Logger;
|
|
399
|
+
constructor(config: Store[`config`], store?: Store | null);
|
|
425
400
|
}
|
|
401
|
+
type StoreEventCarrier = {
|
|
402
|
+
atomCreation: Subject<AtomToken<unknown>>;
|
|
403
|
+
atomDisposal: Subject<AtomToken<unknown>>;
|
|
404
|
+
selectorCreation: Subject<ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>>;
|
|
405
|
+
selectorDisposal: Subject<ReadonlySelectorToken<unknown> | WritableSelectorToken<unknown>>;
|
|
406
|
+
timelineCreation: Subject<TimelineToken<unknown>>;
|
|
407
|
+
transactionCreation: Subject<TransactionToken<Func>>;
|
|
408
|
+
transactionApplying: StatefulSubject<TransactionProgress<Func> | null>;
|
|
409
|
+
operationClose: Subject<OperationProgress>;
|
|
410
|
+
moleculeCreation: Subject<MoleculeCreation>;
|
|
411
|
+
moleculeDisposal: Subject<MoleculeDisposal>;
|
|
412
|
+
};
|
|
426
413
|
declare global {
|
|
427
|
-
|
|
414
|
+
var ATOM_IO_IMPLICIT_STORE: Store | undefined;
|
|
428
415
|
}
|
|
429
416
|
declare const IMPLICIT: {
|
|
430
|
-
|
|
417
|
+
STORE: () => Store;
|
|
431
418
|
};
|
|
432
419
|
declare const clearStore: (store: Store) => void;
|
|
433
420
|
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region src/internal/store/withdraw.d.ts
|
|
434
423
|
declare function withdraw<T>(store: Store, token: RegularAtomToken<T>): RegularAtom<T>;
|
|
435
424
|
declare function withdraw<T extends Transceiver<any>>(store: Store, token: MutableAtomToken<T, any>): MutableAtom<T, any>;
|
|
436
425
|
declare function withdraw<T>(store: Store, token: AtomToken<T>): Atom<T>;
|
|
@@ -453,108 +442,156 @@ declare function withdraw<T>(store: Store, token: WritableToken<T>): WritableSta
|
|
|
453
442
|
declare function withdraw<T>(store: Store, token: ReadableToken<T>): ReadableState<T>;
|
|
454
443
|
declare function withdraw(store: Store, token: AtomIOToken): AtomIOInternalResource;
|
|
455
444
|
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/internal/mutable/transceiver.d.ts
|
|
456
447
|
interface Transceiver<S extends Json.Serializable> {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
448
|
+
do: (update: S) => number | `OUT_OF_RANGE` | null;
|
|
449
|
+
undo: (update: S) => void;
|
|
450
|
+
subscribe: (key: string, fn: (update: S) => void) => () => void;
|
|
451
|
+
cacheUpdateNumber: number;
|
|
452
|
+
getUpdateNumber: (update: S) => number;
|
|
462
453
|
}
|
|
463
454
|
declare function isTransceiver(value: unknown): value is Transceiver<Json.Serializable>;
|
|
464
455
|
type TransceiverMode = `playback` | `record` | `transaction`;
|
|
465
|
-
type Signal<TVR extends Transceiver<any>> = TVR extends Transceiver<infer S> ? S : never;
|
|
456
|
+
type Signal$1<TVR extends Transceiver<any>> = TVR extends Transceiver<infer S> ? S : never;
|
|
466
457
|
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region src/internal/mutable/create-mutable-atom.d.ts
|
|
467
460
|
declare function createMutableAtom<T extends Transceiver<any>, J extends Json.Serializable>(store: Store, options: MutableAtomOptions<T, J>, family: FamilyMetadata | undefined): MutableAtomToken<T, J>;
|
|
468
461
|
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region src/internal/mutable/create-mutable-atom-family.d.ts
|
|
469
464
|
declare function createMutableAtomFamily<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical>(store: Store, options: MutableAtomFamilyOptions<T, J, K>, internalRoles?: string[]): MutableAtomFamilyToken<T, J, K>;
|
|
470
465
|
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region src/internal/mutable/get-json-family.d.ts
|
|
471
468
|
declare const getJsonFamily: <Core extends Transceiver<Json.Serializable>, SerializableCore extends Json.Serializable, Key extends Canonical>(mutableAtomFamily: MutableAtomFamilyToken<Core, SerializableCore, Key>, store: Store) => WritableSelectorFamily<SerializableCore, Key>;
|
|
472
469
|
|
|
470
|
+
//#endregion
|
|
471
|
+
//#region src/internal/mutable/get-json-token.d.ts
|
|
473
472
|
declare const getJsonToken: <Core extends Transceiver<any>, SerializableCore extends Json.Serializable>(store: Store, mutableAtomToken: MutableAtomToken<Core, SerializableCore>) => WritableSelectorToken<SerializableCore>;
|
|
474
473
|
|
|
475
|
-
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/internal/mutable/get-update-family.d.ts
|
|
476
|
+
declare const getUpdateFamily: <Core extends Transceiver<Json.Serializable>, SerializableCore extends Json.Serializable, Key extends string>(mutableAtomFamily: MutableAtomFamilyToken<Core, SerializableCore, Key>, store: Store) => AtomFamily<Signal$1<Core>, Key>;
|
|
476
477
|
|
|
477
|
-
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/internal/mutable/get-update-token.d.ts
|
|
480
|
+
declare const getUpdateToken: <Core extends Transceiver<any>, SerializableCore extends Json.Serializable>(mutableAtomToken: MutableAtomToken<Core, SerializableCore>) => RegularAtomToken<Signal$1<Core>>;
|
|
478
481
|
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/internal/mutable/tracker.d.ts
|
|
479
484
|
/**
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
485
|
+
* @internal Give the tracker a transceiver state and a store, and it will
|
|
486
|
+
* subscribe to the transceiver's inner value. When the inner value changes,
|
|
487
|
+
* the tracker will update its own state to reflect the change.
|
|
488
|
+
*/
|
|
484
489
|
declare class Tracker<Mutable extends Transceiver<any>> {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
constructor(mutableState: MutableAtomToken<Mutable, Json.Serializable>, store: Store);
|
|
490
|
+
private initializeState;
|
|
491
|
+
private unsubscribeFromInnerValue;
|
|
492
|
+
private unsubscribeFromState;
|
|
493
|
+
private observeCore;
|
|
494
|
+
private updateCore;
|
|
495
|
+
mutableState: MutableAtomToken<Mutable, Json.Serializable>;
|
|
496
|
+
latestUpdateState: RegularAtomToken<(Mutable extends Transceiver<infer Signal> ? Signal : never) | null>;
|
|
497
|
+
[Symbol.dispose]: () => void;
|
|
498
|
+
constructor(mutableState: MutableAtomToken<Mutable, Json.Serializable>, store: Store);
|
|
495
499
|
}
|
|
496
500
|
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/internal/mutable/tracker-family.d.ts
|
|
497
503
|
declare class FamilyTracker<Core extends Transceiver<any>, FamilyMemberKey extends Canonical> {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
constructor(mutableAtoms: MutableAtomFamily<Core, any, FamilyMemberKey>, store: Store);
|
|
504
|
+
private trackers;
|
|
505
|
+
readonly latestUpdateAtoms: RegularAtomFamily<(Core extends Transceiver<infer Signal> ? Signal : never) | null, FamilyMemberKey>;
|
|
506
|
+
readonly mutableAtoms: MutableAtomFamily<Core, any, FamilyMemberKey>;
|
|
507
|
+
constructor(mutableAtoms: MutableAtomFamily<Core, any, FamilyMemberKey>, store: Store);
|
|
503
508
|
}
|
|
504
509
|
|
|
510
|
+
//#endregion
|
|
511
|
+
//#region src/internal/arbitrary.d.ts
|
|
505
512
|
declare function arbitrary(random?: () => number): string;
|
|
506
513
|
|
|
514
|
+
//#endregion
|
|
515
|
+
//#region src/internal/atom/create-regular-atom.d.ts
|
|
507
516
|
declare function createRegularAtom<T>(store: Store, options: RegularAtomOptions<T>, family: FamilyMetadata | undefined): RegularAtomToken<T>;
|
|
508
517
|
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region src/internal/atom/create-standalone-atom.d.ts
|
|
509
520
|
declare function createStandaloneAtom<T>(store: Store, options: RegularAtomOptions<T>): RegularAtomToken<T>;
|
|
510
521
|
declare function createStandaloneAtom<T extends Transceiver<any>, J extends Json.Serializable>(store: Store, options: MutableAtomOptions<T, J>): MutableAtomToken<T, J>;
|
|
511
522
|
|
|
523
|
+
//#endregion
|
|
524
|
+
//#region src/internal/atom/dispose-atom.d.ts
|
|
512
525
|
declare function disposeAtom(store: Store, atomToken: AtomToken<unknown>): void;
|
|
513
526
|
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/internal/atom/is-default.d.ts
|
|
514
529
|
declare const isAtomDefault: (store: Store, key: string) => boolean;
|
|
515
530
|
declare const markAtomAsDefault: (store: Store, key: string) => void;
|
|
516
531
|
declare const markAtomAsNotDefault: (store: Store, key: string) => void;
|
|
517
532
|
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region src/internal/future.d.ts
|
|
518
535
|
/**
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
536
|
+
* A Promise whose incoming value can be hot swapped.
|
|
537
|
+
* @internal
|
|
538
|
+
* @private
|
|
539
|
+
* @typeParam T The type of the value that the promise will resolve to.
|
|
540
|
+
*
|
|
541
|
+
* @remarks
|
|
542
|
+
* Can be constructed like a Promise, or from an existing Promise.
|
|
543
|
+
*/
|
|
527
544
|
declare class Future<T> extends Promise<T> {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
545
|
+
private fate;
|
|
546
|
+
private resolve;
|
|
547
|
+
private reject;
|
|
548
|
+
done: boolean;
|
|
549
|
+
constructor(executor: Promise<T> | ((resolve: (value: T) => void, reject: (reason?: any) => void) => void));
|
|
550
|
+
private pass;
|
|
551
|
+
private fail;
|
|
552
|
+
use(value: Promise<T> | T): void;
|
|
536
553
|
}
|
|
537
554
|
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region src/internal/caching.d.ts
|
|
538
557
|
declare function cacheValue<T>(store: Store, key: string, value: T, subject: Subject<StateUpdate<unknown>>): T;
|
|
539
558
|
declare function cacheValue<T extends Promise<any>>(store: Store, key: string, value: T, subject: Subject<StateUpdate<unknown>>): Future<T>;
|
|
540
559
|
declare const readCachedValue: <T>(token: ReadableState<any>, target: Store) => T;
|
|
541
560
|
declare const evictCachedValue: (key: string, target: Store) => void;
|
|
542
561
|
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region src/internal/capitalize.d.ts
|
|
543
564
|
declare function capitalize<S extends string>(string: S): Capitalize<S>;
|
|
544
565
|
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/internal/families/create-atom-family.d.ts
|
|
545
568
|
declare function createAtomFamily<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical>(store: Store, options: MutableAtomFamilyOptions<T, J, K>): MutableAtomFamilyToken<T, J, K>;
|
|
546
569
|
declare function createAtomFamily<T, K extends Canonical>(store: Store, options: RegularAtomFamilyOptions<T, K>): RegularAtomFamilyToken<T, K>;
|
|
547
570
|
|
|
571
|
+
//#endregion
|
|
572
|
+
//#region src/internal/families/create-readonly-selector-family.d.ts
|
|
548
573
|
declare function createReadonlySelectorFamily<T, K extends Canonical>(store: Store, options: ReadonlySelectorFamilyOptions<T, K>, internalRoles?: string[]): ReadonlySelectorFamilyToken<T, K>;
|
|
549
574
|
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region src/internal/families/create-regular-atom-family.d.ts
|
|
550
577
|
declare function createRegularAtomFamily<T, K extends Canonical>(store: Store, options: RegularAtomFamilyOptions<T, K>, internalRoles?: string[]): RegularAtomFamilyToken<T, K>;
|
|
551
578
|
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/internal/families/create-selector-family.d.ts
|
|
552
581
|
declare function createSelectorFamily<T, K extends Canonical>(store: Store, options: WritableSelectorFamilyOptions<T, K>): WritableSelectorFamilyToken<T, K>;
|
|
553
582
|
declare function createSelectorFamily<T, K extends Canonical>(store: Store, options: ReadonlySelectorFamilyOptions<T, K>): ReadonlySelectorFamilyToken<T, K>;
|
|
554
583
|
|
|
584
|
+
//#endregion
|
|
585
|
+
//#region src/internal/families/create-writable-selector-family.d.ts
|
|
586
|
+
declare function createWritableSelectorFamily<T, K extends Canonical>(store: Store, options: WritableSelectorFamilyOptions<T, K>, internalRoles?: string[]): WritableSelectorFamilyToken<T, K>;
|
|
587
|
+
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region src/internal/families/dispose-from-store.d.ts
|
|
555
590
|
declare function disposeFromStore(store: Store, token: ReadableToken<any>): void;
|
|
556
591
|
declare function disposeFromStore<K extends Canonical>(store: Store, token: ReadableFamilyToken<any, K>, key: K): void;
|
|
557
592
|
|
|
593
|
+
//#endregion
|
|
594
|
+
//#region src/internal/families/find-in-store.d.ts
|
|
558
595
|
declare function findInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(store: Store, token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J, K>;
|
|
559
596
|
declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T, K>;
|
|
560
597
|
declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: AtomFamilyToken<T, K>, key: Key): AtomToken<T, K>;
|
|
@@ -564,6 +601,8 @@ declare function findInStore<T, K extends Canonical, Key extends K>(store: Store
|
|
|
564
601
|
declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableFamilyToken<T, K>, key: Key): WritableToken<T, K>;
|
|
565
602
|
declare function findInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T, K>;
|
|
566
603
|
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region src/internal/families/init-family-member.d.ts
|
|
567
606
|
declare function initFamilyMemberInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(store: Store, token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J, K>;
|
|
568
607
|
declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T, K>;
|
|
569
608
|
declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: AtomFamilyToken<T, K>, key: Key): AtomToken<T, K>;
|
|
@@ -573,6 +612,8 @@ declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(
|
|
|
573
612
|
declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableFamilyToken<T, K>, key: Key): WritableToken<T, K>;
|
|
574
613
|
declare function initFamilyMemberInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T, K>;
|
|
575
614
|
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/internal/families/seek-in-store.d.ts
|
|
576
617
|
declare function seekInStore<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical, Key extends K>(store: Store, token: MutableAtomFamilyToken<T, J, K>, key: Key): MutableAtomToken<T, J, K> | undefined;
|
|
577
618
|
declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: RegularAtomFamilyToken<T, K>, key: Key): RegularAtomToken<T, K> | undefined;
|
|
578
619
|
declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: AtomFamilyToken<T, K>, key: Key): AtomToken<T, K> | undefined;
|
|
@@ -582,41 +623,71 @@ declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store
|
|
|
582
623
|
declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: WritableFamilyToken<T, K>, key: Key): WritableToken<T, K> | undefined;
|
|
583
624
|
declare function seekInStore<T, K extends Canonical, Key extends K>(store: Store, token: ReadableFamilyToken<T, K>, key: Key): ReadableToken<T, K> | undefined;
|
|
584
625
|
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region src/internal/get-environment-data.d.ts
|
|
585
628
|
type EnvironmentData = {
|
|
586
|
-
|
|
629
|
+
store: Store;
|
|
587
630
|
};
|
|
588
631
|
declare function getEnvironmentData(store: Store): EnvironmentData;
|
|
589
632
|
|
|
633
|
+
//#endregion
|
|
634
|
+
//#region src/internal/get-state/get-from-store.d.ts
|
|
590
635
|
declare function getFromStore<T>(store: Store, token: ReadableToken<T>): T;
|
|
591
636
|
declare function getFromStore<T, K extends Canonical>(store: Store, token: ReadableFamilyToken<T, K>, key: K): T;
|
|
592
637
|
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region src/internal/get-state/read-or-compute-value.d.ts
|
|
593
640
|
declare const readOrComputeValue: <T>(target: Store, state: ReadableState<T>) => T;
|
|
594
641
|
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region src/internal/get-trace.d.ts
|
|
595
644
|
declare function getTrace(error: Error): string;
|
|
596
645
|
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region src/internal/ingest-updates/ingest-atom-update.d.ts
|
|
597
648
|
declare function ingestAtomUpdate(applying: `newValue` | `oldValue`, atomUpdate: KeyedStateUpdate<any>, store: Store): void;
|
|
598
649
|
|
|
650
|
+
//#endregion
|
|
651
|
+
//#region src/internal/ingest-updates/ingest-creation-disposal.d.ts
|
|
599
652
|
declare function ingestCreationEvent(update: StateCreation<any>, applying: `newValue` | `oldValue`, store: Store): void;
|
|
600
653
|
declare function ingestDisposalEvent(update: StateDisposal<ReadableToken<any>>, applying: `newValue` | `oldValue`, store: Store): void;
|
|
601
654
|
declare function ingestMoleculeCreationEvent(update: MoleculeCreation, applying: `newValue` | `oldValue`, store: Store): void;
|
|
602
655
|
declare function ingestMoleculeDisposalEvent(update: MoleculeDisposal, applying: `newValue` | `oldValue`, store: Store): void;
|
|
603
656
|
declare function ingestMoleculeTransferEvent(update: MoleculeTransfer, applying: `newValue` | `oldValue`, store: Store): void;
|
|
604
657
|
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region src/internal/ingest-updates/ingest-selector-update.d.ts
|
|
605
660
|
declare function ingestSelectorUpdate(applying: `newValue` | `oldValue`, selectorUpdate: TimelineSelectorUpdate<any>, store: Store): void;
|
|
606
661
|
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region src/internal/ingest-updates/ingest-transaction-update.d.ts
|
|
607
664
|
declare function ingestTransactionUpdate(applying: `newValue` | `oldValue`, transactionUpdate: TransactionUpdate<any>, store: Store): void;
|
|
608
665
|
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region src/internal/install-into-store.d.ts
|
|
668
|
+
/**
|
|
669
|
+
* @public
|
|
670
|
+
* Install the given tokens into the target store
|
|
671
|
+
* @param tokens - States, families, transactions, and timelines to install into the target store
|
|
672
|
+
* @param target - The store to install the tokens into
|
|
673
|
+
* @param source - The store to install the tokens from
|
|
674
|
+
*
|
|
675
|
+
*/
|
|
676
|
+
declare function installIntoStore(tokens: AtomIOToken[], target: Store, source: Store): void;
|
|
677
|
+
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region src/internal/keys.d.ts
|
|
609
680
|
type AtomKey<T> = string & {
|
|
610
|
-
|
|
611
|
-
|
|
681
|
+
__atomKey?: never;
|
|
682
|
+
__brand?: T;
|
|
612
683
|
};
|
|
613
684
|
type SelectorKey<T> = string & {
|
|
614
|
-
|
|
615
|
-
|
|
685
|
+
__selectorKey?: never;
|
|
686
|
+
__brand?: T;
|
|
616
687
|
};
|
|
617
688
|
type ReadonlySelectorKey<T> = string & {
|
|
618
|
-
|
|
619
|
-
|
|
689
|
+
__readonlySelectorKey?: never;
|
|
690
|
+
__brand?: T;
|
|
620
691
|
};
|
|
621
692
|
declare const isAtomKey: (store: Store, key: string) => key is AtomKey<unknown>;
|
|
622
693
|
declare const isSelectorKey: (store: Store, key: string) => key is SelectorKey<unknown>;
|
|
@@ -624,127 +695,173 @@ declare const isReadonlySelectorKey: (store: Store, key: string) => key is Reado
|
|
|
624
695
|
type StateKey<T> = AtomKey<T> | ReadonlySelectorKey<T> | SelectorKey<T>;
|
|
625
696
|
declare const isStateKey: (store: Store, key: string) => key is StateKey<unknown>;
|
|
626
697
|
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region src/internal/lazy-map.d.ts
|
|
627
700
|
declare class LazyMap<K, V> extends Map<K, V> {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
701
|
+
deleted: Set<K>;
|
|
702
|
+
protected readonly source: Map<K, V>;
|
|
703
|
+
constructor(source: Map<K, V>);
|
|
704
|
+
get(key: K): V | undefined;
|
|
705
|
+
set(key: K, value: V): this;
|
|
706
|
+
hasOwn(key: K): boolean;
|
|
707
|
+
has(key: K): boolean;
|
|
708
|
+
delete(key: K): boolean;
|
|
636
709
|
}
|
|
637
710
|
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region src/internal/not-found-error.d.ts
|
|
638
713
|
declare class NotFoundError extends Error {
|
|
639
|
-
|
|
714
|
+
constructor(token: AtomIOToken, store: Store);
|
|
640
715
|
}
|
|
641
716
|
|
|
717
|
+
//#endregion
|
|
718
|
+
//#region src/internal/pretty-print.d.ts
|
|
642
719
|
declare function prettyPrintTokenType(token: AtomIOToken): string;
|
|
643
720
|
|
|
721
|
+
//#endregion
|
|
722
|
+
//#region src/internal/reserved-keys.d.ts
|
|
644
723
|
type ReservedIntrospectionKey = `🔍 ${string}`;
|
|
645
724
|
declare function isReservedIntrospectionKey(value: string): value is ReservedIntrospectionKey;
|
|
646
725
|
|
|
726
|
+
//#endregion
|
|
727
|
+
//#region src/internal/selector/create-readonly-selector.d.ts
|
|
647
728
|
declare const createReadonlySelector: <T>(store: Store, options: ReadonlySelectorOptions<T>, family: FamilyMetadata | undefined) => ReadonlySelectorToken<T>;
|
|
648
729
|
|
|
730
|
+
//#endregion
|
|
731
|
+
//#region src/internal/selector/create-standalone-selector.d.ts
|
|
649
732
|
declare function createStandaloneSelector<T>(store: Store, options: WritableSelectorOptions<T>): WritableSelectorToken<T>;
|
|
650
733
|
declare function createStandaloneSelector<T>(store: Store, options: ReadonlySelectorOptions<T>): ReadonlySelectorToken<T>;
|
|
651
734
|
|
|
735
|
+
//#endregion
|
|
736
|
+
//#region src/internal/selector/create-writable-selector.d.ts
|
|
652
737
|
declare const createWritableSelector: <T>(store: Store, options: WritableSelectorOptions<T>, family: FamilyMetadata | undefined) => WritableSelectorToken<T>;
|
|
653
738
|
|
|
739
|
+
//#endregion
|
|
740
|
+
//#region src/internal/selector/dispose-selector.d.ts
|
|
654
741
|
declare function disposeSelector(store: Store, selectorToken: SelectorToken<unknown>): void;
|
|
655
742
|
|
|
743
|
+
//#endregion
|
|
744
|
+
//#region src/internal/selector/get-selector-dependency-keys.d.ts
|
|
656
745
|
declare const getSelectorDependencyKeys: (key: string, store: Store) => (AtomKey<unknown> | ReadonlySelectorKey<unknown> | SelectorKey<unknown>)[];
|
|
657
746
|
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region src/internal/selector/register-selector.d.ts
|
|
658
749
|
declare const registerSelector: (selectorKey: string, covered: Set<string>, store: Store) => SetterToolkit;
|
|
659
750
|
|
|
751
|
+
//#endregion
|
|
752
|
+
//#region src/internal/selector/trace-selector-atoms.d.ts
|
|
660
753
|
declare const traceSelectorAtoms: (directDependencyKey: StateKey<unknown>, covered: Set<string>, store: Store) => AtomKey<unknown>[];
|
|
661
754
|
declare const traceAllSelectorAtoms: (selector: Selector<any>, store: Store) => AtomKey<unknown>[];
|
|
662
755
|
|
|
756
|
+
//#endregion
|
|
757
|
+
//#region src/internal/selector/update-selector-atoms.d.ts
|
|
663
758
|
declare const updateSelectorAtoms: (selectorKey: string, dependency: ReadonlySelectorToken<unknown> | WritableToken<unknown>, covered: Set<string>, store: Store) => void;
|
|
664
759
|
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/internal/set-state/become.d.ts
|
|
665
762
|
type Modify<T> = (thing: T) => T;
|
|
666
763
|
declare const become: <T>(nextVersionOfThing: Modify<T> | T) => (originalThing: T) => T;
|
|
667
764
|
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region src/internal/set-state/set-atom-or-selector.d.ts
|
|
668
767
|
declare const setAtomOrSelector: <T>(store: Store, state: WritableState<T>, value: T | ((oldValue: T) => T)) => void;
|
|
669
768
|
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region src/internal/set-state/set-into-store.d.ts
|
|
670
771
|
declare function setIntoStore<T, New extends T>(store: Store, token: WritableToken<T>, value: New | ((oldValue: T) => New)): void;
|
|
671
772
|
declare function setIntoStore<T, K extends Canonical, New extends T>(store: Store, token: WritableFamilyToken<T, K>, key: K, value: New | ((oldValue: T) => New)): void;
|
|
672
773
|
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region src/internal/subscribe/recall-state.d.ts
|
|
673
776
|
declare const recallState: <T>(store: Store, state: ReadableState<T>) => T;
|
|
674
777
|
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/internal/subscribe/subscribe-in-store.d.ts
|
|
675
780
|
declare function subscribeInStore<T>(store: Store$1, token: ReadableToken<T>, handleUpdate: UpdateHandler<T>, key?: string): () => void;
|
|
676
781
|
declare function subscribeInStore<F extends Func$1>(store: Store$1, token: TransactionToken<F>, handleUpdate: TransactionUpdateHandler<F>, key?: string): () => void;
|
|
677
782
|
declare function subscribeInStore<M extends TimelineManageable>(store: Store$1, token: TimelineToken<M>, handleUpdate: (update: TimelineUpdate<M> | `redo` | `undo`) => void, key?: string): () => void;
|
|
678
783
|
declare function subscribeInStore<M extends TimelineManageable>(store: Store$1, token: ReadableToken<any> | TimelineToken<M> | TransactionToken<any>, handleUpdate: TransactionUpdateHandler<any> | UpdateHandler<any> | ((update: TimelineUpdate<M> | `redo` | `undo`) => void), key?: string): () => void;
|
|
679
784
|
|
|
785
|
+
//#endregion
|
|
786
|
+
//#region src/internal/subscribe/subscribe-to-root-atoms.d.ts
|
|
680
787
|
declare const subscribeToRootAtoms: <T>(store: Store, selector: Selector<T>) => (() => void)[];
|
|
681
788
|
|
|
789
|
+
//#endregion
|
|
790
|
+
//#region src/internal/subscribe/subscribe-to-state.d.ts
|
|
682
791
|
declare function subscribeToState<T>(store: Store, token: ReadableToken<T>, key: string, handleUpdate: UpdateHandler<T>): () => void;
|
|
683
792
|
|
|
793
|
+
//#endregion
|
|
794
|
+
//#region src/internal/subscribe/subscribe-to-timeline.d.ts
|
|
684
795
|
declare const subscribeToTimeline: <ManagedAtom extends TimelineManageable>(store: Store, token: TimelineToken<ManagedAtom>, key: string, handleUpdate: (update: TimelineUpdate<any> | `redo` | `undo`) => void) => (() => void);
|
|
685
796
|
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region src/internal/subscribe/subscribe-to-transaction.d.ts
|
|
686
799
|
declare const subscribeToTransaction: <F extends Func>(store: Store, token: TransactionToken<F>, key: string, handleUpdate: TransactionUpdateHandler<F>) => (() => void);
|
|
687
800
|
|
|
801
|
+
//#endregion
|
|
802
|
+
//#region src/internal/index.d.ts
|
|
688
803
|
type AtomIOState = {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
804
|
+
key: string;
|
|
805
|
+
family?: FamilyMetadata;
|
|
806
|
+
install: (store: Store) => void;
|
|
807
|
+
subject: Subject<{
|
|
808
|
+
newValue: any;
|
|
809
|
+
oldValue: any;
|
|
810
|
+
}>;
|
|
696
811
|
};
|
|
697
812
|
type RegularAtom<T> = AtomIOState & {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
813
|
+
type: `atom`;
|
|
814
|
+
default: T | (() => T);
|
|
815
|
+
cleanup?: () => void;
|
|
701
816
|
};
|
|
702
817
|
type MutableAtom<T extends Transceiver<any>, J extends Json.Serializable> = AtomIOState & JsonInterface<T, J> & {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
818
|
+
type: `mutable_atom`;
|
|
819
|
+
default: () => T;
|
|
820
|
+
cleanup?: () => void;
|
|
706
821
|
};
|
|
707
822
|
type Atom<T> = RegularAtom<T> | (T extends Transceiver<any> ? MutableAtom<T, any> : never);
|
|
708
823
|
type WritableSelector<T> = AtomIOState & {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
824
|
+
type: `selector`;
|
|
825
|
+
get: () => T;
|
|
826
|
+
set: (newValue: T | ((oldValue: T) => T)) => void;
|
|
712
827
|
};
|
|
713
828
|
type ReadonlySelector<T> = AtomIOState & {
|
|
714
|
-
|
|
715
|
-
|
|
829
|
+
type: `readonly_selector`;
|
|
830
|
+
get: () => T;
|
|
716
831
|
};
|
|
717
832
|
type Selector<T> = ReadonlySelector<T> | WritableSelector<T>;
|
|
718
833
|
type WritableState<T> = Atom<T> | WritableSelector<T>;
|
|
719
834
|
type ReadableState<T> = Atom<T> | Selector<T>;
|
|
720
835
|
type RegularAtomFamily<T, K extends Canonical> = RegularAtomFamilyToken<T, K> & {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
836
|
+
(key: K): RegularAtomToken<T>;
|
|
837
|
+
subject: Subject<StateCreation<AtomToken<T>> | StateDisposal<AtomToken<T>>>;
|
|
838
|
+
install: (store: Store) => void;
|
|
839
|
+
internalRoles: string[] | undefined;
|
|
725
840
|
};
|
|
726
841
|
type MutableAtomFamily<T extends Transceiver<any>, J extends Json.Serializable, K extends Canonical> = JsonInterface<T, J> & MutableAtomFamilyToken<T, J, K> & {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
842
|
+
(key: K): MutableAtomToken<T, J>;
|
|
843
|
+
subject: Subject<StateCreation<MutableAtomToken<T, J>> | StateDisposal<MutableAtomToken<T, J>>>;
|
|
844
|
+
install: (store: Store) => void;
|
|
845
|
+
internalRoles: string[] | undefined;
|
|
731
846
|
};
|
|
732
847
|
type AtomFamily<T, K extends Canonical = Canonical> = MutableAtomFamily<T extends Transceiver<any> ? T : never, any, K> | RegularAtomFamily<T, K>;
|
|
733
848
|
type WritableSelectorFamily<T, K extends Canonical> = WritableSelectorFamilyToken<T, K> & ((key: K) => WritableSelectorToken<T>) & {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
849
|
+
default: (key: K) => T;
|
|
850
|
+
subject: Subject<StateCreation<WritableSelectorToken<T>> | StateDisposal<WritableSelectorToken<T>>>;
|
|
851
|
+
install: (store: Store) => void;
|
|
852
|
+
internalRoles: string[] | undefined;
|
|
738
853
|
};
|
|
739
854
|
type ReadonlySelectorFamily<T, K extends Canonical> = ReadonlySelectorFamilyToken<T, K> & ((key: K) => ReadonlySelectorToken<T>) & {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
855
|
+
default: (key: K) => T;
|
|
856
|
+
subject: Subject<StateCreation<ReadonlySelectorToken<T>> | StateDisposal<ReadonlySelectorToken<T>>>;
|
|
857
|
+
install: (store: Store) => void;
|
|
858
|
+
internalRoles: string[] | undefined;
|
|
744
859
|
};
|
|
745
860
|
type SelectorFamily<T, K extends Canonical> = ReadonlySelectorFamily<T, K> | WritableSelectorFamily<T, K>;
|
|
746
861
|
type WritableFamily<T, K extends Canonical> = AtomFamily<T, K> | WritableSelectorFamily<T, K>;
|
|
747
862
|
type ReadableFamily<T, K extends Canonical> = AtomFamily<T, K> | SelectorFamily<T, K>;
|
|
748
863
|
type AtomIOInternalResource = ReadableFamily<any, any> | ReadableState<any> | Timeline<any> | Transaction<any>;
|
|
749
864
|
|
|
750
|
-
|
|
865
|
+
//#endregion
|
|
866
|
+
export { Atom, AtomFamily, AtomIOInternalResource, AtomIOState, AtomKey, BaseExternalStoreConfiguration, ChildStore, CircularBuffer, Count, Each, Empty, EnvironmentData, ExternalStoreConfiguration, ExternalStoreWithContentConfiguration, FAMILY_MEMBER_TOKEN_TYPES, FamilyTracker, Flat, Func, Future, IMPLICIT, Join, JoinStateFamilies, Junction, JunctionAdvancedConfiguration, JunctionEntries, JunctionEntriesBase, JunctionJSON, JunctionSchema, JunctionSchemaBase, LazyMap, Lineage, Modify, Molecule, MutableAtom, MutableAtomFamily, NotFoundError, OperationProgress, ReadableFamily, ReadableState, ReadonlySelector, ReadonlySelectorFamily, ReadonlySelectorKey, Refinement, RegularAtom, RegularAtomFamily, ReservedIntrospectionKey, RootStore, Selector, SelectorFamily, SelectorKey, Signal$1 as Signal, StateKey, StatefulSubject, Store, StoreEventCarrier, Subject, TRANSACTION_PHASES, Timeline, TimelineAtomUpdate, TimelineMoleculeCreation, TimelineMoleculeDisposal, TimelineSelectorUpdate, TimelineStateCreation, TimelineStateDisposal, TimelineTransactionUpdate, Tracker, Transaction, TransactionEpoch, TransactionPhase, TransactionProgress, Transceiver, TransceiverMode, WritableFamily, WritableSelector, WritableSelectorFamily, WritableState, abortTransaction, actUponStore, allocateIntoStore, applyTransaction, arbitrary, assignTransactionToContinuity, become, buildTransaction, cacheValue, capitalize, claimWithinStore, clearStore, closeOperation, counterfeit, createAtomFamily, createMutableAtom, createMutableAtomFamily, createReadonlySelector, createReadonlySelectorFamily, createRegularAtom, createRegularAtomFamily, createSelectorFamily, createStandaloneAtom, createStandaloneSelector, createTimeline, createTransaction, createWritableSelector, createWritableSelectorFamily, deallocateFromStore, deposit, disposeAtom, disposeFromStore, disposeSelector, editRelationsInStore, evictCachedValue, findInStore, findRelationsInStore, fuseWithinStore, getContinuityKey, getEnvironmentData, getEpochNumberOfAction, getEpochNumberOfContinuity, getFromStore, getInternalRelationsFromStore, getJoin, getJsonFamily, getJsonToken, getSelectorDependencyKeys, getTrace, getUpdateFamily, getUpdateToken, ingestAtomUpdate, ingestCreationEvent, ingestDisposalEvent, ingestMoleculeCreationEvent, ingestMoleculeDisposalEvent, ingestMoleculeTransferEvent, ingestSelectorUpdate, ingestTransactionUpdate, initFamilyMemberInStore, installIntoStore, isAtomDefault, isAtomKey, isChildStore, isDone, isReadonlySelectorKey, isReservedIntrospectionKey, isRootStore, isSelectorKey, isStateKey, isTransceiver, makeRootMoleculeInStore, markAtomAsDefault, markAtomAsNotDefault, markDone, newest, openOperation, prettyPrintTokenType, readCachedValue, readOrComputeValue, recallState, registerSelector, seekInStore, setAtomOrSelector, setEpochNumberOfAction, setEpochNumberOfContinuity, setIntoStore, subscribeInStore, subscribeToRootAtoms, subscribeToState, subscribeToTimeline, subscribeToTransaction, timeTravel, traceAllSelectorAtoms, traceSelectorAtoms, updateSelectorAtoms, withdraw };
|
|
867
|
+
//# sourceMappingURL=index.d.ts.map
|