@powerhousedao/shared 6.2.3-dev.9 → 6.2.3-staging.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/index.d.ts +4 -4
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +25 -24
- package/dist/analytics/index.js.map +1 -1
- package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
- package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
- package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
- package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
- package/dist/clis/args/access-token.d.mts +3 -2
- package/dist/clis/args/access-token.mjs +1 -1
- package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
- package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
- package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
- package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
- package/dist/clis/args/common.d.mts +3 -2
- package/dist/clis/args/common.mjs +1 -1
- package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BG3HkYBk.mjs} +8 -3
- package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
- package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
- package/dist/clis/args/connect.d.mts +3 -2
- package/dist/clis/args/connect.mjs +1 -1
- package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
- package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
- package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
- package/dist/clis/args/generate.d.mts +3 -2
- package/dist/clis/args/generate.mjs +1 -1
- package/dist/clis/args/{help-Bqbgbalu.mjs → help-DS1NlcJQ.mjs} +15 -15
- package/dist/clis/args/{help-Bqbgbalu.mjs.map → help-DS1NlcJQ.mjs.map} +1 -1
- package/dist/clis/args/help-DVPTARGn.d.mts +190 -0
- package/dist/clis/args/help-DVPTARGn.d.mts.map +1 -0
- package/dist/clis/args/help.d.mts +3 -2
- package/dist/clis/args/help.mjs +1 -1
- package/dist/clis/args/index.d.mts +20 -19
- package/dist/clis/args/index.mjs +18 -18
- package/dist/clis/args/init-CFeTq4Cq.d.mts +52 -0
- package/dist/clis/args/init-CFeTq4Cq.d.mts.map +1 -0
- package/dist/clis/args/{init-rz9Ei7nq.mjs → init-Dvb42Y87.mjs} +2 -2
- package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-Dvb42Y87.mjs.map} +1 -1
- package/dist/clis/args/init.d.mts +3 -2
- package/dist/clis/args/init.mjs +1 -1
- package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
- package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
- package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
- package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
- package/dist/clis/args/inspect.d.mts +3 -2
- package/dist/clis/args/inspect.mjs +1 -1
- package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
- package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
- package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
- package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
- package/dist/clis/args/install.d.mts +3 -2
- package/dist/clis/args/install.mjs +1 -1
- package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
- package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
- package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
- package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
- package/dist/clis/args/list.d.mts +3 -2
- package/dist/clis/args/list.mjs +1 -1
- package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
- package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
- package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
- package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
- package/dist/clis/args/login.d.mts +3 -2
- package/dist/clis/args/login.mjs +1 -1
- package/dist/clis/args/{magic-string.es-h_0HDQBQ.mjs → magic-string.es-BWtG0AyA.mjs} +33 -27
- package/dist/clis/args/magic-string.es-BWtG0AyA.mjs.map +1 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
- package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
- package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
- package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
- package/dist/clis/args/migrate.d.mts +3 -2
- package/dist/clis/args/migrate.mjs +1 -1
- package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
- package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
- package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
- package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
- package/dist/clis/args/publish.d.mts +3 -2
- package/dist/clis/args/publish.mjs +1 -1
- package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
- package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
- package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
- package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
- package/dist/clis/args/registry.d.mts +3 -2
- package/dist/clis/args/registry.mjs +1 -1
- package/dist/clis/args/service-BBx5GDTc.d.mts +27 -0
- package/dist/clis/args/service-BBx5GDTc.d.mts.map +1 -0
- package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
- package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
- package/dist/clis/args/service.d.mts +3 -2
- package/dist/clis/args/service.mjs +1 -1
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
- package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
- package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
- package/dist/clis/args/switchboard.d.mts +3 -2
- package/dist/clis/args/switchboard.mjs +1 -1
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
- package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
- package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
- package/dist/clis/args/uninstall.d.mts +3 -2
- package/dist/clis/args/uninstall.mjs +1 -1
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
- package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
- package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
- package/dist/clis/args/unpublish.d.mts +3 -2
- package/dist/clis/args/unpublish.mjs +1 -1
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
- package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
- package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
- package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
- package/dist/clis/args/vetra-ports.test.d.mts +2 -1
- package/dist/clis/args/vetra-ports.test.mjs +285 -180
- package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
- package/dist/clis/args/vetra.d.mts +3 -2
- package/dist/clis/args/vetra.mjs +1 -1
- package/dist/clis/build-config-CmdMi_wu.mjs +230 -0
- package/dist/clis/build-config-CmdMi_wu.mjs.map +1 -0
- package/dist/clis/build-config.d.mts +44 -10614
- package/dist/clis/build-config.d.mts.map +1 -1
- package/dist/clis/build-config.mjs +2 -93
- package/dist/clis/build-pieces.d.mts +100 -0
- package/dist/clis/build-pieces.d.mts.map +1 -0
- package/dist/clis/build-pieces.mjs +371 -0
- package/dist/clis/build-pieces.mjs.map +1 -0
- package/dist/clis/command-names.d.mts +2 -2
- package/dist/clis/command-names.d.mts.map +1 -1
- package/dist/clis/command-names.mjs.map +1 -1
- package/dist/clis/constants.d.mts +3 -475
- package/dist/clis/constants.mjs +17 -8
- package/dist/clis/constants.mjs.map +1 -1
- package/dist/clis/index-6CZwrmQi.d.mts +11154 -0
- package/dist/clis/index-6CZwrmQi.d.mts.map +1 -0
- package/dist/clis/index.d.mts +1368 -1221
- package/dist/clis/index.d.mts.map +1 -1
- package/dist/clis/index.mjs +209 -65
- package/dist/clis/index.mjs.map +1 -1
- package/dist/clis/project-env.d.mts +4 -4
- package/dist/clis/project-env.d.mts.map +1 -1
- package/dist/clis/project-env.mjs.map +1 -1
- package/dist/clis/project-ports.d.mts +5 -5
- package/dist/clis/project-ports.d.mts.map +1 -1
- package/dist/clis/project-ports.mjs +1 -1
- package/dist/clis/project-ports.mjs.map +1 -1
- package/dist/clis/services/telemetry.d.mts +7 -7
- package/dist/clis/services/telemetry.d.mts.map +1 -1
- package/dist/clis/services/telemetry.mjs.map +1 -1
- package/dist/clis/types-nzer4WIr.d.mts +541 -0
- package/dist/clis/types-nzer4WIr.d.mts.map +1 -0
- package/dist/clis/utils.d.mts +4 -4
- package/dist/clis/utils.d.mts.map +1 -1
- package/dist/clis/utils.mjs.map +1 -1
- package/dist/{config-loader-B845Hidf.js → config-loader-C6dZB_iX.js} +28 -8
- package/dist/config-loader-C6dZB_iX.js.map +1 -0
- package/dist/connect/config-loader.d.ts +14 -8
- package/dist/connect/config-loader.d.ts.map +1 -1
- package/dist/connect/config-loader.js +2 -2
- package/dist/connect/index.d.ts +190 -56
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +303 -30
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/json-adapter.d.ts +3 -4
- package/dist/connect/json-adapter.d.ts.map +1 -1
- package/dist/connect/json-adapter.js.map +1 -1
- package/dist/{constants-BP_gjn8g.d.ts → constants-DO4IYxuR.d.ts} +2 -1
- package/dist/constants-DO4IYxuR.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -2
- package/dist/constants.js.map +1 -1
- package/dist/document-drive/index.d.ts +104 -101
- package/dist/document-drive/index.d.ts.map +1 -1
- package/dist/document-drive/index.js +39 -19
- package/dist/document-drive/index.js.map +1 -1
- package/dist/document-model/index.d.ts +5 -4
- package/dist/document-model/index.js +605 -228
- package/dist/document-model/index.js.map +1 -1
- package/dist/document-model/mock.d.ts +2 -3
- package/dist/document-model/mock.d.ts.map +1 -1
- package/dist/document-model/mock.js +2 -1
- package/dist/document-model/mock.js.map +1 -1
- package/dist/document-model/utils.d.ts +3 -2
- package/dist/document-model/utils.js +1 -1
- package/dist/index-5gwOhPG5.d.ts +36 -0
- package/dist/index-5gwOhPG5.d.ts.map +1 -0
- package/dist/{index-DP3QgHTq.d.ts → index-D6833Siv.d.ts} +131 -28
- package/dist/index-D6833Siv.d.ts.map +1 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js.map +1 -1
- package/dist/processors/index.d.ts +3 -2
- package/dist/processors/index.js +5 -1
- package/dist/processors/index.js.map +1 -1
- package/dist/registry/index.d.ts +15 -15
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +14 -5
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/manifest-slim.d.ts +4 -3
- package/dist/registry/manifest-slim.d.ts.map +1 -1
- package/dist/registry/manifest-slim.js +22 -2
- package/dist/registry/manifest-slim.js.map +1 -1
- package/dist/registry/updates.d.ts +3 -3
- package/dist/registry/updates.d.ts.map +1 -1
- package/dist/registry/updates.js.map +1 -1
- package/dist/registry/urls.d.ts +2 -2
- package/dist/registry/urls.d.ts.map +1 -1
- package/dist/registry/urls.js.map +1 -1
- package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
- package/dist/types-Bsp8VL2y.d.ts.map +1 -0
- package/dist/{types-DDpRvBK_.d.ts → types-CI3ren9F.d.ts} +23 -35
- package/dist/types-CI3ren9F.d.ts.map +1 -0
- package/dist/{types-BIoOWpOT.d.ts → types-CmeoQg_J.d.ts} +602 -437
- package/dist/types-CmeoQg_J.d.ts.map +1 -0
- package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
- package/dist/utils-BrKxCmKx.d.ts.map +1 -0
- package/dist/{utils-aaTmfxFW.js → utils-CSF716ux.js} +10 -3
- package/dist/utils-CSF716ux.js.map +1 -0
- package/package.json +10 -5
- package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
- package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
- package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
- package/dist/clis/args/common-Dsf1vpHV.d.mts +0 -183
- package/dist/clis/args/common-Dsf1vpHV.d.mts.map +0 -1
- package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
- package/dist/clis/args/connect-DetTnI8g.d.mts +0 -443
- package/dist/clis/args/connect-DetTnI8g.d.mts.map +0 -1
- package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
- package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
- package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
- package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
- package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
- package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
- package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
- package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
- package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
- package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
- package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
- package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
- package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
- package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
- package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
- package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
- package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
- package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
- package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
- package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
- package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
- package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
- package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
- package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
- package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
- package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
- package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
- package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
- package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
- package/dist/clis/args/vetra-DLQ6lhLl.d.mts +0 -113
- package/dist/clis/args/vetra-DLQ6lhLl.d.mts.map +0 -1
- package/dist/clis/build-config.mjs.map +0 -1
- package/dist/clis/constants.d.mts.map +0 -1
- package/dist/config-loader-B845Hidf.js.map +0 -1
- package/dist/constants-BP_gjn8g.d.ts.map +0 -1
- package/dist/index-C_iVZe7f.d.ts +0 -7
- package/dist/index-C_iVZe7f.d.ts.map +0 -1
- package/dist/index-DP3QgHTq.d.ts.map +0 -1
- package/dist/types-BIoOWpOT.d.ts.map +0 -1
- package/dist/types-C1in4fl3.d.ts.map +0 -1
- package/dist/types-DDpRvBK_.d.ts.map +0 -1
- package/dist/utils-DP122OSS.d.ts.map +0 -1
- package/dist/utils-aaTmfxFW.js.map +0 -1
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { Bu as PHBaseState, Dn as IsStateOfType, En as IsDocumentOfType, Fn as Maybe, Vt as DocumentModelGlobalState, _t as CreateDocument, bt as CreateState, ct as AssertIsStateOfType, kn as LoadFromInput, pi as SaveToFileHandle, qr as Reducer, st as AssertIsDocumentOfType } from "../types-CmeoQg_J.js";
|
|
2
|
+
import "../index-D6833Siv.js";
|
|
3
|
+
import { $ as DeleteNodeAction, A as TriggerData, C as RemoveTriggerInput, D as SetSharingTypeInput, E as SetDriveNameInput, G as DocumentDriveAction, J as LegacyAddFileInput, K as DocumentDriveDocument, M as TriggerType, N as UpdateFileInput, O as TransmitterType, P as UpdateNodeInput, Q as CopyNodeAction, S as RemoveListenerInput, T as SetDriveIconInput, U as DocumentDrivePHState, W as DriveDocumentModelModule, X as AddFileAction, Y as LegacySynchronizationUnit, Z as AddFolderAction, _ as ListenerInput, a as CopyNodeInput, at as AddListenerAction, b as PullResponderTriggerData, c as DocumentDriveLocalState, ct as DocumentDriveDriveOperations, d as FolderNode, dt as SetAvailableOfflineAction, et as DocumentDriveNodeAction, f as Listener, ft as SetDriveIconAction, g as ListenerFilterInput, h as ListenerFilter, i as AddTriggerInput, it as UpdateNodeAction, j as TriggerInput, k as Trigger, l as DocumentDrivePHState$1, lt as RemoveListenerAction, m as ListenerCallInfoInput, mt as SetSharingTypeAction, n as AddFolderInput, nt as MoveNodeAction, o as DeleteNodeInput, ot as AddTriggerAction, p as ListenerCallInfo, pt as SetDriveNameAction, q as LegacyAddFileAction, r as AddListenerInput, rt as UpdateFileAction, s as DocumentDriveGlobalState, st as DocumentDriveDriveAction, t as AddFileInput, tt as DocumentDriveNodeOperations, u as FileNode, ut as RemoveTriggerAction, v as MoveNodeInput, w as SetAvailableOfflineInput, x as PullResponderTriggerDataInput, y as Node } from "../types-CI3ren9F.js";
|
|
4
|
+
import { a as GenerateNodesCopyIdGenerator, i as DriveInput, o as GenerateNodesCopySrc, s as SharingType } from "../index-5gwOhPG5.js";
|
|
3
5
|
import { z } from "zod";
|
|
4
|
-
|
|
5
6
|
//#region document-drive/constants.d.ts
|
|
6
|
-
declare const driveDocumentFileExtension = "phdd";
|
|
7
|
+
export declare const driveDocumentFileExtension = "phdd";
|
|
7
8
|
//#endregion
|
|
8
9
|
//#region document-drive/gen/node/creators.d.ts
|
|
9
10
|
/**
|
|
10
11
|
* @deprecated Use addFile with {@link AddFileInput} instead. This overload will be removed in the future.
|
|
11
12
|
*/
|
|
12
|
-
declare function addFile(input: LegacyAddFileInput): LegacyAddFileAction;
|
|
13
|
-
declare function addFile(input: AddFileInput): AddFileAction;
|
|
14
|
-
declare const addFolder: (input: AddFolderInput) => AddFolderAction;
|
|
15
|
-
declare const deleteNode: (input: DeleteNodeInput) => DeleteNodeAction;
|
|
16
|
-
declare const updateFile: (input: UpdateFileInput) => UpdateFileAction;
|
|
17
|
-
declare const updateNode: (input: UpdateNodeInput) => UpdateNodeAction;
|
|
18
|
-
declare const copyNode: (input: CopyNodeInput) => CopyNodeAction;
|
|
19
|
-
declare const moveNode: (input: MoveNodeInput) => MoveNodeAction;
|
|
13
|
+
export declare function addFile(input: LegacyAddFileInput): LegacyAddFileAction;
|
|
14
|
+
export declare function addFile(input: AddFileInput): AddFileAction;
|
|
15
|
+
export declare const addFolder: (input: AddFolderInput) => AddFolderAction;
|
|
16
|
+
export declare const deleteNode: (input: DeleteNodeInput) => DeleteNodeAction;
|
|
17
|
+
export declare const updateFile: (input: UpdateFileInput) => UpdateFileAction;
|
|
18
|
+
export declare const updateNode: (input: UpdateNodeInput) => UpdateNodeAction;
|
|
19
|
+
export declare const copyNode: (input: CopyNodeInput) => CopyNodeAction;
|
|
20
|
+
export declare const moveNode: (input: MoveNodeInput) => MoveNodeAction;
|
|
20
21
|
//#endregion
|
|
21
22
|
//#region document-drive/gen/drive/creators.d.ts
|
|
22
|
-
declare const setDriveName: (input: SetDriveNameInput) => SetDriveNameAction;
|
|
23
|
-
declare const setDriveIcon: (input: SetDriveIconInput) => SetDriveIconAction;
|
|
24
|
-
declare const setSharingType: (input: SetSharingTypeInput) => SetSharingTypeAction;
|
|
25
|
-
declare const setAvailableOffline: (input: SetAvailableOfflineInput) => SetAvailableOfflineAction;
|
|
26
|
-
declare const addListener: (input: AddListenerInput) => AddListenerAction;
|
|
27
|
-
declare const removeListener: (input: RemoveListenerInput) => RemoveListenerAction;
|
|
28
|
-
declare const addTrigger: (input: AddTriggerInput) => AddTriggerAction;
|
|
29
|
-
declare const removeTrigger: (input: RemoveTriggerInput) => RemoveTriggerAction;
|
|
23
|
+
export declare const setDriveName: (input: SetDriveNameInput) => SetDriveNameAction;
|
|
24
|
+
export declare const setDriveIcon: (input: SetDriveIconInput) => SetDriveIconAction;
|
|
25
|
+
export declare const setSharingType: (input: SetSharingTypeInput) => SetSharingTypeAction;
|
|
26
|
+
export declare const setAvailableOffline: (input: SetAvailableOfflineInput) => SetAvailableOfflineAction;
|
|
27
|
+
export declare const addListener: (input: AddListenerInput) => AddListenerAction;
|
|
28
|
+
export declare const removeListener: (input: RemoveListenerInput) => RemoveListenerAction;
|
|
29
|
+
export declare const addTrigger: (input: AddTriggerInput) => AddTriggerAction;
|
|
30
|
+
export declare const removeTrigger: (input: RemoveTriggerInput) => RemoveTriggerAction;
|
|
30
31
|
//#endregion
|
|
31
32
|
//#region document-drive/gen/document-model.d.ts
|
|
32
|
-
declare const driveDocumentModel: DocumentModelGlobalState;
|
|
33
|
+
export declare const driveDocumentModel: DocumentModelGlobalState;
|
|
33
34
|
//#endregion
|
|
34
35
|
//#region document-drive/gen/document-schema.d.ts
|
|
35
36
|
/** Schema for validating the header object of a Drive document */
|
|
36
|
-
declare const DriveDocumentHeaderSchema: z.ZodObject<{
|
|
37
|
+
export declare const DriveDocumentHeaderSchema: z.ZodObject<{
|
|
37
38
|
id: z.ZodString;
|
|
38
39
|
name: z.ZodString;
|
|
39
40
|
createdAtUtcIso: z.ZodString;
|
|
@@ -41,7 +42,7 @@ declare const DriveDocumentHeaderSchema: z.ZodObject<{
|
|
|
41
42
|
documentType: z.ZodLiteral<"powerhouse/document-drive">;
|
|
42
43
|
}, z.core.$strip>;
|
|
43
44
|
/** Schema for validating the state object of a Drive document */
|
|
44
|
-
declare const DrivePHStateSchema: z.ZodObject<{
|
|
45
|
+
export declare const DrivePHStateSchema: z.ZodObject<{
|
|
45
46
|
global: z.ZodObject<Required<{
|
|
46
47
|
icon: z.ZodType<Maybe<string>, Maybe<string>, z.core.$ZodTypeInternals<Maybe<string>, Maybe<string>>>;
|
|
47
48
|
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
@@ -54,7 +55,7 @@ declare const DrivePHStateSchema: z.ZodObject<{
|
|
|
54
55
|
triggers: z.ZodType<Trigger[], Trigger[], z.core.$ZodTypeInternals<Trigger[], Trigger[]>>;
|
|
55
56
|
}>, z.core.$strip>;
|
|
56
57
|
}, z.core.$strip>;
|
|
57
|
-
declare const DriveDocumentSchema: z.ZodObject<{
|
|
58
|
+
export declare const DriveDocumentSchema: z.ZodObject<{
|
|
58
59
|
header: z.ZodObject<{
|
|
59
60
|
id: z.ZodString;
|
|
60
61
|
name: z.ZodString;
|
|
@@ -90,34 +91,34 @@ declare const DriveDocumentSchema: z.ZodObject<{
|
|
|
90
91
|
}, z.core.$strip>;
|
|
91
92
|
}, z.core.$strip>;
|
|
92
93
|
/** Simple helper function to check if a state object is a Drive document state object */
|
|
93
|
-
declare function isDriveState(state: unknown): state is DocumentDrivePHState$1;
|
|
94
|
+
export declare function isDriveState(state: unknown): state is DocumentDrivePHState$1;
|
|
94
95
|
/** Simple helper function to assert that a document state object is a Drive document state object */
|
|
95
|
-
declare function assertIsDriveState(state: unknown): asserts state is DocumentDrivePHState$1;
|
|
96
|
+
export declare function assertIsDriveState(state: unknown): asserts state is DocumentDrivePHState$1;
|
|
96
97
|
/** Simple helper function to check if a document is a Drive document */
|
|
97
|
-
declare function isDriveDocument(document: unknown): document is DocumentDriveDocument;
|
|
98
|
+
export declare function isDriveDocument(document: unknown): document is DocumentDriveDocument;
|
|
98
99
|
/** Simple helper function to assert that a document is a Drive document */
|
|
99
|
-
declare function assertIsDriveDocument(document: unknown): asserts document is DocumentDriveDocument;
|
|
100
|
+
export declare function assertIsDriveDocument(document: unknown): asserts document is DocumentDriveDocument;
|
|
100
101
|
//#endregion
|
|
101
102
|
//#region document-drive/gen/document-type.d.ts
|
|
102
|
-
declare const driveDocumentType = "powerhouse/document-drive";
|
|
103
|
+
export declare const driveDocumentType = "powerhouse/document-drive";
|
|
103
104
|
//#endregion
|
|
104
105
|
//#region document-drive/gen/ph-factories.d.ts
|
|
105
|
-
declare function defaultGlobalState(): DocumentDriveGlobalState;
|
|
106
|
-
declare function defaultLocalState(): DocumentDriveLocalState;
|
|
107
|
-
declare function defaultPHState(): DocumentDrivePHState$1;
|
|
108
|
-
declare function createGlobalState(state?: Partial<DocumentDriveGlobalState>): DocumentDriveGlobalState;
|
|
109
|
-
declare function createLocalState(state?: Partial<DocumentDriveLocalState>): DocumentDriveLocalState;
|
|
110
|
-
declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<DocumentDriveGlobalState>, localState?: Partial<DocumentDriveLocalState>): DocumentDrivePHState$1;
|
|
106
|
+
export declare function defaultGlobalState(): DocumentDriveGlobalState;
|
|
107
|
+
export declare function defaultLocalState(): DocumentDriveLocalState;
|
|
108
|
+
export declare function defaultPHState(): DocumentDrivePHState$1;
|
|
109
|
+
export declare function createGlobalState(state?: Partial<DocumentDriveGlobalState>): DocumentDriveGlobalState;
|
|
110
|
+
export declare function createLocalState(state?: Partial<DocumentDriveLocalState>): DocumentDriveLocalState;
|
|
111
|
+
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<DocumentDriveGlobalState>, localState?: Partial<DocumentDriveLocalState>): DocumentDrivePHState$1;
|
|
111
112
|
//#endregion
|
|
112
113
|
//#region document-drive/gen/reducer.d.ts
|
|
113
|
-
declare const driveDocumentReducer: Reducer<DocumentDrivePHState$1>;
|
|
114
|
+
export declare const driveDocumentReducer: Reducer<DocumentDrivePHState$1>;
|
|
114
115
|
//#endregion
|
|
115
116
|
//#region document-drive/gen/schema/zod.d.ts
|
|
116
|
-
type Properties<T> = Required<{ [K in keyof T]: z.ZodType<T[K], T[K]
|
|
117
|
+
type Properties<T> = Required<{ [K in keyof T]: z.ZodType<T[K], T[K]>; }>;
|
|
117
118
|
type definedNonNullAny = {};
|
|
118
|
-
declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
119
|
-
declare const definedNonNullAnySchema: z.ZodAny & z.ZodType<definedNonNullAny, any, z.core.$ZodTypeInternals<definedNonNullAny, any>>;
|
|
120
|
-
declare const TransmitterTypeSchema: z.ZodEnum<{
|
|
119
|
+
export declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
|
|
120
|
+
export declare const definedNonNullAnySchema: z.ZodAny & z.ZodType<definedNonNullAny, any, z.core.$ZodTypeInternals<definedNonNullAny, any>>;
|
|
121
|
+
export declare const TransmitterTypeSchema: z.ZodEnum<{
|
|
121
122
|
Internal: "Internal";
|
|
122
123
|
MatrixConnect: "MatrixConnect";
|
|
123
124
|
PullResponder: "PullResponder";
|
|
@@ -125,27 +126,27 @@ declare const TransmitterTypeSchema: z.ZodEnum<{
|
|
|
125
126
|
SecureConnect: "SecureConnect";
|
|
126
127
|
SwitchboardPush: "SwitchboardPush";
|
|
127
128
|
}>;
|
|
128
|
-
declare const TriggerTypeSchema: z.ZodEnum<{
|
|
129
|
+
export declare const TriggerTypeSchema: z.ZodEnum<{
|
|
129
130
|
PullResponder: "PullResponder";
|
|
130
131
|
}>;
|
|
131
|
-
declare function AddFileInputSchema(): z.ZodObject<Properties<AddFileInput>>;
|
|
132
|
-
declare function AddFolderInputSchema(): z.ZodObject<Properties<AddFolderInput>>;
|
|
133
|
-
declare function AddListenerInputSchema(): z.ZodObject<Properties<AddListenerInput>>;
|
|
134
|
-
declare function AddTriggerInputSchema(): z.ZodObject<Properties<AddTriggerInput>>;
|
|
135
|
-
declare function CopyNodeInputSchema(): z.ZodObject<Properties<CopyNodeInput>>;
|
|
136
|
-
declare function DeleteNodeInputSchema(): z.ZodObject<Properties<DeleteNodeInput>>;
|
|
137
|
-
declare function DocumentDriveLocalStateSchema(): z.ZodObject<Properties<DocumentDriveLocalState>>;
|
|
138
|
-
declare function DocumentDriveStateSchema(): z.ZodObject<Properties<DocumentDriveGlobalState>>;
|
|
139
|
-
declare function FileNodeSchema(): z.ZodObject<Properties<FileNode>>;
|
|
140
|
-
declare function FolderNodeSchema(): z.ZodObject<Properties<FolderNode>>;
|
|
141
|
-
declare function ListenerSchema(): z.ZodObject<Properties<Listener>>;
|
|
142
|
-
declare function ListenerInputSchema(): z.ZodObject<Properties<ListenerInput>>;
|
|
143
|
-
declare function ListenerCallInfoSchema(): z.ZodObject<Properties<ListenerCallInfo>>;
|
|
144
|
-
declare function ListenerCallInfoInputSchema(): z.ZodObject<Properties<ListenerCallInfoInput>>;
|
|
145
|
-
declare function ListenerFilterSchema(): z.ZodObject<Properties<ListenerFilter>>;
|
|
146
|
-
declare function ListenerFilterInputSchema(): z.ZodObject<Properties<ListenerFilterInput>>;
|
|
147
|
-
declare function MoveNodeInputSchema(): z.ZodObject<Properties<MoveNodeInput>>;
|
|
148
|
-
declare function NodeSchema(): z.ZodUnion<readonly [z.ZodObject<Required<{
|
|
132
|
+
export declare function AddFileInputSchema(): z.ZodObject<Properties<AddFileInput>>;
|
|
133
|
+
export declare function AddFolderInputSchema(): z.ZodObject<Properties<AddFolderInput>>;
|
|
134
|
+
export declare function AddListenerInputSchema(): z.ZodObject<Properties<AddListenerInput>>;
|
|
135
|
+
export declare function AddTriggerInputSchema(): z.ZodObject<Properties<AddTriggerInput>>;
|
|
136
|
+
export declare function CopyNodeInputSchema(): z.ZodObject<Properties<CopyNodeInput>>;
|
|
137
|
+
export declare function DeleteNodeInputSchema(): z.ZodObject<Properties<DeleteNodeInput>>;
|
|
138
|
+
export declare function DocumentDriveLocalStateSchema(): z.ZodObject<Properties<DocumentDriveLocalState>>;
|
|
139
|
+
export declare function DocumentDriveStateSchema(): z.ZodObject<Properties<DocumentDriveGlobalState>>;
|
|
140
|
+
export declare function FileNodeSchema(): z.ZodObject<Properties<FileNode>>;
|
|
141
|
+
export declare function FolderNodeSchema(): z.ZodObject<Properties<FolderNode>>;
|
|
142
|
+
export declare function ListenerSchema(): z.ZodObject<Properties<Listener>>;
|
|
143
|
+
export declare function ListenerInputSchema(): z.ZodObject<Properties<ListenerInput>>;
|
|
144
|
+
export declare function ListenerCallInfoSchema(): z.ZodObject<Properties<ListenerCallInfo>>;
|
|
145
|
+
export declare function ListenerCallInfoInputSchema(): z.ZodObject<Properties<ListenerCallInfoInput>>;
|
|
146
|
+
export declare function ListenerFilterSchema(): z.ZodObject<Properties<ListenerFilter>>;
|
|
147
|
+
export declare function ListenerFilterInputSchema(): z.ZodObject<Properties<ListenerFilterInput>>;
|
|
148
|
+
export declare function MoveNodeInputSchema(): z.ZodObject<Properties<MoveNodeInput>>;
|
|
149
|
+
export declare function NodeSchema(): z.ZodUnion<readonly [z.ZodObject<Required<{
|
|
149
150
|
documentType: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
150
151
|
id: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
151
152
|
kind: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
@@ -157,50 +158,50 @@ declare function NodeSchema(): z.ZodUnion<readonly [z.ZodObject<Required<{
|
|
|
157
158
|
name: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
158
159
|
parentFolder: z.ZodType<Maybe<string>, Maybe<string>, z.core.$ZodTypeInternals<Maybe<string>, Maybe<string>>>;
|
|
159
160
|
}>, z.core.$strip>]>;
|
|
160
|
-
declare function PullResponderTriggerDataSchema(): z.ZodObject<Properties<PullResponderTriggerData>>;
|
|
161
|
-
declare function PullResponderTriggerDataInputSchema(): z.ZodObject<Properties<PullResponderTriggerDataInput>>;
|
|
162
|
-
declare function RemoveListenerInputSchema(): z.ZodObject<Properties<RemoveListenerInput>>;
|
|
163
|
-
declare function RemoveTriggerInputSchema(): z.ZodObject<Properties<RemoveTriggerInput>>;
|
|
164
|
-
declare function SetAvailableOfflineInputSchema(): z.ZodObject<Properties<SetAvailableOfflineInput>>;
|
|
165
|
-
declare function SetDriveIconInputSchema(): z.ZodObject<Properties<SetDriveIconInput>>;
|
|
166
|
-
declare function SetDriveNameInputSchema(): z.ZodObject<Properties<SetDriveNameInput>>;
|
|
167
|
-
declare function SetSharingTypeInputSchema(): z.ZodObject<Properties<SetSharingTypeInput>>;
|
|
168
|
-
declare function TriggerSchema(): z.ZodObject<Properties<Trigger>>;
|
|
169
|
-
declare function TriggerInputSchema(): z.ZodObject<Properties<TriggerInput>>;
|
|
170
|
-
declare function TriggerDataSchema(): z.ZodObject<Required<{
|
|
161
|
+
export declare function PullResponderTriggerDataSchema(): z.ZodObject<Properties<PullResponderTriggerData>>;
|
|
162
|
+
export declare function PullResponderTriggerDataInputSchema(): z.ZodObject<Properties<PullResponderTriggerDataInput>>;
|
|
163
|
+
export declare function RemoveListenerInputSchema(): z.ZodObject<Properties<RemoveListenerInput>>;
|
|
164
|
+
export declare function RemoveTriggerInputSchema(): z.ZodObject<Properties<RemoveTriggerInput>>;
|
|
165
|
+
export declare function SetAvailableOfflineInputSchema(): z.ZodObject<Properties<SetAvailableOfflineInput>>;
|
|
166
|
+
export declare function SetDriveIconInputSchema(): z.ZodObject<Properties<SetDriveIconInput>>;
|
|
167
|
+
export declare function SetDriveNameInputSchema(): z.ZodObject<Properties<SetDriveNameInput>>;
|
|
168
|
+
export declare function SetSharingTypeInputSchema(): z.ZodObject<Properties<SetSharingTypeInput>>;
|
|
169
|
+
export declare function TriggerSchema(): z.ZodObject<Properties<Trigger>>;
|
|
170
|
+
export declare function TriggerInputSchema(): z.ZodObject<Properties<TriggerInput>>;
|
|
171
|
+
export declare function TriggerDataSchema(): z.ZodObject<Required<{
|
|
171
172
|
interval: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
172
173
|
listenerId: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
173
174
|
url: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
174
175
|
}>, z.core.$strip>;
|
|
175
|
-
declare function UpdateFileInputSchema(): z.ZodObject<Properties<UpdateFileInput>>;
|
|
176
|
-
declare function UpdateNodeInputSchema(): z.ZodObject<Properties<UpdateNodeInput>>;
|
|
176
|
+
export declare function UpdateFileInputSchema(): z.ZodObject<Properties<UpdateFileInput>>;
|
|
177
|
+
export declare function UpdateNodeInputSchema(): z.ZodObject<Properties<UpdateNodeInput>>;
|
|
177
178
|
//#endregion
|
|
178
179
|
//#region document-drive/gen/utils.d.ts
|
|
179
|
-
declare const initialGlobalState: DocumentDriveGlobalState;
|
|
180
|
-
declare const initialLocalState: DocumentDriveLocalState;
|
|
181
|
-
declare const driveCreateState: CreateState<DocumentDrivePHState$1>;
|
|
182
|
-
declare const driveCreateDocument: CreateDocument<DocumentDrivePHState$1>;
|
|
183
|
-
declare const driveSaveToFileHandle: SaveToFileHandle;
|
|
184
|
-
declare const driveLoadFromInput: LoadFromInput<DocumentDrivePHState$1>;
|
|
185
|
-
declare const isStateOfType: IsStateOfType<DocumentDrivePHState$1>;
|
|
186
|
-
declare const assertIsStateOfType: AssertIsStateOfType<DocumentDrivePHState$1>;
|
|
187
|
-
declare const isDocumentOfType: IsDocumentOfType<DocumentDrivePHState$1>;
|
|
188
|
-
declare const assertIsDocumentOfType: AssertIsDocumentOfType<DocumentDrivePHState$1>;
|
|
180
|
+
export declare const initialGlobalState: DocumentDriveGlobalState;
|
|
181
|
+
export declare const initialLocalState: DocumentDriveLocalState;
|
|
182
|
+
export declare const driveCreateState: CreateState<DocumentDrivePHState$1>;
|
|
183
|
+
export declare const driveCreateDocument: CreateDocument<DocumentDrivePHState$1>;
|
|
184
|
+
export declare const driveSaveToFileHandle: SaveToFileHandle;
|
|
185
|
+
export declare const driveLoadFromInput: LoadFromInput<DocumentDrivePHState$1>;
|
|
186
|
+
export declare const isStateOfType: IsStateOfType<DocumentDrivePHState$1>;
|
|
187
|
+
export declare const assertIsStateOfType: AssertIsStateOfType<DocumentDrivePHState$1>;
|
|
188
|
+
export declare const isDocumentOfType: IsDocumentOfType<DocumentDrivePHState$1>;
|
|
189
|
+
export declare const assertIsDocumentOfType: AssertIsDocumentOfType<DocumentDrivePHState$1>;
|
|
189
190
|
//#endregion
|
|
190
191
|
//#region document-drive/module.d.ts
|
|
191
|
-
declare const driveDocumentModelModule: DriveDocumentModelModule;
|
|
192
|
+
export declare const driveDocumentModelModule: DriveDocumentModelModule;
|
|
192
193
|
//#endregion
|
|
193
194
|
//#region document-drive/src/reducers/drive.d.ts
|
|
194
|
-
declare const driveReducer: DocumentDriveDriveOperations;
|
|
195
|
+
export declare const driveReducer: DocumentDriveDriveOperations;
|
|
195
196
|
//#endregion
|
|
196
197
|
//#region document-drive/src/reducers/node.d.ts
|
|
197
|
-
declare const nodeReducer: DocumentDriveNodeOperations;
|
|
198
|
+
export declare const nodeReducer: DocumentDriveNodeOperations;
|
|
198
199
|
//#endregion
|
|
199
200
|
//#region document-drive/src/utils.d.ts
|
|
200
|
-
declare function isFileNode(node: Node): node is FileNode;
|
|
201
|
-
declare function isFolderNode(node: Node): node is FolderNode;
|
|
202
|
-
declare function getAncestors(node: Node, allNodes: Node[]): Node[];
|
|
203
|
-
declare function getDescendants(node: Node, allNodes: Node[]): Node[];
|
|
201
|
+
export declare function isFileNode(node: Node): node is FileNode;
|
|
202
|
+
export declare function isFolderNode(node: Node): node is FolderNode;
|
|
203
|
+
export declare function getAncestors(node: Node, allNodes: Node[]): Node[];
|
|
204
|
+
export declare function getDescendants(node: Node, allNodes: Node[]): Node[];
|
|
204
205
|
/**
|
|
205
206
|
* Generates a copy of nodes based on the provided source and target information.
|
|
206
207
|
* @param src - The source information for generating the copy.
|
|
@@ -209,9 +210,9 @@ declare function getDescendants(node: Node, allNodes: Node[]): Node[];
|
|
|
209
210
|
* @returns An array of copied nodes with updated IDs and parent folders.
|
|
210
211
|
* @throws Error if the root node with the specified ID is not found.
|
|
211
212
|
*/
|
|
212
|
-
declare function generateNodesCopy(src: GenerateNodesCopySrc, idGenerator: GenerateNodesCopyIdGenerator, nodes: Node[]): CopyNodeInput[];
|
|
213
|
-
declare function getNextCopyNumber(files: string[], baseFilename: string): number;
|
|
214
|
-
declare function escapeRegExp(string: string): string;
|
|
213
|
+
export declare function generateNodesCopy(src: GenerateNodesCopySrc, idGenerator: GenerateNodesCopyIdGenerator, nodes: Node[]): CopyNodeInput[];
|
|
214
|
+
export declare function getNextCopyNumber(files: string[], baseFilename: string): number;
|
|
215
|
+
export declare function escapeRegExp(string: string): string;
|
|
215
216
|
/**
|
|
216
217
|
* A plain, unfrozen copy of the node list for read-only scans. Inside a
|
|
217
218
|
* mutative draft the copy is taken from the untouched base list, so a find or
|
|
@@ -220,7 +221,7 @@ declare function escapeRegExp(string: string): string;
|
|
|
220
221
|
* times slower than a normal one. Callers must read before they write: the base
|
|
221
222
|
* list does not see mutations made earlier in the same action.
|
|
222
223
|
*/
|
|
223
|
-
declare function readNodes(state: {
|
|
224
|
+
export declare function readNodes(state: {
|
|
224
225
|
nodes: Node[];
|
|
225
226
|
}): Node[];
|
|
226
227
|
/**
|
|
@@ -229,7 +230,7 @@ declare function readNodes(state: {
|
|
|
229
230
|
* it, and pass what this returns to assignNodes. The copy is what keeps the
|
|
230
231
|
* freeze off the caller's array.
|
|
231
232
|
*/
|
|
232
|
-
declare function sortNodesById(nodes: readonly Node[]): readonly Node[];
|
|
233
|
+
export declare function sortNodesById(nodes: readonly Node[]): readonly Node[];
|
|
233
234
|
/**
|
|
234
235
|
* The node list with a node added, ordered by id and frozen, in the same shape
|
|
235
236
|
* sortNodesById returns. The list is built and sorted as plain objects, so
|
|
@@ -238,7 +239,7 @@ declare function sortNodesById(nodes: readonly Node[]): readonly Node[];
|
|
|
238
239
|
* put child drafts in the result, which the freeze then keeps mutative from
|
|
239
240
|
* resolving.
|
|
240
241
|
*/
|
|
241
|
-
declare function insertNodeSorted(nodes: readonly Node[], node: Node): readonly Node[];
|
|
242
|
+
export declare function insertNodeSorted(nodes: readonly Node[], node: Node): readonly Node[];
|
|
242
243
|
/**
|
|
243
244
|
* Installs a node list as state.nodes. Every assignment the node reducer makes
|
|
244
245
|
* goes through here, and this is the one place a frozen array crosses into
|
|
@@ -246,19 +247,21 @@ declare function insertNodeSorted(nodes: readonly Node[], node: Node): readonly
|
|
|
246
247
|
* Node[], so the cast below is where that gap is paid rather than spread over
|
|
247
248
|
* the reducer. Consumers must treat drive.state.global.nodes as read-only --
|
|
248
249
|
* mutating it in place (push, sort, splice) throws in strict mode; copy it
|
|
249
|
-
* first, as readNodes does. Note that
|
|
250
|
-
* install a list this
|
|
250
|
+
* first, as readNodes does. Note that UPGRADE_DOCUMENT's initialState and
|
|
251
|
+
* imported documents replace a whole scope and can install a list this
|
|
252
|
+
* function never saw.
|
|
251
253
|
*/
|
|
252
|
-
declare function assignNodes(state: {
|
|
254
|
+
export declare function assignNodes(state: {
|
|
253
255
|
nodes: Node[];
|
|
254
256
|
}, nodes: readonly Node[]): void;
|
|
255
|
-
declare function handleTargetNameCollisions(params: {
|
|
257
|
+
export declare function handleTargetNameCollisions(params: {
|
|
256
258
|
nodes: Node[];
|
|
257
259
|
targetParentFolder: string | null;
|
|
258
260
|
srcName: string;
|
|
259
261
|
srcKind: "file" | "folder";
|
|
260
262
|
}): string;
|
|
261
|
-
declare const isValidName: (name: string) => boolean;
|
|
263
|
+
export declare const isValidName: (name: string) => boolean;
|
|
262
264
|
//#endregion
|
|
263
|
-
export { AddFileAction, AddFileInput,
|
|
265
|
+
export type { AddFileAction, AddFileInput, AddFolderAction, AddFolderInput, AddListenerAction, AddListenerInput, AddTriggerAction, AddTriggerInput, CopyNodeAction, CopyNodeInput, DeleteNodeAction, DeleteNodeInput, DocumentDriveAction, DocumentDriveDocument, DocumentDriveDriveAction, DocumentDriveDriveOperations, DocumentDriveGlobalState, DocumentDriveLocalState, DocumentDriveNodeAction, DocumentDriveNodeOperations, DocumentDrivePHState, DriveDocumentModelModule, DriveInput, FileNode, FolderNode, GenerateNodesCopyIdGenerator, GenerateNodesCopySrc, LegacyAddFileAction, LegacyAddFileInput, LegacySynchronizationUnit, Listener, ListenerCallInfo, ListenerCallInfoInput, ListenerFilter, ListenerFilterInput, ListenerInput, MoveNodeAction, MoveNodeInput, Node, PullResponderTriggerData, PullResponderTriggerDataInput, RemoveListenerAction, RemoveListenerInput, RemoveTriggerAction, RemoveTriggerInput, SetAvailableOfflineAction, SetAvailableOfflineInput, SetDriveIconAction, SetDriveIconInput, SetDriveNameAction, SetDriveNameInput, SetSharingTypeAction, SetSharingTypeInput, SharingType, TransmitterType, Trigger, TriggerData, TriggerInput, TriggerType, UpdateFileAction, UpdateFileInput, UpdateNodeAction, UpdateNodeInput };
|
|
266
|
+
export {};
|
|
264
267
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../document-drive/constants.ts","../../document-drive/gen/node/creators.ts","../../document-drive/gen/drive/creators.ts","../../document-drive/gen/document-model.ts","../../document-drive/gen/document-schema.ts","../../document-drive/gen/document-type.ts","../../document-drive/gen/ph-factories.ts","../../document-drive/gen/reducer.ts","../../document-drive/gen/schema/zod.ts","../../document-drive/gen/utils.ts","../../document-drive/module.ts","../../document-drive/src/reducers/drive.ts","../../document-drive/src/reducers/node.ts","../../document-drive/src/utils.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../document-drive/constants.ts","../../document-drive/gen/node/creators.ts","../../document-drive/gen/drive/creators.ts","../../document-drive/gen/document-model.ts","../../document-drive/gen/document-schema.ts","../../document-drive/gen/document-type.ts","../../document-drive/gen/ph-factories.ts","../../document-drive/gen/reducer.ts","../../document-drive/gen/schema/zod.ts","../../document-drive/gen/utils.ts","../../document-drive/module.ts","../../document-drive/src/reducers/drive.ts","../../document-drive/src/reducers/node.ts","../../document-drive/src/utils.ts"],"mappings":"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"}
|
|
@@ -552,6 +552,14 @@ function createState(baseState, globalState, localState) {
|
|
|
552
552
|
}
|
|
553
553
|
//#endregion
|
|
554
554
|
//#region document-drive/src/reducers/drive.ts
|
|
555
|
+
/**
|
|
556
|
+
* The untouched base of a mutative draft, or the value itself when it is not a
|
|
557
|
+
* draft. Build replacement lists from it and freeze them before assigning, as
|
|
558
|
+
* the node reducer does, so finalize skips the walk over the assigned list.
|
|
559
|
+
*/
|
|
560
|
+
function readBase(value) {
|
|
561
|
+
return isDraft(value) ? original(value) : value;
|
|
562
|
+
}
|
|
555
563
|
const driveReducer = {
|
|
556
564
|
setDriveNameOperation(state, action, dispatch) {
|
|
557
565
|
state.name = action.input.name;
|
|
@@ -588,7 +596,8 @@ const driveReducer = {
|
|
|
588
596
|
state.listeners.push(listener);
|
|
589
597
|
},
|
|
590
598
|
removeListenerOperation(state, action, dispatch) {
|
|
591
|
-
|
|
599
|
+
const listeners = readBase(state).listeners.filter((listener) => listener.listenerId !== action.input.listenerId);
|
|
600
|
+
state.listeners = Object.freeze(listeners);
|
|
592
601
|
},
|
|
593
602
|
addTriggerOperation(state, action, dispatch) {
|
|
594
603
|
const { trigger: input } = action.input;
|
|
@@ -601,7 +610,8 @@ const driveReducer = {
|
|
|
601
610
|
state.triggers.push(trigger);
|
|
602
611
|
},
|
|
603
612
|
removeTriggerOperation(state, action, dispatch) {
|
|
604
|
-
|
|
613
|
+
const triggers = readBase(state).triggers.filter((trigger) => trigger.id !== action.input.triggerId);
|
|
614
|
+
state.triggers = Object.freeze(triggers);
|
|
605
615
|
}
|
|
606
616
|
};
|
|
607
617
|
//#endregion
|
|
@@ -727,8 +737,9 @@ function insertNodeSorted(nodes, node) {
|
|
|
727
737
|
* Node[], so the cast below is where that gap is paid rather than spread over
|
|
728
738
|
* the reducer. Consumers must treat drive.state.global.nodes as read-only --
|
|
729
739
|
* mutating it in place (push, sort, splice) throws in strict mode; copy it
|
|
730
|
-
* first, as readNodes does. Note that
|
|
731
|
-
* install a list this
|
|
740
|
+
* first, as readNodes does. Note that UPGRADE_DOCUMENT's initialState and
|
|
741
|
+
* imported documents replace a whole scope and can install a list this
|
|
742
|
+
* function never saw.
|
|
732
743
|
*/
|
|
733
744
|
function assignNodes(state, nodes) {
|
|
734
745
|
state.nodes = nodes;
|
|
@@ -880,68 +891,77 @@ const nodeReducer = {
|
|
|
880
891
|
};
|
|
881
892
|
//#endregion
|
|
882
893
|
//#region document-drive/gen/reducer.ts
|
|
894
|
+
const schemaMemo = /* @__PURE__ */ new Map();
|
|
895
|
+
function memoizedSchema(makeSchema) {
|
|
896
|
+
let schema = schemaMemo.get(makeSchema);
|
|
897
|
+
if (schema === void 0) {
|
|
898
|
+
schema = makeSchema();
|
|
899
|
+
schemaMemo.set(makeSchema, schema);
|
|
900
|
+
}
|
|
901
|
+
return schema;
|
|
902
|
+
}
|
|
883
903
|
const driveStateReducer = (state, action, dispatch) => {
|
|
884
904
|
if (isDocumentAction(action)) return state;
|
|
885
905
|
const typedAction = action;
|
|
886
906
|
switch (typedAction.type) {
|
|
887
907
|
case "ADD_FILE":
|
|
888
|
-
AddFileInputSchema
|
|
908
|
+
memoizedSchema(AddFileInputSchema).parse(typedAction.input);
|
|
889
909
|
nodeReducer.addFileOperation(state[typedAction.scope], action, dispatch);
|
|
890
910
|
break;
|
|
891
911
|
case "ADD_FOLDER":
|
|
892
|
-
AddFolderInputSchema
|
|
912
|
+
memoizedSchema(AddFolderInputSchema).parse(typedAction.input);
|
|
893
913
|
nodeReducer.addFolderOperation(state[typedAction.scope], action, dispatch);
|
|
894
914
|
break;
|
|
895
915
|
case "DELETE_NODE":
|
|
896
|
-
DeleteNodeInputSchema
|
|
916
|
+
memoizedSchema(DeleteNodeInputSchema).parse(typedAction.input);
|
|
897
917
|
nodeReducer.deleteNodeOperation(state[typedAction.scope], action, dispatch);
|
|
898
918
|
break;
|
|
899
919
|
case "UPDATE_FILE":
|
|
900
|
-
UpdateFileInputSchema
|
|
920
|
+
memoizedSchema(UpdateFileInputSchema).parse(typedAction.input);
|
|
901
921
|
nodeReducer.updateFileOperation(state[typedAction.scope], action, dispatch);
|
|
902
922
|
break;
|
|
903
923
|
case "UPDATE_NODE":
|
|
904
|
-
UpdateNodeInputSchema
|
|
924
|
+
memoizedSchema(UpdateNodeInputSchema).parse(typedAction.input);
|
|
905
925
|
nodeReducer.updateNodeOperation(state[typedAction.scope], action, dispatch);
|
|
906
926
|
break;
|
|
907
927
|
case "COPY_NODE":
|
|
908
|
-
CopyNodeInputSchema
|
|
928
|
+
memoizedSchema(CopyNodeInputSchema).parse(typedAction.input);
|
|
909
929
|
nodeReducer.copyNodeOperation(state[typedAction.scope], action, dispatch);
|
|
910
930
|
break;
|
|
911
931
|
case "MOVE_NODE":
|
|
912
|
-
MoveNodeInputSchema
|
|
932
|
+
memoizedSchema(MoveNodeInputSchema).parse(typedAction.input);
|
|
913
933
|
nodeReducer.moveNodeOperation(state[typedAction.scope], action, dispatch);
|
|
914
934
|
break;
|
|
915
935
|
case "SET_DRIVE_NAME":
|
|
916
|
-
SetDriveNameInputSchema
|
|
936
|
+
memoizedSchema(SetDriveNameInputSchema).parse(typedAction.input);
|
|
917
937
|
driveReducer.setDriveNameOperation(state[typedAction.scope], action, dispatch);
|
|
918
938
|
break;
|
|
919
939
|
case "SET_DRIVE_ICON":
|
|
920
|
-
SetDriveIconInputSchema
|
|
940
|
+
memoizedSchema(SetDriveIconInputSchema).parse(typedAction.input);
|
|
921
941
|
driveReducer.setDriveIconOperation(state[typedAction.scope], action, dispatch);
|
|
922
942
|
break;
|
|
923
943
|
case "SET_SHARING_TYPE":
|
|
924
|
-
SetSharingTypeInputSchema
|
|
944
|
+
memoizedSchema(SetSharingTypeInputSchema).parse(typedAction.input);
|
|
925
945
|
driveReducer.setSharingTypeOperation(state[typedAction.scope], action, dispatch);
|
|
926
946
|
break;
|
|
927
947
|
case "SET_AVAILABLE_OFFLINE":
|
|
928
|
-
SetAvailableOfflineInputSchema
|
|
948
|
+
memoizedSchema(SetAvailableOfflineInputSchema).parse(typedAction.input);
|
|
929
949
|
driveReducer.setAvailableOfflineOperation(state[typedAction.scope], action, dispatch);
|
|
930
950
|
break;
|
|
931
951
|
case "ADD_LISTENER":
|
|
932
|
-
AddListenerInputSchema
|
|
952
|
+
memoizedSchema(AddListenerInputSchema).parse(typedAction.input);
|
|
933
953
|
driveReducer.addListenerOperation(state[typedAction.scope], action, dispatch);
|
|
934
954
|
break;
|
|
935
955
|
case "REMOVE_LISTENER":
|
|
936
|
-
RemoveListenerInputSchema
|
|
956
|
+
memoizedSchema(RemoveListenerInputSchema).parse(typedAction.input);
|
|
937
957
|
driveReducer.removeListenerOperation(state[typedAction.scope], action, dispatch);
|
|
938
958
|
break;
|
|
939
959
|
case "ADD_TRIGGER":
|
|
940
|
-
AddTriggerInputSchema
|
|
960
|
+
memoizedSchema(AddTriggerInputSchema).parse(typedAction.input);
|
|
941
961
|
driveReducer.addTriggerOperation(state[typedAction.scope], action, dispatch);
|
|
942
962
|
break;
|
|
943
963
|
case "REMOVE_TRIGGER":
|
|
944
|
-
RemoveTriggerInputSchema
|
|
964
|
+
memoizedSchema(RemoveTriggerInputSchema).parse(typedAction.input);
|
|
945
965
|
driveReducer.removeTriggerOperation(state[typedAction.scope], action, dispatch);
|
|
946
966
|
break;
|
|
947
967
|
default: return state;
|