@powerhousedao/connect 1.0.9-dev.0 → 1.0.10-dev.0

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 (37) hide show
  1. package/LICENSE +661 -0
  2. package/dist/assets/{app-D9QJBr8i.css → app-BIIVKAZr.css} +223 -60
  3. package/dist/assets/{app-Uu65do7x.js → app-CsiwsM42.js} +2107 -1027
  4. package/dist/assets/{app-loader-BnxLpX27.js → app-loader-C7A2YjX4.js} +365 -191
  5. package/dist/assets/{app-loader-Bnp0H-wa.css → app-loader-pcztQTL4.css} +173 -26
  6. package/dist/assets/{ccip-CpD5P3bc.js → ccip-BG1d6viz.js} +3 -3
  7. package/dist/assets/{content-DV_bRXbH.js → content-0UFgs2d1.js} +37 -7
  8. package/dist/assets/{index-B4m3ucR9.js → index-BMDqhr-9.js} +3 -3
  9. package/dist/assets/{index-Ch_NXi_f.js → index-CTEGX1We.js} +670 -519
  10. package/dist/assets/{index-yrCJMRn6.js → index-yr0-SqYf.js} +4 -4
  11. package/dist/assets/{main.CpORyZoE.js → main.BmcV9296.js} +1 -1
  12. package/dist/assets/{style-D4JhTt_m.css → style-Ce3V83BE.css} +31 -36
  13. package/dist/hmr.js +1 -1
  14. package/dist/index.html +1 -1
  15. package/dist/modules/@powerhousedao/reactor-browser/{chunk-G6LMXRY5.js → chunk-2ONJ2PX4.js} +1 -1
  16. package/dist/modules/@powerhousedao/reactor-browser/{chunk-OYYVE7RP.js → chunk-3C54663M.js} +1 -1
  17. package/dist/modules/@powerhousedao/reactor-browser/{chunk-UDKYG6I4.js → chunk-5QJXNK35.js} +1 -1
  18. package/dist/modules/@powerhousedao/reactor-browser/{chunk-FW7N6EJH.js → chunk-C7QRY43M.js} +3 -3
  19. package/dist/modules/@powerhousedao/reactor-browser/{chunk-45DCPCA7.js → chunk-CO2RVWYY.js} +1 -1
  20. package/dist/modules/@powerhousedao/reactor-browser/{chunk-6MBHOHAA.js → chunk-ISDEPHKP.js} +1 -1
  21. package/dist/modules/@powerhousedao/reactor-browser/{chunk-F3RCGUF6.js → chunk-NHD6VUCD.js} +2 -2
  22. package/dist/modules/@powerhousedao/reactor-browser/{chunk-N5UNGAA6.js → chunk-SQ5HIKYV.js} +346 -172
  23. package/dist/modules/@powerhousedao/reactor-browser/{chunk-M2UUQ5LH.js → chunk-U34SEKEB.js} +2 -2
  24. package/dist/modules/@powerhousedao/reactor-browser/{chunk-IC6B3767.js → chunk-XV42KZK3.js} +1 -1
  25. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  26. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  27. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
  28. package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
  29. package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
  30. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
  31. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
  32. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  33. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  34. package/dist/modules/@powerhousedao/reactor-browser/index.js +10 -10
  35. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  36. package/dist/vite-envs.sh +1 -1
  37. package/package.json +9 -9
@@ -1,7 +1,7 @@
1
1
  @import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";
2
2
 
3
- /*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */
4
- /*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */
3
+ /*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */
4
+ /*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */
5
5
  :root {
6
6
  --toastify-color-light: #fff;
7
7
  --toastify-color-dark: #121212;
@@ -715,7 +715,6 @@
715
715
  @layer theme {
716
716
  :root, :host {
717
717
  --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
718
- --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
719
718
  --color-red-100: #fdedec;
720
719
  --color-red-400: oklch(.704 .191 22.216);
721
720
  --color-red-500: oklch(.637 .237 25.331);
@@ -736,6 +735,7 @@
736
735
  --color-green-700: oklch(.527 .154 150.069);
737
736
  --color-green-800: oklch(.448 .119 151.328);
738
737
  --color-green-900: oklch(.393 .095 152.535);
738
+ --color-blue-50: oklch(.97 .014 254.604);
739
739
  --color-blue-100: oklch(.932 .032 255.585);
740
740
  --color-blue-400: oklch(.707 .165 254.624);
741
741
  --color-blue-500: oklch(.623 .214 259.815);
@@ -798,12 +798,6 @@
798
798
  --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
799
799
  --default-transition-duration: .15s;
800
800
  --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
801
- --default-font-family: var(--font-sans);
802
- --default-font-feature-settings: var(--font-sans--font-feature-settings);
803
- --default-font-variation-settings: var(--font-sans--font-variation-settings);
804
- --default-mono-font-family: var(--font-mono);
805
- --default-mono-font-feature-settings: var(--font-mono--font-feature-settings);
806
- --default-mono-font-variation-settings: var(--font-mono--font-variation-settings);
807
801
  --color-charcoal-300: #9da6b9;
808
802
  --color-charcoal-700: #485265;
809
803
  --color-charcoal-800: #373e4e;
@@ -816,20 +810,51 @@
816
810
  --animate-slide-in-from-bottom: slideInFromBottom .2s ease-in-out;
817
811
  --animate-slide-in-from-left: slideInFromLeft .2s ease-in-out;
818
812
  --animate-slide-in-from-right: slideInFromRight .2s ease-in-out;
813
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
819
814
  --text-3xl: 1.875rem;
820
815
  --text-3xl--line-height: calc(2.25 / 1.875);
821
816
  --leading-normal: 1.5;
822
817
  --leading-relaxed: 1.625;
823
818
  --drop-shadow-sm: 0 1px 2px #00000026;
824
819
  --blur-sm: 8px;
820
+ --default-font-family: var(--font-sans);
821
+ --default-mono-font-family: var(--font-mono);
825
822
  --spacing-app-height: calc(100vh - 32px);
826
823
  }
827
824
  }
828
825
  @layer base {
826
+ html, :host {
827
+ -webkit-text-size-adjust: 100%;
828
+ tab-size: 4;
829
+ font-feature-settings: initial;
830
+ font-variation-settings: initial;
831
+ -webkit-tap-highlight-color: transparent;
832
+ font-family: Inter, sans-serif;
833
+ line-height: 1.5;
834
+ }
835
+
836
+ code, kbd, samp, pre {
837
+ font-feature-settings: initial;
838
+ font-variation-settings: initial;
839
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
840
+ font-size: 1em;
841
+ }
842
+
843
+ @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
844
+ ::placeholder {
845
+ color: color-mix(in oklab, currentColor 50%, transparent);
846
+ }
847
+ }
848
+
829
849
  h1, h2, h3, h4, h5, h6, p {
830
850
  color: var(--color-gray-900);
831
851
  }
832
852
 
853
+ * {
854
+ scrollbar-color: initial;
855
+ scrollbar-width: initial;
856
+ }
857
+
833
858
  *, :after, :before, ::backdrop {
834
859
  box-sizing: border-box;
835
860
  border: 0 solid;
@@ -854,10 +879,6 @@
854
879
  -webkit-tap-highlight-color: transparent;
855
880
  }
856
881
 
857
- body {
858
- line-height: inherit;
859
- }
860
-
861
882
  hr {
862
883
  height: 0;
863
884
  color: inherit;
@@ -980,7 +1001,12 @@
980
1001
 
981
1002
  ::placeholder {
982
1003
  opacity: 1;
983
- color: color-mix(in oklab, currentColor 50%, transparent);
1004
+ }
1005
+
1006
+ @supports (not ((-webkit-appearance: -apple-pay-button))) or (contain-intrinsic-size: 1px) {
1007
+ ::placeholder {
1008
+ color: color-mix(in oklab, currentColor 50%, transparent);
1009
+ }
984
1010
  }
985
1011
 
986
1012
  textarea {
@@ -1384,6 +1410,32 @@
1384
1410
  margin-left: auto;
1385
1411
  }
1386
1412
 
1413
+ .scrollbar-thin {
1414
+ scrollbar-width: thin;
1415
+ scrollbar-color: var(--scrollbar-thumb, initial) var(--scrollbar-track, initial);
1416
+ }
1417
+
1418
+ .scrollbar-thin::-webkit-scrollbar-track {
1419
+ background-color: var(--scrollbar-track);
1420
+ border-radius: var(--scrollbar-track-radius);
1421
+ }
1422
+
1423
+ .scrollbar-thin::-webkit-scrollbar-thumb {
1424
+ background-color: var(--scrollbar-thumb);
1425
+ border-radius: var(--scrollbar-thumb-radius);
1426
+ }
1427
+
1428
+ .scrollbar-thin::-webkit-scrollbar-corner {
1429
+ background-color: var(--scrollbar-corner);
1430
+ border-radius: var(--scrollbar-corner-radius);
1431
+ }
1432
+
1433
+ .scrollbar-thin::-webkit-scrollbar {
1434
+ width: 8px;
1435
+ height: 8px;
1436
+ display: block;
1437
+ }
1438
+
1387
1439
  .line-clamp-2 {
1388
1440
  -webkit-line-clamp: 2;
1389
1441
  -webkit-box-orient: vertical;
@@ -1569,6 +1621,10 @@
1569
1621
  max-height: 300px;
1570
1622
  }
1571
1623
 
1624
+ .max-h-\[370px\] {
1625
+ max-height: 370px;
1626
+ }
1627
+
1572
1628
  .max-h-screen {
1573
1629
  max-height: 100vh;
1574
1630
  }
@@ -1793,6 +1849,10 @@
1793
1849
  min-width: calc(var(--spacing) * 8);
1794
1850
  }
1795
1851
 
1852
+ .min-w-9 {
1853
+ min-width: calc(var(--spacing) * 9);
1854
+ }
1855
+
1796
1856
  .min-w-36 {
1797
1857
  min-width: calc(var(--spacing) * 36);
1798
1858
  }
@@ -1805,12 +1865,12 @@
1805
1865
  min-width: calc(var(--spacing) * 72);
1806
1866
  }
1807
1867
 
1808
- .min-w-\[142px\] {
1809
- min-width: 142px;
1868
+ .min-w-\[40px\] {
1869
+ min-width: 40px;
1810
1870
  }
1811
1871
 
1812
- .min-w-\[160px\] {
1813
- min-width: 160px;
1872
+ .min-w-\[142px\] {
1873
+ min-width: 142px;
1814
1874
  }
1815
1875
 
1816
1876
  .min-w-\[360px\] {
@@ -2049,10 +2109,18 @@
2049
2109
  overflow: hidden;
2050
2110
  }
2051
2111
 
2112
+ .overflow-hidden {
2113
+ overflow: hidden;
2114
+ }
2115
+
2052
2116
  .overflow-scroll {
2053
2117
  overflow: scroll;
2054
2118
  }
2055
2119
 
2120
+ .overflow-x-auto {
2121
+ overflow-x: auto;
2122
+ }
2123
+
2056
2124
  .overflow-x-hidden {
2057
2125
  overflow-x: hidden;
2058
2126
  }
@@ -2159,6 +2227,11 @@
2159
2227
  border-top-width: 1px;
2160
2228
  }
2161
2229
 
2230
+ .border-r {
2231
+ border-right-style: var(--tw-border-style);
2232
+ border-right-width: 1px;
2233
+ }
2234
+
2162
2235
  .border-r-\[0\.5px\] {
2163
2236
  border-right-style: var(--tw-border-style);
2164
2237
  border-right-width: .5px;
@@ -2202,6 +2275,10 @@
2202
2275
  border-color: var(--color-blue-600);
2203
2276
  }
2204
2277
 
2278
+ .border-blue-900 {
2279
+ border-color: var(--color-blue-900);
2280
+ }
2281
+
2205
2282
  .border-gray-100 {
2206
2283
  border-color: var(--color-gray-100);
2207
2284
  }
@@ -2250,10 +2327,26 @@
2250
2327
  border-color: var(--color-white);
2251
2328
  }
2252
2329
 
2330
+ .border-t-blue-900 {
2331
+ border-top-color: var(--color-blue-900);
2332
+ }
2333
+
2334
+ .border-t-transparent {
2335
+ border-top-color: #0000;
2336
+ }
2337
+
2338
+ .border-b-blue-900 {
2339
+ border-bottom-color: var(--color-blue-900);
2340
+ }
2341
+
2253
2342
  .border-b-gray-300 {
2254
2343
  border-bottom-color: var(--color-gray-300);
2255
2344
  }
2256
2345
 
2346
+ .border-b-transparent {
2347
+ border-bottom-color: #0000;
2348
+ }
2349
+
2257
2350
  .bg-\[\#FCFCFC\] {
2258
2351
  background-color: #fcfcfc;
2259
2352
  }
@@ -2262,6 +2355,10 @@
2262
2355
  background-color: #fff;
2263
2356
  }
2264
2357
 
2358
+ .bg-blue-50 {
2359
+ background-color: var(--color-blue-50);
2360
+ }
2361
+
2265
2362
  .bg-blue-100 {
2266
2363
  background-color: var(--color-blue-100);
2267
2364
  }
@@ -2306,6 +2403,10 @@
2306
2403
  background-color: var(--color-green-500);
2307
2404
  }
2308
2405
 
2406
+ .bg-green-900 {
2407
+ background-color: var(--color-green-900);
2408
+ }
2409
+
2309
2410
  .bg-inherit {
2310
2411
  background-color: inherit;
2311
2412
  }
@@ -2398,6 +2499,10 @@
2398
2499
  padding-inline: 5.5px;
2399
2500
  }
2400
2501
 
2502
+ .px-\[12px\] {
2503
+ padding-inline: 12px;
2504
+ }
2505
+
2401
2506
  .py-0 {
2402
2507
  padding-block: calc(var(--spacing) * 0);
2403
2508
  }
@@ -2430,6 +2535,10 @@
2430
2535
  padding-block: 7px;
2431
2536
  }
2432
2537
 
2538
+ .py-\[15px\] {
2539
+ padding-block: 15px;
2540
+ }
2541
+
2433
2542
  .pt-0 {
2434
2543
  padding-top: calc(var(--spacing) * 0);
2435
2544
  }
@@ -2589,6 +2698,11 @@
2589
2698
  line-height: calc(var(--spacing) * 5);
2590
2699
  }
2591
2700
 
2701
+ .leading-\[14px\] {
2702
+ --tw-leading: 14px;
2703
+ line-height: 14px;
2704
+ }
2705
+
2592
2706
  .leading-\[18px\] {
2593
2707
  --tw-leading: 18px;
2594
2708
  line-height: 18px;
@@ -2962,6 +3076,19 @@
2962
3076
  scrollbar-width: none;
2963
3077
  }
2964
3078
 
3079
+ .scrollbar-thumb-gray-300 {
3080
+ --scrollbar-thumb: #d8d9da;
3081
+ }
3082
+
3083
+ .scrollbar-track-transparent {
3084
+ --scrollbar-track: transparent;
3085
+ }
3086
+
3087
+ .not-last\:border-b:not(:last-child) {
3088
+ border-bottom-style: var(--tw-border-style);
3089
+ border-bottom-width: 1px;
3090
+ }
3091
+
2965
3092
  .group-focus-within\:\!text-gray-900:is(:where(.group):focus-within *) {
2966
3093
  color: var(--color-gray-900) !important;
2967
3094
  }
@@ -3386,6 +3513,10 @@
3386
3513
  background-color: #0000 !important;
3387
3514
  }
3388
3515
 
3516
+ .hover\:bg-blue-100:hover {
3517
+ background-color: var(--color-blue-100);
3518
+ }
3519
+
3389
3520
  .hover\:bg-gray-50:hover {
3390
3521
  background-color: var(--color-gray-50);
3391
3522
  }
@@ -3478,10 +3609,6 @@
3478
3609
  color: var(--color-slate-200);
3479
3610
  }
3480
3611
 
3481
- .hover\:text-white:hover {
3482
- color: var(--color-white);
3483
- }
3484
-
3485
3612
  .hover\:underline:hover {
3486
3613
  text-decoration-line: underline;
3487
3614
  }
@@ -3499,6 +3626,10 @@
3499
3626
  filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
3500
3627
  }
3501
3628
 
3629
+ .hover\:scrollbar-thumb-gray-300:hover {
3630
+ --scrollbar-thumb: #d8d9da;
3631
+ }
3632
+
3502
3633
  .focus-within\:hover\:cursor-default:focus-within:hover {
3503
3634
  cursor: default;
3504
3635
  }
@@ -3698,6 +3829,14 @@
3698
3829
  opacity: 1;
3699
3830
  }
3700
3831
 
3832
+ .aria-selected\:\!bg-gray-900[aria-selected="true"] {
3833
+ background-color: var(--color-gray-900) !important;
3834
+ }
3835
+
3836
+ .aria-selected\:\!text-white[aria-selected="true"] {
3837
+ color: var(--color-white) !important;
3838
+ }
3839
+
3701
3840
  .aria-selected\:opacity-30[aria-selected="true"] {
3702
3841
  opacity: .3;
3703
3842
  }
@@ -4066,6 +4205,10 @@
4066
4205
  --tw-ring-color: var(--color-charcoal-300);
4067
4206
  }
4068
4207
 
4208
+ .dark\:scrollbar-thumb-charcoal-700:where(.dark, .dark *) {
4209
+ --scrollbar-thumb: #485265;
4210
+ }
4211
+
4069
4212
  .dark\:group-focus-within\:\!text-gray-50:where(.dark, .dark *):is(:where(.group):focus-within *) {
4070
4213
  color: var(--color-gray-50) !important;
4071
4214
  }
@@ -4235,6 +4378,10 @@
4235
4378
  color: var(--color-slate-50);
4236
4379
  }
4237
4380
 
4381
+ .dark\:hover\:scrollbar-thumb-charcoal-700:where(.dark, .dark *):hover {
4382
+ --scrollbar-thumb: #485265;
4383
+ }
4384
+
4238
4385
  .dark\:focus-within\:hover\:bg-charcoal-900:where(.dark, .dark *):focus-within:hover {
4239
4386
  background-color: var(--color-charcoal-900);
4240
4387
  }
@@ -4340,6 +4487,10 @@
4340
4487
  background-color: #404446;
4341
4488
  }
4342
4489
 
4490
+ .\[\&\]\:\!w-\[120px\] {
4491
+ width: 120px !important;
4492
+ }
4493
+
4343
4494
  .focus\:\[\&_\.input-field\]\:bg-transparent:focus .input-field {
4344
4495
  background-color: #0000;
4345
4496
  }
@@ -4781,10 +4932,6 @@
4781
4932
  overflow: auto;
4782
4933
  }
4783
4934
 
4784
- .overflow-hidden {
4785
- overflow: hidden;
4786
- }
4787
-
4788
4935
  .rounded-2xl {
4789
4936
  border-radius: var(--radius-2xl);
4790
4937
  }
@@ -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-Uu65do7x.js";
2
- import "./main.CpORyZoE.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-CsiwsM42.js";
2
+ import "./main.BmcV9296.js";
3
3
  import "react/jsx-runtime";
4
- import "./app-loader-BnxLpX27.js";
4
+ import "./app-loader-C7A2YjX4.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-Uu65do7x.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-CsiwsM42.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-BnxLpX27.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-C7A2YjX4.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.CpORyZoE.js";
13
+ import "./main.BmcV9296.js";
14
14
  const PaginationButton = ({ active = false, ...props }) => {
15
15
  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");
16
16
  return jsx(Button, { color: "light", size: "small", ...mergeClassNameProps(props, className), children: props.children });
@@ -238,7 +238,7 @@ function FolderItem(props) {
238
238
  const { uiNode, isAllowedToCreateDocuments, className, onRenameNode, onDuplicateNode, onDeleteNode, onSelectNode, onAddFile, onCopyNode, onMoveNode } = props;
239
239
  const [mode, setMode] = useState(READ);
240
240
  const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
241
- const { dragProps } = useDrag(props);
241
+ const { dragProps } = useDrag({ ...props, uiNode });
242
242
  const { isDropTarget, dropProps } = useDrop({
243
243
  uiNode,
244
244
  onAddFile,
@@ -251,6 +251,7 @@ function FolderItem(props) {
251
251
  }
252
252
  function onSubmit(name) {
253
253
  onRenameNode(name, uiNode);
254
+ setMode(READ);
254
255
  }
255
256
  function onClick() {
256
257
  onSelectNode(uiNode);
@@ -2577,6 +2578,12 @@ function calculateRange({
2577
2578
  }) {
2578
2579
  const lastIndex = measurements.length - 1;
2579
2580
  const getOffset = (index) => measurements[index].start;
2581
+ if (measurements.length <= lanes) {
2582
+ return {
2583
+ startIndex: 0,
2584
+ endIndex: lastIndex
2585
+ };
2586
+ }
2580
2587
  let startIndex = findNearestBinarySearch(
2581
2588
  0,
2582
2589
  lastIndex,
@@ -3710,13 +3717,36 @@ function FolderView(props) {
3710
3717
  const { t } = useTranslation();
3711
3718
  const folderNodes = node.children.filter((node2) => node2.kind === FOLDER).sort(sortUiNodesByName);
3712
3719
  const fileNodes = node.children.filter((node2) => node2.kind === FILE).sort(sortUiNodesByName);
3720
+ const folderCallbacks = {
3721
+ onSelectNode: (node2) => nodeProps.onSelectNode(node2),
3722
+ onRenameNode: (name, node2) => nodeProps.onRenameNode(name, node2),
3723
+ onDuplicateNode: (node2) => nodeProps.onDuplicateNode(node2),
3724
+ onDeleteNode: (node2) => nodeProps.onDeleteNode(node2)
3725
+ };
3726
+ const fileCallbacks = {
3727
+ onSelectNode: (node2) => nodeProps.onSelectNode(node2),
3728
+ onRenameNode: (name, node2) => nodeProps.onRenameNode(name, node2),
3729
+ onDuplicateNode: (node2) => nodeProps.onDuplicateNode(node2),
3730
+ onDeleteNode: (node2) => nodeProps.onDeleteNode(node2)
3731
+ };
3732
+ const baseNodeCallbacks = {
3733
+ onAddFile: async (file, parentNode) => {
3734
+ await nodeProps.onAddFile(file, parentNode);
3735
+ },
3736
+ onCopyNode: async (uiNode, targetNode) => {
3737
+ await nodeProps.onCopyNode(uiNode, targetNode);
3738
+ },
3739
+ onMoveNode: async (uiNode, targetNode) => {
3740
+ await nodeProps.onMoveNode(uiNode, targetNode);
3741
+ }
3742
+ };
3713
3743
  return jsxs("div", { className: twMerge("rounded-md border-2 border-transparent p-2", isDropTarget && "border-dashed border-blue-100", className), ...containerProps, children: [jsx(DriveLayout.ContentSection, { title: t("folderView.sections.folders.title", {
3714
3744
  defaultValue: "Folders"
3715
- }), className: "mb-4", children: folderNodes.length > 0 ? folderNodes.map((folderNode) => jsx(FolderItem, { uiNode: folderNode, onAddFile: nodeProps.onAddFile, onCopyNode: nodeProps.onCopyNode, onMoveNode: nodeProps.onMoveNode, onSelectNode: nodeProps.onSelectNode, onRenameNode: nodeProps.onRenameNode, onDuplicateNode: nodeProps.onDuplicateNode, onDeleteNode: nodeProps.onDeleteNode, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }, folderNode.id)) : jsx("div", { className: "mb-8 text-sm text-gray-400", children: t("folderView.sections.folders.empty", {
3745
+ }), className: "mb-4", children: folderNodes.length > 0 ? folderNodes.map((folderNode) => jsx(FolderItem, { uiNode: folderNode, ...baseNodeCallbacks, ...folderCallbacks, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }, folderNode.id)) : jsx("div", { className: "mb-8 text-sm text-gray-400", children: t("folderView.sections.folders.empty", {
3716
3746
  defaultValue: "No documents or files 📄"
3717
3747
  }) }) }), jsx(DriveLayout.ContentSection, { title: t("folderView.sections.documents.title", {
3718
3748
  defaultValue: "Documents and files"
3719
- }), children: jsx("div", { className: twMerge("w-full", fileNodes.length > 0 ? "min-h-[400px]" : "min-h-14"), children: jsx(FileContentView, { fileNodes, onSelectNode: nodeProps.onSelectNode, onRenameNode: nodeProps.onRenameNode, onDuplicateNode: nodeProps.onDuplicateNode, onDeleteNode: nodeProps.onDeleteNode, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }) }) })] });
3749
+ }), children: jsx("div", { className: twMerge("w-full", fileNodes.length > 0 ? "min-h-[400px]" : "min-h-14"), children: jsx(FileContentView, { fileNodes, ...fileCallbacks, isAllowedToCreateDocuments: nodeProps.isAllowedToCreateDocuments }) }) })] });
3720
3750
  }
3721
3751
  function Editor(props) {
3722
3752
  const { document: document2, dispatch, className, children } = props;
@@ -3930,7 +3960,7 @@ function Content() {
3930
3960
  );
3931
3961
  });
3932
3962
  }, [selectedDriveNode, selectedNode, addFile]);
3933
- return /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col overflow-hidden", id: "content-view", children: fileNodeDocument ? /* @__PURE__ */ jsx(DocumentEditorContainer, {}, fileNodeDocument.documentId) : selectedDriveNode ? /* @__PURE__ */ jsx(DriveEditorContainer, {}, selectedDriveNode.id) : null });
3963
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full flex-col overflow-auto", id: "content-view", children: fileNodeDocument ? /* @__PURE__ */ jsx(DocumentEditorContainer, {}, fileNodeDocument.documentId) : selectedDriveNode ? /* @__PURE__ */ jsx(DriveEditorContainer, {}, selectedDriveNode.id) : null });
3934
3964
  }
3935
3965
  export {
3936
3966
  Content as default
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-BnxLpX27.js","assets/main.CpORyZoE.js","assets/app-loader-Bnp0H-wa.css"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./main.CpORyZoE.js";
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-loader-C7A2YjX4.js","assets/main.BmcV9296.js","assets/app-loader-pcztQTL4.css"])))=>i.map(i=>d[i]);
2
+ import { _ as __vitePreload } from "./main.BmcV9296.js";
3
3
  import { createRoot } from "react-dom/client";
4
4
  async function renderApp(element) {
5
- const AppLoader = await __vitePreload(() => import("./app-loader-BnxLpX27.js").then((n) => n.c9), true ? __vite__mapDeps([0,1,2]) : void 0);
5
+ const AppLoader = await __vitePreload(() => import("./app-loader-C7A2YjX4.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");