@powerhousedao/connect 1.0.23-staging.0 → 1.0.23-staging.2
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-CSCydE8J.css → app-DFQhKB-Q.css} +3 -3
- package/dist/assets/{app-DcywiNjF.js → app-_0wz8A4r.js} +2488 -2339
- package/dist/assets/{app-loader-3ipafc56.css → app-loader-DczGHPG9.css} +3 -3
- package/dist/assets/{app-loader-DTsRstTc.js → app-loader-d7zgN9hh.js} +44 -55
- package/dist/assets/{ccip-CiJjLxOg.js → ccip-C6W2FbjW.js} +3 -3
- package/dist/assets/{content-BvS8uaAX.js → content-Bm5Tr4Hg.js} +19 -14
- package/dist/assets/{index-BmdZEeOF.js → index-BhxEM16y.js} +4 -4
- package/dist/assets/{index-Dw68KzY3.js → index-CXXvva-l.js} +390 -233
- package/dist/assets/{index-XBueRvDp.js → index-DamVoHkh.js} +3 -3
- package/dist/assets/{main.CgZm8DDG.js → main.Cq930vY3.js} +1 -1
- package/dist/assets/{style-0ej1afQi.css → style-BQHqCxXa.css} +1 -4
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";
|
|
2
2
|
|
|
3
|
-
/*! tailwindcss v4.1.
|
|
4
|
-
/*! tailwindcss v4.1.
|
|
3
|
+
/*! tailwindcss v4.1.6 | MIT License | https://tailwindcss.com */
|
|
4
|
+
/*! tailwindcss v4.1.6 | MIT License | https://tailwindcss.com */
|
|
5
5
|
@layer properties {
|
|
6
6
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
7
7
|
*, :before, :after, ::backdrop {
|
|
@@ -3062,7 +3062,7 @@
|
|
|
3062
3062
|
}
|
|
3063
3063
|
|
|
3064
3064
|
.transition {
|
|
3065
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter;
|
|
3065
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;
|
|
3066
3066
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
3067
3067
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
3068
3068
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-_0wz8A4r.js","assets/main.Cq930vY3.js","assets/app-DFQhKB-Q.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __typeError = (msg) => {
|
|
4
4
|
throw TypeError(msg);
|
|
@@ -11,7 +11,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
11
11
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
12
12
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
13
13
|
var _tags, _levelString, _errorHandler, _ConsoleLogger_instances, levelValue_get, _getDocumentModelModule, _drives, _ReadModeService_instances, parseGraphQLErrors_fn, fetchDrive_fn, _a, _ServiceWorkerManager_instances, handleServiceWorkerMessage_fn, handleServiceWorker_fn;
|
|
14
|
-
import { _ as __vitePreload } from "./main.
|
|
14
|
+
import { _ as __vitePreload } from "./main.Cq930vY3.js";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { useState, useEffect, Suspense, lazy } from "react";
|
|
17
17
|
function _mergeNamespaces(n, m) {
|
|
@@ -1893,13 +1893,14 @@ const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z
|
|
|
1893
1893
|
const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
|
|
1894
1894
|
const dateRegex = new RegExp(`^${dateRegexSource}$`);
|
|
1895
1895
|
function timeRegexSource(args) {
|
|
1896
|
-
let
|
|
1896
|
+
let secondsRegexSource = `[0-5]\\d`;
|
|
1897
1897
|
if (args.precision) {
|
|
1898
|
-
|
|
1898
|
+
secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
|
|
1899
1899
|
} else if (args.precision == null) {
|
|
1900
|
-
|
|
1900
|
+
secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
|
|
1901
1901
|
}
|
|
1902
|
-
|
|
1902
|
+
const secondsQuantifier = args.precision ? "+" : "?";
|
|
1903
|
+
return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
|
|
1903
1904
|
}
|
|
1904
1905
|
function timeRegex(args) {
|
|
1905
1906
|
return new RegExp(`^${timeRegexSource(args)}$`);
|
|
@@ -14928,10 +14929,7 @@ function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
14928
14929
|
}
|
|
14929
14930
|
}
|
|
14930
14931
|
} else {
|
|
14931
|
-
node =
|
|
14932
|
-
{},
|
|
14933
|
-
Object.getOwnPropertyDescriptors(node)
|
|
14934
|
-
);
|
|
14932
|
+
node = { ...node };
|
|
14935
14933
|
for (const [editKey, editValue] of edits) {
|
|
14936
14934
|
node[editKey] = editValue;
|
|
14937
14935
|
}
|
|
@@ -20271,7 +20269,7 @@ function VariablesInAllowedPositionRule(context) {
|
|
|
20271
20269
|
},
|
|
20272
20270
|
leave(operation) {
|
|
20273
20271
|
const usages = context.getRecursiveVariableUsages(operation);
|
|
20274
|
-
for (const { node, type: type2, defaultValue } of usages) {
|
|
20272
|
+
for (const { node, type: type2, defaultValue, parentType } of usages) {
|
|
20275
20273
|
const varName = node.name.value;
|
|
20276
20274
|
const varDef = varDefMap[varName];
|
|
20277
20275
|
if (varDef && type2) {
|
|
@@ -20295,6 +20293,16 @@ function VariablesInAllowedPositionRule(context) {
|
|
|
20295
20293
|
)
|
|
20296
20294
|
);
|
|
20297
20295
|
}
|
|
20296
|
+
if (isInputObjectType(parentType) && parentType.isOneOf && isNullableType(varType)) {
|
|
20297
|
+
context.reportError(
|
|
20298
|
+
new GraphQLError(
|
|
20299
|
+
`Variable "$${varName}" is of type "${varType}" but must be non-nullable to be used for OneOf Input Object "${parentType}".`,
|
|
20300
|
+
{
|
|
20301
|
+
nodes: [varDef, node]
|
|
20302
|
+
}
|
|
20303
|
+
)
|
|
20304
|
+
);
|
|
20305
|
+
}
|
|
20298
20306
|
}
|
|
20299
20307
|
}
|
|
20300
20308
|
}
|
|
@@ -20478,7 +20486,8 @@ class ValidationContext extends ASTValidationContext {
|
|
|
20478
20486
|
newUsages.push({
|
|
20479
20487
|
node: variable,
|
|
20480
20488
|
type: typeInfo.getInputType(),
|
|
20481
|
-
defaultValue: typeInfo.getDefaultValue()
|
|
20489
|
+
defaultValue: typeInfo.getDefaultValue(),
|
|
20490
|
+
parentType: typeInfo.getParentInputType()
|
|
20482
20491
|
});
|
|
20483
20492
|
}
|
|
20484
20493
|
})
|
|
@@ -20576,22 +20585,6 @@ function assertValidSDL(documentAST) {
|
|
|
20576
20585
|
throw new Error(errors.map((error) => error.message).join("\n\n"));
|
|
20577
20586
|
}
|
|
20578
20587
|
}
|
|
20579
|
-
function assertValidSDLExtension(documentAST, schema) {
|
|
20580
|
-
const errors = validateSDL(documentAST, schema);
|
|
20581
|
-
if (errors.length !== 0) {
|
|
20582
|
-
throw new Error(errors.map((error) => error.message).join("\n\n"));
|
|
20583
|
-
}
|
|
20584
|
-
}
|
|
20585
|
-
function extendSchema(schema, documentAST, options) {
|
|
20586
|
-
assertSchema(schema);
|
|
20587
|
-
documentAST != null && documentAST.kind === Kind.DOCUMENT || devAssert(false, "Must provide valid Document AST.");
|
|
20588
|
-
{
|
|
20589
|
-
assertValidSDLExtension(documentAST, schema);
|
|
20590
|
-
}
|
|
20591
|
-
const schemaConfig = schema.toConfig();
|
|
20592
|
-
const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);
|
|
20593
|
-
return schemaConfig === extendedConfig ? schema : new GraphQLSchema(extendedConfig);
|
|
20594
|
-
}
|
|
20595
20588
|
function extendSchemaImpl(schemaConfig, documentAST, options) {
|
|
20596
20589
|
var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;
|
|
20597
20590
|
const typeDefs = [];
|
|
@@ -24343,8 +24336,7 @@ class MemoryStorage {
|
|
|
24343
24336
|
}
|
|
24344
24337
|
delete this.documents[docId];
|
|
24345
24338
|
}));
|
|
24346
|
-
|
|
24347
|
-
delete this.documents[id];
|
|
24339
|
+
await this.delete(id);
|
|
24348
24340
|
}
|
|
24349
24341
|
async getSynchronizationUnitsRevision(units) {
|
|
24350
24342
|
const results = await Promise.allSettled(units.map(async (unit) => {
|
|
@@ -25830,7 +25822,7 @@ const nodeOptionsMap = {
|
|
|
25830
25822
|
};
|
|
25831
25823
|
const name = "@powerhousedao/connect";
|
|
25832
25824
|
const productName = "Powerhouse-Connect";
|
|
25833
|
-
const version$1 = "1.0.23-staging.
|
|
25825
|
+
const version$1 = "1.0.23-staging.2";
|
|
25834
25826
|
const description = "Powerhouse Connect";
|
|
25835
25827
|
const main = "./dist/index.html";
|
|
25836
25828
|
const type = "module";
|
|
@@ -25842,7 +25834,7 @@ const repository = { "type": "git", "url": "git+https://github.com/powerhouse-in
|
|
|
25842
25834
|
const bugs = { "url": "https://github.com/powerhouse-inc/document-model-electron/issues" };
|
|
25843
25835
|
const homepage = "https://github.com/powerhouse-inc/document-model-electron#readme";
|
|
25844
25836
|
const scripts = { "build:tsc": "tsc --build", "start": "electron-forge start", "package": "electron-forge package", "make": "PH_CONNECT_BASE_HREF=./ electron-forge make", "make:mac": "PH_CONNECT_BASE_HREF=./ electron-forge make -p darwin", "make:linux": "PH_CONNECT_BASE_HREF=./ electron-forge make -p linux", "make:windows": "PH_CONNECT_BASE_HREF=./ electron-forge make -p win32", "publish:electron": "electron-forge publish", "prepublishOnly": "npm run build", "lint": "eslint .", "lint:fix": "eslint --fix .", "lint:nx": "eslint --quiet --fix .", "format": 'prettier --write "**/*.+(js|ts|jsx|tsx|json)"', "dev": "vite -c vite.renderer.config.mts", "dev:nocache": "rm -rf node_modules/.vite && rm -rf node_modules/.cache && npm run dev", "prebuild": "tsc --build --noEmit", "build": "NODE_OPTIONS=--max-old-space-size=6144 vite build -c vite.renderer.config.mts", "preview:web": "vite preview -c vite.renderer.config.mts", "e2e": "playwright test", "cy:open": "cypress open", "build:service-worker": "tsc --build ./tsconfig.sw.json", "clean": "rimraf dist", "clean:node_modules": "rimraf node_modules" };
|
|
25845
|
-
const devDependencies = { "@electron-forge/cli": "^6.1.1", "@electron-forge/maker-deb": "^6.1.1", "@electron-forge/maker-rpm": "^6.1.1", "@electron-forge/maker-squirrel": "^6.1.1", "@electron-forge/maker-zip": "^6.1.1", "@electron-forge/plugin-vite": "^6.1.1", "@electron-forge/publisher-electron-release-server": "^6.2.1", "@electron-forge/publisher-github": "^7.2.0", "@electron-forge/shared-types": "^7.7.0", "@playwright/test": "^1.41.2", "@powerhousedao/builder-tools": "workspace:*", "@powerhousedao/common": "workspace:*", "@powerhousedao/config": "workspace:*", "@powerhousedao/design-system": "workspace:*", "@powerhousedao/reactor-browser": "workspace:*", "@
|
|
25837
|
+
const devDependencies = { "@electron-forge/cli": "^6.1.1", "@electron-forge/maker-deb": "^6.1.1", "@electron-forge/maker-rpm": "^6.1.1", "@electron-forge/maker-squirrel": "^6.1.1", "@electron-forge/maker-zip": "^6.1.1", "@electron-forge/plugin-vite": "^6.1.1", "@electron-forge/publisher-electron-release-server": "^6.2.1", "@electron-forge/publisher-github": "^7.2.0", "@electron-forge/shared-types": "^7.7.0", "@playwright/test": "^1.41.2", "@powerhousedao/builder-tools": "workspace:*", "@powerhousedao/common": "workspace:*", "@powerhousedao/config": "workspace:*", "@powerhousedao/design-system": "workspace:*", "@powerhousedao/reactor-browser": "workspace:*", "@rollup/plugin-node-resolve": "^15.2.3", "@sentry/browser": "^9.1.0", "@sentry/react": "^7.109.0", "@sentry/vite-plugin": "^2.23.0", "@tailwindcss/vite": "^4.1.4", "@tanstack/react-virtual": "^3.8.1", "@types/node": "^22.13.10", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.18", "@types/uuid": "^9.0.7", "@types/wicg-file-system-access": "^2020.9.6", "@vitejs/plugin-basic-ssl": "^2.0.0", "@vitejs/plugin-react": "^4.4.1", "asar": "^3.2.0", "did-key-creator": "^1.2.0", "document-drive": "workspace:*", "document-model": "workspace:*", "electron": "30.0.0", "electron-is-dev": "^3.0.1", "electron-playwright-helpers": "^1.7.1", "electron-squirrel-startup": "^1.0.0", "electron-store": "^8.1.0", "esbuild": "^0.24.0", "graphql": "^16.11.0", "graphql-request": "^6.1.0", "i18next": "^23.7.6", "jotai": "^2.1.0", "jotai-effect": "^1.1.6", "localforage": "^1.10.0", "lz-string": "^1.5.0", "playwright": "^1.41.2", "playwright-core": "^1.41.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-error-boundary": "^4.0.11", "react-hotkeys-hook": "^4.5.0", "react-i18next": "^13.5.0", "react-router-dom": "^6.11.2", "tailwind-merge": "^3.0.2", "tailwindcss": "^4.1.4", "uuid": "^9.0.1", "viem": "^2.8.13", "vite": "^6.3.3", "vite-envs": "^4.6.0", "vite-plugin-html": "^3.2.2", "vite-plugin-node-polyfills": "^0.23.0", "vite-plugin-svgr": "^4.3.0", "vite-tsconfig-paths": "^5.1.4", "xvfb-maybe": "^0.2.1" };
|
|
25846
25838
|
const optionalDependencies = { "@esbuild/linux-x64": "^0.21.4", "@rollup/rollup-linux-x64-musl": "4.14.3" };
|
|
25847
25839
|
const packageJson = {
|
|
25848
25840
|
name,
|
|
@@ -28771,9 +28763,7 @@ const _BrowserStorage = class _BrowserStorage {
|
|
|
28771
28763
|
async deleteDrive(id) {
|
|
28772
28764
|
const documents = await this.getChildren(id);
|
|
28773
28765
|
await Promise.all(documents.map((doc) => this.delete(doc)));
|
|
28774
|
-
|
|
28775
|
-
await db.removeItem(this.buildManifestKey(id));
|
|
28776
|
-
return db.removeItem(this.buildDocumentKey(id));
|
|
28766
|
+
await this.delete(id);
|
|
28777
28767
|
}
|
|
28778
28768
|
async addDriveOperations(id, operations, header) {
|
|
28779
28769
|
const drive = await this.get(id);
|
|
@@ -31454,7 +31444,7 @@ if (window.__VITE_ENVS.MODE === "development") {
|
|
|
31454
31444
|
} else {
|
|
31455
31445
|
serviceWorkerManager.registerServiceWorker(false);
|
|
31456
31446
|
}
|
|
31457
|
-
const App = lazy(() => __vitePreload(() => import("./app-
|
|
31447
|
+
const App = lazy(() => __vitePreload(() => import("./app-_0wz8A4r.js").then((n) => n.a_), true ? __vite__mapDeps([0,1,2]) : void 0));
|
|
31458
31448
|
const AppLoader = /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(App, {}) });
|
|
31459
31449
|
const appLoader = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
31460
31450
|
__proto__: null,
|
|
@@ -31555,7 +31545,7 @@ export {
|
|
|
31555
31545
|
updateNode as ay,
|
|
31556
31546
|
FILE as az,
|
|
31557
31547
|
SetStateSchemaInputSchema as b,
|
|
31558
|
-
|
|
31548
|
+
isCompositeType as b$,
|
|
31559
31549
|
RENAME as b0,
|
|
31560
31550
|
WRITE as b1,
|
|
31561
31551
|
DUPLICATE as b2,
|
|
@@ -31586,13 +31576,13 @@ export {
|
|
|
31586
31576
|
parse as bR,
|
|
31587
31577
|
validate as bS,
|
|
31588
31578
|
visit as bT,
|
|
31589
|
-
|
|
31590
|
-
|
|
31591
|
-
|
|
31592
|
-
|
|
31593
|
-
|
|
31594
|
-
|
|
31595
|
-
|
|
31579
|
+
snakeCase as bU,
|
|
31580
|
+
constantCase as bV,
|
|
31581
|
+
isAbstractType as bW,
|
|
31582
|
+
BREAK as bX,
|
|
31583
|
+
SchemaMetaFieldDef as bY,
|
|
31584
|
+
TypeMetaFieldDef as bZ,
|
|
31585
|
+
TypeNameMetaFieldDef as b_,
|
|
31596
31586
|
useDocumentDispatch as ba,
|
|
31597
31587
|
inspect as bb,
|
|
31598
31588
|
GraphQLError as bc,
|
|
@@ -31620,17 +31610,16 @@ export {
|
|
|
31620
31610
|
GraphQLString as by,
|
|
31621
31611
|
GraphQLFloat as bz,
|
|
31622
31612
|
createAction as c,
|
|
31623
|
-
|
|
31624
|
-
|
|
31625
|
-
|
|
31626
|
-
|
|
31627
|
-
|
|
31628
|
-
|
|
31629
|
-
|
|
31630
|
-
|
|
31631
|
-
|
|
31632
|
-
|
|
31633
|
-
appLoader as ca,
|
|
31613
|
+
isOutputType as c0,
|
|
31614
|
+
isInputType as c1,
|
|
31615
|
+
assertAbstractType as c2,
|
|
31616
|
+
doTypesOverlap as c3,
|
|
31617
|
+
DirectiveLocation as c4,
|
|
31618
|
+
NoUnusedFragmentsRule as c5,
|
|
31619
|
+
ExecutableDefinitionsRule as c6,
|
|
31620
|
+
validateSchema as c7,
|
|
31621
|
+
sentenceCase as c8,
|
|
31622
|
+
appLoader as c9,
|
|
31634
31623
|
ReorderModuleOperationsInputSchema as d,
|
|
31635
31624
|
DeleteOperationInputSchema as e,
|
|
31636
31625
|
SetOperationReducerInputSchema as f,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { aO as BaseError, aP as getUrl, aQ as stringify, aR as decodeErrorResult, aS as isAddressEqual, aT as localBatchGatewayUrl, aU as localBatchGatewayRequest, aV as call, aW as concat, aX as encodeAbiParameters, aY as HttpRequestError, aZ as isHex } from "./app-
|
|
2
|
-
import "./main.
|
|
1
|
+
import { aO as BaseError, aP as getUrl, aQ as stringify, aR as decodeErrorResult, aS as isAddressEqual, aT as localBatchGatewayUrl, aU as localBatchGatewayRequest, aV as call, aW as concat, aX as encodeAbiParameters, aY as HttpRequestError, aZ as isHex } from "./app-_0wz8A4r.js";
|
|
2
|
+
import "./main.Cq930vY3.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import "./app-loader-
|
|
4
|
+
import "./app-loader-d7zgN9hh.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
class OffchainLookupError extends BaseError {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
|
-
import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, k as SYNCING, I as INITIAL_SYNC, l as ConnectDropdownMenu, u as useOnClickOutside, n as useEventListener, o as useCopyToClipboard, p as Select, q as ENSAvatar, P as Provider, v as Root3, T as Trigger, w as Portal, x as Content2, y as validateInitialState, z as validateStateSchemaName, A as validateModules, D as useDocumentDrives, F as useUiNodesContext, G as useDriveContext, H as FILE$1, J as useUnwrappedReactor, K as useConnectDid, L as useConnectCrypto, N as useTranslation, O as useModal, Q as useAtomValue, U as themeAtom, V as useUser, W as useUserPermissions$1, X as useUiNodes, Y as exportFile, Z as useGetDocumentModelModule, _ as addActionContext$1, $ as signOperation$1, a0 as useDocumentDriveServer, a1 as useHotkeys, a2 as useGetEditor, a3 as isSameDocument, a4 as useNavigate, a5 as ErrorBoundary, a6 as DriveLayout, a7 as DriveContextProvider, a8 as SearchBar, a9 as useAsyncReactor, aa as useFilteredDocumentModels, ab as useDriveEditor, ac as useDocumentDriveById, ad as useParams, ae as useDocumentDrives$1, af as toast } from "./app-
|
|
2
|
+
import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, k as SYNCING, I as INITIAL_SYNC, l as ConnectDropdownMenu, u as useOnClickOutside, n as useEventListener, o as useCopyToClipboard, p as Select, q as ENSAvatar, P as Provider, v as Root3, T as Trigger, w as Portal, x as Content2, y as validateInitialState, z as validateStateSchemaName, A as validateModules, D as useDocumentDrives, F as useUiNodesContext, G as useDriveContext, H as FILE$1, J as useUnwrappedReactor, K as useConnectDid, L as useConnectCrypto, N as useTranslation, O as useModal, Q as useAtomValue, U as themeAtom, V as useUser, W as useUserPermissions$1, X as useUiNodes, Y as exportFile, Z as useGetDocumentModelModule, _ as addActionContext$1, $ as signOperation$1, a0 as useDocumentDriveServer, a1 as useHotkeys, a2 as useGetEditor, a3 as isSameDocument, a4 as useNavigate, a5 as ErrorBoundary, a6 as DriveLayout, a7 as DriveContextProvider, a8 as SearchBar, a9 as useAsyncReactor, aa as useFilteredDocumentModels, ab as useDriveEditor, ac as useDocumentDriveById, ad as useParams, ae as useDocumentDrives$1, af as toast } from "./app-_0wz8A4r.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { useState, useCallback, useMemo, useEffect, Fragment, useRef, useLayoutEffect, memo as memo$1, createElement, useSyncExternalStore, Suspense } from "react";
|
|
5
|
-
import { _ as Icon, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aP as DRIVE, az as FILE, ae as buildSignedOperation, b7 as generateId$1, aw as isFolderNode, aB as generateNodesCopy, aC as copyNode, aA as moveNode, ay as updateNode, ax as deleteNode, ar as generateAddNodeAction, as as isFileNode, av as addFolder, b8 as undo, b9 as redo, ac as logger, ba as useDocumentDispatch$1, aQ as FOLDER, al as driveDocumentModelModule } from "./app-loader-
|
|
5
|
+
import { _ as Icon, aX as getDimensions, aY as READ, aZ as nodeOptionsMap, a_ as defaultFileOptions, a$ as DELETE, b0 as RENAME, b1 as WRITE, b2 as DUPLICATE, b3 as defaultFolderOptions, b4 as garbageCollect, b5 as sortOperations, b6 as UI_NODE, aP as DRIVE, az as FILE, ae as buildSignedOperation, b7 as generateId$1, aw as isFolderNode, aB as generateNodesCopy, aC as copyNode, aA as moveNode, ay as updateNode, ax as deleteNode, ar as generateAddNodeAction, as as isFileNode, av as addFolder, b8 as undo, b9 as redo, ac as logger, ba as useDocumentDispatch$1, aQ as FOLDER, al as driveDocumentModelModule } from "./app-loader-d7zgN9hh.js";
|
|
6
6
|
import { flushSync } from "react-dom";
|
|
7
|
-
import "./main.
|
|
7
|
+
import "./main.Cq930vY3.js";
|
|
8
8
|
const PaginationButton = ({ active = false, ...props }) => {
|
|
9
9
|
const className = twMerge("h-8 min-w-8 border border-solid border-gray-300 bg-white px-3 py-1 text-xs text-gray-900 hover:bg-gray-100", !active && "border-0");
|
|
10
10
|
return jsx(Button, { color: "light", size: "small", ...mergeClassNameProps(props, className), children: props.children });
|
|
@@ -1874,7 +1874,7 @@ function notUndefined(value, msg) {
|
|
|
1874
1874
|
return value;
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
const approxEqual = (a, b) => Math.abs(a - b)
|
|
1877
|
+
const approxEqual = (a, b) => Math.abs(a - b) <= 1;
|
|
1878
1878
|
const debounce = (targetWindow, fn, ms) => {
|
|
1879
1879
|
let timeoutId;
|
|
1880
1880
|
return function(...args) {
|
|
@@ -1882,6 +1882,10 @@ const debounce = (targetWindow, fn, ms) => {
|
|
|
1882
1882
|
timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);
|
|
1883
1883
|
};
|
|
1884
1884
|
};
|
|
1885
|
+
const getRect = (element) => {
|
|
1886
|
+
const { offsetWidth, offsetHeight } = element;
|
|
1887
|
+
return { width: offsetWidth, height: offsetHeight };
|
|
1888
|
+
};
|
|
1885
1889
|
const defaultKeyExtractor = (index) => index;
|
|
1886
1890
|
const defaultRangeExtractor = (range) => {
|
|
1887
1891
|
const start = Math.max(range.startIndex - range.overscan, 0);
|
|
@@ -1905,7 +1909,7 @@ const observeElementRect = (instance, cb) => {
|
|
|
1905
1909
|
const { width, height } = rect;
|
|
1906
1910
|
cb({ width: Math.round(width), height: Math.round(height) });
|
|
1907
1911
|
};
|
|
1908
|
-
handler(element
|
|
1912
|
+
handler(getRect(element));
|
|
1909
1913
|
if (!targetWindow.ResizeObserver) {
|
|
1910
1914
|
return () => {
|
|
1911
1915
|
};
|
|
@@ -1920,7 +1924,7 @@ const observeElementRect = (instance, cb) => {
|
|
|
1920
1924
|
return;
|
|
1921
1925
|
}
|
|
1922
1926
|
}
|
|
1923
|
-
handler(element
|
|
1927
|
+
handler(getRect(element));
|
|
1924
1928
|
};
|
|
1925
1929
|
instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
|
|
1926
1930
|
});
|
|
@@ -1981,9 +1985,7 @@ const measureElement = (element, entry, instance) => {
|
|
|
1981
1985
|
return size;
|
|
1982
1986
|
}
|
|
1983
1987
|
}
|
|
1984
|
-
return
|
|
1985
|
-
element.getBoundingClientRect()[instance.options.horizontal ? "width" : "height"]
|
|
1986
|
-
);
|
|
1988
|
+
return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
1987
1989
|
};
|
|
1988
1990
|
const elementScroll = (offset, {
|
|
1989
1991
|
adjustments = 0,
|
|
@@ -2415,9 +2417,7 @@ class Virtualizer {
|
|
|
2415
2417
|
} else if (align === "end") {
|
|
2416
2418
|
toOffset -= size;
|
|
2417
2419
|
}
|
|
2418
|
-
const
|
|
2419
|
-
const scrollSize = this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[scrollSizeProp] : this.scrollElement[scrollSizeProp] : 0;
|
|
2420
|
-
const maxOffset = scrollSize - size;
|
|
2420
|
+
const maxOffset = this.getTotalSize() - size;
|
|
2421
2421
|
return Math.max(Math.min(maxOffset, toOffset), 0);
|
|
2422
2422
|
};
|
|
2423
2423
|
this.getOffsetForIndex = (index, align = "auto") => {
|
|
@@ -2484,7 +2484,8 @@ class Virtualizer {
|
|
|
2484
2484
|
const [latestOffset] = notUndefined(
|
|
2485
2485
|
this.getOffsetForIndex(index, align)
|
|
2486
2486
|
);
|
|
2487
|
-
|
|
2487
|
+
const currentScrollOffset = this.getScrollOffset();
|
|
2488
|
+
if (!approxEqual(latestOffset, currentScrollOffset)) {
|
|
2488
2489
|
this.scrollToIndex(index, { align, behavior });
|
|
2489
2490
|
}
|
|
2490
2491
|
} else {
|
|
@@ -4304,6 +4305,8 @@ function DriveEditorContainer() {
|
|
|
4304
4305
|
const { addFile, addDocument } = useDocumentDriveServer();
|
|
4305
4306
|
const documentModels = useFilteredDocumentModels();
|
|
4306
4307
|
const useDriveDocumentState = makeDriveDocumentStateHook(reactor);
|
|
4308
|
+
const getDocumentModelModule = useGetDocumentModelModule();
|
|
4309
|
+
const getEditor = useGetEditor();
|
|
4307
4310
|
const driveContext = useMemo(
|
|
4308
4311
|
() => ({
|
|
4309
4312
|
showSearchBar: false,
|
|
@@ -4346,7 +4349,9 @@ function DriveEditorContainer() {
|
|
|
4346
4349
|
...editorProps,
|
|
4347
4350
|
context: {
|
|
4348
4351
|
...editorProps.context,
|
|
4349
|
-
...driveContext
|
|
4352
|
+
...driveContext,
|
|
4353
|
+
getDocumentModelModule,
|
|
4354
|
+
getEditor
|
|
4350
4355
|
},
|
|
4351
4356
|
onSwitchboardLinkClick: void 0,
|
|
4352
4357
|
document: document2,
|
|
@@ -10,10 +10,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
12
|
var _DB_NAME, _STORE_NAME, _KEY, _db, _BrowserKeyStorage_instances, useStore_fn, _subtleCrypto, _keyPair, _keyPairStorage, _did, _ConnectCrypto_instances, initCrypto_fn, initialize_fn, parseDid_fn, generateECDSAKeyPair_fn, exportKeyPair_fn, importKeyPair_fn, _sign, _verify, _store, _namespace, _BaseStorage_instances, buildKey_fn, _baseUrl, _store2, _connectId, _eventEmitter, _Renown_instances, updateUser_fn, getCredential_fn;
|
|
13
|
-
import { _ as __vitePreload } from "./main.
|
|
14
|
-
import { r as rawKeyInHexfromUncompressed, c as compressedKeyInHexfromRaw, e as encodeDIDfromHexString, a as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-
|
|
15
|
-
import { i, h, d, j, b, f, s } from "./app-
|
|
16
|
-
import { ah as connectConfig, ac as logger } from "./app-loader-
|
|
13
|
+
import { _ as __vitePreload } from "./main.Cq930vY3.js";
|
|
14
|
+
import { r as rawKeyInHexfromUncompressed, c as compressedKeyInHexfromRaw, e as encodeDIDfromHexString, a as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-_0wz8A4r.js";
|
|
15
|
+
import { i, h, d, j, b, f, s } from "./app-_0wz8A4r.js";
|
|
16
|
+
import { ah as connectConfig, ac as logger } from "./app-loader-d7zgN9hh.js";
|
|
17
17
|
import "react/jsx-runtime";
|
|
18
18
|
import "react";
|
|
19
19
|
import "react-dom";
|