@powerhousedao/connect 1.0.0-dev.239 → 1.0.0-dev.241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{app-BER6qvV4.js → app-Cx6yVoWZ.js} +39 -36
- package/dist/assets/{app-CSi6MS9b.css → app-OVm0Zlli.css} +5 -4
- package/dist/assets/{app-loader-B1j0wjOh.js → app-loader-CAYRtGE1.js} +97 -50
- package/dist/assets/{app-loader-9W65A3zy.css → app-loader-Vi763_LE.css} +4 -3
- package/dist/assets/{ccip-IjzAvzNF.js → ccip-R0KrJfPl.js} +3 -3
- package/dist/assets/{content-u99MkPmr.js → content-CqOHLc-O.js} +3 -3
- package/dist/assets/{index-JG4cqDHe.js → index-C4nkPxsU.js} +4 -4
- package/dist/assets/{index-YszPpMJO.js → index-DsyWXJcL.js} +3 -3
- package/dist/assets/{index-DsshaiFd.js → index-svE1s-4x.js} +244 -7
- package/dist/assets/{main.DeO3pt4e.js → main.BHov_sDD.js} +1 -1
- package/dist/assets/{style-ICX7vBg_.css → style-D4JhTt_m.css} +5 -4
- package/dist/index.html +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-2E6C3NB7.js → chunk-DO4ZK6HR.js} +70 -35
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-F4K6ICY4.js → chunk-JEDWG5AH.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-RSZCDZGH.js → chunk-SHKY62YH.js} +24 -12
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-JWR2PSS2.js → chunk-UJU4RHH3.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/{chunk-NUW2A4R5.js → chunk-YEIWJWUR.js} +1 -1
- package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
- package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
- package/dist/modules/@powerhousedao/reactor-browser/index.js +5 -5
- package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
- package/dist/vite-envs.sh +1 -1
- package/package.json +7 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { t as twMerge, a5 as clsx, a6 as get, a7 as set, a8 as appendErrors, a9 as useFormContext, aa as Primitive, ab as cva, ac as FormProvider, ad as Controller, ae as Slot, af as useForm, ag as Root2, ah as List, ai as Trigger, aj as Content, ak as setModelName, al as setModelId, am as setModelDescription, an as setModelExtension, ao as setAuthorName, ap as setAuthorWebsite, aq as setStateSchema, ar as setInitialState, as as addModule, at as setModuleName, au as deleteModule, av as addOperation, aw as setOperationName, ax as setOperationSchema, ay as setOperationDescription, az as deleteOperation, aA as addOperationError, aB as deleteOperationError, aC as setOperationErrorName } from "./app-
|
|
3
|
-
import { ba as inspect$1, bb as GraphQLError$1, bc as getNamedType, bd as invariant$2, be as isInputObjectType, bf as isScalarType, bg as isObjectType, bh as isInterfaceType, bi as isUnionType, bj as isEnumType, bk as print, bl as isPrintableAsBlockString, bm as Kind, bn as astFromValue$1, bo as DEFAULT_DEPRECATION_REASON, bp as isSpecifiedDirective, bq as isSpecifiedScalarType, br as isIntrospectionType, bs as z, bt as GraphQLScalarType, Z as pascalCase, bu as parse, bv as visit, bw as buildASTSchema, bx as extendSchema, by as getNullableType, bz as isListType, $ as getDefaultExportFromCjs, bA as snakeCase, bB as constantCase, bC as isAbstractType, bD as BREAK, bE as GraphQLInputObjectType, bF as GraphQLList, bG as GraphQLEnumType, bH as GraphQLObjectType, bI as GraphQLInterfaceType, bJ as SchemaMetaFieldDef, bK as TypeMetaFieldDef, bL as TypeNameMetaFieldDef, bM as isCompositeType, bN as isOutputType, bO as isInputType, bP as GraphQLBoolean, bQ as assertAbstractType, bR as doTypesOverlap, bS as DirectiveLocation, bT as specifiedRules$1, bU as NoUnusedFragmentsRule$1, bV as ExecutableDefinitionsRule$1, bW as validate$2, bX as validateSchema, bY as GraphQLID, bZ as GraphQLString, b_ as GraphQLFloat, b$ as GraphQLInt, c0 as GraphQLDirective, c1 as GraphQLUnionType, c2 as isNonNullType, c3 as GraphQLNonNull, c4 as isNamedType, c5 as isLeafType, c6 as GraphQLSchema, c7 as buildSchema, c8 as sentenceCase, am as hashKey } from "./app-loader-
|
|
2
|
+
import { t as twMerge, a5 as clsx, a6 as get, a7 as set, a8 as appendErrors, a9 as useFormContext, aa as Primitive, ab as cva, ac as FormProvider, ad as Controller, ae as Slot, af as useForm, ag as Root2, ah as List, ai as Trigger, aj as Content, ak as setModelName, al as setModelId, am as setModelDescription, an as setModelExtension, ao as setAuthorName, ap as setAuthorWebsite, aq as setStateSchema, ar as setInitialState, as as addModule, at as setModuleName, au as deleteModule, av as addOperation, aw as setOperationName, ax as setOperationSchema, ay as setOperationDescription, az as deleteOperation, aA as addOperationError, aB as deleteOperationError, aC as setOperationErrorName } from "./app-Cx6yVoWZ.js";
|
|
3
|
+
import { ba as inspect$1, bb as GraphQLError$1, bc as getNamedType, bd as invariant$2, be as isInputObjectType, bf as isScalarType, bg as isObjectType, bh as isInterfaceType, bi as isUnionType, bj as isEnumType, bk as print, bl as isPrintableAsBlockString, bm as Kind, bn as astFromValue$1, bo as DEFAULT_DEPRECATION_REASON, bp as isSpecifiedDirective, bq as isSpecifiedScalarType, br as isIntrospectionType, bs as z, bt as GraphQLScalarType, Z as pascalCase, bu as parse, bv as visit, bw as buildASTSchema, bx as extendSchema, by as getNullableType, bz as isListType, $ as getDefaultExportFromCjs, bA as snakeCase, bB as constantCase, bC as isAbstractType, bD as BREAK, bE as GraphQLInputObjectType, bF as GraphQLList, bG as GraphQLEnumType, bH as GraphQLObjectType, bI as GraphQLInterfaceType, bJ as SchemaMetaFieldDef, bK as TypeMetaFieldDef, bL as TypeNameMetaFieldDef, bM as isCompositeType, bN as isOutputType, bO as isInputType, bP as GraphQLBoolean, bQ as assertAbstractType, bR as doTypesOverlap, bS as DirectiveLocation, bT as specifiedRules$1, bU as NoUnusedFragmentsRule$1, bV as ExecutableDefinitionsRule$1, bW as validate$2, bX as validateSchema, bY as GraphQLID, bZ as GraphQLString, b_ as GraphQLFloat, b$ as GraphQLInt, c0 as GraphQLDirective, c1 as GraphQLUnionType, c2 as isNonNullType, c3 as GraphQLNonNull, c4 as isNamedType, c5 as isLeafType, c6 as GraphQLSchema, c7 as buildSchema, c8 as sentenceCase, am as hashKey } from "./app-loader-CAYRtGE1.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import React__default, { forwardRef, useRef, useCallback, useImperativeHandle, useEffect, useState, createContext, useContext, memo, useId, useMemo } from "react";
|
|
6
|
-
import "./main.
|
|
6
|
+
import "./main.BHov_sDD.js";
|
|
7
7
|
import "@powerhousedao/reactor-browser";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
|
|
@@ -299,6 +299,223 @@ function printDescription(def, indentation = "", firstInBlock = true) {
|
|
|
299
299
|
const prefix = indentation && !firstInBlock ? "\n" + indentation : indentation;
|
|
300
300
|
return prefix + blockString2.replace(/\n/g, "\n" + indentation) + "\n";
|
|
301
301
|
}
|
|
302
|
+
const type$g = "{ unit?: string, value?: number }";
|
|
303
|
+
const typedef$f = "scalar Amount";
|
|
304
|
+
const schema$g = z.object({
|
|
305
|
+
unit: z.string().optional(),
|
|
306
|
+
value: z.number().finite()
|
|
307
|
+
});
|
|
308
|
+
const stringSchema$f = "z.object({ unit: z.string().optional(), value: z.number().finite() })";
|
|
309
|
+
const amountValidation = (value) => {
|
|
310
|
+
if (typeof value !== "object" || !value) {
|
|
311
|
+
throw new GraphQLError$1(`Invalid Amount value: ${JSON.stringify(value)}`);
|
|
312
|
+
}
|
|
313
|
+
const result = schema$g.safeParse(value);
|
|
314
|
+
if (result.success)
|
|
315
|
+
return result.data;
|
|
316
|
+
throw new GraphQLError$1(result.error.message);
|
|
317
|
+
};
|
|
318
|
+
const config$g = {
|
|
319
|
+
name: "Amount",
|
|
320
|
+
description: "A custom scalar that represents a currency amount with its currency type",
|
|
321
|
+
serialize: amountValidation,
|
|
322
|
+
parseValue: amountValidation,
|
|
323
|
+
parseLiteral: (ast2) => {
|
|
324
|
+
var _a2;
|
|
325
|
+
if (ast2.kind !== Kind.OBJECT) {
|
|
326
|
+
throw new GraphQLError$1("Value must be an object", { nodes: ast2 });
|
|
327
|
+
}
|
|
328
|
+
const unitField = ast2.fields.find((f) => f.name.value === "unit");
|
|
329
|
+
const valueField = ast2.fields.find((f) => f.name.value === "value");
|
|
330
|
+
if (unitField && unitField.value.kind !== Kind.STRING) {
|
|
331
|
+
throw new GraphQLError$1("unit must be a valid string value", {
|
|
332
|
+
nodes: ast2
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (!valueField || valueField.value.kind !== Kind.FLOAT) {
|
|
336
|
+
throw new GraphQLError$1("value must be a valid float value", {
|
|
337
|
+
nodes: ast2
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
const value = {
|
|
341
|
+
unit: (_a2 = unitField == null ? void 0 : unitField.value) == null ? void 0 : _a2.value,
|
|
342
|
+
value: parseFloat(valueField.value.value)
|
|
343
|
+
};
|
|
344
|
+
return amountValidation(value);
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
const scalar$f = new GraphQLScalarType(config$g);
|
|
348
|
+
const Amount = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
349
|
+
__proto__: null,
|
|
350
|
+
config: config$g,
|
|
351
|
+
scalar: scalar$f,
|
|
352
|
+
schema: schema$g,
|
|
353
|
+
stringSchema: stringSchema$f,
|
|
354
|
+
type: type$g,
|
|
355
|
+
typedef: typedef$f
|
|
356
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
357
|
+
const type$f = "{ unit: string, value: number }";
|
|
358
|
+
const typedef$e = "scalar Amount_Crypto";
|
|
359
|
+
const schema$f = z.object({
|
|
360
|
+
unit: z.string(),
|
|
361
|
+
value: z.number().finite()
|
|
362
|
+
});
|
|
363
|
+
const stringSchema$e = "z.object({ unit: z.string(), value: z.number().finite() })";
|
|
364
|
+
const amountCryptoValidation = (value) => {
|
|
365
|
+
if (typeof value !== "object" || !value) {
|
|
366
|
+
throw new GraphQLError$1(`Invalid Amount Crypto value: ${JSON.stringify(value)}`);
|
|
367
|
+
}
|
|
368
|
+
const result = schema$f.safeParse(value);
|
|
369
|
+
if (result.success)
|
|
370
|
+
return result.data;
|
|
371
|
+
throw new GraphQLError$1(result.error.message);
|
|
372
|
+
};
|
|
373
|
+
const config$f = {
|
|
374
|
+
name: "Amount_Crypto",
|
|
375
|
+
description: "A custom scalar that represents a cryptocurrency amount with its currency type",
|
|
376
|
+
serialize: amountCryptoValidation,
|
|
377
|
+
parseValue: amountCryptoValidation,
|
|
378
|
+
parseLiteral: (ast2) => {
|
|
379
|
+
if (ast2.kind !== Kind.OBJECT) {
|
|
380
|
+
throw new GraphQLError$1("Value must be an object", { nodes: ast2 });
|
|
381
|
+
}
|
|
382
|
+
const unitField = ast2.fields.find((f) => f.name.value === "unit");
|
|
383
|
+
const valueField = ast2.fields.find((f) => f.name.value === "value");
|
|
384
|
+
if (!unitField || unitField.value.kind !== Kind.STRING) {
|
|
385
|
+
throw new GraphQLError$1("unit must be a valid string value", {
|
|
386
|
+
nodes: ast2
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
if (!valueField || valueField.value.kind !== Kind.FLOAT) {
|
|
390
|
+
throw new GraphQLError$1("value must be a valid float value", {
|
|
391
|
+
nodes: ast2
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
const value = {
|
|
395
|
+
unit: unitField.value.value,
|
|
396
|
+
value: parseFloat(valueField.value.value)
|
|
397
|
+
};
|
|
398
|
+
return amountCryptoValidation(value);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
const scalar$e = new GraphQLScalarType(config$f);
|
|
402
|
+
const AmountCrypto = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
403
|
+
__proto__: null,
|
|
404
|
+
config: config$f,
|
|
405
|
+
scalar: scalar$e,
|
|
406
|
+
schema: schema$f,
|
|
407
|
+
stringSchema: stringSchema$e,
|
|
408
|
+
type: type$f,
|
|
409
|
+
typedef: typedef$e
|
|
410
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
411
|
+
const type$e = "{ unit: string, value: number }";
|
|
412
|
+
const typedef$d = "scalar Amount_Currency";
|
|
413
|
+
const schema$e = z.object({
|
|
414
|
+
unit: z.string(),
|
|
415
|
+
value: z.number().finite()
|
|
416
|
+
});
|
|
417
|
+
const stringSchema$d = "z.object({ unit: z.string(), value: z.number().finite() })";
|
|
418
|
+
const amountCurrencyValidation = (value) => {
|
|
419
|
+
if (typeof value !== "object" || !value) {
|
|
420
|
+
throw new GraphQLError$1(`Invalid Amount Currency value: ${JSON.stringify(value)}`);
|
|
421
|
+
}
|
|
422
|
+
const result = schema$e.safeParse(value);
|
|
423
|
+
if (result.success)
|
|
424
|
+
return result.data;
|
|
425
|
+
throw new GraphQLError$1(result.error.message);
|
|
426
|
+
};
|
|
427
|
+
const config$e = {
|
|
428
|
+
name: "Amount_Currency",
|
|
429
|
+
description: "A custom scalar that represents a currency amount with its currency type",
|
|
430
|
+
serialize: amountCurrencyValidation,
|
|
431
|
+
parseValue: amountCurrencyValidation,
|
|
432
|
+
parseLiteral: (ast2) => {
|
|
433
|
+
if (ast2.kind !== Kind.OBJECT) {
|
|
434
|
+
throw new GraphQLError$1("Value must be an object", { nodes: ast2 });
|
|
435
|
+
}
|
|
436
|
+
const unitField = ast2.fields.find((f) => f.name.value === "unit");
|
|
437
|
+
const valueField = ast2.fields.find((f) => f.name.value === "value");
|
|
438
|
+
if (!unitField || unitField.value.kind !== Kind.STRING) {
|
|
439
|
+
throw new GraphQLError$1("unit must be a valid string value", {
|
|
440
|
+
nodes: ast2
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
if (!valueField || valueField.value.kind !== Kind.FLOAT) {
|
|
444
|
+
throw new GraphQLError$1("value must be a valid float value", {
|
|
445
|
+
nodes: ast2
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
const value = {
|
|
449
|
+
unit: unitField.value.value,
|
|
450
|
+
value: parseFloat(valueField.value.value)
|
|
451
|
+
};
|
|
452
|
+
return amountCurrencyValidation(value);
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
const scalar$d = new GraphQLScalarType(config$e);
|
|
456
|
+
const AmountCurrency = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
457
|
+
__proto__: null,
|
|
458
|
+
config: config$e,
|
|
459
|
+
scalar: scalar$d,
|
|
460
|
+
schema: schema$e,
|
|
461
|
+
stringSchema: stringSchema$d,
|
|
462
|
+
type: type$e,
|
|
463
|
+
typedef: typedef$d
|
|
464
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
465
|
+
const type$d = "{ unit: string, value: number }";
|
|
466
|
+
const typedef$c = "scalar Amount_Fiat";
|
|
467
|
+
const schema$d = z.object({
|
|
468
|
+
unit: z.string(),
|
|
469
|
+
value: z.number().finite()
|
|
470
|
+
});
|
|
471
|
+
const stringSchema$c = "z.object({ unit: z.string(), value: z.number().finite() })";
|
|
472
|
+
const amountFiatValidation = (value) => {
|
|
473
|
+
if (typeof value !== "object" || !value) {
|
|
474
|
+
throw new GraphQLError$1(`Invalid Amount Fiat value: ${JSON.stringify(value)}`);
|
|
475
|
+
}
|
|
476
|
+
const result = schema$d.safeParse(value);
|
|
477
|
+
if (result.success)
|
|
478
|
+
return result.data;
|
|
479
|
+
throw new GraphQLError$1(result.error.message);
|
|
480
|
+
};
|
|
481
|
+
const config$d = {
|
|
482
|
+
name: "Amount_Fiat",
|
|
483
|
+
description: "A custom scalar that represents a currency amount with its currency type",
|
|
484
|
+
serialize: amountFiatValidation,
|
|
485
|
+
parseValue: amountFiatValidation,
|
|
486
|
+
parseLiteral: (ast2) => {
|
|
487
|
+
if (ast2.kind !== Kind.OBJECT) {
|
|
488
|
+
throw new GraphQLError$1("Value must be an object", { nodes: ast2 });
|
|
489
|
+
}
|
|
490
|
+
const unitField = ast2.fields.find((f) => f.name.value === "unit");
|
|
491
|
+
const valueField = ast2.fields.find((f) => f.name.value === "value");
|
|
492
|
+
if (!unitField || unitField.value.kind !== Kind.STRING) {
|
|
493
|
+
throw new GraphQLError$1("unit must be a valid string value", {
|
|
494
|
+
nodes: ast2
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
if (!valueField || valueField.value.kind !== Kind.FLOAT) {
|
|
498
|
+
throw new GraphQLError$1("value must be a valid float value", {
|
|
499
|
+
nodes: ast2
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
const value = {
|
|
503
|
+
unit: unitField.value.value,
|
|
504
|
+
value: parseFloat(valueField.value.value)
|
|
505
|
+
};
|
|
506
|
+
return amountFiatValidation(value);
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
const scalar$c = new GraphQLScalarType(config$d);
|
|
510
|
+
const AmountFiat = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
511
|
+
__proto__: null,
|
|
512
|
+
config: config$d,
|
|
513
|
+
scalar: scalar$c,
|
|
514
|
+
schema: schema$d,
|
|
515
|
+
stringSchema: stringSchema$c,
|
|
516
|
+
type: type$d,
|
|
517
|
+
typedef: typedef$c
|
|
518
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
302
519
|
const type$c = "number";
|
|
303
520
|
const typedef$b = "scalar Amount_Money";
|
|
304
521
|
const schema$c = z.number();
|
|
@@ -756,7 +973,11 @@ const resolvers = {
|
|
|
756
973
|
OLabel: scalar$2,
|
|
757
974
|
Currency: scalar$8,
|
|
758
975
|
PHID: scalar$1,
|
|
759
|
-
OID: scalar$3
|
|
976
|
+
OID: scalar$3,
|
|
977
|
+
AmountFiat: scalar$c,
|
|
978
|
+
AmountCurrency: scalar$d,
|
|
979
|
+
AmountCrypto: scalar$e,
|
|
980
|
+
Amount: scalar$f
|
|
760
981
|
};
|
|
761
982
|
const typeDefs = [
|
|
762
983
|
// export typedefs -- DO NOT REMOVE OR EDIT THIS COMMENT
|
|
@@ -771,7 +992,11 @@ const typeDefs = [
|
|
|
771
992
|
typedef$2,
|
|
772
993
|
typedef$8,
|
|
773
994
|
typedef$1,
|
|
774
|
-
typedef$3
|
|
995
|
+
typedef$3,
|
|
996
|
+
typedef$c,
|
|
997
|
+
typedef$d,
|
|
998
|
+
typedef$e,
|
|
999
|
+
typedef$f
|
|
775
1000
|
];
|
|
776
1001
|
const generatorTypeDefs = {
|
|
777
1002
|
// export generator typedefs -- DO NOT REMOVE OR EDIT THIS COMMENT
|
|
@@ -786,7 +1011,11 @@ const generatorTypeDefs = {
|
|
|
786
1011
|
[config$3.name]: type$3,
|
|
787
1012
|
[config$9.name]: type$9,
|
|
788
1013
|
[config$2.name]: type$2,
|
|
789
|
-
[config$4.name]: type$4
|
|
1014
|
+
[config$4.name]: type$4,
|
|
1015
|
+
[config$d.name]: type$d,
|
|
1016
|
+
[config$e.name]: type$e,
|
|
1017
|
+
[config$f.name]: type$f,
|
|
1018
|
+
[config$g.name]: type$g
|
|
790
1019
|
};
|
|
791
1020
|
const validationSchema = {
|
|
792
1021
|
// export validation schema -- DO NOT REMOVE OR EDIT THIS COMMENT
|
|
@@ -801,10 +1030,18 @@ const validationSchema = {
|
|
|
801
1030
|
[config$3.name]: stringSchema$2,
|
|
802
1031
|
[config$9.name]: stringSchema$8,
|
|
803
1032
|
[config$2.name]: stringSchema$1,
|
|
804
|
-
[config$4.name]: stringSchema$3
|
|
1033
|
+
[config$4.name]: stringSchema$3,
|
|
1034
|
+
[config$d.name]: stringSchema$c,
|
|
1035
|
+
[config$e.name]: stringSchema$d,
|
|
1036
|
+
[config$f.name]: stringSchema$e,
|
|
1037
|
+
[config$g.name]: stringSchema$f
|
|
805
1038
|
};
|
|
806
1039
|
const customScalars = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
807
1040
|
__proto__: null,
|
|
1041
|
+
Amount,
|
|
1042
|
+
AmountCrypto,
|
|
1043
|
+
AmountCurrency,
|
|
1044
|
+
AmountFiat,
|
|
808
1045
|
AmountMoney,
|
|
809
1046
|
AmountPercentage,
|
|
810
1047
|
AmountTokens,
|
|
@@ -99,7 +99,7 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
99
99
|
return baseModule().catch(handlePreloadError);
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
|
-
__vitePreload(() => import("./index-
|
|
102
|
+
__vitePreload(() => import("./index-DsyWXJcL.js"), true ? [] : void 0);
|
|
103
103
|
export {
|
|
104
104
|
__vitePreload as _
|
|
105
105
|
};
|
|
@@ -687,8 +687,7 @@
|
|
|
687
687
|
@layer theme, base, components, utilities;
|
|
688
688
|
@layer theme {
|
|
689
689
|
:root, :host {
|
|
690
|
-
--font-sans:
|
|
691
|
-
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
690
|
+
--font-sans: "Inter", sans-serif;
|
|
692
691
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
693
692
|
"Courier New", monospace;
|
|
694
693
|
--color-red-800: hsl(5 81% 61%);
|
|
@@ -1375,8 +1374,10 @@ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-o
|
|
|
1375
1374
|
input[type="number"] {
|
|
1376
1375
|
-moz-appearance: textfield;
|
|
1377
1376
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1377
|
+
@layer base {
|
|
1378
|
+
h1, h2, h3, h4, h5, h6, p {
|
|
1379
|
+
color: var(--color-gray-900);
|
|
1380
|
+
}
|
|
1380
1381
|
}
|
|
1381
1382
|
@layer theme, base, components, utilities;
|
|
1382
1383
|
@layer theme;
|
package/dist/index.html
CHANGED
|
@@ -97,4 +97,4 @@
|
|
|
97
97
|
"@powerhousedao/reactor-browser/utils/index": "/modules/@powerhousedao/reactor-browser/utils/index.js",
|
|
98
98
|
"@powerhousedao/reactor-browser/utils/signature": "/modules/@powerhousedao/reactor-browser/utils/signature.js"
|
|
99
99
|
}
|
|
100
|
-
}</script><script type="module" crossorigin="" src="/assets/main.
|
|
100
|
+
}</script><script type="module" crossorigin="" src="/assets/main.BHov_sDD.js"></script></head><body><div id="app"></div></body></html>
|
|
@@ -1653,58 +1653,57 @@ var ReadDocumentNotFoundError = class extends ReadDriveError {
|
|
|
1653
1653
|
var MemoryStorage = class {
|
|
1654
1654
|
documents;
|
|
1655
1655
|
drives;
|
|
1656
|
+
driveManifests;
|
|
1656
1657
|
slugToDriveId = {};
|
|
1657
1658
|
constructor() {
|
|
1658
1659
|
this.documents = {};
|
|
1659
1660
|
this.drives = {};
|
|
1661
|
+
this.driveManifests = {};
|
|
1660
1662
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1663
|
+
////////////////////////////////
|
|
1664
|
+
// IDocumentStorage
|
|
1665
|
+
////////////////////////////////
|
|
1666
|
+
exists(documentId) {
|
|
1667
|
+
return Promise.resolve(!!this.documents[documentId]);
|
|
1668
|
+
}
|
|
1669
|
+
create(documentId, document) {
|
|
1670
|
+
this.documents[documentId] = document;
|
|
1671
|
+
return Promise.resolve();
|
|
1668
1672
|
}
|
|
1673
|
+
////////////////////////////////
|
|
1674
|
+
// IDriveStorage
|
|
1675
|
+
////////////////////////////////
|
|
1669
1676
|
checkDocumentExists(drive, id) {
|
|
1670
1677
|
return this.exists(id);
|
|
1671
1678
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1679
|
+
getDocuments(drive) {
|
|
1680
|
+
const manifest = this.getDriveManifest(drive);
|
|
1681
|
+
return Promise.resolve([...manifest.documentIds]);
|
|
1674
1682
|
}
|
|
1675
1683
|
async getDocument(driveId, id) {
|
|
1676
|
-
const
|
|
1677
|
-
if (!drive) {
|
|
1678
|
-
throw new DriveNotFoundError(driveId);
|
|
1679
|
-
}
|
|
1680
|
-
const document = drive[id];
|
|
1684
|
+
const document = this.documents[id];
|
|
1681
1685
|
if (!document) {
|
|
1682
1686
|
throw new Error(`Document with id ${id} not found`);
|
|
1683
1687
|
}
|
|
1684
1688
|
return document;
|
|
1685
1689
|
}
|
|
1686
1690
|
async saveDocument(drive, id, document) {
|
|
1687
|
-
this.documents[
|
|
1688
|
-
this.
|
|
1691
|
+
this.documents[id] = document;
|
|
1692
|
+
const manifest = this.getDriveManifest(drive);
|
|
1693
|
+
manifest.documentIds.add(id);
|
|
1694
|
+
this.updateDriveManifest(drive, manifest);
|
|
1689
1695
|
}
|
|
1690
1696
|
async clearStorage() {
|
|
1691
1697
|
this.documents = {};
|
|
1692
1698
|
this.drives = {};
|
|
1699
|
+
this.driveManifests = {};
|
|
1700
|
+
this.slugToDriveId = {};
|
|
1693
1701
|
}
|
|
1694
1702
|
async createDocument(drive, id, document) {
|
|
1695
|
-
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
initialState,
|
|
1700
|
-
name,
|
|
1701
|
-
revision,
|
|
1702
|
-
documentType: documentType2,
|
|
1703
|
-
created,
|
|
1704
|
-
lastModified,
|
|
1705
|
-
clipboard,
|
|
1706
|
-
state
|
|
1707
|
-
};
|
|
1703
|
+
await this.create(id, document);
|
|
1704
|
+
const manifest = this.getDriveManifest(drive);
|
|
1705
|
+
manifest.documentIds.add(id);
|
|
1706
|
+
this.updateDriveManifest(drive, manifest);
|
|
1708
1707
|
}
|
|
1709
1708
|
async addDocumentOperations(drive, id, operations, header) {
|
|
1710
1709
|
const document = await this.getDocument(drive, id);
|
|
@@ -1712,17 +1711,22 @@ var MemoryStorage = class {
|
|
|
1712
1711
|
throw new Error(`Document with id ${id} not found`);
|
|
1713
1712
|
}
|
|
1714
1713
|
const mergedOperations = mergeOperations(document.operations, operations);
|
|
1715
|
-
this.documents[
|
|
1714
|
+
this.documents[id] = {
|
|
1716
1715
|
...document,
|
|
1717
1716
|
...header,
|
|
1718
1717
|
operations: mergedOperations
|
|
1719
1718
|
};
|
|
1720
1719
|
}
|
|
1721
1720
|
async deleteDocument(drive, id) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1721
|
+
const drives = await this.getDrives();
|
|
1722
|
+
for (const driveId of drives) {
|
|
1723
|
+
const manifest = this.getDriveManifest(driveId);
|
|
1724
|
+
if (manifest.documentIds.has(id)) {
|
|
1725
|
+
manifest.documentIds.delete(id);
|
|
1726
|
+
this.updateDriveManifest(driveId, manifest);
|
|
1727
|
+
}
|
|
1724
1728
|
}
|
|
1725
|
-
delete this.documents[
|
|
1729
|
+
delete this.documents[id];
|
|
1726
1730
|
}
|
|
1727
1731
|
async getDrives() {
|
|
1728
1732
|
return Object.keys(this.drives);
|
|
@@ -1743,7 +1747,7 @@ var MemoryStorage = class {
|
|
|
1743
1747
|
}
|
|
1744
1748
|
async createDrive(id, drive) {
|
|
1745
1749
|
this.drives[id] = drive;
|
|
1746
|
-
this.
|
|
1750
|
+
this.updateDriveManifest(id, { documentIds: /* @__PURE__ */ new Set() });
|
|
1747
1751
|
const { slug } = drive.initialState.state.global;
|
|
1748
1752
|
if (slug) {
|
|
1749
1753
|
this.slugToDriveId[slug] = id;
|
|
@@ -1759,8 +1763,27 @@ var MemoryStorage = class {
|
|
|
1759
1763
|
};
|
|
1760
1764
|
}
|
|
1761
1765
|
async deleteDrive(id) {
|
|
1762
|
-
|
|
1766
|
+
const manifest = this.getDriveManifest(id);
|
|
1767
|
+
const drives = await this.getDrives();
|
|
1768
|
+
await Promise.all([...manifest.documentIds].map((docId) => {
|
|
1769
|
+
for (const driveId of drives) {
|
|
1770
|
+
if (driveId === id) {
|
|
1771
|
+
continue;
|
|
1772
|
+
}
|
|
1773
|
+
const manifest2 = this.getDriveManifest(driveId);
|
|
1774
|
+
if (manifest2.documentIds.has(docId)) {
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
delete this.documents[docId];
|
|
1779
|
+
}));
|
|
1780
|
+
delete this.driveManifests[id];
|
|
1763
1781
|
delete this.drives[id];
|
|
1782
|
+
for (const [slug, driveId] of Object.entries(this.slugToDriveId)) {
|
|
1783
|
+
if (driveId === id) {
|
|
1784
|
+
delete this.slugToDriveId[slug];
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1764
1787
|
}
|
|
1765
1788
|
async getSynchronizationUnitsRevision(units) {
|
|
1766
1789
|
const results = await Promise.allSettled(units.map(async (unit) => {
|
|
@@ -1791,6 +1814,18 @@ var MemoryStorage = class {
|
|
|
1791
1814
|
return acc;
|
|
1792
1815
|
}, []);
|
|
1793
1816
|
}
|
|
1817
|
+
////////////////////////////////
|
|
1818
|
+
// Private
|
|
1819
|
+
////////////////////////////////
|
|
1820
|
+
getDriveManifest(driveId) {
|
|
1821
|
+
if (!this.driveManifests[driveId]) {
|
|
1822
|
+
this.driveManifests[driveId] = { documentIds: /* @__PURE__ */ new Set() };
|
|
1823
|
+
}
|
|
1824
|
+
return this.driveManifests[driveId];
|
|
1825
|
+
}
|
|
1826
|
+
updateDriveManifest(driveId, manifest) {
|
|
1827
|
+
this.driveManifests[driveId] = manifest;
|
|
1828
|
+
}
|
|
1794
1829
|
};
|
|
1795
1830
|
|
|
1796
1831
|
// ../../packages/document-drive/dist/src/drive-document-model/gen/creators.js
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
ReactorBuilder,
|
|
5
5
|
memory_default,
|
|
6
6
|
mergeOperations
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DO4ZK6HR.js";
|
|
8
8
|
import {
|
|
9
9
|
__commonJS,
|
|
10
10
|
__require,
|
|
@@ -2209,20 +2209,21 @@ var BrowserStorage = class _BrowserStorage {
|
|
|
2209
2209
|
name: namespace ? `${namespace}:${_BrowserStorage.DBName}` : _BrowserStorage.DBName
|
|
2210
2210
|
}));
|
|
2211
2211
|
}
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
buildDocumentKey(documentId) {
|
|
2216
|
-
return `${_BrowserStorage.DOCUMENT_KEY}${_BrowserStorage.SEP}${documentId}`;
|
|
2217
|
-
}
|
|
2218
|
-
buildManifestKey(driveId) {
|
|
2219
|
-
return `${_BrowserStorage.MANIFEST_KEY}${_BrowserStorage.SEP}${driveId}`;
|
|
2220
|
-
}
|
|
2212
|
+
////////////////////////////////
|
|
2213
|
+
// IDocumentStorage
|
|
2214
|
+
////////////////////////////////
|
|
2221
2215
|
async exists(documentId) {
|
|
2222
2216
|
const db = await this.db;
|
|
2223
2217
|
const document = await db.getItem(this.buildDocumentKey(documentId));
|
|
2224
2218
|
return !!document;
|
|
2225
2219
|
}
|
|
2220
|
+
async create(documentId, document) {
|
|
2221
|
+
const db = await this.db;
|
|
2222
|
+
await db.setItem(this.buildDocumentKey(documentId), document);
|
|
2223
|
+
}
|
|
2224
|
+
////////////////////////////////
|
|
2225
|
+
// IDriveStorage
|
|
2226
|
+
////////////////////////////////
|
|
2226
2227
|
checkDocumentExists(drive, documentId) {
|
|
2227
2228
|
return this.exists(documentId);
|
|
2228
2229
|
}
|
|
@@ -2247,8 +2248,7 @@ var BrowserStorage = class _BrowserStorage {
|
|
|
2247
2248
|
return document;
|
|
2248
2249
|
}
|
|
2249
2250
|
async createDocument(drive, id, document) {
|
|
2250
|
-
|
|
2251
|
-
await db.setItem(this.buildDocumentKey(id), document);
|
|
2251
|
+
await this.create(id, document);
|
|
2252
2252
|
const manifest = await this.getDriveManifest(drive);
|
|
2253
2253
|
if (!manifest.documentIds.includes(id)) {
|
|
2254
2254
|
manifest.documentIds.push(id);
|
|
@@ -2377,6 +2377,18 @@ var BrowserStorage = class _BrowserStorage {
|
|
|
2377
2377
|
return (await this.db).setItem(this.buildDocumentKey(id), migratedDocument);
|
|
2378
2378
|
}
|
|
2379
2379
|
}
|
|
2380
|
+
////////////////////////////////
|
|
2381
|
+
// Private methods
|
|
2382
|
+
////////////////////////////////
|
|
2383
|
+
buildDriveKey(driveId) {
|
|
2384
|
+
return `${_BrowserStorage.DRIVES_KEY}${_BrowserStorage.SEP}${driveId}`;
|
|
2385
|
+
}
|
|
2386
|
+
buildDocumentKey(documentId) {
|
|
2387
|
+
return `${_BrowserStorage.DOCUMENT_KEY}${_BrowserStorage.SEP}${documentId}`;
|
|
2388
|
+
}
|
|
2389
|
+
buildManifestKey(driveId) {
|
|
2390
|
+
return `${_BrowserStorage.MANIFEST_KEY}${_BrowserStorage.SEP}${driveId}`;
|
|
2391
|
+
}
|
|
2380
2392
|
};
|
|
2381
2393
|
|
|
2382
2394
|
// ../../packages/reactor-browser/dist/src/reactor.js
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
ReadModeContext,
|
|
4
4
|
ReadModeContextProvider,
|
|
5
5
|
useReadModeContext
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-UJU4RHH3.js";
|
|
7
7
|
import "../chunk-OVGOA2P5.js";
|
|
8
8
|
import "../chunk-P6NJ6IAQ.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-DO4ZK6HR.js";
|
|
10
10
|
import "../chunk-FQF4YAVC.js";
|
|
11
11
|
import "../chunk-2ESYSVXG.js";
|
|
12
12
|
export {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
ReadModeContext,
|
|
3
3
|
ReadModeContextProvider,
|
|
4
4
|
useReadModeContext
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-UJU4RHH3.js";
|
|
6
6
|
import "../chunk-OVGOA2P5.js";
|
|
7
7
|
import "../chunk-P6NJ6IAQ.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-DO4ZK6HR.js";
|
|
9
9
|
import "../chunk-FQF4YAVC.js";
|
|
10
10
|
import "../chunk-2ESYSVXG.js";
|
|
11
11
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../chunk-DKDARAJS.js";
|
|
2
2
|
import {
|
|
3
3
|
useDriveActionsWithUiNodes
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-JEDWG5AH.js";
|
|
5
5
|
import {
|
|
6
6
|
useDriveActions
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YEIWJWUR.js";
|
|
8
8
|
import {
|
|
9
9
|
DriveContextProvider,
|
|
10
10
|
useDriveContext
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
useUserPermissions
|
|
58
58
|
} from "../chunk-OVGOA2P5.js";
|
|
59
59
|
import "../chunk-P6NJ6IAQ.js";
|
|
60
|
-
import "../chunk-
|
|
60
|
+
import "../chunk-DO4ZK6HR.js";
|
|
61
61
|
import "../chunk-FQF4YAVC.js";
|
|
62
62
|
import "../chunk-YWKVPJNL.js";
|
|
63
63
|
import "../chunk-2X2M6BYG.js";
|