@powerhousedao/shared 6.2.3-dev.3 → 6.2.3-dev.5

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.
@@ -109,7 +109,7 @@ declare const defaultDrivesUrl: Partial<cmd_ts_dist_cjs_argparser_js0.Register>
109
109
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
110
110
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
111
111
  declare const logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
112
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
112
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
113
113
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
114
114
  declare const connectBasePath: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
115
115
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
@@ -134,7 +134,7 @@ declare const commonArgs: {
134
134
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
135
135
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
136
136
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
137
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
137
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
138
138
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
139
139
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
140
140
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -180,4 +180,4 @@ declare const commonServerArgs: {
180
180
  };
181
181
  //#endregion
182
182
  export { packageManagerArgs as _, connectBasePath as a, renownSwitchboardUrl as b, disableLocalPackages as c, getPackageManagerCommand as d, https as f, logLevel as g, localPackage as h, commonServerArgs as i, drivesPreserveStrategy as l, httpsKeyFile as m, buildArgs as n, debugArgs as o, httpsCertFile as p, commonArgs as r, defaultDrivesUrl as s, AGENTS as t, force as u, packages as v, vetraSwitchboardArgs as x, renownNamespace as y };
183
- //# sourceMappingURL=common-Dsf1vpHV.d.mts.map
183
+ //# sourceMappingURL=common-Y8yh4ax1.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-Dsf1vpHV.d.mts","names":[],"sources":["../../../clis/args/common.ts"],"mappings":";;;;;;cAuBa,MAAA,EAAQ,KAAA;AAAA,cAER,SAAA;iBAMZ,6BAAA,CAAA,QAAA;;;;cAEY,SAAA;iBASZ,6BAAA,CAAA,QAAA;;;;;;;cAEY,kBAAA;0BA4BZ,6BAAA,CAAA,QAAA;;;;;;;;;;;;;;;;cACY,wBAAA,EAAwB,OAAA,CAInC,6BAAA,CAJmC,QAAA;iBAAA,6BAAA,CAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKxB,QAAA,EAAQ,OAAA,CAKnB,6BAAA,CALmB,QAAA;iBAAA,6BAAA,CAAA,YAAA;;cAOR,YAA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pB,sBAAA,EAAsB,OAAA,CAMjC,6BAAA,CANiC,QAAA;iBAAA,6BAAA,CAAA,YAAA;;cAQtB,KAAA,EAAK,OAAA,CAKhB,6BAAA,CALgB,QAAA;iBAAA,6BAAA,CAAA,YAAA;;cAOL,UAAA;iBAUZ,6BAAA,CAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEY,gBAAA;gBA2CZ,6BAAA,CAAA,QAAA"}
@@ -1,2 +1,2 @@
1
- import { _ as packageManagerArgs, a as connectBasePath, b as renownSwitchboardUrl, c as disableLocalPackages, d as getPackageManagerCommand, f as https, g as logLevel, h as localPackage, i as commonServerArgs, l as drivesPreserveStrategy, m as httpsKeyFile, n as buildArgs, o as debugArgs, p as httpsCertFile, r as commonArgs, s as defaultDrivesUrl, t as AGENTS, u as force, v as packages, x as vetraSwitchboardArgs, y as renownNamespace } from "./common-Dsf1vpHV.mjs";
1
+ import { _ as packageManagerArgs, a as connectBasePath, b as renownSwitchboardUrl, c as disableLocalPackages, d as getPackageManagerCommand, f as https, g as logLevel, h as localPackage, i as commonServerArgs, l as drivesPreserveStrategy, m as httpsKeyFile, n as buildArgs, o as debugArgs, p as httpsCertFile, r as commonArgs, s as defaultDrivesUrl, t as AGENTS, u as force, v as packages, x as vetraSwitchboardArgs, y as renownNamespace } from "./common-Y8yh4ax1.mjs";
2
2
  export { AGENTS, buildArgs, commonArgs, commonServerArgs, connectBasePath, debugArgs, defaultDrivesUrl, disableLocalPackages, drivesPreserveStrategy, force, getPackageManagerCommand, https, httpsCertFile, httpsKeyFile, localPackage, logLevel, packageManagerArgs, packages, renownNamespace, renownSwitchboardUrl, vetraSwitchboardArgs };
@@ -31,7 +31,7 @@ declare const connectStudioArgs: {
31
31
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
32
32
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
33
33
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
34
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
34
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
35
35
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
36
36
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
37
37
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -66,7 +66,7 @@ declare const connectBuildArgs: {
66
66
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
67
67
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
68
68
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
69
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
69
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
70
70
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
71
71
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
72
72
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -191,7 +191,7 @@ declare const connectPreviewArgs: {
191
191
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
192
192
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
193
193
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
194
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
194
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
195
195
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
196
196
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
197
197
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -223,7 +223,7 @@ declare const connectConfigArgs: {
223
223
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
224
224
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
225
225
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
226
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
226
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
227
227
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
228
228
  defaultDrivesUrl: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
229
229
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -309,7 +309,7 @@ declare const connectArgs: {
309
309
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
310
310
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
311
311
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
312
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
312
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
313
313
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
314
314
  defaultDrivesUrl: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
315
315
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -440,4 +440,4 @@ declare const connectArgs: {
440
440
  };
441
441
  //#endregion
442
442
  export { connectStudioArgs as a, connectPreviewArgs as i, connectBuildArgs as n, connectConfigArgs as r, connectArgs as t };
443
- //# sourceMappingURL=connect-DetTnI8g.d.mts.map
443
+ //# sourceMappingURL=connect-BUwHSfdh.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect-DetTnI8g.d.mts","names":[],"sources":["../../../clis/args/connect.ts"],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 +1,2 @@
1
- import { a as connectStudioArgs, i as connectPreviewArgs, n as connectBuildArgs, r as connectConfigArgs, t as connectArgs } from "./connect-DetTnI8g.mjs";
1
+ import { a as connectStudioArgs, i as connectPreviewArgs, n as connectBuildArgs, r as connectConfigArgs, t as connectArgs } from "./connect-BUwHSfdh.mjs";
2
2
  export { connectArgs, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs };
@@ -1,6 +1,6 @@
1
1
  import { t as accessTokenArgs } from "./access-token--9H57y8J.mjs";
2
- import { _ as packageManagerArgs, a as connectBasePath, b as renownSwitchboardUrl, c as disableLocalPackages, d as getPackageManagerCommand, f as https, g as logLevel, h as localPackage, i as commonServerArgs, l as drivesPreserveStrategy, m as httpsKeyFile, n as buildArgs, o as debugArgs, p as httpsCertFile, r as commonArgs, s as defaultDrivesUrl, t as AGENTS, u as force, v as packages, x as vetraSwitchboardArgs, y as renownNamespace } from "./common-Dsf1vpHV.mjs";
3
- import { a as connectStudioArgs, i as connectPreviewArgs, n as connectBuildArgs, r as connectConfigArgs, t as connectArgs } from "./connect-DetTnI8g.mjs";
2
+ import { _ as packageManagerArgs, a as connectBasePath, b as renownSwitchboardUrl, c as disableLocalPackages, d as getPackageManagerCommand, f as https, g as logLevel, h as localPackage, i as commonServerArgs, l as drivesPreserveStrategy, m as httpsKeyFile, n as buildArgs, o as debugArgs, p as httpsCertFile, r as commonArgs, s as defaultDrivesUrl, t as AGENTS, u as force, v as packages, x as vetraSwitchboardArgs, y as renownNamespace } from "./common-Y8yh4ax1.mjs";
3
+ import { a as connectStudioArgs, i as connectPreviewArgs, n as connectBuildArgs, r as connectConfigArgs, t as connectArgs } from "./connect-BUwHSfdh.mjs";
4
4
  import { t as generateArgs } from "./generate-DnV-bfXt.mjs";
5
5
  import { n as phCliCommandNames, t as phCliHelpCommands } from "./help-CjAsudUn.mjs";
6
6
  import { t as initArgs } from "./init-CUXyfquF.mjs";
@@ -15,5 +15,5 @@ import { n as ServiceAction, t as serviceArgs } from "./service-DhIkf8-O.mjs";
15
15
  import { t as switchboardArgs } from "./switchboard-BlPaq2at.mjs";
16
16
  import { t as uninstallArgs } from "./uninstall-BpA3YYbw.mjs";
17
17
  import { t as unpublishArgs } from "./unpublish-CvwaIimG.mjs";
18
- import { n as resolveSwitchboardPortDefault, r as vetraArgs, t as resolveConnectPortDefault } from "./vetra-DLQ6lhLl.mjs";
18
+ import { n as resolveSwitchboardPortDefault, r as vetraArgs, t as resolveConnectPortDefault } from "./vetra-DUhIB7Zk.mjs";
19
19
  export { AGENTS, DEFAULT_REGISTRY_LOGIN_EXPIRY, ServiceAction, accessTokenArgs, buildArgs, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, disableLocalPackages, drivesPreserveStrategy, force, generateArgs, getPackageManagerCommand, https, httpsCertFile, httpsKeyFile, initArgs, inspectArgs, installArgs, listArgs, localPackage, logLevel, loginArgs, migrateArgs, packageManagerArgs, packages, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolveSwitchboardPortDefault, serviceArgs, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs };
@@ -60,7 +60,7 @@ declare const vetraArgs: {
60
60
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
61
61
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
62
62
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
63
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
63
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "verbose" | "error" | "info" | "warn">>;
64
64
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
65
65
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
66
66
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -110,4 +110,4 @@ declare const vetraArgs: {
110
110
  };
111
111
  //#endregion
112
112
  export { resolveSwitchboardPortDefault as n, vetraArgs as r, resolveConnectPortDefault as t };
113
- //# sourceMappingURL=vetra-DLQ6lhLl.d.mts.map
113
+ //# sourceMappingURL=vetra-DUhIB7Zk.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vetra-DLQ6lhLl.d.mts","names":[],"sources":["../../../clis/args/vetra.ts"],"mappings":";;;;;;;;AAsBA;;;;iBAAgB,6BAAA,CAAA;AAUhB;AAAA,iBAAgB,yBAAA,CAAA;AAAA,cASH,SAAA;iBA0EZ,6BAAA,CAAA,QAAA"}
1
+ {"version":3,"file":"vetra-DUhIB7Zk.d.mts","names":[],"sources":["../../../clis/args/vetra.ts"],"mappings":";;;;;;;;AAsBA;;;;iBAAgB,6BAAA,CAAA;AAUhB;AAAA,iBAAgB,yBAAA,CAAA;AAAA,cASH,SAAA;iBA0EZ,6BAAA,CAAA,QAAA"}
@@ -1,2 +1,2 @@
1
- import { n as resolveSwitchboardPortDefault, r as vetraArgs, t as resolveConnectPortDefault } from "./vetra-DLQ6lhLl.mjs";
1
+ import { n as resolveSwitchboardPortDefault, r as vetraArgs, t as resolveConnectPortDefault } from "./vetra-DUhIB7Zk.mjs";
2
2
  export { resolveConnectPortDefault, resolveSwitchboardPortDefault, vetraArgs };
@@ -126,7 +126,7 @@ declare const defaultDrivesUrl: Partial<cmd_ts_dist_cjs_argparser_js0.Register>
126
126
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
127
127
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
128
128
  declare const logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
129
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
129
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
130
130
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
131
131
  declare const connectBasePath: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
132
132
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
@@ -151,7 +151,7 @@ declare const commonArgs: {
151
151
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
152
152
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
153
153
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
154
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
154
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
155
155
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
156
156
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
157
157
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -226,7 +226,7 @@ declare const connectStudioArgs: {
226
226
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
227
227
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
228
228
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
229
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
229
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
230
230
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
231
231
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
232
232
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -261,7 +261,7 @@ declare const connectBuildArgs: {
261
261
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
262
262
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
263
263
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
264
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
264
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
265
265
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
266
266
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
267
267
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -386,7 +386,7 @@ declare const connectPreviewArgs: {
386
386
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
387
387
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
388
388
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
389
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
389
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
390
390
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
391
391
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
392
392
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -418,7 +418,7 @@ declare const connectConfigArgs: {
418
418
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
419
419
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
420
420
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
421
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
421
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
422
422
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
423
423
  defaultDrivesUrl: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
424
424
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -504,7 +504,7 @@ declare const connectArgs: {
504
504
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
505
505
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
506
506
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
507
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
507
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
508
508
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
509
509
  defaultDrivesUrl: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
510
510
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -1537,7 +1537,7 @@ declare const serviceArgs: {
1537
1537
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<boolean | undefined>>;
1538
1538
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & cmd_ts_dist_cjs_argparser_js0.Register & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
1539
1539
  action: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
1540
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"status" | "start" | "stop" | "setup" | "restart" | undefined>>;
1540
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"start" | "stop" | "status" | "setup" | "restart" | undefined>>;
1541
1541
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
1542
1542
  };
1543
1543
  //#endregion
@@ -1711,7 +1711,7 @@ declare const vetraArgs: {
1711
1711
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string>>;
1712
1712
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
1713
1713
  logLevel: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
1714
- parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "info" | "warn" | "error" | "verbose">>;
1714
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<"debug" | "error" | "info" | "warn" | "verbose">>;
1715
1715
  } & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & Partial<cmd_ts_dist_cjs_helpdoc_js0.Descriptive>;
1716
1716
  packages: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
1717
1717
  parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<string | undefined>>;
@@ -1792,7 +1792,7 @@ declare function parsePackageManager(args?: {
1792
1792
  bun?: boolean;
1793
1793
  }): Agent | undefined;
1794
1794
  declare function handleMutuallyExclusiveOptions(options: Record<string, string | boolean | number | undefined>, optionsName: string): void;
1795
- declare function getTagFromVersion(version: string): "dev" | "latest" | "staging" | "rc";
1795
+ declare function getTagFromVersion(version: string): "latest" | "dev" | "staging" | "rc";
1796
1796
  declare function logVersionUpdate(args: {
1797
1797
  name: string;
1798
1798
  version: string;
@@ -221,6 +221,13 @@ declare function escapeRegExp(string: string): string;
221
221
  declare function readNodes(state: {
222
222
  nodes: Node[];
223
223
  }): Node[];
224
+ /**
225
+ * The node list with a node added, ordered by id. The list is built and sorted
226
+ * as plain objects, so inside a mutative draft the comparator never reads an
227
+ * element through the draft proxy. Pass the list read with readNodes to get
228
+ * that benefit; passing the draft's own list is correct but slow.
229
+ */
230
+ declare function insertNodeSorted(nodes: readonly Node[], node: Node): Node[];
224
231
  declare function handleTargetNameCollisions(params: {
225
232
  nodes: Node[];
226
233
  targetParentFolder: string | null;
@@ -229,5 +236,5 @@ declare function handleTargetNameCollisions(params: {
229
236
  }): string;
230
237
  declare const isValidName: (name: string) => boolean;
231
238
  //#endregion
232
- 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, 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, isDefinedNonNullAny, isDocumentOfType, isDriveDocument, isDriveState, isFileNode, isFolderNode, isStateOfType, isValidName, moveNode, nodeReducer, readNodes, removeListener, removeTrigger, setAvailableOffline, setDriveIcon, setDriveName, setSharingType, updateFile, updateNode };
239
+ 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, 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, updateFile, updateNode };
233
240
  //# 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,kB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oB,sBAAA;AAAA,cAMzC,gBAAA,EAAkB,gBAAA,CAAiB,sBAAA;AAAA,cAMnC,sBAAA,EAAwB,sBAAA,CACnC,sBAAA;;;cCrEW,wBAAA,EAA0B,wBAAA;;;cCP1B,YAAA,EAAc,4BAAA;;;cCQd,WAAA,EAAa,2BAAA;;;iBCLV,UAAA,CAAW,IAAA,EAAM,IAAA,GAAO,IAAA,IAAQ,QAAA;AAAA,iBAIhC,YAAA,CAAa,IAAA,EAAM,IAAA,GAAO,IAAA,IAAQ,UAAA;AAAA,iBAIlC,YAAA,CAAa,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA,KAAS,IAAA;AAAA,iBAY5C,cAAA,CAAe,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA,KAAS,IAAA;;;AbhC9D;;;;;;iBa8CgB,iBAAA,CACd,GAAA,EAAK,oBAAA,EACL,WAAA,EAAa,4BAAA,EACb,KAAA,EAAO,IAAA,KACN,aAAA;AAAA,iBA6Ca,iBAAA,CACd,KAAA,YACA,YAAA;AAAA,iBAsBc,YAAA,CAAa,MAAA;;;;;;;iBAUb,SAAA,CAAU,KAAA;EAAS,KAAA,EAAO,IAAA;AAAA,IAAW,IAAA;AAAA,iBAIrC,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":";;;;;cAAa,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Ac,sBAAA;AAAA,cAI7B,mBAAA,EAAqB,mBAAA,CAAoB,sBAAA;AAAA,cAMzC,gBAAA,EAAkB,gBAAA,CAAiB,sBAAA;AAAA,cAMnC,sBAAA,EAAwB,sBAAA,CACnC,sBAAA;;;cCrEW,wBAAA,EAA0B,wBAAA;;;cCP1B,YAAA,EAAc,4BAAA;;;cCSd,WAAA,EAAa,2BAAA;;;iBCNV,UAAA,CAAW,IAAA,EAAM,IAAA,GAAO,IAAA,IAAQ,QAAA;AAAA,iBAIhC,YAAA,CAAa,IAAA,EAAM,IAAA,GAAO,IAAA,IAAQ,UAAA;AAAA,iBAIlC,YAAA,CAAa,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA,KAAS,IAAA;AAAA,iBAY5C,cAAA,CAAe,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA,KAAS,IAAA;;;AbhC9D;;;;;;iBa8CgB,iBAAA,CACd,GAAA,EAAK,oBAAA,EACL,WAAA,EAAa,4BAAA,EACb,KAAA,EAAO,IAAA,KACN,aAAA;AAAA,iBA6Ca,iBAAA,CACd,KAAA,YACA,YAAA;AAAA,iBAsBc,YAAA,CAAa,MAAA;;;;;;;iBAUb,SAAA,CAAU,KAAA;EAAS,KAAA,EAAO,IAAA;AAAA,IAAW,IAAA;;;;;;;iBAUrC,gBAAA,CAAiB,KAAA,WAAgB,IAAA,IAAQ,IAAA,EAAM,IAAA,GAAO,IAAA;AAAA,iBAItD,0BAAA,CAA2B,MAAA;EACzC,KAAA,EAAO,IAAA;EACP,kBAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,cAsBW,WAAA,GAAe,IAAA"}
@@ -683,6 +683,15 @@ function escapeRegExp(string) {
683
683
  function readNodes(state) {
684
684
  return isDraft(state) ? original(state).nodes : state.nodes;
685
685
  }
686
+ /**
687
+ * The node list with a node added, ordered by id. The list is built and sorted
688
+ * as plain objects, so inside a mutative draft the comparator never reads an
689
+ * element through the draft proxy. Pass the list read with readNodes to get
690
+ * that benefit; passing the draft's own list is correct but slow.
691
+ */
692
+ function insertNodeSorted(nodes, node) {
693
+ return [...nodes, node].sort((a, b) => a.id.localeCompare(b.id));
694
+ }
686
695
  function handleTargetNameCollisions(params) {
687
696
  const { nodes, targetParentFolder, srcName, srcKind } = params;
688
697
  const targetNodeChildrenNames = nodes.filter((node) => targetParentFolder === "" ? node.parentFolder === null : node.parentFolder === targetParentFolder).filter((node) => node.kind === srcKind).map((node) => node.name);
@@ -704,15 +713,13 @@ const nodeReducer = {
704
713
  srcKind: "file",
705
714
  targetParentFolder: action.input.parentFolder || null
706
715
  });
707
- const fileNode = {
716
+ state.nodes = insertNodeSorted(nodes, {
708
717
  id: action.input.id,
709
718
  name,
710
719
  kind: "file",
711
720
  parentFolder: action.input.parentFolder ?? null,
712
721
  documentType: action.input.documentType
713
- };
714
- state.nodes.push(fileNode);
715
- state.nodes.sort((a, b) => a.id.localeCompare(b.id));
722
+ });
716
723
  dispatch?.({
717
724
  type: "CREATE_CHILD_DOCUMENT",
718
725
  input: {
@@ -731,13 +738,12 @@ const nodeReducer = {
731
738
  srcKind: "folder",
732
739
  targetParentFolder: action.input.parentFolder || null
733
740
  });
734
- state.nodes.push({
741
+ state.nodes = insertNodeSorted(nodes, {
735
742
  ...action.input,
736
743
  name,
737
744
  kind: "folder",
738
745
  parentFolder: action.input.parentFolder ?? null
739
746
  });
740
- state.nodes.sort((a, b) => a.id.localeCompare(b.id));
741
747
  },
742
748
  deleteNodeOperation(state, action, dispatch) {
743
749
  const node = state.nodes.find((node) => node.id === action.input.id);
@@ -966,6 +972,6 @@ const driveDocumentModelModule = {
966
972
  }
967
973
  };
968
974
  //#endregion
969
- export { AddFileInputSchema, AddFolderInputSchema, AddListenerInputSchema, AddTriggerInputSchema, CopyNodeInputSchema, DeleteNodeInputSchema, DocumentDriveLocalStateSchema, DocumentDriveStateSchema, DriveDocumentHeaderSchema, DriveDocumentSchema, DrivePHStateSchema, FileNodeSchema, FolderNodeSchema, ListenerCallInfoInputSchema, ListenerCallInfoSchema, ListenerFilterInputSchema, ListenerFilterSchema, ListenerInputSchema, ListenerSchema, MoveNodeInputSchema, NodeSchema, PullResponderTriggerDataInputSchema, PullResponderTriggerDataSchema, RemoveListenerInputSchema, RemoveTriggerInputSchema, SetAvailableOfflineInputSchema, SetDriveIconInputSchema, SetDriveNameInputSchema, SetSharingTypeInputSchema, TransmitterTypeSchema, TriggerDataSchema, TriggerInputSchema, TriggerSchema, TriggerTypeSchema, UpdateFileInputSchema, UpdateNodeInputSchema, addFile, addFolder, addListener, addTrigger, assertIsDocumentOfType, assertIsDriveDocument, assertIsDriveState, assertIsStateOfType, 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, isDefinedNonNullAny, isDocumentOfType, isDriveDocument, isDriveState, isFileNode, isFolderNode, isStateOfType, isValidName, moveNode, nodeReducer, readNodes, removeListener, removeTrigger, setAvailableOffline, setDriveIcon, setDriveName, setSharingType, updateFile, updateNode };
975
+ export { AddFileInputSchema, AddFolderInputSchema, AddListenerInputSchema, AddTriggerInputSchema, CopyNodeInputSchema, DeleteNodeInputSchema, DocumentDriveLocalStateSchema, DocumentDriveStateSchema, DriveDocumentHeaderSchema, DriveDocumentSchema, DrivePHStateSchema, FileNodeSchema, FolderNodeSchema, ListenerCallInfoInputSchema, ListenerCallInfoSchema, ListenerFilterInputSchema, ListenerFilterSchema, ListenerInputSchema, ListenerSchema, MoveNodeInputSchema, NodeSchema, PullResponderTriggerDataInputSchema, PullResponderTriggerDataSchema, RemoveListenerInputSchema, RemoveTriggerInputSchema, SetAvailableOfflineInputSchema, SetDriveIconInputSchema, SetDriveNameInputSchema, SetSharingTypeInputSchema, TransmitterTypeSchema, TriggerDataSchema, TriggerInputSchema, TriggerSchema, TriggerTypeSchema, UpdateFileInputSchema, UpdateNodeInputSchema, addFile, addFolder, addListener, addTrigger, assertIsDocumentOfType, assertIsDriveDocument, assertIsDriveState, assertIsStateOfType, 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, updateFile, updateNode };
970
976
 
971
977
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createState"],"sources":["../../document-drive/constants.ts","../../document-drive/gen/schema/zod.ts","../../document-drive/gen/node/creators.ts","../../document-drive/gen/drive/creators.ts","../../document-drive/gen/creators.ts","../../document-drive/gen/document-model.ts","../../document-drive/gen/document-type.ts","../../document-drive/gen/document-schema.ts","../../document-drive/gen/ph-factories.ts","../../document-drive/src/reducers/drive.ts","../../document-drive/src/utils.ts","../../document-drive/src/reducers/node.ts","../../document-drive/gen/reducer.ts","../../document-drive/gen/utils.ts","../../document-drive/module.ts"],"sourcesContent":["export const driveDocumentFileExtension = \"phdd\";\n","import type {\n AddFileInput,\n AddFolderInput,\n AddListenerInput,\n AddTriggerInput,\n CopyNodeInput,\n DeleteNodeInput,\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n FileNode,\n FolderNode,\n Listener,\n ListenerCallInfo,\n ListenerCallInfoInput,\n ListenerFilter,\n ListenerFilterInput,\n ListenerInput,\n MoveNodeInput,\n PullResponderTriggerData,\n PullResponderTriggerDataInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n Trigger,\n TriggerInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"./types.js\";\nimport { z } from \"zod\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K], T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport const TransmitterTypeSchema = z.enum([\n \"Internal\",\n \"MatrixConnect\",\n \"PullResponder\",\n \"RESTWebhook\",\n \"SecureConnect\",\n \"SwitchboardPush\",\n]);\n\nexport const TriggerTypeSchema = z.enum([\"PullResponder\"]);\n\nexport function AddFileInputSchema(): z.ZodObject<Properties<AddFileInput>> {\n return z.object({\n documentType: z.string(),\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddFolderInputSchema(): z.ZodObject<\n Properties<AddFolderInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddListenerInputSchema(): z.ZodObject<\n Properties<AddListenerInput>\n> {\n return z.object({\n listener: ListenerInputSchema(),\n });\n}\n\nexport function AddTriggerInputSchema(): z.ZodObject<\n Properties<AddTriggerInput>\n> {\n return z.object({\n trigger: TriggerInputSchema(),\n });\n}\n\nexport function CopyNodeInputSchema(): z.ZodObject<Properties<CopyNodeInput>> {\n return z.object({\n srcId: z.string(),\n targetId: z.string(),\n targetName: z.string().nullish(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function DeleteNodeInputSchema(): z.ZodObject<\n Properties<DeleteNodeInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DocumentDriveLocalStateSchema(): z.ZodObject<\n Properties<DocumentDriveLocalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveLocalState\").optional(),\n availableOffline: z.boolean(),\n listeners: z.array(ListenerSchema()),\n sharingType: z.string().nullable(),\n triggers: z.array(TriggerSchema()),\n });\n}\n\nexport function DocumentDriveStateSchema(): z.ZodObject<\n Properties<DocumentDriveGlobalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveState\").optional(),\n icon: z.string().nullable(),\n name: z.string(),\n nodes: z.array(NodeSchema()),\n });\n}\n\nexport function FileNodeSchema(): z.ZodObject<Properties<FileNode>> {\n return z.object({\n __typename: z.literal(\"FileNode\").optional(),\n documentType: z.string(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function FolderNodeSchema(): z.ZodObject<Properties<FolderNode>> {\n return z.object({\n __typename: z.literal(\"FolderNode\").optional(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function ListenerSchema(): z.ZodObject<Properties<Listener>> {\n return z.object({\n __typename: z.literal(\"Listener\").optional(),\n block: z.boolean(),\n callInfo: ListenerCallInfoSchema().nullable(),\n filter: ListenerFilterSchema(),\n label: z.string().nullable(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerInputSchema(): z.ZodObject<Properties<ListenerInput>> {\n return z.object({\n block: z.boolean(),\n callInfo: ListenerCallInfoInputSchema().nullish(),\n filter: ListenerFilterInputSchema(),\n label: z.string().nullish(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerCallInfoSchema(): z.ZodObject<\n Properties<ListenerCallInfo>\n> {\n return z.object({\n __typename: z.literal(\"ListenerCallInfo\").optional(),\n data: z.string().nullable(),\n name: z.string().nullable(),\n transmitterType: TransmitterTypeSchema.nullable(),\n });\n}\n\nexport function ListenerCallInfoInputSchema(): z.ZodObject<\n Properties<ListenerCallInfoInput>\n> {\n return z.object({\n data: z.string().nullish(),\n name: z.string().nullish(),\n transmitterType: TransmitterTypeSchema.nullish(),\n });\n}\n\nexport function ListenerFilterSchema(): z.ZodObject<\n Properties<ListenerFilter>\n> {\n return z.object({\n __typename: z.literal(\"ListenerFilter\").optional(),\n branch: z.array(z.string()).nullable(),\n documentId: z.array(z.string()).nullable(),\n documentType: z.array(z.string()),\n scope: z.array(z.string()).nullable(),\n });\n}\n\nexport function ListenerFilterInputSchema(): z.ZodObject<\n Properties<ListenerFilterInput>\n> {\n return z.object({\n branch: z.array(z.string()).nullish(),\n documentId: z.array(z.string()).nullish(),\n documentType: z.array(z.string()).nullish(),\n scope: z.array(z.string()).nullish(),\n });\n}\n\nexport function MoveNodeInputSchema(): z.ZodObject<Properties<MoveNodeInput>> {\n return z.object({\n srcFolder: z.string(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function NodeSchema() {\n return z.union([FileNodeSchema(), FolderNodeSchema()]);\n}\n\nexport function PullResponderTriggerDataSchema(): z.ZodObject<\n Properties<PullResponderTriggerData>\n> {\n return z.object({\n __typename: z.literal(\"PullResponderTriggerData\").optional(),\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function PullResponderTriggerDataInputSchema(): z.ZodObject<\n Properties<PullResponderTriggerDataInput>\n> {\n return z.object({\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function RemoveListenerInputSchema(): z.ZodObject<\n Properties<RemoveListenerInput>\n> {\n return z.object({\n listenerId: z.string(),\n });\n}\n\nexport function RemoveTriggerInputSchema(): z.ZodObject<\n Properties<RemoveTriggerInput>\n> {\n return z.object({\n triggerId: z.string(),\n });\n}\n\nexport function SetAvailableOfflineInputSchema(): z.ZodObject<\n Properties<SetAvailableOfflineInput>\n> {\n return z.object({\n availableOffline: z.boolean(),\n });\n}\n\nexport function SetDriveIconInputSchema(): z.ZodObject<\n Properties<SetDriveIconInput>\n> {\n return z.object({\n icon: z.string().nullish(),\n });\n}\n\nexport function SetDriveNameInputSchema(): z.ZodObject<\n Properties<SetDriveNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetSharingTypeInputSchema(): z.ZodObject<\n Properties<SetSharingTypeInput>\n> {\n return z.object({\n type: z.string(),\n });\n}\n\nexport function TriggerSchema(): z.ZodObject<Properties<Trigger>> {\n return z.object({\n __typename: z.literal(\"Trigger\").optional(),\n data: TriggerDataSchema().nullable(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerInputSchema(): z.ZodObject<Properties<TriggerInput>> {\n return z.object({\n data: PullResponderTriggerDataInputSchema().nullish(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerDataSchema() {\n return PullResponderTriggerDataSchema();\n}\n\nexport function UpdateFileInputSchema(): z.ZodObject<\n Properties<UpdateFileInput>\n> {\n return z.object({\n documentType: z.string().nullish(),\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function UpdateNodeInputSchema(): z.ZodObject<\n Properties<UpdateNodeInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n","import type {\n AddFileInput,\n AddFolderInput,\n CopyNodeInput,\n DeleteNodeInput,\n MoveNodeInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"../schema/types.js\";\nimport type { LegacyAddFileAction, LegacyAddFileInput } from \"../types.js\";\nimport type {\n AddFileAction,\n AddFolderAction,\n CopyNodeAction,\n DeleteNodeAction,\n MoveNodeAction,\n UpdateFileAction,\n UpdateNodeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"../schema/zod.js\";\n\n/**\n * @deprecated Use addFile with {@link AddFileInput} instead. This overload will be removed in the future.\n */\nexport function addFile(input: LegacyAddFileInput): LegacyAddFileAction;\nexport function addFile(input: AddFileInput): AddFileAction;\nexport function addFile(\n input: LegacyAddFileInput | AddFileInput,\n): typeof input extends LegacyAddFileInput\n ? LegacyAddFileAction\n : AddFileAction {\n if (input && typeof input === \"object\" && \"synchronizationUnits\" in input) {\n // Legacy overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n undefined,\n \"global\",\n );\n }\n // Standard overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n AddFileInputSchema,\n \"global\",\n );\n}\n\nexport const addFolder = (input: AddFolderInput) =>\n createAction<AddFolderAction>(\n \"ADD_FOLDER\",\n { ...input },\n undefined,\n AddFolderInputSchema,\n \"global\",\n );\n\nexport const deleteNode = (input: DeleteNodeInput) =>\n createAction<DeleteNodeAction>(\n \"DELETE_NODE\",\n { ...input },\n undefined,\n DeleteNodeInputSchema,\n \"global\",\n );\n\nexport const updateFile = (input: UpdateFileInput) =>\n createAction<UpdateFileAction>(\n \"UPDATE_FILE\",\n { ...input },\n undefined,\n UpdateFileInputSchema,\n \"global\",\n );\n\nexport const updateNode = (input: UpdateNodeInput) =>\n createAction<UpdateNodeAction>(\n \"UPDATE_NODE\",\n { ...input },\n undefined,\n UpdateNodeInputSchema,\n \"global\",\n );\n\nexport const copyNode = (input: CopyNodeInput) =>\n createAction<CopyNodeAction>(\n \"COPY_NODE\",\n { ...input },\n undefined,\n CopyNodeInputSchema,\n \"global\",\n );\n\nexport const moveNode = (input: MoveNodeInput) =>\n createAction<MoveNodeAction>(\n \"MOVE_NODE\",\n { ...input },\n undefined,\n MoveNodeInputSchema,\n \"global\",\n );\n","import type {\n AddListenerInput,\n AddTriggerInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n} from \"../schema/types.js\";\nimport type {\n AddListenerAction,\n AddTriggerAction,\n RemoveListenerAction,\n RemoveTriggerAction,\n SetAvailableOfflineAction,\n SetDriveIconAction,\n SetDriveNameAction,\n SetSharingTypeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddListenerInputSchema,\n AddTriggerInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n} from \"../schema/zod.js\";\n\nexport const setDriveName = (input: SetDriveNameInput) =>\n createAction<SetDriveNameAction>(\n \"SET_DRIVE_NAME\",\n { ...input },\n undefined,\n SetDriveNameInputSchema,\n \"global\",\n );\n\nexport const setDriveIcon = (input: SetDriveIconInput) =>\n createAction<SetDriveIconAction>(\n \"SET_DRIVE_ICON\",\n { ...input },\n undefined,\n SetDriveIconInputSchema,\n \"global\",\n );\n\nexport const setSharingType = (input: SetSharingTypeInput) =>\n createAction<SetSharingTypeAction>(\n \"SET_SHARING_TYPE\",\n { ...input },\n undefined,\n SetSharingTypeInputSchema,\n \"local\",\n );\n\nexport const setAvailableOffline = (input: SetAvailableOfflineInput) =>\n createAction<SetAvailableOfflineAction>(\n \"SET_AVAILABLE_OFFLINE\",\n { ...input },\n undefined,\n SetAvailableOfflineInputSchema,\n \"local\",\n );\n\nexport const addListener = (input: AddListenerInput) =>\n createAction<AddListenerAction>(\n \"ADD_LISTENER\",\n { ...input },\n undefined,\n AddListenerInputSchema,\n \"local\",\n );\n\nexport const removeListener = (input: RemoveListenerInput) =>\n createAction<RemoveListenerAction>(\n \"REMOVE_LISTENER\",\n { ...input },\n undefined,\n RemoveListenerInputSchema,\n \"local\",\n );\n\nexport const addTrigger = (input: AddTriggerInput) =>\n createAction<AddTriggerAction>(\n \"ADD_TRIGGER\",\n { ...input },\n undefined,\n AddTriggerInputSchema,\n \"local\",\n );\n\nexport const removeTrigger = (input: RemoveTriggerInput) =>\n createAction<RemoveTriggerAction>(\n \"REMOVE_TRIGGER\",\n { ...input },\n undefined,\n RemoveTriggerInputSchema,\n \"local\",\n );\n","export * from \"./node/creators.js\";\nexport * from \"./drive/creators.js\";\n","import type { DocumentModelGlobalState } from \"../../document-model/types.js\";\n\nexport const driveDocumentModel: DocumentModelGlobalState = {\n id: \"powerhouse/document-drive\",\n name: \"DocumentDrive\",\n extension: \"phdd\",\n description: \"\",\n author: {\n name: \"Powerhouse Inc\",\n website: \"https://www.powerhouse.inc/\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n state: {\n global: {\n schema:\n \"type FolderNode {\\n id: String!\\n name: String!\\n kind: String!\\n parentFolder: String\\n}\\n\\ntype FileNode {\\n id: String!\\n name: String!\\n kind: String!\\n documentType: String!\\n parentFolder: String\\n}\\n\\nunion Node = FolderNode | FileNode\\n\\ntype DocumentDriveState {\\n name: String!\\n nodes: [Node!]!\\n icon: String\\n}\",\n initialValue: '\"{\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"nodes\\\\\":[],\\\\\"icon\\\\\":null}\"',\n examples: [],\n },\n local: {\n schema:\n \"type ListenerFilter {\\n documentType: [String!]!\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\nenum TransmitterType {\\n Internal,\\n SwitchboardPush,\\n PullResponder,\\n SecureConnect, \\n MatrixConnect,\\n RESTWebhook\\n}\\n\\ntype ListenerCallInfo {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ntype Listener {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilter!\\n callInfo: ListenerCallInfo\\n}\\n\\nenum TriggerType {\\n PullResponder\\n}\\n\\ntype PullResponderTriggerData {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\nunion TriggerData = PullResponderTriggerData\\n\\ntype Trigger {\\n id: ID!\\n type: TriggerType!\\n data: TriggerData\\n}\\n\\ntype DocumentDriveLocalState{\\n sharingType: String\\n listeners: [Listener!]!\\n triggers: [Trigger!]!\\n availableOffline: Boolean!\\n}\",\n initialValue:\n '\"{ \\\\\"listeners\\\\\": [], \\\\\"triggers\\\\\": [], \\\\\"sharingType\\\\\": \\\\\"private\\\\\", \\\\\"availableOffline\\\\\": false}\"',\n examples: [],\n },\n },\n modules: [\n {\n id: \"GRzuvv78tBvmB6ciitokLfonNHA=\",\n name: \"Node\",\n description: \"\",\n operations: [\n {\n id: \"7xiTdxonc9yEASR8sfV/KnbSV10=\",\n name: \"ADD_FILE\",\n description: \"\",\n schema:\n \"input AddFileInput {\\n id: ID!\\n name: String!\\n documentType: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"4lzNMMKKdIAtEU6i12xLgi9hp+U=\",\n name: \"ADD_FOLDER\",\n description: \"\",\n schema:\n \"input AddFolderInput {\\n id: ID!\\n name: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"53jH2/3TWTTcgCJiv2C+BmuC6i0=\",\n name: \"DELETE_NODE\",\n description: \"\",\n schema: \"input DeleteNodeInput {\\n id: ID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"pNn+Y1/HVq/GNMk7t0u3g3gtMLE=\",\n name: \"UPDATE_FILE\",\n description: \"\",\n schema:\n \"input UpdateFileInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n documentType: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"P0x1M8Mnt+Q/+9nggkwgVbfybsc=\",\n name: \"UPDATE_NODE\",\n description: \"\",\n schema:\n \"input UpdateNodeInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"vnQ7OB5b3wGLgjhbgJqAIpA+JLE=\",\n name: \"COPY_NODE\",\n description: \"\",\n schema:\n \"input CopyNodeInput {\\n srcId: ID!\\n targetId: ID!\\n targetName: String\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"VNyiD/sNGzk6k9A1Qe7s8dmrJxA=\",\n name: \"MOVE_NODE\",\n description: \"\",\n schema:\n \"input MoveNodeInput {\\n srcFolder: ID!\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"0dHwHlxOM9x0vMZ+gLnKxf2qTEo=\",\n name: \"Drive\",\n description: \"\",\n operations: [\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z1dsU=\",\n name: \"SET_DRIVE_NAME\",\n description: \"\",\n schema: \"input SetDriveNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"SET_DRIVE_ICON\",\n description: \"\",\n schema: \"input SetDriveIconInput {\\n icon: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z2dsU=\",\n name: \"SET_SHARING_TYPE\",\n description: \"\",\n schema: \"input SetSharingTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z3dsU=\",\n name: \"SET_AVAILABLE_OFFLINE\",\n description: \"\",\n schema:\n \"input SetAvailableOfflineInput {\\n availableOffline: Boolean!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z9dsU=\",\n name: \"ADD_LISTENER\",\n description: \"\",\n schema:\n \"input ListenerFilterInput {\\n documentType: [String!]\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\ninput ListenerCallInfoInput {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ninput ListenerInput {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilterInput!\\n callInfo: ListenerCallInfoInput\\n}\\n\\ninput AddListenerInput {\\n listener: ListenerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z10dsU=\",\n name: \"REMOVE_LISTENER\",\n description: \"\",\n schema: \"input RemoveListenerInput {\\n listenerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z20dsU=\",\n name: \"ADD_TRIGGER\",\n description: \"\",\n schema:\n \"input PullResponderTriggerDataInput {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\ninput TriggerInput {\\n id: ID!\\n type: TriggerType!\\n data: PullResponderTriggerDataInput\\n}\\n\\ninput AddTriggerInput {\\n trigger: TriggerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"REMOVE_TRIGGER\",\n description: \"\",\n schema: \"input RemoveTriggerInput {\\n triggerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n ],\n },\n ],\n },\n ],\n};\n","export const driveDocumentType = \"powerhouse/document-drive\";\n","import { z } from \"zod\";\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"../../document-model/document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport {\n DocumentDriveLocalStateSchema,\n DocumentDriveStateSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDriveDocument, DocumentDrivePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a Drive document */\nexport const DriveDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(driveDocumentType),\n});\n\n/** Schema for validating the state object of a Drive document */\nexport const DrivePHStateSchema = BaseDocumentStateSchema.extend({\n global: DocumentDriveStateSchema(),\n local: DocumentDriveLocalStateSchema(),\n});\n\nexport const DriveDocumentSchema = z.object({\n header: DriveDocumentHeaderSchema,\n state: DrivePHStateSchema,\n initialState: DrivePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a Drive document state object */\nexport function isDriveState(state: unknown): state is DocumentDrivePHState {\n return DrivePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a Drive document state object */\nexport function assertIsDriveState(\n state: unknown,\n): asserts state is DocumentDrivePHState {\n DrivePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a Drive document */\nexport function isDriveDocument(\n document: unknown,\n): document is DocumentDriveDocument {\n return DriveDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a Drive document */\nexport function assertIsDriveDocument(\n document: unknown,\n): asserts document is DocumentDriveDocument {\n DriveDocumentSchema.parse(document);\n}\n","/**\n * Factory methods for creating DocumentDriveDocument instances\n */\n\nimport {\n createBaseState,\n defaultBaseState,\n type PHBaseState,\n} from \"../../document-model/state.js\";\nimport type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n DocumentDrivePHState,\n} from \"./types.js\";\n\nexport function defaultGlobalState(): DocumentDriveGlobalState {\n return {\n icon: null,\n name: \"\",\n nodes: [],\n };\n}\n\nexport function defaultLocalState(): DocumentDriveLocalState {\n return {\n availableOffline: false,\n listeners: [],\n sharingType: null,\n triggers: [],\n };\n}\n\nexport function defaultPHState(): DocumentDrivePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<DocumentDriveGlobalState>,\n): DocumentDriveGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n } as DocumentDriveGlobalState;\n}\n\nexport function createLocalState(\n state?: Partial<DocumentDriveLocalState>,\n): DocumentDriveLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as DocumentDriveLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<DocumentDriveGlobalState>,\n localState?: Partial<DocumentDriveLocalState>,\n): DocumentDrivePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { Listener, Trigger } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveDriveOperations } from \"../../gen/drive/actions.js\";\n\nexport const driveReducer: DocumentDriveDriveOperations = {\n setDriveNameOperation(state, action, dispatch) {\n state.name = action.input.name;\n },\n setDriveIconOperation(state, action, dispatch) {\n state.icon = action.input.icon ?? null;\n },\n setSharingTypeOperation(state, action, dispatch) {\n state.sharingType = action.input.type;\n },\n setAvailableOfflineOperation(state, action, dispatch) {\n state.availableOffline = action.input.availableOffline;\n },\n addListenerOperation(state, action, dispatch) {\n const { listener: input } = action.input;\n if (state.listeners.find((l) => l.listenerId === input.listenerId)) {\n throw new Error(`A listener with Id: ${input.listenerId} already exists`);\n }\n // Convert InputMaybe (undefined | null | T) to Maybe (null | T)\n const listener: Listener = {\n listenerId: input.listenerId,\n label: input.label ?? null,\n block: input.block,\n system: input.system,\n filter: {\n documentType: input.filter.documentType ?? null,\n documentId: input.filter.documentId ?? null,\n scope: input.filter.scope ?? null,\n branch: input.filter.branch ?? null,\n },\n callInfo: input.callInfo\n ? {\n transmitterType: input.callInfo.transmitterType ?? null,\n name: input.callInfo.name ?? null,\n data: input.callInfo.data ?? null,\n }\n : null,\n };\n state.listeners.push(listener);\n },\n removeListenerOperation(state, action, dispatch) {\n state.listeners = state.listeners.filter(\n (listener) => listener.listenerId !== action.input.listenerId,\n );\n },\n addTriggerOperation(state, action, dispatch) {\n const { trigger: input } = action.input;\n if (state.triggers.find((t) => t.id === input.id)) {\n throw new Error(`A trigger with Id: ${input.id} already exists`);\n }\n // Convert InputMaybe to Maybe - PullResponderTriggerData has all required fields so spread works\n const trigger: Trigger = {\n id: input.id,\n type: input.type,\n data: input.data ? { ...input.data } : null,\n };\n state.triggers.push(trigger);\n },\n removeTriggerOperation(state, action, dispatch) {\n state.triggers = state.triggers.filter(\n (trigger) => trigger.id !== action.input.triggerId,\n );\n },\n};\n","import type {\n CopyNodeInput,\n FileNode,\n FolderNode,\n Node,\n} from \"../gen/schema/types.js\";\nimport type {\n GenerateNodesCopyIdGenerator,\n GenerateNodesCopySrc,\n} from \"./types.js\";\nimport { isDraft, original } from \"mutative\";\n\nexport function isFileNode(node: Node): node is FileNode {\n return node.kind === \"file\";\n}\n\nexport function isFolderNode(node: Node): node is FolderNode {\n return node.kind === \"folder\";\n}\n\nexport function getAncestors(node: Node, allNodes: Node[]): Node[] {\n if (!node.parentFolder) {\n return [];\n } else {\n const parentNode = allNodes.find((_node) => _node.id === node.parentFolder);\n if (!parentNode) {\n throw new Error(`Parent node with id ${node.parentFolder} not found`);\n }\n return [parentNode, ...getAncestors(parentNode, allNodes)];\n }\n}\n\nexport function getDescendants(node: Node, allNodes: Node[]): Node[] {\n const children = allNodes.filter((_node) => _node.parentFolder === node.id);\n const descendants = children.map((child) => getDescendants(child, allNodes));\n return [...children, ...descendants.flat()];\n}\n\n/**\n * Generates a copy of nodes based on the provided source and target information.\n * @param src - The source information for generating the copy.\n * @param idGenerator - The function used to generate new IDs for the copied nodes.\n * @param nodes - The array of nodes to copy from.\n * @returns An array of copied nodes with updated IDs and parent folders.\n * @throws Error if the root node with the specified ID is not found.\n */\nexport function generateNodesCopy(\n src: GenerateNodesCopySrc,\n idGenerator: GenerateNodesCopyIdGenerator,\n nodes: Node[],\n): CopyNodeInput[] {\n const rootNode = nodes.find((node) => node.id === src.srcId);\n\n if (!rootNode) {\n throw new Error(`Node with id ${src.srcId} not found`);\n }\n\n const nodesToCopy = [\n {\n ...rootNode,\n name: src.targetName || rootNode.name,\n parentFolder: src.targetParentFolder || null,\n },\n ...getDescendants(rootNode, nodes),\n ];\n\n const ids: Record<string, string | undefined> = {};\n\n // Add targetParentFolder to ids so that is not replaced by a new id\n if (src.targetParentFolder) {\n ids[src.targetParentFolder] = src.targetParentFolder;\n }\n\n const getNewNodeId = (node: Node): string => {\n let newId = ids[node.id];\n\n if (!newId) {\n const oldId = node.id;\n newId = idGenerator(node);\n ids[oldId] = newId;\n }\n\n return newId;\n };\n\n const copyNodesInput = nodesToCopy.map<CopyNodeInput>((node) => ({\n srcId: node.id,\n targetId: getNewNodeId(node),\n targetName: node.name,\n targetParentFolder: node.parentFolder ? ids[node.parentFolder] : null,\n }));\n\n return copyNodesInput;\n}\n\nexport function getNextCopyNumber(\n files: string[],\n baseFilename: string,\n): number {\n let maxNumber = 0; // Start by assuming no copies exist\n\n // Regex to find files that match the base filename followed by \" (copy)\" and possibly a number\n const regex = new RegExp(\n `^${escapeRegExp(baseFilename)} \\\\(copy\\\\)(?: (\\\\d+))?$`,\n );\n\n for (const file of files) {\n const match = file.match(regex);\n if (match) {\n const number = match[1] ? parseInt(match[1], 10) : 1;\n if (number > maxNumber) {\n maxNumber = number;\n }\n }\n }\n\n return maxNumber + 1;\n}\n\nexport function escapeRegExp(string: string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * The node list as plain objects for read-only scans. Inside a mutative draft\n * this returns the untouched base list, so a find or filter over it does not\n * create a child draft per element it visits. Callers must read before they\n * write: the base list does not see mutations made earlier in the same action.\n */\nexport function readNodes(state: { nodes: Node[] }): Node[] {\n return isDraft(state) ? original(state).nodes : state.nodes;\n}\n\nexport function handleTargetNameCollisions(params: {\n nodes: Node[];\n targetParentFolder: string | null;\n srcName: string;\n srcKind: \"file\" | \"folder\";\n}) {\n const { nodes, targetParentFolder, srcName, srcKind } = params;\n\n const targetNodeChildrenNames = nodes\n .filter((node) =>\n targetParentFolder === \"\"\n ? node.parentFolder === null\n : node.parentFolder === targetParentFolder,\n )\n .filter((node) => node.kind === srcKind)\n .map((node) => node.name);\n\n const targetHasNodesWithSameName = targetNodeChildrenNames.includes(srcName);\n\n const targetName = targetHasNodesWithSameName\n ? `${srcName} (copy) ${getNextCopyNumber(targetNodeChildrenNames, srcName)}`\n : srcName;\n\n return targetName;\n}\n\nexport const isValidName = (name: string) => {\n // Names are display labels (URLs use a slugified id), so allow any unicode;\n // reject only empty/whitespace-only names and control characters.\n // eslint-disable-next-line no-control-regex\n return name.trim().length > 0 && !/[\\u0000-\\u001F\\u007F]/.test(name);\n};\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { FileNode } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveNodeOperations } from \"../../gen/node/actions.js\";\nimport {\n getDescendants,\n handleTargetNameCollisions,\n isFileNode,\n isFolderNode,\n isValidName,\n readNodes,\n} from \"../utils.js\";\n\nexport const nodeReducer: DocumentDriveNodeOperations = {\n addFileOperation(state, action, dispatch) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"file\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n const fileNode: FileNode = {\n id: action.input.id,\n name,\n kind: \"file\",\n parentFolder: action.input.parentFolder ?? null,\n documentType: action.input.documentType,\n };\n state.nodes.push(fileNode);\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n\n dispatch?.({\n type: \"CREATE_CHILD_DOCUMENT\",\n input: {\n id: action.input.id,\n documentType: action.input.documentType,\n },\n });\n },\n addFolderOperation(state, action) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"folder\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n state.nodes.push({\n ...action.input,\n name,\n kind: \"folder\",\n parentFolder: action.input.parentFolder ?? null,\n });\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n deleteNodeOperation(state, action, dispatch) {\n const node = state.nodes.find((node) => node.id === action.input.id);\n if (!node) {\n throw new Error(`Node with id ${action.input.id} not found`);\n }\n const descendants = getDescendants(node, state.nodes);\n state.nodes = state.nodes.filter(\n (node) =>\n node.id !== action.input.id &&\n !descendants.find((descendant) => descendant.id === node.id),\n );\n\n [node, ...descendants]\n .filter((node) => isFileNode(node))\n .forEach((node) => {\n dispatch?.({\n type: \"DELETE_CHILD_DOCUMENT\",\n input: {\n id: node.id,\n },\n });\n });\n },\n updateFileOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n state.nodes = state.nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: state.nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: \"file\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n documentType:\n action.input.documentType ?? (node as FileNode).documentType,\n },\n }\n : node,\n );\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n updateNodeOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n state.nodes = state.nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: state.nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n parentFolder:\n action.input.parentFolder === null ? null : node.parentFolder,\n },\n }\n : node,\n );\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n copyNodeOperation(state, action, dispatch) {\n const node = state.nodes.find((node) => node.id === action.input.srcId);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcId} not found`);\n }\n\n const duplicatedNode = state.nodes.find(\n (node) => node.id === action.input.targetId,\n );\n\n if (duplicatedNode) {\n throw new Error(`Node with id ${action.input.targetId} already exists`);\n }\n\n const name = handleTargetNameCollisions({\n nodes: state.nodes,\n srcName: action.input.targetName || node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n const newNode = {\n ...node,\n id: action.input.targetId,\n slug: action.input.targetId,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n\n state.nodes.push(newNode);\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n\n const isFile = isFileNode(newNode);\n if (isFile) {\n dispatch?.({\n type: \"COPY_CHILD_DOCUMENT\",\n input: {\n id: action.input.srcId,\n newId: action.input.targetId,\n },\n });\n }\n },\n moveNodeOperation(state, action) {\n if (action.input.srcFolder === action.input.targetParentFolder) {\n throw new Error(\n \"Circular Reference Error: Attempting to move a node to its current parent folder\",\n );\n }\n\n const node = state.nodes.find((node) => node.id === action.input.srcFolder);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcFolder} not found`);\n }\n\n const name = handleTargetNameCollisions({\n nodes: state.nodes,\n srcName: node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n if (isFolderNode(node)) {\n const descendants = getDescendants(node, state.nodes);\n // throw error if moving a folder to one of its descendants\n if (\n descendants.find(\n (descendant) => descendant.id === action.input.targetParentFolder,\n )\n ) {\n throw new Error(\n \"Circular Reference Error: Cannot move a folder to one of its descendants\",\n );\n }\n }\n\n state.nodes = state.nodes.map((node) => {\n if (node.id === action.input.srcFolder) {\n return {\n ...node,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n }\n\n return node;\n });\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n};\n","import { isDocumentAction } from \"../../document-model/documents.js\";\nimport { createReducer } from \"../../document-model/reducer.js\";\nimport type { Reducer, StateReducer } from \"../../document-model/types.js\";\nimport { driveReducer } from \"../src/reducers/drive.js\";\nimport { nodeReducer } from \"../src/reducers/node.js\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n AddListenerInputSchema,\n AddTriggerInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\n\nconst driveStateReducer: StateReducer<DocumentDrivePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n\n const typedAction = action as any;\n switch (typedAction.type) {\n case \"ADD_FILE\":\n AddFileInputSchema().parse(typedAction.input);\n nodeReducer.addFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_FOLDER\":\n AddFolderInputSchema().parse(typedAction.input);\n nodeReducer.addFolderOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"DELETE_NODE\":\n DeleteNodeInputSchema().parse(typedAction.input);\n nodeReducer.deleteNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_FILE\":\n UpdateFileInputSchema().parse(typedAction.input);\n nodeReducer.updateFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_NODE\":\n UpdateNodeInputSchema().parse(typedAction.input);\n nodeReducer.updateNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"COPY_NODE\":\n CopyNodeInputSchema().parse(typedAction.input);\n nodeReducer.copyNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"MOVE_NODE\":\n MoveNodeInputSchema().parse(typedAction.input);\n nodeReducer.moveNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_NAME\":\n SetDriveNameInputSchema().parse(typedAction.input);\n driveReducer.setDriveNameOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_ICON\":\n SetDriveIconInputSchema().parse(typedAction.input);\n driveReducer.setDriveIconOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_SHARING_TYPE\":\n SetSharingTypeInputSchema().parse(typedAction.input);\n driveReducer.setSharingTypeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_AVAILABLE_OFFLINE\":\n SetAvailableOfflineInputSchema().parse(typedAction.input);\n driveReducer.setAvailableOfflineOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_LISTENER\":\n AddListenerInputSchema().parse(typedAction.input);\n driveReducer.addListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_LISTENER\":\n RemoveListenerInputSchema().parse(typedAction.input);\n driveReducer.removeListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_TRIGGER\":\n AddTriggerInputSchema().parse(typedAction.input);\n driveReducer.addTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_TRIGGER\":\n RemoveTriggerInputSchema().parse(typedAction.input);\n driveReducer.removeTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n default:\n return state;\n }\n};\n\nexport const driveDocumentReducer: Reducer<DocumentDrivePHState> =\n createReducer<DocumentDrivePHState>(driveStateReducer);\n","import type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n} from \"./schema/types.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\nimport type {\n AssertIsDocumentOfType,\n AssertIsStateOfType,\n CreateDocument,\n CreateState,\n IsDocumentOfType,\n IsStateOfType,\n LoadFromInput,\n SaveToFileHandle,\n} from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n} from \"document-model\";\nimport {\n assertIsDriveDocument,\n assertIsDriveState,\n isDriveDocument,\n isDriveState,\n} from \"./document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport { driveDocumentReducer } from \"./reducer.js\";\n\nexport const initialGlobalState: DocumentDriveGlobalState = {\n name: \"\",\n nodes: [],\n icon: null,\n};\nexport const initialLocalState: DocumentDriveLocalState = {\n listeners: [],\n triggers: [],\n sharingType: \"private\",\n availableOffline: false,\n};\n\nexport const driveCreateState: CreateState<DocumentDrivePHState> = (\n state: Partial<DocumentDrivePHState> | undefined,\n) => {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n};\n\nexport const driveCreateDocument: CreateDocument<DocumentDrivePHState> = (\n state,\n) => {\n return baseCreateDocument(driveCreateState, state, driveDocumentType);\n};\n\nexport const driveSaveToFileHandle: SaveToFileHandle = (document, input) => {\n return baseSaveToFileHandle(document, input);\n};\n\nexport const driveLoadFromInput: LoadFromInput<DocumentDrivePHState> = (\n input,\n) => {\n return baseLoadFromInput(input, driveDocumentReducer);\n};\n\nexport const isStateOfType: IsStateOfType<DocumentDrivePHState> = (state) => {\n return isDriveState(state);\n};\n\nexport const assertIsStateOfType: AssertIsStateOfType<DocumentDrivePHState> = (\n state,\n) => {\n assertIsDriveState(state);\n};\n\nexport const isDocumentOfType: IsDocumentOfType<DocumentDrivePHState> = (\n document,\n) => {\n return isDriveDocument(document);\n};\n\nexport const assertIsDocumentOfType: AssertIsDocumentOfType<\n DocumentDrivePHState\n> = (document) => {\n assertIsDriveDocument(document);\n};\n","import { createState, defaultBaseState } from \"../document-model/state.js\";\nimport { driveDocumentFileExtension } from \"./constants.js\";\nimport * as actions from \"./gen/creators.js\";\nimport { driveDocumentModel } from \"./gen/document-model.js\";\nimport { driveDocumentReducer } from \"./gen/reducer.js\";\nimport {\n assertIsDocumentOfType,\n assertIsStateOfType,\n driveCreateDocument,\n driveCreateState,\n driveLoadFromInput,\n driveSaveToFileHandle,\n isDocumentOfType,\n isStateOfType,\n} from \"./gen/utils.js\";\nimport type { DriveDocumentModelModule } from \"./types.js\";\nexport const driveDocumentModelModule: DriveDocumentModelModule = {\n actions,\n reducer: driveDocumentReducer,\n documentModel: createState(defaultBaseState(), driveDocumentModel),\n utils: {\n fileExtension: driveDocumentFileExtension,\n createState: driveCreateState,\n createDocument: driveCreateDocument,\n loadFromInput: driveLoadFromInput,\n saveToFileHandle: driveSaveToFileHandle,\n isStateOfType,\n assertIsStateOfType,\n isDocumentOfType,\n assertIsDocumentOfType,\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,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YAAY,QAC3B,QACA,SACD;AACD;EAEF,QACE,QAAO;;;AAIb,MAAa,uBACX,cAAoC,kBAAkB;;;AClJxD,MAAa,qBAA+C;CAC1D,MAAM;CACN,OAAO,EAAE;CACT,MAAM;CACP;AACD,MAAa,oBAA6C;CACxD,WAAW,EAAE;CACb,UAAU,EAAE;CACZ,aAAa;CACb,kBAAkB;CACnB;AAED,MAAa,oBACX,UACG;AACH,QAAO;EACL,GAAG,kBAAkB;EACrB,QAAQ;GAAE,GAAG;GAAoB,GAAG,OAAO;GAAQ;EACnD,OAAO;GAAE,GAAG;GAAmB,GAAG,OAAO;GAAO;EACjD;;AAGH,MAAa,uBACX,UACG;AACH,QAAO,mBAAmB,kBAAkB,OAAO,kBAAkB;;AAGvE,MAAa,yBAA2C,UAAU,UAAU;AAC1E,QAAO,qBAAqB,UAAU,MAAM;;AAG9C,MAAa,sBACX,UACG;AACH,QAAO,kBAAkB,OAAO,qBAAqB;;AAGvD,MAAa,iBAAsD,UAAU;AAC3E,QAAO,aAAa,MAAM;;AAG5B,MAAa,uBACX,UACG;AACH,oBAAmB,MAAM;;AAG3B,MAAa,oBACX,aACG;AACH,QAAO,gBAAgB,SAAS;;AAGlC,MAAa,0BAER,aAAa;AAChB,uBAAsB,SAAS;;;;ACvEjC,MAAa,2BAAqD;CAChE,SAAA;CACA,SAAS;CACT,eAAeA,cAAY,kBAAkB,EAAE,mBAAmB;CAClE,OAAO;EACL,eAAe;EACf,aAAa;EACb,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB;EACA;EACA;EACA;EACD;CACF"}
1
+ {"version":3,"file":"index.js","names":["createState"],"sources":["../../document-drive/constants.ts","../../document-drive/gen/schema/zod.ts","../../document-drive/gen/node/creators.ts","../../document-drive/gen/drive/creators.ts","../../document-drive/gen/creators.ts","../../document-drive/gen/document-model.ts","../../document-drive/gen/document-type.ts","../../document-drive/gen/document-schema.ts","../../document-drive/gen/ph-factories.ts","../../document-drive/src/reducers/drive.ts","../../document-drive/src/utils.ts","../../document-drive/src/reducers/node.ts","../../document-drive/gen/reducer.ts","../../document-drive/gen/utils.ts","../../document-drive/module.ts"],"sourcesContent":["export const driveDocumentFileExtension = \"phdd\";\n","import type {\n AddFileInput,\n AddFolderInput,\n AddListenerInput,\n AddTriggerInput,\n CopyNodeInput,\n DeleteNodeInput,\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n FileNode,\n FolderNode,\n Listener,\n ListenerCallInfo,\n ListenerCallInfoInput,\n ListenerFilter,\n ListenerFilterInput,\n ListenerInput,\n MoveNodeInput,\n PullResponderTriggerData,\n PullResponderTriggerDataInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n Trigger,\n TriggerInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"./types.js\";\nimport { z } from \"zod\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K], T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport const TransmitterTypeSchema = z.enum([\n \"Internal\",\n \"MatrixConnect\",\n \"PullResponder\",\n \"RESTWebhook\",\n \"SecureConnect\",\n \"SwitchboardPush\",\n]);\n\nexport const TriggerTypeSchema = z.enum([\"PullResponder\"]);\n\nexport function AddFileInputSchema(): z.ZodObject<Properties<AddFileInput>> {\n return z.object({\n documentType: z.string(),\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddFolderInputSchema(): z.ZodObject<\n Properties<AddFolderInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function AddListenerInputSchema(): z.ZodObject<\n Properties<AddListenerInput>\n> {\n return z.object({\n listener: ListenerInputSchema(),\n });\n}\n\nexport function AddTriggerInputSchema(): z.ZodObject<\n Properties<AddTriggerInput>\n> {\n return z.object({\n trigger: TriggerInputSchema(),\n });\n}\n\nexport function CopyNodeInputSchema(): z.ZodObject<Properties<CopyNodeInput>> {\n return z.object({\n srcId: z.string(),\n targetId: z.string(),\n targetName: z.string().nullish(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function DeleteNodeInputSchema(): z.ZodObject<\n Properties<DeleteNodeInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function DocumentDriveLocalStateSchema(): z.ZodObject<\n Properties<DocumentDriveLocalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveLocalState\").optional(),\n availableOffline: z.boolean(),\n listeners: z.array(ListenerSchema()),\n sharingType: z.string().nullable(),\n triggers: z.array(TriggerSchema()),\n });\n}\n\nexport function DocumentDriveStateSchema(): z.ZodObject<\n Properties<DocumentDriveGlobalState>\n> {\n return z.object({\n __typename: z.literal(\"DocumentDriveState\").optional(),\n icon: z.string().nullable(),\n name: z.string(),\n nodes: z.array(NodeSchema()),\n });\n}\n\nexport function FileNodeSchema(): z.ZodObject<Properties<FileNode>> {\n return z.object({\n __typename: z.literal(\"FileNode\").optional(),\n documentType: z.string(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function FolderNodeSchema(): z.ZodObject<Properties<FolderNode>> {\n return z.object({\n __typename: z.literal(\"FolderNode\").optional(),\n id: z.string(),\n kind: z.string(),\n name: z.string(),\n parentFolder: z.string().nullable(),\n });\n}\n\nexport function ListenerSchema(): z.ZodObject<Properties<Listener>> {\n return z.object({\n __typename: z.literal(\"Listener\").optional(),\n block: z.boolean(),\n callInfo: ListenerCallInfoSchema().nullable(),\n filter: ListenerFilterSchema(),\n label: z.string().nullable(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerInputSchema(): z.ZodObject<Properties<ListenerInput>> {\n return z.object({\n block: z.boolean(),\n callInfo: ListenerCallInfoInputSchema().nullish(),\n filter: ListenerFilterInputSchema(),\n label: z.string().nullish(),\n listenerId: z.string(),\n system: z.boolean(),\n });\n}\n\nexport function ListenerCallInfoSchema(): z.ZodObject<\n Properties<ListenerCallInfo>\n> {\n return z.object({\n __typename: z.literal(\"ListenerCallInfo\").optional(),\n data: z.string().nullable(),\n name: z.string().nullable(),\n transmitterType: TransmitterTypeSchema.nullable(),\n });\n}\n\nexport function ListenerCallInfoInputSchema(): z.ZodObject<\n Properties<ListenerCallInfoInput>\n> {\n return z.object({\n data: z.string().nullish(),\n name: z.string().nullish(),\n transmitterType: TransmitterTypeSchema.nullish(),\n });\n}\n\nexport function ListenerFilterSchema(): z.ZodObject<\n Properties<ListenerFilter>\n> {\n return z.object({\n __typename: z.literal(\"ListenerFilter\").optional(),\n branch: z.array(z.string()).nullable(),\n documentId: z.array(z.string()).nullable(),\n documentType: z.array(z.string()),\n scope: z.array(z.string()).nullable(),\n });\n}\n\nexport function ListenerFilterInputSchema(): z.ZodObject<\n Properties<ListenerFilterInput>\n> {\n return z.object({\n branch: z.array(z.string()).nullish(),\n documentId: z.array(z.string()).nullish(),\n documentType: z.array(z.string()).nullish(),\n scope: z.array(z.string()).nullish(),\n });\n}\n\nexport function MoveNodeInputSchema(): z.ZodObject<Properties<MoveNodeInput>> {\n return z.object({\n srcFolder: z.string(),\n targetParentFolder: z.string().nullish(),\n });\n}\n\nexport function NodeSchema() {\n return z.union([FileNodeSchema(), FolderNodeSchema()]);\n}\n\nexport function PullResponderTriggerDataSchema(): z.ZodObject<\n Properties<PullResponderTriggerData>\n> {\n return z.object({\n __typename: z.literal(\"PullResponderTriggerData\").optional(),\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function PullResponderTriggerDataInputSchema(): z.ZodObject<\n Properties<PullResponderTriggerDataInput>\n> {\n return z.object({\n interval: z.string(),\n listenerId: z.string(),\n url: z.string(),\n });\n}\n\nexport function RemoveListenerInputSchema(): z.ZodObject<\n Properties<RemoveListenerInput>\n> {\n return z.object({\n listenerId: z.string(),\n });\n}\n\nexport function RemoveTriggerInputSchema(): z.ZodObject<\n Properties<RemoveTriggerInput>\n> {\n return z.object({\n triggerId: z.string(),\n });\n}\n\nexport function SetAvailableOfflineInputSchema(): z.ZodObject<\n Properties<SetAvailableOfflineInput>\n> {\n return z.object({\n availableOffline: z.boolean(),\n });\n}\n\nexport function SetDriveIconInputSchema(): z.ZodObject<\n Properties<SetDriveIconInput>\n> {\n return z.object({\n icon: z.string().nullish(),\n });\n}\n\nexport function SetDriveNameInputSchema(): z.ZodObject<\n Properties<SetDriveNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetSharingTypeInputSchema(): z.ZodObject<\n Properties<SetSharingTypeInput>\n> {\n return z.object({\n type: z.string(),\n });\n}\n\nexport function TriggerSchema(): z.ZodObject<Properties<Trigger>> {\n return z.object({\n __typename: z.literal(\"Trigger\").optional(),\n data: TriggerDataSchema().nullable(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerInputSchema(): z.ZodObject<Properties<TriggerInput>> {\n return z.object({\n data: PullResponderTriggerDataInputSchema().nullish(),\n id: z.string(),\n type: TriggerTypeSchema,\n });\n}\n\nexport function TriggerDataSchema() {\n return PullResponderTriggerDataSchema();\n}\n\nexport function UpdateFileInputSchema(): z.ZodObject<\n Properties<UpdateFileInput>\n> {\n return z.object({\n documentType: z.string().nullish(),\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n\nexport function UpdateNodeInputSchema(): z.ZodObject<\n Properties<UpdateNodeInput>\n> {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n parentFolder: z.string().nullish(),\n });\n}\n","import type {\n AddFileInput,\n AddFolderInput,\n CopyNodeInput,\n DeleteNodeInput,\n MoveNodeInput,\n UpdateFileInput,\n UpdateNodeInput,\n} from \"../schema/types.js\";\nimport type { LegacyAddFileAction, LegacyAddFileInput } from \"../types.js\";\nimport type {\n AddFileAction,\n AddFolderAction,\n CopyNodeAction,\n DeleteNodeAction,\n MoveNodeAction,\n UpdateFileAction,\n UpdateNodeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"../schema/zod.js\";\n\n/**\n * @deprecated Use addFile with {@link AddFileInput} instead. This overload will be removed in the future.\n */\nexport function addFile(input: LegacyAddFileInput): LegacyAddFileAction;\nexport function addFile(input: AddFileInput): AddFileAction;\nexport function addFile(\n input: LegacyAddFileInput | AddFileInput,\n): typeof input extends LegacyAddFileInput\n ? LegacyAddFileAction\n : AddFileAction {\n if (input && typeof input === \"object\" && \"synchronizationUnits\" in input) {\n // Legacy overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n undefined,\n \"global\",\n );\n }\n // Standard overload\n return createAction<AddFileAction>(\n \"ADD_FILE\",\n { ...input },\n undefined,\n AddFileInputSchema,\n \"global\",\n );\n}\n\nexport const addFolder = (input: AddFolderInput) =>\n createAction<AddFolderAction>(\n \"ADD_FOLDER\",\n { ...input },\n undefined,\n AddFolderInputSchema,\n \"global\",\n );\n\nexport const deleteNode = (input: DeleteNodeInput) =>\n createAction<DeleteNodeAction>(\n \"DELETE_NODE\",\n { ...input },\n undefined,\n DeleteNodeInputSchema,\n \"global\",\n );\n\nexport const updateFile = (input: UpdateFileInput) =>\n createAction<UpdateFileAction>(\n \"UPDATE_FILE\",\n { ...input },\n undefined,\n UpdateFileInputSchema,\n \"global\",\n );\n\nexport const updateNode = (input: UpdateNodeInput) =>\n createAction<UpdateNodeAction>(\n \"UPDATE_NODE\",\n { ...input },\n undefined,\n UpdateNodeInputSchema,\n \"global\",\n );\n\nexport const copyNode = (input: CopyNodeInput) =>\n createAction<CopyNodeAction>(\n \"COPY_NODE\",\n { ...input },\n undefined,\n CopyNodeInputSchema,\n \"global\",\n );\n\nexport const moveNode = (input: MoveNodeInput) =>\n createAction<MoveNodeAction>(\n \"MOVE_NODE\",\n { ...input },\n undefined,\n MoveNodeInputSchema,\n \"global\",\n );\n","import type {\n AddListenerInput,\n AddTriggerInput,\n RemoveListenerInput,\n RemoveTriggerInput,\n SetAvailableOfflineInput,\n SetDriveIconInput,\n SetDriveNameInput,\n SetSharingTypeInput,\n} from \"../schema/types.js\";\nimport type {\n AddListenerAction,\n AddTriggerAction,\n RemoveListenerAction,\n RemoveTriggerAction,\n SetAvailableOfflineAction,\n SetDriveIconAction,\n SetDriveNameAction,\n SetSharingTypeAction,\n} from \"./actions.js\";\nimport { createAction } from \"document-model\";\nimport {\n AddListenerInputSchema,\n AddTriggerInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n} from \"../schema/zod.js\";\n\nexport const setDriveName = (input: SetDriveNameInput) =>\n createAction<SetDriveNameAction>(\n \"SET_DRIVE_NAME\",\n { ...input },\n undefined,\n SetDriveNameInputSchema,\n \"global\",\n );\n\nexport const setDriveIcon = (input: SetDriveIconInput) =>\n createAction<SetDriveIconAction>(\n \"SET_DRIVE_ICON\",\n { ...input },\n undefined,\n SetDriveIconInputSchema,\n \"global\",\n );\n\nexport const setSharingType = (input: SetSharingTypeInput) =>\n createAction<SetSharingTypeAction>(\n \"SET_SHARING_TYPE\",\n { ...input },\n undefined,\n SetSharingTypeInputSchema,\n \"local\",\n );\n\nexport const setAvailableOffline = (input: SetAvailableOfflineInput) =>\n createAction<SetAvailableOfflineAction>(\n \"SET_AVAILABLE_OFFLINE\",\n { ...input },\n undefined,\n SetAvailableOfflineInputSchema,\n \"local\",\n );\n\nexport const addListener = (input: AddListenerInput) =>\n createAction<AddListenerAction>(\n \"ADD_LISTENER\",\n { ...input },\n undefined,\n AddListenerInputSchema,\n \"local\",\n );\n\nexport const removeListener = (input: RemoveListenerInput) =>\n createAction<RemoveListenerAction>(\n \"REMOVE_LISTENER\",\n { ...input },\n undefined,\n RemoveListenerInputSchema,\n \"local\",\n );\n\nexport const addTrigger = (input: AddTriggerInput) =>\n createAction<AddTriggerAction>(\n \"ADD_TRIGGER\",\n { ...input },\n undefined,\n AddTriggerInputSchema,\n \"local\",\n );\n\nexport const removeTrigger = (input: RemoveTriggerInput) =>\n createAction<RemoveTriggerAction>(\n \"REMOVE_TRIGGER\",\n { ...input },\n undefined,\n RemoveTriggerInputSchema,\n \"local\",\n );\n","export * from \"./node/creators.js\";\nexport * from \"./drive/creators.js\";\n","import type { DocumentModelGlobalState } from \"../../document-model/types.js\";\n\nexport const driveDocumentModel: DocumentModelGlobalState = {\n id: \"powerhouse/document-drive\",\n name: \"DocumentDrive\",\n extension: \"phdd\",\n description: \"\",\n author: {\n name: \"Powerhouse Inc\",\n website: \"https://www.powerhouse.inc/\",\n },\n specifications: [\n {\n version: 1,\n changeLog: [],\n state: {\n global: {\n schema:\n \"type FolderNode {\\n id: String!\\n name: String!\\n kind: String!\\n parentFolder: String\\n}\\n\\ntype FileNode {\\n id: String!\\n name: String!\\n kind: String!\\n documentType: String!\\n parentFolder: String\\n}\\n\\nunion Node = FolderNode | FileNode\\n\\ntype DocumentDriveState {\\n name: String!\\n nodes: [Node!]!\\n icon: String\\n}\",\n initialValue: '\"{\\\\\"name\\\\\":\\\\\"\\\\\",\\\\\"nodes\\\\\":[],\\\\\"icon\\\\\":null}\"',\n examples: [],\n },\n local: {\n schema:\n \"type ListenerFilter {\\n documentType: [String!]!\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\nenum TransmitterType {\\n Internal,\\n SwitchboardPush,\\n PullResponder,\\n SecureConnect, \\n MatrixConnect,\\n RESTWebhook\\n}\\n\\ntype ListenerCallInfo {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ntype Listener {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilter!\\n callInfo: ListenerCallInfo\\n}\\n\\nenum TriggerType {\\n PullResponder\\n}\\n\\ntype PullResponderTriggerData {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\nunion TriggerData = PullResponderTriggerData\\n\\ntype Trigger {\\n id: ID!\\n type: TriggerType!\\n data: TriggerData\\n}\\n\\ntype DocumentDriveLocalState{\\n sharingType: String\\n listeners: [Listener!]!\\n triggers: [Trigger!]!\\n availableOffline: Boolean!\\n}\",\n initialValue:\n '\"{ \\\\\"listeners\\\\\": [], \\\\\"triggers\\\\\": [], \\\\\"sharingType\\\\\": \\\\\"private\\\\\", \\\\\"availableOffline\\\\\": false}\"',\n examples: [],\n },\n },\n modules: [\n {\n id: \"GRzuvv78tBvmB6ciitokLfonNHA=\",\n name: \"Node\",\n description: \"\",\n operations: [\n {\n id: \"7xiTdxonc9yEASR8sfV/KnbSV10=\",\n name: \"ADD_FILE\",\n description: \"\",\n schema:\n \"input AddFileInput {\\n id: ID!\\n name: String!\\n documentType: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"4lzNMMKKdIAtEU6i12xLgi9hp+U=\",\n name: \"ADD_FOLDER\",\n description: \"\",\n schema:\n \"input AddFolderInput {\\n id: ID!\\n name: String!\\n parentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"53jH2/3TWTTcgCJiv2C+BmuC6i0=\",\n name: \"DELETE_NODE\",\n description: \"\",\n schema: \"input DeleteNodeInput {\\n id: ID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"pNn+Y1/HVq/GNMk7t0u3g3gtMLE=\",\n name: \"UPDATE_FILE\",\n description: \"\",\n schema:\n \"input UpdateFileInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n documentType: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"P0x1M8Mnt+Q/+9nggkwgVbfybsc=\",\n name: \"UPDATE_NODE\",\n description: \"\",\n schema:\n \"input UpdateNodeInput {\\n id: ID!\\n parentFolder: ID\\n name: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"vnQ7OB5b3wGLgjhbgJqAIpA+JLE=\",\n name: \"COPY_NODE\",\n description: \"\",\n schema:\n \"input CopyNodeInput {\\n srcId: ID!\\n targetId: ID!\\n targetName: String\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"VNyiD/sNGzk6k9A1Qe7s8dmrJxA=\",\n name: \"MOVE_NODE\",\n description: \"\",\n schema:\n \"input MoveNodeInput {\\n srcFolder: ID!\\n targetParentFolder: ID\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"0dHwHlxOM9x0vMZ+gLnKxf2qTEo=\",\n name: \"Drive\",\n description: \"\",\n operations: [\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z1dsU=\",\n name: \"SET_DRIVE_NAME\",\n description: \"\",\n schema: \"input SetDriveNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"SET_DRIVE_ICON\",\n description: \"\",\n schema: \"input SetDriveIconInput {\\n icon: String\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z2dsU=\",\n name: \"SET_SHARING_TYPE\",\n description: \"\",\n schema: \"input SetSharingTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z3dsU=\",\n name: \"SET_AVAILABLE_OFFLINE\",\n description: \"\",\n schema:\n \"input SetAvailableOfflineInput {\\n availableOffline: Boolean!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z9dsU=\",\n name: \"ADD_LISTENER\",\n description: \"\",\n schema:\n \"input ListenerFilterInput {\\n documentType: [String!]\\n documentId: [ID!]\\n scope: [String!]\\n branch: [String!]\\n}\\n\\ninput ListenerCallInfoInput {\\n transmitterType: TransmitterType\\n name: String\\n data: String\\n}\\n\\ninput ListenerInput {\\n listenerId: ID!\\n label: String\\n block: Boolean!\\n system: Boolean!\\n filter: ListenerFilterInput!\\n callInfo: ListenerCallInfoInput\\n}\\n\\ninput AddListenerInput {\\n listener: ListenerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z10dsU=\",\n name: \"REMOVE_LISTENER\",\n description: \"\",\n schema: \"input RemoveListenerInput {\\n listenerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z20dsU=\",\n name: \"ADD_TRIGGER\",\n description: \"\",\n schema:\n \"input PullResponderTriggerDataInput {\\n listenerId: ID!\\n url: String!\\n interval: String!\\n}\\n\\ninput TriggerInput {\\n id: ID!\\n type: TriggerType!\\n data: PullResponderTriggerDataInput\\n}\\n\\ninput AddTriggerInput {\\n trigger: TriggerInput!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n {\n id: \"qGCiPGpTt/cyz3HzyrBn92z30dsU=\",\n name: \"REMOVE_TRIGGER\",\n description: \"\",\n schema: \"input RemoveTriggerInput {\\n triggerId: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"local\",\n },\n ],\n },\n ],\n },\n ],\n};\n","export const driveDocumentType = \"powerhouse/document-drive\";\n","import { z } from \"zod\";\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"../../document-model/document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport {\n DocumentDriveLocalStateSchema,\n DocumentDriveStateSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDriveDocument, DocumentDrivePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a Drive document */\nexport const DriveDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(driveDocumentType),\n});\n\n/** Schema for validating the state object of a Drive document */\nexport const DrivePHStateSchema = BaseDocumentStateSchema.extend({\n global: DocumentDriveStateSchema(),\n local: DocumentDriveLocalStateSchema(),\n});\n\nexport const DriveDocumentSchema = z.object({\n header: DriveDocumentHeaderSchema,\n state: DrivePHStateSchema,\n initialState: DrivePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a Drive document state object */\nexport function isDriveState(state: unknown): state is DocumentDrivePHState {\n return DrivePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a Drive document state object */\nexport function assertIsDriveState(\n state: unknown,\n): asserts state is DocumentDrivePHState {\n DrivePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a Drive document */\nexport function isDriveDocument(\n document: unknown,\n): document is DocumentDriveDocument {\n return DriveDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a Drive document */\nexport function assertIsDriveDocument(\n document: unknown,\n): asserts document is DocumentDriveDocument {\n DriveDocumentSchema.parse(document);\n}\n","/**\n * Factory methods for creating DocumentDriveDocument instances\n */\n\nimport {\n createBaseState,\n defaultBaseState,\n type PHBaseState,\n} from \"../../document-model/state.js\";\nimport type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n DocumentDrivePHState,\n} from \"./types.js\";\n\nexport function defaultGlobalState(): DocumentDriveGlobalState {\n return {\n icon: null,\n name: \"\",\n nodes: [],\n };\n}\n\nexport function defaultLocalState(): DocumentDriveLocalState {\n return {\n availableOffline: false,\n listeners: [],\n sharingType: null,\n triggers: [],\n };\n}\n\nexport function defaultPHState(): DocumentDrivePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<DocumentDriveGlobalState>,\n): DocumentDriveGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n } as DocumentDriveGlobalState;\n}\n\nexport function createLocalState(\n state?: Partial<DocumentDriveLocalState>,\n): DocumentDriveLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as DocumentDriveLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<DocumentDriveGlobalState>,\n localState?: Partial<DocumentDriveLocalState>,\n): DocumentDrivePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { Listener, Trigger } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveDriveOperations } from \"../../gen/drive/actions.js\";\n\nexport const driveReducer: DocumentDriveDriveOperations = {\n setDriveNameOperation(state, action, dispatch) {\n state.name = action.input.name;\n },\n setDriveIconOperation(state, action, dispatch) {\n state.icon = action.input.icon ?? null;\n },\n setSharingTypeOperation(state, action, dispatch) {\n state.sharingType = action.input.type;\n },\n setAvailableOfflineOperation(state, action, dispatch) {\n state.availableOffline = action.input.availableOffline;\n },\n addListenerOperation(state, action, dispatch) {\n const { listener: input } = action.input;\n if (state.listeners.find((l) => l.listenerId === input.listenerId)) {\n throw new Error(`A listener with Id: ${input.listenerId} already exists`);\n }\n // Convert InputMaybe (undefined | null | T) to Maybe (null | T)\n const listener: Listener = {\n listenerId: input.listenerId,\n label: input.label ?? null,\n block: input.block,\n system: input.system,\n filter: {\n documentType: input.filter.documentType ?? null,\n documentId: input.filter.documentId ?? null,\n scope: input.filter.scope ?? null,\n branch: input.filter.branch ?? null,\n },\n callInfo: input.callInfo\n ? {\n transmitterType: input.callInfo.transmitterType ?? null,\n name: input.callInfo.name ?? null,\n data: input.callInfo.data ?? null,\n }\n : null,\n };\n state.listeners.push(listener);\n },\n removeListenerOperation(state, action, dispatch) {\n state.listeners = state.listeners.filter(\n (listener) => listener.listenerId !== action.input.listenerId,\n );\n },\n addTriggerOperation(state, action, dispatch) {\n const { trigger: input } = action.input;\n if (state.triggers.find((t) => t.id === input.id)) {\n throw new Error(`A trigger with Id: ${input.id} already exists`);\n }\n // Convert InputMaybe to Maybe - PullResponderTriggerData has all required fields so spread works\n const trigger: Trigger = {\n id: input.id,\n type: input.type,\n data: input.data ? { ...input.data } : null,\n };\n state.triggers.push(trigger);\n },\n removeTriggerOperation(state, action, dispatch) {\n state.triggers = state.triggers.filter(\n (trigger) => trigger.id !== action.input.triggerId,\n );\n },\n};\n","import type {\n CopyNodeInput,\n FileNode,\n FolderNode,\n Node,\n} from \"../gen/schema/types.js\";\nimport type {\n GenerateNodesCopyIdGenerator,\n GenerateNodesCopySrc,\n} from \"./types.js\";\nimport { isDraft, original } from \"mutative\";\n\nexport function isFileNode(node: Node): node is FileNode {\n return node.kind === \"file\";\n}\n\nexport function isFolderNode(node: Node): node is FolderNode {\n return node.kind === \"folder\";\n}\n\nexport function getAncestors(node: Node, allNodes: Node[]): Node[] {\n if (!node.parentFolder) {\n return [];\n } else {\n const parentNode = allNodes.find((_node) => _node.id === node.parentFolder);\n if (!parentNode) {\n throw new Error(`Parent node with id ${node.parentFolder} not found`);\n }\n return [parentNode, ...getAncestors(parentNode, allNodes)];\n }\n}\n\nexport function getDescendants(node: Node, allNodes: Node[]): Node[] {\n const children = allNodes.filter((_node) => _node.parentFolder === node.id);\n const descendants = children.map((child) => getDescendants(child, allNodes));\n return [...children, ...descendants.flat()];\n}\n\n/**\n * Generates a copy of nodes based on the provided source and target information.\n * @param src - The source information for generating the copy.\n * @param idGenerator - The function used to generate new IDs for the copied nodes.\n * @param nodes - The array of nodes to copy from.\n * @returns An array of copied nodes with updated IDs and parent folders.\n * @throws Error if the root node with the specified ID is not found.\n */\nexport function generateNodesCopy(\n src: GenerateNodesCopySrc,\n idGenerator: GenerateNodesCopyIdGenerator,\n nodes: Node[],\n): CopyNodeInput[] {\n const rootNode = nodes.find((node) => node.id === src.srcId);\n\n if (!rootNode) {\n throw new Error(`Node with id ${src.srcId} not found`);\n }\n\n const nodesToCopy = [\n {\n ...rootNode,\n name: src.targetName || rootNode.name,\n parentFolder: src.targetParentFolder || null,\n },\n ...getDescendants(rootNode, nodes),\n ];\n\n const ids: Record<string, string | undefined> = {};\n\n // Add targetParentFolder to ids so that is not replaced by a new id\n if (src.targetParentFolder) {\n ids[src.targetParentFolder] = src.targetParentFolder;\n }\n\n const getNewNodeId = (node: Node): string => {\n let newId = ids[node.id];\n\n if (!newId) {\n const oldId = node.id;\n newId = idGenerator(node);\n ids[oldId] = newId;\n }\n\n return newId;\n };\n\n const copyNodesInput = nodesToCopy.map<CopyNodeInput>((node) => ({\n srcId: node.id,\n targetId: getNewNodeId(node),\n targetName: node.name,\n targetParentFolder: node.parentFolder ? ids[node.parentFolder] : null,\n }));\n\n return copyNodesInput;\n}\n\nexport function getNextCopyNumber(\n files: string[],\n baseFilename: string,\n): number {\n let maxNumber = 0; // Start by assuming no copies exist\n\n // Regex to find files that match the base filename followed by \" (copy)\" and possibly a number\n const regex = new RegExp(\n `^${escapeRegExp(baseFilename)} \\\\(copy\\\\)(?: (\\\\d+))?$`,\n );\n\n for (const file of files) {\n const match = file.match(regex);\n if (match) {\n const number = match[1] ? parseInt(match[1], 10) : 1;\n if (number > maxNumber) {\n maxNumber = number;\n }\n }\n }\n\n return maxNumber + 1;\n}\n\nexport function escapeRegExp(string: string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * The node list as plain objects for read-only scans. Inside a mutative draft\n * this returns the untouched base list, so a find or filter over it does not\n * create a child draft per element it visits. Callers must read before they\n * write: the base list does not see mutations made earlier in the same action.\n */\nexport function readNodes(state: { nodes: Node[] }): Node[] {\n return isDraft(state) ? original(state).nodes : state.nodes;\n}\n\n/**\n * The node list with a node added, ordered by id. The list is built and sorted\n * as plain objects, so inside a mutative draft the comparator never reads an\n * element through the draft proxy. Pass the list read with readNodes to get\n * that benefit; passing the draft's own list is correct but slow.\n */\nexport function insertNodeSorted(nodes: readonly Node[], node: Node): Node[] {\n return [...nodes, node].sort((a, b) => a.id.localeCompare(b.id));\n}\n\nexport function handleTargetNameCollisions(params: {\n nodes: Node[];\n targetParentFolder: string | null;\n srcName: string;\n srcKind: \"file\" | \"folder\";\n}) {\n const { nodes, targetParentFolder, srcName, srcKind } = params;\n\n const targetNodeChildrenNames = nodes\n .filter((node) =>\n targetParentFolder === \"\"\n ? node.parentFolder === null\n : node.parentFolder === targetParentFolder,\n )\n .filter((node) => node.kind === srcKind)\n .map((node) => node.name);\n\n const targetHasNodesWithSameName = targetNodeChildrenNames.includes(srcName);\n\n const targetName = targetHasNodesWithSameName\n ? `${srcName} (copy) ${getNextCopyNumber(targetNodeChildrenNames, srcName)}`\n : srcName;\n\n return targetName;\n}\n\nexport const isValidName = (name: string) => {\n // Names are display labels (URLs use a slugified id), so allow any unicode;\n // reject only empty/whitespace-only names and control characters.\n // eslint-disable-next-line no-control-regex\n return name.trim().length > 0 && !/[\\u0000-\\u001F\\u007F]/.test(name);\n};\n","/**\n * This is a scaffold file meant for customization:\n * - modify it by implementing the reducer functions\n * - delete the file and run the code generator again to have it reset\n */\n\nimport type { FileNode } from \"../../gen/schema/types.js\";\nimport type { DocumentDriveNodeOperations } from \"../../gen/node/actions.js\";\nimport {\n getDescendants,\n handleTargetNameCollisions,\n insertNodeSorted,\n isFileNode,\n isFolderNode,\n isValidName,\n readNodes,\n} from \"../utils.js\";\n\nexport const nodeReducer: DocumentDriveNodeOperations = {\n addFileOperation(state, action, dispatch) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"file\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n const fileNode: FileNode = {\n id: action.input.id,\n name,\n kind: \"file\",\n parentFolder: action.input.parentFolder ?? null,\n documentType: action.input.documentType,\n };\n state.nodes = insertNodeSorted(nodes, fileNode);\n\n dispatch?.({\n type: \"CREATE_CHILD_DOCUMENT\",\n input: {\n id: action.input.id,\n documentType: action.input.documentType,\n },\n });\n },\n addFolderOperation(state, action) {\n const nodes = readNodes(state);\n if (nodes.find((node) => node.id === action.input.id)) {\n throw new Error(`Node with id ${action.input.id} already exists!`);\n }\n\n if (!isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n const name = handleTargetNameCollisions({\n nodes,\n srcName: action.input.name,\n srcKind: \"folder\",\n targetParentFolder: action.input.parentFolder || null,\n });\n\n state.nodes = insertNodeSorted(nodes, {\n ...action.input,\n name,\n kind: \"folder\",\n parentFolder: action.input.parentFolder ?? null,\n });\n },\n deleteNodeOperation(state, action, dispatch) {\n const node = state.nodes.find((node) => node.id === action.input.id);\n if (!node) {\n throw new Error(`Node with id ${action.input.id} not found`);\n }\n const descendants = getDescendants(node, state.nodes);\n state.nodes = state.nodes.filter(\n (node) =>\n node.id !== action.input.id &&\n !descendants.find((descendant) => descendant.id === node.id),\n );\n\n [node, ...descendants]\n .filter((node) => isFileNode(node))\n .forEach((node) => {\n dispatch?.({\n type: \"DELETE_CHILD_DOCUMENT\",\n input: {\n id: node.id,\n },\n });\n });\n },\n updateFileOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n state.nodes = state.nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: state.nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: \"file\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n documentType:\n action.input.documentType ?? (node as FileNode).documentType,\n },\n }\n : node,\n );\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n updateNodeOperation(state, action) {\n if (action.input.name && !isValidName(action.input.name)) {\n throw new Error(\n `Invalid name: '${action.input.name}'. Names must not be empty or contain control characters.`,\n );\n }\n\n state.nodes = state.nodes.map((node) =>\n node.id === action.input.id\n ? {\n ...node,\n ...{\n name: handleTargetNameCollisions({\n nodes: state.nodes.filter((n) => n.id !== action.input.id),\n srcName: action.input.name ?? node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder:\n action.input.parentFolder ?? node.parentFolder,\n }),\n parentFolder:\n action.input.parentFolder === null ? null : node.parentFolder,\n },\n }\n : node,\n );\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n copyNodeOperation(state, action, dispatch) {\n const node = state.nodes.find((node) => node.id === action.input.srcId);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcId} not found`);\n }\n\n const duplicatedNode = state.nodes.find(\n (node) => node.id === action.input.targetId,\n );\n\n if (duplicatedNode) {\n throw new Error(`Node with id ${action.input.targetId} already exists`);\n }\n\n const name = handleTargetNameCollisions({\n nodes: state.nodes,\n srcName: action.input.targetName || node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n const newNode = {\n ...node,\n id: action.input.targetId,\n slug: action.input.targetId,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n\n state.nodes.push(newNode);\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n\n const isFile = isFileNode(newNode);\n if (isFile) {\n dispatch?.({\n type: \"COPY_CHILD_DOCUMENT\",\n input: {\n id: action.input.srcId,\n newId: action.input.targetId,\n },\n });\n }\n },\n moveNodeOperation(state, action) {\n if (action.input.srcFolder === action.input.targetParentFolder) {\n throw new Error(\n \"Circular Reference Error: Attempting to move a node to its current parent folder\",\n );\n }\n\n const node = state.nodes.find((node) => node.id === action.input.srcFolder);\n\n if (!node) {\n throw new Error(`Node with id ${action.input.srcFolder} not found`);\n }\n\n const name = handleTargetNameCollisions({\n nodes: state.nodes,\n srcName: node.name,\n srcKind: node.kind === \"file\" ? \"file\" : \"folder\",\n targetParentFolder: action.input.targetParentFolder || null,\n });\n\n if (isFolderNode(node)) {\n const descendants = getDescendants(node, state.nodes);\n // throw error if moving a folder to one of its descendants\n if (\n descendants.find(\n (descendant) => descendant.id === action.input.targetParentFolder,\n )\n ) {\n throw new Error(\n \"Circular Reference Error: Cannot move a folder to one of its descendants\",\n );\n }\n }\n\n state.nodes = state.nodes.map((node) => {\n if (node.id === action.input.srcFolder) {\n return {\n ...node,\n name,\n parentFolder: action.input.targetParentFolder || null,\n };\n }\n\n return node;\n });\n\n // deterministically sort nodes by id\n state.nodes.sort((a, b) => a.id.localeCompare(b.id));\n },\n};\n","import { isDocumentAction } from \"../../document-model/documents.js\";\nimport { createReducer } from \"../../document-model/reducer.js\";\nimport type { Reducer, StateReducer } from \"../../document-model/types.js\";\nimport { driveReducer } from \"../src/reducers/drive.js\";\nimport { nodeReducer } from \"../src/reducers/node.js\";\nimport {\n AddFileInputSchema,\n AddFolderInputSchema,\n AddListenerInputSchema,\n AddTriggerInputSchema,\n CopyNodeInputSchema,\n DeleteNodeInputSchema,\n MoveNodeInputSchema,\n RemoveListenerInputSchema,\n RemoveTriggerInputSchema,\n SetAvailableOfflineInputSchema,\n SetDriveIconInputSchema,\n SetDriveNameInputSchema,\n SetSharingTypeInputSchema,\n UpdateFileInputSchema,\n UpdateNodeInputSchema,\n} from \"./schema/zod.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\n\nconst driveStateReducer: StateReducer<DocumentDrivePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n\n const typedAction = action as any;\n switch (typedAction.type) {\n case \"ADD_FILE\":\n AddFileInputSchema().parse(typedAction.input);\n nodeReducer.addFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_FOLDER\":\n AddFolderInputSchema().parse(typedAction.input);\n nodeReducer.addFolderOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"DELETE_NODE\":\n DeleteNodeInputSchema().parse(typedAction.input);\n nodeReducer.deleteNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_FILE\":\n UpdateFileInputSchema().parse(typedAction.input);\n nodeReducer.updateFileOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"UPDATE_NODE\":\n UpdateNodeInputSchema().parse(typedAction.input);\n nodeReducer.updateNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"COPY_NODE\":\n CopyNodeInputSchema().parse(typedAction.input);\n nodeReducer.copyNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"MOVE_NODE\":\n MoveNodeInputSchema().parse(typedAction.input);\n nodeReducer.moveNodeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_NAME\":\n SetDriveNameInputSchema().parse(typedAction.input);\n driveReducer.setDriveNameOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_DRIVE_ICON\":\n SetDriveIconInputSchema().parse(typedAction.input);\n driveReducer.setDriveIconOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_SHARING_TYPE\":\n SetSharingTypeInputSchema().parse(typedAction.input);\n driveReducer.setSharingTypeOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"SET_AVAILABLE_OFFLINE\":\n SetAvailableOfflineInputSchema().parse(typedAction.input);\n driveReducer.setAvailableOfflineOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_LISTENER\":\n AddListenerInputSchema().parse(typedAction.input);\n driveReducer.addListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_LISTENER\":\n RemoveListenerInputSchema().parse(typedAction.input);\n driveReducer.removeListenerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"ADD_TRIGGER\":\n AddTriggerInputSchema().parse(typedAction.input);\n driveReducer.addTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n case \"REMOVE_TRIGGER\":\n RemoveTriggerInputSchema().parse(typedAction.input);\n driveReducer.removeTriggerOperation(\n (state as any)[typedAction.scope],\n action as any,\n dispatch,\n );\n break;\n\n default:\n return state;\n }\n};\n\nexport const driveDocumentReducer: Reducer<DocumentDrivePHState> =\n createReducer<DocumentDrivePHState>(driveStateReducer);\n","import type {\n DocumentDriveGlobalState,\n DocumentDriveLocalState,\n} from \"./schema/types.js\";\nimport type { DocumentDrivePHState } from \"./types.js\";\nimport type {\n AssertIsDocumentOfType,\n AssertIsStateOfType,\n CreateDocument,\n CreateState,\n IsDocumentOfType,\n IsStateOfType,\n LoadFromInput,\n SaveToFileHandle,\n} from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n} from \"document-model\";\nimport {\n assertIsDriveDocument,\n assertIsDriveState,\n isDriveDocument,\n isDriveState,\n} from \"./document-schema.js\";\nimport { driveDocumentType } from \"./document-type.js\";\nimport { driveDocumentReducer } from \"./reducer.js\";\n\nexport const initialGlobalState: DocumentDriveGlobalState = {\n name: \"\",\n nodes: [],\n icon: null,\n};\nexport const initialLocalState: DocumentDriveLocalState = {\n listeners: [],\n triggers: [],\n sharingType: \"private\",\n availableOffline: false,\n};\n\nexport const driveCreateState: CreateState<DocumentDrivePHState> = (\n state: Partial<DocumentDrivePHState> | undefined,\n) => {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n};\n\nexport const driveCreateDocument: CreateDocument<DocumentDrivePHState> = (\n state,\n) => {\n return baseCreateDocument(driveCreateState, state, driveDocumentType);\n};\n\nexport const driveSaveToFileHandle: SaveToFileHandle = (document, input) => {\n return baseSaveToFileHandle(document, input);\n};\n\nexport const driveLoadFromInput: LoadFromInput<DocumentDrivePHState> = (\n input,\n) => {\n return baseLoadFromInput(input, driveDocumentReducer);\n};\n\nexport const isStateOfType: IsStateOfType<DocumentDrivePHState> = (state) => {\n return isDriveState(state);\n};\n\nexport const assertIsStateOfType: AssertIsStateOfType<DocumentDrivePHState> = (\n state,\n) => {\n assertIsDriveState(state);\n};\n\nexport const isDocumentOfType: IsDocumentOfType<DocumentDrivePHState> = (\n document,\n) => {\n return isDriveDocument(document);\n};\n\nexport const assertIsDocumentOfType: AssertIsDocumentOfType<\n DocumentDrivePHState\n> = (document) => {\n assertIsDriveDocument(document);\n};\n","import { createState, defaultBaseState } from \"../document-model/state.js\";\nimport { driveDocumentFileExtension } from \"./constants.js\";\nimport * as actions from \"./gen/creators.js\";\nimport { driveDocumentModel } from \"./gen/document-model.js\";\nimport { driveDocumentReducer } from \"./gen/reducer.js\";\nimport {\n assertIsDocumentOfType,\n assertIsStateOfType,\n driveCreateDocument,\n driveCreateState,\n driveLoadFromInput,\n driveSaveToFileHandle,\n isDocumentOfType,\n isStateOfType,\n} from \"./gen/utils.js\";\nimport type { DriveDocumentModelModule } from \"./types.js\";\nexport const driveDocumentModelModule: DriveDocumentModelModule = {\n actions,\n reducer: driveDocumentReducer,\n documentModel: createState(defaultBaseState(), driveDocumentModel),\n utils: {\n fileExtension: driveDocumentFileExtension,\n createState: driveCreateState,\n createDocument: driveCreateDocument,\n loadFromInput: driveLoadFromInput,\n saveToFileHandle: driveSaveToFileHandle,\n isStateOfType,\n assertIsStateOfType,\n isDocumentOfType,\n assertIsDocumentOfType,\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAa,6BAA6B;;;ACuC1C,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0B,EACpC,KAAK,CACL,QAAQ,MAAM,oBAAoB,EAAE,CAAC;AAExC,MAAa,wBAAwB,EAAE,KAAK;CAC1C;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAa,oBAAoB,EAAE,KAAK,CAAC,gBAAgB,CAAC;AAE1D,SAAgB,qBAA4D;AAC1E,QAAO,EAAE,OAAO;EACd,cAAc,EAAE,QAAQ;EACxB,IAAI,EAAE,QAAQ;EACd,MAAM,EAAE,QAAQ;EAChB,cAAc,EAAE,QAAQ,CAAC,SAAS;EACnC,CAAC;;AAGJ,SAAgB,uBAEd;AACA,QAAO,EAAE,OAAO;EACd,IAAI,EAAE,QAAQ;EACd,MAAM,EAAE,QAAQ;EAChB,cAAc,EAAE,QAAQ,CAAC,SAAS;EACnC,CAAC;;AAGJ,SAAgB,yBAEd;AACA,QAAO,EAAE,OAAO,EACd,UAAU,qBAAqB,EAChC,CAAC;;AAGJ,SAAgB,wBAEd;AACA,QAAO,EAAE,OAAO,EACd,SAAS,oBAAoB,EAC9B,CAAC;;AAGJ,SAAgB,sBAA8D;AAC5E,QAAO,EAAE,OAAO;EAC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ACvEjC,MAAa,2BAAqD;CAChE,SAAA;CACA,SAAS;CACT,eAAeA,cAAY,kBAAkB,EAAE,mBAAmB;CAClE,OAAO;EACL,eAAe;EACf,aAAa;EACb,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB;EACA;EACA;EACA;EACD;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/shared",
3
- "version": "6.2.3-dev.3",
3
+ "version": "6.2.3-dev.5",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {