folder-pane 4.0.1-1 → 4.1.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 (117) hide show
  1. package/README.md +4 -0
  2. package/dist/_virtual/~icons/lucide/chevron-left.cjs.js +2 -0
  3. package/dist/_virtual/~icons/lucide/chevron-left.cjs.js.map +1 -0
  4. package/dist/_virtual/~icons/lucide/{trash-2.esm.js → chevron-left.esm.js} +4 -4
  5. package/dist/_virtual/~icons/lucide/chevron-left.esm.js.map +1 -0
  6. package/dist/accessCache.cjs.js +2 -0
  7. package/dist/accessCache.cjs.js.map +1 -0
  8. package/dist/accessCache.d.ts +37 -0
  9. package/dist/accessCache.d.ts.map +1 -0
  10. package/dist/accessCache.esm.js +34 -0
  11. package/dist/accessCache.esm.js.map +1 -0
  12. package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +50 -38
  13. package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -1
  14. package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +29 -5
  15. package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -1
  16. package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +321 -194
  17. package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -1
  18. package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js +1 -1
  19. package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js.map +1 -1
  20. package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js +1 -1
  21. package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js.map +1 -1
  22. package/dist/components/folder-pane-content/FolderPaneContent.cjs.js.map +1 -1
  23. package/dist/components/folder-pane-content/FolderPaneContent.esm.js.map +1 -1
  24. package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js +1 -1
  25. package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js.map +1 -1
  26. package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js +1 -1
  27. package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js.map +1 -1
  28. package/dist/components/folder-pane-provider/FolderPaneProvider.cjs.js +2 -0
  29. package/dist/components/folder-pane-provider/FolderPaneProvider.cjs.js.map +1 -0
  30. package/dist/components/folder-pane-provider/FolderPaneProvider.d.ts +16 -0
  31. package/dist/components/folder-pane-provider/FolderPaneProvider.d.ts.map +1 -0
  32. package/dist/components/folder-pane-provider/FolderPaneProvider.esm.js +293 -0
  33. package/dist/components/folder-pane-provider/FolderPaneProvider.esm.js.map +1 -0
  34. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.cjs.js +2 -0
  35. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.cjs.js.map +1 -0
  36. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.esm.js +6 -0
  37. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.esm.js.map +1 -0
  38. package/dist/components/folder-pane-provider/index.cjs.js +1 -0
  39. package/dist/components/folder-pane-provider/index.d.ts +2 -0
  40. package/dist/components/folder-pane-provider/index.d.ts.map +1 -0
  41. package/dist/components/folder-pane-provider/index.esm.js +1 -0
  42. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js +23 -23
  43. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js.map +1 -1
  44. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts +17 -2
  45. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts.map +1 -1
  46. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js +249 -113
  47. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js.map +1 -1
  48. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js +1 -1
  49. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js.map +1 -1
  50. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js +1 -1
  51. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js.map +1 -1
  52. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js.map +1 -1
  53. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js.map +1 -1
  54. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js.map +1 -1
  55. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js.map +1 -1
  56. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js +35 -21
  57. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js.map +1 -1
  58. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts +14 -2
  59. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts.map +1 -1
  60. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js +201 -88
  61. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js.map +1 -1
  62. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js +1 -1
  63. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js.map +1 -1
  64. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js +1 -1
  65. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js.map +1 -1
  66. package/dist/components/folder-pane-view/FolderPaneView.cjs.js +90 -29
  67. package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -1
  68. package/dist/components/folder-pane-view/FolderPaneView.d.ts +41 -5
  69. package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -1
  70. package/dist/components/folder-pane-view/FolderPaneView.esm.js +573 -266
  71. package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -1
  72. package/dist/components/folder-pane-view/resourceLoad.cjs.js +2 -0
  73. package/dist/components/folder-pane-view/resourceLoad.cjs.js.map +1 -0
  74. package/dist/components/folder-pane-view/resourceLoad.d.ts +8 -0
  75. package/dist/components/folder-pane-view/resourceLoad.d.ts.map +1 -0
  76. package/dist/components/folder-pane-view/resourceLoad.esm.js +7 -0
  77. package/dist/components/folder-pane-view/resourceLoad.esm.js.map +1 -0
  78. package/dist/debug.cjs.js +2 -0
  79. package/dist/debug.cjs.js.map +1 -0
  80. package/dist/debug.d.ts +5 -0
  81. package/dist/debug.d.ts.map +1 -0
  82. package/dist/debug.esm.js +10 -0
  83. package/dist/debug.esm.js.map +1 -0
  84. package/dist/folderPane.cjs.js +2 -2
  85. package/dist/folderPane.cjs.js.map +1 -1
  86. package/dist/folderPane.d.ts +2 -2
  87. package/dist/folderPane.d.ts.map +1 -1
  88. package/dist/folderPane.esm.js +13 -10
  89. package/dist/folderPane.esm.js.map +1 -1
  90. package/dist/helpers.cjs.js +1 -1
  91. package/dist/helpers.cjs.js.map +1 -1
  92. package/dist/helpers.d.ts +13 -2
  93. package/dist/helpers.d.ts.map +1 -1
  94. package/dist/helpers.esm.js +34 -14
  95. package/dist/helpers.esm.js.map +1 -1
  96. package/dist/primitives/context.cjs.js +2 -0
  97. package/dist/primitives/context.cjs.js.map +1 -0
  98. package/dist/primitives/context.d.ts +14 -0
  99. package/dist/primitives/context.d.ts.map +1 -0
  100. package/dist/primitives/context.esm.js +6 -0
  101. package/dist/primitives/context.esm.js.map +1 -0
  102. package/dist/requestQueue.cjs.js +1 -1
  103. package/dist/requestQueue.cjs.js.map +1 -1
  104. package/dist/requestQueue.d.ts +10 -2
  105. package/dist/requestQueue.d.ts.map +1 -1
  106. package/dist/requestQueue.esm.js +32 -22
  107. package/dist/requestQueue.esm.js.map +1 -1
  108. package/dist/resourceActionItems.cjs.js +2 -0
  109. package/dist/resourceActionItems.cjs.js.map +1 -0
  110. package/dist/resourceActionItems.d.ts +19 -0
  111. package/dist/resourceActionItems.d.ts.map +1 -0
  112. package/dist/resourceActionItems.esm.js +42 -0
  113. package/dist/resourceActionItems.esm.js.map +1 -0
  114. package/package.json +12 -8
  115. package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
  116. package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
  117. package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
@@ -1,2 +1,2 @@
1
- var e=require("lit").css`:host{z-index:100;background:var(--solid-ui-color-white,#fff);flex:none;min-width:0;display:block;position:sticky;top:0}.folder-pane-storage-header{justify-content:space-between;align-items:center;padding:10px 0;display:flex}.folder-pane-storage-header-breadcrumbs,.folder-pane-storage-header-breadcrumbs ol,.folder-pane-storage-header-breadcrumbs li,.folder-pane-storage-header-toolbar,.folder-pane-storage-header-view-controls{align-items:center;display:flex}.folder-pane-storage-header-breadcrumbs{gap:.35rem;min-width:0;overflow:auto hidden}.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open{width:12px;height:12px;color:var(--solid-ui-color-gray-500,#6a7282);flex:none}.folder-pane-storage-header-breadcrumbs ol{min-width:0;color:var(--solid-ui-color-gray-600,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);flex-wrap:nowrap;gap:.35rem;margin:0;padding:0;list-style:none}.folder-pane-storage-header-breadcrumbs li{gap:.35rem;min-width:0}.folder-pane-storage-header-breadcrumbs button{color:inherit;cursor:pointer;font:inherit;background:0 0;border:0;padding:0}.folder-pane-storage-header-breadcrumbs button:hover,.folder-pane-storage-header-breadcrumbs button:focus-visible{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-breadcrumbs [aria-current=page]{white-space:nowrap}.folder-pane-storage-header-toolbar{flex:none;justify-content:flex-end;gap:.5rem;min-width:0}.folder-pane-storage-header-search{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);min-width:8rem;max-width:14rem;color:var(--solid-ui-color-gray-500,#6a7282);border-radius:.35rem;align-items:center;gap:.35rem;padding:.25rem .5rem;display:none}.folder-pane-storage-header-search icon-lucide-search{flex:none;width:1rem;height:1rem}.folder-pane-storage-header-search input{width:100%;min-width:0;color:inherit;font:inherit;background:0 0;border:0;outline:0}.folder-pane-storage-header-view-controls{gap:0}.folder-pane-storage-header-view-toggle{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);background:var(--solid-ui-color-white,#fff);justify-content:center;align-items:center;gap:5px;width:44px;height:36px;padding:0 5px;display:flex}.folder-pane-storage-header-view-toggle:first-child{border-radius:5px 0 0 5px}.folder-pane-storage-header-view-toggle:last-child{border-left:0;border-radius:0 5px 5px 0}.folder-pane-storage-header-view-toggle.is-selected{background:var(--solid-ui-color-lavender-300,#e6dcff)}.folder-pane-storage-header-view-toggle solid-ui-button{width:100%;height:100%}.folder-pane-storage-header-view-toggle icon-lucide-layout-grid,.folder-pane-storage-header-view-toggle icon-lucide-list{flex-shrink:0;width:16px;height:16px}.folder-pane-storage-header-view-toggle solid-ui-button[aria-pressed=true]{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-add-menu{align-items:center;margin-left:22px;display:inline-flex}.folder-pane-storage-header-add-menu img[slot=left-icon]{object-fit:contain;flex:none;width:13.333px;height:12.664px;display:block}`;exports.default=e;
1
+ var e=require("lit").css`:host{z-index:100;background:var(--solid-ui-color-white,#fff);flex:none;min-width:0;display:block;position:sticky;top:0}.folder-pane-storage-header{justify-content:space-between;align-items:center;padding:10px 0;display:flex}.folder-pane-storage-header-breadcrumbs,.folder-pane-storage-header-breadcrumbs ol,.folder-pane-storage-header-breadcrumbs li,.folder-pane-storage-header-toolbar,.folder-pane-storage-header-view-controls{align-items:center;display:flex}.folder-pane-storage-header-breadcrumbs{gap:5.6px;min-width:0;padding-left:10px;overflow:auto hidden}.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open{width:12px;height:12px;color:var(--solid-ui-color-gray-500,#6a7282);flex:none}.folder-pane-storage-header-breadcrumbs ol{min-width:0;color:var(--solid-ui-color-gray-600,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);flex-wrap:nowrap;gap:5.6px;margin:0;padding:0;list-style:none}.folder-pane-storage-header-breadcrumbs li{flex:none;gap:5.6px;min-width:0}.folder-pane-storage-header-breadcrumbs button{color:inherit;cursor:pointer;font:inherit;white-space:nowrap;background:0 0;border:0;padding:0}.folder-pane-storage-header-breadcrumbs button:hover,.folder-pane-storage-header-breadcrumbs button:focus-visible{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-breadcrumbs [aria-current=page]{white-space:nowrap}.folder-pane-storage-header-toolbar{min-width:0;padding-right:var(--folder-pane-storage-toolbar-right-padding,0);flex:none;justify-content:flex-end;gap:8px}.folder-pane-storage-header-search{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);min-width:8rem;max-width:14rem;color:var(--solid-ui-color-gray-500,#6a7282);border-radius:.35rem;align-items:center;gap:5.6px;padding:4px 8px;display:none}.folder-pane-storage-header-search icon-lucide-search{flex:none;width:1rem;height:1rem}.folder-pane-storage-header-search input{width:100%;min-width:0;color:inherit;font:inherit;background:0 0;border:0;outline:0}.folder-pane-storage-header-view-controls{gap:0}.folder-pane-storage-header-resource-actions{flex:none;align-items:center;display:inline-flex}.folder-pane-storage-header-view-toggle{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);background:var(--solid-ui-color-white,#fff);justify-content:center;align-items:center;gap:5px;width:44px;height:36px;padding:0 5px;display:flex}.folder-pane-storage-header-view-toggle:first-child{border-radius:5px 0 0 5px}.folder-pane-storage-header-view-toggle:last-child{border-left:0;border-radius:0 5px 5px 0}.folder-pane-storage-header-view-toggle.is-selected{background:var(--solid-ui-color-lavender-300,#e6dcff)}.folder-pane-storage-header-view-toggle solid-ui-button{width:100%;height:100%}.folder-pane-storage-header-view-toggle icon-lucide-layout-grid,.folder-pane-storage-header-view-toggle icon-lucide-list{flex-shrink:0;width:16px;height:16px}.folder-pane-storage-header-view-toggle solid-ui-button[aria-pressed=true]{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-add-menu{align-items:center;margin-left:22px;display:inline-flex}.folder-pane-storage-header-add-trigger{align-items:center;display:inline-flex}.folder-pane-storage-header-add-button{background:var(--solid-ui-color-primary,#7c4dff);min-height:36px;color:var(--solid-ui-color-white,#fff);cursor:pointer;font:inherit;border:0;border-radius:5.6px;justify-content:center;align-items:center;gap:5.6px;padding:5.6px 12px;display:inline-flex}.folder-pane-storage-header-add-button:hover{background:var(--solid-ui-color-primary-hover,#b9a2ff)}.folder-pane-storage-header-add-button:focus-visible{outline:2px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:2px}.folder-pane-storage-header-add-button icon-lucide-plus,.folder-pane-storage-header-add-chevron{flex:none;width:1.25rem;height:1.25rem}.folder-pane-storage-header-add-menu img[slot=left-icon]{object-fit:contain;flex:none;width:13.333px;height:12.664px;display:block}@media (width<=768px){.folder-pane-storage-header{align-items:flex-start;gap:var(--folder-pane-storage-header-mobile-gap,8px);padding:var(--folder-pane-storage-header-mobile-padding,10px 0);border-bottom:1px solid var(--solid-ui-color-gray-200,#e5e7eb);flex-wrap:nowrap}.folder-pane-storage-header-breadcrumbs{flex:1 1 0;align-self:stretch;align-items:flex-end;max-width:100%;margin-top:4px;overflow:visible}.folder-pane-storage-header-breadcrumbs ol{font-size:var(--solid-ui-font-size-sm,.875rem);text-align:left;flex-wrap:nowrap;flex:1 1 0;justify-content:flex-start;align-self:flex-end;align-items:baseline;row-gap:3px}.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open{transform:translateY(-3px)}.folder-pane-storage-header-breadcrumbs li:nth-last-child(n+3),.folder-pane-storage-header-breadcrumbs li:last-child{display:none}.folder-pane-storage-header-breadcrumbs li:only-child{display:flex}.folder-pane-storage-header-breadcrumbs .separator{display:none}.folder-pane-storage-header-breadcrumbs li{flex:0 auto;align-items:baseline;max-width:100%}.folder-pane-storage-header-breadcrumbs li button{white-space:normal;overflow-wrap:anywhere;text-align:left;min-width:0}.folder-pane-storage-header-breadcrumbs .separator{flex:none;margin-left:.35em}.folder-pane-storage-header-breadcrumbs .breadcrumb-label-ending{white-space:nowrap;display:inline-block}.folder-pane-storage-header-breadcrumbs [aria-current=page]{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%;display:block}.folder-pane-storage-header-toolbar{flex:none;margin-left:auto}.folder-pane-storage-header-add-menu{margin:0}.folder-pane-storage-header-add-trigger{z-index:200;box-sizing:border-box;aspect-ratio:1;background:var(--solid-ui-color-primary,#7c4dff);border-radius:6.944px;justify-content:center;align-items:center;gap:11.111px;width:50px;height:50px;padding:9.722px 13.889px;display:flex;position:fixed;bottom:50px;right:30px;box-shadow:1.389px 5.556px 9.722px #0000008f}.folder-pane-storage-header-add-button{box-sizing:border-box;background:0 0;width:100%;height:100%;min-height:0;padding:0}.folder-pane-storage-header-add-button:hover{background:0 0}.folder-pane-storage-header-add-button icon-lucide-plus{width:20px;height:20px}.folder-pane-storage-header-add-label,.folder-pane-storage-header-add-chevron{display:none}}`;exports.default=e;
2
2
  //# sourceMappingURL=FolderPaneStorageHeader.styles.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneStorageHeader.styles.cjs.js","names":["FolderPaneStorageHeader_styles_default"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.css"],"sourcesContent":[":host {\n display: block;\n flex: 0 0 auto;\n min-width: 0;\n position: sticky;\n top: 0;\n z-index: 100;\n background: var(--solid-ui-color-white, #ffffff);\n}\n\n.folder-pane-storage-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 0;\n}\n\n.folder-pane-storage-header-breadcrumbs,\n.folder-pane-storage-header-breadcrumbs ol,\n.folder-pane-storage-header-breadcrumbs li,\n.folder-pane-storage-header-toolbar,\n.folder-pane-storage-header-view-controls {\n display: flex;\n align-items: center;\n}\n\n.folder-pane-storage-header-breadcrumbs {\n min-width: 0;\n gap: 0.35rem;\n overflow-x: auto;\n overflow-y: hidden;\n}\n\n.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open {\n width: 12px;\n height: 12px;\n flex: 0 0 auto;\n color: var(--solid-ui-color-gray-500, #6a7282);\n}\n\n.folder-pane-storage-header-breadcrumbs ol {\n min-width: 0;\n flex-wrap: nowrap;\n gap: 0.35rem;\n margin: 0;\n padding: 0;\n list-style: none;\n color: var(--solid-ui-color-gray-600, #4a5565);\n font-size: var(--solid-ui-font-size-sm, 0.875rem);\n}\n\n.folder-pane-storage-header-breadcrumbs li {\n min-width: 0;\n gap: 0.35rem;\n}\n\n.folder-pane-storage-header-breadcrumbs button {\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n}\n\n.folder-pane-storage-header-breadcrumbs button:hover,\n.folder-pane-storage-header-breadcrumbs button:focus-visible {\n color: var(--solid-ui-color-primary, #7c4dff);\n}\n\n.folder-pane-storage-header-breadcrumbs [aria-current='page'] {\n white-space: nowrap;\n}\n\n.folder-pane-storage-header-toolbar {\n flex: 0 0 auto;\n justify-content: flex-end;\n gap: 0.5rem;\n min-width: 0;\n}\n\n.folder-pane-storage-header-search {\n display: none;\n align-items: center;\n gap: 0.35rem;\n min-width: 8rem;\n max-width: 14rem;\n padding: 0.25rem 0.5rem;\n border: 1px solid var(--solid-ui-color-gray-300, #d1d5dc);\n border-radius: 0.35rem;\n color: var(--solid-ui-color-gray-500, #6a7282);\n}\n\n.folder-pane-storage-header-search icon-lucide-search {\n width: 1rem;\n height: 1rem;\n flex: 0 0 auto;\n}\n\n.folder-pane-storage-header-search input {\n width: 100%;\n min-width: 0;\n border: 0;\n outline: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n}\n\n.folder-pane-storage-header-view-controls {\n gap: 0;\n}\n\n.folder-pane-storage-header-view-toggle {\n display: flex;\n width: 44px;\n height: 36px;\n padding: 0 5px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border: 1px solid var(--solid-ui-color-gray-300, #d1d5dc);\n background: var(--solid-ui-color-white, #ffffff);\n}\n\n.folder-pane-storage-header-view-toggle:first-child {\n border-radius: 5px 0 0 5px;\n}\n\n.folder-pane-storage-header-view-toggle:last-child {\n border-left: 0;\n border-radius: 0 5px 5px 0;\n}\n\n.folder-pane-storage-header-view-toggle.is-selected {\n background: var(--solid-ui-color-lavender-300, #e6dcff);\n}\n\n.folder-pane-storage-header-view-toggle solid-ui-button {\n width: 100%;\n height: 100%;\n}\n\n.folder-pane-storage-header-view-toggle icon-lucide-layout-grid,\n.folder-pane-storage-header-view-toggle icon-lucide-list {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.folder-pane-storage-header-view-toggle solid-ui-button[aria-pressed='true'] {\n color: var(--solid-ui-color-primary, #7c4dff);\n}\n\n.folder-pane-storage-header-add-menu {\n display: inline-flex;\n align-items: center;\n margin-left: 22px;\n}\n\n.folder-pane-storage-header-add-menu img[slot=\"left-icon\"] {\n display: block;\n width: 1.25rem;\n height: 1.25rem;\n object-fit: contain;\n flex: 0 0 auto;\n}\n\n.folder-pane-storage-header-add-menu img[slot=\"left-icon\"] {\n width: 13.333px;\n height: 12.664px;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FolderPaneStorageHeader.styles.cjs.js","names":["FolderPaneStorageHeader_styles_default"],"sources":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { css as e } from "lit";
2
2
  // src/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.css
3
- var t = e`:host{z-index:100;background:var(--solid-ui-color-white,#fff);flex:none;min-width:0;display:block;position:sticky;top:0}.folder-pane-storage-header{justify-content:space-between;align-items:center;padding:10px 0;display:flex}.folder-pane-storage-header-breadcrumbs,.folder-pane-storage-header-breadcrumbs ol,.folder-pane-storage-header-breadcrumbs li,.folder-pane-storage-header-toolbar,.folder-pane-storage-header-view-controls{align-items:center;display:flex}.folder-pane-storage-header-breadcrumbs{gap:.35rem;min-width:0;overflow:auto hidden}.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open{width:12px;height:12px;color:var(--solid-ui-color-gray-500,#6a7282);flex:none}.folder-pane-storage-header-breadcrumbs ol{min-width:0;color:var(--solid-ui-color-gray-600,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);flex-wrap:nowrap;gap:.35rem;margin:0;padding:0;list-style:none}.folder-pane-storage-header-breadcrumbs li{gap:.35rem;min-width:0}.folder-pane-storage-header-breadcrumbs button{color:inherit;cursor:pointer;font:inherit;background:0 0;border:0;padding:0}.folder-pane-storage-header-breadcrumbs button:hover,.folder-pane-storage-header-breadcrumbs button:focus-visible{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-breadcrumbs [aria-current=page]{white-space:nowrap}.folder-pane-storage-header-toolbar{flex:none;justify-content:flex-end;gap:.5rem;min-width:0}.folder-pane-storage-header-search{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);min-width:8rem;max-width:14rem;color:var(--solid-ui-color-gray-500,#6a7282);border-radius:.35rem;align-items:center;gap:.35rem;padding:.25rem .5rem;display:none}.folder-pane-storage-header-search icon-lucide-search{flex:none;width:1rem;height:1rem}.folder-pane-storage-header-search input{width:100%;min-width:0;color:inherit;font:inherit;background:0 0;border:0;outline:0}.folder-pane-storage-header-view-controls{gap:0}.folder-pane-storage-header-view-toggle{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);background:var(--solid-ui-color-white,#fff);justify-content:center;align-items:center;gap:5px;width:44px;height:36px;padding:0 5px;display:flex}.folder-pane-storage-header-view-toggle:first-child{border-radius:5px 0 0 5px}.folder-pane-storage-header-view-toggle:last-child{border-left:0;border-radius:0 5px 5px 0}.folder-pane-storage-header-view-toggle.is-selected{background:var(--solid-ui-color-lavender-300,#e6dcff)}.folder-pane-storage-header-view-toggle solid-ui-button{width:100%;height:100%}.folder-pane-storage-header-view-toggle icon-lucide-layout-grid,.folder-pane-storage-header-view-toggle icon-lucide-list{flex-shrink:0;width:16px;height:16px}.folder-pane-storage-header-view-toggle solid-ui-button[aria-pressed=true]{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-add-menu{align-items:center;margin-left:22px;display:inline-flex}.folder-pane-storage-header-add-menu img[slot=left-icon]{object-fit:contain;flex:none;width:13.333px;height:12.664px;display:block}`;
3
+ var t = e`:host{z-index:100;background:var(--solid-ui-color-white,#fff);flex:none;min-width:0;display:block;position:sticky;top:0}.folder-pane-storage-header{justify-content:space-between;align-items:center;padding:10px 0;display:flex}.folder-pane-storage-header-breadcrumbs,.folder-pane-storage-header-breadcrumbs ol,.folder-pane-storage-header-breadcrumbs li,.folder-pane-storage-header-toolbar,.folder-pane-storage-header-view-controls{align-items:center;display:flex}.folder-pane-storage-header-breadcrumbs{gap:5.6px;min-width:0;padding-left:10px;overflow:auto hidden}.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open{width:12px;height:12px;color:var(--solid-ui-color-gray-500,#6a7282);flex:none}.folder-pane-storage-header-breadcrumbs ol{min-width:0;color:var(--solid-ui-color-gray-600,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);flex-wrap:nowrap;gap:5.6px;margin:0;padding:0;list-style:none}.folder-pane-storage-header-breadcrumbs li{flex:none;gap:5.6px;min-width:0}.folder-pane-storage-header-breadcrumbs button{color:inherit;cursor:pointer;font:inherit;white-space:nowrap;background:0 0;border:0;padding:0}.folder-pane-storage-header-breadcrumbs button:hover,.folder-pane-storage-header-breadcrumbs button:focus-visible{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-breadcrumbs [aria-current=page]{white-space:nowrap}.folder-pane-storage-header-toolbar{min-width:0;padding-right:var(--folder-pane-storage-toolbar-right-padding,0);flex:none;justify-content:flex-end;gap:8px}.folder-pane-storage-header-search{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);min-width:8rem;max-width:14rem;color:var(--solid-ui-color-gray-500,#6a7282);border-radius:.35rem;align-items:center;gap:5.6px;padding:4px 8px;display:none}.folder-pane-storage-header-search icon-lucide-search{flex:none;width:1rem;height:1rem}.folder-pane-storage-header-search input{width:100%;min-width:0;color:inherit;font:inherit;background:0 0;border:0;outline:0}.folder-pane-storage-header-view-controls{gap:0}.folder-pane-storage-header-resource-actions{flex:none;align-items:center;display:inline-flex}.folder-pane-storage-header-view-toggle{border:1px solid var(--solid-ui-color-gray-300,#d1d5dc);background:var(--solid-ui-color-white,#fff);justify-content:center;align-items:center;gap:5px;width:44px;height:36px;padding:0 5px;display:flex}.folder-pane-storage-header-view-toggle:first-child{border-radius:5px 0 0 5px}.folder-pane-storage-header-view-toggle:last-child{border-left:0;border-radius:0 5px 5px 0}.folder-pane-storage-header-view-toggle.is-selected{background:var(--solid-ui-color-lavender-300,#e6dcff)}.folder-pane-storage-header-view-toggle solid-ui-button{width:100%;height:100%}.folder-pane-storage-header-view-toggle icon-lucide-layout-grid,.folder-pane-storage-header-view-toggle icon-lucide-list{flex-shrink:0;width:16px;height:16px}.folder-pane-storage-header-view-toggle solid-ui-button[aria-pressed=true]{color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-storage-header-add-menu{align-items:center;margin-left:22px;display:inline-flex}.folder-pane-storage-header-add-trigger{align-items:center;display:inline-flex}.folder-pane-storage-header-add-button{background:var(--solid-ui-color-primary,#7c4dff);min-height:36px;color:var(--solid-ui-color-white,#fff);cursor:pointer;font:inherit;border:0;border-radius:5.6px;justify-content:center;align-items:center;gap:5.6px;padding:5.6px 12px;display:inline-flex}.folder-pane-storage-header-add-button:hover{background:var(--solid-ui-color-primary-hover,#b9a2ff)}.folder-pane-storage-header-add-button:focus-visible{outline:2px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:2px}.folder-pane-storage-header-add-button icon-lucide-plus,.folder-pane-storage-header-add-chevron{flex:none;width:1.25rem;height:1.25rem}.folder-pane-storage-header-add-menu img[slot=left-icon]{object-fit:contain;flex:none;width:13.333px;height:12.664px;display:block}@media (width<=768px){.folder-pane-storage-header{align-items:flex-start;gap:var(--folder-pane-storage-header-mobile-gap,8px);padding:var(--folder-pane-storage-header-mobile-padding,10px 0);border-bottom:1px solid var(--solid-ui-color-gray-200,#e5e7eb);flex-wrap:nowrap}.folder-pane-storage-header-breadcrumbs{flex:1 1 0;align-self:stretch;align-items:flex-end;max-width:100%;margin-top:4px;overflow:visible}.folder-pane-storage-header-breadcrumbs ol{font-size:var(--solid-ui-font-size-sm,.875rem);text-align:left;flex-wrap:nowrap;flex:1 1 0;justify-content:flex-start;align-self:flex-end;align-items:baseline;row-gap:3px}.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open{transform:translateY(-3px)}.folder-pane-storage-header-breadcrumbs li:nth-last-child(n+3),.folder-pane-storage-header-breadcrumbs li:last-child{display:none}.folder-pane-storage-header-breadcrumbs li:only-child{display:flex}.folder-pane-storage-header-breadcrumbs .separator{display:none}.folder-pane-storage-header-breadcrumbs li{flex:0 auto;align-items:baseline;max-width:100%}.folder-pane-storage-header-breadcrumbs li button{white-space:normal;overflow-wrap:anywhere;text-align:left;min-width:0}.folder-pane-storage-header-breadcrumbs .separator{flex:none;margin-left:.35em}.folder-pane-storage-header-breadcrumbs .breadcrumb-label-ending{white-space:nowrap;display:inline-block}.folder-pane-storage-header-breadcrumbs [aria-current=page]{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%;display:block}.folder-pane-storage-header-toolbar{flex:none;margin-left:auto}.folder-pane-storage-header-add-menu{margin:0}.folder-pane-storage-header-add-trigger{z-index:200;box-sizing:border-box;aspect-ratio:1;background:var(--solid-ui-color-primary,#7c4dff);border-radius:6.944px;justify-content:center;align-items:center;gap:11.111px;width:50px;height:50px;padding:9.722px 13.889px;display:flex;position:fixed;bottom:50px;right:30px;box-shadow:1.389px 5.556px 9.722px #0000008f}.folder-pane-storage-header-add-button{box-sizing:border-box;background:0 0;width:100%;height:100%;min-height:0;padding:0}.folder-pane-storage-header-add-button:hover{background:0 0}.folder-pane-storage-header-add-button icon-lucide-plus{width:20px;height:20px}.folder-pane-storage-header-add-label,.folder-pane-storage-header-add-chevron{display:none}}`;
4
4
  export { t as default };
5
5
 
6
6
  //# sourceMappingURL=FolderPaneStorageHeader.styles.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneStorageHeader.styles.esm.js","names":["FolderPaneStorageHeader_styles_default"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.css"],"sourcesContent":[":host {\n display: block;\n flex: 0 0 auto;\n min-width: 0;\n position: sticky;\n top: 0;\n z-index: 100;\n background: var(--solid-ui-color-white, #ffffff);\n}\n\n.folder-pane-storage-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 10px 0;\n}\n\n.folder-pane-storage-header-breadcrumbs,\n.folder-pane-storage-header-breadcrumbs ol,\n.folder-pane-storage-header-breadcrumbs li,\n.folder-pane-storage-header-toolbar,\n.folder-pane-storage-header-view-controls {\n display: flex;\n align-items: center;\n}\n\n.folder-pane-storage-header-breadcrumbs {\n min-width: 0;\n gap: 0.35rem;\n overflow-x: auto;\n overflow-y: hidden;\n}\n\n.folder-pane-storage-header-breadcrumbs icon-lucide-folder-open {\n width: 12px;\n height: 12px;\n flex: 0 0 auto;\n color: var(--solid-ui-color-gray-500, #6a7282);\n}\n\n.folder-pane-storage-header-breadcrumbs ol {\n min-width: 0;\n flex-wrap: nowrap;\n gap: 0.35rem;\n margin: 0;\n padding: 0;\n list-style: none;\n color: var(--solid-ui-color-gray-600, #4a5565);\n font-size: var(--solid-ui-font-size-sm, 0.875rem);\n}\n\n.folder-pane-storage-header-breadcrumbs li {\n min-width: 0;\n gap: 0.35rem;\n}\n\n.folder-pane-storage-header-breadcrumbs button {\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n font: inherit;\n}\n\n.folder-pane-storage-header-breadcrumbs button:hover,\n.folder-pane-storage-header-breadcrumbs button:focus-visible {\n color: var(--solid-ui-color-primary, #7c4dff);\n}\n\n.folder-pane-storage-header-breadcrumbs [aria-current='page'] {\n white-space: nowrap;\n}\n\n.folder-pane-storage-header-toolbar {\n flex: 0 0 auto;\n justify-content: flex-end;\n gap: 0.5rem;\n min-width: 0;\n}\n\n.folder-pane-storage-header-search {\n display: none;\n align-items: center;\n gap: 0.35rem;\n min-width: 8rem;\n max-width: 14rem;\n padding: 0.25rem 0.5rem;\n border: 1px solid var(--solid-ui-color-gray-300, #d1d5dc);\n border-radius: 0.35rem;\n color: var(--solid-ui-color-gray-500, #6a7282);\n}\n\n.folder-pane-storage-header-search icon-lucide-search {\n width: 1rem;\n height: 1rem;\n flex: 0 0 auto;\n}\n\n.folder-pane-storage-header-search input {\n width: 100%;\n min-width: 0;\n border: 0;\n outline: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n}\n\n.folder-pane-storage-header-view-controls {\n gap: 0;\n}\n\n.folder-pane-storage-header-view-toggle {\n display: flex;\n width: 44px;\n height: 36px;\n padding: 0 5px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border: 1px solid var(--solid-ui-color-gray-300, #d1d5dc);\n background: var(--solid-ui-color-white, #ffffff);\n}\n\n.folder-pane-storage-header-view-toggle:first-child {\n border-radius: 5px 0 0 5px;\n}\n\n.folder-pane-storage-header-view-toggle:last-child {\n border-left: 0;\n border-radius: 0 5px 5px 0;\n}\n\n.folder-pane-storage-header-view-toggle.is-selected {\n background: var(--solid-ui-color-lavender-300, #e6dcff);\n}\n\n.folder-pane-storage-header-view-toggle solid-ui-button {\n width: 100%;\n height: 100%;\n}\n\n.folder-pane-storage-header-view-toggle icon-lucide-layout-grid,\n.folder-pane-storage-header-view-toggle icon-lucide-list {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}\n\n.folder-pane-storage-header-view-toggle solid-ui-button[aria-pressed='true'] {\n color: var(--solid-ui-color-primary, #7c4dff);\n}\n\n.folder-pane-storage-header-add-menu {\n display: inline-flex;\n align-items: center;\n margin-left: 22px;\n}\n\n.folder-pane-storage-header-add-menu img[slot=\"left-icon\"] {\n display: block;\n width: 1.25rem;\n height: 1.25rem;\n object-fit: contain;\n flex: 0 0 auto;\n}\n\n.folder-pane-storage-header-add-menu img[slot=\"left-icon\"] {\n width: 13.333px;\n height: 12.664px;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FolderPaneStorageHeader.styles.esm.js","names":["FolderPaneStorageHeader_styles_default"],"sources":[],"mappings":""}
@@ -1,45 +1,106 @@
1
- const e=require("../../helpers.cjs.js");require("../folder-pane-container/index.cjs.js"),require("../folder-pane-sidebar/index.cjs.js"),require("../folder-pane-content/index.cjs.js"),require("../folder-pane-storage-header/index.cjs.js");const t=require("./renderRequest.cjs.js"),n=require("../../creationSafety.cjs.js"),r=require("../folder-pane-storage-header/FolderPaneCreateDialog.cjs.js"),i=require("../../mintPaneInstance.cjs.js");let a=require("solid-ui"),o=require("solid-logic"),s=require("lit"),c=require("lit/decorators.js");require("solid-ui/components/file-explorer-provider"),require("solid-ui/components/error-state"),require("solid-ui/components/file-explorer-header");var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,ee,I;function L(e,t,n){return(t=re(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t,n){te(e,t),t.set(e,n)}function te(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function z(e,t,n){return e.set(V(e,t),n),n}function B(e,t){return e.get(V(e,t))}function V(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function ne(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:ae(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||ae(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return oe(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:re(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function re(e){var t=ie(e,`string`);return typeof t==`symbol`?t:t+``}function ie(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ae(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function oe(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}f=[(0,a.customElement)(`folder-pane-view`)];var se,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,K=new WeakMap,q=new WeakMap,J=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,Q=new WeakMap,$=new WeakMap;I=(p=(0,c.property)({attribute:!1}),h=(0,c.property)({attribute:!1}),_=(0,c.property)({type:Boolean,attribute:`full-view`}),y=(0,c.property)({type:Boolean,attribute:`hide-storage-header`}),x=(0,c.state)(),C=(0,c.state)(),T=(0,c.state)(),D=(0,c.state)(),k=(0,c.query)(`folder-pane-content`),j=(0,c.query)(`.folder-pane-full-view`),N=(0,c.query)(`folder-pane-sidebar`),F=(0,c.query)(`.folder-pane-status`),`browserContext`),l=class extends a.WebComponent{constructor(...t){super(...t),R(this,H,(u(this),m(this,void 0))),R(this,U,g(this,void 0)),R(this,W,v(this,!1)),R(this,G,b(this,!1)),R(this,K,S(this,void 0)),R(this,q,w(this,`grid`)),R(this,J,E(this,``)),R(this,Y,O(this,void 0)),L(this,`initialLoadGeneration`,0),L(this,`renderGeneration`,0),L(this,`creationInFlight`,!1),L(this,`authListenersAttached`,!1),L(this,`dropProtectionAttached`,!1),R(this,X,A(this,null)),R(this,Z,M(this,null)),R(this,Q,P(this,null)),R(this,$,ee(this,null)),L(this,`handleAuthChange`,()=>{this.requestUpdate()}),L(this,`handleCreatePane`,async t=>{if(t.stopPropagation(),this.creationInFlight||!o.authn.currentUser())return;let s=t.detail?.pane;if(!s?.mintNew)return;let c=this.getActiveContainer(),l=this.ownerDocument,u=this.statusArea;if(!c||!u)return;this.creationInFlight=!0;let d=++this.renderGeneration,f=e.getPaneLabel(s);try{let e=await new Promise(e=>{(0,a.showDialog)(r.default,{props:{label:f},onClose:e})});if(!e||!o.authn.currentUser()||d!==this.renderGeneration||this.getActiveContainer()?.sameTerm(c)!==!0)return;if(!n.isSafeCreationName(e)){i.setMintStatus(u,`error`,n.invalidCreationNameMessage);return}this.clearContentForCreation();let t=await i.mintPaneInstance({context:this.browserContext,container:c,pane:s,name:e,noun:f,statusArea:u,me:o.authn.currentUser()??void 0,dom:l}),p=d===this.renderGeneration&&this.getActiveContainer()?.sameTerm(c)===!0;await this.showCreatedResource({container:c,...t,pane:s,newInstance:p?t.newInstance:void 0})}catch(e){console.error(`Unable to create folder-pane resource`,e),!(e instanceof i.PaneMintError)&&this.statusArea&&i.setMintStatus(this.statusArea,`error`,`Unable to create ${f}: ${e instanceof Error?e.message:String(e)}`)}finally{this.creationInFlight=!1}}),L(this,`handleUpload`,e=>{if(e.stopPropagation(),this.creationInFlight||!o.authn.currentUser())return;let t=this.getActiveContainer(),r=this.statusArea;if(!t||!r||!this.store)return;let s=this.ownerDocument.createElement(`input`);s.type=`file`,s.multiple=!0,s.addEventListener(`change`,()=>{let e=Array.from(s.files??[]),o=e.filter(e=>n.isSafeCreationName(e.name));if(e.filter(e=>!n.isSafeCreationName(e.name)).forEach(e=>i.setMintStatus(r,`error`,`${e.name}: ${n.invalidCreationNameMessage}`)),!o.length)return;this.creationInFlight=!0;let c=o.length,l=Promise.resolve();i.setMintStatus(r,`progress`,`Uploading ${o.length} file${o.length===1?``:`s`}`);let u=()=>{c--,c===0&&(this.creationInFlight=!1,r.dataset.status===`progress`&&r.replaceChildren())};a.widgets.uploadFiles(this.store.fetcher,o,t.uri,t.uri,(e,n)=>{l=l.then(()=>this.showCreatedResource({container:t,containedResource:this.store.sym(n)})).finally(u)},(e,t)=>{i.setMintStatus(r,`error`,t),u()})}),s.click()}),L(this,`clearContentError`,()=>{this.contentError=void 0}),L(this,`retryContent`,()=>{let e=this.selectedResource,t=this.subject;(e||t)&&(this.clearContentError(),e?this.showResourceInContentView(e):t&&this.showInitialContainer(t))}),L(this,`handleResourceSelected`,e=>{let t=e.detail?.resource;t&&(e.stopPropagation(),this.searchQuery=``,this.showSubject(t))}),L(this,`handleResourceOpenPane`,e=>{let t=e.detail?.resource,n=e.detail?.paneName,r=n?this.browserContext?.session.paneRegistry.byName(n):void 0;t&&r&&(e.stopPropagation(),this.searchQuery=``,this.showSubject(t,typeof r?.render==`function`?r:void 0))}),L(this,`handleSelectHome`,()=>{this.searchQuery=``,this.subject&&this.showSubject(this.subject)}),L(this,`handleSearch`,e=>{e.stopPropagation(),this.searchQuery=e.detail?.query||``;let t=this.resourceTarget?.querySelector(`folder-pane-container`);t&&(t.searchQuery=this.searchQuery)}),L(this,`handleSelectBreadcrumbResource`,e=>{let t=e.detail?.resource;t&&(e.stopPropagation(),this.showSubject(t))}),L(this,`handleContainerViewChange`,e=>{let t=e.detail?.view;t&&(e.stopPropagation(),this.setContainerView(t))})}get[I](){return B(H,this)}set browserContext(e){z(H,this,e)}get store(){return this.browserContext?.session.store}get subject(){return B(U,this)}set subject(e){z(U,this,e)}get resourceLogic(){return this.browserContext?.session.logic.resource}get fullView(){return B(W,this)}set fullView(e){z(W,this,e)}get hideStorageHeader(){return B(G,this)}set hideStorageHeader(e){z(G,this,e)}get selectedResource(){return B(K,this)}set selectedResource(e){z(K,this,e)}get containerView(){return B(q,this)}set containerView(e){z(q,this,e)}get searchQuery(){return B(J,this)}set searchQuery(e){z(J,this,e)}get contentError(){return B(Y,this)}set contentError(e){z(Y,this,e)}get contentView(){return B(X,this)}set contentView(e){z(X,this,e)}get fullViewTarget(){return B(Z,this)}set fullViewTarget(e){z(Z,this,e)}get sidebar(){return B(Q,this)}set sidebar(e){z(Q,this,e)}get statusArea(){return B($,this)}set statusArea(e){z($,this,e)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.dropProtectionAttached||=(a.aclControl.preventBrowserDropEvents(this.ownerDocument),!0),this.addEventListener(`folder-pane-create-pane`,this.handleCreatePane),this.addEventListener(`folder-pane-upload`,this.handleUpload),this.authListenersAttached||=(o.authSession.events.on(`login`,this.handleAuthChange),o.authSession.events.on(`logout`,this.handleAuthChange),!0)}disconnectedCallback(){this.renderGeneration=t.invalidateRenderRequest(this.renderGeneration),this.initialLoadGeneration++,this.removeEventListener(`folder-pane-create-pane`,this.handleCreatePane),this.removeEventListener(`folder-pane-upload`,this.handleUpload),this.authListenersAttached&&=(o.authSession.events.off(`login`,this.handleAuthChange),o.authSession.events.off(`logout`,this.handleAuthChange),!1),super.disconnectedCallback()}updated(e){(e.has(`subject`)||e.has(`browserContext`))&&this.subject?((e.has(`subject`)||e.has(`browserContext`))&&(this.selectedResource=void 0,this.renderGeneration++,this.initialLoadGeneration++),this.showInitialContainer(this.subject)):e.has(`fullView`)&&e.get(`fullView`)!==void 0&&(this.selectedResource?this.showResourceInContentView(this.selectedResource):this.subject&&this.renderContainerView(this.subject))}get resourceTarget(){return this.fullView?this.fullViewTarget:this.contentView}showContentError(e){this.resourceTarget?.replaceChildren(),this.contentError=e}renderAccessDeniedScreen(){this.showContentError({title:`Access denied`,message:`You do not have access to the contents of this container.`})}openCreatedResource(e,t){this.searchQuery=``;let n=t?.name?this.browserContext?.session.paneRegistry.byName(t.name)??t:t;this.showSubject(e,typeof n?.render==`function`?n:void 0)}getActiveContainer(){let t=this.selectedResource;if(t&&this.resourceLogic&&e.isContainerResource(t,this.resourceLogic))return t;let n=this.subject,r=t?.dir(),i=n?.uri.endsWith(`/`)?n.uri:`${n?.uri}/`;return n&&r&&i&&r.uri.startsWith(i)?r:this.subject}clearContentForCreation(){this.resourceTarget?.replaceChildren()}async showCreatedResource({container:e,containedResource:t,newInstance:n,pane:r}){let i=this.store;if(!i)return;let o=this.renderGeneration,s=this.browserContext,c=async e=>{try{return await i.fetcher.load(e,{force:!0,clearPreviousData:!0}),!0}catch(t){return a.log.warn(`Unable to reload `+e.uri+`: `+t),!1}},l=await c(e);if(t.uri.endsWith(`/`)){await c(t);let e=i.each(t,a.ns.ldp(`contains`),void 0,t.doc());for(let t of e)t.termType===`NamedNode`&&i.fetcher.getState(t.value)===`failed`&&i.fetcher.unload(t)}this.sidebar?.refreshResources?.(e);let u=this.resourceTarget?.querySelector(`folder-pane-container`);!l&&u?.addOptimisticResource&&u.addOptimisticResource(t),l&&u?.refresh?.(),n&&this.isConnected&&this.renderGeneration===o&&this.browserContext===s&&this.openCreatedResource(n,r)}renderContainerView(e){let t=this.resourceTarget;if(!t)return;this.contentError=void 0;let n=document.createElement(`folder-pane-container`);n.subject=e,n.resourceLogic=this.resourceLogic??null,n.browserContext=this.browserContext,n.view=this.containerView,n.searchQuery=this.searchQuery,n.hideRootSpecialFolders=this.subject?e.sameTerm(this.subject):!1,t.replaceChildren(n)}async showInitialContainer(t){let n=++this.initialLoadGeneration;if(e.isJavaScriptFile(t))this.showSubject(t);else if(this.store&&this.resourceLogic){try{await this.store.fetcher.load(t)}catch(r){if(n!==this.initialLoadGeneration||!this.subject?.sameTerm(t))return;if(e.isAccessDeniedError(r)){this.resourceTarget&&this.renderAccessDeniedScreen();return}a.log.error(`Unable to load storage container: `+r),this.showContentError({title:`Unable to load this folder`,message:`The folder could not be loaded. Try again.`});return}n===this.initialLoadGeneration&&this.subject?.sameTerm(t)&&(this.sidebar?.refreshResources?.(),this.selectedResource||this.showSubject(t))}}getPaneForSubject(e,t){let n=this.store&&(this.store.any(e,a.ns.ui(`mintClass`),void 0,e.doc())||this.store.any(e.doc(),a.ns.ui(`mintClass`),void 0,e.doc()));if(n){let e=t.find(e=>e.mintClass?.sameTerm(n));if(e)return e}return t.find(t=>t.shouldGetFocus?.(e))||t[0]}async renderExplorerInto(e,n,r,i={}){if(!this.browserContext)return;let o=await(0,a.getRelevantPanes)(n,this.browserContext,{excludedPaneNames:[`sharing`],fallbackPaneName:`internal`});if(i.isCurrent&&!i.isCurrent())return;let s=r||this.getPaneForSubject(n,o);if(!s){this.renderExplorerError(n,`No pane is available to display this resource.`);return}let c;try{c=s.render(n,this.browserContext,i.paneOptions||{})}catch(e){a.log.error(`Unable to render selected pane: `+e),this.renderExplorerError(n,`The selected pane could not render this resource.`);return}let l=e.ownerDocument.createElement(`solid-ui-file-explorer-provider`),u=o.map(e=>{let t=e.label(n,this.browserContext);if(t)return{label:t,action:t=>{l.dispatchEvent(new CustomEvent(a.FILE_EXPLORER_OPEN_PANE_EVENT,{bubbles:!0,composed:!0,detail:{subjectUri:n.uri,paneName:e.name}}))}}}).filter(e=>e!==void 0);l.addEventListener(a.FILE_EXPLORER_BACK_EVENT,e=>{(0,a.isExplorerEvent)(e,l)&&(e.stopPropagation(),this.renderGeneration++,this.selectedResource=void 0,this.renderContainerView(this.subject||n))}),l.addEventListener(a.FILE_EXPLORER_OPEN_PANE_EVENT,r=>{if(!(0,a.isExplorerEvent)(r,l))return;r.stopPropagation();let o=r.detail?.paneName,s=o?this.browserContext?.session.paneRegistry.byName(o):void 0;if(s){let r={generation:++this.renderGeneration,subjectUri:n.uri,context:this.browserContext};this.renderExplorerInto(e,n,s,{...i,isCurrent:()=>t.isCurrentRenderRequest(r,this.renderGeneration,this.selectedResource?.uri,this.browserContext)}).catch(e=>{a.log.error(`Unable to switch selected pane: `+e)})}}),(0,a.composeExplorer)(l,{context:this.browserContext,subjectUri:n.uri,pane:s,relevantPanes:o,header:i.showHeader===!1?void 0:{paneIcon:s.icon,menuItems:u},paneElement:c}),(!i.isCurrent||i.isCurrent())&&(this.contentError=void 0,e.replaceChildren(l))}renderExplorerError(e,t){this.showContentError({title:t,message:e.uri})}async showResourceInContentView(n,r,i=!1){let o=++this.renderGeneration;try{let s=this.resourceTarget;if(!s||!this.store||!this.resourceLogic)return;let c={generation:o,subjectUri:n.uri,context:this.browserContext},l=e=>t.isCurrentRenderRequest(c,this.renderGeneration,this.selectedResource?.uri,this.browserContext)&&e.uri===c.subjectUri;if(!l(n))return;if(this.subject?.sameTerm(n)&&!i&&!e.isJavaScriptFile(n)){this.renderContainerView(n);return}if(e.isContainerResource(n,this.resourceLogic)){try{await this.store.fetcher.load(n)}catch(t){if(!l(n))return;if(e.isAccessDeniedError(t)){this.renderAccessDeniedScreen();return}a.log.error(`Unable to load selected container: `+t),this.showContentError({title:`Unable to load this folder`,message:`The folder could not be loaded. Try again.`});return}if(!l(n))return;if(this.sidebar?.refreshResources?.(),i||this.resourceLogic.containerHasIndexDocument(n)){let t=this.store.sym(e.getIndexedApplicationSubject(n,r?.name));try{await this.store.fetcher.load(t.doc())}catch(t){if(!l(n))return;if(e.isAccessDeniedError(t)){this.renderAccessDeniedScreen();return}a.log.error(`Unable to load container index document: `+t)}await this.renderExplorerInto(s,t,r,{isCurrent:()=>l(n),showHeader:!1});return}this.renderContainerView(n);return}try{await this.store.fetcher.load(n)}catch(t){if(!l(n))return;if(e.isAccessDeniedError(t)){this.renderAccessDeniedScreen();return}a.log.warn(`Unable to load selected resource metadata: `+t)}if(!l(n))return;let u=e.isJavaScriptFile(n)?this.browserContext?.session.paneRegistry.byName(`source`):void 0;if(!r&&e.isJavaScriptFile(n)&&!u){this.renderExplorerError(n,`The Source pane is unavailable to display this JavaScript file.`);return}await this.renderExplorerInto(s,n,r||u,{isCurrent:()=>l(n)})}catch(t){if(a.log.error(`Unable to render selected resource: `+t),o===this.renderGeneration&&this.resourceTarget){if(e.isAccessDeniedError(t)){this.renderAccessDeniedScreen();return}this.renderExplorerError(n,`Unable to display the selected resource.`)}}}showSubject(t,n){let r=e.getIndexedContainer(t),i=r&&this.store?this.store.sym(r):void 0,a=i??t,o=!i&&!!this.resourceLogic&&e.isContainerResource(t,this.resourceLogic)&&this.resourceLogic.containerHasIndexDocument(t);this.selectedResource=a,this.showResourceInContentView(a,n,!!i||o)}setContainerView(e){this.containerView=e;let t=this.resourceTarget?.querySelector(`folder-pane-container`);t&&(t.view=e)}render(){return this.fullView?s.html`
2
- ${this.renderContentError()}
1
+ const e=require("../../accessCache.cjs.js");require("../folder-pane-container/index.cjs.js"),require("../folder-pane-sidebar/index.cjs.js"),require("../folder-pane-content/index.cjs.js"),require("../folder-pane-storage-header/index.cjs.js"),require("../../_virtual/~icons/lucide/chevron-left.cjs.js");const t=require("../../helpers.cjs.js"),n=require("./renderRequest.cjs.js"),r=require("../folder-pane-storage-header/FolderPaneCreateDialog.cjs.js"),i=require("../../creationSafety.cjs.js"),a=require("../../mintPaneInstance.cjs.js"),o=require("../../debug.cjs.js"),s=require("./resourceLoad.cjs.js");let c=require("solid-ui"),l=require("solid-logic"),u=require("lit"),d=require("lit/decorators.js");require("solid-ui/components/button"),require("solid-ui/components/file-explorer-provider"),require("solid-ui/components/error-state"),require("solid-ui/components/file-explorer-header");var f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,ee,te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve;function M(e,t,n){return(t=Se(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t,n){ye(e,t),t.set(e,n)}function ye(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function P(e,t,n){return e.set(be(e,t),n),n}function F(e,t){return e.get(be(e,t))}function be(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function xe(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:we(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||we(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return Te(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:Se(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function Se(e){var t=Ce(e,`string`);return typeof t==`symbol`?t:t+``}function Ce(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function we(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function Te(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function I(e,t){if(!Number.isFinite(t)||t<=320)return 256;let n=t-320;return n<180?256:Math.min(480,n,Math.max(180,Number.isFinite(e)?e:256))}h=[(0,c.customElement)(`folder-pane-view`)];var Ee,L=new WeakMap,R=new WeakMap,z=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,G=new WeakMap,K=new WeakMap,q=new WeakMap,J=new WeakMap,Y=new WeakMap,X=new WeakMap,Z=new WeakMap,Q=new WeakMap,$=new WeakMap;ve=(g=(0,d.property)({attribute:!1}),v=(0,d.property)({attribute:!1}),b=(0,d.property)({type:Boolean,attribute:`full-view`}),S=(0,d.state)(),w=(0,d.state)(),E=(0,d.state)(),O=(0,d.state)(),A=(0,d.state)(),ee=(0,d.state)(),ne=(0,d.state)(),ie=(0,d.state)(),oe=(0,d.state)(),ce=(0,d.state)(),ue=(0,d.query)(`folder-pane-content`),fe=(0,d.query)(`.folder-pane-full-view`),me=(0,d.query)(`folder-pane-sidebar`),ge=(0,d.query)(`.folder-pane-status`),`browserContext`),f=class extends c.WebComponent{constructor(...u){super(...u),N(this,L,(p(this),_(this,void 0))),N(this,R,y(this,void 0)),N(this,z,x(this,!1)),N(this,B,C(this,void 0)),N(this,V,T(this,void 0)),N(this,H,D(this,`grid`)),N(this,U,k(this,``)),N(this,W,j(this,!1)),N(this,G,te(this,256)),N(this,K,re(this,480)),N(this,q,ae(this,void 0)),N(this,J,se(this,!1)),N(this,Y,le(this,!1)),M(this,`initialLoadGeneration`,0),M(this,`renderGeneration`,0),M(this,`permissionGeneration`,0),M(this,`permissionRequest`,void 0),M(this,`creationInFlight`,!1),M(this,`authListenersAttached`,!1),M(this,`dropProtectionAttached`,!1),M(this,`sidebarResizeObserver`,void 0),M(this,`responsiveLayoutInitialized`,!1),M(this,`sidebarDrag`,void 0),N(this,X,de(this,null)),N(this,Z,pe(this,null)),N(this,Q,he(this,null)),N(this,$,_e(this,null)),M(this,`handleAuthChange`,()=>{e.resourceAccessCache.clear(),this.refreshCreationPermission(!0),this.requestUpdate()}),M(this,`handleCreatePane`,async e=>{if(e.stopPropagation(),this.creationInFlight||!l.authn.currentUser())return;let n=e.detail?.pane;if(!n?.mintNew)return;let s=this.getActiveContainer(),u=this.ownerDocument,d=this.statusArea;if(!s||!d)return;this.creationInFlight=!0,this.updateUploadAvailability();let f=++this.renderGeneration,p=t.getPaneLabel(n);try{let e=await new Promise(e=>{(0,c.showDialog)(r.default,{props:{label:p},onClose:e})});if(!e||!l.authn.currentUser()||f!==this.renderGeneration||this.getActiveContainer()?.sameTerm(s)!==!0)return;if(!i.isSafeCreationName(e)){a.setMintStatus(d,`error`,i.invalidCreationNameMessage);return}this.clearContentForCreation();let t=await a.mintPaneInstance({context:this.browserContext,container:s,pane:n,name:e,noun:p,statusArea:d,me:l.authn.currentUser()??void 0,dom:u}),o=f===this.renderGeneration&&this.getActiveContainer()?.sameTerm(s)===!0;await this.showCreatedResource({container:s,...t,pane:n,newInstance:o?t.newInstance:void 0})}catch(e){o.error(`Unable to create folder-pane resource`,e),!(e instanceof a.PaneMintError)&&this.statusArea&&a.setMintStatus(this.statusArea,`error`,`Unable to create ${p}: ${e instanceof Error?e.message:String(e)}`)}finally{this.creationInFlight=!1,this.updateUploadAvailability()}}),M(this,`handleUpload`,e=>{if(e.stopPropagation(),this.creationInFlight||!l.authn.currentUser())return;let t=this.ownerDocument.createElement(`input`);t.type=`file`,t.multiple=!0,t.addEventListener(`change`,()=>{this.uploadFiles(Array.from(t.files??[]),!0)}),t.click()}),M(this,`handleDroppedFiles`,e=>{e.stopPropagation();let t=e.detail?.files??[];this.uploadFiles(t,!1)}),M(this,`handleUploadRejected`,e=>{e.stopPropagation();let t=e.detail?.message;t&&this.statusArea&&a.setMintStatus(this.statusArea,`error`,t)}),M(this,`handleResourceDeleted`,e=>{let t=e.detail?.resource;if(!t)return;let r=t.dir(),i=this.getActiveContainer();r&&this.sidebar?.refreshResources?.(r);let a=this.resourceTarget?.querySelector(`folder-pane-container`);if(r&&i?.sameTerm(r)&&a?.refresh?.(),!this.selectedResource?.sameTerm(t))return;this.renderGeneration=n.invalidateRenderRequest(this.renderGeneration);let o=r??this.subject;o?(this.selectedResource=o,this.renderContainerView(o)):this.selectedResource=void 0}),M(this,`clearContentError`,()=>{this.contentError=void 0}),M(this,`retryContent`,()=>{let e=this.contentError?.retry;if(e){this.clearContentError(),e();return}let t=this.selectedResource,n=this.subject;(t||n)&&(this.clearContentError(),t?this.showResourceInContentView(t,void 0,!1,!0):n&&(this.store&&s.clearFailedResource(this.store.fetcher,n),this.showInitialContainer(n)))}),M(this,`handleResourceSelected`,e=>{let t=e.detail?.resource;t&&(e.stopPropagation(),this.searchQuery=``,this.showSubject(t))}),M(this,`handleResourceOpenPane`,e=>{let t=e.detail?.resource,n=e.detail?.paneName,r=n?this.browserContext?.session.paneRegistry.byName(n):void 0;t&&r&&(e.stopPropagation(),this.searchQuery=``,r.name===`folder`?this.showSubject(t,r,!0):this.showSubject(t,typeof r?.render==`function`?r:void 0,!0))}),M(this,`handleSelectHome`,()=>{this.searchQuery=``;let e=this.subject&&this.standaloneBreadcrumbRoot?.sameTerm(this.subject)?this.subject:this.standaloneBreadcrumbRoot;e&&this.showSubject(e)}),M(this,`handleSearch`,e=>{e.stopPropagation(),this.searchQuery=e.detail?.query||``;let t=this.resourceTarget?.querySelector(`folder-pane-container`);t&&(t.searchQuery=this.searchQuery)}),M(this,`handleSelectBreadcrumbResource`,e=>{let t=e.detail?.resource;t&&(e.stopPropagation(),this.showSubject(t))}),M(this,`handleContainerViewChange`,e=>{let t=e.detail?.view;t&&(e.stopPropagation(),this.setContainerView(t))}),M(this,`updateSidebarBounds`,()=>{this.isConnected&&(this.sidebarMaximumWidth=I(480,this.sidebarAvailableWidth),this.resizeSidebar(this.sidebarWidth))}),M(this,`handleSidebarPointerDown`,e=>{if(!this.isConnected||this.sidebarCollapsed||this.sidebarDrag||e.button!==0||!e.isPrimary)return;e.preventDefault();let t=e.currentTarget;t.setPointerCapture(e.pointerId),t.focus(),this.sidebarDrag={separator:t,pointerId:e.pointerId,startX:e.clientX,startWidth:this.sidebarWidth},this.requestUpdate()}),M(this,`handleSidebarPointerMove`,e=>{let t=this.sidebarDrag;this.isConnected&&!this.sidebarCollapsed&&t&&t.pointerId===e.pointerId&&this.resizeSidebar(t.startWidth+e.clientX-t.startX)}),M(this,`handleSidebarPointerEnd`,e=>{this.sidebarDrag?.pointerId===e.pointerId&&this.finishSidebarResize()}),M(this,`handleSidebarResizeKey`,e=>{if(!this.isConnected||this.sidebarCollapsed||this.sidebarDrag||e.altKey||e.ctrlKey||e.metaKey)return;let t;switch(e.key){case`ArrowLeft`:t=this.sidebarWidth-16;break;case`ArrowRight`:t=this.sidebarWidth+16;break;case`Home`:t=180;break;case`End`:t=480;break;default:return}e.preventDefault(),e.stopPropagation(),this.resizeSidebar(t)}),M(this,`handleSidebarToggle`,async e=>{e.stopPropagation();let t=this.sidebar,n=this.renderRoot.querySelector(`.folder-pane-sidebar-resize-handle`),r=!!t&&(t.matches(`:focus-within`)||t.shadowRoot?.activeElement!=null),i=n===this.ownerDocument.activeElement;this.finishSidebarResize(),this.sidebarCollapsed=!this.sidebarCollapsed,this.sidebarCollapsed&&(r||i)&&(await this.updateComplete,this.renderRoot.querySelector(`.folder-pane-sidebar-toggle`)?.focus())}),M(this,`handleFolderPaneResourceError`,e=>{e.stopPropagation();let t=e.detail?.title||`Unable to load this folder`,n=e.detail?.message||`The folder could not be loaded. Try again.`;this.showContentError({title:t,message:n,retry:e.detail?.retry},!1)})}get[ve](){return F(L,this)}set browserContext(e){P(L,this,e)}get store(){return this.browserContext?.session.store}get subject(){return F(R,this)}set subject(e){P(R,this,e)}get resourceLogic(){return this.browserContext?.session.logic.resource}get displayedResource(){return this.selectedResource??this.subject}get fullView(){return F(z,this)}set fullView(e){P(z,this,e)}get selectedResource(){return F(B,this)}set selectedResource(e){P(B,this,e)}get standaloneBreadcrumbRoot(){return F(V,this)}set standaloneBreadcrumbRoot(e){P(V,this,e)}get containerView(){return F(H,this)}set containerView(e){P(H,this,e)}get searchQuery(){return F(U,this)}set searchQuery(e){P(U,this,e)}get sidebarCollapsed(){return F(W,this)}set sidebarCollapsed(e){P(W,this,e)}get sidebarWidth(){return F(G,this)}set sidebarWidth(e){P(G,this,e)}get sidebarMaximumWidth(){return F(K,this)}set sidebarMaximumWidth(e){P(K,this,e)}get contentError(){return F(q,this)}set contentError(e){P(q,this,e)}get showingContainer(){return F(J,this)}set showingContainer(e){P(J,this,e)}get canCreate(){return F(Y,this)}set canCreate(e){P(Y,this,e)}get contentView(){return F(X,this)}set contentView(e){P(X,this,e)}get fullViewTarget(){return F(Z,this)}set fullViewTarget(e){P(Z,this,e)}get sidebar(){return F(Q,this)}set sidebar(e){P(Q,this,e)}get statusArea(){return F($,this)}set statusArea(e){P($,this,e)}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();let e=this.querySelector(`.folder-pane-main-content`);e&&this.sidebarResizeObserver?.observe(e),this.dropProtectionAttached||=(c.aclControl.preventBrowserDropEvents(this.ownerDocument),!0),this.addEventListener(`folder-pane-create-pane`,this.handleCreatePane),this.addEventListener(`folder-pane-upload`,this.handleUpload),this.addEventListener(`folder-pane-upload-files`,this.handleDroppedFiles),this.addEventListener(`folder-pane-upload-rejected`,this.handleUploadRejected),this.addEventListener(`resource-open-pane`,this.handleResourceOpenPane),this.ownerDocument.addEventListener(`solid-resource-deleted`,this.handleResourceDeleted),this.authListenersAttached||=(l.authSession.events.on(`login`,this.handleAuthChange),l.authSession.events.on(`logout`,this.handleAuthChange),!0)}disconnectedCallback(){this.finishSidebarResize(),this.sidebarResizeObserver?.disconnect(),this.renderGeneration=n.invalidateRenderRequest(this.renderGeneration),this.initialLoadGeneration++,this.removeEventListener(`folder-pane-create-pane`,this.handleCreatePane),this.removeEventListener(`folder-pane-upload`,this.handleUpload),this.removeEventListener(`folder-pane-upload-files`,this.handleDroppedFiles),this.removeEventListener(`folder-pane-upload-rejected`,this.handleUploadRejected),this.removeEventListener(`resource-open-pane`,this.handleResourceOpenPane),this.ownerDocument.removeEventListener(`solid-resource-deleted`,this.handleResourceDeleted),this.authListenersAttached&&=(l.authSession.events.off(`login`,this.handleAuthChange),l.authSession.events.off(`logout`,this.handleAuthChange),!1),super.disconnectedCallback()}firstUpdated(){if(this.updateSidebarBounds(),typeof ResizeObserver<`u`){this.sidebarResizeObserver=new ResizeObserver(e=>{this.updateSidebarBounds();let t=e[0]?.contentRect.width??0;this.responsiveLayoutInitialized||t<=0||(this.responsiveLayoutInitialized=!0,t<768&&this.handleSidebarToggle(new Event(`folder-pane-responsive-collapse`)))});let e=this.querySelector(`.folder-pane-main-content`);e&&this.sidebarResizeObserver.observe(e),this.sidebarResizeObserver.observe(this)}}async uploadFiles(e,t){if(this.creationInFlight||!l.authn.currentUser()||!this.canCreate)return;let n=this.getActiveContainer(),r=this.statusArea,o=this.resourceLogic;if(!e.length||!n||!r||!this.store||!o)return;let s=e.filter(e=>i.isSafeCreationName(e.name)),c=e.filter(e=>!i.isSafeCreationName(e.name)).map(e=>`${e.name}: ${i.invalidCreationNameMessage}`);if(!s.length){c.length&&a.setMintStatus(r,`error`,c.join(`; `));return}this.creationInFlight=!0,this.updateUploadAvailability();let u=this.renderGeneration,d=this.browserContext,f=s.length,p=()=>{f--,f===0&&(this.creationInFlight=!1,this.updateUploadAvailability(),r.dataset.status===`progress`&&r.replaceChildren())};a.setMintStatus(r,`progress`,`Uploading ${s.length} file${s.length===1?``:`s`}`);try{let e=await o.uploadFiles(s,n.uri);for(let r of e)if(r.success)try{let e=this.renderGeneration===u&&this.browserContext===d;await this.showCreatedResource({container:n,containedResource:this.store.sym(r.uploadedUri),newInstance:t&&s.length===1&&e?this.store.sym(r.uploadedUri):void 0})}catch(e){let t=e instanceof Error?e.message:String(e);c.push(`Uploaded ${r.file.name}, but could not refresh the folder: ${t}`)}finally{p()}else{let e=r.error.destinationUri?`Upload failed while putting ${r.error.destinationUri}`:`Upload failed for ${r.file.name}`,t=r.error.status===413?`${e}: storage quota was exceeded. ${r.error.message}`:r.error.status?`${e} (HTTP ${r.error.status}). ${r.error.message}`:`${e}. ${r.error.message}`;c.push(t),p()}}catch(e){let t=e instanceof Error?e.message:String(e);for(c.push(`Unable to upload files: ${t}`);f>0;)p()}c.length&&a.setMintStatus(r,`error`,c.join(`; `))}updated(e){(e.has(`subject`)||e.has(`browserContext`))&&this.subject?(this.standaloneBreadcrumbRoot=this.fullView?this.getStandaloneBreadcrumbRoot(this.subject):this.subject,(e.has(`subject`)||e.has(`browserContext`))&&(this.selectedResource=void 0,this.renderGeneration++,this.initialLoadGeneration++),this.refreshCreationPermission(),this.showInitialContainer(this.subject)):(e.has(`selectedResource`)&&this.refreshCreationPermission(),e.has(`fullView`)&&e.get(`fullView`)!==void 0&&(this.subject&&(this.standaloneBreadcrumbRoot=this.fullView?this.getStandaloneBreadcrumbRoot(this.subject):this.subject),this.selectedResource?this.showResourceInContentView(this.selectedResource):this.subject&&this.renderContainerView(this.subject)))}getStandaloneBreadcrumbRoot(e){try{let t=new URL(e.uri),n=t.pathname.split(`/`).filter(Boolean);return n.length<=1?e:this.store?.sym(`${t.origin}/${n[0]}/`)??e}catch{return e}}get resourceTarget(){return this.fullView?this.fullViewTarget:this.contentView}showContentError(e,t=!0){t&&this.resourceTarget?.replaceChildren(),this.contentError=e}renderAccessDeniedScreen(){this.showContentError({title:`Access denied`,message:`You do not have access to the contents of this container.`})}async loadResource(e,n=!1){let r=this.store;if(!r)return;let i=r.fetcher;n&&s.clearFailedResource(i,e);try{await i.load(e)}catch(r){if(!n||!t.isAccessDeniedError(r)||!l.authn.currentUser())throw r;await i.load(e,{force:!0,clearPreviousData:!0})}}openCreatedResource(e,t){this.searchQuery=``;let n=t?.name?this.browserContext?.session.paneRegistry.byName(t.name)??t:t;this.showSubject(e,typeof n?.render==`function`?n:void 0)}getActiveContainer(){let e=this.selectedResource,n=e?t.getIndexedContainer(e):void 0;if(n&&this.store)return this.store.sym(n);if(e&&this.resourceLogic&&t.isContainerResource(e,this.resourceLogic))return e;let r=this.fullView?this.standaloneBreadcrumbRoot:this.subject,i=e?.dir(),a=r?.uri.endsWith(`/`)?r.uri:`${r?.uri}/`;return r&&i&&a&&i.uri.startsWith(a)?i:this.subject}refreshCreationPermission(e=!1){let t=this.getActiveContainer(),n=this.browserContext?.session.logic.resource;if(!e&&t&&n&&this.permissionRequest?.containerUri===t.uri&&this.permissionRequest.resourceLogic===n)return;let r=++this.permissionGeneration;this.setCanCreate(!1),this.permissionRequest=t&&n?{containerUri:t.uri,resourceLogic:n}:void 0,t&&n&&n.fetchMetadata(t).then(e=>{r===this.permissionGeneration&&this.getActiveContainer()?.sameTerm(t)===!0&&this.setCanCreate(e.access.canEdit)}).catch(e=>{r===this.permissionGeneration&&(this.permissionRequest=void 0,o.warn(`Unable to determine folder creation permission`,e))})}updateUploadAvailability(){let e=this.resourceTarget?.querySelector(`folder-pane-container`),t=this.getActiveContainer();e&&(e.canUpload=this.canCreate&&!this.creationInFlight&&!!t&&e.subject?.sameTerm(t)===!0,e.uploadBusy=this.creationInFlight)}setCanCreate(e){this.canCreate=e,this.updateUploadAvailability()}clearContentForCreation(){this.resourceTarget?.replaceChildren()}async showCreatedResource({container:e,containedResource:t,newInstance:n,pane:r}){let i=this.store;if(!i)return;let a=this.renderGeneration,o=this.browserContext,s=async e=>{try{return await i.fetcher.load(e,{force:!0,clearPreviousData:!0}),!0}catch(t){return c.log.warn(`Unable to reload `+e.uri+`: `+t),!1}},l=await s(e);if(t.uri.endsWith(`/`)){await s(t);let e=i.each(t,c.ns.ldp(`contains`),void 0,t.doc());for(let t of e)t.termType===`NamedNode`&&i.fetcher.getState(t.value)===`failed`&&i.fetcher.unload(t)}this.sidebar?.refreshResources?.(e);let u=this.resourceTarget?.querySelector(`folder-pane-container`);!l&&u?.addOptimisticResource&&u.addOptimisticResource(t),l&&u?.refresh?.(),n&&this.isConnected&&this.renderGeneration===a&&this.browserContext===o&&this.openCreatedResource(n,r)}renderContainerView(e){let t=this.resourceTarget;if(!t)return;this.contentError=void 0;let n=document.createElement(`folder-pane-container`);n.subject=e,n.resourceLogic=this.resourceLogic??null,n.browserContext=this.browserContext;let r=this.getActiveContainer();n.canUpload=this.canCreate&&!!r&&e.sameTerm(r),n.uploadBusy=this.creationInFlight,n.view=this.containerView,n.searchQuery=this.searchQuery,this.showingContainer=!0,t.replaceChildren(n)}async showInitialContainer(e){let n=++this.initialLoadGeneration;if(t.isJavaScriptFile(e))this.showSubject(e);else if(this.store&&this.resourceLogic){try{await this.loadResource(e)}catch(r){if(n!==this.initialLoadGeneration||!this.subject?.sameTerm(e))return;if(t.isAccessDeniedError(r)){this.resourceTarget&&this.renderAccessDeniedScreen();return}c.log.error(`Unable to load storage container: `+r),this.showContentError({title:`Unable to load this folder`,message:`The folder could not be loaded. Try again.`});return}n===this.initialLoadGeneration&&this.subject?.sameTerm(e)&&(this.sidebar?.refreshResources?.(),this.requestUpdate(),this.selectedResource||this.showSubject(e))}}async renderExplorerInto(e,t,r,i={}){if(!this.browserContext)return;let a=await(0,c.getRelevantPanes)(t,this.browserContext,{excludedPaneNames:[`sharing`],fallbackPaneName:`internal`});if(i.isCurrent&&!i.isCurrent())return;let o=r||(0,c.getPreferredPane)(t,this.browserContext,a);if(!o){this.renderExplorerError(t,`No pane is available to display this resource.`);return}let s;try{s=o.render(t,this.browserContext,i.paneOptions||{})}catch(e){c.log.error(`Unable to render selected pane: `+e),this.renderExplorerError(t,`The selected pane could not render this resource.`);return}let l=e.ownerDocument.createElement(`solid-ui-file-explorer-provider`),u=await(0,c.preparePaneMenuItems)({subject:t,context:this.browserContext,panes:a,openPane:(e,t)=>{l.dispatchEvent(new CustomEvent(c.FILE_EXPLORER_OPEN_PANE_EVENT,{bubbles:!0,composed:!0,detail:{subjectUri:e.uri,paneName:t}}))}});l.addEventListener(c.FILE_EXPLORER_BACK_EVENT,e=>{if(!(0,c.isExplorerEvent)(e,l))return;e.stopPropagation();let n=this.getActiveContainer()||this.subject||t;this.renderGeneration++,this.selectedResource=n,this.renderContainerView(n)}),l.addEventListener(c.FILE_EXPLORER_OPEN_PANE_EVENT,r=>{if(!(0,c.isExplorerEvent)(r,l))return;r.stopPropagation();let a=r.detail?.paneName,o=a?this.browserContext?.session.paneRegistry.byName(a):void 0;if(o){let r={generation:++this.renderGeneration,subjectUri:t.uri,context:this.browserContext};this.renderExplorerInto(e,t,o,{...i,paneOptions:o.name===`folder`?{folderView:`container`,fullView:!0,solo:!0}:i.paneOptions,isCurrent:()=>n.isCurrentRenderRequest(r,this.renderGeneration,this.selectedResource?.uri,this.browserContext)}).catch(e=>{c.log.error(`Unable to switch selected pane: `+e)})}}),(0,c.composeExplorer)(l,{context:this.browserContext,subjectUri:t.uri,pane:o,relevantPanes:a,header:i.showHeader===!1?void 0:{paneIcon:o.icon,menuItems:u},paneElement:s}),(!i.isCurrent||i.isCurrent())&&(this.contentError=void 0,this.showingContainer=!1,e.replaceChildren(l))}renderExplorerError(e,t){this.showContentError({title:t,message:e.uri})}async showResourceInContentView(e,r,i=!1,a=!1){let o=++this.renderGeneration;try{let s=this.resourceTarget,l=this.browserContext;if(!s||!this.store||!this.resourceLogic||!l)return;let u={generation:o,subjectUri:e.uri,context:this.browserContext},d=e=>n.isCurrentRenderRequest(u,this.renderGeneration,this.selectedResource?.uri,this.browserContext)&&e.uri===u.subjectUri;if(!d(e))return;if(this.subject?.sameTerm(e)&&!r&&!i&&t.isContainerResource(e,this.resourceLogic)){this.renderContainerView(e);return}if(t.isContainerResource(e,this.resourceLogic)&&(r?.name!==`source`||i)){try{await this.loadResource(e,a)}catch(n){if(!d(e))return;if(t.isAccessDeniedError(n)){this.renderAccessDeniedScreen();return}c.log.error(`Unable to load selected container: `+n),this.showContentError({title:`Unable to load this folder`,message:`The folder could not be loaded. Try again.`});return}if(!d(e))return;if(this.sidebar?.refreshResources?.(),r?.name===`folder`){this.renderContainerView(e);return}if(!r&&(i||this.resourceLogic.containerHasIndexDocument(e))){let n=this.store.sym(t.getIndexedApplicationSubject(e));try{await this.loadResource(n.doc(),a)}catch(n){if(!d(e))return;if(t.isAccessDeniedError(n)){this.renderAccessDeniedScreen();return}c.log.error(`Unable to load container index document: `+n)}await this.renderExplorerInto(s,n,r,{isCurrent:()=>d(e),showHeader:!1});return}let n=await(0,c.getRelevantPanes)(e,l,{excludedPaneNames:[`sharing`],fallbackPaneName:`internal`});if(!d(e))return;let o=r||(0,c.getPreferredPane)(e,l,n);if(o?.name!==`folder`){await this.renderExplorerInto(s,e,o,{isCurrent:()=>d(e),showHeader:!1});return}this.renderContainerView(e);return}try{await this.loadResource(e,a)}catch(n){if(!d(e))return;if(t.isAccessDeniedError(n)){this.renderAccessDeniedScreen();return}c.log.warn(`Unable to load selected resource metadata: `+n)}if(!d(e))return;let f=t.isJavaScriptFile(e)?this.browserContext?.session.paneRegistry.byName(`source`):void 0;if(!r&&t.isJavaScriptFile(e)&&!f){this.renderExplorerError(e,`The Source pane is unavailable to display this JavaScript file.`);return}await this.renderExplorerInto(s,e,r||f,{isCurrent:()=>d(e)})}catch(n){if(c.log.error(`Unable to render selected resource: `+n),o===this.renderGeneration&&this.resourceTarget){if(t.isAccessDeniedError(n)){this.renderAccessDeniedScreen();return}this.renderExplorerError(e,`Unable to display the selected resource.`)}}}showSubject(e,n,r=!1){let i=!r&&n?.name!==`sharing`,a=i?t.getIndexedContainer(e):void 0,o=a&&this.store?this.store.sym(a):void 0,s=o??e,c=i&&!o&&!!this.resourceLogic&&t.isContainerResource(e,this.resourceLogic)&&this.resourceLogic.containerHasIndexDocument(e);this.selectedResource=s,this.showResourceInContentView(s,n,!!o||c)}setContainerView(e){this.containerView=e;let t=this.resourceTarget?.querySelector(`folder-pane-container`);t&&(t.view=e)}get sidebarAvailableWidth(){let e=this.renderRoot.querySelector(`.folder-pane-main-content`),t=this.renderRoot.querySelector(`.folder-pane-sidebar-resizer`);return(e?.clientWidth??0)-(t?.getBoundingClientRect().width??0)}resizeSidebar(e){this.sidebarWidth=I(e,this.sidebarAvailableWidth)}finishSidebarResize(){let e=this.sidebarDrag;e&&(this.sidebarDrag=void 0,e.separator.hasPointerCapture(e.pointerId)&&e.separator.releasePointerCapture(e.pointerId),this.isConnected&&this.requestUpdate())}render(){return this.fullView?u.html`
2
+ <folder-pane-provider
3
+ .rootResource=${this.subject}
4
+ .displayedResource=${this.displayedResource}
5
+ .activeContainer=${this.getActiveContainer()}
6
+ .view=${this.containerView}
7
+ .searchQuery=${this.searchQuery}
8
+ .canCreate=${this.canCreate}
9
+ >
10
+ ${this.showingContainer?this.renderStorageHeader():u.nothing}
11
+ ${this.renderContentError()}
12
+ <div
13
+ class="folder-pane-full-view"
14
+ ?hidden=${!!this.contentError}
15
+ @resource-selected=${this.handleResourceSelected}
16
+ ></div>
17
+ <div class="folder-pane-status"></div>
18
+ </folder-pane-provider>
19
+ `:u.html`
20
+ <folder-pane-provider
21
+ .rootResource=${this.subject}
22
+ .displayedResource=${this.displayedResource}
23
+ .activeContainer=${this.getActiveContainer()}
24
+ .view=${this.containerView}
25
+ .searchQuery=${this.searchQuery}
26
+ .canCreate=${this.canCreate}
27
+ .sidebarCollapsed=${this.sidebarCollapsed}
28
+ >
29
+ ${this.renderStorageHeader()}
3
30
  <div
4
- class="folder-pane-full-view"
5
- ?hidden=${!!this.contentError}
31
+ class="folder-pane-main-content"
32
+ data-sidebar-collapsed=${String(this.sidebarCollapsed)}
33
+ style=${`--folder-pane-sidebar-width: ${this.sidebarWidth}px`}
6
34
  @resource-selected=${this.handleResourceSelected}
7
- @resource-open-pane=${this.handleResourceOpenPane}
8
- ></div>
9
- `:s.html`
10
- ${this.hideStorageHeader?s.nothing:this.renderStorageHeader()}
11
- <div
12
- class="folder-pane-main-content"
13
- @resource-selected=${this.handleResourceSelected}
14
- @resource-open-pane=${this.handleResourceOpenPane}
15
- >
16
- <folder-pane-sidebar
17
- .store=${this.store}
18
- .resourceLogic=${this.resourceLogic}
19
- .subject=${this.subject}
20
- .selectedResource=${this.selectedResource??this.subject}
21
- ></folder-pane-sidebar>
22
- <div class="folder-pane-content-column">
23
- <div class="folder-pane-status"></div>
24
- ${this.renderContentError()}
25
- <folder-pane-content ?hidden=${!!this.contentError}></folder-pane-content>
35
+ @folder-pane-resource-error=${this.handleFolderPaneResourceError}
36
+ @folder-pane-toggle-sidebar=${this.handleSidebarToggle}
37
+ >
38
+ <folder-pane-sidebar
39
+ ?inert=${this.sidebarCollapsed}
40
+ aria-hidden=${this.sidebarCollapsed?`true`:`false`}
41
+ .store=${this.store}
42
+ .resourceLogic=${this.resourceLogic}
43
+ .subject=${this.subject}
44
+ .selectedResource=${this.displayedResource}
45
+ ></folder-pane-sidebar>
46
+ <div
47
+ class="folder-pane-sidebar-resizer"
48
+ data-resizing=${String(!!this.sidebarDrag)}
49
+ >
50
+ <div
51
+ class="folder-pane-sidebar-resize-handle"
52
+ role="separator"
53
+ aria-orientation="vertical"
54
+ aria-label="Resize navigation sidebar"
55
+ aria-valuemin=${180}
56
+ aria-valuemax=${this.sidebarMaximumWidth}
57
+ aria-valuenow=${this.sidebarWidth}
58
+ tabindex=${this.sidebarCollapsed?-1:0}
59
+ ?hidden=${this.sidebarCollapsed}
60
+ ?inert=${this.sidebarCollapsed}
61
+ @pointerdown=${this.handleSidebarPointerDown}
62
+ @pointermove=${this.handleSidebarPointerMove}
63
+ @pointerup=${this.handleSidebarPointerEnd}
64
+ @pointercancel=${this.handleSidebarPointerEnd}
65
+ @lostpointercapture=${this.handleSidebarPointerEnd}
66
+ @keydown=${this.handleSidebarResizeKey}
67
+ ></div>
68
+ <button
69
+ type="button"
70
+ class="folder-pane-sidebar-toggle"
71
+ aria-label=${this.sidebarCollapsed?`Expand navigation`:`Collapse navigation`}
72
+ aria-expanded=${String(!this.sidebarCollapsed)}
73
+ @click=${this.handleSidebarToggle}
74
+ >
75
+ <icon-lucide-chevron-left
76
+ class=${`folder-pane-sidebar-toggle-icon${this.sidebarCollapsed?` folder-pane-sidebar-toggle-icon-collapsed`:``}`}
77
+ aria-hidden="true"
78
+ ></icon-lucide-chevron-left>
79
+ </button>
80
+ </div>
81
+ <div class="folder-pane-content-column">
82
+ ${this.renderContentError()}
83
+ <folder-pane-content ?hidden=${!!this.contentError}></folder-pane-content>
84
+ <div class="folder-pane-status"></div>
85
+ </div>
26
86
  </div>
27
- </div>
28
- `}renderStorageHeader(){return s.html`
87
+ </folder-pane-provider>
88
+ `}renderStorageHeader(){return u.html`
29
89
  <folder-pane-storage-header
30
90
  .subject=${this.subject}
31
- .selectedResource=${this.selectedResource??this.subject}
91
+ .breadcrumbRoot=${this.standaloneBreadcrumbRoot}
92
+ .selectedResource=${this.getActiveContainer()}
32
93
  .browserContext=${this.browserContext}
33
94
  .paneList=${this.browserContext?.session.paneRegistry.list??[]}
34
95
  .view=${this.containerView}
35
96
  .searchQuery=${this.searchQuery}
36
- .canCreate=${!!o.authn.currentUser()}
97
+ .canCreate=${this.canCreate}
37
98
  @folder-pane-select-home=${this.handleSelectHome}
38
99
  @folder-pane-select-resource=${this.handleSelectBreadcrumbResource}
39
100
  @folder-pane-change-view=${this.handleContainerViewChange}
40
101
  @folder-pane-search=${this.handleSearch}
41
102
  ></folder-pane-storage-header>
42
- `}renderContentError(){return this.contentError?s.html`
103
+ `}renderContentError(){return this.contentError?u.html`
43
104
  <div class="folder-pane-resource-error" role="status">
44
105
  <solid-ui-error-state
45
106
  .title=${this.contentError.title}
@@ -49,5 +110,5 @@ const e=require("../../helpers.cjs.js");require("../folder-pane-container/index.
49
110
  <button type="button" @click=${this.retryContent}>Retry</button>
50
111
  </solid-ui-error-state>
51
112
  </div>
52
- `:s.nothing}},{e:[m,g,v,b,S,w,E,O,A,M,P,ee,u],c:[se,d]}=ne(l,[[p,1,`browserContext`],[h,1,`subject`],[_,1,`fullView`],[y,1,`hideStorageHeader`],[x,1,`selectedResource`],[C,1,`containerView`],[T,1,`searchQuery`],[D,1,`contentError`],[k,1,`contentView`],[j,1,`fullViewTarget`],[N,1,`sidebar`],[F,1,`statusArea`]],f,0,void 0,a.WebComponent),d(),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return se}});
113
+ `:u.nothing}},{e:[_,y,x,C,T,D,k,j,te,re,ae,se,le,de,pe,he,_e,p],c:[Ee,m]}=xe(f,[[g,1,`browserContext`],[v,1,`subject`],[b,1,`fullView`],[S,1,`selectedResource`],[w,1,`standaloneBreadcrumbRoot`],[E,1,`containerView`],[O,1,`searchQuery`],[A,1,`sidebarCollapsed`],[ee,1,`sidebarWidth`],[ne,1,`sidebarMaximumWidth`],[ie,1,`contentError`],[oe,1,`showingContainer`],[ce,1,`canCreate`],[ue,1,`contentView`],[fe,1,`fullViewTarget`],[me,1,`sidebar`],[ge,1,`statusArea`]],h,0,void 0,c.WebComponent),m(),exports.clampSidebarWidth=I,Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return Ee}});
53
114
  //# sourceMappingURL=FolderPaneView.cjs.js.map