@powerhousedao/connect 1.0.8 → 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 (40) hide show
  1. package/LICENSE +661 -0
  2. package/dist/.env +0 -5
  3. package/dist/assets/{app-D3TxLTK-.css → app-BIIVKAZr.css} +241 -60
  4. package/dist/assets/{app-Bw1Ba-jV.js → app-CsiwsM42.js} +2262 -1224
  5. package/dist/assets/{app-loader-KTD3Q6e9.js → app-loader-C7A2YjX4.js} +876 -577
  6. package/dist/assets/{app-loader-CjrEwupY.css → app-loader-pcztQTL4.css} +189 -26
  7. package/dist/assets/{ccip-D3HujWHr.js → ccip-BG1d6viz.js} +3 -3
  8. package/dist/assets/{content-D3TuBhK9.js → content-0UFgs2d1.js} +37 -7
  9. package/dist/assets/{index-DpasqVlD.js → index-BMDqhr-9.js} +3 -3
  10. package/dist/assets/{index-DsNVpRhT.js → index-CTEGX1We.js} +670 -519
  11. package/dist/assets/{index-yFk8X8m1.js → index-yr0-SqYf.js} +4 -4
  12. package/dist/assets/{main.CzEw2R-H.js → main.BmcV9296.js} +1 -1
  13. package/dist/assets/{style-D4JhTt_m.css → style-Ce3V83BE.css} +31 -36
  14. package/dist/external-packages.js +5 -0
  15. package/dist/hmr.js +4 -1
  16. package/dist/index.html +1 -4
  17. package/dist/modules/@powerhousedao/reactor-browser/{chunk-G6LMXRY5.js → chunk-2ONJ2PX4.js} +1 -1
  18. package/dist/modules/@powerhousedao/reactor-browser/{chunk-P46ZMPJ3.js → chunk-3C54663M.js} +1 -1
  19. package/dist/modules/@powerhousedao/reactor-browser/{chunk-6AXML2S3.js → chunk-5QJXNK35.js} +1 -1
  20. package/dist/modules/@powerhousedao/reactor-browser/{chunk-FW7N6EJH.js → chunk-C7QRY43M.js} +3 -3
  21. package/dist/modules/@powerhousedao/reactor-browser/{chunk-45DCPCA7.js → chunk-CO2RVWYY.js} +1 -1
  22. package/dist/modules/@powerhousedao/reactor-browser/{chunk-POMUCSTC.js → chunk-ISDEPHKP.js} +74 -20
  23. package/dist/modules/@powerhousedao/reactor-browser/{chunk-F3RCGUF6.js → chunk-NHD6VUCD.js} +2 -2
  24. package/dist/modules/@powerhousedao/reactor-browser/{chunk-YOX3ZAET.js → chunk-SQ5HIKYV.js} +581 -334
  25. package/dist/modules/@powerhousedao/reactor-browser/{chunk-M2UUQ5LH.js → chunk-U34SEKEB.js} +2 -2
  26. package/dist/modules/@powerhousedao/reactor-browser/{chunk-4LZZ55AN.js → chunk-XV42KZK3.js} +1 -1
  27. package/dist/modules/@powerhousedao/reactor-browser/context/index.js +2 -2
  28. package/dist/modules/@powerhousedao/reactor-browser/context/read-mode.js +2 -2
  29. package/dist/modules/@powerhousedao/reactor-browser/hooks/index.js +8 -8
  30. package/dist/modules/@powerhousedao/reactor-browser/hooks/useAddDebouncedOperations.js +3 -3
  31. package/dist/modules/@powerhousedao/reactor-browser/hooks/useConnectCrypto.js +2 -2
  32. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentDrives.js +2 -2
  33. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDocumentEditor.js +5 -5
  34. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActions.js +2 -2
  35. package/dist/modules/@powerhousedao/reactor-browser/hooks/useDriveActionsWithUiNodes.js +3 -3
  36. package/dist/modules/@powerhousedao/reactor-browser/index.js +10 -10
  37. package/dist/modules/@powerhousedao/reactor-browser/reactor.js +2 -2
  38. package/dist/swEnv.js +0 -3
  39. package/dist/vite-envs.sh +1 -28
  40. 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;
@@ -2958,6 +3072,23 @@
2958
3072
  user-select: none;
2959
3073
  }
2960
3074
 
3075
+ .\[scrollbar-width\:none\] {
3076
+ scrollbar-width: none;
3077
+ }
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
+
2961
3092
  .group-focus-within\:\!text-gray-900:is(:where(.group):focus-within *) {
2962
3093
  color: var(--color-gray-900) !important;
2963
3094
  }
@@ -3382,6 +3513,10 @@
3382
3513
  background-color: #0000 !important;
3383
3514
  }
3384
3515
 
3516
+ .hover\:bg-blue-100:hover {
3517
+ background-color: var(--color-blue-100);
3518
+ }
3519
+
3385
3520
  .hover\:bg-gray-50:hover {
3386
3521
  background-color: var(--color-gray-50);
3387
3522
  }
@@ -3474,10 +3609,6 @@
3474
3609
  color: var(--color-slate-200);
3475
3610
  }
3476
3611
 
3477
- .hover\:text-white:hover {
3478
- color: var(--color-white);
3479
- }
3480
-
3481
3612
  .hover\:underline:hover {
3482
3613
  text-decoration-line: underline;
3483
3614
  }
@@ -3495,6 +3626,10 @@
3495
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, );
3496
3627
  }
3497
3628
 
3629
+ .hover\:scrollbar-thumb-gray-300:hover {
3630
+ --scrollbar-thumb: #d8d9da;
3631
+ }
3632
+
3498
3633
  .focus-within\:hover\:cursor-default:focus-within:hover {
3499
3634
  cursor: default;
3500
3635
  }
@@ -3694,6 +3829,14 @@
3694
3829
  opacity: 1;
3695
3830
  }
3696
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
+
3697
3840
  .aria-selected\:opacity-30[aria-selected="true"] {
3698
3841
  opacity: .3;
3699
3842
  }
@@ -4062,6 +4205,10 @@
4062
4205
  --tw-ring-color: var(--color-charcoal-300);
4063
4206
  }
4064
4207
 
4208
+ .dark\:scrollbar-thumb-charcoal-700:where(.dark, .dark *) {
4209
+ --scrollbar-thumb: #485265;
4210
+ }
4211
+
4065
4212
  .dark\:group-focus-within\:\!text-gray-50:where(.dark, .dark *):is(:where(.group):focus-within *) {
4066
4213
  color: var(--color-gray-50) !important;
4067
4214
  }
@@ -4231,6 +4378,10 @@
4231
4378
  color: var(--color-slate-50);
4232
4379
  }
4233
4380
 
4381
+ .dark\:hover\:scrollbar-thumb-charcoal-700:where(.dark, .dark *):hover {
4382
+ --scrollbar-thumb: #485265;
4383
+ }
4384
+
4234
4385
  .dark\:focus-within\:hover\:bg-charcoal-900:where(.dark, .dark *):focus-within:hover {
4235
4386
  background-color: var(--color-charcoal-900);
4236
4387
  }
@@ -4336,6 +4487,10 @@
4336
4487
  background-color: #404446;
4337
4488
  }
4338
4489
 
4490
+ .\[\&\]\:\!w-\[120px\] {
4491
+ width: 120px !important;
4492
+ }
4493
+
4339
4494
  .focus\:\[\&_\.input-field\]\:bg-transparent:focus .input-field {
4340
4495
  background-color: #0000;
4341
4496
  }
@@ -4375,6 +4530,18 @@
4375
4530
  flex-shrink: 0;
4376
4531
  }
4377
4532
 
4533
+ .\[\&\:\:-webkit-scrollbar\]\:\!hidden::-webkit-scrollbar {
4534
+ display: none !important;
4535
+ }
4536
+
4537
+ .\[\&\:\:-webkit-scrollbar-thumb\]\:\!hidden::-webkit-scrollbar-thumb {
4538
+ display: none !important;
4539
+ }
4540
+
4541
+ .\[\&\:\:-webkit-scrollbar-track\]\:\!hidden::-webkit-scrollbar-track {
4542
+ display: none !important;
4543
+ }
4544
+
4378
4545
  .\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button {
4379
4546
  display: none;
4380
4547
  }
@@ -4765,10 +4932,6 @@
4765
4932
  overflow: auto;
4766
4933
  }
4767
4934
 
4768
- .overflow-hidden {
4769
- overflow: hidden;
4770
- }
4771
-
4772
4935
  .rounded-2xl {
4773
4936
  border-radius: var(--radius-2xl);
4774
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-Bw1Ba-jV.js";
2
- import "./main.CzEw2R-H.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-KTD3Q6e9.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-Bw1Ba-jV.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-KTD3Q6e9.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.CzEw2R-H.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-KTD3Q6e9.js","assets/main.CzEw2R-H.js","assets/app-loader-CjrEwupY.css"])))=>i.map(i=>d[i]);
2
- import { _ as __vitePreload } from "./main.CzEw2R-H.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-KTD3Q6e9.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");