@powerhousedao/reactor-browser 6.0.0-dev.11 → 6.0.0-dev.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/index.d.ts +2719 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5607 -0
- package/dist/index.js.map +1 -0
- package/package.json +40 -53
- package/dist/src/actions/dispatch.d.ts +0 -18
- package/dist/src/actions/dispatch.d.ts.map +0 -1
- package/dist/src/actions/dispatch.js +0 -47
- package/dist/src/actions/dispatch.js.map +0 -1
- package/dist/src/actions/document.d.ts +0 -19
- package/dist/src/actions/document.d.ts.map +0 -1
- package/dist/src/actions/document.js +0 -659
- package/dist/src/actions/document.js.map +0 -1
- package/dist/src/actions/drive.d.ts +0 -12
- package/dist/src/actions/drive.d.ts.map +0 -1
- package/dist/src/actions/drive.js +0 -260
- package/dist/src/actions/drive.js.map +0 -1
- package/dist/src/actions/index.d.ts +0 -4
- package/dist/src/actions/index.d.ts.map +0 -1
- package/dist/src/actions/index.js +0 -4
- package/dist/src/actions/index.js.map +0 -1
- package/dist/src/actions/queue.d.ts +0 -10
- package/dist/src/actions/queue.d.ts.map +0 -1
- package/dist/src/actions/queue.js +0 -160
- package/dist/src/actions/queue.js.map +0 -1
- package/dist/src/actions/sign.d.ts +0 -5
- package/dist/src/actions/sign.d.ts.map +0 -1
- package/dist/src/actions/sign.js +0 -71
- package/dist/src/actions/sign.js.map +0 -1
- package/dist/src/analytics/context.d.ts +0 -33
- package/dist/src/analytics/context.d.ts.map +0 -1
- package/dist/src/analytics/context.js +0 -148
- package/dist/src/analytics/context.js.map +0 -1
- package/dist/src/analytics/hooks/analytics-query.d.ts +0 -31
- package/dist/src/analytics/hooks/analytics-query.d.ts.map +0 -1
- package/dist/src/analytics/hooks/analytics-query.js +0 -157
- package/dist/src/analytics/hooks/analytics-query.js.map +0 -1
- package/dist/src/analytics/hooks/document-timeline.d.ts +0 -19
- package/dist/src/analytics/hooks/document-timeline.d.ts.map +0 -1
- package/dist/src/analytics/hooks/document-timeline.js +0 -10
- package/dist/src/analytics/hooks/document-timeline.js.map +0 -1
- package/dist/src/analytics/hooks/index.d.ts +0 -4
- package/dist/src/analytics/hooks/index.d.ts.map +0 -1
- package/dist/src/analytics/hooks/index.js +0 -4
- package/dist/src/analytics/hooks/index.js.map +0 -1
- package/dist/src/analytics/hooks/timeline-items.d.ts +0 -25
- package/dist/src/analytics/hooks/timeline-items.d.ts.map +0 -1
- package/dist/src/analytics/hooks/timeline-items.js +0 -104
- package/dist/src/analytics/hooks/timeline-items.js.map +0 -1
- package/dist/src/analytics/index.d.ts +0 -3
- package/dist/src/analytics/index.d.ts.map +0 -1
- package/dist/src/analytics/index.js +0 -3
- package/dist/src/analytics/index.js.map +0 -1
- package/dist/src/analytics/store/browser.d.ts +0 -2
- package/dist/src/analytics/store/browser.d.ts.map +0 -1
- package/dist/src/analytics/store/browser.js +0 -2
- package/dist/src/analytics/store/browser.js.map +0 -1
- package/dist/src/analytics/store/memory.d.ts +0 -2
- package/dist/src/analytics/store/memory.d.ts.map +0 -1
- package/dist/src/analytics/store/memory.js +0 -2
- package/dist/src/analytics/store/memory.js.map +0 -1
- package/dist/src/analytics/types.d.ts +0 -9
- package/dist/src/analytics/types.d.ts.map +0 -1
- package/dist/src/analytics/types.js +0 -2
- package/dist/src/analytics/types.js.map +0 -1
- package/dist/src/analytics.d.ts +0 -3
- package/dist/src/analytics.d.ts.map +0 -1
- package/dist/src/analytics.js +0 -3
- package/dist/src/analytics.js.map +0 -1
- package/dist/src/connect.d.ts +0 -2
- package/dist/src/connect.d.ts.map +0 -1
- package/dist/src/connect.js +0 -2
- package/dist/src/connect.js.map +0 -1
- package/dist/src/constants.d.ts +0 -3
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js +0 -3
- package/dist/src/constants.js.map +0 -1
- package/dist/src/context/index.d.ts +0 -2
- package/dist/src/context/index.d.ts.map +0 -1
- package/dist/src/context/index.js +0 -2
- package/dist/src/context/index.js.map +0 -1
- package/dist/src/context/read-mode.d.ts +0 -14
- package/dist/src/context/read-mode.d.ts.map +0 -1
- package/dist/src/context/read-mode.js +0 -177
- package/dist/src/context/read-mode.js.map +0 -1
- package/dist/src/document-cache.d.ts +0 -17
- package/dist/src/document-cache.d.ts.map +0 -1
- package/dist/src/document-cache.js +0 -143
- package/dist/src/document-cache.js.map +0 -1
- package/dist/src/document-model.d.ts +0 -4
- package/dist/src/document-model.d.ts.map +0 -1
- package/dist/src/document-model.js +0 -6
- package/dist/src/document-model.js.map +0 -1
- package/dist/src/errors.d.ts +0 -16
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/errors.js +0 -27
- package/dist/src/errors.js.map +0 -1
- package/dist/src/global/core.d.ts +0 -5
- package/dist/src/global/core.d.ts.map +0 -1
- package/dist/src/global/core.js +0 -22
- package/dist/src/global/core.js.map +0 -1
- package/dist/src/global/index.d.ts +0 -2
- package/dist/src/global/index.d.ts.map +0 -1
- package/dist/src/global/index.js +0 -2
- package/dist/src/global/index.js.map +0 -1
- package/dist/src/global/types.d.ts +0 -17
- package/dist/src/global/types.d.ts.map +0 -1
- package/dist/src/global/types.js +0 -2
- package/dist/src/global/types.js.map +0 -1
- package/dist/src/hooks/add-ph-event-handlers.d.ts +0 -2
- package/dist/src/hooks/add-ph-event-handlers.d.ts.map +0 -1
- package/dist/src/hooks/add-ph-event-handlers.js +0 -109
- package/dist/src/hooks/add-ph-event-handlers.js.map +0 -1
- package/dist/src/hooks/allowed-document-model-modules.d.ts +0 -2
- package/dist/src/hooks/allowed-document-model-modules.d.ts.map +0 -1
- package/dist/src/hooks/allowed-document-model-modules.js +0 -10
- package/dist/src/hooks/allowed-document-model-modules.js.map +0 -1
- package/dist/src/hooks/child-nodes.d.ts +0 -4
- package/dist/src/hooks/child-nodes.d.ts.map +0 -1
- package/dist/src/hooks/child-nodes.js +0 -15
- package/dist/src/hooks/child-nodes.js.map +0 -1
- package/dist/src/hooks/config/connect.d.ts +0 -96
- package/dist/src/hooks/config/connect.d.ts.map +0 -1
- package/dist/src/hooks/config/connect.js +0 -210
- package/dist/src/hooks/config/connect.js.map +0 -1
- package/dist/src/hooks/config/editor.d.ts +0 -32
- package/dist/src/hooks/config/editor.d.ts.map +0 -1
- package/dist/src/hooks/config/editor.js +0 -43
- package/dist/src/hooks/config/editor.js.map +0 -1
- package/dist/src/hooks/config/set-config-by-key.d.ts +0 -5
- package/dist/src/hooks/config/set-config-by-key.d.ts.map +0 -1
- package/dist/src/hooks/config/set-config-by-key.js +0 -15
- package/dist/src/hooks/config/set-config-by-key.js.map +0 -1
- package/dist/src/hooks/config/set-config-by-object.d.ts +0 -31
- package/dist/src/hooks/config/set-config-by-object.d.ts.map +0 -1
- package/dist/src/hooks/config/set-config-by-object.js +0 -84
- package/dist/src/hooks/config/set-config-by-object.js.map +0 -1
- package/dist/src/hooks/config/use-value-by-key.d.ts +0 -13
- package/dist/src/hooks/config/use-value-by-key.d.ts.map +0 -1
- package/dist/src/hooks/config/use-value-by-key.js +0 -23
- package/dist/src/hooks/config/use-value-by-key.js.map +0 -1
- package/dist/src/hooks/config/utils.d.ts +0 -3
- package/dist/src/hooks/config/utils.d.ts.map +0 -1
- package/dist/src/hooks/config/utils.js +0 -6
- package/dist/src/hooks/config/utils.js.map +0 -1
- package/dist/src/hooks/connect.d.ts +0 -16
- package/dist/src/hooks/connect.d.ts.map +0 -1
- package/dist/src/hooks/connect.js +0 -16
- package/dist/src/hooks/connect.js.map +0 -1
- package/dist/src/hooks/crypto.d.ts +0 -9
- package/dist/src/hooks/crypto.d.ts.map +0 -1
- package/dist/src/hooks/crypto.js +0 -13
- package/dist/src/hooks/crypto.js.map +0 -1
- package/dist/src/hooks/did.d.ts +0 -2
- package/dist/src/hooks/did.d.ts.map +0 -1
- package/dist/src/hooks/did.js +0 -3
- package/dist/src/hooks/did.js.map +0 -1
- package/dist/src/hooks/dispatch.d.ts +0 -9
- package/dist/src/hooks/dispatch.d.ts.map +0 -1
- package/dist/src/hooks/dispatch.js +0 -20
- package/dist/src/hooks/dispatch.js.map +0 -1
- package/dist/src/hooks/document-by-id.d.ts +0 -6
- package/dist/src/hooks/document-by-id.d.ts.map +0 -1
- package/dist/src/hooks/document-by-id.js +0 -13
- package/dist/src/hooks/document-by-id.js.map +0 -1
- package/dist/src/hooks/document-cache.d.ts +0 -76
- package/dist/src/hooks/document-cache.d.ts.map +0 -1
- package/dist/src/hooks/document-cache.js +0 -124
- package/dist/src/hooks/document-cache.js.map +0 -1
- package/dist/src/hooks/document-model-modules.d.ts +0 -4
- package/dist/src/hooks/document-model-modules.d.ts.map +0 -1
- package/dist/src/hooks/document-model-modules.js +0 -10
- package/dist/src/hooks/document-model-modules.js.map +0 -1
- package/dist/src/hooks/document-of-type.d.ts +0 -5
- package/dist/src/hooks/document-of-type.d.ts.map +0 -1
- package/dist/src/hooks/document-of-type.js +0 -22
- package/dist/src/hooks/document-of-type.js.map +0 -1
- package/dist/src/hooks/document-types.d.ts +0 -7
- package/dist/src/hooks/document-types.d.ts.map +0 -1
- package/dist/src/hooks/document-types.js +0 -13
- package/dist/src/hooks/document-types.js.map +0 -1
- package/dist/src/hooks/drive-by-id.d.ts +0 -4
- package/dist/src/hooks/drive-by-id.d.ts.map +0 -1
- package/dist/src/hooks/drive-by-id.js +0 -12
- package/dist/src/hooks/drive-by-id.js.map +0 -1
- package/dist/src/hooks/drives.d.ts +0 -9
- package/dist/src/hooks/drives.d.ts.map +0 -1
- package/dist/src/hooks/drives.js +0 -9
- package/dist/src/hooks/drives.js.map +0 -1
- package/dist/src/hooks/editor-modules.d.ts +0 -9
- package/dist/src/hooks/editor-modules.d.ts.map +0 -1
- package/dist/src/hooks/editor-modules.js +0 -43
- package/dist/src/hooks/editor-modules.js.map +0 -1
- package/dist/src/hooks/features.d.ts +0 -5
- package/dist/src/hooks/features.d.ts.map +0 -1
- package/dist/src/hooks/features.js +0 -6
- package/dist/src/hooks/features.js.map +0 -1
- package/dist/src/hooks/folder-by-id.d.ts +0 -3
- package/dist/src/hooks/folder-by-id.d.ts.map +0 -1
- package/dist/src/hooks/folder-by-id.js +0 -6
- package/dist/src/hooks/folder-by-id.js.map +0 -1
- package/dist/src/hooks/import-script-modules.d.ts +0 -3
- package/dist/src/hooks/import-script-modules.d.ts.map +0 -1
- package/dist/src/hooks/import-script-modules.js +0 -6
- package/dist/src/hooks/import-script-modules.js.map +0 -1
- package/dist/src/hooks/index.d.ts +0 -41
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/hooks/index.js +0 -41
- package/dist/src/hooks/index.js.map +0 -1
- package/dist/src/hooks/items-in-selected-drive.d.ts +0 -13
- package/dist/src/hooks/items-in-selected-drive.d.ts.map +0 -1
- package/dist/src/hooks/items-in-selected-drive.js +0 -35
- package/dist/src/hooks/items-in-selected-drive.js.map +0 -1
- package/dist/src/hooks/items-in-selected-folder.d.ts +0 -11
- package/dist/src/hooks/items-in-selected-folder.d.ts.map +0 -1
- package/dist/src/hooks/items-in-selected-folder.js +0 -33
- package/dist/src/hooks/items-in-selected-folder.js.map +0 -1
- package/dist/src/hooks/loading.d.ts +0 -2
- package/dist/src/hooks/loading.d.ts.map +0 -1
- package/dist/src/hooks/loading.js +0 -3
- package/dist/src/hooks/loading.js.map +0 -1
- package/dist/src/hooks/login-status.d.ts +0 -2
- package/dist/src/hooks/login-status.d.ts.map +0 -1
- package/dist/src/hooks/login-status.js +0 -3
- package/dist/src/hooks/login-status.js.map +0 -1
- package/dist/src/hooks/make-ph-event-functions.d.ts +0 -7
- package/dist/src/hooks/make-ph-event-functions.d.ts.map +0 -1
- package/dist/src/hooks/make-ph-event-functions.js +0 -46
- package/dist/src/hooks/make-ph-event-functions.js.map +0 -1
- package/dist/src/hooks/modals.d.ts +0 -17
- package/dist/src/hooks/modals.d.ts.map +0 -1
- package/dist/src/hooks/modals.js +0 -26
- package/dist/src/hooks/modals.js.map +0 -1
- package/dist/src/hooks/node-actions.d.ts +0 -11
- package/dist/src/hooks/node-actions.d.ts.map +0 -1
- package/dist/src/hooks/node-actions.js +0 -97
- package/dist/src/hooks/node-actions.js.map +0 -1
- package/dist/src/hooks/node-by-id.d.ts +0 -4
- package/dist/src/hooks/node-by-id.d.ts.map +0 -1
- package/dist/src/hooks/node-by-id.js +0 -7
- package/dist/src/hooks/node-by-id.js.map +0 -1
- package/dist/src/hooks/node-path.d.ts +0 -6
- package/dist/src/hooks/node-path.d.ts.map +0 -1
- package/dist/src/hooks/node-path.js +0 -23
- package/dist/src/hooks/node-path.js.map +0 -1
- package/dist/src/hooks/parent-folder.d.ts +0 -4
- package/dist/src/hooks/parent-folder.d.ts.map +0 -1
- package/dist/src/hooks/parent-folder.js +0 -13
- package/dist/src/hooks/parent-folder.js.map +0 -1
- package/dist/src/hooks/processor-manager.d.ts +0 -9
- package/dist/src/hooks/processor-manager.d.ts.map +0 -1
- package/dist/src/hooks/processor-manager.js +0 -9
- package/dist/src/hooks/processor-manager.js.map +0 -1
- package/dist/src/hooks/processor-modules.d.ts +0 -4
- package/dist/src/hooks/processor-modules.d.ts.map +0 -1
- package/dist/src/hooks/processor-modules.js +0 -12
- package/dist/src/hooks/processor-modules.js.map +0 -1
- package/dist/src/hooks/reactor.d.ts +0 -42
- package/dist/src/hooks/reactor.d.ts.map +0 -1
- package/dist/src/hooks/reactor.js +0 -44
- package/dist/src/hooks/reactor.js.map +0 -1
- package/dist/src/hooks/renown.d.ts +0 -8
- package/dist/src/hooks/renown.d.ts.map +0 -1
- package/dist/src/hooks/renown.js +0 -9
- package/dist/src/hooks/renown.js.map +0 -1
- package/dist/src/hooks/revision-history.d.ts +0 -11
- package/dist/src/hooks/revision-history.d.ts.map +0 -1
- package/dist/src/hooks/revision-history.js +0 -17
- package/dist/src/hooks/revision-history.js.map +0 -1
- package/dist/src/hooks/selected-document.d.ts +0 -12
- package/dist/src/hooks/selected-document.d.ts.map +0 -1
- package/dist/src/hooks/selected-document.js +0 -35
- package/dist/src/hooks/selected-document.js.map +0 -1
- package/dist/src/hooks/selected-drive.d.ts +0 -13
- package/dist/src/hooks/selected-drive.d.ts.map +0 -1
- package/dist/src/hooks/selected-drive.js +0 -63
- package/dist/src/hooks/selected-drive.js.map +0 -1
- package/dist/src/hooks/selected-folder.d.ts +0 -4
- package/dist/src/hooks/selected-folder.d.ts.map +0 -1
- package/dist/src/hooks/selected-folder.js +0 -10
- package/dist/src/hooks/selected-folder.js.map +0 -1
- package/dist/src/hooks/selected-node.d.ts +0 -9
- package/dist/src/hooks/selected-node.d.ts.map +0 -1
- package/dist/src/hooks/selected-node.js +0 -54
- package/dist/src/hooks/selected-node.js.map +0 -1
- package/dist/src/hooks/selected-timeline-item.d.ts +0 -7
- package/dist/src/hooks/selected-timeline-item.d.ts.map +0 -1
- package/dist/src/hooks/selected-timeline-item.js +0 -9
- package/dist/src/hooks/selected-timeline-item.js.map +0 -1
- package/dist/src/hooks/subgraph-modules.d.ts +0 -3
- package/dist/src/hooks/subgraph-modules.d.ts.map +0 -1
- package/dist/src/hooks/subgraph-modules.js +0 -6
- package/dist/src/hooks/subgraph-modules.js.map +0 -1
- package/dist/src/hooks/supported-document-types.d.ts +0 -3
- package/dist/src/hooks/supported-document-types.d.ts.map +0 -1
- package/dist/src/hooks/supported-document-types.js +0 -7
- package/dist/src/hooks/supported-document-types.js.map +0 -1
- package/dist/src/hooks/timeline-revision.d.ts +0 -7
- package/dist/src/hooks/timeline-revision.d.ts.map +0 -1
- package/dist/src/hooks/timeline-revision.js +0 -9
- package/dist/src/hooks/timeline-revision.js.map +0 -1
- package/dist/src/hooks/toast.d.ts +0 -7
- package/dist/src/hooks/toast.d.ts.map +0 -1
- package/dist/src/hooks/toast.js +0 -9
- package/dist/src/hooks/toast.js.map +0 -1
- package/dist/src/hooks/use-feature-flags.d.ts +0 -36
- package/dist/src/hooks/use-feature-flags.d.ts.map +0 -1
- package/dist/src/hooks/use-feature-flags.js +0 -73
- package/dist/src/hooks/use-feature-flags.js.map +0 -1
- package/dist/src/hooks/use-get-switchboard-link.d.ts +0 -14
- package/dist/src/hooks/use-get-switchboard-link.d.ts.map +0 -1
- package/dist/src/hooks/use-get-switchboard-link.js +0 -38
- package/dist/src/hooks/use-get-switchboard-link.js.map +0 -1
- package/dist/src/hooks/use-on-drop-file.d.ts +0 -3
- package/dist/src/hooks/use-on-drop-file.d.ts.map +0 -1
- package/dist/src/hooks/use-on-drop-file.js +0 -21
- package/dist/src/hooks/use-on-drop-file.js.map +0 -1
- package/dist/src/hooks/user-permissions.d.ts +0 -5
- package/dist/src/hooks/user-permissions.d.ts.map +0 -1
- package/dist/src/hooks/user-permissions.js +0 -17
- package/dist/src/hooks/user-permissions.js.map +0 -1
- package/dist/src/hooks/user.d.ts +0 -8
- package/dist/src/hooks/user.d.ts.map +0 -1
- package/dist/src/hooks/user.js +0 -9
- package/dist/src/hooks/user.js.map +0 -1
- package/dist/src/hooks/vetra-packages.d.ts +0 -8
- package/dist/src/hooks/vetra-packages.d.ts.map +0 -1
- package/dist/src/hooks/vetra-packages.js +0 -17
- package/dist/src/hooks/vetra-packages.js.map +0 -1
- package/dist/src/index.d.ts +0 -15
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -15
- package/dist/src/index.js.map +0 -1
- package/dist/src/pglite/drop.d.ts +0 -3
- package/dist/src/pglite/drop.d.ts.map +0 -1
- package/dist/src/pglite/drop.js +0 -19
- package/dist/src/pglite/drop.js.map +0 -1
- package/dist/src/pglite/hooks/index.d.ts +0 -2
- package/dist/src/pglite/hooks/index.d.ts.map +0 -1
- package/dist/src/pglite/hooks/index.js +0 -2
- package/dist/src/pglite/hooks/index.js.map +0 -1
- package/dist/src/pglite/hooks/usePGlite.d.ts +0 -11
- package/dist/src/pglite/hooks/usePGlite.d.ts.map +0 -1
- package/dist/src/pglite/hooks/usePGlite.js +0 -37
- package/dist/src/pglite/hooks/usePGlite.js.map +0 -1
- package/dist/src/pglite/index.d.ts +0 -3
- package/dist/src/pglite/index.d.ts.map +0 -1
- package/dist/src/pglite/index.js +0 -3
- package/dist/src/pglite/index.js.map +0 -1
- package/dist/src/reactor-client-document-cache.d.ts +0 -31
- package/dist/src/reactor-client-document-cache.d.ts.map +0 -1
- package/dist/src/reactor-client-document-cache.js +0 -142
- package/dist/src/reactor-client-document-cache.js.map +0 -1
- package/dist/src/reactor.d.ts +0 -18
- package/dist/src/reactor.d.ts.map +0 -1
- package/dist/src/reactor.js +0 -162
- package/dist/src/reactor.js.map +0 -1
- package/dist/src/relational/hooks/index.d.ts +0 -3
- package/dist/src/relational/hooks/index.d.ts.map +0 -1
- package/dist/src/relational/hooks/index.js +0 -3
- package/dist/src/relational/hooks/index.js.map +0 -1
- package/dist/src/relational/hooks/useRelationalDb.d.ts +0 -12
- package/dist/src/relational/hooks/useRelationalDb.d.ts.map +0 -1
- package/dist/src/relational/hooks/useRelationalDb.js +0 -36
- package/dist/src/relational/hooks/useRelationalDb.js.map +0 -1
- package/dist/src/relational/hooks/useRelationalQuery.d.ts +0 -15
- package/dist/src/relational/hooks/useRelationalQuery.d.ts.map +0 -1
- package/dist/src/relational/hooks/useRelationalQuery.js +0 -76
- package/dist/src/relational/hooks/useRelationalQuery.js.map +0 -1
- package/dist/src/relational/index.d.ts +0 -3
- package/dist/src/relational/index.d.ts.map +0 -1
- package/dist/src/relational/index.js +0 -3
- package/dist/src/relational/index.js.map +0 -1
- package/dist/src/relational/utils/createProcessorQuery.d.ts +0 -17
- package/dist/src/relational/utils/createProcessorQuery.d.ts.map +0 -1
- package/dist/src/relational/utils/createProcessorQuery.js +0 -24
- package/dist/src/relational/utils/createProcessorQuery.js.map +0 -1
- package/dist/src/relational/utils/index.d.ts +0 -2
- package/dist/src/relational/utils/index.d.ts.map +0 -1
- package/dist/src/relational/utils/index.js +0 -2
- package/dist/src/relational/utils/index.js.map +0 -1
- package/dist/src/renown/constants.d.ts +0 -130
- package/dist/src/renown/constants.d.ts.map +0 -1
- package/dist/src/renown/constants.js +0 -40
- package/dist/src/renown/constants.js.map +0 -1
- package/dist/src/renown/index.d.ts +0 -3
- package/dist/src/renown/index.d.ts.map +0 -1
- package/dist/src/renown/index.js +0 -3
- package/dist/src/renown/index.js.map +0 -1
- package/dist/src/renown/utils.d.ts +0 -6
- package/dist/src/renown/utils.d.ts.map +0 -1
- package/dist/src/renown/utils.js +0 -56
- package/dist/src/renown/utils.js.map +0 -1
- package/dist/src/storage/index.d.ts +0 -2
- package/dist/src/storage/index.d.ts.map +0 -1
- package/dist/src/storage/index.js +0 -2
- package/dist/src/storage/index.js.map +0 -1
- package/dist/src/storage/types.d.ts +0 -6
- package/dist/src/storage/types.d.ts.map +0 -1
- package/dist/src/storage/types.js +0 -2
- package/dist/src/storage/types.js.map +0 -1
- package/dist/src/types/config.d.ts +0 -96
- package/dist/src/types/config.d.ts.map +0 -1
- package/dist/src/types/config.js +0 -2
- package/dist/src/types/config.js.map +0 -1
- package/dist/src/types/documents.d.ts +0 -26
- package/dist/src/types/documents.d.ts.map +0 -1
- package/dist/src/types/documents.js +0 -2
- package/dist/src/types/documents.js.map +0 -1
- package/dist/src/types/global.d.ts +0 -56
- package/dist/src/types/global.d.ts.map +0 -1
- package/dist/src/types/global.js +0 -2
- package/dist/src/types/global.js.map +0 -1
- package/dist/src/types/index.d.ts +0 -10
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -2
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/types/modals.d.ts +0 -34
- package/dist/src/types/modals.d.ts.map +0 -1
- package/dist/src/types/modals.js +0 -2
- package/dist/src/types/modals.js.map +0 -1
- package/dist/src/types/reactor.d.ts +0 -2
- package/dist/src/types/reactor.d.ts.map +0 -1
- package/dist/src/types/reactor.js +0 -2
- package/dist/src/types/reactor.js.map +0 -1
- package/dist/src/types/timeline.d.ts +0 -24
- package/dist/src/types/timeline.d.ts.map +0 -1
- package/dist/src/types/timeline.js +0 -2
- package/dist/src/types/timeline.js.map +0 -1
- package/dist/src/types/toast.d.ts +0 -9
- package/dist/src/types/toast.d.ts.map +0 -1
- package/dist/src/types/toast.js +0 -2
- package/dist/src/types/toast.js.map +0 -1
- package/dist/src/types/upload.d.ts +0 -16
- package/dist/src/types/upload.d.ts.map +0 -1
- package/dist/src/types/upload.js +0 -2
- package/dist/src/types/upload.js.map +0 -1
- package/dist/src/types/vetra.d.ts +0 -60
- package/dist/src/types/vetra.d.ts.map +0 -1
- package/dist/src/types/vetra.js +0 -2
- package/dist/src/types/vetra.js.map +0 -1
- package/dist/src/utils/documents.d.ts +0 -2
- package/dist/src/utils/documents.d.ts.map +0 -1
- package/dist/src/utils/documents.js +0 -20
- package/dist/src/utils/documents.js.map +0 -1
- package/dist/src/utils/drives.d.ts +0 -36
- package/dist/src/utils/drives.d.ts.map +0 -1
- package/dist/src/utils/drives.js +0 -142
- package/dist/src/utils/drives.js.map +0 -1
- package/dist/src/utils/export-document.d.ts +0 -3
- package/dist/src/utils/export-document.d.ts.map +0 -1
- package/dist/src/utils/export-document.js +0 -18
- package/dist/src/utils/export-document.js.map +0 -1
- package/dist/src/utils/get-revision-from-date.d.ts +0 -3
- package/dist/src/utils/get-revision-from-date.d.ts.map +0 -1
- package/dist/src/utils/get-revision-from-date.js +0 -10
- package/dist/src/utils/get-revision-from-date.js.map +0 -1
- package/dist/src/utils/index.d.ts +0 -11
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/index.js +0 -11
- package/dist/src/utils/index.js.map +0 -1
- package/dist/src/utils/nodes.d.ts +0 -8
- package/dist/src/utils/nodes.d.ts.map +0 -1
- package/dist/src/utils/nodes.js +0 -17
- package/dist/src/utils/nodes.js.map +0 -1
- package/dist/src/utils/switchboard.d.ts +0 -7
- package/dist/src/utils/switchboard.d.ts.map +0 -1
- package/dist/src/utils/switchboard.js +0 -76
- package/dist/src/utils/switchboard.js.map +0 -1
- package/dist/src/utils/url.d.ts +0 -29
- package/dist/src/utils/url.d.ts.map +0 -1
- package/dist/src/utils/url.js +0 -77
- package/dist/src/utils/url.js.map +0 -1
- package/dist/src/utils/user.d.ts +0 -5
- package/dist/src/utils/user.d.ts.map +0 -1
- package/dist/src/utils/user.js +0 -15
- package/dist/src/utils/user.js.map +0 -1
- package/dist/src/utils/validate-document.d.ts +0 -3
- package/dist/src/utils/validate-document.d.ts.map +0 -1
- package/dist/src/utils/validate-document.js +0 -38
- package/dist/src/utils/validate-document.js.map +0 -1
- package/dist/src/utils/vetra.d.ts +0 -7
- package/dist/src/utils/vetra.d.ts.map +0 -1
- package/dist/src/utils/vetra.js +0 -86
- package/dist/src/utils/vetra.js.map +0 -1
- package/dist/test/analytics.test.d.ts +0 -2
- package/dist/test/analytics.test.d.ts.map +0 -1
- package/dist/test/analytics.test.js +0 -263
- package/dist/test/analytics.test.js.map +0 -1
- package/dist/test/document-cache.test.d.ts +0 -2
- package/dist/test/document-cache.test.d.ts.map +0 -1
- package/dist/test/document-cache.test.js +0 -457
- package/dist/test/document-cache.test.js.map +0 -1
- package/dist/test/drop.test.d.ts +0 -2
- package/dist/test/drop.test.d.ts.map +0 -1
- package/dist/test/drop.test.js +0 -86
- package/dist/test/drop.test.js.map +0 -1
- package/dist/test/getSwitchboardUrl.test.d.ts +0 -2
- package/dist/test/getSwitchboardUrl.test.d.ts.map +0 -1
- package/dist/test/getSwitchboardUrl.test.js +0 -107
- package/dist/test/getSwitchboardUrl.test.js.map +0 -1
- package/dist/test/hooks/document-cache.test.d.ts +0 -2
- package/dist/test/hooks/document-cache.test.d.ts.map +0 -1
- package/dist/test/hooks/document-cache.test.js +0 -642
- package/dist/test/hooks/document-cache.test.js.map +0 -1
- package/dist/test/reactor.test.d.ts +0 -2
- package/dist/test/reactor.test.d.ts.map +0 -1
- package/dist/test/reactor.test.js +0 -26
- package/dist/test/reactor.test.js.map +0 -1
- package/dist/test/switchboard.test.d.ts +0 -2
- package/dist/test/switchboard.test.d.ts.map +0 -1
- package/dist/test/switchboard.test.js +0 -27
- package/dist/test/switchboard.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -24
- package/dist/vitest.config.js.map +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2719 @@
|
|
|
1
|
+
import { PHDocumentController } from "document-model";
|
|
2
|
+
import { Action, Author, DocumentAction, DocumentModelLib, DocumentModelModule, DocumentModelPHState, DocumentModelUtils, DocumentOperations, DocumentSpecification, EditorModule, ISigner, ImportScriptModule, Manifest, Operation, PHBaseState, PHDocument as PHDocument$1, PHDocumentHeader, Reducer, SubgraphModule, UpgradeManifest, ValidationError } from "@powerhousedao/shared/document-model";
|
|
3
|
+
import * as _powerhousedao_shared_document_drive0 from "@powerhousedao/shared/document-drive";
|
|
4
|
+
import { DocumentDriveAction, DocumentDriveDocument, DriveInput, FileNode, FolderNode, Node, SharingType } from "@powerhousedao/shared/document-drive";
|
|
5
|
+
import * as _powerhousedao_reactor0 from "@powerhousedao/reactor";
|
|
6
|
+
import { ChannelScheme, ConnectionState, ConnectionStateSnapshot, ConnectionStateSnapshot as ConnectionStateSnapshot$1, Database, Database as Database$1, DocumentChangeType, DocumentIntegrityService, GqlRequestChannel, IChannel, IDocumentModelLoader, IDocumentModelRegistry, IProcessor, IProcessorHostModule, IReactorClient, IRelationalDb, ISyncManager, InMemoryQueue, IntervalPollTimer, Job, JwtHandler, KeyframeValidationIssue, OperationWithContext, ParsedDriveUrl, ProcessorFactory, ProcessorFilter, ProcessorRecord, REACTOR_SCHEMA, ReactorBuilder, ReactorClientBuilder, ReactorClientModule, RebuildResult, RelationalDbProcessor, Remote, SignerConfig, SnapshotValidationIssue, SyncOperation, SyncOperationStatus, ValidationResult, driveCollectionId, driveIdFromUrl, parseDriveUrl } from "@powerhousedao/reactor";
|
|
7
|
+
import { BrowserAnalyticsStore, BrowserAnalyticsStoreOptions } from "@powerhousedao/analytics-engine-browser";
|
|
8
|
+
import { AnalyticsPath, AnalyticsQuery, AnalyticsQueryEngine, AnalyticsSeries, AnalyticsSeriesInput, AnalyticsSeriesQuery, GroupedPeriodResults, IAnalyticsStore } from "@powerhousedao/analytics-engine-core";
|
|
9
|
+
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
10
|
+
import { QueryClient, UseMutationOptions, UseQueryOptions, UseQueryResult } from "@tanstack/react-query";
|
|
11
|
+
import { CSSProperties, PropsWithChildren, ReactNode } from "react";
|
|
12
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
13
|
+
import { GraphQLClient, RequestOptions } from "graphql-request";
|
|
14
|
+
import * as _renown_sdk0 from "@renown/sdk";
|
|
15
|
+
import { IRenown, LoginStatus, User } from "@renown/sdk";
|
|
16
|
+
import { CompiledQuery, Kysely } from "kysely";
|
|
17
|
+
import * as _powerhousedao_reactor_browser0 from "@powerhousedao/reactor-browser";
|
|
18
|
+
import { AddPHGlobalEventHandler as AddPHGlobalEventHandler$1, BrowserReactorClientModule as BrowserReactorClientModule$1, DocumentDispatch as DocumentDispatch$1, PHDocumentEditorConfig as PHDocumentEditorConfig$1, PHDocumentEditorConfigHooks as PHDocumentEditorConfigHooks$1, PHDocumentEditorConfigKey as PHDocumentEditorConfigKey$1, PHDocumentEditorConfigSetters as PHDocumentEditorConfigSetters$1, PHDriveEditorConfig as PHDriveEditorConfig$1, PHDriveEditorConfigHooks as PHDriveEditorConfigHooks$1, PHDriveEditorConfigKey as PHDriveEditorConfigKey$1, PHDriveEditorConfigSetters as PHDriveEditorConfigSetters$1, PHGlobal as PHGlobal$1, PHGlobalConfig as PHGlobalConfig$1, PHGlobalConfigHooks as PHGlobalConfigHooks$1, PHGlobalConfigKey as PHGlobalConfigKey$1, PHGlobalConfigSetters as PHGlobalConfigSetters$1, PHGlobalKey as PHGlobalKey$1, PHModal as PHModal$1, QueryCallbackReturnType as QueryCallbackReturnType$1, SetPHGlobalValue as SetPHGlobalValue$1, UsePHGlobalValue as UsePHGlobalValue$1, VetraDocumentModelModule as VetraDocumentModelModule$1, VetraEditorModule as VetraEditorModule$1, VetraPackage as VetraPackage$1, VetraPackageManifest as VetraPackageManifest$1, useRelationalQueryOptions as useRelationalQueryOptions$1 } from "@powerhousedao/reactor-browser";
|
|
19
|
+
import { LiveNamespace, LiveQueryResults, PGliteWithLive } from "@electric-sql/pglite/live";
|
|
20
|
+
import { IRelationalDb as IRelationalDb$1, IRelationalQueryBuilder, ProcessorFactoryBuilder, ProcessorRecord as ProcessorRecord$1, RelationalDbProcessorClass } from "@powerhousedao/shared/processors";
|
|
21
|
+
import { PackageInfo, RegistryPackageSource } from "@powerhousedao/shared/registry";
|
|
22
|
+
import { PGlite } from "@electric-sql/pglite";
|
|
23
|
+
|
|
24
|
+
//#region src/actions/dispatch.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* Dispatches actions to a document.
|
|
27
|
+
* @param actionOrActions - The action or actions to dispatch.
|
|
28
|
+
* @param document - The document to dispatch actions to.
|
|
29
|
+
* @param onErrors - Callback invoked with any errors that occurred during action execution.
|
|
30
|
+
* @returns The updated document, or undefined if the dispatch failed.
|
|
31
|
+
*/
|
|
32
|
+
declare function dispatchActions<TDocument = PHDocument$1, TAction = Action>(actionOrActions: TAction[] | TAction | undefined, document: TDocument | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Dispatches actions to a document.
|
|
35
|
+
* @param actionOrActions - The action or actions to dispatch.
|
|
36
|
+
* @param documentId - The ID of the document to dispatch actions to.
|
|
37
|
+
* @param onErrors - Callback invoked with any errors that occurred during action execution.
|
|
38
|
+
* @returns The updated document, or undefined if the dispatch failed.
|
|
39
|
+
*/
|
|
40
|
+
declare function dispatchActions(actionOrActions: Action[] | Action | undefined, documentId: string, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void): Promise<PHDocument$1 | undefined>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/actions/document.d.ts
|
|
43
|
+
declare function exportFile(document: PHDocument$1, suggestedName?: string): Promise<void | FileSystemFileHandle>;
|
|
44
|
+
declare function addDocument(driveId: string, name: string, documentType: string, parentFolder?: string, document?: PHDocument$1, id?: string, preferredEditor?: string): Promise<{
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
documentType: string;
|
|
48
|
+
parentFolder: string | null;
|
|
49
|
+
kind: "file";
|
|
50
|
+
}>;
|
|
51
|
+
declare function addFolder(driveId: string, name: string, parentFolder?: string): Promise<_powerhousedao_shared_document_drive0.FolderNode>;
|
|
52
|
+
declare function deleteNode(driveId: string, nodeId: string): Promise<void>;
|
|
53
|
+
declare function renameDriveNode(driveId: string, nodeId: string, name: string): Promise<Node | undefined>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/actions/drive.d.ts
|
|
56
|
+
declare function addDrive(input: DriveInput, preferredEditor?: string): Promise<PHDocument$1<any>>;
|
|
57
|
+
declare function addRemoteDrive(url: string, driveId?: string): Promise<string>;
|
|
58
|
+
declare function deleteDrive(driveId: string): Promise<void>;
|
|
59
|
+
declare function renameDrive(driveId: string, name: string): Promise<PHDocument$1 | undefined>;
|
|
60
|
+
declare function setDriveAvailableOffline(driveId: string, availableOffline: boolean): Promise<PHDocument$1 | undefined>;
|
|
61
|
+
declare function setDriveSharingType(driveId: string, sharingType: SharingType): Promise<PHDocument$1 | undefined>;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/analytics/context.d.ts
|
|
64
|
+
type CreateStoreOptions = BrowserAnalyticsStoreOptions;
|
|
65
|
+
declare const analyticsOptionsKey: readonly ["analytics", "options"];
|
|
66
|
+
declare const analyticsStoreKey: readonly ["analytics", "store"];
|
|
67
|
+
declare const analyticsEngineKey: readonly ["analytics", "store"];
|
|
68
|
+
declare function createAnalyticsStore(options: CreateStoreOptions): Promise<{
|
|
69
|
+
store: BrowserAnalyticsStore;
|
|
70
|
+
engine: AnalyticsQueryEngine;
|
|
71
|
+
options: BrowserAnalyticsStoreOptions;
|
|
72
|
+
}>;
|
|
73
|
+
declare function getAnalyticsStore(): Promise<IAnalyticsStore | null>;
|
|
74
|
+
declare function useAnalyticsStoreOptions(): BrowserAnalyticsStoreOptions | undefined;
|
|
75
|
+
declare function useCreateAnalyticsStore(options?: CreateStoreOptions): _tanstack_react_query0.UseMutationResult<IAnalyticsStore | null, Error, void, unknown>;
|
|
76
|
+
declare function useAnalyticsStoreQuery(options?: CreateStoreOptions): _tanstack_react_query0.UseSuspenseQueryResult<IAnalyticsStore | null, Error>;
|
|
77
|
+
declare function useAnalyticsStore(options?: CreateStoreOptions): IAnalyticsStore | null;
|
|
78
|
+
declare function useAnalyticsStoreAsync(options?: CreateStoreOptions): _tanstack_react_query0.UseQueryResult<IAnalyticsStore | null, Error>;
|
|
79
|
+
interface BaseAnalyticsProviderProps extends PropsWithChildren {
|
|
80
|
+
/**
|
|
81
|
+
* Custom QueryClient instance
|
|
82
|
+
* @default undefined
|
|
83
|
+
*/
|
|
84
|
+
queryClient?: QueryClient;
|
|
85
|
+
}
|
|
86
|
+
type CreateAnalyticsStoreProps = {
|
|
87
|
+
options?: CreateStoreOptions;
|
|
88
|
+
} | {
|
|
89
|
+
databaseName?: string;
|
|
90
|
+
};
|
|
91
|
+
type AnalyticsProviderProps = BaseAnalyticsProviderProps & CreateAnalyticsStoreProps;
|
|
92
|
+
declare function AnalyticsProvider({
|
|
93
|
+
children,
|
|
94
|
+
queryClient,
|
|
95
|
+
...props
|
|
96
|
+
}: AnalyticsProviderProps): react_jsx_runtime0.JSX.Element;
|
|
97
|
+
declare function useAnalyticsEngine(): AnalyticsQueryEngine | undefined;
|
|
98
|
+
declare function useAnalyticsEngineAsync(): _tanstack_react_query0.UseQueryResult<AnalyticsQueryEngine, Error>;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/analytics/hooks/analytics-query.d.ts
|
|
101
|
+
type UseAnalyticsQueryOptions<TData = GroupedPeriodResults> = Omit<UseQueryOptions<GroupedPeriodResults, Error, TData>, "queryKey" | "queryFn"> & {
|
|
102
|
+
sources?: AnalyticsPath[];
|
|
103
|
+
};
|
|
104
|
+
type UseAnalyticsQueryResult<TData = GroupedPeriodResults> = UseQueryResult<TData>;
|
|
105
|
+
declare function useAnalyticsQuery<TData = GroupedPeriodResults>(query: AnalyticsQuery, options?: UseAnalyticsQueryOptions<TData>): UseAnalyticsQueryResult<TData>;
|
|
106
|
+
type UseAnalyticsSeriesOptions = Omit<UseQueryOptions<AnalyticsSeries[], Error, AnalyticsSeries[]>, "queryKey" | "queryFn">;
|
|
107
|
+
declare function useAnalyticsSeries(query: AnalyticsSeriesQuery, options?: UseAnalyticsSeriesOptions): UseQueryResult<AnalyticsSeries[], Error>;
|
|
108
|
+
type UseAddSeriesValueOptions = Omit<UseMutationOptions<void, Error, AnalyticsSeriesInput>, "mutationKey" | "mutationFn">;
|
|
109
|
+
declare function useAddSeriesValue(options?: UseAddSeriesValueOptions): _tanstack_react_query0.UseMutationResult<void, Error, AnalyticsSeriesInput, unknown>;
|
|
110
|
+
type UseClearSeriesBySourceOptions = Omit<UseMutationOptions<number, Error, {
|
|
111
|
+
source: AnalyticsPath;
|
|
112
|
+
cleanUpDimensions?: boolean;
|
|
113
|
+
}>, "mutationKey" | "mutationFn">;
|
|
114
|
+
declare function useClearSeriesBySource(options?: UseClearSeriesBySourceOptions): _tanstack_react_query0.UseMutationResult<number, Error, {
|
|
115
|
+
source: AnalyticsPath;
|
|
116
|
+
cleanUpDimensions?: boolean;
|
|
117
|
+
}, unknown>;
|
|
118
|
+
type UseClearEmptyAnalyticsDimensionsOptions = Omit<UseMutationOptions<number>, "mutationKey" | "mutationFn">;
|
|
119
|
+
declare function useClearEmptyAnalyticsDimensions(options?: UseClearEmptyAnalyticsDimensionsOptions): _tanstack_react_query0.UseMutationResult<number, Error, void, unknown>;
|
|
120
|
+
type UseAddSeriesValuesOptions = Omit<UseMutationOptions<void, Error, AnalyticsSeriesInput[]>, "mutationKey" | "mutationFn">;
|
|
121
|
+
declare function useAddSeriesValues(options?: UseAddSeriesValuesOptions): _tanstack_react_query0.UseMutationResult<void, Error, AnalyticsSeriesInput[], unknown>;
|
|
122
|
+
type UseGetDimensionsOptions<TData> = Omit<UseQueryOptions<any, Error, TData>, "queryKey" | "queryFn">;
|
|
123
|
+
declare function useGetDimensions<TData = any>(options?: UseGetDimensionsOptions<TData>): UseQueryResult<_tanstack_react_query0.NoInfer<TData>, Error>;
|
|
124
|
+
type UseMatchingSeriesOptions = Omit<UseQueryOptions<AnalyticsSeries[], Error, AnalyticsSeries[]>, "queryKey" | "queryFn">;
|
|
125
|
+
declare function useMatchingSeries(query: AnalyticsSeriesQuery, options?: UseMatchingSeriesOptions): UseQueryResult<AnalyticsSeries[], Error>;
|
|
126
|
+
type UseQuerySourcesOptions = Omit<UseQueryOptions<AnalyticsPath[] | undefined>, "queryKey" | "queryFn">;
|
|
127
|
+
declare function useQuerySources(query: AnalyticsSeriesQuery, options?: UseQuerySourcesOptions): UseQueryResult<AnalyticsPath[] | undefined, Error>;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/analytics/hooks/document-timeline.d.ts
|
|
130
|
+
declare function useDocumentTimeline(documentId?: string): ({
|
|
131
|
+
id: string;
|
|
132
|
+
type: "bar";
|
|
133
|
+
addSize: 0 | 1 | 2 | 3 | 4;
|
|
134
|
+
delSize: 0 | 1 | 2 | 3 | 4;
|
|
135
|
+
additions: number;
|
|
136
|
+
deletions: number;
|
|
137
|
+
timestampUtcMs: string;
|
|
138
|
+
startDate: Date;
|
|
139
|
+
endDate: Date;
|
|
140
|
+
revision?: number;
|
|
141
|
+
} | {
|
|
142
|
+
id: string;
|
|
143
|
+
type: "divider";
|
|
144
|
+
revision?: number;
|
|
145
|
+
startDate?: Date;
|
|
146
|
+
endDate?: Date;
|
|
147
|
+
})[];
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/analytics/hooks/timeline-items.d.ts
|
|
150
|
+
type BarItem = {
|
|
151
|
+
id: string;
|
|
152
|
+
type: "bar";
|
|
153
|
+
addSize: 0 | 1 | 2 | 3 | 4;
|
|
154
|
+
delSize: 0 | 1 | 2 | 3 | 4;
|
|
155
|
+
additions: number;
|
|
156
|
+
deletions: number;
|
|
157
|
+
timestampUtcMs: string;
|
|
158
|
+
startDate: Date;
|
|
159
|
+
endDate: Date;
|
|
160
|
+
revision?: number;
|
|
161
|
+
};
|
|
162
|
+
type DividerItem = {
|
|
163
|
+
id: string;
|
|
164
|
+
type: "divider";
|
|
165
|
+
revision?: number;
|
|
166
|
+
startDate?: Date;
|
|
167
|
+
endDate?: Date;
|
|
168
|
+
};
|
|
169
|
+
type TimelineItem$1 = BarItem | DividerItem;
|
|
170
|
+
type UseTimelineItemsResult = UseAnalyticsQueryResult<TimelineItem$1[]>;
|
|
171
|
+
declare const useTimelineItems: (documentId?: string, startTimestamp?: string, driveId?: string) => UseTimelineItemsResult;
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/analytics/types.d.ts
|
|
174
|
+
type IAnalyticsStoreOptions = BrowserAnalyticsStoreOptions;
|
|
175
|
+
type IPowerhouseAnalytics = {
|
|
176
|
+
store: IAnalyticsStore;
|
|
177
|
+
engine: AnalyticsQueryEngine;
|
|
178
|
+
options: IAnalyticsStoreOptions;
|
|
179
|
+
};
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/constants.d.ts
|
|
182
|
+
declare const DEFAULT_DRIVE_EDITOR_ID = "powerhouse/generic-drive-explorer";
|
|
183
|
+
declare const COMMON_PACKAGE_ID = "powerhouse/common";
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region src/types/documents.d.ts
|
|
186
|
+
type DocumentDispatch<TAction extends Action> = (actionOrActions: TAction | TAction[] | DocumentAction | DocumentAction[] | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void) => void;
|
|
187
|
+
type PromiseWithState<T> = Promise<T> & PromiseState<T>;
|
|
188
|
+
type FulfilledPromise<T> = Promise<T> & {
|
|
189
|
+
status: "fulfilled";
|
|
190
|
+
value: T;
|
|
191
|
+
};
|
|
192
|
+
type RejectedPromise<T> = Promise<T> & {
|
|
193
|
+
status: "rejected";
|
|
194
|
+
reason: unknown;
|
|
195
|
+
};
|
|
196
|
+
type PromiseState<T> = {
|
|
197
|
+
status: "pending";
|
|
198
|
+
} | {
|
|
199
|
+
status: "fulfilled";
|
|
200
|
+
value: T;
|
|
201
|
+
} | {
|
|
202
|
+
status: "rejected";
|
|
203
|
+
reason: unknown;
|
|
204
|
+
};
|
|
205
|
+
interface IDocumentCache {
|
|
206
|
+
get(id: string, refetch?: boolean): Promise<PHDocument$1>;
|
|
207
|
+
getBatch(ids: string[], refetch?: boolean): Promise<PHDocument$1[]>;
|
|
208
|
+
subscribe(id: string | string[], callback: () => void): () => void;
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/document-cache.d.ts
|
|
212
|
+
declare function addPromiseState<T>(promise: Promise<T>): PromiseWithState<T>;
|
|
213
|
+
declare function readPromiseState<T>(promise: Promise<T> | PromiseWithState<T>): PromiseState<T>;
|
|
214
|
+
/**
|
|
215
|
+
* Document cache implementation that uses the new ReactorClient API.
|
|
216
|
+
*
|
|
217
|
+
* This cache subscribes to document change events via IReactorClient.subscribe()
|
|
218
|
+
* and automatically updates the cache when documents are created, updated, or deleted.
|
|
219
|
+
*/
|
|
220
|
+
declare class DocumentCache implements IDocumentCache {
|
|
221
|
+
private client;
|
|
222
|
+
private documents;
|
|
223
|
+
private batchPromises;
|
|
224
|
+
private listeners;
|
|
225
|
+
private unsubscribe;
|
|
226
|
+
constructor(client: IReactorClient);
|
|
227
|
+
private handleDocumentChange;
|
|
228
|
+
private handleDocumentDeleted;
|
|
229
|
+
private handleDocumentUpdated;
|
|
230
|
+
private invalidateBatchesContaining;
|
|
231
|
+
get(id: string, refetch?: boolean): Promise<PHDocument$1>;
|
|
232
|
+
getBatch(ids: string[]): Promise<PHDocument$1[]>;
|
|
233
|
+
subscribe(id: string | string[], callback: () => void): () => void;
|
|
234
|
+
/**
|
|
235
|
+
* Disposes of the cache and unsubscribes from document change events.
|
|
236
|
+
*/
|
|
237
|
+
dispose(): void;
|
|
238
|
+
}
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/document-model.d.ts
|
|
241
|
+
declare const baseDocumentModelsMap: Record<string, DocumentModelModule<DocumentModelPHState>>;
|
|
242
|
+
declare const baseDocumentModels: DocumentModelModule<DocumentModelPHState>[];
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/global/types.d.ts
|
|
245
|
+
interface PGliteState {
|
|
246
|
+
db: PGliteWithLive | null;
|
|
247
|
+
isLoading: boolean;
|
|
248
|
+
error: Error | null;
|
|
249
|
+
}
|
|
250
|
+
interface PowerhouseGlobal {
|
|
251
|
+
analytics?: Promise<IPowerhouseAnalytics>;
|
|
252
|
+
pglite?: PGliteState;
|
|
253
|
+
}
|
|
254
|
+
declare global {
|
|
255
|
+
interface Window {
|
|
256
|
+
powerhouse?: PowerhouseGlobal;
|
|
257
|
+
}
|
|
258
|
+
} //# sourceMappingURL=types.d.ts.map
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/global/core.d.ts
|
|
261
|
+
declare function getGlobal<K extends keyof PowerhouseGlobal>(namespace: K): PowerhouseGlobal[K] | undefined;
|
|
262
|
+
declare function setGlobal<K extends keyof PowerhouseGlobal>(namespace: K, value: PowerhouseGlobal[K]): void;
|
|
263
|
+
declare function clearGlobal(namespace: keyof PowerhouseGlobal): void;
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/graphql/gen/schema.d.ts
|
|
266
|
+
type InputMaybe<T> = T | null | undefined;
|
|
267
|
+
type Exact<T extends {
|
|
268
|
+
[key: string]: unknown;
|
|
269
|
+
}> = { [K in keyof T]: T[K] };
|
|
270
|
+
type GraphQLClientRequestHeaders = RequestOptions["requestHeaders"];
|
|
271
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
272
|
+
type Scalars = {
|
|
273
|
+
ID: {
|
|
274
|
+
input: string;
|
|
275
|
+
output: string;
|
|
276
|
+
};
|
|
277
|
+
String: {
|
|
278
|
+
input: string;
|
|
279
|
+
output: string;
|
|
280
|
+
};
|
|
281
|
+
Boolean: {
|
|
282
|
+
input: boolean;
|
|
283
|
+
output: boolean;
|
|
284
|
+
};
|
|
285
|
+
Int: {
|
|
286
|
+
input: number;
|
|
287
|
+
output: number;
|
|
288
|
+
};
|
|
289
|
+
Float: {
|
|
290
|
+
input: number;
|
|
291
|
+
output: number;
|
|
292
|
+
};
|
|
293
|
+
DateTime: {
|
|
294
|
+
input: string | Date;
|
|
295
|
+
output: string | Date;
|
|
296
|
+
};
|
|
297
|
+
JSONObject: {
|
|
298
|
+
input: NonNullable<unknown>;
|
|
299
|
+
output: NonNullable<unknown>;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
type ActionContextInput = {
|
|
303
|
+
readonly signer?: InputMaybe<ReactorSignerInput>;
|
|
304
|
+
};
|
|
305
|
+
type ActionInput = {
|
|
306
|
+
readonly attachments?: InputMaybe<ReadonlyArray<AttachmentInput>>;
|
|
307
|
+
readonly context?: InputMaybe<ActionContextInput>;
|
|
308
|
+
readonly id: Scalars["String"]["input"];
|
|
309
|
+
readonly input: Scalars["JSONObject"]["input"];
|
|
310
|
+
readonly scope: Scalars["String"]["input"];
|
|
311
|
+
readonly timestampUtcMs: Scalars["String"]["input"];
|
|
312
|
+
readonly type: Scalars["String"]["input"];
|
|
313
|
+
};
|
|
314
|
+
type AttachmentInput = {
|
|
315
|
+
readonly data: Scalars["String"]["input"];
|
|
316
|
+
readonly extension?: InputMaybe<Scalars["String"]["input"]>;
|
|
317
|
+
readonly fileName?: InputMaybe<Scalars["String"]["input"]>;
|
|
318
|
+
readonly hash: Scalars["String"]["input"];
|
|
319
|
+
readonly mimeType: Scalars["String"]["input"];
|
|
320
|
+
};
|
|
321
|
+
type ChannelMetaInput = {
|
|
322
|
+
readonly id: Scalars["String"]["input"];
|
|
323
|
+
};
|
|
324
|
+
declare enum DocumentChangeType$2 {
|
|
325
|
+
ChildAdded = "CHILD_ADDED",
|
|
326
|
+
ChildRemoved = "CHILD_REMOVED",
|
|
327
|
+
Created = "CREATED",
|
|
328
|
+
Deleted = "DELETED",
|
|
329
|
+
ParentAdded = "PARENT_ADDED",
|
|
330
|
+
ParentRemoved = "PARENT_REMOVED",
|
|
331
|
+
Updated = "UPDATED"
|
|
332
|
+
}
|
|
333
|
+
type DocumentOperationsFilterInput = {
|
|
334
|
+
readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
335
|
+
readonly branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
336
|
+
readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
337
|
+
readonly sinceRevision?: InputMaybe<Scalars["Int"]["input"]>;
|
|
338
|
+
readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
|
|
339
|
+
readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
|
|
340
|
+
};
|
|
341
|
+
type OperationContextInput = {
|
|
342
|
+
readonly branch: Scalars["String"]["input"];
|
|
343
|
+
readonly documentId: Scalars["String"]["input"];
|
|
344
|
+
readonly documentType: Scalars["String"]["input"];
|
|
345
|
+
readonly ordinal: Scalars["Int"]["input"];
|
|
346
|
+
readonly scope: Scalars["String"]["input"];
|
|
347
|
+
};
|
|
348
|
+
type OperationInput = {
|
|
349
|
+
readonly action: ActionInput;
|
|
350
|
+
readonly error?: InputMaybe<Scalars["String"]["input"]>;
|
|
351
|
+
readonly hash: Scalars["String"]["input"];
|
|
352
|
+
readonly id?: InputMaybe<Scalars["String"]["input"]>;
|
|
353
|
+
readonly index: Scalars["Int"]["input"];
|
|
354
|
+
readonly skip: Scalars["Int"]["input"];
|
|
355
|
+
readonly timestampUtcMs: Scalars["String"]["input"];
|
|
356
|
+
};
|
|
357
|
+
type OperationWithContextInput = {
|
|
358
|
+
readonly context: OperationContextInput;
|
|
359
|
+
readonly operation: OperationInput;
|
|
360
|
+
};
|
|
361
|
+
type OperationsFilterInput = {
|
|
362
|
+
readonly actionTypes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
363
|
+
readonly branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
364
|
+
readonly documentId: Scalars["String"]["input"];
|
|
365
|
+
readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
366
|
+
readonly sinceRevision?: InputMaybe<Scalars["Int"]["input"]>;
|
|
367
|
+
readonly timestampFrom?: InputMaybe<Scalars["String"]["input"]>;
|
|
368
|
+
readonly timestampTo?: InputMaybe<Scalars["String"]["input"]>;
|
|
369
|
+
};
|
|
370
|
+
type PagingInput = {
|
|
371
|
+
readonly cursor?: InputMaybe<Scalars["String"]["input"]>;
|
|
372
|
+
readonly limit?: InputMaybe<Scalars["Int"]["input"]>;
|
|
373
|
+
readonly offset?: InputMaybe<Scalars["Int"]["input"]>;
|
|
374
|
+
};
|
|
375
|
+
declare enum PropagationMode {
|
|
376
|
+
Cascade = "CASCADE",
|
|
377
|
+
Orphan = "ORPHAN"
|
|
378
|
+
}
|
|
379
|
+
type ReactorSignerAppInput = {
|
|
380
|
+
readonly key: Scalars["String"]["input"];
|
|
381
|
+
readonly name: Scalars["String"]["input"];
|
|
382
|
+
};
|
|
383
|
+
type ReactorSignerInput = {
|
|
384
|
+
readonly app?: InputMaybe<ReactorSignerAppInput>;
|
|
385
|
+
readonly signatures: ReadonlyArray<Scalars["String"]["input"]>;
|
|
386
|
+
readonly user?: InputMaybe<ReactorSignerUserInput>;
|
|
387
|
+
};
|
|
388
|
+
type ReactorSignerUserInput = {
|
|
389
|
+
readonly address: Scalars["String"]["input"];
|
|
390
|
+
readonly chainId: Scalars["Int"]["input"];
|
|
391
|
+
readonly networkId: Scalars["String"]["input"];
|
|
392
|
+
};
|
|
393
|
+
type RemoteCursorInput = {
|
|
394
|
+
readonly cursorOrdinal: Scalars["Int"]["input"];
|
|
395
|
+
readonly lastSyncedAtUtcMs?: InputMaybe<Scalars["String"]["input"]>;
|
|
396
|
+
readonly remoteName: Scalars["String"]["input"];
|
|
397
|
+
};
|
|
398
|
+
type RemoteFilterInput = {
|
|
399
|
+
readonly branch: Scalars["String"]["input"];
|
|
400
|
+
readonly documentId: ReadonlyArray<Scalars["String"]["input"]>;
|
|
401
|
+
readonly scope: ReadonlyArray<Scalars["String"]["input"]>;
|
|
402
|
+
};
|
|
403
|
+
type SearchFilterInput = {
|
|
404
|
+
readonly identifiers?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
405
|
+
readonly parentId?: InputMaybe<Scalars["String"]["input"]>;
|
|
406
|
+
readonly type?: InputMaybe<Scalars["String"]["input"]>;
|
|
407
|
+
};
|
|
408
|
+
type SyncEnvelopeInput = {
|
|
409
|
+
readonly channelMeta: ChannelMetaInput;
|
|
410
|
+
readonly cursor?: InputMaybe<RemoteCursorInput>;
|
|
411
|
+
readonly dependsOn?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
412
|
+
readonly key?: InputMaybe<Scalars["String"]["input"]>;
|
|
413
|
+
readonly operations?: InputMaybe<ReadonlyArray<OperationWithContextInput>>;
|
|
414
|
+
readonly type: SyncEnvelopeType;
|
|
415
|
+
};
|
|
416
|
+
declare enum SyncEnvelopeType {
|
|
417
|
+
Ack = "ACK",
|
|
418
|
+
Operations = "OPERATIONS"
|
|
419
|
+
}
|
|
420
|
+
type TouchChannelInput = {
|
|
421
|
+
readonly collectionId: Scalars["String"]["input"];
|
|
422
|
+
readonly filter: RemoteFilterInput;
|
|
423
|
+
readonly id: Scalars["String"]["input"];
|
|
424
|
+
readonly name: Scalars["String"]["input"];
|
|
425
|
+
readonly sinceTimestampUtcMs: Scalars["String"]["input"];
|
|
426
|
+
};
|
|
427
|
+
type ViewFilterInput = {
|
|
428
|
+
readonly branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
429
|
+
readonly scopes?: InputMaybe<ReadonlyArray<Scalars["String"]["input"]>>;
|
|
430
|
+
};
|
|
431
|
+
type PhDocumentFieldsFragment = {
|
|
432
|
+
readonly id: string;
|
|
433
|
+
readonly slug?: string | null | undefined;
|
|
434
|
+
readonly name: string;
|
|
435
|
+
readonly documentType: string;
|
|
436
|
+
readonly state: NonNullable<unknown>;
|
|
437
|
+
readonly createdAtUtcIso: string | Date;
|
|
438
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
439
|
+
readonly revisionsList: ReadonlyArray<{
|
|
440
|
+
readonly scope: string;
|
|
441
|
+
readonly revision: number;
|
|
442
|
+
}>;
|
|
443
|
+
};
|
|
444
|
+
type GetDocumentModelsQueryVariables = Exact<{
|
|
445
|
+
namespace?: InputMaybe<Scalars["String"]["input"]>;
|
|
446
|
+
paging?: InputMaybe<PagingInput>;
|
|
447
|
+
}>;
|
|
448
|
+
type GetDocumentModelsQuery = {
|
|
449
|
+
readonly documentModels: {
|
|
450
|
+
readonly totalCount: number;
|
|
451
|
+
readonly hasNextPage: boolean;
|
|
452
|
+
readonly hasPreviousPage: boolean;
|
|
453
|
+
readonly cursor?: string | null | undefined;
|
|
454
|
+
readonly items: ReadonlyArray<{
|
|
455
|
+
readonly id: string;
|
|
456
|
+
readonly name: string;
|
|
457
|
+
readonly namespace?: string | null | undefined;
|
|
458
|
+
readonly version?: string | null | undefined;
|
|
459
|
+
readonly specification: NonNullable<unknown>;
|
|
460
|
+
}>;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
type GetDocumentQueryVariables = Exact<{
|
|
464
|
+
identifier: Scalars["String"]["input"];
|
|
465
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
466
|
+
}>;
|
|
467
|
+
type GetDocumentQuery = {
|
|
468
|
+
readonly document?: {
|
|
469
|
+
readonly childIds: ReadonlyArray<string>;
|
|
470
|
+
readonly document: {
|
|
471
|
+
readonly id: string;
|
|
472
|
+
readonly slug?: string | null | undefined;
|
|
473
|
+
readonly name: string;
|
|
474
|
+
readonly documentType: string;
|
|
475
|
+
readonly state: NonNullable<unknown>;
|
|
476
|
+
readonly createdAtUtcIso: string | Date;
|
|
477
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
478
|
+
readonly revisionsList: ReadonlyArray<{
|
|
479
|
+
readonly scope: string;
|
|
480
|
+
readonly revision: number;
|
|
481
|
+
}>;
|
|
482
|
+
};
|
|
483
|
+
} | null | undefined;
|
|
484
|
+
};
|
|
485
|
+
type GetDocumentWithOperationsQueryVariables = Exact<{
|
|
486
|
+
identifier: Scalars["String"]["input"];
|
|
487
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
488
|
+
operationsFilter?: InputMaybe<DocumentOperationsFilterInput>;
|
|
489
|
+
operationsPaging?: InputMaybe<PagingInput>;
|
|
490
|
+
}>;
|
|
491
|
+
type GetDocumentWithOperationsQuery = {
|
|
492
|
+
readonly document?: {
|
|
493
|
+
readonly childIds: ReadonlyArray<string>;
|
|
494
|
+
readonly document: {
|
|
495
|
+
readonly id: string;
|
|
496
|
+
readonly slug?: string | null | undefined;
|
|
497
|
+
readonly name: string;
|
|
498
|
+
readonly documentType: string;
|
|
499
|
+
readonly state: NonNullable<unknown>;
|
|
500
|
+
readonly createdAtUtcIso: string | Date;
|
|
501
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
502
|
+
readonly operations?: {
|
|
503
|
+
readonly totalCount: number;
|
|
504
|
+
readonly hasNextPage: boolean;
|
|
505
|
+
readonly hasPreviousPage: boolean;
|
|
506
|
+
readonly cursor?: string | null | undefined;
|
|
507
|
+
readonly items: ReadonlyArray<{
|
|
508
|
+
readonly index: number;
|
|
509
|
+
readonly timestampUtcMs: string;
|
|
510
|
+
readonly hash: string;
|
|
511
|
+
readonly skip: number;
|
|
512
|
+
readonly error?: string | null | undefined;
|
|
513
|
+
readonly id?: string | null | undefined;
|
|
514
|
+
readonly action: {
|
|
515
|
+
readonly id: string;
|
|
516
|
+
readonly type: string;
|
|
517
|
+
readonly timestampUtcMs: string;
|
|
518
|
+
readonly input: NonNullable<unknown>;
|
|
519
|
+
readonly scope: string;
|
|
520
|
+
readonly attachments?: ReadonlyArray<{
|
|
521
|
+
readonly data: string;
|
|
522
|
+
readonly mimeType: string;
|
|
523
|
+
readonly hash: string;
|
|
524
|
+
readonly extension?: string | null | undefined;
|
|
525
|
+
readonly fileName?: string | null | undefined;
|
|
526
|
+
}> | null | undefined;
|
|
527
|
+
readonly context?: {
|
|
528
|
+
readonly signer?: {
|
|
529
|
+
readonly signatures: ReadonlyArray<string>;
|
|
530
|
+
readonly user?: {
|
|
531
|
+
readonly address: string;
|
|
532
|
+
readonly networkId: string;
|
|
533
|
+
readonly chainId: number;
|
|
534
|
+
} | null | undefined;
|
|
535
|
+
readonly app?: {
|
|
536
|
+
readonly name: string;
|
|
537
|
+
readonly key: string;
|
|
538
|
+
} | null | undefined;
|
|
539
|
+
} | null | undefined;
|
|
540
|
+
} | null | undefined;
|
|
541
|
+
};
|
|
542
|
+
}>;
|
|
543
|
+
} | null | undefined;
|
|
544
|
+
readonly revisionsList: ReadonlyArray<{
|
|
545
|
+
readonly scope: string;
|
|
546
|
+
readonly revision: number;
|
|
547
|
+
}>;
|
|
548
|
+
};
|
|
549
|
+
} | null | undefined;
|
|
550
|
+
};
|
|
551
|
+
type GetDocumentChildrenQueryVariables = Exact<{
|
|
552
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
553
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
554
|
+
paging?: InputMaybe<PagingInput>;
|
|
555
|
+
}>;
|
|
556
|
+
type GetDocumentChildrenQuery = {
|
|
557
|
+
readonly documentChildren: {
|
|
558
|
+
readonly totalCount: number;
|
|
559
|
+
readonly hasNextPage: boolean;
|
|
560
|
+
readonly hasPreviousPage: boolean;
|
|
561
|
+
readonly cursor?: string | null | undefined;
|
|
562
|
+
readonly items: ReadonlyArray<{
|
|
563
|
+
readonly id: string;
|
|
564
|
+
readonly slug?: string | null | undefined;
|
|
565
|
+
readonly name: string;
|
|
566
|
+
readonly documentType: string;
|
|
567
|
+
readonly state: NonNullable<unknown>;
|
|
568
|
+
readonly createdAtUtcIso: string | Date;
|
|
569
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
570
|
+
readonly revisionsList: ReadonlyArray<{
|
|
571
|
+
readonly scope: string;
|
|
572
|
+
readonly revision: number;
|
|
573
|
+
}>;
|
|
574
|
+
}>;
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
type GetDocumentParentsQueryVariables = Exact<{
|
|
578
|
+
childIdentifier: Scalars["String"]["input"];
|
|
579
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
580
|
+
paging?: InputMaybe<PagingInput>;
|
|
581
|
+
}>;
|
|
582
|
+
type GetDocumentParentsQuery = {
|
|
583
|
+
readonly documentParents: {
|
|
584
|
+
readonly totalCount: number;
|
|
585
|
+
readonly hasNextPage: boolean;
|
|
586
|
+
readonly hasPreviousPage: boolean;
|
|
587
|
+
readonly cursor?: string | null | undefined;
|
|
588
|
+
readonly items: ReadonlyArray<{
|
|
589
|
+
readonly id: string;
|
|
590
|
+
readonly slug?: string | null | undefined;
|
|
591
|
+
readonly name: string;
|
|
592
|
+
readonly documentType: string;
|
|
593
|
+
readonly state: NonNullable<unknown>;
|
|
594
|
+
readonly createdAtUtcIso: string | Date;
|
|
595
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
596
|
+
readonly revisionsList: ReadonlyArray<{
|
|
597
|
+
readonly scope: string;
|
|
598
|
+
readonly revision: number;
|
|
599
|
+
}>;
|
|
600
|
+
}>;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
type FindDocumentsQueryVariables = Exact<{
|
|
604
|
+
search: SearchFilterInput;
|
|
605
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
606
|
+
paging?: InputMaybe<PagingInput>;
|
|
607
|
+
}>;
|
|
608
|
+
type FindDocumentsQuery = {
|
|
609
|
+
readonly findDocuments: {
|
|
610
|
+
readonly totalCount: number;
|
|
611
|
+
readonly hasNextPage: boolean;
|
|
612
|
+
readonly hasPreviousPage: boolean;
|
|
613
|
+
readonly cursor?: string | null | undefined;
|
|
614
|
+
readonly items: ReadonlyArray<{
|
|
615
|
+
readonly id: string;
|
|
616
|
+
readonly slug?: string | null | undefined;
|
|
617
|
+
readonly name: string;
|
|
618
|
+
readonly documentType: string;
|
|
619
|
+
readonly state: NonNullable<unknown>;
|
|
620
|
+
readonly createdAtUtcIso: string | Date;
|
|
621
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
622
|
+
readonly revisionsList: ReadonlyArray<{
|
|
623
|
+
readonly scope: string;
|
|
624
|
+
readonly revision: number;
|
|
625
|
+
}>;
|
|
626
|
+
}>;
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
type GetDocumentOperationsQueryVariables = Exact<{
|
|
630
|
+
filter: OperationsFilterInput;
|
|
631
|
+
paging?: InputMaybe<PagingInput>;
|
|
632
|
+
}>;
|
|
633
|
+
type GetDocumentOperationsQuery = {
|
|
634
|
+
readonly documentOperations: {
|
|
635
|
+
readonly totalCount: number;
|
|
636
|
+
readonly hasNextPage: boolean;
|
|
637
|
+
readonly hasPreviousPage: boolean;
|
|
638
|
+
readonly cursor?: string | null | undefined;
|
|
639
|
+
readonly items: ReadonlyArray<{
|
|
640
|
+
readonly index: number;
|
|
641
|
+
readonly timestampUtcMs: string;
|
|
642
|
+
readonly hash: string;
|
|
643
|
+
readonly skip: number;
|
|
644
|
+
readonly error?: string | null | undefined;
|
|
645
|
+
readonly id?: string | null | undefined;
|
|
646
|
+
readonly action: {
|
|
647
|
+
readonly id: string;
|
|
648
|
+
readonly type: string;
|
|
649
|
+
readonly timestampUtcMs: string;
|
|
650
|
+
readonly input: NonNullable<unknown>;
|
|
651
|
+
readonly scope: string;
|
|
652
|
+
readonly attachments?: ReadonlyArray<{
|
|
653
|
+
readonly data: string;
|
|
654
|
+
readonly mimeType: string;
|
|
655
|
+
readonly hash: string;
|
|
656
|
+
readonly extension?: string | null | undefined;
|
|
657
|
+
readonly fileName?: string | null | undefined;
|
|
658
|
+
}> | null | undefined;
|
|
659
|
+
readonly context?: {
|
|
660
|
+
readonly signer?: {
|
|
661
|
+
readonly signatures: ReadonlyArray<string>;
|
|
662
|
+
readonly user?: {
|
|
663
|
+
readonly address: string;
|
|
664
|
+
readonly networkId: string;
|
|
665
|
+
readonly chainId: number;
|
|
666
|
+
} | null | undefined;
|
|
667
|
+
readonly app?: {
|
|
668
|
+
readonly name: string;
|
|
669
|
+
readonly key: string;
|
|
670
|
+
} | null | undefined;
|
|
671
|
+
} | null | undefined;
|
|
672
|
+
} | null | undefined;
|
|
673
|
+
};
|
|
674
|
+
}>;
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
type GetJobStatusQueryVariables = Exact<{
|
|
678
|
+
jobId: Scalars["String"]["input"];
|
|
679
|
+
}>;
|
|
680
|
+
type GetJobStatusQuery = {
|
|
681
|
+
readonly jobStatus?: {
|
|
682
|
+
readonly id: string;
|
|
683
|
+
readonly status: string;
|
|
684
|
+
readonly result: NonNullable<unknown>;
|
|
685
|
+
readonly error?: string | null | undefined;
|
|
686
|
+
readonly createdAt: string | Date;
|
|
687
|
+
readonly completedAt?: string | Date | null | undefined;
|
|
688
|
+
} | null | undefined;
|
|
689
|
+
};
|
|
690
|
+
type CreateDocumentMutationVariables = Exact<{
|
|
691
|
+
document: Scalars["JSONObject"]["input"];
|
|
692
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
693
|
+
}>;
|
|
694
|
+
type CreateDocumentMutation = {
|
|
695
|
+
readonly createDocument: {
|
|
696
|
+
readonly id: string;
|
|
697
|
+
readonly slug?: string | null | undefined;
|
|
698
|
+
readonly name: string;
|
|
699
|
+
readonly documentType: string;
|
|
700
|
+
readonly state: NonNullable<unknown>;
|
|
701
|
+
readonly createdAtUtcIso: string | Date;
|
|
702
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
703
|
+
readonly revisionsList: ReadonlyArray<{
|
|
704
|
+
readonly scope: string;
|
|
705
|
+
readonly revision: number;
|
|
706
|
+
}>;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
type CreateEmptyDocumentMutationVariables = Exact<{
|
|
710
|
+
documentType: Scalars["String"]["input"];
|
|
711
|
+
parentIdentifier?: InputMaybe<Scalars["String"]["input"]>;
|
|
712
|
+
}>;
|
|
713
|
+
type CreateEmptyDocumentMutation = {
|
|
714
|
+
readonly createEmptyDocument: {
|
|
715
|
+
readonly id: string;
|
|
716
|
+
readonly slug?: string | null | undefined;
|
|
717
|
+
readonly name: string;
|
|
718
|
+
readonly documentType: string;
|
|
719
|
+
readonly state: NonNullable<unknown>;
|
|
720
|
+
readonly createdAtUtcIso: string | Date;
|
|
721
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
722
|
+
readonly revisionsList: ReadonlyArray<{
|
|
723
|
+
readonly scope: string;
|
|
724
|
+
readonly revision: number;
|
|
725
|
+
}>;
|
|
726
|
+
};
|
|
727
|
+
};
|
|
728
|
+
type MutateDocumentMutationVariables = Exact<{
|
|
729
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
730
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
731
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
732
|
+
}>;
|
|
733
|
+
type MutateDocumentMutation = {
|
|
734
|
+
readonly mutateDocument: {
|
|
735
|
+
readonly id: string;
|
|
736
|
+
readonly slug?: string | null | undefined;
|
|
737
|
+
readonly name: string;
|
|
738
|
+
readonly documentType: string;
|
|
739
|
+
readonly state: NonNullable<unknown>;
|
|
740
|
+
readonly createdAtUtcIso: string | Date;
|
|
741
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
742
|
+
readonly revisionsList: ReadonlyArray<{
|
|
743
|
+
readonly scope: string;
|
|
744
|
+
readonly revision: number;
|
|
745
|
+
}>;
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
type MutateDocumentAsyncMutationVariables = Exact<{
|
|
749
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
750
|
+
actions: ReadonlyArray<Scalars["JSONObject"]["input"]>;
|
|
751
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
752
|
+
}>;
|
|
753
|
+
type MutateDocumentAsyncMutation = {
|
|
754
|
+
readonly mutateDocumentAsync: string;
|
|
755
|
+
};
|
|
756
|
+
type RenameDocumentMutationVariables = Exact<{
|
|
757
|
+
documentIdentifier: Scalars["String"]["input"];
|
|
758
|
+
name: Scalars["String"]["input"];
|
|
759
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
760
|
+
}>;
|
|
761
|
+
type RenameDocumentMutation = {
|
|
762
|
+
readonly renameDocument: {
|
|
763
|
+
readonly id: string;
|
|
764
|
+
readonly slug?: string | null | undefined;
|
|
765
|
+
readonly name: string;
|
|
766
|
+
readonly documentType: string;
|
|
767
|
+
readonly state: NonNullable<unknown>;
|
|
768
|
+
readonly createdAtUtcIso: string | Date;
|
|
769
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
770
|
+
readonly revisionsList: ReadonlyArray<{
|
|
771
|
+
readonly scope: string;
|
|
772
|
+
readonly revision: number;
|
|
773
|
+
}>;
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
type AddChildrenMutationVariables = Exact<{
|
|
777
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
778
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
779
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
780
|
+
}>;
|
|
781
|
+
type AddChildrenMutation = {
|
|
782
|
+
readonly addChildren: {
|
|
783
|
+
readonly id: string;
|
|
784
|
+
readonly slug?: string | null | undefined;
|
|
785
|
+
readonly name: string;
|
|
786
|
+
readonly documentType: string;
|
|
787
|
+
readonly state: NonNullable<unknown>;
|
|
788
|
+
readonly createdAtUtcIso: string | Date;
|
|
789
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
790
|
+
readonly revisionsList: ReadonlyArray<{
|
|
791
|
+
readonly scope: string;
|
|
792
|
+
readonly revision: number;
|
|
793
|
+
}>;
|
|
794
|
+
};
|
|
795
|
+
};
|
|
796
|
+
type RemoveChildrenMutationVariables = Exact<{
|
|
797
|
+
parentIdentifier: Scalars["String"]["input"];
|
|
798
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
799
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
800
|
+
}>;
|
|
801
|
+
type RemoveChildrenMutation = {
|
|
802
|
+
readonly removeChildren: {
|
|
803
|
+
readonly id: string;
|
|
804
|
+
readonly slug?: string | null | undefined;
|
|
805
|
+
readonly name: string;
|
|
806
|
+
readonly documentType: string;
|
|
807
|
+
readonly state: NonNullable<unknown>;
|
|
808
|
+
readonly createdAtUtcIso: string | Date;
|
|
809
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
810
|
+
readonly revisionsList: ReadonlyArray<{
|
|
811
|
+
readonly scope: string;
|
|
812
|
+
readonly revision: number;
|
|
813
|
+
}>;
|
|
814
|
+
};
|
|
815
|
+
};
|
|
816
|
+
type MoveChildrenMutationVariables = Exact<{
|
|
817
|
+
sourceParentIdentifier: Scalars["String"]["input"];
|
|
818
|
+
targetParentIdentifier: Scalars["String"]["input"];
|
|
819
|
+
documentIdentifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
820
|
+
branch?: InputMaybe<Scalars["String"]["input"]>;
|
|
821
|
+
}>;
|
|
822
|
+
type MoveChildrenMutation = {
|
|
823
|
+
readonly moveChildren: {
|
|
824
|
+
readonly source: {
|
|
825
|
+
readonly id: string;
|
|
826
|
+
readonly slug?: string | null | undefined;
|
|
827
|
+
readonly name: string;
|
|
828
|
+
readonly documentType: string;
|
|
829
|
+
readonly state: NonNullable<unknown>;
|
|
830
|
+
readonly createdAtUtcIso: string | Date;
|
|
831
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
832
|
+
readonly revisionsList: ReadonlyArray<{
|
|
833
|
+
readonly scope: string;
|
|
834
|
+
readonly revision: number;
|
|
835
|
+
}>;
|
|
836
|
+
};
|
|
837
|
+
readonly target: {
|
|
838
|
+
readonly id: string;
|
|
839
|
+
readonly slug?: string | null | undefined;
|
|
840
|
+
readonly name: string;
|
|
841
|
+
readonly documentType: string;
|
|
842
|
+
readonly state: NonNullable<unknown>;
|
|
843
|
+
readonly createdAtUtcIso: string | Date;
|
|
844
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
845
|
+
readonly revisionsList: ReadonlyArray<{
|
|
846
|
+
readonly scope: string;
|
|
847
|
+
readonly revision: number;
|
|
848
|
+
}>;
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
type DeleteDocumentMutationVariables = Exact<{
|
|
853
|
+
identifier: Scalars["String"]["input"];
|
|
854
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
855
|
+
}>;
|
|
856
|
+
type DeleteDocumentMutation = {
|
|
857
|
+
readonly deleteDocument: boolean;
|
|
858
|
+
};
|
|
859
|
+
type DeleteDocumentsMutationVariables = Exact<{
|
|
860
|
+
identifiers: ReadonlyArray<Scalars["String"]["input"]>;
|
|
861
|
+
propagate?: InputMaybe<PropagationMode>;
|
|
862
|
+
}>;
|
|
863
|
+
type DeleteDocumentsMutation = {
|
|
864
|
+
readonly deleteDocuments: boolean;
|
|
865
|
+
};
|
|
866
|
+
type DocumentChangesSubscriptionVariables = Exact<{
|
|
867
|
+
search: SearchFilterInput;
|
|
868
|
+
view?: InputMaybe<ViewFilterInput>;
|
|
869
|
+
}>;
|
|
870
|
+
type DocumentChangesSubscription = {
|
|
871
|
+
readonly documentChanges: {
|
|
872
|
+
readonly type: DocumentChangeType$2;
|
|
873
|
+
readonly documents: ReadonlyArray<{
|
|
874
|
+
readonly id: string;
|
|
875
|
+
readonly slug?: string | null | undefined;
|
|
876
|
+
readonly name: string;
|
|
877
|
+
readonly documentType: string;
|
|
878
|
+
readonly state: NonNullable<unknown>;
|
|
879
|
+
readonly createdAtUtcIso: string | Date;
|
|
880
|
+
readonly lastModifiedAtUtcIso: string | Date;
|
|
881
|
+
readonly revisionsList: ReadonlyArray<{
|
|
882
|
+
readonly scope: string;
|
|
883
|
+
readonly revision: number;
|
|
884
|
+
}>;
|
|
885
|
+
}>;
|
|
886
|
+
readonly context?: {
|
|
887
|
+
readonly parentId?: string | null | undefined;
|
|
888
|
+
readonly childId?: string | null | undefined;
|
|
889
|
+
} | null | undefined;
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
type JobChangesSubscriptionVariables = Exact<{
|
|
893
|
+
jobId: Scalars["String"]["input"];
|
|
894
|
+
}>;
|
|
895
|
+
type JobChangesSubscription = {
|
|
896
|
+
readonly jobChanges: {
|
|
897
|
+
readonly jobId: string;
|
|
898
|
+
readonly status: string;
|
|
899
|
+
readonly result: NonNullable<unknown>;
|
|
900
|
+
readonly error?: string | null | undefined;
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
type PollSyncEnvelopesQueryVariables = Exact<{
|
|
904
|
+
channelId: Scalars["String"]["input"];
|
|
905
|
+
outboxAck: Scalars["Int"]["input"];
|
|
906
|
+
outboxLatest: Scalars["Int"]["input"];
|
|
907
|
+
}>;
|
|
908
|
+
type PollSyncEnvelopesQuery = {
|
|
909
|
+
readonly pollSyncEnvelopes: {
|
|
910
|
+
readonly ackOrdinal: number;
|
|
911
|
+
readonly envelopes: ReadonlyArray<{
|
|
912
|
+
readonly type: SyncEnvelopeType;
|
|
913
|
+
readonly key?: string | null | undefined;
|
|
914
|
+
readonly dependsOn?: ReadonlyArray<string> | null | undefined;
|
|
915
|
+
readonly channelMeta: {
|
|
916
|
+
readonly id: string;
|
|
917
|
+
};
|
|
918
|
+
readonly operations?: ReadonlyArray<{
|
|
919
|
+
readonly operation: {
|
|
920
|
+
readonly index: number;
|
|
921
|
+
readonly timestampUtcMs: string;
|
|
922
|
+
readonly hash: string;
|
|
923
|
+
readonly skip: number;
|
|
924
|
+
readonly error?: string | null | undefined;
|
|
925
|
+
readonly id?: string | null | undefined;
|
|
926
|
+
readonly action: {
|
|
927
|
+
readonly id: string;
|
|
928
|
+
readonly type: string;
|
|
929
|
+
readonly timestampUtcMs: string;
|
|
930
|
+
readonly input: NonNullable<unknown>;
|
|
931
|
+
readonly scope: string;
|
|
932
|
+
readonly attachments?: ReadonlyArray<{
|
|
933
|
+
readonly data: string;
|
|
934
|
+
readonly mimeType: string;
|
|
935
|
+
readonly hash: string;
|
|
936
|
+
readonly extension?: string | null | undefined;
|
|
937
|
+
readonly fileName?: string | null | undefined;
|
|
938
|
+
}> | null | undefined;
|
|
939
|
+
readonly context?: {
|
|
940
|
+
readonly signer?: {
|
|
941
|
+
readonly signatures: ReadonlyArray<string>;
|
|
942
|
+
readonly user?: {
|
|
943
|
+
readonly address: string;
|
|
944
|
+
readonly networkId: string;
|
|
945
|
+
readonly chainId: number;
|
|
946
|
+
} | null | undefined;
|
|
947
|
+
readonly app?: {
|
|
948
|
+
readonly name: string;
|
|
949
|
+
readonly key: string;
|
|
950
|
+
} | null | undefined;
|
|
951
|
+
} | null | undefined;
|
|
952
|
+
} | null | undefined;
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
readonly context: {
|
|
956
|
+
readonly documentId: string;
|
|
957
|
+
readonly documentType: string;
|
|
958
|
+
readonly scope: string;
|
|
959
|
+
readonly branch: string;
|
|
960
|
+
};
|
|
961
|
+
}> | null | undefined;
|
|
962
|
+
readonly cursor?: {
|
|
963
|
+
readonly remoteName: string;
|
|
964
|
+
readonly cursorOrdinal: number;
|
|
965
|
+
readonly lastSyncedAtUtcMs?: string | null | undefined;
|
|
966
|
+
} | null | undefined;
|
|
967
|
+
}>;
|
|
968
|
+
readonly deadLetters: ReadonlyArray<{
|
|
969
|
+
readonly documentId: string;
|
|
970
|
+
readonly error: string;
|
|
971
|
+
}>;
|
|
972
|
+
};
|
|
973
|
+
};
|
|
974
|
+
type TouchChannelMutationVariables = Exact<{
|
|
975
|
+
input: TouchChannelInput;
|
|
976
|
+
}>;
|
|
977
|
+
type TouchChannelMutation = {
|
|
978
|
+
readonly touchChannel: boolean;
|
|
979
|
+
};
|
|
980
|
+
type PushSyncEnvelopesMutationVariables = Exact<{
|
|
981
|
+
envelopes: ReadonlyArray<SyncEnvelopeInput>;
|
|
982
|
+
}>;
|
|
983
|
+
type PushSyncEnvelopesMutation = {
|
|
984
|
+
readonly pushSyncEnvelopes: boolean;
|
|
985
|
+
};
|
|
986
|
+
type SdkFunctionWrapper = <T>(action: (requestHeaders?: Record<string, string>) => Promise<T>, operationName: string, operationType?: string, variables?: any) => Promise<T>;
|
|
987
|
+
declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
|
|
988
|
+
GetDocumentModels(variables?: GetDocumentModelsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentModelsQuery>;
|
|
989
|
+
GetDocument(variables: GetDocumentQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentQuery>;
|
|
990
|
+
GetDocumentWithOperations(variables: GetDocumentWithOperationsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentWithOperationsQuery>;
|
|
991
|
+
GetDocumentChildren(variables: GetDocumentChildrenQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentChildrenQuery>;
|
|
992
|
+
GetDocumentParents(variables: GetDocumentParentsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentParentsQuery>;
|
|
993
|
+
FindDocuments(variables: FindDocumentsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<FindDocumentsQuery>;
|
|
994
|
+
GetDocumentOperations(variables: GetDocumentOperationsQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetDocumentOperationsQuery>;
|
|
995
|
+
GetJobStatus(variables: GetJobStatusQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<GetJobStatusQuery>;
|
|
996
|
+
CreateDocument(variables: CreateDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<CreateDocumentMutation>;
|
|
997
|
+
CreateEmptyDocument(variables: CreateEmptyDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<CreateEmptyDocumentMutation>;
|
|
998
|
+
MutateDocument(variables: MutateDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<MutateDocumentMutation>;
|
|
999
|
+
MutateDocumentAsync(variables: MutateDocumentAsyncMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<MutateDocumentAsyncMutation>;
|
|
1000
|
+
RenameDocument(variables: RenameDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<RenameDocumentMutation>;
|
|
1001
|
+
AddChildren(variables: AddChildrenMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<AddChildrenMutation>;
|
|
1002
|
+
RemoveChildren(variables: RemoveChildrenMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<RemoveChildrenMutation>;
|
|
1003
|
+
MoveChildren(variables: MoveChildrenMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<MoveChildrenMutation>;
|
|
1004
|
+
DeleteDocument(variables: DeleteDocumentMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<DeleteDocumentMutation>;
|
|
1005
|
+
DeleteDocuments(variables: DeleteDocumentsMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<DeleteDocumentsMutation>;
|
|
1006
|
+
DocumentChanges(variables: DocumentChangesSubscriptionVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<DocumentChangesSubscription>;
|
|
1007
|
+
JobChanges(variables: JobChangesSubscriptionVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<JobChangesSubscription>;
|
|
1008
|
+
PollSyncEnvelopes(variables: PollSyncEnvelopesQueryVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<PollSyncEnvelopesQuery>;
|
|
1009
|
+
TouchChannel(variables: TouchChannelMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<TouchChannelMutation>;
|
|
1010
|
+
PushSyncEnvelopes(variables: PushSyncEnvelopesMutationVariables, requestHeaders?: GraphQLClientRequestHeaders, signal?: RequestInit["signal"]): Promise<PushSyncEnvelopesMutation>;
|
|
1011
|
+
};
|
|
1012
|
+
type Sdk = ReturnType<typeof getSdk>;
|
|
1013
|
+
//#endregion
|
|
1014
|
+
//#region src/graphql/types.d.ts
|
|
1015
|
+
type DocumentOperationsPage = GetDocumentOperationsQuery["documentOperations"];
|
|
1016
|
+
type DocumentResult = NonNullable<GetDocumentQuery["document"]>;
|
|
1017
|
+
type ReactorGraphQLClient = Pick<Sdk, "GetDocument" | "GetDocumentWithOperations" | "GetDocumentOperations" | "MutateDocument" | "CreateDocument" | "CreateEmptyDocument" | "DeleteDocument"> & {
|
|
1018
|
+
/** Fetch multiple documentOperations in a single request via aliases. */BatchGetDocumentOperations?: (filters: OperationsFilterInput[], pagings: (PagingInput | undefined | null)[]) => Promise<DocumentOperationsPage[]>; /** Fetch a document and multiple documentOperations in a single request. */
|
|
1019
|
+
BatchGetDocumentWithOperations?: (identifier: string, view: ViewFilterInput | undefined, filters: OperationsFilterInput[], pagings: (PagingInput | undefined)[]) => Promise<{
|
|
1020
|
+
document: DocumentResult | null;
|
|
1021
|
+
operations: DocumentOperationsPage[];
|
|
1022
|
+
}>;
|
|
1023
|
+
};
|
|
1024
|
+
//#endregion
|
|
1025
|
+
//#region src/graphql/client.d.ts
|
|
1026
|
+
/**
|
|
1027
|
+
* Creates a GraphQL client for the Reactor Subgraph API.
|
|
1028
|
+
* @param urlOrGQLClient The URL of the GraphQL API or a GraphQL client instance.
|
|
1029
|
+
* @param middleware An optional middleware function to wrap the GraphQL client calls.
|
|
1030
|
+
* @returns A GraphQL client for the Reactor Subgraph API.
|
|
1031
|
+
*/
|
|
1032
|
+
declare function createClient(urlOrGQLClient: string | GraphQLClient, middleware?: SdkFunctionWrapper): ReactorGraphQLClient;
|
|
1033
|
+
//#endregion
|
|
1034
|
+
//#region src/renown/use-renown-auth.d.ts
|
|
1035
|
+
type RenownAuthStatus = LoginStatus | "loading";
|
|
1036
|
+
interface RenownAuth {
|
|
1037
|
+
status: RenownAuthStatus | undefined;
|
|
1038
|
+
user: User | undefined;
|
|
1039
|
+
address: string | undefined;
|
|
1040
|
+
ensName: string | undefined;
|
|
1041
|
+
avatarUrl: string | undefined;
|
|
1042
|
+
profileId: string | undefined;
|
|
1043
|
+
displayName: string | undefined;
|
|
1044
|
+
displayAddress: string | undefined;
|
|
1045
|
+
login: () => void;
|
|
1046
|
+
logout: () => Promise<void>;
|
|
1047
|
+
openProfile: () => void;
|
|
1048
|
+
}
|
|
1049
|
+
declare function useRenownAuth(): RenownAuth;
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region src/hooks/add-ph-event-handlers.d.ts
|
|
1052
|
+
declare function addPHEventHandlers(): void;
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region src/types/vetra.d.ts
|
|
1055
|
+
type Processors = (module: {
|
|
1056
|
+
analyticsStore: IAnalyticsStore;
|
|
1057
|
+
relationalDb: IRelationalDb$1;
|
|
1058
|
+
}) => (driveHeader: PHDocumentHeader) => ProcessorRecord$1[];
|
|
1059
|
+
type VetraMeta = {
|
|
1060
|
+
id: string;
|
|
1061
|
+
name: string;
|
|
1062
|
+
};
|
|
1063
|
+
type VetraModule = Record<string, unknown> & VetraMeta;
|
|
1064
|
+
type VetraPackageMeta = {
|
|
1065
|
+
id: string;
|
|
1066
|
+
name: string;
|
|
1067
|
+
description: string;
|
|
1068
|
+
category: string;
|
|
1069
|
+
author: Author;
|
|
1070
|
+
};
|
|
1071
|
+
type BaseVetraPackage<TModules extends { [K in keyof TModules]: VetraMeta[] }> = VetraPackageMeta & {
|
|
1072
|
+
modules: { [K in keyof TModules]: TModules[K] };
|
|
1073
|
+
};
|
|
1074
|
+
type VetraDocumentModelModule = VetraMeta & {
|
|
1075
|
+
documentType: string;
|
|
1076
|
+
extension: string;
|
|
1077
|
+
specifications: DocumentSpecification[];
|
|
1078
|
+
reducer: Reducer<any>;
|
|
1079
|
+
actions: Record<string, (input: any) => Action>;
|
|
1080
|
+
utils: DocumentModelUtils<any>;
|
|
1081
|
+
documentModel: DocumentModelPHState;
|
|
1082
|
+
version?: number;
|
|
1083
|
+
};
|
|
1084
|
+
type VetraEditorModule = VetraMeta & {
|
|
1085
|
+
documentTypes: string[];
|
|
1086
|
+
Component: React.ComponentType<any>;
|
|
1087
|
+
};
|
|
1088
|
+
type VetraProcessorModule = VetraMeta & {
|
|
1089
|
+
processors: Processors;
|
|
1090
|
+
};
|
|
1091
|
+
type VetraModules = {
|
|
1092
|
+
documentModelModules?: VetraDocumentModelModule[];
|
|
1093
|
+
editorModules?: VetraEditorModule[];
|
|
1094
|
+
subgraphModules?: SubgraphModule[];
|
|
1095
|
+
importScriptModules?: ImportScriptModule[];
|
|
1096
|
+
};
|
|
1097
|
+
type VetraPackage = BaseVetraPackage<VetraModules> & {
|
|
1098
|
+
upgradeManifests: UpgradeManifest<readonly number[]>[] | undefined;
|
|
1099
|
+
processorFactory?: ProcessorFactoryBuilder;
|
|
1100
|
+
};
|
|
1101
|
+
type VetraPackageManifest = VetraPackageMeta & {
|
|
1102
|
+
modules: { [K in keyof VetraModules]: VetraMeta[] };
|
|
1103
|
+
};
|
|
1104
|
+
type IPackagesListener = (data: {
|
|
1105
|
+
packages: VetraPackage[];
|
|
1106
|
+
}) => void;
|
|
1107
|
+
type IPackageListerUnsubscribe = () => void;
|
|
1108
|
+
type PackageManagerInstallResult = {
|
|
1109
|
+
type: "success";
|
|
1110
|
+
package: VetraPackage;
|
|
1111
|
+
} | {
|
|
1112
|
+
type: "error";
|
|
1113
|
+
error: Error;
|
|
1114
|
+
};
|
|
1115
|
+
interface IPackageManager extends IDocumentModelLoader {
|
|
1116
|
+
registryUrl: string | null;
|
|
1117
|
+
packages: VetraPackage[];
|
|
1118
|
+
addPackage(packageName: string): Promise<PackageManagerInstallResult> | PackageManagerInstallResult;
|
|
1119
|
+
addPackages(packageNames: string[]): Promise<PackageManagerInstallResult[]> | PackageManagerInstallResult[];
|
|
1120
|
+
removePackage(name: string): void;
|
|
1121
|
+
subscribe(handler: IPackagesListener): IPackageListerUnsubscribe;
|
|
1122
|
+
getPackageSource: (packageName: string) => RegistryPackageSource | null;
|
|
1123
|
+
}
|
|
1124
|
+
//#endregion
|
|
1125
|
+
//#region src/hooks/allowed-document-model-modules.d.ts
|
|
1126
|
+
declare function useAllowedDocumentModelModules(): VetraDocumentModelModule[] | undefined;
|
|
1127
|
+
//#endregion
|
|
1128
|
+
//#region src/hooks/child-nodes.d.ts
|
|
1129
|
+
/** Returns the child nodes for the selected drive or folder. */
|
|
1130
|
+
declare function useNodesInSelectedDriveOrFolder(): Node[];
|
|
1131
|
+
//#endregion
|
|
1132
|
+
//#region src/hooks/config/connect.d.ts
|
|
1133
|
+
declare const useRouterBasename: () => string | undefined, setRouterBasename: (value: string | undefined) => void, addRouterBasenameEventHandler: () => void;
|
|
1134
|
+
declare const useVersion: () => string | undefined, setVersion: (value: string | undefined) => void, addVersionEventHandler: () => void;
|
|
1135
|
+
declare const useRequiresHardRefresh: () => boolean | undefined, setRequiresHardRefresh: (value: boolean | undefined) => void, addRequiresHardRefreshEventHandler: () => void;
|
|
1136
|
+
declare const useWarnOutdatedApp: () => boolean | undefined, setWarnOutdatedApp: (value: boolean | undefined) => void, addWarnOutdatedAppEventHandler: () => void;
|
|
1137
|
+
declare const useStudioMode: () => boolean | undefined, setStudioMode: (value: boolean | undefined) => void, addStudioModeEventHandler: () => void;
|
|
1138
|
+
declare const useBasePath: () => string | undefined, setBasePath: (value: string | undefined) => void, addBasePathEventHandler: () => void;
|
|
1139
|
+
declare const useVersionCheckInterval: () => number | undefined, setVersionCheckInterval: (value: number | undefined) => void, addVersionCheckIntervalEventHandler: () => void;
|
|
1140
|
+
declare const useCliVersion: () => string | undefined, setCliVersion: (value: string | undefined) => void, addCliVersionEventHandler: () => void;
|
|
1141
|
+
declare const useFileUploadOperationsChunkSize: () => number | undefined, setFileUploadOperationsChunkSize: (value: number | undefined) => void, addFileUploadOperationsChunkSizeEventHandler: () => void;
|
|
1142
|
+
declare const useIsDocumentModelSelectionSettingsEnabled: () => boolean | undefined, setIsDocumentModelSelectionSettingsEnabled: (value: boolean | undefined) => void, addIsDocumentModelSelectionSettingsEnabledEventHandler: () => void;
|
|
1143
|
+
declare const useGaTrackingId: () => string | undefined, setGaTrackingId: (value: string | undefined) => void, addGaTrackingIdEventHandler: () => void;
|
|
1144
|
+
declare const useDefaultDrivesUrl: () => string | undefined, setDefaultDrivesUrl: (value: string | undefined) => void, addDefaultDrivesUrlEventHandler: () => void;
|
|
1145
|
+
declare const useDrivesPreserveStrategy: () => string | undefined, setDrivesPreserveStrategy: (value: string | undefined) => void, addDrivesPreserveStrategyEventHandler: () => void;
|
|
1146
|
+
declare const useIsLocalDrivesEnabled: () => boolean | undefined, setIsLocalDrivesEnabled: (value: boolean | undefined) => void, addIsLocalDrivesEnabledEventHandler: () => void;
|
|
1147
|
+
declare const useIsAddDriveEnabled: () => boolean | undefined, setIsAddDriveEnabled: (value: boolean | undefined) => void, addIsAddDriveEnabledEventHandler: () => void;
|
|
1148
|
+
declare const useIsPublicDrivesEnabled: () => boolean | undefined, setIsPublicDrivesEnabled: (value: boolean | undefined) => void, addIsPublicDrivesEnabledEventHandler: () => void;
|
|
1149
|
+
declare const useIsAddPublicDrivesEnabled: () => boolean | undefined, setIsAddPublicDrivesEnabled: (value: boolean | undefined) => void, addIsAddPublicDrivesEnabledEventHandler: () => void;
|
|
1150
|
+
declare const useIsDeletePublicDrivesEnabled: () => boolean | undefined, setIsDeletePublicDrivesEnabled: (value: boolean | undefined) => void, addIsDeletePublicDrivesEnabledEventHandler: () => void;
|
|
1151
|
+
declare const useIsCloudDrivesEnabled: () => boolean | undefined, setIsCloudDrivesEnabled: (value: boolean | undefined) => void, addIsCloudDrivesEnabledEventHandler: () => void;
|
|
1152
|
+
declare const useIsAddCloudDrivesEnabled: () => boolean | undefined, setIsAddCloudDrivesEnabled: (value: boolean | undefined) => void, addIsAddCloudDrivesEnabledEventHandler: () => void;
|
|
1153
|
+
declare const useIsDeleteCloudDrivesEnabled: () => boolean | undefined, setIsDeleteCloudDrivesEnabled: (value: boolean | undefined) => void, addIsDeleteCloudDrivesEnabledEventHandler: () => void;
|
|
1154
|
+
declare const useLocalDrivesEnabled: () => boolean | undefined, setLocalDrivesEnabled: (value: boolean | undefined) => void, addLocalDrivesEnabledEventHandler: () => void;
|
|
1155
|
+
declare const useIsAddLocalDrivesEnabled: () => boolean | undefined, setIsAddLocalDrivesEnabled: (value: boolean | undefined) => void, addIsAddLocalDrivesEnabledEventHandler: () => void;
|
|
1156
|
+
declare const useIsDeleteLocalDrivesEnabled: () => boolean | undefined, setIsDeleteLocalDrivesEnabled: (value: boolean | undefined) => void, addIsDeleteLocalDrivesEnabledEventHandler: () => void;
|
|
1157
|
+
declare const useIsEditorDebugModeEnabled: () => boolean | undefined, setIsEditorDebugModeEnabled: (value: boolean | undefined) => void, addIsEditorDebugModeEnabledEventHandler: () => void;
|
|
1158
|
+
declare const useIsEditorReadModeEnabled: () => boolean | undefined, setIsEditorReadModeEnabled: (value: boolean | undefined) => void, addIsEditorReadModeEnabledEventHandler: () => void;
|
|
1159
|
+
declare const useIsAnalyticsDatabaseWorkerEnabled: () => boolean | undefined, setIsAnalyticsDatabaseWorkerEnabled: (value: boolean | undefined) => void, addIsAnalyticsDatabaseWorkerEnabledEventHandler: () => void;
|
|
1160
|
+
declare const useIsDiffAnalyticsEnabled: () => boolean | undefined, setIsDiffAnalyticsEnabled: (value: boolean | undefined) => void, addIsDiffAnalyticsEnabledEventHandler: () => void;
|
|
1161
|
+
declare const useIsDriveAnalyticsEnabled: () => boolean | undefined, setIsDriveAnalyticsEnabled: (value: boolean | undefined) => void, addIsDriveAnalyticsEnabledEventHandler: () => void;
|
|
1162
|
+
declare const useRenownUrl: () => string | undefined, setRenownUrl: (value: string | undefined) => void, addRenownUrlEventHandler: () => void;
|
|
1163
|
+
declare const useRenownNetworkId: () => string | undefined, setRenownNetworkId: (value: string | undefined) => void, addRenownNetworkIdEventHandler: () => void;
|
|
1164
|
+
declare const useRenownChainId: () => number | undefined, setRenownChainId: (value: number | undefined) => void, addRenownChainIdEventHandler: () => void;
|
|
1165
|
+
declare const useSentryRelease: () => string | undefined, setSentryRelease: (value: string | undefined) => void, addSentryReleaseEventHandler: () => void;
|
|
1166
|
+
declare const useSentryDsn: () => string | undefined, setSentryDsn: (value: string | undefined) => void, addSentryDsnEventHandler: () => void;
|
|
1167
|
+
declare const useSentryEnv: () => string | undefined, setSentryEnv: (value: string | undefined) => void, addSentryEnvEventHandler: () => void;
|
|
1168
|
+
declare const useIsSentryTracingEnabled: () => boolean | undefined, setIsSentryTracingEnabled: (value: boolean | undefined) => void, addIsSentryTracingEnabledEventHandler: () => void;
|
|
1169
|
+
declare const useIsExternalProcessorsEnabled: () => boolean | undefined, setIsExternalProcessorsEnabled: (value: boolean | undefined) => void, addIsExternalProcessorsEnabledEventHandler: () => void;
|
|
1170
|
+
declare const useIsExternalPackagesEnabled: () => boolean | undefined, setIsExternalPackagesEnabled: (value: boolean | undefined) => void, addIsExternalPackagesEnabledEventHandler: () => void;
|
|
1171
|
+
/** Sets the enabled editors for Connect. */
|
|
1172
|
+
declare const setEnabledEditors: (value: string[] | undefined) => void;
|
|
1173
|
+
/** Gets the enabled editors for Connect. */
|
|
1174
|
+
declare const useEnabledEditors: () => string[] | undefined;
|
|
1175
|
+
/** Adds an event handler for when the enabled editors for Connect changes. */
|
|
1176
|
+
declare const addEnabledEditorsEventHandler: () => void;
|
|
1177
|
+
/** Sets the disabled editors for Connect. */
|
|
1178
|
+
declare const setDisabledEditors: (value: string[] | undefined) => void;
|
|
1179
|
+
/** Gets the disabled editors for Connect. */
|
|
1180
|
+
declare const useDisabledEditors: () => string[] | undefined;
|
|
1181
|
+
/** Adds an event handler for when the disabled editors for Connect changes. */
|
|
1182
|
+
declare const addDisabledEditorsEventHandler: () => void;
|
|
1183
|
+
/** Sets the isRelationalProcessorsEnabled for Connect. */
|
|
1184
|
+
declare const setIsRelationalProcessorsEnabled: (value: boolean | undefined) => void;
|
|
1185
|
+
/** Gets the isRelationalProcessorsEnabled for Connect. */
|
|
1186
|
+
declare const useIsRelationalProcessorsEnabled: () => boolean | undefined;
|
|
1187
|
+
/** Adds an event handler for when the isRelationalProcessorsEnabled for Connect changes. */
|
|
1188
|
+
declare const addIsRelationalProcessorsEnabledEventHandler: () => void;
|
|
1189
|
+
/** Sets the isExternalRelationalProcessorsEnabled for Connect. */
|
|
1190
|
+
declare const setIsExternalRelationalProcessorsEnabled: (value: boolean | undefined) => void;
|
|
1191
|
+
/** Gets the isExternalRelationalProcessorsEnabled for Connect. */
|
|
1192
|
+
declare const useIsExternalRelationalProcessorsEnabled: () => boolean | undefined;
|
|
1193
|
+
/** Adds an event handler for when the isExternalRelationalProcessorsEnabled for Connect changes. */
|
|
1194
|
+
declare const addIsExternalRelationalProcessorsEnabledEventHandler: () => void;
|
|
1195
|
+
/** Sets the isAnalyticsEnabled for Connect. */
|
|
1196
|
+
declare const setIsAnalyticsEnabled: (value: boolean | undefined) => void;
|
|
1197
|
+
/** Gets the isAnalyticsEnabled for Connect. */
|
|
1198
|
+
declare const useIsAnalyticsEnabled: () => boolean | undefined;
|
|
1199
|
+
/** Adds an event handler for when the isAnalyticsEnabled for Connect changes. */
|
|
1200
|
+
declare const addIsAnalyticsEnabledEventHandler: () => void;
|
|
1201
|
+
/** Sets the isAnalyticsExternalProcessorsEnabled for Connect. */
|
|
1202
|
+
declare const setIsAnalyticsExternalProcessorsEnabled: (value: boolean | undefined) => void;
|
|
1203
|
+
/** Gets the isAnalyticsExternalProcessorsEnabled for Connect. */
|
|
1204
|
+
declare const useIsAnalyticsExternalProcessorsEnabled: () => boolean | undefined;
|
|
1205
|
+
/** Adds an event handler for when the isAnalyticsExternalProcessorsEnabled for Connect changes. */
|
|
1206
|
+
declare const addIsAnalyticsExternalProcessorsEnabledEventHandler: () => void;
|
|
1207
|
+
/** Sets the analytics database name for Connect. */
|
|
1208
|
+
declare const setAnalyticsDatabaseName: (value: string | undefined) => void;
|
|
1209
|
+
/** Gets the analytics database name for Connect. */
|
|
1210
|
+
declare const useAnalyticsDatabaseName: () => string | undefined;
|
|
1211
|
+
/** Adds an event handler for when the analytics database name for Connect changes. */
|
|
1212
|
+
declare const addAnalyticsDatabaseNameEventHandler: () => void;
|
|
1213
|
+
/** Sets the log level for Connect. */
|
|
1214
|
+
declare const setLogLevel: (value: "debug" | "info" | "warn" | "error" | undefined) => void;
|
|
1215
|
+
/** Gets the log level for Connect. */
|
|
1216
|
+
declare const useLogLevel: () => "debug" | "info" | "warn" | "error" | undefined;
|
|
1217
|
+
/** Adds an event handler for when the log level for Connect changes. */
|
|
1218
|
+
declare const addLogLevelEventHandler: () => void;
|
|
1219
|
+
/** Sets the allow list for Connect. */
|
|
1220
|
+
declare const setAllowList: (value: string[] | undefined) => void;
|
|
1221
|
+
/** Gets the allow list for Connect. */
|
|
1222
|
+
declare const useAllowList: () => string[] | undefined;
|
|
1223
|
+
/** Adds an event handler for when the allow list for Connect changes. */
|
|
1224
|
+
declare const addAllowListEventHandler: () => void;
|
|
1225
|
+
declare const phGlobalConfigSetters: PHGlobalConfigSetters$1;
|
|
1226
|
+
declare const phGlobalConfigHooks: PHGlobalConfigHooks$1;
|
|
1227
|
+
//#endregion
|
|
1228
|
+
//#region src/hooks/config/editor.d.ts
|
|
1229
|
+
declare const isExternalControlsEnabledEventFunctions: {
|
|
1230
|
+
useValue: () => boolean | undefined;
|
|
1231
|
+
setValue: (value: boolean | undefined) => void;
|
|
1232
|
+
addEventHandler: () => void;
|
|
1233
|
+
};
|
|
1234
|
+
/** Sets whether external controls are enabled for a given editor. */
|
|
1235
|
+
declare const setIsExternalControlsEnabled: (value: boolean | undefined) => void;
|
|
1236
|
+
/** Gets whether external controls are enabled for a given editor. */
|
|
1237
|
+
declare const useIsExternalControlsEnabled: () => boolean | undefined;
|
|
1238
|
+
/** Adds an event handler for when the external controls enabled state changes. */
|
|
1239
|
+
declare const addIsExternalControlsEnabledEventHandler: () => void;
|
|
1240
|
+
/** Sets whether drag and drop is enabled for a given drive editor. */
|
|
1241
|
+
declare const setIsDragAndDropEnabled: (value: boolean | undefined) => void;
|
|
1242
|
+
/** Gets whether drag and drop is enabled for a given drive editor. */
|
|
1243
|
+
declare const useIsDragAndDropEnabled: () => boolean | undefined;
|
|
1244
|
+
/** Adds an event handler for when the drag and drop enabled state changes. */
|
|
1245
|
+
declare const addIsDragAndDropEnabledEventHandler: () => void;
|
|
1246
|
+
/** Sets the allowed document types for a given drive editor. */
|
|
1247
|
+
declare const setAllowedDocumentTypes: (value: string[] | undefined) => void;
|
|
1248
|
+
/** Defines the document types a drive supports.
|
|
1249
|
+
*
|
|
1250
|
+
* Defaults to all of the document types registered in the reactor.
|
|
1251
|
+
*/
|
|
1252
|
+
declare function useAllowedDocumentTypes(): string[] | undefined;
|
|
1253
|
+
/** Adds an event handler for when the allowed document types for a given drive editor changes. */
|
|
1254
|
+
declare const addAllowedDocumentTypesEventHandler: () => void;
|
|
1255
|
+
declare const phDriveEditorConfigSetters: PHDriveEditorConfigSetters$1;
|
|
1256
|
+
declare const phDocumentEditorConfigSetters: PHDocumentEditorConfigSetters$1;
|
|
1257
|
+
declare const phDriveEditorConfigHooks: PHDriveEditorConfigHooks$1;
|
|
1258
|
+
declare const phDocumentEditorConfigHooks: PHDocumentEditorConfigHooks$1;
|
|
1259
|
+
//#endregion
|
|
1260
|
+
//#region src/hooks/config/set-config-by-key.d.ts
|
|
1261
|
+
declare function setPHGlobalConfigByKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
|
|
1262
|
+
declare function setPHDriveEditorConfigByKey<TKey extends PHDriveEditorConfigKey$1>(key: TKey, value: PHDriveEditorConfig$1[TKey] | undefined): void;
|
|
1263
|
+
declare function setPHDocumentEditorConfigByKey<TKey extends PHDocumentEditorConfigKey$1>(key: TKey, value: PHDocumentEditorConfig$1[TKey] | undefined): void;
|
|
1264
|
+
//#endregion
|
|
1265
|
+
//#region src/hooks/config/set-config-by-object.d.ts
|
|
1266
|
+
declare function setDefaultPHGlobalConfig(config: PHGlobalConfig$1): void;
|
|
1267
|
+
declare function useSetDefaultPHGlobalConfig(config: PHGlobalConfig$1): void;
|
|
1268
|
+
declare function useResetPHGlobalConfig(defaultConfigForReset: PHGlobalConfig$1): () => void;
|
|
1269
|
+
declare function setPHGlobalConfig(config: Partial<PHGlobalConfig$1>): void;
|
|
1270
|
+
declare function useSetPHGlobalConfig(config: Partial<PHGlobalConfig$1>): void;
|
|
1271
|
+
/** Sets the global drive config.
|
|
1272
|
+
*
|
|
1273
|
+
* Pass in a partial object of the global drive config to set.
|
|
1274
|
+
*/
|
|
1275
|
+
declare function setPHDriveEditorConfig(config: Partial<PHDriveEditorConfig$1>): void;
|
|
1276
|
+
/** Sets the global document config.
|
|
1277
|
+
*
|
|
1278
|
+
* Pass in a partial object of the global document config to set.
|
|
1279
|
+
*/
|
|
1280
|
+
declare function setPHDocumentEditorConfig(config: Partial<PHDocumentEditorConfig$1>): void;
|
|
1281
|
+
/** Wrapper hook for setting the global drive editor config.
|
|
1282
|
+
*
|
|
1283
|
+
* Automatically sets the global drive editor config when the component mounts.
|
|
1284
|
+
*
|
|
1285
|
+
* Pass in a partial object of the global drive editor config to set.
|
|
1286
|
+
*/
|
|
1287
|
+
declare function useSetPHDriveEditorConfig(config: Partial<PHDriveEditorConfig$1>): void;
|
|
1288
|
+
/** Wrapper hook for setting the global document editor config.
|
|
1289
|
+
*
|
|
1290
|
+
* Automatically sets the global document editor config when the component mounts.
|
|
1291
|
+
*
|
|
1292
|
+
* Pass in a partial object of the global document editor config to set.
|
|
1293
|
+
*/
|
|
1294
|
+
declare function useSetPHDocumentEditorConfig(config: Partial<PHDocumentEditorConfig$1>): void;
|
|
1295
|
+
//#endregion
|
|
1296
|
+
//#region src/hooks/config/use-value-by-key.d.ts
|
|
1297
|
+
declare function usePHGlobalConfigByKey<TKey extends PHGlobalConfigKey$1>(key: TKey): _powerhousedao_reactor_browser0.PHGlobalConfig[TKey];
|
|
1298
|
+
/** Gets the value of an item in the global drive config for a given key.
|
|
1299
|
+
*
|
|
1300
|
+
* Strongly typed, inferred from type definition for the key.
|
|
1301
|
+
*/
|
|
1302
|
+
declare function usePHDriveEditorConfigByKey<TKey extends PHDriveEditorConfigKey$1>(key: TKey): _powerhousedao_reactor_browser0.PHGlobalConfig[TKey];
|
|
1303
|
+
/** Gets the value of an item in the global document config for a given key.
|
|
1304
|
+
*
|
|
1305
|
+
* Strongly typed, inferred from type definition for the key.
|
|
1306
|
+
*/
|
|
1307
|
+
declare function usePHDocumentEditorConfigByKey<TKey extends PHDocumentEditorConfigKey$1>(key: TKey): _powerhousedao_reactor_browser0.PHGlobalConfig[TKey];
|
|
1308
|
+
//#endregion
|
|
1309
|
+
//#region src/hooks/config/utils.d.ts
|
|
1310
|
+
declare function callGlobalSetterForKey<TKey extends PHGlobalConfigKey$1>(key: TKey, value: PHGlobalConfig$1[TKey] | undefined): void;
|
|
1311
|
+
//#endregion
|
|
1312
|
+
//#region src/renown/utils.d.ts
|
|
1313
|
+
declare function openRenown(documentId?: string): void;
|
|
1314
|
+
/**
|
|
1315
|
+
* Log in the user. Resolves the user DID from (in order):
|
|
1316
|
+
* 1. Explicit `userDid` argument
|
|
1317
|
+
* 2. `?user=` URL parameter (from Renown portal redirect)
|
|
1318
|
+
* 3. Previously stored session in the Renown instance
|
|
1319
|
+
*/
|
|
1320
|
+
declare function login(userDid: string | undefined, renown: IRenown | undefined): Promise<User | undefined>;
|
|
1321
|
+
declare function logout(): Promise<void>;
|
|
1322
|
+
//#endregion
|
|
1323
|
+
//#region src/types/config.d.ts
|
|
1324
|
+
type PHGlobalConfig = PHCommonGlobalConfig & PHDriveEditorConfig & PHDocumentEditorConfig & PHDrivesGlobalConfig & PHAnalyticsGlobalConfig & PHRelationalProcessorsGlobalConfig & PHProcessorsGlobalConfig & PHRenownGlobalConfig & PHSentryGlobalConfig;
|
|
1325
|
+
type PHGlobalConfigKey = keyof PHGlobalConfig;
|
|
1326
|
+
type PHGlobalConfigSetters = PHGlobalConfigSettersForKey<PHGlobalConfigKey>;
|
|
1327
|
+
type PHGlobalConfigHooks = PHGlobalConfigHooksForKey<PHGlobalConfigKey>;
|
|
1328
|
+
/**
|
|
1329
|
+
* Editor configuration settings which are globally available to your custom drive editors.
|
|
1330
|
+
*
|
|
1331
|
+
* Setting these will override the defaults when your editor is mounted.
|
|
1332
|
+
*/
|
|
1333
|
+
type PHDriveEditorConfig = {
|
|
1334
|
+
/** Allows you to specify the document types that are allowed to be added to the drive.
|
|
1335
|
+
* An empty array means that any document type is allowed.
|
|
1336
|
+
*/
|
|
1337
|
+
allowedDocumentTypes?: string[]; /** Whether drag and drop is enabled for the drive editor. */
|
|
1338
|
+
isDragAndDropEnabled?: boolean;
|
|
1339
|
+
};
|
|
1340
|
+
type PHDriveEditorConfigKey = keyof PHDriveEditorConfig;
|
|
1341
|
+
type PHDriveEditorConfigSetters = PHGlobalConfigSettersForKey<PHDriveEditorConfigKey>;
|
|
1342
|
+
type PHDriveEditorConfigHooks = PHGlobalConfigHooksForKey<PHDriveEditorConfigKey>;
|
|
1343
|
+
type PHDocumentEditorConfig = {
|
|
1344
|
+
/** Whether external controls are enabled for the document editor. */isExternalControlsEnabled?: boolean;
|
|
1345
|
+
};
|
|
1346
|
+
type PHDocumentEditorConfigKey = keyof PHDocumentEditorConfig;
|
|
1347
|
+
type PHDocumentEditorConfigSetters = PHGlobalConfigSettersForKey<PHDocumentEditorConfigKey>;
|
|
1348
|
+
type PHDocumentEditorConfigHooks = PHGlobalConfigHooksForKey<PHDocumentEditorConfigKey>;
|
|
1349
|
+
type PHCommonGlobalConfig = {
|
|
1350
|
+
basePath?: string;
|
|
1351
|
+
routerBasename?: string;
|
|
1352
|
+
version?: string;
|
|
1353
|
+
requiresHardRefresh?: boolean;
|
|
1354
|
+
warnOutdatedApp?: boolean;
|
|
1355
|
+
studioMode?: boolean;
|
|
1356
|
+
versionCheckInterval?: number;
|
|
1357
|
+
cliVersion?: string;
|
|
1358
|
+
fileUploadOperationsChunkSize?: number;
|
|
1359
|
+
gaTrackingId?: string;
|
|
1360
|
+
isDocumentModelSelectionSettingsEnabled?: boolean;
|
|
1361
|
+
isAddDriveEnabled?: boolean;
|
|
1362
|
+
isPublicDrivesEnabled?: boolean;
|
|
1363
|
+
isAddPublicDrivesEnabled?: boolean;
|
|
1364
|
+
isDeletePublicDrivesEnabled?: boolean;
|
|
1365
|
+
isCloudDrivesEnabled?: boolean;
|
|
1366
|
+
isAddCloudDrivesEnabled?: boolean;
|
|
1367
|
+
isDeleteCloudDrivesEnabled?: boolean;
|
|
1368
|
+
isLocalDrivesEnabled?: boolean;
|
|
1369
|
+
isAddLocalDrivesEnabled?: boolean;
|
|
1370
|
+
isDeleteLocalDrivesEnabled?: boolean;
|
|
1371
|
+
allowList?: string[];
|
|
1372
|
+
analyticsDatabaseName?: string;
|
|
1373
|
+
logLevel?: "debug" | "info" | "warn" | "error";
|
|
1374
|
+
isEditorDebugModeEnabled?: boolean;
|
|
1375
|
+
isEditorReadModeEnabled?: boolean;
|
|
1376
|
+
disabledEditors?: string[];
|
|
1377
|
+
enabledEditors?: string[];
|
|
1378
|
+
};
|
|
1379
|
+
type PHDrivesGlobalConfig = {
|
|
1380
|
+
defaultDrivesUrl?: string;
|
|
1381
|
+
drivesPreserveStrategy?: string;
|
|
1382
|
+
};
|
|
1383
|
+
type PHAnalyticsGlobalConfig = {
|
|
1384
|
+
isAnalyticsEnabled?: boolean;
|
|
1385
|
+
isAnalyticsDatabaseWorkerEnabled?: boolean;
|
|
1386
|
+
isDiffAnalyticsEnabled?: boolean;
|
|
1387
|
+
isDriveAnalyticsEnabled?: boolean;
|
|
1388
|
+
isAnalyticsExternalProcessorsEnabled?: boolean;
|
|
1389
|
+
};
|
|
1390
|
+
type PHRelationalProcessorsGlobalConfig = {
|
|
1391
|
+
isRelationalProcessorsEnabled?: boolean;
|
|
1392
|
+
isExternalRelationalProcessorsEnabled?: boolean;
|
|
1393
|
+
};
|
|
1394
|
+
type PHProcessorsGlobalConfig = {
|
|
1395
|
+
isExternalProcessorsEnabled?: boolean;
|
|
1396
|
+
isExternalPackagesEnabled?: boolean;
|
|
1397
|
+
};
|
|
1398
|
+
type PHRenownGlobalConfig = {
|
|
1399
|
+
renownUrl?: string;
|
|
1400
|
+
renownNetworkId?: string;
|
|
1401
|
+
renownChainId?: number;
|
|
1402
|
+
};
|
|
1403
|
+
type PHSentryGlobalConfig = {
|
|
1404
|
+
sentryRelease?: string;
|
|
1405
|
+
sentryDsn?: string;
|
|
1406
|
+
sentryEnv?: string;
|
|
1407
|
+
isSentryTracingEnabled?: boolean;
|
|
1408
|
+
};
|
|
1409
|
+
type PHGlobalConfigSettersForKey<T extends PHGlobalConfigKey> = { [K in T]: (value: PHGlobalConfig[K]) => void };
|
|
1410
|
+
type PHGlobalConfigHooksForKey<TKey extends PHGlobalConfigKey> = { [K in TKey]: () => PHGlobalConfig[K] };
|
|
1411
|
+
/** Helper type for ensuring keys are all present while still allowing them to be set */
|
|
1412
|
+
type FullPHGlobalConfig = Record<PHGlobalConfigKey, PHGlobalConfig[PHGlobalConfigKey]>;
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region src/types/modals.d.ts
|
|
1415
|
+
type PHModal = {
|
|
1416
|
+
type: "createDocument";
|
|
1417
|
+
documentType: string;
|
|
1418
|
+
} | {
|
|
1419
|
+
type: "deleteItem";
|
|
1420
|
+
id: string;
|
|
1421
|
+
} | {
|
|
1422
|
+
type: "addDrive";
|
|
1423
|
+
} | {
|
|
1424
|
+
type: "upgradeDrive";
|
|
1425
|
+
driveId: string;
|
|
1426
|
+
} | {
|
|
1427
|
+
type: "deleteDrive";
|
|
1428
|
+
driveId: string;
|
|
1429
|
+
} | {
|
|
1430
|
+
type: "driveSettings";
|
|
1431
|
+
driveId: string;
|
|
1432
|
+
} | {
|
|
1433
|
+
type: "settings";
|
|
1434
|
+
} | {
|
|
1435
|
+
type: "clearStorage";
|
|
1436
|
+
} | {
|
|
1437
|
+
type: "debugSettings";
|
|
1438
|
+
} | {
|
|
1439
|
+
type: "disclaimer";
|
|
1440
|
+
} | {
|
|
1441
|
+
type: "cookiesPolicy";
|
|
1442
|
+
} | {
|
|
1443
|
+
type: "exportDocumentWithErrors";
|
|
1444
|
+
documentId: string;
|
|
1445
|
+
} | {
|
|
1446
|
+
type: "inspector";
|
|
1447
|
+
} | {
|
|
1448
|
+
type: "missingPackage";
|
|
1449
|
+
documentType: string;
|
|
1450
|
+
};
|
|
1451
|
+
//#endregion
|
|
1452
|
+
//#region src/types/timeline.d.ts
|
|
1453
|
+
type TimelineBarItem = {
|
|
1454
|
+
id: string;
|
|
1455
|
+
type: "bar";
|
|
1456
|
+
addSize?: 0 | 1 | 2 | 3 | 4;
|
|
1457
|
+
delSize?: 0 | 1 | 2 | 3 | 4;
|
|
1458
|
+
timestampUtcMs?: string;
|
|
1459
|
+
additions?: number;
|
|
1460
|
+
deletions?: number;
|
|
1461
|
+
revision?: number;
|
|
1462
|
+
startDate?: Date;
|
|
1463
|
+
endDate?: Date;
|
|
1464
|
+
};
|
|
1465
|
+
type TimelineDividerItem = {
|
|
1466
|
+
id: string;
|
|
1467
|
+
type: "divider";
|
|
1468
|
+
timestampUtcMs?: string;
|
|
1469
|
+
title?: string;
|
|
1470
|
+
subtitle?: string;
|
|
1471
|
+
revision?: number;
|
|
1472
|
+
startDate?: Date;
|
|
1473
|
+
endDate?: Date;
|
|
1474
|
+
};
|
|
1475
|
+
type TimelineItem = TimelineBarItem | TimelineDividerItem;
|
|
1476
|
+
//#endregion
|
|
1477
|
+
//#region src/types/toast.d.ts
|
|
1478
|
+
type PHToastType = "default" | "success" | "error" | "warning" | "info" | "connect-success" | "connect-warning" | "connect-loading" | "connect-deleted";
|
|
1479
|
+
type PHToastOptions = {
|
|
1480
|
+
type?: PHToastType;
|
|
1481
|
+
autoClose?: number | false;
|
|
1482
|
+
containerId?: string;
|
|
1483
|
+
};
|
|
1484
|
+
type PHToastFn = (content: ReactNode | string, options?: PHToastOptions) => void;
|
|
1485
|
+
//#endregion
|
|
1486
|
+
//#region src/types/global.d.ts
|
|
1487
|
+
type BrowserReactorClientModule = ReactorClientModule & {
|
|
1488
|
+
pg: PGlite;
|
|
1489
|
+
};
|
|
1490
|
+
type LOADING = null;
|
|
1491
|
+
type PHGlobal = PHGlobalConfig & {
|
|
1492
|
+
loading?: boolean;
|
|
1493
|
+
reactorClientModule?: BrowserReactorClientModule;
|
|
1494
|
+
reactorClient?: IReactorClient;
|
|
1495
|
+
renown?: IRenown | LOADING;
|
|
1496
|
+
vetraPackageManager?: IPackageManager;
|
|
1497
|
+
drives?: DocumentDriveDocument[];
|
|
1498
|
+
documentCache?: IDocumentCache;
|
|
1499
|
+
selectedDriveId?: string;
|
|
1500
|
+
selectedNodeId?: string;
|
|
1501
|
+
modal?: PHModal;
|
|
1502
|
+
selectedTimelineRevision?: string | number | null;
|
|
1503
|
+
revisionHistoryVisible?: boolean;
|
|
1504
|
+
selectedTimelineItem?: TimelineItem | null;
|
|
1505
|
+
features?: Map<string, boolean>;
|
|
1506
|
+
toast?: PHToastFn;
|
|
1507
|
+
};
|
|
1508
|
+
type PHGlobalKey = keyof PHGlobal;
|
|
1509
|
+
type PHGlobalValue = PHGlobal[PHGlobalKey];
|
|
1510
|
+
type UsePHGlobalValue<TValue extends PHGlobalValue> = () => TValue | undefined;
|
|
1511
|
+
type SetPHGlobalValue<TValue extends PHGlobalValue> = (value: TValue | undefined) => void;
|
|
1512
|
+
type AddPHGlobalEventHandler = () => void;
|
|
1513
|
+
type PHGlobalEventHandlerAdders = Record<PHGlobalKey, AddPHGlobalEventHandler>;
|
|
1514
|
+
type SetEvent<TKey extends PHGlobalKey> = CustomEvent<{ [key in TKey]: PHGlobal[TKey] | undefined }>;
|
|
1515
|
+
declare global {
|
|
1516
|
+
interface Window {
|
|
1517
|
+
ph?: PHGlobal;
|
|
1518
|
+
}
|
|
1519
|
+
} //# sourceMappingURL=global.d.ts.map
|
|
1520
|
+
//#endregion
|
|
1521
|
+
//#region src/hooks/document-cache.d.ts
|
|
1522
|
+
/** Returns all documents in the reactor. */
|
|
1523
|
+
declare const useDocumentCache: UsePHGlobalValue<IDocumentCache>;
|
|
1524
|
+
/** Sets all of the documents in the reactor. */
|
|
1525
|
+
declare const setDocumentCache: SetPHGlobalValue<IDocumentCache>;
|
|
1526
|
+
/** Adds an event handler for all of the documents in the reactor. */
|
|
1527
|
+
declare const addDocumentCacheEventHandler: () => void;
|
|
1528
|
+
/**
|
|
1529
|
+
* Retrieves a document from the reactor and subscribes to changes using React Suspense.
|
|
1530
|
+
* This hook will suspend rendering while the document is loading.
|
|
1531
|
+
* @param id - The document ID to retrieve, or null/undefined to skip retrieval
|
|
1532
|
+
* @returns The document if found, or undefined if id is null/undefined
|
|
1533
|
+
*/
|
|
1534
|
+
declare function useDocument(id: string | null | undefined): PHDocument$1 | undefined;
|
|
1535
|
+
/**
|
|
1536
|
+
* Retrieves multiple documents from the reactor using React Suspense.
|
|
1537
|
+
* This hook will suspend rendering while any of the documents are loading.
|
|
1538
|
+
*
|
|
1539
|
+
* Uses getBatch from the document cache which handles promise caching internally,
|
|
1540
|
+
* ensuring stable references for useSyncExternalStore.
|
|
1541
|
+
*
|
|
1542
|
+
* @param ids - Array of document IDs to retrieve, or null/undefined to skip retrieval
|
|
1543
|
+
* @returns An array of documents if found, or empty array if ids is null/undefined
|
|
1544
|
+
*/
|
|
1545
|
+
declare function useDocuments(ids: string[] | null | undefined): PHDocument$1[];
|
|
1546
|
+
/**
|
|
1547
|
+
* Returns a function to retrieve a document from the cache.
|
|
1548
|
+
* The returned function fetches and returns a document by ID.
|
|
1549
|
+
* @returns A function that takes a document ID and returns a Promise of the document
|
|
1550
|
+
*/
|
|
1551
|
+
declare function useGetDocument(): (id: string) => Promise<PHDocument$1>;
|
|
1552
|
+
/**
|
|
1553
|
+
* Returns a function to retrieve multiple documents from the cache.
|
|
1554
|
+
* The returned function fetches and returns documents by their IDs.
|
|
1555
|
+
* @returns A function that takes an array of document IDs and returns a Promise of the documents
|
|
1556
|
+
*/
|
|
1557
|
+
declare function useGetDocuments(): (ids: string[]) => Promise<PHDocument$1[]>;
|
|
1558
|
+
/**
|
|
1559
|
+
* Retrieves a document from the reactor without suspending rendering.
|
|
1560
|
+
* Returns the current state of the document loading operation.
|
|
1561
|
+
* @param id - The document ID to retrieve, or null/undefined to skip retrieval
|
|
1562
|
+
* @returns An object containing:
|
|
1563
|
+
* - status: "initial" | "pending" | "success" | "error"
|
|
1564
|
+
* - data: The document if successfully loaded
|
|
1565
|
+
* - isPending: Boolean indicating if the document is currently loading
|
|
1566
|
+
* - error: Any error that occurred during loading
|
|
1567
|
+
* - reload: Function to force reload the document from cache
|
|
1568
|
+
*/
|
|
1569
|
+
declare function useGetDocumentAsync(id: string | null | undefined): {
|
|
1570
|
+
readonly status: "initial";
|
|
1571
|
+
readonly data: undefined;
|
|
1572
|
+
readonly isPending: false;
|
|
1573
|
+
readonly error: undefined;
|
|
1574
|
+
readonly reload: undefined;
|
|
1575
|
+
} | {
|
|
1576
|
+
readonly reload: () => Promise<PHDocument$1>;
|
|
1577
|
+
readonly status: "pending";
|
|
1578
|
+
readonly isPending: true;
|
|
1579
|
+
readonly error: undefined;
|
|
1580
|
+
readonly data: undefined;
|
|
1581
|
+
} | {
|
|
1582
|
+
readonly reload: () => Promise<PHDocument$1>;
|
|
1583
|
+
readonly status: "success";
|
|
1584
|
+
readonly isPending: false;
|
|
1585
|
+
readonly error: undefined;
|
|
1586
|
+
readonly data: PHDocument$1;
|
|
1587
|
+
} | {
|
|
1588
|
+
readonly reload: () => Promise<PHDocument$1>;
|
|
1589
|
+
readonly status: "error";
|
|
1590
|
+
readonly isPending: false;
|
|
1591
|
+
readonly error: unknown;
|
|
1592
|
+
readonly data: undefined;
|
|
1593
|
+
};
|
|
1594
|
+
//#endregion
|
|
1595
|
+
//#region src/hooks/drives.d.ts
|
|
1596
|
+
/** Returns all of the drives in the reactor */
|
|
1597
|
+
declare const useDrives: UsePHGlobalValue<DocumentDriveDocument[]>;
|
|
1598
|
+
/** Sets the drives in the reactor */
|
|
1599
|
+
declare const setDrives: SetPHGlobalValue<DocumentDriveDocument[]>;
|
|
1600
|
+
/** Adds an event handler for the drives */
|
|
1601
|
+
declare const addDrivesEventHandler: () => void;
|
|
1602
|
+
//#endregion
|
|
1603
|
+
//#region src/hooks/loading.d.ts
|
|
1604
|
+
declare const useLoading: () => boolean | undefined, setLoading: (value: boolean | undefined) => void, addLoadingEventHandler: () => void;
|
|
1605
|
+
declare const loading: LOADING;
|
|
1606
|
+
//#endregion
|
|
1607
|
+
//#region src/hooks/reactor.d.ts
|
|
1608
|
+
/** Returns the reactor client module */
|
|
1609
|
+
declare const useReactorClientModule: UsePHGlobalValue$1<BrowserReactorClientModule$1>;
|
|
1610
|
+
/** Sets the reactor client module */
|
|
1611
|
+
declare const setReactorClientModule: SetPHGlobalValue$1<BrowserReactorClientModule$1>;
|
|
1612
|
+
/** Adds an event handler for the reactor client module */
|
|
1613
|
+
declare const addReactorClientModuleEventHandler: AddPHGlobalEventHandler$1;
|
|
1614
|
+
/** Returns the reactor client */
|
|
1615
|
+
declare const useReactorClient: UsePHGlobalValue$1<IReactorClient>;
|
|
1616
|
+
/** Sets the reactor client */
|
|
1617
|
+
declare const setReactorClient: SetPHGlobalValue$1<IReactorClient>;
|
|
1618
|
+
/** Adds an event handler for the reactor client */
|
|
1619
|
+
declare const addReactorClientEventHandler: AddPHGlobalEventHandler$1;
|
|
1620
|
+
declare const useSync: () => ISyncManager | undefined;
|
|
1621
|
+
declare const useSyncList: () => _powerhousedao_reactor0.Remote[];
|
|
1622
|
+
declare const useModelRegistry: () => IDocumentModelRegistry | undefined;
|
|
1623
|
+
declare const useDatabase: () => Kysely<Database$1> | undefined;
|
|
1624
|
+
declare const usePGlite: () => PGlite | undefined;
|
|
1625
|
+
//#endregion
|
|
1626
|
+
//#region src/hooks/connection-state.d.ts
|
|
1627
|
+
/**
|
|
1628
|
+
* Returns a map of remote name to connection state snapshot for all remotes.
|
|
1629
|
+
* Re-renders when any remote's connection state changes.
|
|
1630
|
+
*/
|
|
1631
|
+
declare function useConnectionStates(): ReadonlyMap<string, ConnectionStateSnapshot$1>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Returns the connection state snapshot for a specific remote by name.
|
|
1634
|
+
*/
|
|
1635
|
+
declare function useConnectionState(remoteName: string): ConnectionStateSnapshot$1 | undefined;
|
|
1636
|
+
//#endregion
|
|
1637
|
+
//#region src/hooks/renown.d.ts
|
|
1638
|
+
/** Adds an event handler for the renown instance */
|
|
1639
|
+
declare const addRenownEventHandler: () => void;
|
|
1640
|
+
/** Returns the renown instance */
|
|
1641
|
+
declare const useRenown: () => IRenown | LOADING | undefined;
|
|
1642
|
+
/** Sets the renown instance */
|
|
1643
|
+
declare const setRenown: (value: IRenown | LOADING | undefined) => void;
|
|
1644
|
+
/** Returns the DID from the renown instance */
|
|
1645
|
+
declare function useDid(): string | undefined;
|
|
1646
|
+
/** Returns the current user from the renown instance, subscribing to user events */
|
|
1647
|
+
declare function useUser(): User | undefined;
|
|
1648
|
+
/** Returns the login status, subscribing to renown status events */
|
|
1649
|
+
declare function useLoginStatus(): LoginStatus | "loading" | undefined;
|
|
1650
|
+
//#endregion
|
|
1651
|
+
//#region src/hooks/dispatch.d.ts
|
|
1652
|
+
/**
|
|
1653
|
+
* Returns a dispatch function for dispatching actions to a document.
|
|
1654
|
+
* Used internally by other hooks to provide action dispatching capabilities.
|
|
1655
|
+
* @param document - The document to dispatch actions to.
|
|
1656
|
+
* @returns A tuple containing the document and a dispatch function.
|
|
1657
|
+
*/
|
|
1658
|
+
type DispatchFn<TAction> = (actionOrActions: TAction[] | TAction | undefined, onErrors?: (errors: Error[]) => void, onSuccess?: (result: PHDocument$1) => void) => void;
|
|
1659
|
+
type UseDispatchResult<TDocument, TAction> = readonly [TDocument | undefined, DispatchFn<TAction>];
|
|
1660
|
+
declare function useDispatch<TDocument = PHDocument$1, TAction = Action>(document: TDocument | undefined): UseDispatchResult<TDocument, TAction>;
|
|
1661
|
+
//#endregion
|
|
1662
|
+
//#region src/hooks/document-by-id.d.ts
|
|
1663
|
+
/** Returns a document by id. */
|
|
1664
|
+
declare function useDocumentById(id: string | null | undefined): UseDispatchResult<PHDocument$1, Action>;
|
|
1665
|
+
/** Returns documents by ids. */
|
|
1666
|
+
declare function useDocumentsByIds(ids: string[] | null | undefined): PHDocument$1[];
|
|
1667
|
+
//#endregion
|
|
1668
|
+
//#region src/hooks/document-model-modules.d.ts
|
|
1669
|
+
declare function useDocumentModelModules(): VetraDocumentModelModule$1[] | undefined;
|
|
1670
|
+
declare function useDocumentModelModuleById(id: string | null | undefined): VetraDocumentModelModule$1 | undefined;
|
|
1671
|
+
//#endregion
|
|
1672
|
+
//#region src/hooks/document-of-type.d.ts
|
|
1673
|
+
/** Returns a document of a specific type, throws an error if the found document has a different type */
|
|
1674
|
+
declare function useDocumentOfType<TDocument extends PHDocument$1, TAction extends Action>(documentId: string | null | undefined, documentType: string | null | undefined): never[] | [TDocument, DocumentDispatch$1<TAction>];
|
|
1675
|
+
//#endregion
|
|
1676
|
+
//#region src/hooks/document-operations.d.ts
|
|
1677
|
+
type InternalState = {
|
|
1678
|
+
globalOperations: Operation[];
|
|
1679
|
+
localOperations: Operation[];
|
|
1680
|
+
isLoading: boolean;
|
|
1681
|
+
error: Error | undefined;
|
|
1682
|
+
};
|
|
1683
|
+
type DocumentOperationsState = InternalState & {
|
|
1684
|
+
refetch: () => void;
|
|
1685
|
+
};
|
|
1686
|
+
/**
|
|
1687
|
+
* Hook to fetch document operations via the reactor client.
|
|
1688
|
+
* Operations are no longer auto-populated on documents and must be fetched explicitly.
|
|
1689
|
+
*
|
|
1690
|
+
* @param documentId - The document ID to fetch operations for
|
|
1691
|
+
* @returns Object containing globalOperations, localOperations, isLoading, and error
|
|
1692
|
+
*/
|
|
1693
|
+
declare function useDocumentOperations(documentId: string | null | undefined): DocumentOperationsState;
|
|
1694
|
+
//#endregion
|
|
1695
|
+
//#region src/hooks/document-types.d.ts
|
|
1696
|
+
/** Returns the document types a drive editor supports.
|
|
1697
|
+
*
|
|
1698
|
+
* If present, uses the `allowedDocumentTypes` config value.
|
|
1699
|
+
* Otherwise, uses the supported document types from the reactor.
|
|
1700
|
+
*/
|
|
1701
|
+
declare function useDocumentTypes(): string[] | undefined;
|
|
1702
|
+
//#endregion
|
|
1703
|
+
//#region src/hooks/drive-by-id.d.ts
|
|
1704
|
+
declare function useDriveById(driveId: string | undefined | null): [DocumentDriveDocument, DocumentDispatch<DocumentDriveAction>];
|
|
1705
|
+
//#endregion
|
|
1706
|
+
//#region src/hooks/editor-modules.d.ts
|
|
1707
|
+
declare function useEditorModules(): VetraEditorModule[] | undefined;
|
|
1708
|
+
declare function useDriveEditorModules(): VetraEditorModule[] | undefined;
|
|
1709
|
+
declare function useFallbackEditorModule(documentType: string | null | undefined): VetraEditorModule | undefined;
|
|
1710
|
+
declare function useDriveEditorModuleById(id: string | null | undefined): VetraEditorModule | undefined;
|
|
1711
|
+
declare function useDefaultDriveEditorModule(): VetraEditorModule | undefined;
|
|
1712
|
+
declare function useEditorModuleById(id: string | null | undefined): VetraEditorModule | undefined;
|
|
1713
|
+
declare function useEditorModulesForDocumentType(documentType: string | null | undefined): VetraEditorModule[] | undefined;
|
|
1714
|
+
//#endregion
|
|
1715
|
+
//#region src/hooks/features.d.ts
|
|
1716
|
+
declare const useFeatures: UsePHGlobalValue<Map<string, boolean>>;
|
|
1717
|
+
declare const setFeatures: SetPHGlobalValue<Map<string, boolean>>;
|
|
1718
|
+
declare const addFeaturesEventHandler: AddPHGlobalEventHandler;
|
|
1719
|
+
//#endregion
|
|
1720
|
+
//#region src/hooks/folder-by-id.d.ts
|
|
1721
|
+
declare function useFolderById(id: string | null | undefined): FolderNode | undefined;
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region src/hooks/import-script-modules.d.ts
|
|
1724
|
+
declare function useImportScriptModules(): ImportScriptModule[] | undefined;
|
|
1725
|
+
//#endregion
|
|
1726
|
+
//#region src/hooks/items-in-selected-drive.d.ts
|
|
1727
|
+
/** Returns the nodes in the selected drive. */
|
|
1728
|
+
declare function useNodesInSelectedDrive(): any;
|
|
1729
|
+
/** Returns the file nodes in the selected drive. */
|
|
1730
|
+
declare function useFileNodesInSelectedDrive(): FileNode[] | undefined;
|
|
1731
|
+
/** Returns the folder nodes in the selected drive. */
|
|
1732
|
+
declare function useFolderNodesInSelectedDrive(): FolderNode[] | undefined;
|
|
1733
|
+
/** Returns the documents in the selected drive. */
|
|
1734
|
+
declare function useDocumentsInSelectedDrive(): PHDocument$1[] | undefined;
|
|
1735
|
+
/** Returns the document types supported by the selected drive, as defined by the document model documents present in the drive */
|
|
1736
|
+
declare function useDocumentTypesInSelectedDrive(): string[] | undefined;
|
|
1737
|
+
//#endregion
|
|
1738
|
+
//#region src/hooks/items-in-selected-folder.d.ts
|
|
1739
|
+
/** Returns the nodes in the selected folder. */
|
|
1740
|
+
declare function useNodesInSelectedFolder(): Node[] | undefined;
|
|
1741
|
+
/** Returns the file nodes in the selected folder. */
|
|
1742
|
+
declare function useFileNodesInSelectedFolder(): FileNode[] | undefined;
|
|
1743
|
+
/** Returns the folder nodes in the selected folder. */
|
|
1744
|
+
declare function useFolderNodesInSelectedFolder(): FolderNode[] | undefined;
|
|
1745
|
+
/** Returns the documents in the selected folder. */
|
|
1746
|
+
declare function useDocumentsInSelectedFolder(): PHDocument$1[] | undefined;
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region src/hooks/make-ph-event-functions.d.ts
|
|
1749
|
+
declare function makePHEventFunctions<TKey extends PHGlobalKey$1>(key: TKey): {
|
|
1750
|
+
useValue: () => PHGlobal$1[TKey] | undefined;
|
|
1751
|
+
setValue: (value: PHGlobal$1[TKey] | undefined) => void;
|
|
1752
|
+
addEventHandler: () => void;
|
|
1753
|
+
};
|
|
1754
|
+
//#endregion
|
|
1755
|
+
//#region src/hooks/modals.d.ts
|
|
1756
|
+
/** Returns the current modal */
|
|
1757
|
+
declare const usePHModal: () => PHModal$1 | undefined;
|
|
1758
|
+
/** Sets the current modal */
|
|
1759
|
+
declare const setPHModal: (value: PHModal$1 | undefined) => void;
|
|
1760
|
+
/** Adds an event handler for the modal */
|
|
1761
|
+
declare const addModalEventHandler: () => void;
|
|
1762
|
+
/** Shows a modal */
|
|
1763
|
+
declare function showPHModal(modal: PHModal$1): void;
|
|
1764
|
+
/** Closes the current modal */
|
|
1765
|
+
declare function closePHModal(): void;
|
|
1766
|
+
/** Shows the create document modal */
|
|
1767
|
+
declare function showCreateDocumentModal(documentType: string): void;
|
|
1768
|
+
/** Shows the delete node modal */
|
|
1769
|
+
declare function showDeleteNodeModal(nodeOrId: Node | string): void;
|
|
1770
|
+
//#endregion
|
|
1771
|
+
//#region src/hooks/node-actions.d.ts
|
|
1772
|
+
declare function useNodeActions(): {
|
|
1773
|
+
onAddFile: (file: File, parent: Node | undefined) => Promise<void>;
|
|
1774
|
+
onAddFolder: (name: string, parent: Node | undefined) => Promise<_powerhousedao_shared_document_drive0.FolderNode | undefined>;
|
|
1775
|
+
onRenameNode: (newName: string, node: Node) => Promise<Node | undefined>;
|
|
1776
|
+
onCopyNode: (src: Node, target: Node | undefined) => Promise<void>;
|
|
1777
|
+
onMoveNode: (src: Node, target: Node | undefined) => Promise<void>;
|
|
1778
|
+
onDuplicateNode: (src: Node) => Promise<void>;
|
|
1779
|
+
onAddAndSelectNewFolder: (name: string) => Promise<void>;
|
|
1780
|
+
onRenameDriveNodes: (newName: string, nodeId: string) => Promise<void>;
|
|
1781
|
+
};
|
|
1782
|
+
//#endregion
|
|
1783
|
+
//#region src/hooks/node-by-id.d.ts
|
|
1784
|
+
/** Returns a node in the selected drive by id. */
|
|
1785
|
+
declare function useNodeById(id: string | null | undefined): Node | undefined;
|
|
1786
|
+
//#endregion
|
|
1787
|
+
//#region src/hooks/node-path.d.ts
|
|
1788
|
+
/** Returns the path to a node in the selected drive */
|
|
1789
|
+
declare function useNodePathById(id: string | null | undefined): Node[];
|
|
1790
|
+
/** Returns the path to the currently selected node in the selected drive. */
|
|
1791
|
+
declare function useSelectedNodePath(): Node[];
|
|
1792
|
+
//#endregion
|
|
1793
|
+
//#region src/hooks/parent-folder.d.ts
|
|
1794
|
+
declare function useNodeParentFolderById(id: string | null | undefined): FolderNode | undefined;
|
|
1795
|
+
declare function useParentFolderForSelectedNode(): FolderNode | undefined;
|
|
1796
|
+
//#endregion
|
|
1797
|
+
//#region src/hooks/revision-history.d.ts
|
|
1798
|
+
/** Returns whether revision history is visible */
|
|
1799
|
+
declare const useRevisionHistoryVisible: () => boolean | undefined;
|
|
1800
|
+
/** Sets revision history visibility */
|
|
1801
|
+
declare const setRevisionHistoryVisible: (value: boolean | undefined) => void;
|
|
1802
|
+
/** Adds event handler for revision history visibility */
|
|
1803
|
+
declare const addRevisionHistoryVisibleEventHandler: () => void;
|
|
1804
|
+
/** Shows the revision history */
|
|
1805
|
+
declare function showRevisionHistory(): void;
|
|
1806
|
+
/** Hides the revision history */
|
|
1807
|
+
declare function hideRevisionHistory(): void;
|
|
1808
|
+
//#endregion
|
|
1809
|
+
//#region src/hooks/selected-document.d.ts
|
|
1810
|
+
/** Returns the selected document id */
|
|
1811
|
+
declare function useSelectedDocumentId(): string | undefined;
|
|
1812
|
+
/** Returns the selected document. */
|
|
1813
|
+
declare function useSelectedDocument(): readonly [PHDocument$1, DispatchFn<Action>];
|
|
1814
|
+
/** Returns the selected document. */
|
|
1815
|
+
declare function useSelectedDocumentSafe(): UseDispatchResult<PHDocument$1, Action>;
|
|
1816
|
+
/** Returns the selected document of a specific type, throws an error if the found document has a different type */
|
|
1817
|
+
declare function useSelectedDocumentOfType(documentType: null | undefined): never[];
|
|
1818
|
+
declare function useSelectedDocumentOfType<TDocument extends PHDocument$1, TAction extends Action>(documentType: string): [TDocument, DocumentDispatch$1<TAction>];
|
|
1819
|
+
//#endregion
|
|
1820
|
+
//#region src/hooks/selected-drive.d.ts
|
|
1821
|
+
/** Returns the selected drive id */
|
|
1822
|
+
declare const useSelectedDriveId: () => string | undefined;
|
|
1823
|
+
/** Adds an event handler for the selected drive id */
|
|
1824
|
+
declare const addSelectedDriveIdEventHandler: () => void;
|
|
1825
|
+
/** Returns the selected drive */
|
|
1826
|
+
declare function useSelectedDrive(): readonly [undefined, undefined] | [PHDocument<any>, DocumentDispatch$1<any>];
|
|
1827
|
+
/** Returns the selected drive, or undefined if no drive is selected */
|
|
1828
|
+
declare function useSelectedDriveSafe(): readonly [undefined, undefined] | [PHDocument<any>, DocumentDispatch$1<any>];
|
|
1829
|
+
declare function setSelectedDrive(driveOrDriveSlug: string | DocumentDriveDocument | undefined): void;
|
|
1830
|
+
declare function addSetSelectedDriveOnPopStateEventHandler(): void;
|
|
1831
|
+
//#endregion
|
|
1832
|
+
//#region src/hooks/selected-folder.d.ts
|
|
1833
|
+
/** Returns the selected folder. */
|
|
1834
|
+
declare function useSelectedFolder(): FolderNode | undefined;
|
|
1835
|
+
//#endregion
|
|
1836
|
+
//#region src/hooks/selected-node.d.ts
|
|
1837
|
+
declare const addSelectedNodeIdEventHandler: () => void;
|
|
1838
|
+
/** Returns the selected node. */
|
|
1839
|
+
declare function useSelectedNode(): Node | undefined;
|
|
1840
|
+
/** Sets the selected node (file or folder). */
|
|
1841
|
+
declare function setSelectedNode(nodeOrNodeSlug: Node | string | undefined): void;
|
|
1842
|
+
declare function addResetSelectedNodeEventHandler(): void;
|
|
1843
|
+
declare function addSetSelectedNodeOnPopStateEventHandler(): void;
|
|
1844
|
+
//#endregion
|
|
1845
|
+
//#region src/hooks/selected-timeline-item.d.ts
|
|
1846
|
+
/** Returns the selected timeline item */
|
|
1847
|
+
declare const useSelectedTimelineItem: () => TimelineItem | null | undefined;
|
|
1848
|
+
/** Sets the selected timeline item */
|
|
1849
|
+
declare const setSelectedTimelineItem: (value: TimelineItem | null | undefined) => void;
|
|
1850
|
+
/** Adds event handler for selected timeline item */
|
|
1851
|
+
declare const addSelectedTimelineItemEventHandler: () => void;
|
|
1852
|
+
//#endregion
|
|
1853
|
+
//#region src/hooks/subgraph-modules.d.ts
|
|
1854
|
+
declare function useSubgraphModules(): SubgraphModule[] | undefined;
|
|
1855
|
+
//#endregion
|
|
1856
|
+
//#region src/hooks/supported-document-types.d.ts
|
|
1857
|
+
/** Returns the supported document types for the reactor (derived from the document model modules) */
|
|
1858
|
+
declare function useSupportedDocumentTypesInReactor(): string[] | undefined;
|
|
1859
|
+
//#endregion
|
|
1860
|
+
//#region src/hooks/timeline-revision.d.ts
|
|
1861
|
+
/** Returns the selected timeline revision. */
|
|
1862
|
+
declare const useSelectedTimelineRevision: () => string | number | null | undefined;
|
|
1863
|
+
/** Sets the selected timeline revision. */
|
|
1864
|
+
declare const setSelectedTimelineRevision: (value: string | number | null | undefined) => void;
|
|
1865
|
+
/** Adds an event handler for the selected timeline revision. */
|
|
1866
|
+
declare const addSelectedTimelineRevisionEventHandler: () => void;
|
|
1867
|
+
//#endregion
|
|
1868
|
+
//#region src/hooks/toast.d.ts
|
|
1869
|
+
/** Returns the toast function */
|
|
1870
|
+
declare const usePHToast: () => PHToastFn | undefined;
|
|
1871
|
+
/** Sets the toast function */
|
|
1872
|
+
declare const setPHToast: (value: PHToastFn | undefined) => void;
|
|
1873
|
+
/** Adds an event handler for the toast */
|
|
1874
|
+
declare const addToastEventHandler: () => void;
|
|
1875
|
+
//#endregion
|
|
1876
|
+
//#region src/hooks/use-feature-flags.d.ts
|
|
1877
|
+
/**
|
|
1878
|
+
* Synchronous helper to check if inspector is enabled.
|
|
1879
|
+
*/
|
|
1880
|
+
declare function isInspectorEnabledSync(): boolean;
|
|
1881
|
+
/**
|
|
1882
|
+
* React hook to check if inspector is enabled.
|
|
1883
|
+
*/
|
|
1884
|
+
declare function useInspectorEnabled(): boolean;
|
|
1885
|
+
//#endregion
|
|
1886
|
+
//#region src/hooks/use-get-switchboard-link.d.ts
|
|
1887
|
+
/**
|
|
1888
|
+
* Hook that returns a function to generate a document's switchboard URL.
|
|
1889
|
+
* Only returns a function for documents in remote drives.
|
|
1890
|
+
* Returns null for local drives or when the document/drive cannot be determined.
|
|
1891
|
+
*
|
|
1892
|
+
* The returned function generates a fresh bearer token and builds the switchboard URL
|
|
1893
|
+
* with authentication when called.
|
|
1894
|
+
*
|
|
1895
|
+
* @param document - The document to create a switchboard URL generator for
|
|
1896
|
+
* @returns An async function that returns the switchboard URL, or null if not applicable
|
|
1897
|
+
*/
|
|
1898
|
+
declare function useGetSwitchboardLink(document: PHDocument$1 | undefined): (() => Promise<string>) | null;
|
|
1899
|
+
//#endregion
|
|
1900
|
+
//#region src/types/upload.d.ts
|
|
1901
|
+
type DocumentTypeIcon = "analytics-processor" | "relational-processor" | "codegen-processor" | "app" | "document-model" | "editor" | "package" | "subgraph";
|
|
1902
|
+
type ConflictResolution = "replace" | "duplicate";
|
|
1903
|
+
interface FileUploadProgress {
|
|
1904
|
+
stage: "loading" | "initializing" | "uploading" | "complete" | "failed" | "conflict" | "unsupported-document-type";
|
|
1905
|
+
progress: number;
|
|
1906
|
+
totalOperations?: number;
|
|
1907
|
+
uploadedOperations?: number;
|
|
1908
|
+
message?: string;
|
|
1909
|
+
error?: string;
|
|
1910
|
+
documentType?: DocumentTypeIcon;
|
|
1911
|
+
duplicateType?: "id" | "name";
|
|
1912
|
+
}
|
|
1913
|
+
type FileUploadProgressCallback = (progress: FileUploadProgress) => void;
|
|
1914
|
+
type UseOnDropFile = () => (file: File, onProgress?: FileUploadProgressCallback, resolveConflict?: ConflictResolution) => Promise<FileNode | undefined>;
|
|
1915
|
+
//#endregion
|
|
1916
|
+
//#region src/hooks/use-on-drop-file.d.ts
|
|
1917
|
+
declare const useOnDropFile: UseOnDropFile;
|
|
1918
|
+
//#endregion
|
|
1919
|
+
//#region src/hooks/user-permissions.d.ts
|
|
1920
|
+
declare function useUserPermissions(): {
|
|
1921
|
+
isAllowedToCreateDocuments: boolean;
|
|
1922
|
+
isAllowedToEditDocuments: boolean;
|
|
1923
|
+
};
|
|
1924
|
+
//#endregion
|
|
1925
|
+
//#region src/hooks/vetra-packages.d.ts
|
|
1926
|
+
declare const useVetraPackageManager: () => IPackageManager | undefined;
|
|
1927
|
+
/** Returns all of the Vetra packages loaded by the Connect instance */
|
|
1928
|
+
declare const useVetraPackages: () => VetraPackage[];
|
|
1929
|
+
/** Adds the Vetra package manager event handler */
|
|
1930
|
+
declare const addVetraPackageManagerEventHandler: () => void;
|
|
1931
|
+
/** Sets the Vetra package manager and registers its packages */
|
|
1932
|
+
declare function setVetraPackageManager(packageManager: IPackageManager): void;
|
|
1933
|
+
//#endregion
|
|
1934
|
+
//#region src/pglite/drop.d.ts
|
|
1935
|
+
declare function truncateAllTables(pg: PGlite, schema?: string): Promise<void>;
|
|
1936
|
+
declare function dropAllReactorStorage(pg: PGlite): Promise<void>;
|
|
1937
|
+
//#endregion
|
|
1938
|
+
//#region src/reactor.d.ts
|
|
1939
|
+
type ReactorDefaultDrivesConfig = {
|
|
1940
|
+
defaultDrivesUrl?: string[];
|
|
1941
|
+
};
|
|
1942
|
+
type RefreshReactorDataConfig = {
|
|
1943
|
+
debounceDelayMs?: number;
|
|
1944
|
+
immediateThresholdMs?: number;
|
|
1945
|
+
};
|
|
1946
|
+
declare const refreshReactorData: (reactor: IReactorClient, immediate?: boolean) => Promise<void>;
|
|
1947
|
+
declare const refreshReactorDataClient: (reactor: IReactorClient | undefined, immediate?: boolean) => Promise<void>;
|
|
1948
|
+
/**
|
|
1949
|
+
* @deprecated Use {@link initRenownCrypto} instead
|
|
1950
|
+
*
|
|
1951
|
+
* Initialize ConnectCrypto
|
|
1952
|
+
* @returns ConnectCrypto instance
|
|
1953
|
+
*/
|
|
1954
|
+
declare function initConnectCrypto(): Promise<_renown_sdk0.RenownCrypto>;
|
|
1955
|
+
/**
|
|
1956
|
+
* Initialize RenownCrypto
|
|
1957
|
+
* @returns RenownCrypto instance
|
|
1958
|
+
*/
|
|
1959
|
+
declare function initRenownCrypto(): Promise<_renown_sdk0.RenownCrypto>;
|
|
1960
|
+
//#endregion
|
|
1961
|
+
//#region src/registry/types.d.ts
|
|
1962
|
+
interface RegistryPackageInfo {
|
|
1963
|
+
name: string;
|
|
1964
|
+
description?: string;
|
|
1965
|
+
version?: string;
|
|
1966
|
+
category?: string;
|
|
1967
|
+
publisher?: string;
|
|
1968
|
+
publisherUrl?: string;
|
|
1969
|
+
}
|
|
1970
|
+
interface PublishEvent {
|
|
1971
|
+
packageName: string;
|
|
1972
|
+
version: string | null;
|
|
1973
|
+
}
|
|
1974
|
+
//#endregion
|
|
1975
|
+
//#region src/registry/client.d.ts
|
|
1976
|
+
declare class RegistryClient {
|
|
1977
|
+
readonly apiUrl: string;
|
|
1978
|
+
constructor(cdnUrl: string);
|
|
1979
|
+
getPackages(): Promise<RegistryPackageInfo[]>;
|
|
1980
|
+
getPackagesByDocumentType(documentType: string): Promise<string[]>;
|
|
1981
|
+
searchPackages(query: string): Promise<RegistryPackageInfo[]>;
|
|
1982
|
+
onPublish(callback: (event: PublishEvent) => void): () => void;
|
|
1983
|
+
}
|
|
1984
|
+
//#endregion
|
|
1985
|
+
//#region src/registry/fetchers.d.ts
|
|
1986
|
+
declare function getPackages(registryUrl: string): Promise<PackageInfo[]>;
|
|
1987
|
+
declare function getPackagesByDocumentType(registryUrl: string, documentType: string): Promise<string[]>;
|
|
1988
|
+
//#endregion
|
|
1989
|
+
//#region src/relational/hooks/useRelationalDb.d.ts
|
|
1990
|
+
type RelationalDbWithLive<Schema> = IRelationalDb$1<Schema> & {
|
|
1991
|
+
live: LiveNamespace;
|
|
1992
|
+
};
|
|
1993
|
+
interface IRelationalDbState<Schema> {
|
|
1994
|
+
db: RelationalDbWithLive<Schema> | null;
|
|
1995
|
+
isLoading: boolean;
|
|
1996
|
+
error: Error | null;
|
|
1997
|
+
}
|
|
1998
|
+
declare const useRelationalDb: <Schema>() => IRelationalDbState<Schema>;
|
|
1999
|
+
//#endregion
|
|
2000
|
+
//#region src/relational/hooks/useRelationalQuery.d.ts
|
|
2001
|
+
type QueryCallbackReturnType = {
|
|
2002
|
+
sql: string;
|
|
2003
|
+
parameters?: readonly unknown[];
|
|
2004
|
+
};
|
|
2005
|
+
type useRelationalQueryOptions = {
|
|
2006
|
+
hashNamespace?: boolean;
|
|
2007
|
+
};
|
|
2008
|
+
declare function useRelationalQuery<Schema, T = unknown, TParams = undefined>(ProcessorClass: RelationalDbProcessorClass<Schema>, driveId: string, queryCallback: (db: IRelationalQueryBuilder<Schema>, parameters?: TParams) => QueryCallbackReturnType, parameters?: TParams, options?: useRelationalQueryOptions): {
|
|
2009
|
+
readonly isLoading: boolean;
|
|
2010
|
+
readonly error: Error | null;
|
|
2011
|
+
readonly result: LiveQueryResults<T> | null;
|
|
2012
|
+
};
|
|
2013
|
+
//#endregion
|
|
2014
|
+
//#region src/relational/utils/createProcessorQuery.d.ts
|
|
2015
|
+
declare function createProcessorQuery<TSchema>(ProcessorClass: RelationalDbProcessorClass<TSchema>): {
|
|
2016
|
+
<TQueryBuilder extends (db: IRelationalQueryBuilder<TSchema>) => QueryCallbackReturnType$1>(driveId: string, queryCallback: TQueryBuilder): {
|
|
2017
|
+
isLoading: boolean;
|
|
2018
|
+
error: Error | null;
|
|
2019
|
+
result: LiveQueryResults<ReturnType<TQueryBuilder> extends CompiledQuery<infer R> ? R : any> | null;
|
|
2020
|
+
};
|
|
2021
|
+
<TParams, TQueryBuilder extends (db: IRelationalQueryBuilder<TSchema>, parameters: TParams) => QueryCallbackReturnType$1>(driveId: string, queryCallback: TQueryBuilder, parameters: TParams, options?: useRelationalQueryOptions$1): {
|
|
2022
|
+
isLoading: boolean;
|
|
2023
|
+
error: Error | null;
|
|
2024
|
+
result: LiveQueryResults<ReturnType<TQueryBuilder> extends CompiledQuery<infer R> ? R : any> | null;
|
|
2025
|
+
};
|
|
2026
|
+
};
|
|
2027
|
+
//#endregion
|
|
2028
|
+
//#region src/remote-controller/types.d.ts
|
|
2029
|
+
type RemoteDocumentData = PhDocumentFieldsFragment;
|
|
2030
|
+
type RemoteOperation = GetDocumentOperationsQuery["documentOperations"]["items"][number];
|
|
2031
|
+
type RemoteOperationResultPage = GetDocumentOperationsQuery["documentOperations"];
|
|
2032
|
+
/**
|
|
2033
|
+
* Options for creating a RemoteDocumentController.
|
|
2034
|
+
*/
|
|
2035
|
+
type RemoteControllerOptions = {
|
|
2036
|
+
client: ReactorGraphQLClient; /** Remote document id. Omit for new documents. */
|
|
2037
|
+
documentId?: string; /** "batch" requires explicit push(), "streaming" auto-pushes after actions. Defaults to "batch" */
|
|
2038
|
+
mode?: "batch" | "streaming"; /** Optional signer for action signing. */
|
|
2039
|
+
signer?: ISigner; /** Branch name, defaults to "main". */
|
|
2040
|
+
branch?: string; /** Parent document identifier for creating new documents. */
|
|
2041
|
+
parentIdentifier?: string; /** Conflict resolution strategy when remote has new operations. Default: no check (current behavior). */
|
|
2042
|
+
onConflict?: ConflictStrategy; /** Called when a streaming-mode push fails. If not provided, errors are silently swallowed. */
|
|
2043
|
+
onPushError?: (error: unknown) => void; /** Number of operations to fetch per page. Defaults to 100. */
|
|
2044
|
+
operationsPageSize?: number;
|
|
2045
|
+
};
|
|
2046
|
+
/**
|
|
2047
|
+
* Result of a push operation.
|
|
2048
|
+
*/
|
|
2049
|
+
type PushResult = {
|
|
2050
|
+
remoteDocument: RemoteDocumentData;
|
|
2051
|
+
actionCount: number; /** The actions that were sent to the server (after signing, if applicable). */
|
|
2052
|
+
operations: ReadonlyArray<Action>;
|
|
2053
|
+
};
|
|
2054
|
+
/**
|
|
2055
|
+
* Sync status of the controller.
|
|
2056
|
+
*/
|
|
2057
|
+
type SyncStatus = {
|
|
2058
|
+
pendingActionCount: number;
|
|
2059
|
+
connected: boolean;
|
|
2060
|
+
documentId: string;
|
|
2061
|
+
remoteRevision: Record<string, number>;
|
|
2062
|
+
};
|
|
2063
|
+
/**
|
|
2064
|
+
* A tracked action with operation context for signing.
|
|
2065
|
+
*/
|
|
2066
|
+
type TrackedAction = {
|
|
2067
|
+
action: Action;
|
|
2068
|
+
prevOpHash: string;
|
|
2069
|
+
prevOpIndex: number;
|
|
2070
|
+
};
|
|
2071
|
+
/** Information about a detected conflict. */
|
|
2072
|
+
type ConflictInfo = {
|
|
2073
|
+
/** Remote operations added since the last pull, grouped by scope. */remoteOperations: Record<string, RemoteOperation[]>; /** Local actions pending push. */
|
|
2074
|
+
localActions: TrackedAction[]; /** Remote revision at last pull. */
|
|
2075
|
+
knownRevision: Record<string, number>; /** Current remote revision. */
|
|
2076
|
+
currentRevision: Record<string, number>;
|
|
2077
|
+
};
|
|
2078
|
+
/** Custom merge handler receives conflict info and returns actions to push (or throws to abort). */
|
|
2079
|
+
type MergeHandler = (conflict: ConflictInfo) => Action[] | Promise<Action[]>;
|
|
2080
|
+
/** Conflict resolution strategy. */
|
|
2081
|
+
type ConflictStrategy = "reject" | "rebase" | MergeHandler;
|
|
2082
|
+
/** Event emitted when the document changes. */
|
|
2083
|
+
type RemoteDocumentChangeEvent = {
|
|
2084
|
+
source: "action" | "pull";
|
|
2085
|
+
document: PHDocument$1<PHBaseState>;
|
|
2086
|
+
};
|
|
2087
|
+
/** Listener for document change events. */
|
|
2088
|
+
type DocumentChangeListener = (event: RemoteDocumentChangeEvent) => void;
|
|
2089
|
+
/** Result of fetching operations. */
|
|
2090
|
+
type GetOperationsResult = {
|
|
2091
|
+
operationsByScope: Record<string, RemoteOperation[]>;
|
|
2092
|
+
};
|
|
2093
|
+
/** Result of fetching a document together with its operations. */
|
|
2094
|
+
type GetDocumentWithOperationsResult = {
|
|
2095
|
+
document: RemoteDocumentData;
|
|
2096
|
+
childIds: ReadonlyArray<string>;
|
|
2097
|
+
operations: GetOperationsResult;
|
|
2098
|
+
};
|
|
2099
|
+
interface IRemoteClient {
|
|
2100
|
+
getDocument(identifier: string, branch?: string): Promise<GetDocumentResult | null>;
|
|
2101
|
+
/** Fetch document metadata and operations in a single call. */
|
|
2102
|
+
getDocumentWithOperations(identifier: string, branch?: string, sinceRevision?: Record<string, number>, scopes?: string[]): Promise<GetDocumentWithOperationsResult | null>;
|
|
2103
|
+
getAllOperations(documentId: string, branch?: string, sinceRevision?: Record<string, number>, scopes?: string[]): Promise<GetOperationsResult>;
|
|
2104
|
+
pushActions(documentIdentifier: string, actions: ReadonlyArray<NonNullable<unknown>>, branch?: string): Promise<RemoteDocumentData>;
|
|
2105
|
+
createDocument(document: NonNullable<unknown>, parentIdentifier?: string): Promise<RemoteDocumentData>;
|
|
2106
|
+
createEmptyDocument(documentType: string, parentIdentifier?: string): Promise<RemoteDocumentData>;
|
|
2107
|
+
deleteDocument(identifier: string, propagate?: PropagationMode): Promise<boolean>;
|
|
2108
|
+
}
|
|
2109
|
+
type GetDocumentResult = {
|
|
2110
|
+
document: RemoteDocumentData;
|
|
2111
|
+
childIds: ReadonlyArray<string>;
|
|
2112
|
+
};
|
|
2113
|
+
interface IRemoteController<TState extends PHBaseState = PHBaseState> {
|
|
2114
|
+
readonly header: PHDocumentHeader;
|
|
2115
|
+
readonly state: TState;
|
|
2116
|
+
readonly operations: DocumentOperations;
|
|
2117
|
+
readonly document: PHDocument$1<TState>;
|
|
2118
|
+
readonly status: SyncStatus;
|
|
2119
|
+
onChange(listener: DocumentChangeListener): () => void;
|
|
2120
|
+
push(): Promise<PushResult>;
|
|
2121
|
+
pull(): Promise<RemoteDocumentData>;
|
|
2122
|
+
delete(propagate?: PropagationMode): Promise<boolean>;
|
|
2123
|
+
}
|
|
2124
|
+
//#endregion
|
|
2125
|
+
//#region src/remote-controller/action-tracker.d.ts
|
|
2126
|
+
/**
|
|
2127
|
+
* Tracks pending actions with their operation context (prevOpHash, prevOpIndex).
|
|
2128
|
+
* Actions are accumulated until flushed (on push).
|
|
2129
|
+
*/
|
|
2130
|
+
declare class ActionTracker {
|
|
2131
|
+
private pending;
|
|
2132
|
+
/** Track a new action with its operation context. */
|
|
2133
|
+
track(action: Action, prevOpHash: string, prevOpIndex: number): void;
|
|
2134
|
+
/** Flush all pending actions and return them. Clears the internal queue. */
|
|
2135
|
+
flush(): TrackedAction[];
|
|
2136
|
+
/** Number of pending actions. */
|
|
2137
|
+
get count(): number;
|
|
2138
|
+
/** Prepend previously flushed actions back to the queue (for retry on failure). */
|
|
2139
|
+
restore(actions: TrackedAction[]): void;
|
|
2140
|
+
/** Clear all pending actions without returning them. */
|
|
2141
|
+
clear(): void;
|
|
2142
|
+
}
|
|
2143
|
+
//#endregion
|
|
2144
|
+
//#region src/remote-controller/remote-client.d.ts
|
|
2145
|
+
declare class RemoteClient implements IRemoteClient {
|
|
2146
|
+
private readonly client;
|
|
2147
|
+
private readonly pageSize;
|
|
2148
|
+
constructor(client: ReactorGraphQLClient, pageSize?: number);
|
|
2149
|
+
/** Fetch a document by identifier. Returns null if not found. */
|
|
2150
|
+
getDocument(identifier: string, branch?: string): Promise<GetDocumentResult | null>;
|
|
2151
|
+
/**
|
|
2152
|
+
* Fetch a document and its operations.
|
|
2153
|
+
*
|
|
2154
|
+
* When scopes are provided and BatchGetDocumentWithOperations is available,
|
|
2155
|
+
* fetches the document and per-scope operations in a single HTTP request.
|
|
2156
|
+
* Otherwise falls back to GetDocumentWithOperations for the first page,
|
|
2157
|
+
* then paginates remaining operations per scope.
|
|
2158
|
+
*/
|
|
2159
|
+
getDocumentWithOperations(identifier: string, branch?: string, sinceRevision?: Record<string, number>, scopes?: string[]): Promise<GetDocumentWithOperationsResult | null>;
|
|
2160
|
+
/**
|
|
2161
|
+
* Fetch document + per-scope operations in a single HTTP request
|
|
2162
|
+
* via BatchGetDocumentWithOperations, then paginate any remaining pages.
|
|
2163
|
+
*/
|
|
2164
|
+
private batchGetDocumentWithOperations;
|
|
2165
|
+
/**
|
|
2166
|
+
* Fetch all operations for a document, paginating through all pages.
|
|
2167
|
+
* Each scope is queried individually because the API only returns
|
|
2168
|
+
* pagination cursors for single-scope queries.
|
|
2169
|
+
*/
|
|
2170
|
+
getAllOperations(documentId: string, branch?: string, sinceRevision?: Record<string, number>, scopes?: string[]): Promise<GetOperationsResult>;
|
|
2171
|
+
/**
|
|
2172
|
+
* Fetch one page of operations per filter.
|
|
2173
|
+
* Uses the composed query (single HTTP request) when available,
|
|
2174
|
+
* otherwise falls back to parallel individual requests.
|
|
2175
|
+
*/
|
|
2176
|
+
private fetchOperationPages;
|
|
2177
|
+
/** Fetch all pages of operations for a single scope (or all scopes if none specified). */
|
|
2178
|
+
private fetchOperationsForScope;
|
|
2179
|
+
/** Push actions to an existing document via MutateDocument. */
|
|
2180
|
+
pushActions(documentIdentifier: string, actions: ReadonlyArray<NonNullable<unknown>>, branch?: string): Promise<RemoteDocumentData>;
|
|
2181
|
+
/** Create a new document on the remote. */
|
|
2182
|
+
createDocument(document: NonNullable<unknown>, parentIdentifier?: string): Promise<RemoteDocumentData>;
|
|
2183
|
+
/** Create an empty document of a given type on the remote. */
|
|
2184
|
+
createEmptyDocument(documentType: string, parentIdentifier?: string): Promise<RemoteDocumentData>;
|
|
2185
|
+
/** Delete a document on the remote. Returns true if successful. */
|
|
2186
|
+
deleteDocument(identifier: string, propagate?: PropagationMode): Promise<boolean>;
|
|
2187
|
+
}
|
|
2188
|
+
//#endregion
|
|
2189
|
+
//#region src/remote-controller/remote-controller.d.ts
|
|
2190
|
+
/** Extract TState from a PHDocumentController subclass. */
|
|
2191
|
+
type InferState<C> = C extends PHDocumentController<infer S> ? S : never;
|
|
2192
|
+
/**
|
|
2193
|
+
* Extract action methods from a controller type.
|
|
2194
|
+
* These are the dynamically-added methods (not on the base PHDocumentController prototype).
|
|
2195
|
+
*/
|
|
2196
|
+
type ActionMethodsOf<C, TRemote> = { [K in Exclude<keyof C, keyof PHDocumentController<any>>]: C[K] extends ((input: infer I) => unknown) ? (input: I) => TRemote & ActionMethodsOf<C, TRemote> : C[K] };
|
|
2197
|
+
/** The full return type: RemoteDocumentController + action methods. */
|
|
2198
|
+
type RemoteDocumentControllerWith<C extends PHDocumentController<any>> = RemoteDocumentController<C> & ActionMethodsOf<C, RemoteDocumentController<C>>;
|
|
2199
|
+
/**
|
|
2200
|
+
* A controller that wraps a PHDocumentController with remote push/pull capabilities.
|
|
2201
|
+
* Composes a local controller and adds GraphQL-based sync with a reactor server.
|
|
2202
|
+
*/
|
|
2203
|
+
declare class RemoteDocumentController<TController extends PHDocumentController<any>> implements IRemoteController<InferState<TController>> {
|
|
2204
|
+
private inner;
|
|
2205
|
+
private readonly remoteClient;
|
|
2206
|
+
private readonly tracker;
|
|
2207
|
+
private readonly options;
|
|
2208
|
+
private documentId;
|
|
2209
|
+
private remoteRevision;
|
|
2210
|
+
private hasPulled;
|
|
2211
|
+
private pushScheduled;
|
|
2212
|
+
private pushQueue;
|
|
2213
|
+
private listeners;
|
|
2214
|
+
private constructor();
|
|
2215
|
+
get header(): PHDocumentHeader;
|
|
2216
|
+
get state(): InferState<TController>;
|
|
2217
|
+
get operations(): DocumentOperations;
|
|
2218
|
+
get document(): PHDocument$1<InferState<TController>>;
|
|
2219
|
+
get status(): SyncStatus;
|
|
2220
|
+
/** Register a listener for document changes. Returns an unsubscribe function. */
|
|
2221
|
+
onChange(listener: DocumentChangeListener): () => void;
|
|
2222
|
+
private notifyListeners;
|
|
2223
|
+
/** Push all pending actions to remote, then pull latest state. */
|
|
2224
|
+
push(): Promise<PushResult>;
|
|
2225
|
+
/** Delete the document on the remote. */
|
|
2226
|
+
delete(propagate?: PropagationMode): Promise<boolean>;
|
|
2227
|
+
/** Pull latest state from remote, replacing local document. Returns the remote document data. */
|
|
2228
|
+
pull(): Promise<RemoteDocumentData>;
|
|
2229
|
+
/**
|
|
2230
|
+
* Pull an existing document from remote and create a controller for it.
|
|
2231
|
+
*/
|
|
2232
|
+
static pull<C extends PHDocumentController<any>>(ControllerClass: new (doc?: PHDocument$1<any>) => C, options: RemoteControllerOptions): Promise<RemoteDocumentControllerWith<C>>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Wrap an existing controller instance with remote capabilities.
|
|
2235
|
+
* Pending local actions on the inner controller are NOT tracked
|
|
2236
|
+
* (only new actions through the remote controller are tracked).
|
|
2237
|
+
*/
|
|
2238
|
+
static from<C extends PHDocumentController<any>>(controller: C, options: RemoteControllerOptions): RemoteDocumentControllerWith<C>;
|
|
2239
|
+
/** Create the document on the remote if it doesn't exist yet. */
|
|
2240
|
+
private ensureRemoteDocument;
|
|
2241
|
+
/** Set up interceptors for all action methods on the inner controller. */
|
|
2242
|
+
private setupActionInterceptors;
|
|
2243
|
+
/**
|
|
2244
|
+
* Find the new operation added after applying an action,
|
|
2245
|
+
* by comparing current operation counts against a previous snapshot.
|
|
2246
|
+
*/
|
|
2247
|
+
private findNewOperation;
|
|
2248
|
+
/**
|
|
2249
|
+
* Get the last operation in a specific scope, optionally excluding
|
|
2250
|
+
* a given operation (e.g. the one just added).
|
|
2251
|
+
*/
|
|
2252
|
+
private getLastOperationInScope;
|
|
2253
|
+
/**
|
|
2254
|
+
* Detect and handle conflicts between local pending actions and remote state.
|
|
2255
|
+
* Returns the (possibly rebased) tracked actions to push.
|
|
2256
|
+
*/
|
|
2257
|
+
private handleConflicts;
|
|
2258
|
+
/**
|
|
2259
|
+
* Pull latest remote state and replay actions through interceptors.
|
|
2260
|
+
* Returns newly tracked actions with correct prevOpHash values.
|
|
2261
|
+
*/
|
|
2262
|
+
private pullAndReplay;
|
|
2263
|
+
/** Prepare actions for push, optionally signing them. */
|
|
2264
|
+
private prepareActionsForPush;
|
|
2265
|
+
/** Sign an action using the configured signer, preserving existing signatures. */
|
|
2266
|
+
private signAction;
|
|
2267
|
+
/**
|
|
2268
|
+
* Fetch document and operations from the remote.
|
|
2269
|
+
*
|
|
2270
|
+
* On the first pull, uses the combined document+operations query.
|
|
2271
|
+
* On subsequent pulls, fetches only new operations per scope using
|
|
2272
|
+
* sinceRevision, then merges with existing local operations.
|
|
2273
|
+
* Falls back to a full fetch if the merge produces a count mismatch.
|
|
2274
|
+
*/
|
|
2275
|
+
private fetchDocumentAndOperations;
|
|
2276
|
+
/**
|
|
2277
|
+
* Incremental fetch: fetches the document and only new operations per scope
|
|
2278
|
+
* using sinceRevision in a single request when possible.
|
|
2279
|
+
* Falls back to a full fetch on count mismatch.
|
|
2280
|
+
*/
|
|
2281
|
+
private incrementalFetch;
|
|
2282
|
+
/**
|
|
2283
|
+
* Full fetch fallback: fetches all operations from the beginning.
|
|
2284
|
+
* Used when an incremental fetch produces a count mismatch.
|
|
2285
|
+
*/
|
|
2286
|
+
private fullFetch;
|
|
2287
|
+
/**
|
|
2288
|
+
* Validate that the merged operations match the expected revision per scope.
|
|
2289
|
+
* Each scope's operation count should equal its revision number.
|
|
2290
|
+
*/
|
|
2291
|
+
private hasExpectedOperationCounts;
|
|
2292
|
+
/**
|
|
2293
|
+
* Merge existing local operations with newly fetched operations.
|
|
2294
|
+
* Appends new operations to existing ones per scope.
|
|
2295
|
+
*/
|
|
2296
|
+
private mergeOperations;
|
|
2297
|
+
/** Schedule a push via microtask (for streaming mode coalescing). */
|
|
2298
|
+
private schedulePush;
|
|
2299
|
+
}
|
|
2300
|
+
//#endregion
|
|
2301
|
+
//#region src/remote-controller/utils.d.ts
|
|
2302
|
+
/** Error thrown when a push conflict is detected with the "reject" strategy. */
|
|
2303
|
+
declare class ConflictError extends Error {
|
|
2304
|
+
readonly conflict: ConflictInfo;
|
|
2305
|
+
constructor(conflict: ConflictInfo);
|
|
2306
|
+
}
|
|
2307
|
+
/** Convert remote operations to local DocumentOperations format. */
|
|
2308
|
+
declare function convertRemoteOperations(operationsByScope: Record<string, RemoteOperation[]>): DocumentOperations;
|
|
2309
|
+
//#endregion
|
|
2310
|
+
//#region src/renown/components/RenownAuthButton.d.ts
|
|
2311
|
+
interface RenownAuthButtonProps {
|
|
2312
|
+
className?: string;
|
|
2313
|
+
darkMode?: boolean;
|
|
2314
|
+
loginContent?: ReactNode;
|
|
2315
|
+
userContent?: ReactNode;
|
|
2316
|
+
loadingContent?: ReactNode;
|
|
2317
|
+
children?: (auth: RenownAuth) => ReactNode;
|
|
2318
|
+
}
|
|
2319
|
+
declare function RenownAuthButton({
|
|
2320
|
+
className,
|
|
2321
|
+
darkMode,
|
|
2322
|
+
loginContent,
|
|
2323
|
+
userContent,
|
|
2324
|
+
loadingContent,
|
|
2325
|
+
children
|
|
2326
|
+
}: RenownAuthButtonProps): react_jsx_runtime0.JSX.Element;
|
|
2327
|
+
//#endregion
|
|
2328
|
+
//#region src/renown/components/RenownLoginButton.d.ts
|
|
2329
|
+
interface RenownLoginButtonProps {
|
|
2330
|
+
onLogin?: () => void;
|
|
2331
|
+
darkMode?: boolean;
|
|
2332
|
+
style?: CSSProperties;
|
|
2333
|
+
className?: string;
|
|
2334
|
+
asChild?: boolean;
|
|
2335
|
+
children?: ReactNode;
|
|
2336
|
+
}
|
|
2337
|
+
declare function RenownLoginButton({
|
|
2338
|
+
onLogin: onLoginProp,
|
|
2339
|
+
darkMode,
|
|
2340
|
+
style,
|
|
2341
|
+
className,
|
|
2342
|
+
asChild,
|
|
2343
|
+
children
|
|
2344
|
+
}: RenownLoginButtonProps): react_jsx_runtime0.JSX.Element;
|
|
2345
|
+
//#endregion
|
|
2346
|
+
//#region src/renown/components/RenownUserButton.d.ts
|
|
2347
|
+
interface RenownUserButtonMenuItem {
|
|
2348
|
+
label: string;
|
|
2349
|
+
icon?: ReactNode;
|
|
2350
|
+
onClick: () => void;
|
|
2351
|
+
style?: CSSProperties;
|
|
2352
|
+
}
|
|
2353
|
+
interface RenownUserButtonProps {
|
|
2354
|
+
address?: string;
|
|
2355
|
+
username?: string;
|
|
2356
|
+
avatarUrl?: string;
|
|
2357
|
+
userId?: string;
|
|
2358
|
+
onDisconnect?: () => void;
|
|
2359
|
+
style?: CSSProperties;
|
|
2360
|
+
className?: string;
|
|
2361
|
+
asChild?: boolean;
|
|
2362
|
+
children?: ReactNode;
|
|
2363
|
+
menuItems?: RenownUserButtonMenuItem[];
|
|
2364
|
+
}
|
|
2365
|
+
declare function RenownUserButton({
|
|
2366
|
+
address: addressProp,
|
|
2367
|
+
username: usernameProp,
|
|
2368
|
+
avatarUrl: avatarUrlProp,
|
|
2369
|
+
userId: userIdProp,
|
|
2370
|
+
onDisconnect: onDisconnectProp,
|
|
2371
|
+
style,
|
|
2372
|
+
className,
|
|
2373
|
+
asChild,
|
|
2374
|
+
children,
|
|
2375
|
+
menuItems
|
|
2376
|
+
}: RenownUserButtonProps): react_jsx_runtime0.JSX.Element;
|
|
2377
|
+
//#endregion
|
|
2378
|
+
//#region src/renown/components/icons.d.ts
|
|
2379
|
+
interface IconProps {
|
|
2380
|
+
size?: number;
|
|
2381
|
+
width?: number;
|
|
2382
|
+
height?: number;
|
|
2383
|
+
color?: string;
|
|
2384
|
+
style?: CSSProperties;
|
|
2385
|
+
className?: string;
|
|
2386
|
+
}
|
|
2387
|
+
interface RenownLogoProps extends IconProps {
|
|
2388
|
+
hovered?: boolean;
|
|
2389
|
+
}
|
|
2390
|
+
declare function RenownLogo({
|
|
2391
|
+
width,
|
|
2392
|
+
height,
|
|
2393
|
+
hovered,
|
|
2394
|
+
color,
|
|
2395
|
+
className
|
|
2396
|
+
}: RenownLogoProps): react_jsx_runtime0.JSX.Element;
|
|
2397
|
+
declare function CopyIcon({
|
|
2398
|
+
size,
|
|
2399
|
+
color
|
|
2400
|
+
}: IconProps): react_jsx_runtime0.JSX.Element;
|
|
2401
|
+
declare function DisconnectIcon({
|
|
2402
|
+
size,
|
|
2403
|
+
color
|
|
2404
|
+
}: IconProps): react_jsx_runtime0.JSX.Element;
|
|
2405
|
+
declare function SpinnerIcon({
|
|
2406
|
+
size,
|
|
2407
|
+
color
|
|
2408
|
+
}: IconProps): react_jsx_runtime0.JSX.Element;
|
|
2409
|
+
declare function ChevronDownIcon({
|
|
2410
|
+
size,
|
|
2411
|
+
color,
|
|
2412
|
+
style
|
|
2413
|
+
}: IconProps): react_jsx_runtime0.JSX.Element;
|
|
2414
|
+
declare function UserIcon({
|
|
2415
|
+
size,
|
|
2416
|
+
color
|
|
2417
|
+
}: IconProps): react_jsx_runtime0.JSX.Element;
|
|
2418
|
+
//#endregion
|
|
2419
|
+
//#region src/renown/constants.d.ts
|
|
2420
|
+
declare const RENOWN_URL = "https://www.renown.id";
|
|
2421
|
+
declare const RENOWN_NETWORK_ID = "eip155";
|
|
2422
|
+
declare const RENOWN_CHAIN_ID = "1";
|
|
2423
|
+
declare const DOMAIN_TYPE: readonly [{
|
|
2424
|
+
readonly name: "name";
|
|
2425
|
+
readonly type: "string";
|
|
2426
|
+
}, {
|
|
2427
|
+
readonly name: "version";
|
|
2428
|
+
readonly type: "string";
|
|
2429
|
+
}, {
|
|
2430
|
+
readonly name: "chainId";
|
|
2431
|
+
readonly type: "uint256";
|
|
2432
|
+
}, {
|
|
2433
|
+
readonly name: "verifyingContract";
|
|
2434
|
+
readonly type: "address";
|
|
2435
|
+
}];
|
|
2436
|
+
declare const VERIFIABLE_CREDENTIAL_EIP712_TYPE: readonly [{
|
|
2437
|
+
readonly name: "@context";
|
|
2438
|
+
readonly type: "string[]";
|
|
2439
|
+
}, {
|
|
2440
|
+
readonly name: "type";
|
|
2441
|
+
readonly type: "string[]";
|
|
2442
|
+
}, {
|
|
2443
|
+
readonly name: "id";
|
|
2444
|
+
readonly type: "string";
|
|
2445
|
+
}, {
|
|
2446
|
+
readonly name: "issuer";
|
|
2447
|
+
readonly type: "Issuer";
|
|
2448
|
+
}, {
|
|
2449
|
+
readonly name: "credentialSubject";
|
|
2450
|
+
readonly type: "CredentialSubject";
|
|
2451
|
+
}, {
|
|
2452
|
+
readonly name: "credentialSchema";
|
|
2453
|
+
readonly type: "CredentialSchema";
|
|
2454
|
+
}, {
|
|
2455
|
+
readonly name: "issuanceDate";
|
|
2456
|
+
readonly type: "string";
|
|
2457
|
+
}, {
|
|
2458
|
+
readonly name: "expirationDate";
|
|
2459
|
+
readonly type: "string";
|
|
2460
|
+
}];
|
|
2461
|
+
declare const CREDENTIAL_SCHEMA_EIP712_TYPE: readonly [{
|
|
2462
|
+
readonly name: "id";
|
|
2463
|
+
readonly type: "string";
|
|
2464
|
+
}, {
|
|
2465
|
+
readonly name: "type";
|
|
2466
|
+
readonly type: "string";
|
|
2467
|
+
}];
|
|
2468
|
+
declare const CREDENTIAL_SUBJECT_TYPE: readonly [{
|
|
2469
|
+
readonly name: "app";
|
|
2470
|
+
readonly type: "string";
|
|
2471
|
+
}, {
|
|
2472
|
+
readonly name: "id";
|
|
2473
|
+
readonly type: "string";
|
|
2474
|
+
}, {
|
|
2475
|
+
readonly name: "name";
|
|
2476
|
+
readonly type: "string";
|
|
2477
|
+
}];
|
|
2478
|
+
declare const ISSUER_TYPE: readonly [{
|
|
2479
|
+
readonly name: "id";
|
|
2480
|
+
readonly type: "string";
|
|
2481
|
+
}, {
|
|
2482
|
+
readonly name: "ethereumAddress";
|
|
2483
|
+
readonly type: "string";
|
|
2484
|
+
}];
|
|
2485
|
+
declare const CREDENTIAL_TYPES: {
|
|
2486
|
+
readonly EIP712Domain: readonly [{
|
|
2487
|
+
readonly name: "name";
|
|
2488
|
+
readonly type: "string";
|
|
2489
|
+
}, {
|
|
2490
|
+
readonly name: "version";
|
|
2491
|
+
readonly type: "string";
|
|
2492
|
+
}, {
|
|
2493
|
+
readonly name: "chainId";
|
|
2494
|
+
readonly type: "uint256";
|
|
2495
|
+
}, {
|
|
2496
|
+
readonly name: "verifyingContract";
|
|
2497
|
+
readonly type: "address";
|
|
2498
|
+
}];
|
|
2499
|
+
readonly VerifiableCredential: readonly [{
|
|
2500
|
+
readonly name: "@context";
|
|
2501
|
+
readonly type: "string[]";
|
|
2502
|
+
}, {
|
|
2503
|
+
readonly name: "type";
|
|
2504
|
+
readonly type: "string[]";
|
|
2505
|
+
}, {
|
|
2506
|
+
readonly name: "id";
|
|
2507
|
+
readonly type: "string";
|
|
2508
|
+
}, {
|
|
2509
|
+
readonly name: "issuer";
|
|
2510
|
+
readonly type: "Issuer";
|
|
2511
|
+
}, {
|
|
2512
|
+
readonly name: "credentialSubject";
|
|
2513
|
+
readonly type: "CredentialSubject";
|
|
2514
|
+
}, {
|
|
2515
|
+
readonly name: "credentialSchema";
|
|
2516
|
+
readonly type: "CredentialSchema";
|
|
2517
|
+
}, {
|
|
2518
|
+
readonly name: "issuanceDate";
|
|
2519
|
+
readonly type: "string";
|
|
2520
|
+
}, {
|
|
2521
|
+
readonly name: "expirationDate";
|
|
2522
|
+
readonly type: "string";
|
|
2523
|
+
}];
|
|
2524
|
+
readonly CredentialSchema: readonly [{
|
|
2525
|
+
readonly name: "id";
|
|
2526
|
+
readonly type: "string";
|
|
2527
|
+
}, {
|
|
2528
|
+
readonly name: "type";
|
|
2529
|
+
readonly type: "string";
|
|
2530
|
+
}];
|
|
2531
|
+
readonly CredentialSubject: readonly [{
|
|
2532
|
+
readonly name: "app";
|
|
2533
|
+
readonly type: "string";
|
|
2534
|
+
}, {
|
|
2535
|
+
readonly name: "id";
|
|
2536
|
+
readonly type: "string";
|
|
2537
|
+
}, {
|
|
2538
|
+
readonly name: "name";
|
|
2539
|
+
readonly type: "string";
|
|
2540
|
+
}];
|
|
2541
|
+
readonly Issuer: readonly [{
|
|
2542
|
+
readonly name: "id";
|
|
2543
|
+
readonly type: "string";
|
|
2544
|
+
}, {
|
|
2545
|
+
readonly name: "ethereumAddress";
|
|
2546
|
+
readonly type: "string";
|
|
2547
|
+
}];
|
|
2548
|
+
};
|
|
2549
|
+
//#endregion
|
|
2550
|
+
//#region src/renown/use-renown-init.d.ts
|
|
2551
|
+
interface RenownInitOptions {
|
|
2552
|
+
appName: string;
|
|
2553
|
+
/**
|
|
2554
|
+
* Prefix for localStorage keys, allowing multiple apps
|
|
2555
|
+
* to use Renown on the same domain without conflicts.
|
|
2556
|
+
*/
|
|
2557
|
+
namespace?: string;
|
|
2558
|
+
url?: string;
|
|
2559
|
+
}
|
|
2560
|
+
/**
|
|
2561
|
+
* Hook that initializes the Renown SDK.
|
|
2562
|
+
* Call once at the top of your app. Options are read only on first mount.
|
|
2563
|
+
* Returns a promise that resolves with the Renown instance.
|
|
2564
|
+
*
|
|
2565
|
+
* @example
|
|
2566
|
+
* ```tsx
|
|
2567
|
+
* function App() {
|
|
2568
|
+
* const renownPromise = useRenownInit({ appName: "my-app" });
|
|
2569
|
+
* return <MyApp />;
|
|
2570
|
+
* }
|
|
2571
|
+
* ```
|
|
2572
|
+
*/
|
|
2573
|
+
declare function useRenownInit({
|
|
2574
|
+
appName,
|
|
2575
|
+
namespace,
|
|
2576
|
+
url
|
|
2577
|
+
}: RenownInitOptions): Promise<IRenown>;
|
|
2578
|
+
//#endregion
|
|
2579
|
+
//#region src/renown/renown-init.d.ts
|
|
2580
|
+
interface RenownProps extends RenownInitOptions {
|
|
2581
|
+
onError?: (error: unknown) => void;
|
|
2582
|
+
}
|
|
2583
|
+
/**
|
|
2584
|
+
* Side-effect component that initializes the Renown SDK.
|
|
2585
|
+
* Renders nothing — place it alongside your app tree.
|
|
2586
|
+
*
|
|
2587
|
+
* @example
|
|
2588
|
+
* ```tsx
|
|
2589
|
+
* function App() {
|
|
2590
|
+
* return (
|
|
2591
|
+
* <>
|
|
2592
|
+
* <Renown appName="my-app" onError={console.error} />
|
|
2593
|
+
* <MyApp />
|
|
2594
|
+
* </>
|
|
2595
|
+
* );
|
|
2596
|
+
* }
|
|
2597
|
+
* ```
|
|
2598
|
+
*/
|
|
2599
|
+
declare function Renown({
|
|
2600
|
+
onError,
|
|
2601
|
+
...initOptions
|
|
2602
|
+
}: RenownProps): null;
|
|
2603
|
+
//#endregion
|
|
2604
|
+
//#region src/storage/base-storage.d.ts
|
|
2605
|
+
declare abstract class BaseStorage<V> implements Iterable<[string, V]> {
|
|
2606
|
+
abstract get(key: string): V | undefined;
|
|
2607
|
+
abstract set(key: string, value: V): void;
|
|
2608
|
+
abstract delete(key: string): boolean;
|
|
2609
|
+
abstract has(key: string): boolean;
|
|
2610
|
+
abstract clear(): void;
|
|
2611
|
+
abstract entries(): IterableIterator<[string, V]>;
|
|
2612
|
+
abstract keys(): IterableIterator<string>;
|
|
2613
|
+
abstract values(): IterableIterator<V>;
|
|
2614
|
+
[Symbol.iterator](): IterableIterator<[string, V]>;
|
|
2615
|
+
forEach(callback: (value: V, key: string, storage: BaseStorage<V>) => void): void;
|
|
2616
|
+
}
|
|
2617
|
+
//#endregion
|
|
2618
|
+
//#region src/storage/local-storage.d.ts
|
|
2619
|
+
declare class BrowserLocalStorage<V> extends BaseStorage<V> {
|
|
2620
|
+
#private;
|
|
2621
|
+
constructor(namespace: string);
|
|
2622
|
+
get(key: string): V | undefined;
|
|
2623
|
+
set(key: string, value: V): void;
|
|
2624
|
+
delete(key: string): boolean;
|
|
2625
|
+
has(key: string): boolean;
|
|
2626
|
+
clear(): void;
|
|
2627
|
+
entries(): IterableIterator<[string, V]>;
|
|
2628
|
+
keys(): IterableIterator<string>;
|
|
2629
|
+
values(): IterableIterator<V>;
|
|
2630
|
+
[Symbol.iterator](): IterableIterator<[string, V]>;
|
|
2631
|
+
}
|
|
2632
|
+
//#endregion
|
|
2633
|
+
//#region src/storage/types.d.ts
|
|
2634
|
+
interface IStorage<TValue> {
|
|
2635
|
+
get(key: string): TValue | undefined;
|
|
2636
|
+
set(key: string, value: TValue): void;
|
|
2637
|
+
delete(key: string): void;
|
|
2638
|
+
}
|
|
2639
|
+
//#endregion
|
|
2640
|
+
//#region src/types/reactor.d.ts
|
|
2641
|
+
type NodeKind = "FOLDER" | "FILE";
|
|
2642
|
+
//#endregion
|
|
2643
|
+
//#region src/utils/documents.d.ts
|
|
2644
|
+
declare function isDocumentTypeSupported(documentType: string, supportedDocuments: string[] | null | undefined): boolean;
|
|
2645
|
+
//#endregion
|
|
2646
|
+
//#region src/utils/drives.d.ts
|
|
2647
|
+
type UISyncStatus = "INITIAL_SYNC" | "SUCCESS" | "CONFLICT" | "MISSING" | "ERROR" | "SYNCING";
|
|
2648
|
+
declare function getDrives(reactor: IReactorClient): Promise<DocumentDriveDocument[]>;
|
|
2649
|
+
declare function getSyncStatus(documentId: string, sharingType: SharingType): Promise<UISyncStatus | undefined>;
|
|
2650
|
+
declare function getSyncStatusSync(documentId: string, sharingType: SharingType): UISyncStatus | undefined;
|
|
2651
|
+
//#endregion
|
|
2652
|
+
//#region src/utils/export-document.d.ts
|
|
2653
|
+
declare const exportDocument: (document?: PHDocument$1) => Promise<void | FileSystemFileHandle> | undefined;
|
|
2654
|
+
//#endregion
|
|
2655
|
+
//#region src/utils/get-revision-from-date.d.ts
|
|
2656
|
+
declare const getRevisionFromDate: (startDate?: Date, endDate?: Date, operations?: Operation[]) => number;
|
|
2657
|
+
//#endregion
|
|
2658
|
+
//#region src/utils/nodes.d.ts
|
|
2659
|
+
/** Sorts nodes by name. */
|
|
2660
|
+
declare function sortNodesByName<T extends Node>(nodes: T[]): T[];
|
|
2661
|
+
/** Returns whether a node is a file. */
|
|
2662
|
+
declare function isFileNodeKind(node: Node | null | undefined): node is FileNode;
|
|
2663
|
+
/** Returns whether a node is a folder. */
|
|
2664
|
+
declare function isFolderNodeKind(node: Node | null | undefined): node is FolderNode;
|
|
2665
|
+
//#endregion
|
|
2666
|
+
//#region src/utils/switchboard.d.ts
|
|
2667
|
+
declare function getDriveIdBySlug(driveUrl: string, slug: string): Promise<string | undefined>;
|
|
2668
|
+
declare function getSlugFromDriveUrl(driveUrl: string): string | undefined;
|
|
2669
|
+
declare function getSwitchboardGatewayUrlFromDriveUrl(driveUrl: string): string;
|
|
2670
|
+
declare function getDocumentGraphqlQuery(): string;
|
|
2671
|
+
declare function buildDocumentSubgraphQuery(driveUrl: string, documentId: string, authToken?: string): string;
|
|
2672
|
+
declare function buildDocumentSubgraphUrl(driveUrl: string, documentId: string, authToken?: string): string;
|
|
2673
|
+
//#endregion
|
|
2674
|
+
//#region src/utils/url.d.ts
|
|
2675
|
+
declare function resolveUrlPathname(path: string): string;
|
|
2676
|
+
/** Returns the current path without the base path */
|
|
2677
|
+
declare function getPathWithoutBase(path: string): string;
|
|
2678
|
+
/** Makes a URL component for a drive. */
|
|
2679
|
+
declare function makeDriveUrlComponent(drive: DocumentDriveDocument | undefined): string;
|
|
2680
|
+
/** Makes a URL component for a node. */
|
|
2681
|
+
declare function makeNodeSlug(node: Node | undefined): string;
|
|
2682
|
+
/** Extracts the node slug from a path.
|
|
2683
|
+
*
|
|
2684
|
+
* The path is expected to be in the format `/d/<drive-slug>/<node-slug>`.
|
|
2685
|
+
*/
|
|
2686
|
+
declare function extractNodeSlugFromPath(path: string): string | undefined;
|
|
2687
|
+
/** Finds a UUID in a string, used for extracting node ids from node slugs in the URL. */
|
|
2688
|
+
declare function findUuid(input: string | undefined): string | undefined;
|
|
2689
|
+
declare function extractNodeIdFromSlug(nodeSlug: string | undefined): string | undefined;
|
|
2690
|
+
declare function extractNodeIdFromPath(path: string): string | undefined;
|
|
2691
|
+
/** Extracts the drive slug from a path.
|
|
2692
|
+
* Used for extracting drive ids from drive slugs in the URL.
|
|
2693
|
+
* Expects the path to be in the format `/d/<drive-slug>`.
|
|
2694
|
+
*/
|
|
2695
|
+
declare function extractDriveSlugFromPath(path: string): string;
|
|
2696
|
+
declare function extractDriveIdFromSlug(driveSlug: string | undefined): string | undefined;
|
|
2697
|
+
declare function extractDriveIdFromPath(path: string): string | undefined;
|
|
2698
|
+
/**
|
|
2699
|
+
* Creates a URL string with the given pathname while preserving existing query parameters.
|
|
2700
|
+
*/
|
|
2701
|
+
declare function createUrlWithPreservedParams(pathname: string): string;
|
|
2702
|
+
//#endregion
|
|
2703
|
+
//#region src/utils/user.d.ts
|
|
2704
|
+
declare function getUserPermissions(): {
|
|
2705
|
+
isAllowedToCreateDocuments: boolean;
|
|
2706
|
+
isAllowedToEditDocuments: boolean;
|
|
2707
|
+
};
|
|
2708
|
+
//#endregion
|
|
2709
|
+
//#region src/utils/validate-document.d.ts
|
|
2710
|
+
declare const validateDocument: (document: PHDocument$1) => ValidationError[];
|
|
2711
|
+
//#endregion
|
|
2712
|
+
//#region src/utils/vetra.d.ts
|
|
2713
|
+
declare function convertLegacyLibToVetraPackage(legacyLib: DocumentModelLib): VetraPackage$1;
|
|
2714
|
+
declare function convertLegacyDocumentModelModuleToVetraDocumentModelModule(legacyDocumentModelModule: DocumentModelModule): VetraDocumentModelModule$1;
|
|
2715
|
+
declare function convertLegacyEditorModuleToVetraEditorModule(legacyEditorModule: EditorModule, manifest?: Manifest): VetraEditorModule$1;
|
|
2716
|
+
declare function makeVetraPackageManifest(vetraPackage: VetraPackage$1): VetraPackageManifest$1;
|
|
2717
|
+
//#endregion
|
|
2718
|
+
export { ActionTracker, AddPHGlobalEventHandler, AnalyticsProvider, BaseStorage, BrowserLocalStorage, BrowserReactorClientModule, COMMON_PACKAGE_ID, CREDENTIAL_SCHEMA_EIP712_TYPE, CREDENTIAL_SUBJECT_TYPE, CREDENTIAL_TYPES, ChannelScheme, ChevronDownIcon, ConflictError, type ConflictInfo, ConflictResolution, type ConflictStrategy, type ConnectionState, type ConnectionStateSnapshot, CopyIcon, DEFAULT_DRIVE_EDITOR_ID, DOMAIN_TYPE, type Database, DisconnectIcon, DispatchFn, DocumentCache, type RemoteDocumentChangeEvent as DocumentChangeEvent, type DocumentChangeListener, DocumentChangeType, DocumentDispatch, DocumentIntegrityService, DocumentTypeIcon, FileUploadProgress, FileUploadProgressCallback, FulfilledPromise, FullPHGlobalConfig, type GetDocumentResult, type GetDocumentWithOperationsResult, type GetOperationsResult, GqlRequestChannel, IAnalyticsStoreOptions, type IChannel, IDocumentCache, type IDocumentModelLoader, IPackageListerUnsubscribe, IPackageManager, IPackagesListener, IPowerhouseAnalytics, type IProcessor, type IProcessorHostModule, type IRelationalDb, type IRemoteClient, type IRemoteController, ISSUER_TYPE, IStorage, InMemoryQueue, IntervalPollTimer, type Job, type JwtHandler, type KeyframeValidationIssue, LOADING, type MergeHandler, NodeKind, type OperationWithContext, PHAnalyticsGlobalConfig, PHCommonGlobalConfig, PHDocumentEditorConfig, PHDocumentEditorConfigHooks, PHDocumentEditorConfigKey, PHDocumentEditorConfigSetters, PHDriveEditorConfig, PHDriveEditorConfigHooks, PHDriveEditorConfigKey, PHDriveEditorConfigSetters, PHDrivesGlobalConfig, PHGlobal, PHGlobalConfig, PHGlobalConfigHooks, PHGlobalConfigHooksForKey, PHGlobalConfigKey, PHGlobalConfigSetters, PHGlobalConfigSettersForKey, PHGlobalEventHandlerAdders, PHGlobalKey, PHGlobalValue, PHModal, PHProcessorsGlobalConfig, PHRelationalProcessorsGlobalConfig, PHRenownGlobalConfig, PHSentryGlobalConfig, PHToastFn, PHToastOptions, PHToastType, PackageManagerInstallResult, type ParsedDriveUrl, type ProcessorFactory, type ProcessorFilter, type ProcessorRecord, Processors, PromiseState, PromiseWithState, PropagationMode, PublishEvent, type PushResult, QueryCallbackReturnType, REACTOR_SCHEMA, RENOWN_CHAIN_ID, RENOWN_NETWORK_ID, RENOWN_URL, ReactorBuilder, ReactorClientBuilder, ReactorDefaultDrivesConfig, type ReactorGraphQLClient, type RebuildResult, RefreshReactorDataConfig, RegistryClient, RegistryPackageInfo, RejectedPromise, RelationalDbProcessor, RelationalDbWithLive, type Remote, RemoteClient, type RemoteControllerOptions, RemoteDocumentController, type RemoteDocumentControllerWith, type RemoteDocumentData, type RemoteOperation, type RemoteOperationResultPage, Renown, type RenownAuth, RenownAuthButton, type RenownAuthButtonProps, type RenownAuthStatus, type RenownInitOptions, RenownLoginButton, type RenownLoginButtonProps, RenownLogo, type RenownProps, RenownUserButton, type RenownUserButtonMenuItem, type RenownUserButtonProps, SetEvent, SetPHGlobalValue, type SignerConfig, type SnapshotValidationIssue, SpinnerIcon, type SyncOperation, SyncOperationStatus, type SyncStatus, TimelineBarItem, TimelineDividerItem, TimelineItem, type TrackedAction, UISyncStatus, UseAddSeriesValueOptions, UseAddSeriesValuesOptions, UseAnalyticsQueryOptions, UseAnalyticsQueryResult, UseAnalyticsSeriesOptions, UseClearEmptyAnalyticsDimensionsOptions, UseClearSeriesBySourceOptions, UseDispatchResult, UseGetDimensionsOptions, UseMatchingSeriesOptions, UseOnDropFile, UsePHGlobalValue, UseQuerySourcesOptions, UseTimelineItemsResult, UserIcon, VERIFIABLE_CREDENTIAL_EIP712_TYPE, type ValidationResult, VetraDocumentModelModule, VetraEditorModule, VetraMeta, VetraModule, VetraModules, VetraPackage, VetraPackageManifest, VetraPackageMeta, VetraProcessorModule, addAllowListEventHandler, addAllowedDocumentTypesEventHandler, addAnalyticsDatabaseNameEventHandler, addBasePathEventHandler, addCliVersionEventHandler, addDefaultDrivesUrlEventHandler, addDisabledEditorsEventHandler, addDocument, addDocumentCacheEventHandler, addDrive, addDrivesEventHandler, addDrivesPreserveStrategyEventHandler, addEnabledEditorsEventHandler, addFeaturesEventHandler, addFileUploadOperationsChunkSizeEventHandler, addFolder, addGaTrackingIdEventHandler, addIsAddCloudDrivesEnabledEventHandler, addIsAddDriveEnabledEventHandler, addIsAddLocalDrivesEnabledEventHandler, addIsAddPublicDrivesEnabledEventHandler, addIsAnalyticsDatabaseWorkerEnabledEventHandler, addIsAnalyticsEnabledEventHandler, addIsAnalyticsExternalProcessorsEnabledEventHandler, addIsCloudDrivesEnabledEventHandler, addIsDeleteCloudDrivesEnabledEventHandler, addIsDeleteLocalDrivesEnabledEventHandler, addIsDeletePublicDrivesEnabledEventHandler, addIsDiffAnalyticsEnabledEventHandler, addIsDocumentModelSelectionSettingsEnabledEventHandler, addIsDragAndDropEnabledEventHandler, addIsDriveAnalyticsEnabledEventHandler, addIsEditorDebugModeEnabledEventHandler, addIsEditorReadModeEnabledEventHandler, addIsExternalControlsEnabledEventHandler, addIsExternalPackagesEnabledEventHandler, addIsExternalProcessorsEnabledEventHandler, addIsExternalRelationalProcessorsEnabledEventHandler, addIsLocalDrivesEnabledEventHandler, addIsPublicDrivesEnabledEventHandler, addIsRelationalProcessorsEnabledEventHandler, addIsSentryTracingEnabledEventHandler, addLoadingEventHandler, addLocalDrivesEnabledEventHandler, addLogLevelEventHandler, addModalEventHandler, addPHEventHandlers, addPromiseState, addReactorClientEventHandler, addReactorClientModuleEventHandler, addRemoteDrive, addRenownChainIdEventHandler, addRenownEventHandler, addRenownNetworkIdEventHandler, addRenownUrlEventHandler, addRequiresHardRefreshEventHandler, addResetSelectedNodeEventHandler, addRevisionHistoryVisibleEventHandler, addRouterBasenameEventHandler, addSelectedDriveIdEventHandler, addSelectedNodeIdEventHandler, addSelectedTimelineItemEventHandler, addSelectedTimelineRevisionEventHandler, addSentryDsnEventHandler, addSentryEnvEventHandler, addSentryReleaseEventHandler, addSetSelectedDriveOnPopStateEventHandler, addSetSelectedNodeOnPopStateEventHandler, addStudioModeEventHandler, addToastEventHandler, addVersionCheckIntervalEventHandler, addVersionEventHandler, addVetraPackageManagerEventHandler, addWarnOutdatedAppEventHandler, analyticsEngineKey, analyticsOptionsKey, analyticsStoreKey, baseDocumentModels, baseDocumentModelsMap, buildDocumentSubgraphQuery, buildDocumentSubgraphUrl, callGlobalSetterForKey, clearGlobal, closePHModal, convertLegacyDocumentModelModuleToVetraDocumentModelModule, convertLegacyEditorModuleToVetraEditorModule, convertLegacyLibToVetraPackage, convertRemoteOperations, createAnalyticsStore, createClient, createProcessorQuery, createUrlWithPreservedParams, deleteDrive, deleteNode, dispatchActions, driveCollectionId, driveIdFromUrl, dropAllReactorStorage, exportDocument, exportFile, extractDriveIdFromPath, extractDriveIdFromSlug, extractDriveSlugFromPath, extractNodeIdFromPath, extractNodeIdFromSlug, extractNodeSlugFromPath, findUuid, getAnalyticsStore, getDocumentGraphqlQuery, getDriveIdBySlug, getDrives, getGlobal, getPackages, getPackagesByDocumentType, getPathWithoutBase, getRevisionFromDate, getSlugFromDriveUrl, getSwitchboardGatewayUrlFromDriveUrl, getSyncStatus, getSyncStatusSync, getUserPermissions, hideRevisionHistory, initConnectCrypto, initRenownCrypto, isDocumentTypeSupported, isExternalControlsEnabledEventFunctions, isFileNodeKind, isFolderNodeKind, isInspectorEnabledSync, loading, login, logout, makeDriveUrlComponent, makeNodeSlug, makePHEventFunctions, makeVetraPackageManifest, openRenown, parseDriveUrl, phDocumentEditorConfigHooks, phDocumentEditorConfigSetters, phDriveEditorConfigHooks, phDriveEditorConfigSetters, phGlobalConfigHooks, phGlobalConfigSetters, readPromiseState, refreshReactorData, refreshReactorDataClient, renameDrive, renameDriveNode, resolveUrlPathname, setAllowList, setAllowedDocumentTypes, setAnalyticsDatabaseName, setBasePath, setCliVersion, setDefaultDrivesUrl, setDefaultPHGlobalConfig, setDisabledEditors, setDocumentCache, setDriveAvailableOffline, setDriveSharingType, setDrives, setDrivesPreserveStrategy, setEnabledEditors, setFeatures, setFileUploadOperationsChunkSize, setGaTrackingId, setGlobal, setIsAddCloudDrivesEnabled, setIsAddDriveEnabled, setIsAddLocalDrivesEnabled, setIsAddPublicDrivesEnabled, setIsAnalyticsDatabaseWorkerEnabled, setIsAnalyticsEnabled, setIsAnalyticsExternalProcessorsEnabled, setIsCloudDrivesEnabled, setIsDeleteCloudDrivesEnabled, setIsDeleteLocalDrivesEnabled, setIsDeletePublicDrivesEnabled, setIsDiffAnalyticsEnabled, setIsDocumentModelSelectionSettingsEnabled, setIsDragAndDropEnabled, setIsDriveAnalyticsEnabled, setIsEditorDebugModeEnabled, setIsEditorReadModeEnabled, setIsExternalControlsEnabled, setIsExternalPackagesEnabled, setIsExternalProcessorsEnabled, setIsExternalRelationalProcessorsEnabled, setIsLocalDrivesEnabled, setIsPublicDrivesEnabled, setIsRelationalProcessorsEnabled, setIsSentryTracingEnabled, setLoading, setLocalDrivesEnabled, setLogLevel, setPHDocumentEditorConfig, setPHDocumentEditorConfigByKey, setPHDriveEditorConfig, setPHDriveEditorConfigByKey, setPHGlobalConfig, setPHGlobalConfigByKey, setPHModal, setPHToast, setReactorClient, setReactorClientModule, setRenown, setRenownChainId, setRenownNetworkId, setRenownUrl, setRequiresHardRefresh, setRevisionHistoryVisible, setRouterBasename, setSelectedDrive, setSelectedNode, setSelectedTimelineItem, setSelectedTimelineRevision, setSentryDsn, setSentryEnv, setSentryRelease, setStudioMode, setVersion, setVersionCheckInterval, setVetraPackageManager, setWarnOutdatedApp, showCreateDocumentModal, showDeleteNodeModal, showPHModal, showRevisionHistory, sortNodesByName, truncateAllTables, useAddSeriesValue, useAddSeriesValues, useAllowList, useAllowedDocumentModelModules, useAllowedDocumentTypes, useAnalyticsDatabaseName, useAnalyticsEngine, useAnalyticsEngineAsync, useAnalyticsQuery, useAnalyticsSeries, useAnalyticsStore, useAnalyticsStoreAsync, useAnalyticsStoreOptions, useAnalyticsStoreQuery, useBasePath, useClearEmptyAnalyticsDimensions, useClearSeriesBySource, useCliVersion, useConnectionState, useConnectionStates, useCreateAnalyticsStore, useDatabase, useDefaultDriveEditorModule, useDefaultDrivesUrl, useDid, useDisabledEditors, useDispatch, useDocument, useDocumentById, useDocumentCache, useDocumentModelModuleById, useDocumentModelModules, useDocumentOfType, useDocumentOperations, useDocumentTimeline, useDocumentTypes, useDocumentTypesInSelectedDrive, useDocuments, useDocumentsByIds, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useDriveById, useDriveEditorModuleById, useDriveEditorModules, useDrives, useDrivesPreserveStrategy, useEditorModuleById, useEditorModules, useEditorModulesForDocumentType, useEnabledEditors, useFallbackEditorModule, useFeatures, useFileNodesInSelectedDrive, useFileNodesInSelectedFolder, useFileUploadOperationsChunkSize, useFolderById, useFolderNodesInSelectedDrive, useFolderNodesInSelectedFolder, useGaTrackingId, useGetDimensions, useGetDocument, useGetDocumentAsync, useGetDocuments, useGetSwitchboardLink, useImportScriptModules, useInspectorEnabled, useIsAddCloudDrivesEnabled, useIsAddDriveEnabled, useIsAddLocalDrivesEnabled, useIsAddPublicDrivesEnabled, useIsAnalyticsDatabaseWorkerEnabled, useIsAnalyticsEnabled, useIsAnalyticsExternalProcessorsEnabled, useIsCloudDrivesEnabled, useIsDeleteCloudDrivesEnabled, useIsDeleteLocalDrivesEnabled, useIsDeletePublicDrivesEnabled, useIsDiffAnalyticsEnabled, useIsDocumentModelSelectionSettingsEnabled, useIsDragAndDropEnabled, useIsDriveAnalyticsEnabled, useIsEditorDebugModeEnabled, useIsEditorReadModeEnabled, useIsExternalControlsEnabled, useIsExternalPackagesEnabled, useIsExternalProcessorsEnabled, useIsExternalRelationalProcessorsEnabled, useIsLocalDrivesEnabled, useIsPublicDrivesEnabled, useIsRelationalProcessorsEnabled, useIsSentryTracingEnabled, useLoading, useLocalDrivesEnabled, useLogLevel, useLoginStatus, useMatchingSeries, useModelRegistry, useNodeActions, useNodeById, useNodeParentFolderById, useNodePathById, useNodesInSelectedDrive, useNodesInSelectedDriveOrFolder, useNodesInSelectedFolder, useOnDropFile, usePGlite, usePHDocumentEditorConfigByKey, usePHDriveEditorConfigByKey, usePHGlobalConfigByKey, usePHModal, usePHToast, useParentFolderForSelectedNode, useQuerySources, useReactorClient, useReactorClientModule, useRelationalDb, useRelationalQuery, useRelationalQueryOptions, useRenown, useRenownAuth, useRenownChainId, useRenownInit, useRenownNetworkId, useRenownUrl, useRequiresHardRefresh, useResetPHGlobalConfig, useRevisionHistoryVisible, useRouterBasename, useSelectedDocument, useSelectedDocumentId, useSelectedDocumentOfType, useSelectedDocumentSafe, useSelectedDrive, useSelectedDriveId, useSelectedDriveSafe, useSelectedFolder, useSelectedNode, useSelectedNodePath, useSelectedTimelineItem, useSelectedTimelineRevision, useSentryDsn, useSentryEnv, useSentryRelease, useSetDefaultPHGlobalConfig, useSetPHDocumentEditorConfig, useSetPHDriveEditorConfig, useSetPHGlobalConfig, useStudioMode, useSubgraphModules, useSupportedDocumentTypesInReactor, useSync, useSyncList, useTimelineItems, useUser, useUserPermissions, useVersion, useVersionCheckInterval, useVetraPackageManager, useVetraPackages, useWarnOutdatedApp, validateDocument };
|
|
2719
|
+
//# sourceMappingURL=index.d.ts.map
|