@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.
Files changed (26) hide show
  1. package/dist/assets/{app-BER6qvV4.js → app-Cx6yVoWZ.js} +39 -36
  2. package/dist/assets/{app-CSi6MS9b.css → app-OVm0Zlli.css} +5 -4
  3. package/dist/assets/{app-loader-B1j0wjOh.js → app-loader-CAYRtGE1.js} +97 -50
  4. package/dist/assets/{app-loader-9W65A3zy.css → app-loader-Vi763_LE.css} +4 -3
  5. package/dist/assets/{ccip-IjzAvzNF.js → ccip-R0KrJfPl.js} +3 -3
  6. package/dist/assets/{content-u99MkPmr.js → content-CqOHLc-O.js} +3 -3
  7. package/dist/assets/{index-JG4cqDHe.js → index-C4nkPxsU.js} +4 -4
  8. package/dist/assets/{index-YszPpMJO.js → index-DsyWXJcL.js} +3 -3
  9. package/dist/assets/{index-DsshaiFd.js → index-svE1s-4x.js} +244 -7
  10. package/dist/assets/{main.DeO3pt4e.js → main.BHov_sDD.js} +1 -1
  11. package/dist/assets/{style-ICX7vBg_.css → style-D4JhTt_m.css} +5 -4
  12. package/dist/index.html +1 -1
  13. package/dist/modules/@powerhousedao/reactor-browser/{chunk-2E6C3NB7.js → chunk-DO4ZK6HR.js} +70 -35
  14. package/dist/modules/@powerhousedao/reactor-browser/{chunk-F4K6ICY4.js → chunk-JEDWG5AH.js} +1 -1
  15. package/dist/modules/@powerhousedao/reactor-browser/{chunk-RSZCDZGH.js → chunk-SHKY62YH.js} +24 -12
  16. package/dist/modules/@powerhousedao/reactor-browser/{chunk-JWR2PSS2.js → chunk-UJU4RHH3.js} +1 -1
  17. package/dist/modules/@powerhousedao/reactor-browser/{chunk-NUW2A4R5.js → chunk-YEIWJWUR.js} +1 -1
  18. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  19. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  20. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +3 -3
  21. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  22. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  23. package/dist/modules/@powerhousedao/reactor-browser/index.js +5 -5
  24. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  25. package/dist/vite-envs.sh +1 -1
  26. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-IjzAvzNF.js","assets/main.DeO3pt4e.js","assets/app-loader-B1j0wjOh.js","assets/app-loader-9W65A3zy.css","assets/index-DsshaiFd.js","assets/style-ICX7vBg_.css","assets/index-JG4cqDHe.js","assets/content-u99MkPmr.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-R0KrJfPl.js","assets/main.BHov_sDD.js","assets/app-loader-CAYRtGE1.js","assets/app-loader-Vi763_LE.css","assets/index-svE1s-4x.js","assets/style-D4JhTt_m.css","assets/index-C4nkPxsU.js","assets/content-CqOHLc-O.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -19,9 +19,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
19
19
  }
20
20
  });
21
21
  var _focused, _cleanup, _setup, _a, _online, _cleanup2, _setup2, _b, _gcTimeout, _c, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _d, _queries, _e2, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _f, _mutations, _scopes, _mutationId, _g, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _h, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _i;
22
- import { _ as __vitePreload } from "./main.DeO3pt4e.js";
22
+ import { _ as __vitePreload } from "./main.BHov_sDD.js";
23
23
  import { jsxs, jsx as jsx$1, Fragment } from "react/jsx-runtime";
24
- import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as Icon, $ as getDefaultExportFromCjs, a0 as LOCAL, a1 as commonjsGlobal, a2 as PUBLIC, a3 as SWITCHBOARD, a4 as locationInfoByLocation, a5 as sharingTypeOptions, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as createZip, ac as logger$1, ad as LZString, ae as buildSignedOperation, af as getI18n, ag as getDefaults, ah as connectConfig, ai as hashDocumentStateForScope, aj as setErrorHandler, ak as driveDocumentModelModule, al as createBrowserDocumentDriveServer, am as hashKey$1, an as childLogger, ao as reducer$8, ap as isDocumentDrive, aq as generateAddNodeAction, ar as isFileNode, as as uploadDocumentOperations, at as updateFile, au as addFolder, av as isFolderNode, aw as deleteNode, ax as updateNode, ay as FILE, az as moveNode, aA as generateNodesCopy, aB as copyNode, aC as createState$1, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as generateUUID, aJ as PullResponderTransmitter, aK as addTrigger, aL as ReadDriveNotFoundError, aM as openUrl, aN as getNodeOptions, aO as DRIVE, aP as FOLDER, aQ as requestPublicDrive, aR as serviceWorkerManager, aS as packageJson, aT as t$1, aU as gql, aV as request } from "./app-loader-B1j0wjOh.js";
24
+ import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as Icon, $ as getDefaultExportFromCjs, a0 as LOCAL, a1 as commonjsGlobal, a2 as PUBLIC, a3 as SWITCHBOARD, a4 as locationInfoByLocation, a5 as sharingTypeOptions, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as createZip, ac as logger$1, ad as LZString, ae as buildSignedOperation, af as getI18n, ag as getDefaults, ah as connectConfig, ai as hashDocumentStateForScope, aj as setErrorHandler, ak as driveDocumentModelModule, al as createBrowserDocumentDriveServer, am as hashKey$1, an as childLogger, ao as reducer$8, ap as isDocumentDrive, aq as generateAddNodeAction, ar as isFileNode, as as uploadDocumentOperations, at as updateFile, au as addFolder, av as isFolderNode, aw as deleteNode, ax as updateNode, ay as FILE, az as moveNode, aA as generateNodesCopy, aB as copyNode, aC as createState$1, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as generateUUID, aJ as PullResponderTransmitter, aK as addTrigger, aL as ReadDriveNotFoundError, aM as openUrl, aN as getNodeOptions, aO as DRIVE, aP as FOLDER, aQ as requestPublicDrive, aR as serviceWorkerManager, aS as packageJson, aT as t$1, aU as gql, aV as request } from "./app-loader-CAYRtGE1.js";
25
25
  import * as React from "react";
26
26
  import React__default, { forwardRef, useLayoutEffect, useEffect, useState, useRef, useCallback, useContext, useMemo, createContext, Component, Fragment as Fragment$1, createElement, useSyncExternalStore, useId as useId$1, isValidElement, cloneElement, Children, useReducer, useDebugValue, Suspense } from "react";
27
27
  import "@powerhousedao/reactor-browser";
@@ -20239,7 +20239,7 @@ async function call(client2, args) {
20239
20239
  } catch (err) {
20240
20240
  const data2 = getRevertErrorData(err);
20241
20241
  const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
20242
- const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-IjzAvzNF.js");
20242
+ const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-R0KrJfPl.js");
20243
20243
  return { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 };
20244
20244
  }, true ? __vite__mapDeps([0,1,2,3]) : void 0);
20245
20245
  if (client2.ccipRead !== false && (data2 == null ? void 0 : data2.slice(0, 10)) === offchainLookupSignature && to)
@@ -33259,11 +33259,11 @@ const FormInput = forwardRef(function FormInput2(props, ref) {
33259
33259
  const HomeBg = "/assets/home-bg-BEhF9NuW.png";
33260
33260
  const HomeScreen = function HomeScreen2(props) {
33261
33261
  const { children, containerClassName } = props;
33262
- return jsx$1("div", { className: twMerge("container relative flex h-full flex-col", containerClassName), children: jsxs("div", { className: "m-8 flex flex-wrap justify-center gap-4 pt-12", children: [jsx$1("img", { src: HomeBg, alt: "background", className: "pointer-events-none absolute inset-8 z-0 size-[calc(100%-32px)] object-contain" }), children] }) });
33262
+ return jsx$1("div", { className: twMerge("container relative mx-auto flex h-full flex-col", containerClassName), children: jsxs("div", { className: "m-8 flex flex-wrap justify-center gap-4 pt-12", children: [jsx$1("img", { src: HomeBg, alt: "background", className: "pointer-events-none absolute inset-8 z-0 size-[calc(100%-32px)] object-contain" }), children] }) });
33263
33263
  };
33264
33264
  const HomeScreenItem = function HomeScreenItem2(props) {
33265
33265
  const { icon, title, description, containerClassName, shareable, onClick } = props;
33266
- return jsxs("div", { className: twMerge("relative flex h-24 cursor-pointer flex-col items-center justify-center text-center text-sm text-black", containerClassName, onClick && "cursor-pointer"), onClick, children: [jsx$1("div", { className: "mx-auto pb-4", children: icon || jsx$1("div", { className: "size-8 items-center justify-center rounded-lg bg-black pt-1", children: jsx$1("span", { className: "text-6 w-6 text-white", children: title.slice(0, 1).toUpperCase() }) }) }), jsxs("div", { children: [jsx$1("h3", { children: title }), description && jsx$1("p", { className: "text-gray-500", children: description })] }), shareable && jsx$1("div", { className: "mb-4 flex w-full justify-start", children: jsx$1("div", { className: "absolute left-8 top-8", children: jsx$1(Icon, { name: "PeopleFill", width: 12, height: 12 }) }) })] });
33266
+ return jsxs("div", { className: twMerge("relative flex h-24 cursor-pointer flex-col items-center justify-center text-center text-sm text-black", containerClassName, onClick && "cursor-pointer"), onClick, children: [jsx$1("div", { className: "mx-auto pb-2", children: icon || jsx$1("div", { className: "size-8 items-center justify-center rounded-lg bg-black pt-1", children: jsx$1("span", { className: "text-6 w-6 text-white", children: title.slice(0, 1).toUpperCase() }) }) }), jsxs("div", { children: [jsx$1("h3", { children: title }), description && jsx$1("p", { className: "text-gray-500", children: description })] }), shareable && jsx$1("div", { className: "absolute left-2 top-0 mb-2", children: jsx$1(Icon, { name: "PeopleFill", width: 12, height: 12 }) })] });
33267
33267
  };
33268
33268
  const HomeScreenAddDriveItem = function HomeScreenAddDriveItem2(props) {
33269
33269
  const { containerClassName, onClick } = props;
@@ -34303,7 +34303,7 @@ const FormMessage = ({ children, type = "info", as, className, ...props }) => {
34303
34303
  info: "text-blue-900 dark:text-blue-900",
34304
34304
  warning: "text-yellow-900 dark:text-yellow-900"
34305
34305
  };
34306
- const classes = twMerge("mb-0 inline-flex items-center text-xs font-medium", typeClasses[type], className);
34306
+ const classes = cn("mb-0 inline-flex items-center text-xs font-medium", typeClasses[type], className);
34307
34307
  return jsx$1(Component2, { "data-type": type, className: classes, ...props, children });
34308
34308
  };
34309
34309
  const FormMessageList = ({ messages, type = "info", className, ...props }) => {
@@ -34346,6 +34346,7 @@ const inputBaseStyles = cn(
34346
34346
  const Input = React.forwardRef(({ className, type, ...props }, ref) => {
34347
34347
  return jsx$1("input", { type, className: cn(inputBaseStyles, className), ref, ...props });
34348
34348
  });
34349
+ Input.displayName = "Input";
34349
34350
  var POPOVER_NAME = "Popover";
34350
34351
  var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
34351
34352
  createPopperScope
@@ -34642,6 +34643,9 @@ const withFieldValidation = (Component2, options2) => {
34642
34643
  const { onChange: onChangeProp, onBlur: onBlurProp } = props;
34643
34644
  const { control, formState: { errors: formErrors, defaultValues }, trigger, setValue, getValues } = useFormContext();
34644
34645
  const { submitCount } = useFormState();
34646
+ if (!name) {
34647
+ throw new Error(`[Field: ${Component2.displayName}] The name prop is required.`);
34648
+ }
34645
34649
  const errors = [
34646
34650
  ...((_a2 = formErrors[name]) == null ? void 0 : _a2.types) ? Object.values(formErrors[name].types ?? []) : []
34647
34651
  ];
@@ -34857,7 +34861,13 @@ const renderIcon = (IconComponent) => {
34857
34861
  }
34858
34862
  return IconComponent && jsx$1(IconComponent, { className: cn("size-4", "text-gray-700 dark:text-gray-400") });
34859
34863
  };
34860
- const Content$2 = ({ searchable, commandListRef, multiple, selectedValues, selectionIcon, selectionIconPosition, options: options2 = [], toggleAll, toggleOption }) => {
34864
+ const CommandItemList = ({ options: options2 = [], selectedValues, multiple, selectionIcon, selectionIconPosition, hasAnyIcon, toggleOption }) => {
34865
+ return jsx$1(Fragment, { children: options2.map((opt) => {
34866
+ const isSelected = selectedValues.includes(opt.value);
34867
+ return jsxs(CommandItem, { value: opt.label, onSelect: () => !opt.disabled && toggleOption(opt.value), disabled: opt.disabled, className: cn("cursor-pointer", "data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900", opt.disabled && "!pointer-events-auto cursor-not-allowed hover:bg-transparent dark:hover:bg-transparent"), role: "option", "aria-selected": isSelected, children: [selectionIcon === "auto" && (multiple ? jsx$1("div", { className: cn("flex size-4 items-center justify-center rounded-md border", "border-gray-700 dark:border-gray-400", isSelected && "bg-gray-900 text-slate-50 dark:bg-gray-400 dark:text-black"), children: isSelected && jsx$1(Icon, { name: "Checkmark", size: 16 }) }) : jsx$1("div", { className: cn("relative size-4 rounded-full border", isSelected ? "border-gray-900 dark:border-gray-400" : "border-gray-800 dark:border-gray-400", "bg-transparent dark:bg-transparent"), children: isSelected && jsx$1("div", { className: "absolute left-1/2 top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-gray-900 dark:bg-gray-400" }) })), selectionIcon === "checkmark" && !(selectionIconPosition === "right" && hasAnyIcon) && jsx$1("div", { className: "size-4", children: selectionIconPosition === "left" && isSelected && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) }), renderIcon(opt.icon), jsx$1("span", { className: cn("flex-1 truncate text-[14px] font-normal leading-4", "text-gray-700 dark:text-gray-500", opt.disabled && "text-gray-600 dark:text-gray-600"), children: opt.label }), selectionIcon === "checkmark" && selectionIconPosition === "right" && jsx$1("div", { className: "size-4", children: isSelected && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) })] }, `favorite-${opt.value}`);
34868
+ }) });
34869
+ };
34870
+ const Content$2 = ({ searchable, commandListRef, multiple, selectedValues, selectionIcon, selectionIconPosition, options: options2 = [], toggleAll, toggleOption, favoriteOptions = [] }) => {
34861
34871
  const enabledOptions = options2.filter((opt) => !opt.disabled);
34862
34872
  const hasAnyIcon = options2.some((opt) => opt.icon);
34863
34873
  const cmdkSearch = P$1((state) => state.search);
@@ -34874,10 +34884,7 @@ const Content$2 = ({ searchable, commandListRef, multiple, selectedValues, selec
34874
34884
  if (!(isOptionsRelatedKey && enabledOptions.length > 0)) {
34875
34885
  e2.stopPropagation();
34876
34886
  }
34877
- }, wrapperClassName: "rounded-t", className: "text-gray-900 dark:text-gray-50" }), jsxs(CommandList, { ref: commandListRef, tabIndex: !searchable ? 0 : void 0, children: [jsx$1(CommandEmpty, { className: "p-4 text-center text-[14px] font-normal leading-5 text-gray-700 dark:text-gray-400", children: "No results found." }), multiple && cmdkSearch === "" && jsx$1(CommandGroup, { className: "pb-0", children: jsx$1(CommandItem, { value: "select-all", onSelect: toggleAll, disabled: false, className: cn("cursor-pointer", "data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900"), role: "option", "aria-selected": selectedValues.length === enabledOptions.length, children: jsxs("div", { className: "flex w-full items-center gap-2", children: [selectionIcon === "auto" && jsx$1("div", { className: cn("flex size-4 items-center justify-center rounded-md border", "border-gray-700 dark:border-gray-400", selectedValues.length === enabledOptions.length && "bg-gray-900 text-slate-50 dark:bg-gray-400 dark:text-black"), children: selectedValues.length === enabledOptions.length && jsx$1(Icon, { name: "Checkmark", size: 16 }) }), selectionIcon === "checkmark" && !(selectionIconPosition === "right" && hasAnyIcon) && jsx$1("div", { className: "size-4", children: selectionIconPosition === "left" && selectedValues.length === enabledOptions.length && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) }), jsx$1("span", { className: "text-[14px] font-semibold leading-4 text-gray-900 dark:text-gray-50", children: selectedValues.length === enabledOptions.length ? "Deselect All" : "Select All" }), selectionIcon === "checkmark" && selectionIconPosition === "right" && jsx$1("div", { className: "ml-auto size-4", children: selectedValues.length === enabledOptions.length && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) })] }) }) }), jsx$1(CommandGroup, { className: multiple && cmdkSearch === "" ? "pt-0" : void 0, children: options2.map((opt) => {
34878
- const isSelected = selectedValues.includes(opt.value);
34879
- return jsxs(CommandItem, { value: opt.label, onSelect: () => !opt.disabled && toggleOption(opt.value), disabled: opt.disabled, className: cn("cursor-pointer", "data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900", opt.disabled && "!pointer-events-auto cursor-not-allowed hover:bg-transparent dark:hover:bg-transparent"), role: "option", "aria-selected": isSelected, children: [selectionIcon === "auto" && (multiple ? jsx$1("div", { className: cn("flex size-4 items-center justify-center rounded-md border", "border-gray-700 dark:border-gray-400", isSelected && "bg-gray-900 text-slate-50 dark:bg-gray-400 dark:text-black"), children: isSelected && jsx$1(Icon, { name: "Checkmark", size: 16 }) }) : jsx$1("div", { className: cn("relative size-4 rounded-full border", isSelected ? "border-gray-900 dark:border-gray-400" : "border-gray-800 dark:border-gray-400", "bg-transparent dark:bg-transparent"), children: isSelected && jsx$1("div", { className: "absolute left-1/2 top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-gray-900 dark:bg-gray-400" }) })), selectionIcon === "checkmark" && !(selectionIconPosition === "right" && hasAnyIcon) && jsx$1("div", { className: "size-4", children: selectionIconPosition === "left" && isSelected && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) }), renderIcon(opt.icon), jsx$1("span", { className: cn("flex-1 truncate text-[14px] font-medium leading-4", "text-gray-700 dark:text-gray-500", opt.disabled && "text-gray-600 dark:text-gray-600"), children: opt.label }), selectionIcon === "checkmark" && selectionIconPosition === "right" && jsx$1("div", { className: "size-4", children: isSelected && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) })] }, opt.value);
34880
- }) })] })] });
34887
+ }, wrapperClassName: "rounded-t", className: "text-gray-900 dark:text-gray-50" }), jsxs(CommandList, { ref: commandListRef, tabIndex: !searchable ? 0 : void 0, children: [jsx$1(CommandEmpty, { className: "p-4 text-center text-[14px] font-normal leading-5 text-gray-700 dark:text-gray-400", children: "No results found." }), multiple && cmdkSearch === "" && jsx$1(CommandGroup, { className: "pb-0", children: jsx$1(CommandItem, { value: "select-all", onSelect: toggleAll, disabled: false, className: cn("cursor-pointer", "data-[selected=true]:bg-gray-100 dark:data-[selected=true]:bg-gray-900"), role: "option", "aria-selected": selectedValues.length === enabledOptions.length, children: jsxs("div", { className: "flex w-full items-center gap-2", children: [selectionIcon === "auto" && jsx$1("div", { className: cn("flex size-4 items-center justify-center rounded-md border", "border-gray-700 dark:border-gray-400", selectedValues.length === enabledOptions.length && "bg-gray-900 text-slate-50 dark:bg-gray-400 dark:text-black"), children: selectedValues.length === enabledOptions.length && jsx$1(Icon, { name: "Checkmark", size: 16 }) }), selectionIcon === "checkmark" && !(selectionIconPosition === "right" && hasAnyIcon) && jsx$1("div", { className: "size-4", children: selectionIconPosition === "left" && selectedValues.length === enabledOptions.length && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) }), jsx$1("span", { className: "text-[14px] font-semibold leading-4 text-gray-900 dark:text-gray-50", children: selectedValues.length === enabledOptions.length ? "Deselect All" : "Select All" }), selectionIcon === "checkmark" && selectionIconPosition === "right" && jsx$1("div", { className: "ml-auto size-4", children: selectedValues.length === enabledOptions.length && jsx$1(Icon, { name: "Checkmark", size: 16, className: "text-gray-900 dark:text-gray-50" }) })] }) }) }), jsxs(CommandGroup, { className: multiple && cmdkSearch === "" ? "pt-0" : void 0, children: [jsx$1(CommandItemList, { options: favoriteOptions, selectedValues, selectionIcon, selectionIconPosition, hasAnyIcon, toggleOption }), favoriteOptions.length > 0 && jsx$1("div", { className: "my-1 border-b border-gray-300 dark:border-gray-600" }), jsx$1(CommandItemList, { options: options2, selectedValues, selectionIcon, selectionIconPosition, hasAnyIcon, toggleOption })] })] })] });
34881
34888
  };
34882
34889
  const SelectedContent = ({ selectedValues, options: options2 = [], multiple, searchable, placeholder, handleClear }) => {
34883
34890
  const renderIcon2 = (IconComponent) => {
@@ -34978,6 +34985,7 @@ function useSelectField({ options: options2 = [], multiple = false, defaultValue
34978
34985
  const SelectFieldRaw = React__default.forwardRef(({
34979
34986
  // core functionality props
34980
34987
  options: options2 = [],
34988
+ favoriteOptions = [],
34981
34989
  defaultValue,
34982
34990
  value,
34983
34991
  onChange: onChange2,
@@ -35032,10 +35040,10 @@ const SelectFieldRaw = React__default.forwardRef(({
35032
35040
  }, children: [jsx$1(PopoverTrigger, { asChild: true, children: jsx$1(Button2, { id, name, type: "button", role: "combobox", onBlur: onTriggerBlur, disabled, "aria-invalid": errors.length > 0, "aria-label": label ? void 0 : multiple ? "Multi select" : "Select", "aria-required": required, "aria-expanded": isPopoverOpen, className: cn("flex h-9 w-full items-center justify-between px-3 py-2", "dark:border-charcoal-700 dark:bg-charcoal-900 rounded-md border border-gray-300 bg-white", "hover:border-gray-300 hover:bg-gray-100", "dark:hover:border-charcoal-700 dark:hover:bg-charcoal-800", "dark:focus:ring-charcoal-300 focus:outline-none focus:ring-1 focus:ring-gray-900 focus:ring-offset-0", "dark:focus-visible:ring-charcoal-300 focus-visible:ring-1 focus-visible:ring-gray-900 focus-visible:ring-offset-0", disabled && [
35033
35041
  "!pointer-events-auto cursor-not-allowed",
35034
35042
  "dark:hover:border-charcoal-700 dark:hover:bg-charcoal-900 hover:border-gray-300 hover:bg-white"
35035
- ], className), ...props, ref, children: jsx$1(SelectedContent, { selectedValues, options: options2, multiple, searchable, placeholder, handleClear }) }) }), jsx$1(PopoverContent, { align: contentAlign, onEscapeKeyDown: (e2) => {
35043
+ ], className), ...props, ref, children: jsx$1(SelectedContent, { selectedValues, options: [...favoriteOptions, ...options2], multiple, searchable, placeholder, handleClear }) }) }), jsx$1(PopoverContent, { align: contentAlign, onEscapeKeyDown: (e2) => {
35036
35044
  e2.preventDefault();
35037
35045
  handleOpenChange(false);
35038
- }, className: contentClassName, children: jsx$1(Command, { defaultValue: !multiple && selectedValues[0] ? (_a2 = options2.find((opt) => opt.value === selectedValues[0])) == null ? void 0 : _a2.label : void 0, children: jsx$1(Content$2, { searchable, commandListRef, multiple, selectedValues, selectionIcon, selectionIconPosition, options: options2, toggleAll, toggleOption }) }) })] }), description && jsx$1(FormDescription, { children: description }), warnings.length > 0 && jsx$1(FormMessageList, { messages: warnings, type: "warning" }), errors.length > 0 && jsx$1(FormMessageList, { messages: errors, type: "error" })] });
35046
+ }, className: contentClassName, children: jsx$1(Command, { defaultValue: !multiple && selectedValues[0] ? (_a2 = options2.find((opt) => opt.value === selectedValues[0])) == null ? void 0 : _a2.label : void 0, children: jsx$1(Content$2, { favoriteOptions, searchable, commandListRef, multiple, selectedValues, selectionIcon, selectionIconPosition, options: options2, toggleAll, toggleOption }) }) })] }), description && jsx$1(FormDescription, { children: description }), warnings.length > 0 && jsx$1(FormMessageList, { messages: warnings, type: "warning" }), errors.length > 0 && jsx$1(FormMessageList, { messages: errors, type: "error" })] });
35039
35047
  });
35040
35048
  const SelectField = withFieldValidation(SelectFieldRaw);
35041
35049
  SelectField.displayName = "SelectField";
@@ -52062,15 +52070,8 @@ function atomFamily(initializeAtom, areEqual) {
52062
52070
  const listeners = /* @__PURE__ */ new Set();
52063
52071
  const createAtom = (param) => {
52064
52072
  let item;
52065
- if (areEqual === void 0) {
52073
+ {
52066
52074
  item = atoms2.get(param);
52067
- } else {
52068
- for (const [key, value] of atoms2) {
52069
- if (areEqual(key, param)) {
52070
- item = value;
52071
- break;
52072
- }
52073
- }
52074
52075
  }
52075
52076
  if (item !== void 0) {
52076
52077
  if (shouldRemove == null ? void 0 : shouldRemove(item[1], param)) {
@@ -70592,7 +70593,7 @@ const useFilteredDocumentModels = () => {
70592
70593
  };
70593
70594
  const LOCAL_DOCUMENT_EDITORS = window.__VITE_ENVS.LOCAL_DOCUMENT_EDITORS;
70594
70595
  async function loadBaseEditors() {
70595
- const documentModelEditor = await __vitePreload(() => import("./index-DsshaiFd.js"), true ? __vite__mapDeps([4,2,1,3]) : void 0);
70596
+ const documentModelEditor = await __vitePreload(() => import("./index-svE1s-4x.js"), true ? __vite__mapDeps([4,2,1,3]) : void 0);
70596
70597
  await __vitePreload(() => Promise.resolve({}), true ? __vite__mapDeps([5]) : void 0);
70597
70598
  const module = documentModelEditor.documentModelEditorModule;
70598
70599
  return [module];
@@ -70758,11 +70759,11 @@ const connectCrypto = (async () => {
70758
70759
  return window.connectCrypto;
70759
70760
  }
70760
70761
  const { ConnectCrypto } = await __vitePreload(async () => {
70761
- const { ConnectCrypto: ConnectCrypto2 } = await import("./index-JG4cqDHe.js");
70762
+ const { ConnectCrypto: ConnectCrypto2 } = await import("./index-C4nkPxsU.js");
70762
70763
  return { ConnectCrypto: ConnectCrypto2 };
70763
70764
  }, true ? __vite__mapDeps([6,1,2,3]) : void 0);
70764
70765
  const { BrowserKeyStorage } = await __vitePreload(async () => {
70765
- const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-JG4cqDHe.js");
70766
+ const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-C4nkPxsU.js");
70766
70767
  return { BrowserKeyStorage: BrowserKeyStorage2 };
70767
70768
  }, true ? __vite__mapDeps([6,1,2,3]) : void 0);
70768
70769
  const connectCrypto2 = new ConnectCrypto(new BrowserKeyStorage());
@@ -70811,7 +70812,7 @@ function useRenown() {
70811
70812
  return;
70812
70813
  }
70813
70814
  const { initRenownBrowser } = await __vitePreload(async () => {
70814
- const { initRenownBrowser: initRenownBrowser2 } = await import("./index-JG4cqDHe.js");
70815
+ const { initRenownBrowser: initRenownBrowser2 } = await import("./index-C4nkPxsU.js");
70815
70816
  return { initRenownBrowser: initRenownBrowser2 };
70816
70817
  }, true ? __vite__mapDeps([6,1,2,3]) : void 0);
70817
70818
  const renownBrowser = initRenownBrowser(did2);
@@ -78327,9 +78328,13 @@ const DangerZone = ({
78327
78328
  const { clearStorage } = useDocumentDriveServer();
78328
78329
  const { driveNodes, deleteDrive } = useUiNodes();
78329
78330
  const { showModal } = useModal();
78331
+ const navigate = useNavigate();
78330
78332
  const handleDeleteDrive = useCallback(
78331
- (drive) => deleteDrive(drive.driveId),
78332
- [deleteDrive]
78333
+ async (drive) => {
78334
+ navigate("/");
78335
+ await deleteDrive(drive.driveId);
78336
+ },
78337
+ [deleteDrive, navigate]
78333
78338
  );
78334
78339
  const handleClearStorage = () => {
78335
78340
  showModal("confirmationModal", {
@@ -79043,7 +79048,7 @@ function Root() {
79043
79048
  });
79044
79049
  return unsubscribe;
79045
79050
  }, [navigate]);
79046
- return /* @__PURE__ */ jsxs("div", { className: "h-screen", children: [
79051
+ return /* @__PURE__ */ jsx$1(ModalManager, { children: /* @__PURE__ */ jsxs("div", { className: "h-screen", children: [
79047
79052
  isElectron && /* @__PURE__ */ jsxs(
79048
79053
  "div",
79049
79054
  {
@@ -79070,7 +79075,7 @@ function Root() {
79070
79075
  ] })
79071
79076
  }
79072
79077
  )
79073
- ] });
79078
+ ] }) });
79074
79079
  }
79075
79080
  function getDriveIcon(driveNode) {
79076
79081
  if (driveNode.icon) {
@@ -79125,7 +79130,7 @@ function Home() {
79125
79130
  /* @__PURE__ */ jsx$1(HomeScreenAddDriveItem, { onClick: onAddDriveClick })
79126
79131
  ] });
79127
79132
  }
79128
- const Content = React__default.lazy(() => __vitePreload(() => import("./content-u99MkPmr.js"), true ? __vite__mapDeps([7,2,1,3]) : void 0));
79133
+ const Content = React__default.lazy(() => __vitePreload(() => import("./content-CqOHLc-O.js"), true ? __vite__mapDeps([7,2,1,3]) : void 0));
79129
79134
  async function createRouter(routes) {
79130
79135
  var _a2;
79131
79136
  const isPackaged = await ((_a2 = window.electronAPI) == null ? void 0 : _a2.isPackaged());
@@ -79201,11 +79206,9 @@ const App = () => /* @__PURE__ */ jsx$1(React__default.StrictMode, { children: /
79201
79206
  /* @__PURE__ */ jsx$1(Preloader, {}),
79202
79207
  /* @__PURE__ */ jsx$1(WagmiContext, { children: /* @__PURE__ */ jsx$1(RootProvider, { children: /* @__PURE__ */ jsx$1(ReadModeContextProvider, { children: /* @__PURE__ */ jsxs(UiNodesContextProvider, { children: [
79203
79208
  /* @__PURE__ */ jsx$1(ToastContainer, { position: "bottom-right" }),
79204
- /* @__PURE__ */ jsxs(ModalManager, { children: [
79205
- /* @__PURE__ */ jsx$1(Router, {}),
79206
- /* @__PURE__ */ jsx$1(CookieBanner, {}),
79207
- /* @__PURE__ */ jsx$1(Analytics, {})
79208
- ] })
79209
+ /* @__PURE__ */ jsx$1(Router, {}),
79210
+ /* @__PURE__ */ jsx$1(CookieBanner, {}),
79211
+ /* @__PURE__ */ jsx$1(Analytics, {})
79209
79212
  ] }) }) }) })
79210
79213
  ] }) }) });
79211
79214
  const app = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1082,8 +1082,7 @@
1082
1082
  @layer theme, base, components, utilities;
1083
1083
  @layer theme {
1084
1084
  :root, :host {
1085
- --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
1086
- "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
1085
+ --font-sans: "Inter", sans-serif;
1087
1086
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
1088
1087
  "Courier New", monospace;
1089
1088
  --color-red-100: hsl(3 82% 96%);
@@ -5305,8 +5304,10 @@ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-o
5305
5304
  input[type="number"] {
5306
5305
  -moz-appearance: textfield;
5307
5306
  }
5308
- h1, h2, h3, h4, h5, h6, p {
5309
- color: var(--color-gray-900);
5307
+ @layer base {
5308
+ h1, h2, h3, h4, h5, h6, p {
5309
+ color: var(--color-gray-900);
5310
+ }
5310
5311
  }
5311
5312
  @property --tw-translate-x {
5312
5313
  syntax: "*";
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-BER6qvV4.js","assets/main.DeO3pt4e.js","assets/app-CSi6MS9b.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-Cx6yVoWZ.js","assets/main.BHov_sDD.js","assets/app-OVm0Zlli.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.DeO3pt4e.js";
14
+ import { _ as __vitePreload } from "./main.BHov_sDD.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) {
@@ -23791,57 +23791,56 @@ class MemoryStorage {
23791
23791
  constructor() {
23792
23792
  __publicField(this, "documents");
23793
23793
  __publicField(this, "drives");
23794
+ __publicField(this, "driveManifests");
23794
23795
  __publicField(this, "slugToDriveId", {});
23795
23796
  this.documents = {};
23796
23797
  this.drives = {};
23798
+ this.driveManifests = {};
23797
23799
  }
23798
- exists(id) {
23799
- for (const drive of Object.values(this.documents)) {
23800
- if (drive[id]) {
23801
- return Promise.resolve(true);
23802
- }
23803
- }
23804
- return Promise.resolve(false);
23800
+ ////////////////////////////////
23801
+ // IDocumentStorage
23802
+ ////////////////////////////////
23803
+ exists(documentId) {
23804
+ return Promise.resolve(!!this.documents[documentId]);
23805
+ }
23806
+ create(documentId, document) {
23807
+ this.documents[documentId] = document;
23808
+ return Promise.resolve();
23805
23809
  }
23810
+ ////////////////////////////////
23811
+ // IDriveStorage
23812
+ ////////////////////////////////
23806
23813
  checkDocumentExists(drive, id) {
23807
23814
  return this.exists(id);
23808
23815
  }
23809
- async getDocuments(drive) {
23810
- return Object.keys(this.documents[drive] ?? {});
23816
+ getDocuments(drive) {
23817
+ const manifest = this.getDriveManifest(drive);
23818
+ return Promise.resolve([...manifest.documentIds]);
23811
23819
  }
23812
23820
  async getDocument(driveId, id) {
23813
- const drive = this.documents[driveId];
23814
- if (!drive) {
23815
- throw new DriveNotFoundError(driveId);
23816
- }
23817
- const document = drive[id];
23821
+ const document = this.documents[id];
23818
23822
  if (!document) {
23819
23823
  throw new Error(`Document with id ${id} not found`);
23820
23824
  }
23821
23825
  return document;
23822
23826
  }
23823
23827
  async saveDocument(drive, id, document) {
23824
- this.documents[drive] = this.documents[drive] ?? {};
23825
- this.documents[drive][id] = document;
23828
+ this.documents[id] = document;
23829
+ const manifest = this.getDriveManifest(drive);
23830
+ manifest.documentIds.add(id);
23831
+ this.updateDriveManifest(drive, manifest);
23826
23832
  }
23827
23833
  async clearStorage() {
23828
23834
  this.documents = {};
23829
23835
  this.drives = {};
23836
+ this.driveManifests = {};
23837
+ this.slugToDriveId = {};
23830
23838
  }
23831
23839
  async createDocument(drive, id, document) {
23832
- this.documents[drive] = this.documents[drive] ?? {};
23833
- const { operations, initialState, name: name2, revision, documentType: documentType2, created, lastModified, clipboard, state } = document;
23834
- this.documents[drive][id] = {
23835
- operations,
23836
- initialState,
23837
- name: name2,
23838
- revision,
23839
- documentType: documentType2,
23840
- created,
23841
- lastModified,
23842
- clipboard,
23843
- state
23844
- };
23840
+ await this.create(id, document);
23841
+ const manifest = this.getDriveManifest(drive);
23842
+ manifest.documentIds.add(id);
23843
+ this.updateDriveManifest(drive, manifest);
23845
23844
  }
23846
23845
  async addDocumentOperations(drive, id, operations, header) {
23847
23846
  const document = await this.getDocument(drive, id);
@@ -23849,17 +23848,22 @@ class MemoryStorage {
23849
23848
  throw new Error(`Document with id ${id} not found`);
23850
23849
  }
23851
23850
  const mergedOperations = mergeOperations(document.operations, operations);
23852
- this.documents[drive][id] = {
23851
+ this.documents[id] = {
23853
23852
  ...document,
23854
23853
  ...header,
23855
23854
  operations: mergedOperations
23856
23855
  };
23857
23856
  }
23858
23857
  async deleteDocument(drive, id) {
23859
- if (!this.documents[drive]) {
23860
- throw new DriveNotFoundError(drive);
23858
+ const drives = await this.getDrives();
23859
+ for (const driveId of drives) {
23860
+ const manifest = this.getDriveManifest(driveId);
23861
+ if (manifest.documentIds.has(id)) {
23862
+ manifest.documentIds.delete(id);
23863
+ this.updateDriveManifest(driveId, manifest);
23864
+ }
23861
23865
  }
23862
- delete this.documents[drive][id];
23866
+ delete this.documents[id];
23863
23867
  }
23864
23868
  async getDrives() {
23865
23869
  return Object.keys(this.drives);
@@ -23880,7 +23884,7 @@ class MemoryStorage {
23880
23884
  }
23881
23885
  async createDrive(id, drive) {
23882
23886
  this.drives[id] = drive;
23883
- this.documents[id] = {};
23887
+ this.updateDriveManifest(id, { documentIds: /* @__PURE__ */ new Set() });
23884
23888
  const { slug } = drive.initialState.state.global;
23885
23889
  if (slug) {
23886
23890
  this.slugToDriveId[slug] = id;
@@ -23896,8 +23900,27 @@ class MemoryStorage {
23896
23900
  };
23897
23901
  }
23898
23902
  async deleteDrive(id) {
23899
- delete this.documents[id];
23903
+ const manifest = this.getDriveManifest(id);
23904
+ const drives = await this.getDrives();
23905
+ await Promise.all([...manifest.documentIds].map((docId) => {
23906
+ for (const driveId of drives) {
23907
+ if (driveId === id) {
23908
+ continue;
23909
+ }
23910
+ const manifest2 = this.getDriveManifest(driveId);
23911
+ if (manifest2.documentIds.has(docId)) {
23912
+ return;
23913
+ }
23914
+ }
23915
+ delete this.documents[docId];
23916
+ }));
23917
+ delete this.driveManifests[id];
23900
23918
  delete this.drives[id];
23919
+ for (const [slug, driveId] of Object.entries(this.slugToDriveId)) {
23920
+ if (driveId === id) {
23921
+ delete this.slugToDriveId[slug];
23922
+ }
23923
+ }
23901
23924
  }
23902
23925
  async getSynchronizationUnitsRevision(units) {
23903
23926
  const results = await Promise.allSettled(units.map(async (unit) => {
@@ -23928,6 +23951,18 @@ class MemoryStorage {
23928
23951
  return acc;
23929
23952
  }, []);
23930
23953
  }
23954
+ ////////////////////////////////
23955
+ // Private
23956
+ ////////////////////////////////
23957
+ getDriveManifest(driveId) {
23958
+ if (!this.driveManifests[driveId]) {
23959
+ this.driveManifests[driveId] = { documentIds: /* @__PURE__ */ new Set() };
23960
+ }
23961
+ return this.driveManifests[driveId];
23962
+ }
23963
+ updateDriveManifest(driveId, manifest) {
23964
+ this.driveManifests[driveId] = manifest;
23965
+ }
23931
23966
  }
23932
23967
  class DefaultEventEmitter {
23933
23968
  constructor() {
@@ -25495,7 +25530,7 @@ const nodeOptionsMap = {
25495
25530
  };
25496
25531
  const name = "@powerhousedao/connect";
25497
25532
  const productName = "Powerhouse-Connect";
25498
- const version$1 = "1.0.0-dev.239";
25533
+ const version$1 = "1.0.0-dev.241";
25499
25534
  const description = "Powerhouse Connect";
25500
25535
  const main = "./dist/index.html";
25501
25536
  const type = "module";
@@ -28288,20 +28323,21 @@ const _BrowserStorage = class _BrowserStorage {
28288
28323
  name: namespace ? `${namespace}:${_BrowserStorage.DBName}` : _BrowserStorage.DBName
28289
28324
  }));
28290
28325
  }
28291
- buildDriveKey(driveId) {
28292
- return `${_BrowserStorage.DRIVES_KEY}${_BrowserStorage.SEP}${driveId}`;
28293
- }
28294
- buildDocumentKey(documentId) {
28295
- return `${_BrowserStorage.DOCUMENT_KEY}${_BrowserStorage.SEP}${documentId}`;
28296
- }
28297
- buildManifestKey(driveId) {
28298
- return `${_BrowserStorage.MANIFEST_KEY}${_BrowserStorage.SEP}${driveId}`;
28299
- }
28326
+ ////////////////////////////////
28327
+ // IDocumentStorage
28328
+ ////////////////////////////////
28300
28329
  async exists(documentId) {
28301
28330
  const db = await this.db;
28302
28331
  const document = await db.getItem(this.buildDocumentKey(documentId));
28303
28332
  return !!document;
28304
28333
  }
28334
+ async create(documentId, document) {
28335
+ const db = await this.db;
28336
+ await db.setItem(this.buildDocumentKey(documentId), document);
28337
+ }
28338
+ ////////////////////////////////
28339
+ // IDriveStorage
28340
+ ////////////////////////////////
28305
28341
  checkDocumentExists(drive, documentId) {
28306
28342
  return this.exists(documentId);
28307
28343
  }
@@ -28326,8 +28362,7 @@ const _BrowserStorage = class _BrowserStorage {
28326
28362
  return document;
28327
28363
  }
28328
28364
  async createDocument(drive, id, document) {
28329
- const db = await this.db;
28330
- await db.setItem(this.buildDocumentKey(id), document);
28365
+ await this.create(id, document);
28331
28366
  const manifest = await this.getDriveManifest(drive);
28332
28367
  if (!manifest.documentIds.includes(id)) {
28333
28368
  manifest.documentIds.push(id);
@@ -28456,6 +28491,18 @@ const _BrowserStorage = class _BrowserStorage {
28456
28491
  return (await this.db).setItem(this.buildDocumentKey(id), migratedDocument);
28457
28492
  }
28458
28493
  }
28494
+ ////////////////////////////////
28495
+ // Private methods
28496
+ ////////////////////////////////
28497
+ buildDriveKey(driveId) {
28498
+ return `${_BrowserStorage.DRIVES_KEY}${_BrowserStorage.SEP}${driveId}`;
28499
+ }
28500
+ buildDocumentKey(documentId) {
28501
+ return `${_BrowserStorage.DOCUMENT_KEY}${_BrowserStorage.SEP}${documentId}`;
28502
+ }
28503
+ buildManifestKey(driveId) {
28504
+ return `${_BrowserStorage.MANIFEST_KEY}${_BrowserStorage.SEP}${driveId}`;
28505
+ }
28459
28506
  };
28460
28507
  __publicField(_BrowserStorage, "DBName", "DOCUMENT_DRIVES");
28461
28508
  __publicField(_BrowserStorage, "SEP", ":");
@@ -31065,7 +31112,7 @@ if (window.__VITE_ENVS.MODE === "development") {
31065
31112
  } else {
31066
31113
  serviceWorkerManager.registerServiceWorker(false);
31067
31114
  }
31068
- const App = lazy(() => __vitePreload(() => import("./app-BER6qvV4.js").then((n) => n.aN), true ? __vite__mapDeps([0,1,2]) : void 0));
31115
+ const App = lazy(() => __vitePreload(() => import("./app-Cx6yVoWZ.js").then((n) => n.aN), true ? __vite__mapDeps([0,1,2]) : void 0));
31069
31116
  const AppLoader = /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(App, {}) });
31070
31117
  const appLoader = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31071
31118
  __proto__: null,
@@ -826,6 +826,10 @@
826
826
  }
827
827
  }
828
828
  @layer base {
829
+ h1, h2, h3, h4, h5, h6, p {
830
+ color: var(--color-gray-900);
831
+ }
832
+
829
833
  *, :after, :before, ::backdrop {
830
834
  box-sizing: border-box;
831
835
  border: 0 solid;
@@ -5120,9 +5124,6 @@ input[type="number"]::-webkit-outer-spin-button {
5120
5124
  input[type="number"] {
5121
5125
  -moz-appearance: textfield;
5122
5126
  }
5123
- h1, h2, h3, h4, h5, h6, p {
5124
- color: var(--color-gray-900);
5125
- }
5126
5127
  @property --tw-translate-x {
5127
5128
  syntax: "*";
5128
5129
  inherits: false;
@@ -1,7 +1,7 @@
1
- import { aD as BaseError, aE as getUrl, aF as stringify, aG as decodeErrorResult, aH as isAddressEqual, aI as call, aJ as concat, aK as encodeAbiParameters, aL as HttpRequestError, aM as isHex } from "./app-BER6qvV4.js";
2
- import "./main.DeO3pt4e.js";
1
+ import { aD as BaseError, aE as getUrl, aF as stringify, aG as decodeErrorResult, aH as isAddressEqual, aI as call, aJ as concat, aK as encodeAbiParameters, aL as HttpRequestError, aM as isHex } from "./app-Cx6yVoWZ.js";
2
+ import "./main.BHov_sDD.js";
3
3
  import "react/jsx-runtime";
4
- import "./app-loader-B1j0wjOh.js";
4
+ import "./app-loader-CAYRtGE1.js";
5
5
  import "react";
6
6
  import "@powerhousedao/reactor-browser";
7
7
  import "react-dom";
@@ -1,8 +1,8 @@
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, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById } from "./app-BER6qvV4.js";
2
+ import { t as twMerge, B as Button, m as mergeClassNameProps, E as ERROR, M as MISSING, C as CONFLICT, S as SUCCESS, h as SYNCING, I as INITIAL_SYNC, i as ConnectDropdownMenu, u as useOnClickOutside, j as useEventListener, k as useCopyToClipboard, l as Select, n as ENSAvatar, P as Provider, o as Root3, T as Trigger, p as Portal, q as Content2, v as validateInitialState, w as validateStateSchemaName, x as validateModules, y as useUnwrappedReactor, z as useConnectDid, A as useConnectCrypto, D as useTranslation, F as useModal, G as useAtomValue, H as themeAtom, J as useUser, K as useUserPermissions, L as useUiNodes, N as exportFile, O as useGetDocumentModelModule, Q as addActionContext, U as signOperation, V as useDocumentDriveServer, W as useHotkeys, X as useGetEditor, Y as isSameDocument, Z as useNavigate, _ as ErrorBoundary, $ as DriveLayout, a0 as SearchBar, a1 as useAsyncReactor, a2 as useFilteredDocumentModels, a3 as useDriveEditor, a4 as useDocumentDriveById } from "./app-Cx6yVoWZ.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, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-B1j0wjOh.js";
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, aO as DRIVE, ay as FILE, b7 as undo, b8 as redo, ac as logger, b9 as useDocumentDispatch, aP as FOLDER, ak as driveDocumentModelModule } from "./app-loader-CAYRtGE1.js";
6
6
  import { useDocument, useDocumentEditorProps } from "@powerhousedao/reactor-browser";
7
7
  import { useUiNodesContext, FILE as FILE$1 } from "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
8
8
  import { useDriveActionsWithUiNodes } from "@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes";
@@ -10,7 +10,7 @@ import { useDriveContext, DriveContextProvider } from "@powerhousedao/reactor-br
10
10
  import "@powerhousedao/reactor-browser/uiNodes/constants";
11
11
  import { makeDriveDocumentStateHook } from "@powerhousedao/reactor-browser/hooks/document-state";
12
12
  import { flushSync } from "react-dom";
13
- import "./main.DeO3pt4e.js";
13
+ import "./main.BHov_sDD.js";
14
14
  const ConnectLoaderVideo = "/assets/connect-loader-CvOC68Ih.mp4";
15
15
  const PaginationButton = ({ active = false, ...props }) => {
16
16
  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 +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.DeO3pt4e.js";
14
- import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-B1j0wjOh.js";
15
- import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-BER6qvV4.js";
16
- import { d, c, b, f, a, r, s } from "./app-BER6qvV4.js";
13
+ import { _ as __vitePreload } from "./main.BHov_sDD.js";
14
+ import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-CAYRtGE1.js";
15
+ import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-Cx6yVoWZ.js";
16
+ import { d, c, b, f, a, r, s } from "./app-Cx6yVoWZ.js";
17
17
  import "react/jsx-runtime";
18
18
  import "react";
19
19
  import "@powerhousedao/reactor-browser";
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-B1j0wjOh.js","assets/main.DeO3pt4e.js","assets/app-loader-9W65A3zy.css"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./main.DeO3pt4e.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-CAYRtGE1.js","assets/main.BHov_sDD.js","assets/app-loader-Vi763_LE.css"])))=>i.map(i=>d[i]);
2
+ import { _ as __vitePreload } from "./main.BHov_sDD.js";
3
3
  import { createRoot } from "react-dom/client";
4
4
  async function renderApp(element) {
5
- const AppLoader = await __vitePreload(() => import("./app-loader-B1j0wjOh.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
5
+ const AppLoader = await __vitePreload(() => import("./app-loader-CAYRtGE1.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
6
6
  createRoot(element).render(AppLoader.default);
7
7
  }
8
8
  const AppElement = document.getElementById("app");