@powerhousedao/shared 6.2.3-dev.8 → 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.
Files changed (270) hide show
  1. package/dist/analytics/index.d.ts +4 -4
  2. package/dist/analytics/index.d.ts.map +1 -1
  3. package/dist/analytics/index.js +25 -24
  4. package/dist/analytics/index.js.map +1 -1
  5. package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
  6. package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
  7. package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
  8. package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
  9. package/dist/clis/args/access-token.d.mts +3 -2
  10. package/dist/clis/args/access-token.mjs +1 -1
  11. package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
  12. package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
  13. package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
  14. package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
  15. package/dist/clis/args/common.d.mts +3 -2
  16. package/dist/clis/args/common.mjs +1 -1
  17. package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BG3HkYBk.mjs} +8 -3
  18. package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
  19. package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
  20. package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
  21. package/dist/clis/args/connect.d.mts +3 -2
  22. package/dist/clis/args/connect.mjs +1 -1
  23. package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
  24. package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
  25. package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
  26. package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
  27. package/dist/clis/args/generate.d.mts +3 -2
  28. package/dist/clis/args/generate.mjs +1 -1
  29. package/dist/clis/args/{help-Bqbgbalu.mjs → help-DS1NlcJQ.mjs} +15 -15
  30. package/dist/clis/args/{help-Bqbgbalu.mjs.map → help-DS1NlcJQ.mjs.map} +1 -1
  31. package/dist/clis/args/help-DVPTARGn.d.mts +190 -0
  32. package/dist/clis/args/help-DVPTARGn.d.mts.map +1 -0
  33. package/dist/clis/args/help.d.mts +3 -2
  34. package/dist/clis/args/help.mjs +1 -1
  35. package/dist/clis/args/index.d.mts +20 -19
  36. package/dist/clis/args/index.mjs +18 -18
  37. package/dist/clis/args/init-CFeTq4Cq.d.mts +52 -0
  38. package/dist/clis/args/init-CFeTq4Cq.d.mts.map +1 -0
  39. package/dist/clis/args/{init-rz9Ei7nq.mjs → init-Dvb42Y87.mjs} +2 -2
  40. package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-Dvb42Y87.mjs.map} +1 -1
  41. package/dist/clis/args/init.d.mts +3 -2
  42. package/dist/clis/args/init.mjs +1 -1
  43. package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
  44. package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
  45. package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
  46. package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
  47. package/dist/clis/args/inspect.d.mts +3 -2
  48. package/dist/clis/args/inspect.mjs +1 -1
  49. package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
  50. package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
  51. package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
  52. package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
  53. package/dist/clis/args/install.d.mts +3 -2
  54. package/dist/clis/args/install.mjs +1 -1
  55. package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
  56. package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
  57. package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
  58. package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
  59. package/dist/clis/args/list.d.mts +3 -2
  60. package/dist/clis/args/list.mjs +1 -1
  61. package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
  62. package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
  63. package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
  64. package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
  65. package/dist/clis/args/login.d.mts +3 -2
  66. package/dist/clis/args/login.mjs +1 -1
  67. package/dist/clis/args/{magic-string.es-h_0HDQBQ.mjs → magic-string.es-BWtG0AyA.mjs} +33 -27
  68. package/dist/clis/args/magic-string.es-BWtG0AyA.mjs.map +1 -0
  69. package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
  70. package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
  71. package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
  72. package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
  73. package/dist/clis/args/migrate.d.mts +3 -2
  74. package/dist/clis/args/migrate.mjs +1 -1
  75. package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
  76. package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
  77. package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
  78. package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
  79. package/dist/clis/args/publish.d.mts +3 -2
  80. package/dist/clis/args/publish.mjs +1 -1
  81. package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
  82. package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
  83. package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
  84. package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
  85. package/dist/clis/args/registry.d.mts +3 -2
  86. package/dist/clis/args/registry.mjs +1 -1
  87. package/dist/clis/args/service-BBx5GDTc.d.mts +27 -0
  88. package/dist/clis/args/service-BBx5GDTc.d.mts.map +1 -0
  89. package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
  90. package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
  91. package/dist/clis/args/service.d.mts +3 -2
  92. package/dist/clis/args/service.mjs +1 -1
  93. package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
  94. package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
  95. package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
  96. package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
  97. package/dist/clis/args/switchboard.d.mts +3 -2
  98. package/dist/clis/args/switchboard.mjs +1 -1
  99. package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
  100. package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
  101. package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
  102. package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
  103. package/dist/clis/args/uninstall.d.mts +3 -2
  104. package/dist/clis/args/uninstall.mjs +1 -1
  105. package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
  106. package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
  107. package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
  108. package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
  109. package/dist/clis/args/unpublish.d.mts +3 -2
  110. package/dist/clis/args/unpublish.mjs +1 -1
  111. package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
  112. package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
  113. package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
  114. package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
  115. package/dist/clis/args/vetra-ports.test.d.mts +2 -1
  116. package/dist/clis/args/vetra-ports.test.mjs +285 -180
  117. package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
  118. package/dist/clis/args/vetra.d.mts +3 -2
  119. package/dist/clis/args/vetra.mjs +1 -1
  120. package/dist/clis/build-config-CmdMi_wu.mjs +230 -0
  121. package/dist/clis/build-config-CmdMi_wu.mjs.map +1 -0
  122. package/dist/clis/build-config.d.mts +44 -10614
  123. package/dist/clis/build-config.d.mts.map +1 -1
  124. package/dist/clis/build-config.mjs +2 -88
  125. package/dist/clis/build-pieces.d.mts +100 -0
  126. package/dist/clis/build-pieces.d.mts.map +1 -0
  127. package/dist/clis/build-pieces.mjs +371 -0
  128. package/dist/clis/build-pieces.mjs.map +1 -0
  129. package/dist/clis/command-names.d.mts +2 -2
  130. package/dist/clis/command-names.d.mts.map +1 -1
  131. package/dist/clis/command-names.mjs.map +1 -1
  132. package/dist/clis/constants.d.mts +3 -462
  133. package/dist/clis/constants.mjs +25 -8
  134. package/dist/clis/constants.mjs.map +1 -1
  135. package/dist/clis/index-6CZwrmQi.d.mts +11154 -0
  136. package/dist/clis/index-6CZwrmQi.d.mts.map +1 -0
  137. package/dist/clis/index.d.mts +1381 -1221
  138. package/dist/clis/index.d.mts.map +1 -1
  139. package/dist/clis/index.mjs +217 -65
  140. package/dist/clis/index.mjs.map +1 -1
  141. package/dist/clis/project-env.d.mts +4 -4
  142. package/dist/clis/project-env.d.mts.map +1 -1
  143. package/dist/clis/project-env.mjs.map +1 -1
  144. package/dist/clis/project-ports.d.mts +5 -5
  145. package/dist/clis/project-ports.d.mts.map +1 -1
  146. package/dist/clis/project-ports.mjs +1 -1
  147. package/dist/clis/project-ports.mjs.map +1 -1
  148. package/dist/clis/services/telemetry.d.mts +7 -7
  149. package/dist/clis/services/telemetry.d.mts.map +1 -1
  150. package/dist/clis/services/telemetry.mjs.map +1 -1
  151. package/dist/clis/types-nzer4WIr.d.mts +541 -0
  152. package/dist/clis/types-nzer4WIr.d.mts.map +1 -0
  153. package/dist/clis/utils.d.mts +4 -4
  154. package/dist/clis/utils.d.mts.map +1 -1
  155. package/dist/clis/utils.mjs.map +1 -1
  156. package/dist/{config-loader-B845Hidf.js → config-loader-C6dZB_iX.js} +28 -8
  157. package/dist/config-loader-C6dZB_iX.js.map +1 -0
  158. package/dist/connect/config-loader.d.ts +14 -8
  159. package/dist/connect/config-loader.d.ts.map +1 -1
  160. package/dist/connect/config-loader.js +2 -2
  161. package/dist/connect/index.d.ts +190 -56
  162. package/dist/connect/index.d.ts.map +1 -1
  163. package/dist/connect/index.js +303 -30
  164. package/dist/connect/index.js.map +1 -1
  165. package/dist/connect/json-adapter.d.ts +3 -4
  166. package/dist/connect/json-adapter.d.ts.map +1 -1
  167. package/dist/connect/json-adapter.js.map +1 -1
  168. package/dist/{constants-BP_gjn8g.d.ts → constants-DO4IYxuR.d.ts} +2 -1
  169. package/dist/constants-DO4IYxuR.d.ts.map +1 -0
  170. package/dist/constants.d.ts +3 -2
  171. package/dist/constants.js.map +1 -1
  172. package/dist/document-drive/index.d.ts +104 -101
  173. package/dist/document-drive/index.d.ts.map +1 -1
  174. package/dist/document-drive/index.js +39 -19
  175. package/dist/document-drive/index.js.map +1 -1
  176. package/dist/document-model/index.d.ts +5 -4
  177. package/dist/document-model/index.js +605 -227
  178. package/dist/document-model/index.js.map +1 -1
  179. package/dist/document-model/mock.d.ts +2 -3
  180. package/dist/document-model/mock.d.ts.map +1 -1
  181. package/dist/document-model/mock.js +2 -1
  182. package/dist/document-model/mock.js.map +1 -1
  183. package/dist/document-model/utils.d.ts +3 -2
  184. package/dist/document-model/utils.js +1 -1
  185. package/dist/index-5gwOhPG5.d.ts +36 -0
  186. package/dist/index-5gwOhPG5.d.ts.map +1 -0
  187. package/dist/{index-DyYIJtVy.d.ts → index-D6833Siv.d.ts} +131 -28
  188. package/dist/index-D6833Siv.d.ts.map +1 -0
  189. package/dist/index.d.ts +7 -6
  190. package/dist/index.js.map +1 -1
  191. package/dist/processors/index.d.ts +3 -2
  192. package/dist/processors/index.js +5 -1
  193. package/dist/processors/index.js.map +1 -1
  194. package/dist/registry/index.d.ts +15 -15
  195. package/dist/registry/index.d.ts.map +1 -1
  196. package/dist/registry/index.js +14 -5
  197. package/dist/registry/index.js.map +1 -1
  198. package/dist/registry/manifest-slim.d.ts +4 -3
  199. package/dist/registry/manifest-slim.d.ts.map +1 -1
  200. package/dist/registry/manifest-slim.js +21 -0
  201. package/dist/registry/manifest-slim.js.map +1 -1
  202. package/dist/registry/updates.d.ts +3 -3
  203. package/dist/registry/updates.d.ts.map +1 -1
  204. package/dist/registry/updates.js.map +1 -1
  205. package/dist/registry/urls.d.ts +2 -2
  206. package/dist/registry/urls.d.ts.map +1 -1
  207. package/dist/registry/urls.js.map +1 -1
  208. package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
  209. package/dist/types-Bsp8VL2y.d.ts.map +1 -0
  210. package/dist/{types-YqLqb0Zb.d.ts → types-CI3ren9F.d.ts} +23 -35
  211. package/dist/types-CI3ren9F.d.ts.map +1 -0
  212. package/dist/{types-CpnWmiFY.d.ts → types-CmeoQg_J.d.ts} +607 -437
  213. package/dist/types-CmeoQg_J.d.ts.map +1 -0
  214. package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
  215. package/dist/utils-BrKxCmKx.d.ts.map +1 -0
  216. package/dist/{utils-aaTmfxFW.js → utils-CSF716ux.js} +10 -3
  217. package/dist/utils-CSF716ux.js.map +1 -0
  218. package/package.json +10 -5
  219. package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
  220. package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
  221. package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
  222. package/dist/clis/args/common-Dsf1vpHV.d.mts +0 -183
  223. package/dist/clis/args/common-Dsf1vpHV.d.mts.map +0 -1
  224. package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
  225. package/dist/clis/args/connect-DetTnI8g.d.mts +0 -443
  226. package/dist/clis/args/connect-DetTnI8g.d.mts.map +0 -1
  227. package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
  228. package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
  229. package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
  230. package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
  231. package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
  232. package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
  233. package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
  234. package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
  235. package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
  236. package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
  237. package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
  238. package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
  239. package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
  240. package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
  241. package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
  242. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
  243. package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
  244. package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
  245. package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
  246. package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
  247. package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
  248. package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
  249. package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
  250. package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
  251. package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
  252. package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
  253. package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
  254. package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
  255. package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
  256. package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
  257. package/dist/clis/args/vetra-DLQ6lhLl.d.mts +0 -113
  258. package/dist/clis/args/vetra-DLQ6lhLl.d.mts.map +0 -1
  259. package/dist/clis/build-config.mjs.map +0 -1
  260. package/dist/clis/constants.d.mts.map +0 -1
  261. package/dist/config-loader-B845Hidf.js.map +0 -1
  262. package/dist/constants-BP_gjn8g.d.ts.map +0 -1
  263. package/dist/index-C_iVZe7f.d.ts +0 -7
  264. package/dist/index-C_iVZe7f.d.ts.map +0 -1
  265. package/dist/index-DyYIJtVy.d.ts.map +0 -1
  266. package/dist/types-C1in4fl3.d.ts.map +0 -1
  267. package/dist/types-CpnWmiFY.d.ts.map +0 -1
  268. package/dist/types-YqLqb0Zb.d.ts.map +0 -1
  269. package/dist/utils-DP122OSS.d.ts.map +0 -1
  270. package/dist/utils-aaTmfxFW.js.map +0 -1
@@ -1,39 +1,40 @@
1
- import { Bt as DocumentModelGlobalState, En as IsStateOfType, On as LoadFromInput, Qu as PHBaseState, Rn as Maybe, Tn as IsDocumentOfType, bi as SaveToFileHandle, ei as Reducer, gt as CreateDocument, ot as AssertIsDocumentOfType, st as AssertIsStateOfType, yt as CreateState } from "../types-CpnWmiFY.js";
2
- import { $ as LegacySynchronizationUnit, A as TriggerData, C as RemoveTriggerInput, D as SetSharingTypeInput, E as SetDriveNameInput, G as DriveInput, J as SharingType, K as GenerateNodesCopyIdGenerator, M as TriggerType, N as UpdateFileInput, O as TransmitterType, P as UpdateNodeInput, Q as LegacyAddFileInput, S as RemoveListenerInput, T as SetDriveIconInput, U as DocumentDrivePHState, W as DriveDocumentModelModule, X as DocumentDriveDocument, Y as DocumentDriveAction, Z as LegacyAddFileAction, _ as ListenerInput, _t as SetDriveNameAction, a as CopyNodeInput, at as DocumentDriveNodeOperations, b as PullResponderTriggerData, c as DocumentDriveLocalState, ct as UpdateNodeAction, d as FolderNode, dt as DocumentDriveDriveAction, et as AddFileAction, f as Listener, ft as DocumentDriveDriveOperations, g as ListenerFilterInput, gt as SetDriveIconAction, h as ListenerFilter, ht as SetAvailableOfflineAction, i as AddTriggerInput, it as DocumentDriveNodeAction, j as TriggerInput, k as Trigger, l as DocumentDrivePHState$1, lt as AddListenerAction, m as ListenerCallInfoInput, mt as RemoveTriggerAction, n as AddFolderInput, nt as CopyNodeAction, o as DeleteNodeInput, ot as MoveNodeAction, p as ListenerCallInfo, pt as RemoveListenerAction, q as GenerateNodesCopySrc, r as AddListenerInput, rt as DeleteNodeAction, s as DocumentDriveGlobalState, st as UpdateFileAction, t as AddFileInput, tt as AddFolderAction, u as FileNode, ut as AddTriggerAction, v as MoveNodeInput, vt as SetSharingTypeAction, w as SetAvailableOfflineInput, x as PullResponderTriggerDataInput, y as Node } from "../types-YqLqb0Zb.js";
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 LOAD_STATE replaces a whole scope and can
250
- * install a list this function never saw.
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, AddFileInputSchema, AddFolderAction, AddFolderInput, AddFolderInputSchema, AddListenerAction, AddListenerInput, AddListenerInputSchema, AddTriggerAction, AddTriggerInput, AddTriggerInputSchema, CopyNodeAction, CopyNodeInput, CopyNodeInputSchema, DeleteNodeAction, DeleteNodeInput, DeleteNodeInputSchema, DocumentDriveAction, DocumentDriveDocument, DocumentDriveDriveAction, DocumentDriveDriveOperations, DocumentDriveGlobalState, DocumentDriveLocalState, DocumentDriveLocalStateSchema, DocumentDriveNodeAction, DocumentDriveNodeOperations, DocumentDrivePHState, DocumentDriveStateSchema, DriveDocumentHeaderSchema, DriveDocumentModelModule, DriveDocumentSchema, DriveInput, DrivePHStateSchema, FileNode, FileNodeSchema, FolderNode, FolderNodeSchema, GenerateNodesCopyIdGenerator, GenerateNodesCopySrc, LegacyAddFileAction, LegacyAddFileInput, LegacySynchronizationUnit, Listener, ListenerCallInfo, ListenerCallInfoInput, ListenerCallInfoInputSchema, ListenerCallInfoSchema, ListenerFilter, ListenerFilterInput, ListenerFilterInputSchema, ListenerFilterSchema, ListenerInput, ListenerInputSchema, ListenerSchema, MoveNodeAction, MoveNodeInput, MoveNodeInputSchema, Node, NodeSchema, PullResponderTriggerData, PullResponderTriggerDataInput, PullResponderTriggerDataInputSchema, PullResponderTriggerDataSchema, RemoveListenerAction, RemoveListenerInput, RemoveListenerInputSchema, RemoveTriggerAction, RemoveTriggerInput, RemoveTriggerInputSchema, SetAvailableOfflineAction, SetAvailableOfflineInput, SetAvailableOfflineInputSchema, SetDriveIconAction, SetDriveIconInput, SetDriveIconInputSchema, SetDriveNameAction, SetDriveNameInput, SetDriveNameInputSchema, SetSharingTypeAction, SetSharingTypeInput, SetSharingTypeInputSchema, SharingType, TransmitterType, TransmitterTypeSchema, Trigger, TriggerData, TriggerDataSchema, TriggerInput, TriggerInputSchema, TriggerSchema, TriggerType, TriggerTypeSchema, UpdateFileAction, UpdateFileInput, UpdateFileInputSchema, UpdateNodeAction, UpdateNodeInput, UpdateNodeInputSchema, addFile, addFolder, addListener, addTrigger, assertIsDocumentOfType, assertIsDriveDocument, assertIsDriveState, assertIsStateOfType, assignNodes, copyNode, createGlobalState, createLocalState, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, deleteNode, driveCreateDocument, driveCreateState, driveDocumentFileExtension, driveDocumentModel, driveDocumentModelModule, driveDocumentReducer, driveDocumentType, driveLoadFromInput, driveReducer, driveSaveToFileHandle, escapeRegExp, generateNodesCopy, getAncestors, getDescendants, getNextCopyNumber, handleTargetNameCollisions, initialGlobalState, initialLocalState, insertNodeSorted, isDefinedNonNullAny, isDocumentOfType, isDriveDocument, isDriveState, isFileNode, isFolderNode, isStateOfType, isValidName, moveNode, nodeReducer, readNodes, removeListener, removeTrigger, setAvailableOffline, setDriveIcon, setDriveName, setSharingType, sortNodesById, updateFile, updateNode };
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":";;;;;cAAa,0BAAA;;;;;;iBCiCG,OAAA,CAAQ,KAAA,EAAO,kBAAA,GAAqB,mBAAA;AAAA,iBACpC,OAAA,CAAQ,KAAA,EAAO,YAAA,GAAe,aAAA;AAAA,cA0BjC,SAAA,GAAa,KAAA,EAAO,cAAA,KAAc,eAAA;AAAA,cASlC,UAAA,GAAc,KAAA,EAAO,eAAA,KAAe,gBAAA;AAAA,cASpC,UAAA,GAAc,KAAA,EAAO,eAAA,KAAe,gBAAA;AAAA,cASpC,UAAA,GAAc,KAAA,EAAO,eAAA,KAAe,gBAAA;AAAA,cASpC,QAAA,GAAY,KAAA,EAAO,aAAA,KAAa,cAAA;AAAA,cAShC,QAAA,GAAY,KAAA,EAAO,aAAA,KAAa,cAAA;;;cCzEhC,YAAA,GAAgB,KAAA,EAAO,iBAAA,KAAiB,kBAAA;AAAA,cASxC,YAAA,GAAgB,KAAA,EAAO,iBAAA,KAAiB,kBAAA;AAAA,cASxC,cAAA,GAAkB,KAAA,EAAO,mBAAA,KAAmB,oBAAA;AAAA,cAS5C,mBAAA,GAAuB,KAAA,EAAO,wBAAA,KAAwB,yBAAA;AAAA,cAStD,WAAA,GAAe,KAAA,EAAO,gBAAA,KAAgB,iBAAA;AAAA,cAStC,cAAA,GAAkB,KAAA,EAAO,mBAAA,KAAmB,oBAAA;AAAA,cAS5C,UAAA,GAAc,KAAA,EAAO,eAAA,KAAe,gBAAA;AAAA,cASpC,aAAA,GAAiB,KAAA,EAAO,kBAAA,KAAkB,mBAAA;;;cC7F1C,kBAAA,EAAoB,wBAAA;;;;cCWpB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;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AS,KAAA,EAAO,IAAA;AAAA,GAChB,KAAA,WAAgB,IAAA;AAAA,iBAKF,0BAAA,CAA2B,MAAA;EACzC,KAAA,EAAO,IAAA;EACP,kBAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,cAsBW,WAAA,GAAe,IAAA"}
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":";;;;;;qBAAa;;;;;;wBCiCG,QAAQ,OAAO,qBAAqB;wBACpC,QAAQ,OAAO,eAAe;qBA0BjC,YAAS,OAAW,mBAAc;qBASlC,aAAU,OAAW,oBAAe;qBASpC,aAAU,OAAW,oBAAe;qBASpC,aAAU,OAAW,oBAAe;qBASpC,WAAQ,OAAW,kBAAa;qBAShC,WAAQ,OAAW,kBAAa;;;qBCzEhC,eAAY,OAAW,sBAAiB;qBASxC,eAAY,OAAW,sBAAiB;qBASxC,iBAAc,OAAW,wBAAmB;qBAS5C,sBAAmB,OAAW,6BAAwB;qBAStD,cAAW,OAAW,qBAAgB;qBAStC,iBAAc,OAAW,wBAAmB;qBAS5C,aAAU,OAAW,oBAAe;qBASpC,gBAAa,OAAW,uBAAkB;;;qBC7F1C,oBAAoB;;;;qBCWpB,2BAAyB,EAAA;;;;;;GAEpC,EAAA,KAAA;;qBAGW,oBAAkB,EAAA;;;;;;;;;;;;GAG7B,EAAA,KAAA;qBAEW,qBAAmB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI9B,EAAA,KAAA;;wBAGc,aAAa,iBAAiB,SAAS;;wBAKvC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
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
- state.listeners = state.listeners.filter((listener) => listener.listenerId !== action.input.listenerId);
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
- state.triggers = state.triggers.filter((trigger) => trigger.id !== action.input.triggerId);
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 LOAD_STATE replaces a whole scope and can
731
- * install a list this function never saw.
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
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().parse(typedAction.input);
964
+ memoizedSchema(RemoveTriggerInputSchema).parse(typedAction.input);
945
965
  driveReducer.removeTriggerOperation(state[typedAction.scope], action, dispatch);
946
966
  break;
947
967
  default: return state;