@powerhousedao/connect 1.0.0-dev.228 → 1.0.0-dev.230

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 (139) hide show
  1. package/dist/assets/{app-CQhZN-Ec.js → app-DFnQ1BMb.js} +5017 -2508
  2. package/dist/assets/{app-loader-DykYCv9Q.js → app-loader-ujMDPzk5.js} +540 -83
  3. package/dist/assets/{ccip-Cx96FM_X.js → ccip-B7zSSHTp.js} +4 -4
  4. package/dist/assets/{content-B18Ti-EB.js → content-BLxY-gof.js} +96 -66
  5. package/dist/assets/{index-Ba6Va6Gt.js → index-8UlRH4V9.js} +3 -3
  6. package/dist/assets/{index-zi_DFjYh.js → index-CHCqTLv0.js} +4 -4
  7. package/dist/assets/{index-DyYrVJC0.js → index-oWPd1WPf.js} +80 -34
  8. package/dist/assets/{main.D_dHa-Dm.js → main.DASyOflT.js} +1 -1
  9. package/dist/index.html +1 -1
  10. package/dist/modules/@powerhousedao/reactor-browser/{chunk-C3OQGBKD.js → chunk-2E6C3NB7.js} +51 -30
  11. package/dist/modules/@powerhousedao/reactor-browser/{chunk-YIBO3HUQ.js → chunk-45DCPCA7.js} +1 -1
  12. package/dist/modules/@powerhousedao/reactor-browser/{chunk-NNVEKADD.js → chunk-F3RCGUF6.js} +2 -2
  13. package/dist/modules/@powerhousedao/reactor-browser/{chunk-IIX6OOYS.js → chunk-F4K6ICY4.js} +1 -1
  14. package/dist/modules/@powerhousedao/reactor-browser/{chunk-D2ZLIUVV.js → chunk-FW7N6EJH.js} +378 -337
  15. package/dist/modules/@powerhousedao/reactor-browser/{chunk-AVKPBC5Q.js → chunk-G6LMXRY5.js} +1 -1
  16. package/dist/modules/@powerhousedao/reactor-browser/{chunk-6VFLMUEK.js → chunk-JWR2PSS2.js} +1 -1
  17. package/dist/modules/@powerhousedao/reactor-browser/{chunk-56M56AY3.js → chunk-M2UUQ5LH.js} +4 -4
  18. package/dist/modules/@powerhousedao/reactor-browser/{chunk-X7WYJJFB.js → chunk-NUW2A4R5.js} +1 -1
  19. package/dist/modules/@powerhousedao/reactor-browser/{chunk-Y2S6GVIW.js → chunk-RSZCDZGH.js} +60 -20
  20. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  21. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  22. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
  23. package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
  24. package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
  25. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
  26. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
  27. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  28. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  29. package/dist/modules/@powerhousedao/reactor-browser/index.js +10 -10
  30. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  31. package/dist/vite-envs.sh +1 -1
  32. package/package.json +6 -6
  33. package/dist/assets/ArrowFilledRight-64XHqK_h.js +0 -7
  34. package/dist/assets/ArrowLeft-cTTfZFZ1.js +0 -7
  35. package/dist/assets/ArrowUp-DZrDe-Bp.js +0 -7
  36. package/dist/assets/BarChart-DT4puBXm.js +0 -7
  37. package/dist/assets/BaseArrowLeft-G433oBpP.js +0 -7
  38. package/dist/assets/BaseArrowRight-cpxwDGIe.js +0 -7
  39. package/dist/assets/Braces-CJktWttT.js +0 -7
  40. package/dist/assets/Branch-iPu-a2T3.js +0 -7
  41. package/dist/assets/BrickGlobe-BZrrYdL4.js +0 -7
  42. package/dist/assets/Briefcase-XpuJYuUR.js +0 -7
  43. package/dist/assets/Calendar-Dt0VwGrR.js +0 -7
  44. package/dist/assets/CalendarTime-CwwzsmKX.js +0 -7
  45. package/dist/assets/Caret-ZEgiNBNU.js +0 -7
  46. package/dist/assets/CaretDown-DP6bOwI2.js +0 -7
  47. package/dist/assets/CaretLeft-BD_N0UUw.js +0 -7
  48. package/dist/assets/CaretRight-DWPoTF9X.js +0 -7
  49. package/dist/assets/CaretSort-Bw0XHsjI.js +0 -7
  50. package/dist/assets/Check-cqhfhLxP.js +0 -7
  51. package/dist/assets/CheckCircle-DH9iEyZM.js +0 -7
  52. package/dist/assets/CheckCircleFill-DXFYGKQ5.js +0 -7
  53. package/dist/assets/Checkmark-9n4byVGp.js +0 -7
  54. package/dist/assets/ChevronDown-DvTsRsq2.js +0 -7
  55. package/dist/assets/Circle-B2Lns-7w.js +0 -7
  56. package/dist/assets/CircleInfo-1kjSg19s.js +0 -7
  57. package/dist/assets/Clock-BGRQRM60.js +0 -7
  58. package/dist/assets/ClockFill-Bvmknv7u.js +0 -7
  59. package/dist/assets/CloudSlash-DPvYwLm3.js +0 -7
  60. package/dist/assets/Collapse-D5jXkhQz.js +0 -7
  61. package/dist/assets/Compass-C76eC2wG.js +0 -7
  62. package/dist/assets/Connect-DZiPc2IO.js +0 -7
  63. package/dist/assets/ConnectSmall-C4hYVYQO.js +0 -7
  64. package/dist/assets/Copy-CoVU9BJY.js +0 -7
  65. package/dist/assets/Created-DzIi8Oqs.js +0 -7
  66. package/dist/assets/CrossCircle-Cz9Xbcsr.js +0 -7
  67. package/dist/assets/Danger-DkDnPFWT.js +0 -7
  68. package/dist/assets/DescendenceModified-342EmN5F.js +0 -7
  69. package/dist/assets/Discord-C9rQaS93.js +0 -7
  70. package/dist/assets/DownloadFile-CG56Of8p.js +0 -7
  71. package/dist/assets/Drive-gptzvasW.js +0 -7
  72. package/dist/assets/Duplicated-C2v6xG93.js +0 -7
  73. package/dist/assets/Edit-BWdYDo8C.js +0 -7
  74. package/dist/assets/Ellipsis-_Yp_-wDZ.js +0 -7
  75. package/dist/assets/Error-Bf2pG8sD.js +0 -7
  76. package/dist/assets/Exclamation-DLUhwcPI.js +0 -7
  77. package/dist/assets/ExportCsv-C7-cdsgH.js +0 -7
  78. package/dist/assets/ExportJson-dmS3d6_7.js +0 -7
  79. package/dist/assets/ExportPdf-DwZayNuB.js +0 -7
  80. package/dist/assets/ExportUbl-DwfYquKC.js +0 -7
  81. package/dist/assets/ExportZip-v1bseKb6.js +0 -7
  82. package/dist/assets/File-C3wkPB_r.js +0 -7
  83. package/dist/assets/FilesEarmark-CgUelQay.js +0 -7
  84. package/dist/assets/FolderClose-BvAQd6IG.js +0 -7
  85. package/dist/assets/FolderOpen-Bma1Ngbb.js +0 -7
  86. package/dist/assets/FolderPlus-Dn00AVa8.js +0 -7
  87. package/dist/assets/Forum-C-dTIstS.js +0 -7
  88. package/dist/assets/Gear-B58aepsd.js +0 -7
  89. package/dist/assets/Github-YaYviWSS.js +0 -7
  90. package/dist/assets/Globe-BGlyCRpD.js +0 -7
  91. package/dist/assets/GlobeWww-B1pUKxRP.js +0 -7
  92. package/dist/assets/Hdd-Bk7BpLL-.js +0 -7
  93. package/dist/assets/History-CDfNjY3P.js +0 -7
  94. package/dist/assets/InfoSquare-CLtlquCL.js +0 -7
  95. package/dist/assets/Link-BHshUK_k.js +0 -7
  96. package/dist/assets/Linkedin-BSk0sey6.js +0 -7
  97. package/dist/assets/Lock-BFCeokdp.js +0 -7
  98. package/dist/assets/M-V6iG_x6o.js +0 -7
  99. package/dist/assets/Modified-D04FuhUt.js +0 -7
  100. package/dist/assets/Moved-D3mS-uot.js +0 -7
  101. package/dist/assets/PackageManager-1Wpl0DVS.js +0 -7
  102. package/dist/assets/Pencil-aiwjx26f.js +0 -7
  103. package/dist/assets/People-CgDbL4kS.js +0 -7
  104. package/dist/assets/PeopleFill-CUgqKMA4.js +0 -7
  105. package/dist/assets/Person-B0cfH7KV.js +0 -7
  106. package/dist/assets/Pin-CeMtNsZD.js +0 -7
  107. package/dist/assets/PinFilled-DsQqlbF3.js +0 -7
  108. package/dist/assets/Plus-CtnpCWqG.js +0 -7
  109. package/dist/assets/PlusCircle-BOEotEGi.js +0 -7
  110. package/dist/assets/PlusSquare-fWkZh3-r.js +0 -7
  111. package/dist/assets/PowerhouseLogoSmall-CgaHbPzx.js +0 -7
  112. package/dist/assets/Project-D33G_Tlb.js +0 -7
  113. package/dist/assets/QuestionSquare-Cilqw-NF.js +0 -7
  114. package/dist/assets/RedoArrow-BZg6K-nT.js +0 -7
  115. package/dist/assets/Reload-DSYHnfCV.js +0 -7
  116. package/dist/assets/Removed-B35cyBgu.js +0 -7
  117. package/dist/assets/Renown-DdF-DRzW.js +0 -7
  118. package/dist/assets/RenownHover-ayMKqS2y.js +0 -7
  119. package/dist/assets/Ring-DDC_wea5.js +0 -7
  120. package/dist/assets/Save-BqsDjvWT.js +0 -7
  121. package/dist/assets/Search-BmJu6qh2.js +0 -7
  122. package/dist/assets/Server-BsTH0P96.js +0 -7
  123. package/dist/assets/Settings-wzKf1ItW.js +0 -7
  124. package/dist/assets/Synced-BREnp3Gk.js +0 -7
  125. package/dist/assets/Syncing-oLFcuSQr.js +0 -7
  126. package/dist/assets/Tabler-Dd4wGhvu.js +0 -7
  127. package/dist/assets/Trash-C2Az1OA8.js +0 -7
  128. package/dist/assets/TrashFill-Cop-3QYY.js +0 -7
  129. package/dist/assets/TreeViewSlash-C5vFO1Yq.js +0 -7
  130. package/dist/assets/TriangleDown-BJdJslsa.js +0 -7
  131. package/dist/assets/Tube-CxlaYTDX.js +0 -7
  132. package/dist/assets/VariantArrowLeft-DfAacH04.js +0 -7
  133. package/dist/assets/VerticalDots-B4dDMl7Z.js +0 -7
  134. package/dist/assets/WarningFill-Drxpmg7X.js +0 -7
  135. package/dist/assets/XTwitter-C0dxLb5W.js +0 -7
  136. package/dist/assets/Xmark-DZtv823K.js +0 -7
  137. package/dist/assets/XmarkLight-BYzxLa1T.js +0 -7
  138. package/dist/assets/Youtube-DnhnDSfB.js +0 -7
  139. package/dist/assets/types-DJg5CO3J.js +0 -111
@@ -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-CQhZN-Ec.js";
2
- import "./main.D_dHa-Dm.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-DFnQ1BMb.js";
2
+ import "./main.DASyOflT.js";
3
3
  import "react/jsx-runtime";
4
- import "./app-loader-DykYCv9Q.js";
4
+ import "./app-loader-ujMDPzk5.js";
5
5
  import "react";
6
6
  import "@powerhousedao/reactor-browser";
7
7
  import "react-dom";
@@ -123,7 +123,7 @@ async function ccipRequest({ data, sender, urls }) {
123
123
  const body = method === "POST" ? { data, sender } : void 0;
124
124
  const headers = method === "POST" ? { "Content-Type": "application/json" } : {};
125
125
  try {
126
- const response = await fetch(url.replace("{sender}", sender).replace("{data}", data), {
126
+ const response = await fetch(url.replace("{sender}", sender.toLowerCase()).replace("{data}", data), {
127
127
  body: JSON.stringify(body),
128
128
  headers,
129
129
  method
@@ -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, I as INITIAL_SYNC, S as SYNCING, h as SUCCESS, C as CONFLICT, M as MISSING, E as ERROR, 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-CQhZN-Ec.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-DFnQ1BMb.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 DUPLICATE, b0 as RENAME, b1 as WRITE, b2 as DELETE, 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-DykYCv9Q.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-ujMDPzk5.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.D_dHa-Dm.js";
13
+ import "./main.DASyOflT.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");
@@ -21,7 +21,7 @@ const Pagination = (props) => {
21
21
  return jsxs("div", { className: "flex gap-x-1", children: [firstPageLabel ? jsx(PaginationButton, { disabled: !isPreviousPageAvailable, onClick: () => goToFirstPage(), children: firstPageLabel }) : null, previousPageLabel ? jsxs(PaginationButton, { disabled: !isPreviousPageAvailable, onClick: () => goToPreviousPage(), children: [jsx(Icon, { className: "rotate-90", name: "ChevronDown", size: 16 }), previousPageLabel] }) : null, pages.map((page) => jsx(PaginationButton, { active: page.active, onClick: () => goToPage(page.index), children: page.number }, page.index)), hiddenNextPages ? jsx("span", { className: "flex items-center justify-center px-2", children: "..." }) : null, nextPageLabel ? jsxs(PaginationButton, { disabled: !isNextPageAvailable, onClick: () => goToNextPage(), children: [nextPageLabel, jsx(Icon, { className: "-rotate-90", name: "ChevronDown", size: 16 })] }) : null, lastPageLabel ? jsx(PaginationButton, { disabled: !isNextPageAvailable, onClick: () => goToLastPage(), children: lastPageLabel }) : null] });
22
22
  };
23
23
  function usePagination(items, options) {
24
- const { itemsPerPage = 20, initialPage = 0, pageRange = 3 } = options;
24
+ const { itemsPerPage = 20, initialPage = 0, pageRange = 3 } = options || {};
25
25
  const [currentPage, setCurrentPage] = useState(initialPage);
26
26
  const pageCount = Math.ceil(items.length / itemsPerPage);
27
27
  const isNextPageAvailable = currentPage < pageCount - 1;
@@ -993,8 +993,6 @@ const lightFormatters = {
993
993
  }
994
994
  };
995
995
  const dayPeriodEnum = {
996
- am: "am",
997
- pm: "pm",
998
996
  midnight: "midnight",
999
997
  noon: "noon",
1000
998
  morning: "morning",
@@ -1833,7 +1831,7 @@ function Header(props) {
1833
1831
  function memo(getDeps, fn, opts) {
1834
1832
  let deps = opts.initialDeps ?? [];
1835
1833
  let result;
1836
- return () => {
1834
+ function memoizedFunction() {
1837
1835
  var _a, _b, _c, _d;
1838
1836
  let depTime;
1839
1837
  if (opts.key && ((_a = opts.debug) == null ? void 0 : _a.call(opts))) depTime = Date.now();
@@ -1871,7 +1869,11 @@ function memo(getDeps, fn, opts) {
1871
1869
  }
1872
1870
  (_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);
1873
1871
  return result;
1872
+ }
1873
+ memoizedFunction.updateDeps = (newDeps) => {
1874
+ deps = newDeps;
1874
1875
  };
1876
+ return memoizedFunction;
1875
1877
  }
1876
1878
  function notUndefined(value, msg) {
1877
1879
  if (value === void 0) {
@@ -1917,15 +1919,18 @@ const observeElementRect = (instance, cb) => {
1917
1919
  };
1918
1920
  }
1919
1921
  const observer = new targetWindow.ResizeObserver((entries) => {
1920
- const entry = entries[0];
1921
- if (entry == null ? void 0 : entry.borderBoxSize) {
1922
- const box = entry.borderBoxSize[0];
1923
- if (box) {
1924
- handler({ width: box.inlineSize, height: box.blockSize });
1925
- return;
1922
+ const run = () => {
1923
+ const entry = entries[0];
1924
+ if (entry == null ? void 0 : entry.borderBoxSize) {
1925
+ const box = entry.borderBoxSize[0];
1926
+ if (box) {
1927
+ handler({ width: box.inlineSize, height: box.blockSize });
1928
+ return;
1929
+ }
1926
1930
  }
1927
- }
1928
- handler(element.getBoundingClientRect());
1931
+ handler(element.getBoundingClientRect());
1932
+ };
1933
+ instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
1929
1934
  });
1930
1935
  observer.observe(element, { box: "border-box" });
1931
1936
  return () => {
@@ -1963,10 +1968,15 @@ const observeElementOffset = (instance, cb) => {
1963
1968
  const endHandler = createHandler(false);
1964
1969
  endHandler();
1965
1970
  element.addEventListener("scroll", handler, addEventListenerOptions);
1966
- element.addEventListener("scrollend", endHandler, addEventListenerOptions);
1971
+ const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
1972
+ if (registerScrollendEvent) {
1973
+ element.addEventListener("scrollend", endHandler, addEventListenerOptions);
1974
+ }
1967
1975
  return () => {
1968
1976
  element.removeEventListener("scroll", handler);
1969
- element.removeEventListener("scrollend", endHandler);
1977
+ if (registerScrollendEvent) {
1978
+ element.removeEventListener("scrollend", endHandler);
1979
+ }
1970
1980
  };
1971
1981
  };
1972
1982
  const measureElement = (element, entry, instance) => {
@@ -2020,7 +2030,10 @@ class Virtualizer {
2020
2030
  }
2021
2031
  return _ro = new this.targetWindow.ResizeObserver((entries) => {
2022
2032
  entries.forEach((entry) => {
2023
- this._measureElement(entry.target, entry);
2033
+ const run = () => {
2034
+ this._measureElement(entry.target, entry);
2035
+ };
2036
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
2024
2037
  });
2025
2038
  });
2026
2039
  };
@@ -2068,7 +2081,8 @@ class Virtualizer {
2068
2081
  isScrollingResetDelay: 150,
2069
2082
  enabled: true,
2070
2083
  isRtl: false,
2071
- useScrollendEvent: true,
2084
+ useScrollendEvent: false,
2085
+ useAnimationFrameWithResizeObserver: false,
2072
2086
  ...opts2
2073
2087
  };
2074
2088
  };
@@ -2257,12 +2271,18 @@ class Virtualizer {
2257
2271
  }
2258
2272
  );
2259
2273
  this.calculateRange = memo(
2260
- () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
2261
- (measurements, outerSize, scrollOffset) => {
2274
+ () => [
2275
+ this.getMeasurements(),
2276
+ this.getSize(),
2277
+ this.getScrollOffset(),
2278
+ this.options.lanes
2279
+ ],
2280
+ (measurements, outerSize, scrollOffset, lanes) => {
2262
2281
  return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
2263
2282
  measurements,
2264
2283
  outerSize,
2265
- scrollOffset
2284
+ scrollOffset,
2285
+ lanes
2266
2286
  }) : null;
2267
2287
  },
2268
2288
  {
@@ -2270,7 +2290,7 @@ class Virtualizer {
2270
2290
  debug: () => this.options.debug
2271
2291
  }
2272
2292
  );
2273
- this.getIndexes = memo(
2293
+ this.getVirtualIndexes = memo(
2274
2294
  () => {
2275
2295
  let startIndex = null;
2276
2296
  let endIndex = null;
@@ -2279,6 +2299,7 @@ class Virtualizer {
2279
2299
  startIndex = range.startIndex;
2280
2300
  endIndex = range.endIndex;
2281
2301
  }
2302
+ this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
2282
2303
  return [
2283
2304
  this.options.rangeExtractor,
2284
2305
  this.options.overscan,
@@ -2362,7 +2383,7 @@ class Virtualizer {
2362
2383
  this._measureElement(node, void 0);
2363
2384
  };
2364
2385
  this.getVirtualItems = memo(
2365
- () => [this.getIndexes(), this.getMeasurements()],
2386
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
2366
2387
  (indexes, measurements) => {
2367
2388
  const virtualItems = [];
2368
2389
  for (let k = 0, len = indexes.length; k < len; k++) {
@@ -2391,15 +2412,15 @@ class Virtualizer {
2391
2412
  )]
2392
2413
  );
2393
2414
  };
2394
- this.getOffsetForAlignment = (toOffset, align) => {
2415
+ this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
2395
2416
  const size = this.getSize();
2396
2417
  const scrollOffset = this.getScrollOffset();
2397
2418
  if (align === "auto") {
2398
- if (toOffset >= scrollOffset + size) {
2399
- align = "end";
2400
- }
2419
+ align = toOffset >= scrollOffset + size ? "end" : "start";
2401
2420
  }
2402
- if (align === "end") {
2421
+ if (align === "center") {
2422
+ toOffset += (itemSize - size) / 2;
2423
+ } else if (align === "end") {
2403
2424
  toOffset -= size;
2404
2425
  }
2405
2426
  const scrollSizeProp = this.options.horizontal ? "scrollWidth" : "scrollHeight";
@@ -2424,27 +2445,11 @@ class Virtualizer {
2424
2445
  return [scrollOffset, align];
2425
2446
  }
2426
2447
  }
2427
- const centerOffset = item.start - this.options.scrollPaddingStart + (item.size - size) / 2;
2428
- switch (align) {
2429
- case "center":
2430
- return [this.getOffsetForAlignment(centerOffset, align), align];
2431
- case "end":
2432
- return [
2433
- this.getOffsetForAlignment(
2434
- item.end + this.options.scrollPaddingEnd,
2435
- align
2436
- ),
2437
- align
2438
- ];
2439
- default:
2440
- return [
2441
- this.getOffsetForAlignment(
2442
- item.start - this.options.scrollPaddingStart,
2443
- align
2444
- ),
2445
- align
2446
- ];
2447
- }
2448
+ const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
2449
+ return [
2450
+ this.getOffsetForAlignment(toOffset, align, item.size),
2451
+ align
2452
+ ];
2448
2453
  };
2449
2454
  this.isDynamicMode = () => this.elementsCache.size > 0;
2450
2455
  this.cancelScrollToIndex = () => {
@@ -2514,10 +2519,19 @@ class Virtualizer {
2514
2519
  let end;
2515
2520
  if (measurements.length === 0) {
2516
2521
  end = this.options.paddingStart;
2522
+ } else if (this.options.lanes === 1) {
2523
+ end = ((_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) ?? 0;
2517
2524
  } else {
2518
- end = this.options.lanes === 1 ? ((_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) ?? 0 : Math.max(
2519
- ...measurements.slice(-this.options.lanes).map((m) => m.end)
2520
- );
2525
+ const endByLane = Array(this.options.lanes).fill(null);
2526
+ let endIndex = measurements.length - 1;
2527
+ while (endIndex > 0 && endByLane.some((val) => val === null)) {
2528
+ const item = measurements[endIndex];
2529
+ if (endByLane[item.lane] === null) {
2530
+ endByLane[item.lane] = item.end;
2531
+ }
2532
+ endIndex--;
2533
+ }
2534
+ end = Math.max(...endByLane.filter((val) => val !== null));
2521
2535
  }
2522
2536
  return Math.max(
2523
2537
  end - this.options.scrollMargin + this.options.paddingEnd,
@@ -2558,14 +2572,37 @@ const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
2558
2572
  function calculateRange({
2559
2573
  measurements,
2560
2574
  outerSize,
2561
- scrollOffset
2575
+ scrollOffset,
2576
+ lanes
2562
2577
  }) {
2563
- const count = measurements.length - 1;
2578
+ const lastIndex = measurements.length - 1;
2564
2579
  const getOffset = (index) => measurements[index].start;
2565
- const startIndex = findNearestBinarySearch(0, count, getOffset, scrollOffset);
2580
+ let startIndex = findNearestBinarySearch(
2581
+ 0,
2582
+ lastIndex,
2583
+ getOffset,
2584
+ scrollOffset
2585
+ );
2566
2586
  let endIndex = startIndex;
2567
- while (endIndex < count && measurements[endIndex].end < scrollOffset + outerSize) {
2568
- endIndex++;
2587
+ if (lanes === 1) {
2588
+ while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
2589
+ endIndex++;
2590
+ }
2591
+ } else if (lanes > 1) {
2592
+ const endPerLane = Array(lanes).fill(0);
2593
+ while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
2594
+ const item = measurements[endIndex];
2595
+ endPerLane[item.lane] = item.end;
2596
+ endIndex++;
2597
+ }
2598
+ const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
2599
+ while (startIndex > 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
2600
+ const item = measurements[startIndex];
2601
+ startPerLane[item.lane] = item.start;
2602
+ startIndex--;
2603
+ }
2604
+ startIndex = Math.max(0, startIndex - startIndex % lanes);
2605
+ endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
2569
2606
  }
2570
2607
  return { startIndex, endIndex };
2571
2608
  }
@@ -3712,14 +3749,7 @@ function Editor(props) {
3712
3749
  return jsxs(DriveLayout, { className, children: [children, jsxs(DriveLayout.Header, { children: [jsx(Breadcrumbs, { breadcrumbs, createEnabled: isAllowedToCreateDocuments, onCreate: addFolder, onBreadcrumbSelected }), showSearchBar && jsx(SearchBar, {})] }), jsx(DriveLayout.Content, { children: jsx(FolderView, { node: selectedNode || driveNode, onSelectNode: setSelectedNode, onRenameNode: renameNode, onDuplicateNode: duplicateNode, onDeleteNode: deleteNode, onAddFile: addFile, onCopyNode: copyNode, onMoveNode: moveNode, isDropTarget, isAllowedToCreateDocuments }) }), jsx(DriveLayout.Footer, { children: isAllowedToCreateDocuments && jsx(CreateDocument, { documentModels, createDocument: onCreateDocument }) })] });
3713
3750
  }
3714
3751
  const GenericDriveExplorer = {
3715
- Component: Editor,
3716
- documentTypes: ["powerhouse/document-drive"],
3717
- config: {
3718
- id: "GenericDriveExplorer",
3719
- disableExternalControls: true,
3720
- documentToolbarEnabled: true,
3721
- showSwitchboardLink: true
3722
- }
3752
+ Component: Editor
3723
3753
  };
3724
3754
  function useGetDriveDocuments(props) {
3725
3755
  const { driveId } = props;
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-DykYCv9Q.js","assets/main.D_dHa-Dm.js","assets/app-loader-9W65A3zy.css"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./main.D_dHa-Dm.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-ujMDPzk5.js","assets/main.DASyOflT.js","assets/app-loader-9W65A3zy.css"])))=>i.map(i=>d[i]);
2
+ import { _ as __vitePreload } from "./main.DASyOflT.js";
3
3
  import { createRoot } from "react-dom/client";
4
4
  async function renderApp(element) {
5
- const AppLoader = await __vitePreload(() => import("./app-loader-DykYCv9Q.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
5
+ const AppLoader = await __vitePreload(() => import("./app-loader-ujMDPzk5.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");
@@ -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.D_dHa-Dm.js";
14
- import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-DykYCv9Q.js";
15
- import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-CQhZN-Ec.js";
16
- import { d, c, b, f, a, r, s } from "./app-CQhZN-Ec.js";
13
+ import { _ as __vitePreload } from "./main.DASyOflT.js";
14
+ import { aW as getAugmentedNamespace, $ as getDefaultExportFromCjs, ah as connectConfig, ac as logger } from "./app-loader-ujMDPzk5.js";
15
+ import { e as eventsExports, R as RENOWN_URL, g as getEnsInfo } from "./app-DFnQ1BMb.js";
16
+ import { d, c, b, f, a, r, s } from "./app-DFnQ1BMb.js";
17
17
  import "react/jsx-runtime";
18
18
  import "react";
19
19
  import "@powerhousedao/reactor-browser";
@@ -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 Slot, ad as FormProvider, ae as Controller, af as useForm, ag as List, ah as Trigger, ai as Content, aj as Root2, 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-CQhZN-Ec.js";
3
- import { ba as inspect$1, bb as GraphQLError$1, bc as invariant$2, bd as getNamedType, be as isInputObjectType, bf as isScalarType, bg as isObjectType, bh as isInterfaceType, bi as isUnionType, bj as isEnumType, bk as astFromValue$1, bl as print, bm as DEFAULT_DEPRECATION_REASON, bn as Kind, bo as isPrintableAsBlockString, 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-DykYCv9Q.js";
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-DFnQ1BMb.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-ujMDPzk5.js";
4
4
  import * as React from "react";
5
- import React__default, { forwardRef, useRef, useCallback, useImperativeHandle, useEffect, createContext, useState, useContext, memo, useId, useMemo } from "react";
6
- import "./main.D_dHa-Dm.js";
5
+ import React__default, { forwardRef, useRef, useCallback, useImperativeHandle, useEffect, useState, createContext, useContext, memo, useId, useMemo } from "react";
6
+ import "./main.DASyOflT.js";
7
7
  import "@powerhousedao/reactor-browser";
8
8
  import "react-dom";
9
9
  import "@powerhousedao/reactor-browser/hooks/useUiNodesContext";
@@ -1047,7 +1047,7 @@ function updateModelSchemaNames(params) {
1047
1047
  }
1048
1048
  }
1049
1049
  function handleModelNameChange(params) {
1050
- const { oldName, newName, globalStateSchema, setStateSchema: setStateSchema2 } = params;
1050
+ const { newName, globalStateSchema, setStateSchema: setStateSchema2 } = params;
1051
1051
  const hasExistingSchema = !!globalStateSchema;
1052
1052
  if (!hasExistingSchema) {
1053
1053
  initializeModelSchema({ modelName: newName, setStateSchema: setStateSchema2 });
@@ -1855,10 +1855,10 @@ function requireIsEmail() {
1855
1855
  })(isEmail, isEmail.exports);
1856
1856
  return isEmail.exports;
1857
1857
  }
1858
- var isURL$1 = { exports: {} };
1858
+ var isURL = { exports: {} };
1859
1859
  var hasRequiredIsURL;
1860
1860
  function requireIsURL() {
1861
- if (hasRequiredIsURL) return isURL$1.exports;
1861
+ if (hasRequiredIsURL) return isURL.exports;
1862
1862
  hasRequiredIsURL = 1;
1863
1863
  (function(module, exports) {
1864
1864
  Object.defineProperty(exports, "__esModule", {
@@ -2043,8 +2043,8 @@ function requireIsURL() {
2043
2043
  }
2044
2044
  module.exports = exports.default;
2045
2045
  module.exports.default = exports.default;
2046
- })(isURL$1, isURL$1.exports);
2047
- return isURL$1.exports;
2046
+ })(isURL, isURL.exports);
2047
+ return isURL.exports;
2048
2048
  }
2049
2049
  var isMACAddress = { exports: {} };
2050
2050
  var hasRequiredIsMACAddress;
@@ -11876,13 +11876,13 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
11876
11876
  let moveX = 0, moveY = 0;
11877
11877
  if (y == "nearest") {
11878
11878
  if (rect.top < bounding.top) {
11879
- moveY = -(bounding.top - rect.top + yMargin);
11879
+ moveY = rect.top - (bounding.top + yMargin);
11880
11880
  if (side > 0 && rect.bottom > bounding.bottom + moveY)
11881
- moveY = rect.bottom - bounding.bottom + moveY + yMargin;
11881
+ moveY = rect.bottom - bounding.bottom + yMargin;
11882
11882
  } else if (rect.bottom > bounding.bottom) {
11883
11883
  moveY = rect.bottom - bounding.bottom + yMargin;
11884
11884
  if (side < 0 && rect.top - moveY < bounding.top)
11885
- moveY = -(bounding.top + moveY - rect.top + yMargin);
11885
+ moveY = rect.top - (bounding.top + yMargin);
11886
11886
  }
11887
11887
  } else {
11888
11888
  let rectHeight = rect.bottom - rect.top, boundingHeight = bounding.bottom - bounding.top;
@@ -11891,13 +11891,13 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
11891
11891
  }
11892
11892
  if (x == "nearest") {
11893
11893
  if (rect.left < bounding.left) {
11894
- moveX = -(bounding.left - rect.left + xMargin);
11894
+ moveX = rect.left - (bounding.left + xMargin);
11895
11895
  if (side > 0 && rect.right > bounding.right + moveX)
11896
- moveX = rect.right - bounding.right + moveX + xMargin;
11896
+ moveX = rect.right - bounding.right + xMargin;
11897
11897
  } else if (rect.right > bounding.right) {
11898
11898
  moveX = rect.right - bounding.right + xMargin;
11899
11899
  if (side < 0 && rect.left < bounding.left + moveX)
11900
- moveX = -(bounding.left + moveX - rect.left + xMargin);
11900
+ moveX = rect.left - (bounding.left + xMargin);
11901
11901
  }
11902
11902
  } else {
11903
11903
  let targetLeft = x == "center" ? rect.left + (rect.right - rect.left) / 2 - (bounding.right - bounding.left) / 2 : x == "start" == ltr ? rect.left - xMargin : rect.right - (bounding.right - bounding.left) + xMargin;
@@ -11932,6 +11932,13 @@ function scrollRectIntoView(dom, rect, side, x, y, xMargin, yMargin, ltr) {
11932
11932
  }
11933
11933
  if (top2)
11934
11934
  break;
11935
+ if (rect.top < bounding.top || rect.bottom > bounding.bottom || rect.left < bounding.left || rect.right > bounding.right)
11936
+ rect = {
11937
+ left: Math.max(rect.left, bounding.left),
11938
+ right: Math.min(rect.right, bounding.right),
11939
+ top: Math.max(rect.top, bounding.top),
11940
+ bottom: Math.min(rect.bottom, bounding.bottom)
11941
+ };
11935
11942
  cur2 = cur2.assignedSlot || cur2.parentNode;
11936
11943
  } else if (cur2.nodeType == 11) {
11937
11944
  cur2 = cur2.host;
@@ -15536,7 +15543,10 @@ class InputState {
15536
15543
  return;
15537
15544
  if (event.type == "keydown" && this.keydown(event))
15538
15545
  return;
15539
- this.runHandlers(event.type, event);
15546
+ if (this.view.updateState != 0)
15547
+ Promise.resolve().then(() => this.runHandlers(event.type, event));
15548
+ else
15549
+ this.runHandlers(event.type, event);
15540
15550
  }
15541
15551
  runHandlers(type2, event) {
15542
15552
  let handlers2 = this.handlers[type2];
@@ -18428,8 +18438,8 @@ class EditContextManager {
18428
18438
  return !abort;
18429
18439
  }
18430
18440
  update(update) {
18431
- let reverted = this.pendingContextChange;
18432
- if (this.composing && (this.composing.drifted || update.transactions.some((tr) => !tr.isUserEvent("input.type") && tr.changes.touchesRange(this.from, this.to)))) {
18441
+ let reverted = this.pendingContextChange, startSel = update.startState.selection.main;
18442
+ if (this.composing && (this.composing.drifted || !update.changes.touchesRange(startSel.from, startSel.to) && update.transactions.some((tr) => !tr.isUserEvent("input.type") && tr.changes.touchesRange(this.from, this.to)))) {
18433
18443
  this.composing.drifted = true;
18434
18444
  this.composing.editorBase = update.changes.mapPos(this.composing.editorBase);
18435
18445
  } else if (!this.applyEdits(update) || !this.rangeIsValid(update.state)) {
@@ -20506,8 +20516,8 @@ class TooltipViewManager {
20506
20516
  }
20507
20517
  }
20508
20518
  function windowSpace(view) {
20509
- let { win } = view;
20510
- return { top: 0, left: 0, bottom: win.innerHeight, right: win.innerWidth };
20519
+ let docElt = view.dom.ownerDocument.documentElement;
20520
+ return { top: 0, left: 0, bottom: docElt.clientHeight, right: docElt.clientWidth };
20511
20521
  }
20512
20522
  const tooltipConfig = /* @__PURE__ */ Facet.define({
20513
20523
  combine: (values2) => {
@@ -25257,15 +25267,11 @@ function validateWithCustomRules(schema2, ast2, customRules, isRelayCompatMode,
25257
25267
  });
25258
25268
  const SEVERITY$1 = {
25259
25269
  Error: "Error",
25260
- Warning: "Warning",
25261
- Information: "Information",
25262
- Hint: "Hint"
25270
+ Warning: "Warning"
25263
25271
  };
25264
25272
  const DIAGNOSTIC_SEVERITY = {
25265
25273
  [SEVERITY$1.Error]: 1,
25266
- [SEVERITY$1.Warning]: 2,
25267
- [SEVERITY$1.Information]: 3,
25268
- [SEVERITY$1.Hint]: 4
25274
+ [SEVERITY$1.Warning]: 2
25269
25275
  };
25270
25276
  const invariant$1 = (condition, message) => {
25271
25277
  if (!condition) {
@@ -25280,7 +25286,7 @@ function getDiagnostics(query, schema2 = null, customRules, isRelayCompatMode, e
25280
25286
  ast2 = parse(enhancedQuery);
25281
25287
  } catch (error) {
25282
25288
  if (error instanceof GraphQLError$1) {
25283
- const range = getRange((_b = (_a2 = error.locations) === null || _a2 === void 0 ? void 0 : _a2[0]) !== null && _b !== void 0 ? _b : { line: 0, column: 0 }, enhancedQuery);
25289
+ const range = getRange((_b = (_a2 = error.locations) === null || _a2 === void 0 ? void 0 : _a2[0]) !== null && _b !== void 0 ? _b : { line: 0 }, enhancedQuery);
25284
25290
  return [
25285
25291
  {
25286
25292
  severity: DIAGNOSTIC_SEVERITY.Error,
@@ -25353,6 +25359,7 @@ function getLocation(node) {
25353
25359
  invariant$1(location2, "Expected ASTNode to have a location.");
25354
25360
  return location2;
25355
25361
  }
25362
+ const { INLINE_FRAGMENT } = Kind;
25356
25363
  const DefaultBufferLength = 1024;
25357
25364
  let nextPropID = 0;
25358
25365
  class Range3 {
@@ -30885,8 +30892,7 @@ function createTokenType(extra, tagStr) {
30885
30892
  }
30886
30893
  ({
30887
30894
  rtl: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "rtl" }, bidiIsolate: Direction.RTL }),
30888
- ltr: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "ltr" }, bidiIsolate: Direction.LTR }),
30889
- auto: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "auto" }, bidiIsolate: null })
30895
+ ltr: /* @__PURE__ */ Decoration.mark({ class: "cm-iso", inclusive: true, attributes: { dir: "ltr" }, bidiIsolate: Direction.LTR })
30890
30896
  });
30891
30897
  function posToOffset(doc2, pos) {
30892
30898
  return doc2.line(pos.line + 1).from + pos.character;
@@ -32118,7 +32124,17 @@ createTheme({
32118
32124
  }
32119
32125
  ]
32120
32126
  });
32121
- function isURL(str) {
32127
+ const URL_REGEXP = /^(https?|wss?|file):\/\//;
32128
+ function isUrl(str) {
32129
+ if (typeof str !== "string") {
32130
+ return false;
32131
+ }
32132
+ if (!URL_REGEXP.test(str)) {
32133
+ return false;
32134
+ }
32135
+ if (URL.canParse) {
32136
+ return URL.canParse(str);
32137
+ }
32122
32138
  try {
32123
32139
  const url = new URL(str);
32124
32140
  return !!url;
@@ -32132,7 +32148,7 @@ function isDocumentString(str) {
32132
32148
  if (typeof str !== "string") {
32133
32149
  return false;
32134
32150
  }
32135
- if (invalidDocRegex.test(str) || isURL(str)) {
32151
+ if (invalidDocRegex.test(str) || isUrl(str)) {
32136
32152
  return false;
32137
32153
  }
32138
32154
  try {
@@ -35863,7 +35879,15 @@ function createLineDialog(view) {
35863
35879
  event.preventDefault();
35864
35880
  go();
35865
35881
  }
35866
- }, crelt("label", view.state.phrase("Go to line"), ": ", input), " ", crelt("button", { class: "cm-button", type: "submit" }, view.state.phrase("go")));
35882
+ }, crelt("label", view.state.phrase("Go to line"), ": ", input), " ", crelt("button", { class: "cm-button", type: "submit" }, view.state.phrase("go")), crelt("button", {
35883
+ name: "close",
35884
+ onclick: () => {
35885
+ view.dispatch({ effects: dialogEffect.of(false) });
35886
+ view.focus();
35887
+ },
35888
+ "aria-label": view.state.phrase("close"),
35889
+ type: "button"
35890
+ }, ["×"]));
35867
35891
  function go() {
35868
35892
  let match = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(input.value);
35869
35893
  if (!match)
@@ -35919,7 +35943,18 @@ const gotoLine = (view) => {
35919
35943
  const baseTheme$1 = /* @__PURE__ */ EditorView.baseTheme({
35920
35944
  ".cm-panel.cm-gotoLine": {
35921
35945
  padding: "2px 6px 4px",
35922
- "& label": { fontSize: "80%" }
35946
+ position: "relative",
35947
+ "& label": { fontSize: "80%" },
35948
+ "& [name=close]": {
35949
+ position: "absolute",
35950
+ top: "0",
35951
+ bottom: "0",
35952
+ right: "4px",
35953
+ backgroundColor: "inherit",
35954
+ border: "none",
35955
+ font: "inherit",
35956
+ padding: "0"
35957
+ }
35923
35958
  }
35924
35959
  });
35925
35960
  const defaultHighlightOptions = {
@@ -36222,7 +36257,18 @@ class RegExpQuery extends QueryType {
36222
36257
  return this.prevMatchInRange(state, 0, curFrom) || this.prevMatchInRange(state, curTo, state.doc.length);
36223
36258
  }
36224
36259
  getReplacement(result) {
36225
- return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g, (m, i) => i == "$" ? "$" : i == "&" ? result.match[0] : i != "0" && +i < result.match.length ? result.match[i] : m);
36260
+ return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (m, i) => {
36261
+ if (i == "&")
36262
+ return result.match[0];
36263
+ if (i == "$")
36264
+ return "$";
36265
+ for (let l = i.length; l > 0; l--) {
36266
+ let n2 = +i.slice(0, l);
36267
+ if (n2 > 0 && n2 < result.match.length)
36268
+ return result.match[n2] + i.slice(l);
36269
+ }
36270
+ return m;
36271
+ });
36226
36272
  }
36227
36273
  matchAll(state, limit) {
36228
36274
  let cursor = regexpCursor(this.spec, state, 0, state.doc.length), ranges = [];
@@ -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-Ba6Va6Gt.js"), true ? [] : void 0);
102
+ __vitePreload(() => import("./index-8UlRH4V9.js"), true ? [] : void 0);
103
103
  export {
104
104
  __vitePreload as _
105
105
  };
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.D_dHa-Dm.js"></script></head><body><div id="app"></div></body></html>
100
+ }</script><script type="module" crossorigin="" src="/assets/main.DASyOflT.js"></script></head><body><div id="app"></div></body></html>