folder-pane 4.0.0-0 → 4.0.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 (176) hide show
  1. package/declarations.d.ts +4 -4
  2. package/dist/_virtual/~icons/lucide/chevron-down.cjs.js +2 -0
  3. package/dist/_virtual/~icons/lucide/chevron-down.cjs.js.map +1 -0
  4. package/dist/_virtual/~icons/lucide/chevron-down.esm.js +10 -0
  5. package/dist/_virtual/~icons/lucide/chevron-down.esm.js.map +1 -0
  6. package/dist/_virtual/~icons/lucide/chevron-right.cjs.js +2 -0
  7. package/dist/_virtual/~icons/lucide/chevron-right.cjs.js.map +1 -0
  8. package/dist/_virtual/~icons/lucide/chevron-right.esm.js +10 -0
  9. package/dist/_virtual/~icons/lucide/chevron-right.esm.js.map +1 -0
  10. package/dist/_virtual/~icons/lucide/circle-small.cjs.js +2 -0
  11. package/dist/_virtual/~icons/lucide/circle-small.cjs.js.map +1 -0
  12. package/dist/_virtual/~icons/lucide/circle-small.esm.js +10 -0
  13. package/dist/_virtual/~icons/lucide/circle-small.esm.js.map +1 -0
  14. package/dist/_virtual/~icons/lucide/file-box.cjs.js +2 -0
  15. package/dist/_virtual/~icons/lucide/file-box.cjs.js.map +1 -0
  16. package/dist/_virtual/~icons/lucide/file-box.esm.js +10 -0
  17. package/dist/_virtual/~icons/lucide/file-box.esm.js.map +1 -0
  18. package/dist/_virtual/~icons/lucide/file.cjs.js +2 -0
  19. package/dist/_virtual/~icons/lucide/file.cjs.js.map +1 -0
  20. package/dist/_virtual/~icons/lucide/file.esm.js +10 -0
  21. package/dist/_virtual/~icons/lucide/file.esm.js.map +1 -0
  22. package/dist/_virtual/~icons/lucide/folder-open.cjs.js +2 -0
  23. package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -0
  24. package/dist/_virtual/~icons/lucide/folder-open.esm.js +10 -0
  25. package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -0
  26. package/dist/_virtual/~icons/lucide/folder.cjs.js +2 -0
  27. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -0
  28. package/dist/_virtual/~icons/lucide/folder.esm.js +10 -0
  29. package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
  30. package/dist/_virtual/~icons/lucide/globe.cjs.js +2 -0
  31. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -0
  32. package/dist/_virtual/~icons/lucide/globe.esm.js +10 -0
  33. package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -0
  34. package/dist/_virtual/~icons/lucide/layout-grid.cjs.js +2 -0
  35. package/dist/_virtual/~icons/lucide/layout-grid.cjs.js.map +1 -0
  36. package/dist/_virtual/~icons/lucide/layout-grid.esm.js +10 -0
  37. package/dist/_virtual/~icons/lucide/layout-grid.esm.js.map +1 -0
  38. package/dist/_virtual/~icons/lucide/list.cjs.js +2 -0
  39. package/dist/_virtual/~icons/lucide/list.cjs.js.map +1 -0
  40. package/dist/_virtual/~icons/lucide/list.esm.js +10 -0
  41. package/dist/_virtual/~icons/lucide/list.esm.js.map +1 -0
  42. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
  43. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
  44. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +10 -0
  45. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
  46. package/dist/_virtual/~icons/lucide/plus.cjs.js +2 -0
  47. package/dist/_virtual/~icons/lucide/plus.cjs.js.map +1 -0
  48. package/dist/_virtual/~icons/lucide/plus.esm.js +10 -0
  49. package/dist/_virtual/~icons/lucide/plus.esm.js.map +1 -0
  50. package/dist/_virtual/~icons/lucide/search.cjs.js +2 -0
  51. package/dist/_virtual/~icons/lucide/search.cjs.js.map +1 -0
  52. package/dist/_virtual/~icons/lucide/search.esm.js +10 -0
  53. package/dist/_virtual/~icons/lucide/search.esm.js.map +1 -0
  54. package/dist/_virtual/~icons/lucide/trash-2.cjs.js +2 -0
  55. package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +1 -0
  56. package/dist/_virtual/~icons/lucide/trash-2.esm.js +10 -0
  57. package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +1 -0
  58. package/dist/_virtual/~icons/lucide/upload.cjs.js +2 -0
  59. package/dist/_virtual/~icons/lucide/upload.cjs.js.map +1 -0
  60. package/dist/_virtual/~icons/lucide/upload.esm.js +10 -0
  61. package/dist/_virtual/~icons/lucide/upload.esm.js.map +1 -0
  62. package/dist/_virtual/~icons/lucide/x.cjs.js +2 -0
  63. package/dist/_virtual/~icons/lucide/x.cjs.js.map +1 -0
  64. package/dist/_virtual/~icons/lucide/x.esm.js +10 -0
  65. package/dist/_virtual/~icons/lucide/x.esm.js.map +1 -0
  66. package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +91 -0
  67. package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -0
  68. package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +44 -0
  69. package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -0
  70. package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +585 -0
  71. package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -0
  72. package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js +2 -0
  73. package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js.map +1 -0
  74. package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js +6 -0
  75. package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js.map +1 -0
  76. package/dist/components/folder-pane-container/index.cjs.js +1 -0
  77. package/dist/components/folder-pane-container/index.d.ts +2 -0
  78. package/dist/components/folder-pane-container/index.d.ts.map +1 -0
  79. package/dist/components/folder-pane-container/index.esm.js +1 -0
  80. package/dist/components/folder-pane-content/FolderPaneContent.cjs.js +4 -0
  81. package/dist/components/folder-pane-content/FolderPaneContent.cjs.js.map +1 -0
  82. package/dist/components/folder-pane-content/FolderPaneContent.d.ts +6 -0
  83. package/dist/components/folder-pane-content/FolderPaneContent.d.ts.map +1 -0
  84. package/dist/components/folder-pane-content/FolderPaneContent.esm.js +176 -0
  85. package/dist/components/folder-pane-content/FolderPaneContent.esm.js.map +1 -0
  86. package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js +2 -0
  87. package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js.map +1 -0
  88. package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js +6 -0
  89. package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js.map +1 -0
  90. package/dist/components/folder-pane-content/index.cjs.js +1 -0
  91. package/dist/components/folder-pane-content/index.d.ts +2 -0
  92. package/dist/components/folder-pane-content/index.d.ts.map +1 -0
  93. package/dist/components/folder-pane-content/index.esm.js +1 -0
  94. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js +53 -0
  95. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js.map +1 -0
  96. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts +33 -0
  97. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts.map +1 -0
  98. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js +429 -0
  99. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js.map +1 -0
  100. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js +2 -0
  101. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js.map +1 -0
  102. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js +6 -0
  103. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js.map +1 -0
  104. package/dist/components/folder-pane-sidebar/index.cjs.js +1 -0
  105. package/dist/components/folder-pane-sidebar/index.d.ts +2 -0
  106. package/dist/components/folder-pane-sidebar/index.d.ts.map +1 -0
  107. package/dist/components/folder-pane-sidebar/index.esm.js +1 -0
  108. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js +32 -0
  109. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js.map +1 -0
  110. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.d.ts +15 -0
  111. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.d.ts.map +1 -0
  112. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js +290 -0
  113. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js.map +1 -0
  114. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js +2 -0
  115. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js.map +1 -0
  116. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js +6 -0
  117. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js.map +1 -0
  118. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js +79 -0
  119. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js.map +1 -0
  120. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts +27 -0
  121. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts.map +1 -0
  122. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js +437 -0
  123. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js.map +1 -0
  124. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js +2 -0
  125. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js.map +1 -0
  126. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js +6 -0
  127. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js.map +1 -0
  128. package/dist/components/folder-pane-storage-header/index.cjs.js +1 -0
  129. package/dist/components/folder-pane-storage-header/index.d.ts +2 -0
  130. package/dist/components/folder-pane-storage-header/index.d.ts.map +1 -0
  131. package/dist/components/folder-pane-storage-header/index.esm.js +1 -0
  132. package/dist/components/folder-pane-view/FolderPaneView.cjs.js +51 -0
  133. package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -0
  134. package/dist/components/folder-pane-view/FolderPaneView.d.ts +82 -0
  135. package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -0
  136. package/dist/components/folder-pane-view/FolderPaneView.esm.js +728 -0
  137. package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -0
  138. package/dist/components/folder-pane-view/index.cjs.js +1 -0
  139. package/dist/components/folder-pane-view/index.d.ts +2 -0
  140. package/dist/components/folder-pane-view/index.d.ts.map +1 -0
  141. package/dist/components/folder-pane-view/index.esm.js +1 -0
  142. package/dist/components/folder-pane-view/renderRequest.cjs.js +2 -0
  143. package/dist/components/folder-pane-view/renderRequest.cjs.js.map +1 -0
  144. package/dist/components/folder-pane-view/renderRequest.d.ts +8 -0
  145. package/dist/components/folder-pane-view/renderRequest.d.ts.map +1 -0
  146. package/dist/components/folder-pane-view/renderRequest.esm.js +10 -0
  147. package/dist/components/folder-pane-view/renderRequest.esm.js.map +1 -0
  148. package/dist/creationSafety.cjs.js +2 -0
  149. package/dist/creationSafety.cjs.js.map +1 -0
  150. package/dist/creationSafety.d.ts +9 -0
  151. package/dist/creationSafety.d.ts.map +1 -0
  152. package/dist/creationSafety.esm.js +17 -0
  153. package/dist/creationSafety.esm.js.map +1 -0
  154. package/dist/folderPane.cjs.js +2 -2
  155. package/dist/folderPane.cjs.js.map +1 -1
  156. package/dist/folderPane.d.ts +2 -1
  157. package/dist/folderPane.d.ts.map +1 -1
  158. package/dist/folderPane.esm.js +23 -60
  159. package/dist/folderPane.esm.js.map +1 -1
  160. package/dist/helpers.cjs.js +2 -0
  161. package/dist/helpers.cjs.js.map +1 -0
  162. package/dist/helpers.d.ts +30 -0
  163. package/dist/helpers.d.ts.map +1 -0
  164. package/dist/helpers.esm.js +59 -0
  165. package/dist/helpers.esm.js.map +1 -0
  166. package/dist/index.esm.js +1 -2
  167. package/dist/mintPaneInstance.cjs.js +2 -0
  168. package/dist/mintPaneInstance.cjs.js.map +1 -0
  169. package/dist/mintPaneInstance.d.ts +43 -0
  170. package/dist/mintPaneInstance.d.ts.map +1 -0
  171. package/dist/mintPaneInstance.esm.js +104 -0
  172. package/dist/mintPaneInstance.esm.js.map +1 -0
  173. package/dist/types.d.ts +9 -0
  174. package/dist/types.d.ts.map +1 -0
  175. package/package.json +9 -6
  176. package/dist/_virtual/_rolldown/runtime.cjs.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FolderPaneView.esm.js","names":["aclControl","composeExplorer","customElement","FILE_EXPLORER_BACK_EVENT","FILE_EXPLORER_OPEN_PANE_EVENT","getRelevantPanes","isExplorerEvent","log","ns","showDialog","WebComponent","widgets","authn","authSession","html","nothing","property","query","state","getIndexedApplicationSubject","getIndexedContainer","isAccessDeniedError","isContainerResource","isJavaScriptFile","invalidateRenderRequest","isCurrentRenderRequest","FolderPaneCreateDialog","getPaneLabel","isSafeCreationName","invalidCreationNameMessage","mintPaneInstance","PaneMintError","setMintStatus","_classDecs","_FolderPaneView","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_ref","_browserContextDecs","attribute","_subjectDecs","_fullViewDecs","type","Boolean","_selectedResourceDecs","_containerViewDecs","_searchQueryDecs","_contentErrorDecs","_contentViewDecs","_fullViewTargetDecs","_sidebarDecs","_statusAreaDecs","FolderPaneView","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_browserContext","undefined","_init_subject","_init_fullView","_init_selectedResource","_init_containerView","_init_searchQuery","_init_contentError","_defineProperty","_init_contentView","_init_fullViewTarget","_init_sidebar","_init_statusArea","requestUpdate","event","stopPropagation","creationInFlight","currentUser","pane","detail","mintNew","container","getActiveContainer","dom","ownerDocument","statusArea","operationGeneration","renderGeneration","paneName","name","Promise","resolve","props","label","onClose","sameTerm","clearContentForCreation","created","context","browserContext","noun","me","stillOwnsNavigation","showCreatedResource","newInstance","error","console","Error","message","String","store","input","createElement","multiple","addEventListener","files","Array","from","validFiles","filter","file","invalidFiles","forEach","length","remaining","refreshes","finish","dataset","status","replaceChildren","uploadFiles","fetcher","uri","_file","then","containedResource","sym","finally","click","contentError","selectedResource","subject","clearContentError","showResourceInContentView","showInitialContainer","resource","searchQuery","showSubject","session","paneRegistry","byName","render","resourceTarget","querySelector","view","setContainerView","_classPrivateFieldGet","v","_classPrivateFieldSet","resourceLogic","logic","fullView","containerView","contentView","fullViewTarget","sidebar","createRenderRoot","connectedCallback","dropProtectionAttached","preventBrowserDropEvents","handleCreatePane","handleUpload","authListenersAttached","events","on","handleAuthChange","disconnectedCallback","initialLoadGeneration","removeEventListener","off","updated","changedProperties","has","get","renderContainerView","showContentError","renderAccessDeniedScreen","title","openCreatedResource","currentPane","selected","root","parent","dir","rootUri","endsWith","startsWith","navigationGeneration","navigationContext","reload","load","force","clearPreviousData","warn","confirmed","members","each","ldp","doc","member","termType","getState","value","unload","refreshResources","addOptimisticResource","refresh","isConnected","target","document","hideRootSpecialFolders","generation","getPaneForSubject","relevantPanes","mintClass","any","ui","mintClassPane","find","candidate","shouldGetFocus","renderExplorerInto","options","excludedPaneNames","fallbackPaneName","isCurrent","selectedPane","renderExplorerError","paneElement","paneOptions","provider","menuItems","map","action","_event","dispatchEvent","CustomEvent","bubbles","composed","subjectUri","item","nextPane","request","catch","header","showHeader","paneIcon","icon","indexRequested","isCurrentSelection","containerHasIndexDocument","applicationSubject","sourcePane","indexedContainerUri","indexedContainer","renderContentError","handleResourceSelected","handleResourceOpenPane","list","handleSelectHome","handleSelectBreadcrumbResource","handleContainerViewChange","handleSearch","retryContent","_FolderPaneView2","e","c","_initClass","_applyDecs","default","FolderPaneCreateDialog","_FolderPaneCreateDial","_FolderPaneView2","_initProto","_initClass","_classDecs","_browserContextDecs","_init_browserContext","_subjectDecs","_init_subject","_fullViewDecs","_init_fullView","_selectedResourceDecs","_init_selectedResource","_containerViewDecs","_init_containerView","_searchQueryDecs","_init_searchQuery","_contentErrorDecs","_init_contentError","_contentViewDecs","_init_contentView","_fullViewTargetDecs","_init_fullViewTarget","_sidebarDecs","_init_sidebar","_statusAreaDecs","_init_statusArea","_ref","_defineProperty","_toPropertyKey","r","t","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","_classPrivateFieldGet","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","p","_setFunctionName","P","j","D","I","F","l","f","N","_checkInRHS","_toPrimitive","e","customElement","_FolderPaneView","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","property","state","query","WebComponent","args","event","authn","pane","container","dom","statusArea","operationGeneration","paneName","getPaneLabel","name","resolve","isSafeCreationName","invalidCreationNameMessage","created","mintPaneInstance","stillOwnsNavigation","error","PaneMintError","setMintStatus","input","files","validFiles","file","remaining","refreshes","finish","uri","message","selectedResource","subject","resource","view","aclControl","authSession","invalidateRenderRequest","changedProperties","currentPane","selected","isContainerResource","root","parent","rootUri","store","navigationGeneration","navigationContext","reload","log","confirmed","containedResource","members","ns","member","containerView","newInstance","target","generation","isJavaScriptFile","isAccessDeniedError","mintClass","mintClassPane","relevantPanes","candidate","getRelevantPanes","options","selectedPane","paneElement","provider","menuItems","label","FILE_EXPLORER_OPEN_PANE_EVENT","item","FILE_EXPLORER_BACK_EVENT","isExplorerEvent","nextPane","request","isCurrentRenderRequest","composeExplorer","renderGeneration","isCurrentSelection","indexRequested","applicationSubject","getIndexedApplicationSubject","sourcePane","indexedContainerUri","getIndexedContainer","indexedContainer","nothing"],"sources":["../../../src/components/folder-pane-view/FolderPaneView.ts"],"sourcesContent":["import { aclControl, composeExplorer, customElement, FILE_EXPLORER_BACK_EVENT, FILE_EXPLORER_OPEN_PANE_EVENT, getRelevantPanes, isExplorerEvent, log, ns, showDialog, WebComponent, widgets } from 'solid-ui'\nimport { authn, authSession } from 'solid-logic'\nimport { html, nothing } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport '../folder-pane-container'\nimport '../folder-pane-sidebar'\nimport '../folder-pane-content'\nimport '../folder-pane-storage-header'\nimport type { NamedNode } from 'rdflib'\nimport 'solid-ui/components/file-explorer-provider'\nimport type FileExplorerProvider from 'solid-ui/components/file-explorer-provider'\nimport 'solid-ui/components/error-state'\nimport 'solid-ui/components/file-explorer-header'\nimport type FolderPaneContainer from '../folder-pane-container/FolderPaneContainer'\nimport { getIndexedApplicationSubject, getIndexedContainer, isAccessDeniedError, isContainerResource, isJavaScriptFile, type FolderPaneResourceLogic } from '../../helpers'\nimport { invalidateRenderRequest, isCurrentRenderRequest, type RenderRequest } from './renderRequest'\nimport FolderPaneCreateDialog from '../folder-pane-storage-header/FolderPaneCreateDialog'\nimport { getPaneLabel } from '../../helpers'\nimport { isSafeCreationName, invalidCreationNameMessage } from '../../creationSafety'\nimport { mintPaneInstance, PaneMintError, setMintStatus } from '../../mintPaneInstance'\n\ntype CreatedResource = {\n container: NamedNode\n containedResource: NamedNode\n /** Omit to refresh listings without changing the content view (uploads). */\n newInstance?: NamedNode\n pane?: PaneDefinition\n}\n\ntype ExplorerRenderOptions = {\n paneOptions?: unknown\n isCurrent?: () => boolean\n showHeader?: boolean\n}\n\n@customElement('folder-pane-view')\nexport default class FolderPaneView extends WebComponent {\n @property({ attribute: false })\n accessor browserContext: DataBrowserContext | undefined = undefined\n\n private get store () {\n return this.browserContext?.session.store\n }\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n private get resourceLogic (): FolderPaneResourceLogic | undefined {\n return this.browserContext?.session.logic.resource as FolderPaneResourceLogic | undefined\n }\n\n @property({ type: Boolean, attribute: 'full-view' })\n accessor fullView = false\n\n @state()\n accessor selectedResource: NamedNode | undefined = undefined\n\n @state()\n accessor containerView: 'grid' | 'list' = 'grid'\n\n @state()\n accessor searchQuery = ''\n\n @state()\n private accessor contentError: { title: string, message: string } | undefined = undefined\n\n private initialLoadGeneration = 0\n private renderGeneration = 0\n private creationInFlight = false\n private authListenersAttached = false\n private dropProtectionAttached = false\n\n @query('folder-pane-content')\n private accessor contentView: HTMLElement | null = null\n\n @query('.folder-pane-full-view')\n private accessor fullViewTarget: HTMLElement | null = null\n\n @query('folder-pane-sidebar')\n private accessor sidebar: (HTMLElement & { refreshResources?: (container?: NamedNode) => void }) | null = null\n\n /** Top-of-content area for pane creation progress, errors and setup UI. */\n @query('.folder-pane-status')\n accessor statusArea: HTMLElement | null = null\n\n protected createRenderRoot () {\n return this\n }\n\n connectedCallback () {\n super.connectedCallback()\n if (!this.dropProtectionAttached) {\n aclControl.preventBrowserDropEvents(this.ownerDocument)\n this.dropProtectionAttached = true\n }\n this.addEventListener('folder-pane-create-pane', this.handleCreatePane)\n this.addEventListener('folder-pane-upload', this.handleUpload)\n if (!this.authListenersAttached) {\n authSession.events.on('login', this.handleAuthChange)\n authSession.events.on('logout', this.handleAuthChange)\n this.authListenersAttached = true\n }\n }\n\n disconnectedCallback () {\n // Invalidate awaited renders before detaching listeners. A late response\n // must never replace content in a detached view.\n this.renderGeneration = invalidateRenderRequest(this.renderGeneration)\n this.initialLoadGeneration++\n this.removeEventListener('folder-pane-create-pane', this.handleCreatePane)\n this.removeEventListener('folder-pane-upload', this.handleUpload)\n if (this.authListenersAttached) {\n authSession.events.off('login', this.handleAuthChange)\n authSession.events.off('logout', this.handleAuthChange)\n this.authListenersAttached = false\n }\n super.disconnectedCallback()\n }\n\n private handleAuthChange = () => {\n this.requestUpdate()\n }\n\n private handleCreatePane = async (event: Event) => {\n event.stopPropagation()\n if (this.creationInFlight || !authn.currentUser()) return\n const pane = (event as CustomEvent<{ pane?: PaneDefinition }>).detail?.pane\n if (!pane?.mintNew) return\n const container = this.getActiveContainer()\n const dom = this.ownerDocument\n const statusArea = this.statusArea\n if (!container || !statusArea) return\n this.creationInFlight = true\n const operationGeneration = ++this.renderGeneration\n const paneName = getPaneLabel(pane)\n try {\n const name = await new Promise<string | undefined>(resolve => {\n showDialog(FolderPaneCreateDialog, {\n props: { label: paneName },\n onClose: resolve\n })\n })\n if (!name || !authn.currentUser()) return\n if (operationGeneration !== this.renderGeneration ||\n this.getActiveContainer()?.sameTerm(container) !== true) return\n if (!isSafeCreationName(name)) {\n setMintStatus(statusArea, 'error', invalidCreationNameMessage)\n return\n }\n this.clearContentForCreation()\n const created = await mintPaneInstance({\n context: this.browserContext!,\n container,\n pane,\n name,\n noun: paneName,\n statusArea,\n me: authn.currentUser() ?? undefined,\n dom\n })\n const stillOwnsNavigation = operationGeneration === this.renderGeneration &&\n this.getActiveContainer()?.sameTerm(container) === true\n await this.showCreatedResource({\n container,\n ...created,\n pane,\n newInstance: stillOwnsNavigation ? created.newInstance : undefined\n })\n } catch (error) {\n console.error('Unable to create folder-pane resource', error)\n if (!(error instanceof PaneMintError) && this.statusArea) {\n setMintStatus(this.statusArea, 'error', `Unable to create ${paneName}: ${error instanceof Error ? error.message : String(error)}`)\n }\n } finally {\n this.creationInFlight = false\n }\n }\n\n private handleUpload = (event: Event) => {\n event.stopPropagation()\n if (this.creationInFlight || !authn.currentUser()) return\n const container = this.getActiveContainer()\n const statusArea = this.statusArea\n if (!container || !statusArea || !this.store) return\n const input = this.ownerDocument.createElement('input')\n input.type = 'file'\n input.multiple = true\n input.addEventListener('change', () => {\n const files = Array.from(input.files ?? [])\n const validFiles = files.filter(file => isSafeCreationName(file.name))\n const invalidFiles = files.filter(file => !isSafeCreationName(file.name))\n invalidFiles.forEach(file => setMintStatus(statusArea, 'error', `${file.name}: ${invalidCreationNameMessage}`))\n if (!validFiles.length) return\n this.creationInFlight = true\n let remaining = validFiles.length\n let refreshes = Promise.resolve()\n setMintStatus(statusArea, 'progress', `Uploading ${validFiles.length} file${validFiles.length === 1 ? '' : 's'}`)\n const finish = () => {\n remaining--\n if (remaining === 0) {\n this.creationInFlight = false\n if (statusArea.dataset.status === 'progress') statusArea.replaceChildren()\n }\n }\n widgets.uploadFiles(\n this.store!.fetcher,\n validFiles,\n container.uri,\n container.uri,\n (_file: File, uri: string) => {\n refreshes = refreshes.then(() => this.showCreatedResource({\n container,\n containedResource: this.store!.sym(uri)\n })).finally(finish)\n },\n (_file: File, message: string) => {\n setMintStatus(statusArea, 'error', message)\n finish()\n }\n )\n })\n input.click()\n }\n\n protected updated (changedProperties: PropertyValues<this>) {\n if (\n (changedProperties.has('subject') || changedProperties.has('browserContext')) &&\n this.subject\n ) {\n if (changedProperties.has('subject') || changedProperties.has('browserContext')) {\n this.selectedResource = undefined\n this.renderGeneration++\n this.initialLoadGeneration++\n }\n void this.showInitialContainer(this.subject)\n return\n }\n\n if (changedProperties.has('fullView') && changedProperties.get('fullView') !== undefined) {\n if (this.selectedResource) {\n void this.showResourceInContentView(this.selectedResource)\n } else if (this.subject) {\n this.renderContainerView(this.subject)\n }\n }\n }\n\n // Lit never renders inside these targets; panes, explorers and containers\n // are inserted imperatively, and Lit-rendered errors sit beside them.\n private get resourceTarget () {\n return this.fullView ? this.fullViewTarget : this.contentView\n }\n\n private showContentError (error: { title: string, message: string }) {\n this.resourceTarget?.replaceChildren()\n this.contentError = error\n }\n\n private renderAccessDeniedScreen () {\n this.showContentError({\n title: 'Access denied',\n message: 'You do not have access to the contents of this container.'\n })\n }\n\n private clearContentError = () => {\n this.contentError = undefined\n }\n\n private retryContent = () => {\n const selectedResource = this.selectedResource\n const subject = this.subject\n if (!selectedResource && !subject) return\n this.clearContentError()\n if (selectedResource) {\n void this.showResourceInContentView(selectedResource)\n } else if (subject) {\n void this.showInitialContainer(subject)\n }\n }\n\n /**\n * Select the resource returned by a pane's mintNew implementation. Some\n * panes (notably long chat) mint a resource inside the new document rather\n * than the container URI itself, so routing this through the normal\n * selection path is important.\n */\n openCreatedResource (resource: NamedNode, pane?: PaneDefinition) {\n this.searchQuery = ''\n // Some minting panes (e.g. Dokieli) delegate viewing to another pane and\n // have no render(); let the relevant-pane lookup choose in that case.\n // Resolve the pane again from the registry. Creation menu entries can be\n // replaced while the async mint is running; retaining that stale object\n // lets a different relevant pane (notably profile for pad indexes) win.\n const currentPane = pane?.name\n ? this.browserContext?.session.paneRegistry.byName(pane.name) ?? pane\n : pane\n this.showSubject(resource, typeof currentPane?.render === 'function' ? currentPane : undefined)\n }\n\n /**\n * The storage header belongs to the explorer, while its actions apply to\n * the container currently being viewed. A document selection has no\n * writable container of its own, so use its parent when it remains within\n * the explorer root; otherwise retain the last browsed container.\n */\n getActiveContainer (): NamedNode | undefined {\n const selected = this.selectedResource\n if (selected && this.resourceLogic && isContainerResource(selected, this.resourceLogic)) {\n return selected\n }\n\n const root = this.subject\n const parent = selected?.dir()\n const rootUri = root?.uri.endsWith('/') ? root.uri : `${root?.uri}/`\n if (root && parent && rootUri && parent.uri.startsWith(rootUri)) {\n return parent\n }\n\n return this.subject\n }\n\n clearContentForCreation () {\n this.resourceTarget?.replaceChildren()\n }\n\n /**\n * Reload the server-backed container listing after a pane minted a new\n * resource, refresh the sidebar and container view, then open the result.\n */\n async showCreatedResource ({ container, containedResource, newInstance, pane }: CreatedResource) {\n const store = this.store\n if (!store) return\n const navigationGeneration = this.renderGeneration\n const navigationContext = this.browserContext\n const reload = async (resource: NamedNode): Promise<boolean> => {\n try {\n await store.fetcher.load(resource, { force: true, clearPreviousData: true })\n return true\n } catch (error) {\n log.warn('Unable to reload ' + resource.uri + ': ' + error)\n return false\n }\n }\n const confirmed = await reload(container)\n if (containedResource.uri.endsWith('/')) {\n await reload(containedResource)\n // Panes may probe their new documents before writing them; forget those\n // cached 404s so rendering loads what the pane actually created.\n const members = store.each(containedResource, ns.ldp('contains'), undefined, containedResource.doc())\n for (const member of members) {\n if (member.termType === 'NamedNode' && store.fetcher.getState(member.value) === 'failed') {\n store.fetcher.unload(member as NamedNode)\n }\n }\n }\n\n this.sidebar?.refreshResources?.(container)\n const containerView = this.resourceTarget?.querySelector('folder-pane-container') as\n (HTMLElement & { refresh?: () => void, addOptimisticResource?: (resource: NamedNode) => void }) | null\n if (!confirmed && containerView?.addOptimisticResource) {\n containerView.addOptimisticResource(containedResource)\n }\n if (confirmed) {\n containerView?.refresh?.()\n }\n if (\n newInstance &&\n this.isConnected &&\n this.renderGeneration === navigationGeneration &&\n this.browserContext === navigationContext\n ) {\n this.openCreatedResource(newInstance, pane)\n }\n }\n\n private renderContainerView (selectedResource: NamedNode) {\n const target = this.resourceTarget\n if (!target) return\n\n this.contentError = undefined\n const containerView = document.createElement('folder-pane-container') as FolderPaneContainer\n\n containerView.subject = selectedResource\n containerView.resourceLogic = this.resourceLogic ?? null\n containerView.browserContext = this.browserContext\n containerView.view = this.containerView\n containerView.searchQuery = this.searchQuery\n containerView.hideRootSpecialFolders = this.subject\n ? selectedResource.sameTerm(this.subject)\n : false\n\n target.replaceChildren(containerView)\n }\n\n private async showInitialContainer (subject: NamedNode) {\n const generation = ++this.initialLoadGeneration\n\n if (isJavaScriptFile(subject)) {\n this.showSubject(subject)\n return\n }\n\n if (!this.store || !this.resourceLogic) return\n\n try {\n await this.store.fetcher.load(subject)\n } catch (error) {\n if (generation !== this.initialLoadGeneration || !this.subject?.sameTerm(subject)) return\n if (isAccessDeniedError(error)) {\n const target = this.resourceTarget\n if (target) this.renderAccessDeniedScreen()\n return\n }\n log.error('Unable to load storage container: ' + error)\n this.showContentError({\n title: 'Unable to load this folder',\n message: 'The folder could not be loaded. Try again.'\n })\n return\n }\n\n if (generation !== this.initialLoadGeneration || !this.subject?.sameTerm(subject)) return\n this.sidebar?.refreshResources?.()\n if (!this.selectedResource) {\n this.showSubject(subject)\n }\n }\n\n private getPaneForSubject (subject: NamedNode, relevantPanes: PaneDefinition[]) {\n const mintClass = this.store && (\n this.store.any(subject, ns.ui('mintClass'), undefined, subject.doc()) ||\n this.store.any(subject.doc(), ns.ui('mintClass'), undefined, subject.doc())\n )\n if (mintClass) {\n const mintClassPane = relevantPanes.find(pane => pane.mintClass?.sameTerm(mintClass))\n if (mintClassPane) return mintClassPane\n }\n\n return relevantPanes.find(candidate => candidate.shouldGetFocus?.(subject)) || relevantPanes[0]\n }\n\n private async renderExplorerInto (\n target: HTMLElement,\n subject: NamedNode,\n pane: PaneDefinition | undefined,\n options: ExplorerRenderOptions = {}\n ) {\n if (!this.browserContext) return\n\n const relevantPanes = await getRelevantPanes(subject, this.browserContext, {\n excludedPaneNames: ['sharing'],\n fallbackPaneName: 'internal'\n })\n if (options.isCurrent && !options.isCurrent()) return\n const selectedPane = pane || this.getPaneForSubject(subject, relevantPanes)\n if (!selectedPane) {\n this.renderExplorerError(subject, 'No pane is available to display this resource.')\n return\n }\n\n let paneElement: HTMLElement\n try {\n paneElement = selectedPane.render(subject, this.browserContext, options.paneOptions || {})\n } catch (error) {\n log.error('Unable to render selected pane: ' + error)\n this.renderExplorerError(subject, 'The selected pane could not render this resource.')\n return\n }\n\n const provider = target.ownerDocument.createElement('solid-ui-file-explorer-provider') as FileExplorerProvider\n const menuItems = relevantPanes\n .map(candidate => {\n const label = candidate.label(subject, this.browserContext as DataBrowserContext)\n if (!label) return undefined\n return {\n label,\n action: (_event: Event) => {\n provider.dispatchEvent(new CustomEvent(FILE_EXPLORER_OPEN_PANE_EVENT, {\n bubbles: true,\n composed: true,\n detail: { subjectUri: subject.uri, paneName: candidate.name }\n }))\n }\n }\n })\n .filter((item): item is { label: string, action: (event: Event) => void } => item !== undefined)\n\n provider.addEventListener(FILE_EXPLORER_BACK_EVENT, event => {\n if (!isExplorerEvent(event, provider)) return\n event.stopPropagation()\n this.renderGeneration++\n this.selectedResource = undefined\n this.renderContainerView(this.subject || subject)\n })\n provider.addEventListener(FILE_EXPLORER_OPEN_PANE_EVENT, event => {\n if (!isExplorerEvent(event, provider)) return\n event.stopPropagation()\n const paneName = (event as CustomEvent<{ paneName: string }>).detail?.paneName\n const nextPane = paneName ? this.browserContext?.session.paneRegistry.byName(paneName) : undefined\n if (nextPane) {\n const request: RenderRequest = {\n generation: ++this.renderGeneration,\n subjectUri: subject.uri,\n context: this.browserContext\n }\n this.renderExplorerInto(target, subject, nextPane, {\n ...options,\n isCurrent: () => isCurrentRenderRequest(\n request,\n this.renderGeneration,\n this.selectedResource?.uri,\n this.browserContext\n )\n }).catch(error => {\n log.error('Unable to switch selected pane: ' + error)\n })\n }\n })\n\n composeExplorer(provider, {\n context: this.browserContext,\n subjectUri: subject.uri,\n pane: selectedPane,\n relevantPanes,\n header: options.showHeader === false\n ? undefined\n : { paneIcon: selectedPane.icon, menuItems },\n paneElement\n })\n if (options.isCurrent && !options.isCurrent()) return\n this.contentError = undefined\n target.replaceChildren(provider)\n }\n\n private renderExplorerError (subject: NamedNode, message: string) {\n this.showContentError({ title: message, message: subject.uri })\n }\n\n private async showResourceInContentView (\n selectedResource: NamedNode,\n pane?: PaneDefinition,\n indexRequested = false\n ) {\n const renderGeneration = ++this.renderGeneration\n\n try {\n const target = this.resourceTarget\n if (!target || !this.store || !this.resourceLogic) return\n\n const request: RenderRequest = {\n generation: renderGeneration,\n subjectUri: selectedResource.uri,\n context: this.browserContext\n }\n const isCurrentSelection = (candidate: NamedNode) =>\n isCurrentRenderRequest(\n request,\n this.renderGeneration,\n this.selectedResource?.uri,\n this.browserContext\n ) && candidate.uri === request.subjectUri\n\n if (!isCurrentSelection(selectedResource)) return\n\n if (this.subject?.sameTerm(selectedResource) && !indexRequested && !isJavaScriptFile(selectedResource)) {\n this.renderContainerView(selectedResource)\n return\n }\n\n if (isContainerResource(selectedResource, this.resourceLogic)) {\n try {\n await this.store.fetcher.load(selectedResource)\n } catch (error) {\n if (!isCurrentSelection(selectedResource)) return\n if (isAccessDeniedError(error)) {\n this.renderAccessDeniedScreen()\n return\n }\n log.error('Unable to load selected container: ' + error)\n this.showContentError({\n title: 'Unable to load this folder',\n message: 'The folder could not be loaded. Try again.'\n })\n return\n }\n\n if (!isCurrentSelection(selectedResource)) return\n this.sidebar?.refreshResources?.()\n\n if (indexRequested || this.resourceLogic.containerHasIndexDocument(selectedResource)) {\n const applicationSubject = this.store.sym(\n getIndexedApplicationSubject(selectedResource, pane?.name)\n )\n try {\n await this.store.fetcher.load(applicationSubject.doc())\n } catch (error) {\n if (!isCurrentSelection(selectedResource)) return\n if (isAccessDeniedError(error)) {\n this.renderAccessDeniedScreen()\n return\n }\n log.error('Unable to load container index document: ' + error)\n }\n await this.renderExplorerInto(target, applicationSubject, pane, {\n isCurrent: () => isCurrentSelection(selectedResource),\n showHeader: false\n })\n return\n }\n\n this.renderContainerView(selectedResource)\n return\n }\n\n try {\n await this.store.fetcher.load(selectedResource)\n } catch (error) {\n if (!isCurrentSelection(selectedResource)) return\n if (isAccessDeniedError(error)) {\n this.renderAccessDeniedScreen()\n return\n }\n log.warn('Unable to load selected resource metadata: ' + error)\n }\n\n if (!isCurrentSelection(selectedResource)) return\n const sourcePane = isJavaScriptFile(selectedResource)\n ? this.browserContext?.session.paneRegistry.byName('source')\n : undefined\n if (!pane && isJavaScriptFile(selectedResource) && !sourcePane) {\n this.renderExplorerError(selectedResource, 'The Source pane is unavailable to display this JavaScript file.')\n return\n }\n await this.renderExplorerInto(target, selectedResource, pane || sourcePane, {\n isCurrent: () => isCurrentSelection(selectedResource)\n })\n } catch (error) {\n log.error('Unable to render selected resource: ' + error)\n if (renderGeneration === this.renderGeneration && this.resourceTarget) {\n if (isAccessDeniedError(error)) {\n this.renderAccessDeniedScreen()\n return\n }\n this.renderExplorerError(selectedResource, 'Unable to display the selected resource.')\n }\n }\n }\n\n private showSubject (resource: NamedNode, pane?: PaneDefinition) {\n // `container/index.ttl#this` is rendered exactly like selecting its container,\n // so indexed panes never show the file-explorer header on either route.\n const indexedContainerUri = getIndexedContainer(resource)\n const indexedContainer = indexedContainerUri && this.store\n ? this.store.sym(indexedContainerUri)\n : undefined\n const subject = indexedContainer ?? resource\n const indexRequested = !indexedContainer &&\n !!this.resourceLogic &&\n isContainerResource(resource, this.resourceLogic) &&\n this.resourceLogic.containerHasIndexDocument(resource)\n this.selectedResource = subject\n // Render directly so re-selecting the same resource still replaces the content target.\n void this.showResourceInContentView(subject, pane, !!indexedContainer || indexRequested)\n }\n\n private handleResourceSelected = (event: CustomEvent<{ resource: NamedNode }>) => {\n const resource = event.detail?.resource\n if (!resource) return\n event.stopPropagation()\n this.searchQuery = ''\n this.showSubject(resource)\n }\n\n private handleResourceOpenPane = (event: CustomEvent<{ resource: NamedNode, paneName: string }>) => {\n const resource = event.detail?.resource\n const paneName = event.detail?.paneName\n const pane = paneName ? this.browserContext?.session.paneRegistry.byName(paneName) : undefined\n if (!resource || !pane) return\n event.stopPropagation()\n this.searchQuery = ''\n // Some minting panes (e.g. Dokieli) delegate viewing to another pane and\n // have no render(); let the relevant-pane lookup choose in that case.\n this.showSubject(resource, typeof pane?.render === 'function' ? pane : undefined)\n }\n\n private setContainerView (view: 'grid' | 'list') {\n this.containerView = view\n const container = this.resourceTarget?.querySelector('folder-pane-container') as FolderPaneContainer | null\n if (container) container.view = view\n }\n\n private handleSelectHome = () => {\n this.searchQuery = ''\n if (this.subject) this.showSubject(this.subject)\n }\n\n private handleSearch = (event: CustomEvent<{ query: string }>) => {\n event.stopPropagation()\n this.searchQuery = event.detail?.query || ''\n const container = this.resourceTarget?.querySelector('folder-pane-container') as FolderPaneContainer | null\n if (container) container.searchQuery = this.searchQuery\n }\n\n private handleSelectBreadcrumbResource = (event: CustomEvent<{ resource: NamedNode }>) => {\n const resource = event.detail?.resource\n if (!resource) return\n event.stopPropagation()\n this.showSubject(resource)\n }\n\n private handleContainerViewChange = (event: CustomEvent<{ view: 'grid' | 'list' }>) => {\n const view = event.detail?.view\n if (!view) return\n event.stopPropagation()\n this.setContainerView(view)\n }\n\n render () {\n if (this.fullView) {\n return html`\n ${this.renderContentError()}\n <div\n class=\"folder-pane-full-view\"\n ?hidden=${!!this.contentError}\n @resource-selected=${this.handleResourceSelected}\n @resource-open-pane=${this.handleResourceOpenPane}\n ></div>\n `\n }\n\n return html`\n <folder-pane-storage-header\n .subject=${this.subject}\n .selectedResource=${this.selectedResource ?? this.subject}\n .browserContext=${this.browserContext}\n .paneList=${this.browserContext?.session.paneRegistry.list ?? []}\n .view=${this.containerView}\n .searchQuery=${this.searchQuery}\n .canCreate=${Boolean(authn.currentUser())}\n @folder-pane-select-home=${this.handleSelectHome}\n @folder-pane-select-resource=${this.handleSelectBreadcrumbResource}\n @folder-pane-change-view=${this.handleContainerViewChange}\n @folder-pane-search=${this.handleSearch}\n ></folder-pane-storage-header>\n <div\n class=\"folder-pane-main-content\"\n @resource-selected=${this.handleResourceSelected}\n @resource-open-pane=${this.handleResourceOpenPane}\n >\n <folder-pane-sidebar\n .store=${this.store}\n .resourceLogic=${this.resourceLogic}\n .subject=${this.subject}\n .selectedResource=${this.selectedResource ?? this.subject}\n ></folder-pane-sidebar>\n <div class=\"folder-pane-content-column\">\n <div class=\"folder-pane-status\"></div>\n ${this.renderContentError()}\n <folder-pane-content ?hidden=${!!this.contentError}></folder-pane-content>\n </div>\n </div>\n `\n }\n\n private renderContentError () {\n if (this.contentError) {\n return html`\n <div class=\"folder-pane-resource-error\" role=\"status\">\n <solid-ui-error-state\n .title=${this.contentError.title}\n .message=${this.contentError.message}\n @close=${this.clearContentError}\n >\n <button type=\"button\" @click=${this.retryContent}>Retry</button>\n </solid-ui-error-state>\n </div>\n `\n }\n\n return nothing\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBuFiC,KAAA,CAgBtF/B,EAAc,kBAAkB,CAAC;AAAA,IAAAgC,IAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,kBAAA,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A,CAAAvN,IAAAE,IAAAC,IAAAC,IAAAC,IAAAC,IAAAC,GAAAE,GAAAC,GAAAC,IAAAC,IAAAb,KAAAyN,GAAA,CAAAzP,IAAA0P,OAAAC,GAAAJ,IAAA;CAAA;EAAAzO;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAA5B,IAAA,GAAA,KAAA,GA1uB2CvB,CAAY,GAAAkR,GAAA"}
@@ -0,0 +1 @@
1
+ require("./FolderPaneView.cjs.js");
@@ -0,0 +1,2 @@
1
+ export { default as FolderPaneView } from './FolderPaneView';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/folder-pane-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1 @@
1
+ import "./FolderPaneView.esm.js";
@@ -0,0 +1,2 @@
1
+ function e(e){return e+1}function t(e,t,n,r){return e.generation===t&&e.subjectUri===n&&e.context===r}exports.invalidateRenderRequest=e,exports.isCurrentRenderRequest=t;
2
+ //# sourceMappingURL=renderRequest.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderRequest.cjs.js","names":["invalidateRenderRequest","generation","isCurrentRenderRequest","request","subjectUri","context","invalidateRenderRequest","generation","isCurrentRenderRequest","request","subjectUri","context"],"sources":["../../../src/components/folder-pane-view/renderRequest.ts"],"sourcesContent":["export type RenderRequest = {\n generation: number\n subjectUri: string\n context: object | undefined\n}\n\nexport function invalidateRenderRequest (generation: number): number {\n return generation + 1\n}\n\nexport function isCurrentRenderRequest (\n request: RenderRequest,\n generation: number,\n subjectUri: string | undefined,\n context: object | undefined\n): boolean {\n return request.generation === generation &&\n request.subjectUri === subjectUri &&\n request.context === context\n}\n"],"mappings":"AAMA,SAAgBA,EAAyBC,EAA4B,CACnE,OAAOA,EAAa,CACtB,CAEA,SAAgBC,EACdC,EACAF,EACAG,EACAC,EACS,CACT,OAAOF,EAAQF,aAAeA,GAC5BE,EAAQC,aAAeA,GACvBD,EAAQE,UAAYA,CACxB,C"}
@@ -0,0 +1,8 @@
1
+ export type RenderRequest = {
2
+ generation: number;
3
+ subjectUri: string;
4
+ context: object | undefined;
5
+ };
6
+ export declare function invalidateRenderRequest(generation: number): number;
7
+ export declare function isCurrentRenderRequest(request: RenderRequest, generation: number, subjectUri: string | undefined, context: object | undefined): boolean;
8
+ //# sourceMappingURL=renderRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderRequest.d.ts","sourceRoot":"","sources":["../../../src/components/folder-pane-view/renderRequest.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;AAED,wBAAgB,uBAAuB,CAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,OAAO,CAIT"}
@@ -0,0 +1,10 @@
1
+ // src/components/folder-pane-view/renderRequest.ts
2
+ function e(e) {
3
+ return e + 1;
4
+ }
5
+ function t(e, t, n, r) {
6
+ return e.generation === t && e.subjectUri === n && e.context === r;
7
+ }
8
+ export { e as invalidateRenderRequest, t as isCurrentRenderRequest };
9
+
10
+ //# sourceMappingURL=renderRequest.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderRequest.esm.js","names":["invalidateRenderRequest","generation","isCurrentRenderRequest","request","subjectUri","context","invalidateRenderRequest","generation","isCurrentRenderRequest","request","subjectUri","context"],"sources":["../../../src/components/folder-pane-view/renderRequest.ts"],"sourcesContent":["export type RenderRequest = {\n generation: number\n subjectUri: string\n context: object | undefined\n}\n\nexport function invalidateRenderRequest (generation: number): number {\n return generation + 1\n}\n\nexport function isCurrentRenderRequest (\n request: RenderRequest,\n generation: number,\n subjectUri: string | undefined,\n context: object | undefined\n): boolean {\n return request.generation === generation &&\n request.subjectUri === subjectUri &&\n request.context === context\n}\n"],"mappings":";AAMA,SAAgBA,EAAyBC,GAA4B;CACnE,OAAOA,IAAa;AACtB;AAEA,SAAgBC,EACdC,GACAF,GACAG,GACAC,GACS;CACT,OAAOF,EAAQF,eAAeA,KAC5BE,EAAQC,eAAeA,KACvBD,EAAQE,YAAYA;AACxB"}
@@ -0,0 +1,2 @@
1
+ var e=`Names must not be empty, "." or "..", and must not contain path separators.`;function t(t){let n=t.trim();if(!n||n===`.`||n===`..`||/[\\/\u0000-\u001f\u007f]/.test(n))throw Error(e);return n}function n(e){try{return t(e),!0}catch{return!1}}exports.invalidCreationNameMessage=e,exports.isSafeCreationName=n,exports.normalizeCreationName=t;
2
+ //# sourceMappingURL=creationSafety.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creationSafety.cjs.js","names":["invalidCreationNameMessage","normalizeCreationName","name","value","isSafeCreationName"],"sources":["../src/creationSafety.ts"],"sourcesContent":["export const invalidCreationNameMessage =\n 'Names must not be empty, \".\" or \"..\", and must not contain path separators.'\n\n/**\n * Creation names are one URI path segment. Keeping this rule at the\n * operation boundary prevents callers other than the dialog from bypassing\n * the dialog's validation.\n */\nexport function normalizeCreationName (value: string): string {\n const name = value.trim()\n if (!name || name === '.' || name === '..' || /[\\\\/\\u0000-\\u001f\\u007f]/.test(name)) {\n throw new Error(invalidCreationNameMessage)\n }\n return name\n}\n\nexport function isSafeCreationName (value: string): boolean {\n try {\n normalizeCreationName(value)\n return true\n } catch {\n return false\n }\n}\n"],"mappings":"AAAA,IAAaA,EACX,8EAOF,SAAgBC,EAAuB,EAAuB,CAC5D,IAAMC,EAAOC,EAAM,KAAK,EACxB,GAAI,CAACD,GAAQA,IAAS,KAAOA,IAAS,MAAQ,2BAA2B,KAAKA,CAAI,EAChF,MAAU,MAAMF,CAA0B,EAE5C,OAAOE,CACT,CAEA,SAAgBE,EAAoB,EAAwB,CAC1D,GAAI,CAEF,OADAH,EAAsBE,CAAK,EACpB,EACT,MAAQ,CACN,MAAO,EACT,CACF,C"}
@@ -0,0 +1,9 @@
1
+ export declare const invalidCreationNameMessage = "Names must not be empty, \".\" or \"..\", and must not contain path separators.";
2
+ /**
3
+ * Creation names are one URI path segment. Keeping this rule at the
4
+ * operation boundary prevents callers other than the dialog from bypassing
5
+ * the dialog's validation.
6
+ */
7
+ export declare function normalizeCreationName(value: string): string;
8
+ export declare function isSafeCreationName(value: string): boolean;
9
+ //# sourceMappingURL=creationSafety.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creationSafety.d.ts","sourceRoot":"","sources":["../src/creationSafety.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,oFACwC,CAAA;AAE/E;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED,wBAAgB,kBAAkB,CAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAO1D"}
@@ -0,0 +1,17 @@
1
+ // src/creationSafety.ts
2
+ var e = "Names must not be empty, \".\" or \"..\", and must not contain path separators.";
3
+ function t(t) {
4
+ let n = t.trim();
5
+ if (!n || n === "." || n === ".." || /[\\/\u0000-\u001f\u007f]/.test(n)) throw Error(e);
6
+ return n;
7
+ }
8
+ function n(e) {
9
+ try {
10
+ return t(e), !0;
11
+ } catch {
12
+ return !1;
13
+ }
14
+ }
15
+ export { e as invalidCreationNameMessage, n as isSafeCreationName, t as normalizeCreationName };
16
+
17
+ //# sourceMappingURL=creationSafety.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creationSafety.esm.js","names":["invalidCreationNameMessage","normalizeCreationName","name","value","isSafeCreationName"],"sources":["../src/creationSafety.ts"],"sourcesContent":["export const invalidCreationNameMessage =\n 'Names must not be empty, \".\" or \"..\", and must not contain path separators.'\n\n/**\n * Creation names are one URI path segment. Keeping this rule at the\n * operation boundary prevents callers other than the dialog from bypassing\n * the dialog's validation.\n */\nexport function normalizeCreationName (value: string): string {\n const name = value.trim()\n if (!name || name === '.' || name === '..' || /[\\\\/\\u0000-\\u001f\\u007f]/.test(name)) {\n throw new Error(invalidCreationNameMessage)\n }\n return name\n}\n\nexport function isSafeCreationName (value: string): boolean {\n try {\n normalizeCreationName(value)\n return true\n } catch {\n return false\n }\n}\n"],"mappings":";AAAA,IAAaA,IACX;AAOF,SAAgBC,EAAuB,GAAuB;CAC5D,IAAMC,IAAOC,EAAM,KAAK;CACxB,IAAI,CAACD,KAAQA,MAAS,OAAOA,MAAS,QAAQ,2BAA2B,KAAKA,CAAI,GAChF,MAAU,MAAMF,CAA0B;CAE5C,OAAOE;AACT;AAEA,SAAgBE,EAAoB,GAAwB;CAC1D,IAAI;EAEF,OADAH,EAAsBE,CAAK,GACpB;CACT,QAAQ;EACN,OAAO;CACT;AACF"}
@@ -1,3 +1,3 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.folderPaneInstancePane{box-sizing:border-box;text-align:left;width:100%;max-width:none;margin-left:0;margin-right:0;margin-top:var(--spacing-xs,.5em);margin-bottom:var(--spacing-xs,.5em);-webkit-overflow-scrolling:touch;border-top:1px solid #777;border-bottom:1px solid #777;align-self:stretch;padding-top:1rem;padding-bottom:1rem;overflow-x:auto}.folderPanePackageDiv{text-align:left;border-top:.2em solid #ccc;width:100%;max-width:none;margin-left:0;margin-right:0;display:block;overflow-x:auto}.folderPaneMainTable{table-layout:auto;text-align:left;width:100%;max-width:none;margin-left:0;margin-right:auto;margin-bottom:var(--spacing-lg,1.5625rem);display:table}.folderPaneMainTable td,.folderPaneMainTable th{text-align:left;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.folderPaneMainTable>tr>td.obj,.folderPaneMainTable>tbody>tr>td.obj{padding-left:var(--spacing-lg,1.5625rem)!important}.folderPanePredicateCell{width:0;min-width:0;max-width:0;overflow:hidden;border:0!important;margin:0!important;padding:0!important}.folderPaneCreationDiv{text-align:left;justify-content:flex-start;align-items:flex-start;width:100%;max-width:none;margin-left:0;margin-right:0;display:flex}.folderPaneDropZone{min-height:calc(var(--icon-base,2em) + 1rem);box-sizing:border-box;padding:.5rem .25rem}.folderPaneDropTarget{width:var(--icon-base,2em);min-width:var(--icon-base,2em);max-width:var(--icon-base,2em);height:var(--icon-base,2em);min-height:var(--icon-base,2em);max-height:var(--icon-base,2em);box-sizing:content-box;flex:0 0 var(--icon-base,2em);display:inline-block;margin:0!important;padding:0!important}.folderPaneExplicitDropIcon{width:var(--icon-base,2em);height:var(--icon-base,2em)}@media (width<=700px){.folderPaneInstancePane{margin-top:var(--spacing-2xs,.25em);margin-bottom:var(--spacing-2xs,.25em);border-top:1px solid #777;border-bottom:1px solid #777}.folderPaneExplicitDropIcon{width:var(--icon-sm,1.5em);height:var(--icon-sm,1.5em)}}
2
- :root{--icon-base:2em}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("./_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-logic"),n=require("solid-ui");n=e.__toESM(n);var r={icon:n.icons.iconBase+`noun_973694_expanded.svg`,name:`folder`,mintNew:function(e,t){let n=e.session.store,r=t.newInstance||n.sym(t.newBase),i=r.uri;return i.endsWith(`/`)&&(i=i.slice(0,-1)),t.newInstance=n.sym(i+`/`),n.fetcher.webOperation(`PUT`,r.uri).then(function(){return console.log(`New container created: `+r.uri),t})},label:function(e,t){let r=t.session.store,i=r.each(e,n.ns.ldp(`contains`)).length;return i>0?`Contents (`+i+`)`:r.holds(e,n.ns.rdf(`type`),n.ns.ldp(`Container`))?`Container (0)`:null},render:function(e,r){function i(e){let t=e.uri.slice(e.dir().uri.length);return!(t.startsWith(`.`)||t.endsWith(`.acl`)||t.endsWith(`~`))}function a(){let t=c.each(e,n.ns.ldp(`contains`)).filter(i);t=t.map(e=>[n.utils.label(e).toLowerCase(),e]),t.sort(),t=t.map(e=>e[1]),n.utils.syncTableToArray(l,t,function(t){let r=c.statementsMatching(e,n.ns.ldp(`contains`),t)[0],i=s.VIEWAS_boring_default,a=s.propertyTR(o,r,!1),l=a.firstChild;return l.textContent=``,l.classList.add(`folderPanePredicateCell`),a.appendChild(s.outlineObjectTD(t,i,void 0,r)),a})}let o=r.dom,s=r.getOutliner(o),c=r.session.store,l,u=o.createElement(`div`);u.classList.add(`instancePane`,`folderPaneInstancePane`);let d=e.uri.endsWith(`/`)?e.uri:e.uri+`/`,f=c.sym(d+`index.ttl#this`);if(c.holds(e,n.ns.ldp(`contains`),f.doc())){console.log(`View of folder will be view of indexThing. Loading `+f);let e=u.appendChild(o.createElement(`div`));return e.classList.add(`folderPanePackageDiv`),c.fetcher.load(f.doc()).then(function(){l=e.appendChild(o.createElement(`table`)),l.classList.add(`folderPaneMainTable`),r.getOutliner(o).GotoSubject(f,!0,void 0,!1,void 0,l)}),u}l=u.appendChild(o.createElement(`table`)),l.classList.add(`folderPaneMainTable`),l.refresh=a,a(),c.updater.addDownstreamChangeListener(e,a);let p=u.appendChild(o.createElement(`div`));p.classList.add(`folderPaneCreationDiv`);let m=t.authn.currentUser();if(!m)return u;let h={folder:e,div:p,dom:o,statusArea:p,me:m};return h.refreshTarget=l,n.login.filterAvailablePanes(r.session.paneRegistry.list).then(function(e){n.create.newThingUI(h,r,e),n.aclControl.preventBrowserDropEvents(o);let t;t=p.firstChild,t instanceof HTMLElement&&t.classList.add(`folderPaneDropTarget`),p.classList.add(`folderPaneDropZone`),n.widgets.makeDropTarget(p,null,g)}),u;function g(t){n.widgets.uploadFiles(c.fetcher,t,e.uri,e.uri,function(t,r){let i=c.sym(r);console.log(` Upload: put OK: `+i),c.add(e,n.ns.ldp(`contains`),i,e.doc()),l.refresh()})}}};exports.default=r;
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.folder-pane{box-sizing:border-box;text-align:left;flex-direction:column;align-self:stretch;width:100%;max-width:none;height:100%;min-height:0;margin-left:0;margin-right:0;display:flex;overflow:hidden}.folder-pane-package-div{text-align:left;width:100%;max-width:none;margin-left:0;margin-right:0;display:block;overflow-x:auto}folder-pane-view{flex-direction:column;flex:auto;width:100%;height:100%;min-height:0;display:flex}.folder-pane-main-content{border:1px solid var(--solid-ui-color-gray-200,#cbd5e1);background:var(--solid-ui-color-white,#fff);border-radius:5px;flex-direction:row;flex:auto;width:100%;height:80vh;min-height:32rem;display:flex;overflow:hidden}.folder-pane-view-controls{flex:none;justify-content:flex-end;align-items:center;gap:.35rem;padding:10px 0;display:flex}.folder-pane-view-controls button{width:var(--solid-ui-clickable-area,42px);height:var(--solid-ui-clickable-area,42px);color:var(--solid-ui-color-gray-500,#6a7282);cursor:pointer;background:0 0;border:0;border-radius:5px;justify-content:center;align-items:center;padding:0;display:inline-flex}.folder-pane-view-controls button[aria-pressed=true],.folder-pane-view-controls button:hover{background:var(--solid-ui-color-primary-selected,#cbb9ff);color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-view-controls button:focus-visible{outline:2px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:-2px}.folder-pane-view-controls icon-lucide-layout-grid,.folder-pane-view-controls icon-lucide-list{width:16px;height:16px}folder-pane-sidebar{box-sizing:border-box;border-right:1px solid var(--solid-ui-color-gray-200,#cbd5e1);flex-direction:column;flex:0 0 256px;min-width:256px;min-height:0;display:flex;overflow:hidden}.folder-pane-content-column{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.folder-pane-content-column>folder-pane-content{box-sizing:border-box;padding:1rem}.folder-pane-content-column>folder-pane-content:has(>solid-ui-file-explorer-provider){padding:0}.folder-pane-full-view{flex-direction:column;flex:auto;width:100%;height:100%;min-height:0;display:flex;overflow:auto}.folder-pane-access-denied-message{box-sizing:border-box;text-align:center;flex:auto;justify-content:center;align-items:center;width:100%;min-width:0;max-width:100%;height:100%;min-height:0;padding:32px;display:flex;overflow:hidden}.folder-pane-access-denied-message-body{box-sizing:border-box;overflow-wrap:anywhere;width:100%;min-width:0;max-width:384px}.folder-pane-resource-error{box-sizing:border-box;background:0 0;border:0;flex:auto;justify-content:center;align-items:center;width:100%;min-width:0;min-height:0;padding:16px;display:flex}.folder-pane-resource-error>solid-ui-error-state{width:min(100%,640px);display:block}solid-ui-file-explorer-provider{flex-direction:column;gap:0;width:100%;min-width:0;height:100%;min-height:0;display:flex;overflow:hidden}solid-ui-file-explorer-provider>solid-ui-file-explorer-header{z-index:2;background:var(--solid-ui-color-white,#fff);width:100%;display:block;position:sticky;top:0}solid-ui-file-explorer-provider>.paneDiv,solid-ui-file-explorer-provider>.exceptionPane{box-sizing:border-box;flex:auto;width:100%;min-width:0;max-width:100%;min-height:0;margin:0;display:block;overflow:hidden auto}.folder-pane-predicate-cell{width:0;min-width:0;max-width:0;overflow:hidden;border:0!important;margin:0!important;padding:0!important}.folder-pane-status{border-bottom:1px solid var(--color-border,#ddd);text-align:left;flex-direction:column;gap:8px;padding:8px 12px;display:flex}.folder-pane-status[data-status=progress]{accent-color:auto;text-align:center;outline:0;flex:auto;justify-content:center;align-items:center;box-shadow:none!important;background:0 0!important;border:0!important}.folder-pane-status:empty{display:none}.folder-pane-status-message{align-items:center;gap:12px;padding-right:40px;display:flex;position:relative}.folder-pane-status-message>solid-ui-button{position:absolute;top:-6px;right:-4px}.folder-pane-status-message[data-status=error]{color:var(--color-error,#b00020)}.folder-pane-status-text{flex:auto}.folder-pane-status[data-status=progress] .folder-pane-status-message{width:100%;min-height:8rem;color:var(--solid-ui-color-gray-500,#6a7282);font-size:var(--solid-ui-font-size-sm,.875rem);outline:0;flex:auto;justify-content:center;align-items:center;box-shadow:none!important;background:0 0!important;border:0!important}.folder-pane-status[data-status=progress] .folder-pane-status-text{flex:0 auto}.folder-pane-drop-target{width:var(--icon-base,2em);min-width:var(--icon-base,2em);max-width:var(--icon-base,2em);height:var(--icon-base,2em);min-height:var(--icon-base,2em);max-height:var(--icon-base,2em);box-sizing:content-box;flex:0 0 var(--icon-base,2em);display:inline-block;margin:0!important;padding:0!important}.folder-pane-explicit-drop-icon{width:var(--icon-base,2em);height:var(--icon-base,2em)}@media (width<=700px){.folder-pane{margin-top:var(--spacing-2xs,.25em);margin-bottom:var(--spacing-2xs,.25em);border-top:1px solid #777;border-bottom:1px solid #777}.folder-pane-explicit-drop-icon{width:var(--icon-sm,1.5em);height:var(--icon-sm,1.5em)}}
2
+ :root{--icon-base:2em}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("./helpers.cjs.js");require("./components/folder-pane-view/index.cjs.js"),;let t=require("solid-ui");var n={icon:t.icons.iconBase+`noun_973694_expanded.svg`,name:`folder`,mintNew:function(e,t){let n=e.session.store,r=(t.newInstance||n.sym(t.newBase)).uri;r.endsWith(`/`)&&(r=r.slice(0,-1));let i=n.sym(r+`/`);return t.newInstance=i,n.fetcher.webOperation(`PUT`,i.uri).then(function(){return t})},label:function(n,r){if(e.isJavaScriptFile(n))return null;let i=r.session.store,a=i.each(n,t.ns.ldp(`contains`)).length;return a>0?`Contents (`+a+`)`:i.holds(n,t.ns.rdf(`type`),t.ns.ldp(`Container`))?`Container (0)`:null},render:function(e,t,n){let r=t.dom,i=r.createElement(`div`);i.classList.add(`instancePane`,`folder-pane`);let a=i.appendChild(r.createElement(`folder-pane-view`)),o=n&&typeof n==`object`?n:{};return a.browserContext=t,a.subject=e,a.fullView=o.fullView===!0||o.solo===!0,i}};exports.default=n;
3
3
  //# sourceMappingURL=folderPane.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"folderPane.cjs.js","names":[],"sources":["../src/folderPane.ts"],"sourcesContent":["/* Folder pane\n **\n ** This outline pane lists the members of a folder\n */\n\nimport { authn } from 'solid-logic'\nimport * as UI from 'solid-ui'\nimport './styles/folderPane.css'\nimport './styles/utilities.css'\n\nexport default {\n icon: UI.icons.iconBase + 'noun_973694_expanded.svg',\n name: 'folder',\n\n // Create a new folder in a Solid system,\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n const newInstance =\n newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase)\n let u = newInstance.uri\n if (u.endsWith('/')) {\n u = u.slice(0, -1) // chop off trailer\n } // { throw new Error('URI of new folder must end in \"/\" :' + u) }\n newPaneOptions.newInstance = kb.sym(u + '/')\n\n return kb.fetcher\n .webOperation('PUT', newInstance.uri)\n .then(function () {\n console.log('New container created: ' + newInstance.uri)\n return newPaneOptions\n })\n },\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(subject, UI.ns.ldp('contains')).length\n if (n > 0) {\n return 'Contents (' + n + ')' // Show how many in hover text\n }\n if (kb.holds(subject, UI.ns.rdf('type'), UI.ns.ldp('Container'))) {\n // It is declared as being a container\n return 'Container (0)'\n }\n return null // Suppress pane otherwise\n },\n\n // Render a file folder in a LDP/solid system\n render: function (subject, context) {\n function noHiddenFiles (obj) {\n // @@ This hiddenness should actually be server defined\n const pathEnd = obj.uri.slice(obj.dir().uri.length)\n return !(\n pathEnd.startsWith('.') ||\n pathEnd.endsWith('.acl') ||\n pathEnd.endsWith('~')\n )\n }\n\n function refresh () {\n let objs = kb.each(subject, UI.ns.ldp('contains')).filter(noHiddenFiles)\n objs = objs.map(obj => [UI.utils.label(obj).toLowerCase(), obj])\n objs.sort() // Sort by label case-insensitive\n objs = objs.map(pair => pair[1])\n UI.utils.syncTableToArray(mainTable, objs, function (obj) {\n const st = kb.statementsMatching(subject, UI.ns.ldp('contains'), obj)[0]\n const defaultpropview = outliner.VIEWAS_boring_default\n const tr = outliner.propertyTR(dom, st, false)\n const predicateCell = tr.firstChild as HTMLElement\n predicateCell.textContent = '' // Was initialized to 'Contains'\n predicateCell.classList.add('folderPanePredicateCell')\n tr.appendChild(\n outliner.outlineObjectTD(obj, defaultpropview, undefined, st)\n )\n // UI.widgets.makeDraggable(tr, obj)\n return tr\n })\n }\n\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n let mainTable // This is a live synced table\n const div = dom.createElement('div')\n div.classList.add('instancePane', 'folderPaneInstancePane')\n \n const thisDir = subject.uri.endsWith('/') ? subject.uri : subject.uri + '/'\n const indexThing = kb.sym(thisDir + 'index.ttl#this')\n if (kb.holds(subject, UI.ns.ldp('contains'), indexThing.doc())) {\n console.log(\n 'View of folder will be view of indexThing. Loading ' + indexThing\n )\n const packageDiv = div.appendChild(dom.createElement('div'))\n packageDiv.classList.add('folderPanePackageDiv')\n kb.fetcher.load(indexThing.doc()).then(function () {\n mainTable = packageDiv.appendChild(dom.createElement('table'))\n mainTable.classList.add('folderPaneMainTable')\n context\n .getOutliner(dom)\n .GotoSubject(indexThing, true, undefined, false, undefined, mainTable)\n })\n return div\n } else {\n mainTable = div.appendChild(dom.createElement('table'))\n mainTable.classList.add('folderPaneMainTable')\n mainTable.refresh = refresh\n refresh()\n // addDownstreamChangeListener is a high level function which when someone else changes the resource,\n // reloads it into the kb, then must call addDownstreamChangeListener to be able to update the folder pane.\n kb.updater.addDownstreamChangeListener(subject, refresh) // Update store and call me if folder changes\n }\n\n // Allow user to create new things within the folder\n const creationDiv = div.appendChild(dom.createElement('div'))\n creationDiv.classList.add('folderPaneCreationDiv')\n const me = authn.currentUser() // @@ respond to login events\n if (!me) {\n return div // Cannot create new things without being logged in\n }\n const creationContext: UI.createTypes.CreateContext = {\n folder: subject,\n div: creationDiv,\n dom: dom,\n statusArea: creationDiv,\n me: me\n }\n creationContext.refreshTarget = mainTable\n UI.login\n .filterAvailablePanes(context.session.paneRegistry.list)\n .then(function (relevantPanes) {\n UI.create.newThingUI(creationContext, context, relevantPanes) // Have to pass panes down newUI\n\n UI.aclControl.preventBrowserDropEvents(dom)\n\n const explicitDropIcon = false\n let target\n if (explicitDropIcon) {\n target = creationDiv.insertBefore(\n dom.createElement('img'),\n creationDiv.firstChild\n )\n target.classList.add('folderPaneExplicitDropIcon')\n target.setAttribute('src', UI.icons.iconBase + 'noun_748003.svg')\n } else {\n target = creationDiv.firstChild // Overload drop target semantics onto the plus sign\n }\n\n if (target instanceof HTMLElement) {\n target.classList.add('folderPaneDropTarget')\n }\n\n creationDiv.classList.add('folderPaneDropZone')\n\n // /////////// Allow new file to be Uploaded\n UI.widgets.makeDropTarget(creationDiv, null, droppedFileHandler)\n })\n\n return div\n\n function droppedFileHandler (files) {\n UI.widgets.uploadFiles(\n kb.fetcher,\n files,\n subject.uri,\n subject.uri,\n function (file, uri) {\n // A file has been uploaded\n const destination = kb.sym(uri)\n console.log(' Upload: put OK: ' + destination)\n kb.add(subject, UI.ns.ldp('contains'), destination, subject.doc())\n mainTable.refresh()\n }\n )\n }\n }\n}\n// ends\n"],"mappings":"oMAUA,IAAA,EAAe,CACb,KAAM,EAAG,MAAM,SAAW,2BAC1B,KAAM,SAGN,QAAS,SAAU,EAAS,EAAgB,CAC1C,IAAM,EAAK,EAAQ,QAAQ,MACrB,EACJ,EAAe,aAAe,EAAG,IAAI,EAAe,OAAO,EACzD,EAAI,EAAY,IAMpB,OALI,EAAE,SAAS,GAAG,IAChB,EAAI,EAAE,MAAM,EAAG,EAAE,GAEnB,EAAe,YAAc,EAAG,IAAI,EAAI,GAAG,EAEpC,EAAG,QACP,aAAa,MAAO,EAAY,GAAG,CAAC,CACpC,KAAK,UAAY,CAEhB,OADA,QAAQ,IAAI,0BAA4B,EAAY,GA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,EAG1C,IAAI,EASF,EAAS,EAAY,WAGnB,aAAkB,aACpB,EAAO,UAAU,IAAI,sBAAsB,EAG7C,EAAY,UAAU,IAAI,oBAAoB,EAG9C,EAAG,QAAQ,eAAe,EAAa,KAAM,CAAkB,CACjE,CAAC,EAEI,EAEP,SAAS,EAAoB,EAAO,CAClC,EAAG,QAAQ,YACT,EAAG,QACH,EACA,EAAQ,IACR,EAAQ,IACR,SAAU,EAAM,EAAK,CAEnB,IAAM,EAAc,EAAG,IAAI,CAAG,EAC9B,QAAQ,IAAI,oBAAsB,CAAW,EAC7C,EAAG,IAAI,EAAS,EAAG,GAAG,IAAI,UAAU,EAAG,EAAa,EAAQ,IAAI,CAAC,EACjE,EAAU,QAAQ,CACpB,CACF,CACF,CACF,CACF"}
1
+ {"version":3,"file":"folderPane.cjs.js","names":["icons","isJavaScriptFile","ns","require_helpers","solid_ui","folderPane_default","kb","context","u","newPaneOptions","normalizedInstance","subject","n","dom","div","folderPaneView","renderOptions","paneOptions"],"sources":["../src/folderPane.ts"],"sourcesContent":["/* Folder pane\n **\n ** This outline pane lists the members of a folder\n */\n\nimport './components/folder-pane-view'\nimport type FolderPaneView from './components/folder-pane-view/FolderPaneView'\nimport { icons, ns } from 'solid-ui'\nimport { isJavaScriptFile } from './helpers'\nimport './styles/folderPane.css'\nimport './styles/utilities.css'\n\nexport { getCreationNoun, getCreationPanes, getPaneLabel } from './helpers'\n\ntype FolderPaneRenderOptions = {\n fullView?: boolean\n solo?: boolean\n}\n\nexport default {\n icon: icons.iconBase + 'noun_973694_expanded.svg',\n name: 'folder',\n\n // Create a new folder in a Solid system,\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n const newInstance =\n newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase)\n let u = newInstance.uri\n if (u.endsWith('/')) {\n u = u.slice(0, -1) // chop off trailer\n } // { throw new Error('URI of new folder must end in \"/\" :' + u) }\n const normalizedInstance = kb.sym(u + '/')\n newPaneOptions.newInstance = normalizedInstance\n\n return kb.fetcher\n .webOperation('PUT', normalizedInstance.uri)\n .then(function () {\n return newPaneOptions\n })\n },\n\n label: function (subject, context) {\n if (isJavaScriptFile(subject)) return null\n const kb = context.session.store\n const n = kb.each(subject, ns.ldp('contains')).length\n if (n > 0) {\n return 'Contents (' + n + ')' // Show how many in hover text\n }\n if (kb.holds(subject, ns.rdf('type'), ns.ldp('Container'))) {\n // It is declared as being a container\n return 'Container (0)'\n }\n return null // Suppress pane otherwise\n },\n\n // Render a file folder in a LDP/solid system\n render: function (subject, context, paneOptions?: unknown) {\n\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('instancePane', 'folder-pane')\n const folderPaneView = div.appendChild(dom.createElement('folder-pane-view')) as FolderPaneView\n const renderOptions = paneOptions && typeof paneOptions === 'object'\n ? paneOptions as FolderPaneRenderOptions\n : {}\n folderPaneView.browserContext = context\n folderPaneView.subject = subject\n folderPaneView.fullView = renderOptions.fullView === true || renderOptions.solo === true\n\n // The pane registry is needed to open the internal pane on Alt-click.\n // addDownstreamChangeListener is a high level function which when someone else changes the resource,\n // reloads it into the kb, then must call addDownstreamChangeListener to be able to update the folder pane.\n // SAM need to figure out how to add this line later kb.updater.addDownstreamChangeListener(subject, refresh) // Update store and call me if folder changes\n\n return div\n }\n}\n// ends\n"],"mappings":"A,+LAmBA,IAAAK,EAAe,CACb,KAAML,EAAAA,MAAM,SAAW,2BACvB,KAAM,SAGN,QAAS,SAAU,EAAS,EAAgB,CAC1C,IAAMM,EAAKC,EAAQ,QAAQ,MAGvBC,GADFC,EAAe,aAAeH,EAAG,IAAIG,EAAe,OAAO,EAAA,CACzC,IAChBD,EAAE,SAAS,GAAG,IAChB,EAAIA,EAAE,MAAM,EAAG,EAAE,GAEnB,IAAME,EAAqBJ,EAAG,IAAIE,EAAI,GAAG,EAGzC,MAFA,GAAe,YAAcE,EAEtBJ,EAAG,QACP,aAAa,MAAOI,EAAmB,GAAG,CAAC,CAC3C,KAAK,UAAY,CAChB,OAAOD,CACT,CAAC,CACL,EAEA,MAAO,SAAU,EAAS,EAAS,CACjC,GAAIR,EAAAA,iBAAiBU,CAAO,EAAG,OAAO,KACtC,IAAML,EAAKC,EAAQ,QAAQ,MACrBK,EAAIN,EAAG,KAAKK,EAAST,EAAAA,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,OAQ/C,OAPIU,EAAI,EACC,aAAeA,EAAI,IAExBN,EAAG,MAAMK,EAAST,EAAAA,GAAG,IAAI,MAAM,EAAGA,EAAAA,GAAG,IAAI,WAAW,CAAC,EAEhD,gBAEF,IACT,EAGA,OAAQ,SAAU,EAAS,EAAS,EAAuB,CAEzD,IAAMW,EAAMN,EAAQ,IACdO,EAAMD,EAAI,cAAc,KAAK,EACnCC,EAAI,UAAU,IAAI,eAAgB,aAAa,EAC/C,IAAMC,EAAiBD,EAAI,YAAYD,EAAI,cAAc,kBAAkB,CAAC,EACtEG,EAAgBC,GAAe,OAAOA,GAAgB,SACxDA,EACA,CAAC,EAUL,MATA,GAAe,eAAiBV,EAChC,EAAe,QAAUI,EACzB,EAAe,SAAWK,EAAc,WAAa,IAAQA,EAAc,OAAS,GAO7EF,CACT,CACF,E"}
@@ -1,9 +1,10 @@
1
+ export { getCreationNoun, getCreationPanes, getPaneLabel } from './helpers';
1
2
  declare const _default: {
2
3
  icon: string;
3
4
  name: string;
4
5
  mintNew: (context: any, newPaneOptions: any) => any;
5
6
  label: (subject: any, context: any) => string | null;
6
- render: (subject: any, context: any) => any;
7
+ render: (subject: any, context: any, paneOptions?: unknown) => any;
7
8
  };
8
9
  export default _default;
9
10
  //# sourceMappingURL=folderPane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"folderPane.d.ts","sourceRoot":"","sources":["../src/folderPane.ts"],"names":[],"mappings":"AAOA,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;;;;;;;;AAE/B,wBAoKC"}
1
+ {"version":3,"file":"folderPane.d.ts","sourceRoot":"","sources":["../src/folderPane.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAA;AAItC,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;;;;;;uDA6CvB,OAAO;;AAtC3D,wBA0DC"}
@@ -1,70 +1,33 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.folderPaneInstancePane{box-sizing:border-box;text-align:left;width:100%;max-width:none;margin-left:0;margin-right:0;margin-top:var(--spacing-xs,.5em);margin-bottom:var(--spacing-xs,.5em);-webkit-overflow-scrolling:touch;border-top:1px solid #777;border-bottom:1px solid #777;align-self:stretch;padding-top:1rem;padding-bottom:1rem;overflow-x:auto}.folderPanePackageDiv{text-align:left;border-top:.2em solid #ccc;width:100%;max-width:none;margin-left:0;margin-right:0;display:block;overflow-x:auto}.folderPaneMainTable{table-layout:auto;text-align:left;width:100%;max-width:none;margin-left:0;margin-right:auto;margin-bottom:var(--spacing-lg,1.5625rem);display:table}.folderPaneMainTable td,.folderPaneMainTable th{text-align:left;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.folderPaneMainTable>tr>td.obj,.folderPaneMainTable>tbody>tr>td.obj{padding-left:var(--spacing-lg,1.5625rem)!important}.folderPanePredicateCell{width:0;min-width:0;max-width:0;overflow:hidden;border:0!important;margin:0!important;padding:0!important}.folderPaneCreationDiv{text-align:left;justify-content:flex-start;align-items:flex-start;width:100%;max-width:none;margin-left:0;margin-right:0;display:flex}.folderPaneDropZone{min-height:calc(var(--icon-base,2em) + 1rem);box-sizing:border-box;padding:.5rem .25rem}.folderPaneDropTarget{width:var(--icon-base,2em);min-width:var(--icon-base,2em);max-width:var(--icon-base,2em);height:var(--icon-base,2em);min-height:var(--icon-base,2em);max-height:var(--icon-base,2em);box-sizing:content-box;flex:0 0 var(--icon-base,2em);display:inline-block;margin:0!important;padding:0!important}.folderPaneExplicitDropIcon{width:var(--icon-base,2em);height:var(--icon-base,2em)}@media (width<=700px){.folderPaneInstancePane{margin-top:var(--spacing-2xs,.25em);margin-bottom:var(--spacing-2xs,.25em);border-top:1px solid #777;border-bottom:1px solid #777}.folderPaneExplicitDropIcon{width:var(--icon-sm,1.5em);height:var(--icon-sm,1.5em)}}
2
- :root{--icon-base:2em}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.folder-pane{box-sizing:border-box;text-align:left;flex-direction:column;align-self:stretch;width:100%;max-width:none;height:100%;min-height:0;margin-left:0;margin-right:0;display:flex;overflow:hidden}.folder-pane-package-div{text-align:left;width:100%;max-width:none;margin-left:0;margin-right:0;display:block;overflow-x:auto}folder-pane-view{flex-direction:column;flex:auto;width:100%;height:100%;min-height:0;display:flex}.folder-pane-main-content{border:1px solid var(--solid-ui-color-gray-200,#cbd5e1);background:var(--solid-ui-color-white,#fff);border-radius:5px;flex-direction:row;flex:auto;width:100%;height:80vh;min-height:32rem;display:flex;overflow:hidden}.folder-pane-view-controls{flex:none;justify-content:flex-end;align-items:center;gap:.35rem;padding:10px 0;display:flex}.folder-pane-view-controls button{width:var(--solid-ui-clickable-area,42px);height:var(--solid-ui-clickable-area,42px);color:var(--solid-ui-color-gray-500,#6a7282);cursor:pointer;background:0 0;border:0;border-radius:5px;justify-content:center;align-items:center;padding:0;display:inline-flex}.folder-pane-view-controls button[aria-pressed=true],.folder-pane-view-controls button:hover{background:var(--solid-ui-color-primary-selected,#cbb9ff);color:var(--solid-ui-color-primary,#7c4dff)}.folder-pane-view-controls button:focus-visible{outline:2px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:-2px}.folder-pane-view-controls icon-lucide-layout-grid,.folder-pane-view-controls icon-lucide-list{width:16px;height:16px}folder-pane-sidebar{box-sizing:border-box;border-right:1px solid var(--solid-ui-color-gray-200,#cbd5e1);flex-direction:column;flex:0 0 256px;min-width:256px;min-height:0;display:flex;overflow:hidden}.folder-pane-content-column{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.folder-pane-content-column>folder-pane-content{box-sizing:border-box;padding:1rem}.folder-pane-content-column>folder-pane-content:has(>solid-ui-file-explorer-provider){padding:0}.folder-pane-full-view{flex-direction:column;flex:auto;width:100%;height:100%;min-height:0;display:flex;overflow:auto}.folder-pane-access-denied-message{box-sizing:border-box;text-align:center;flex:auto;justify-content:center;align-items:center;width:100%;min-width:0;max-width:100%;height:100%;min-height:0;padding:32px;display:flex;overflow:hidden}.folder-pane-access-denied-message-body{box-sizing:border-box;overflow-wrap:anywhere;width:100%;min-width:0;max-width:384px}.folder-pane-resource-error{box-sizing:border-box;background:0 0;border:0;flex:auto;justify-content:center;align-items:center;width:100%;min-width:0;min-height:0;padding:16px;display:flex}.folder-pane-resource-error>solid-ui-error-state{width:min(100%,640px);display:block}solid-ui-file-explorer-provider{flex-direction:column;gap:0;width:100%;min-width:0;height:100%;min-height:0;display:flex;overflow:hidden}solid-ui-file-explorer-provider>solid-ui-file-explorer-header{z-index:2;background:var(--solid-ui-color-white,#fff);width:100%;display:block;position:sticky;top:0}solid-ui-file-explorer-provider>.paneDiv,solid-ui-file-explorer-provider>.exceptionPane{box-sizing:border-box;flex:auto;width:100%;min-width:0;max-width:100%;min-height:0;margin:0;display:block;overflow:hidden auto}.folder-pane-predicate-cell{width:0;min-width:0;max-width:0;overflow:hidden;border:0!important;margin:0!important;padding:0!important}.folder-pane-status{border-bottom:1px solid var(--color-border,#ddd);text-align:left;flex-direction:column;gap:8px;padding:8px 12px;display:flex}.folder-pane-status[data-status=progress]{accent-color:auto;text-align:center;outline:0;flex:auto;justify-content:center;align-items:center;box-shadow:none!important;background:0 0!important;border:0!important}.folder-pane-status:empty{display:none}.folder-pane-status-message{align-items:center;gap:12px;padding-right:40px;display:flex;position:relative}.folder-pane-status-message>solid-ui-button{position:absolute;top:-6px;right:-4px}.folder-pane-status-message[data-status=error]{color:var(--color-error,#b00020)}.folder-pane-status-text{flex:auto}.folder-pane-status[data-status=progress] .folder-pane-status-message{width:100%;min-height:8rem;color:var(--solid-ui-color-gray-500,#6a7282);font-size:var(--solid-ui-font-size-sm,.875rem);outline:0;flex:auto;justify-content:center;align-items:center;box-shadow:none!important;background:0 0!important;border:0!important}.folder-pane-status[data-status=progress] .folder-pane-status-text{flex:0 auto}.folder-pane-drop-target{width:var(--icon-base,2em);min-width:var(--icon-base,2em);max-width:var(--icon-base,2em);height:var(--icon-base,2em);min-height:var(--icon-base,2em);max-height:var(--icon-base,2em);box-sizing:content-box;flex:0 0 var(--icon-base,2em);display:inline-block;margin:0!important;padding:0!important}.folder-pane-explicit-drop-icon{width:var(--icon-base,2em);height:var(--icon-base,2em)}@media (width<=700px){.folder-pane{margin-top:var(--spacing-2xs,.25em);margin-bottom:var(--spacing-2xs,.25em);border-top:1px solid #777;border-bottom:1px solid #777}.folder-pane-explicit-drop-icon{width:var(--icon-sm,1.5em);height:var(--icon-sm,1.5em)}}
2
+ :root{--icon-base:2em}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { isJavaScriptFile as e } from "./helpers.esm.js";
3
+ import "./components/folder-pane-view/index.esm.js";
3
4
 
4
- import { authn as e } from "solid-logic";
5
- import * as t from "solid-ui";
6
- //#region src/folderPane.ts
7
- var n = {
8
- icon: t.icons.iconBase + "noun_973694_expanded.svg",
5
+
6
+ import { icons as t, ns as n } from "solid-ui";
7
+ // src/folderPane.ts
8
+ var r = {
9
+ icon: t.iconBase + "noun_973694_expanded.svg",
9
10
  name: "folder",
10
11
  mintNew: function(e, t) {
11
- let n = e.session.store, r = t.newInstance || n.sym(t.newBase), i = r.uri;
12
- return i.endsWith("/") && (i = i.slice(0, -1)), t.newInstance = n.sym(i + "/"), n.fetcher.webOperation("PUT", r.uri).then(function() {
13
- return console.log("New container created: " + r.uri), t;
12
+ let n = e.session.store, r = (t.newInstance || n.sym(t.newBase)).uri;
13
+ r.endsWith("/") && (r = r.slice(0, -1));
14
+ let i = n.sym(r + "/");
15
+ return t.newInstance = i, n.fetcher.webOperation("PUT", i.uri).then(function() {
16
+ return t;
14
17
  });
15
18
  },
16
- label: function(e, n) {
17
- let r = n.session.store, i = r.each(e, t.ns.ldp("contains")).length;
18
- return i > 0 ? "Contents (" + i + ")" : r.holds(e, t.ns.rdf("type"), t.ns.ldp("Container")) ? "Container (0)" : null;
19
+ label: function(t, r) {
20
+ if (e(t)) return null;
21
+ let i = r.session.store, a = i.each(t, n.ldp("contains")).length;
22
+ return a > 0 ? "Contents (" + a + ")" : i.holds(t, n.rdf("type"), n.ldp("Container")) ? "Container (0)" : null;
19
23
  },
20
- render: function(n, r) {
21
- function i(e) {
22
- let t = e.uri.slice(e.dir().uri.length);
23
- return !(t.startsWith(".") || t.endsWith(".acl") || t.endsWith("~"));
24
- }
25
- function a() {
26
- let e = c.each(n, t.ns.ldp("contains")).filter(i);
27
- e = e.map((e) => [t.utils.label(e).toLowerCase(), e]), e.sort(), e = e.map((e) => e[1]), t.utils.syncTableToArray(l, e, function(e) {
28
- let r = c.statementsMatching(n, t.ns.ldp("contains"), e)[0], i = s.VIEWAS_boring_default, a = s.propertyTR(o, r, !1), l = a.firstChild;
29
- return l.textContent = "", l.classList.add("folderPanePredicateCell"), a.appendChild(s.outlineObjectTD(e, i, void 0, r)), a;
30
- });
31
- }
32
- let o = r.dom, s = r.getOutliner(o), c = r.session.store, l, u = o.createElement("div");
33
- u.classList.add("instancePane", "folderPaneInstancePane");
34
- let d = n.uri.endsWith("/") ? n.uri : n.uri + "/", f = c.sym(d + "index.ttl#this");
35
- if (c.holds(n, t.ns.ldp("contains"), f.doc())) {
36
- console.log("View of folder will be view of indexThing. Loading " + f);
37
- let e = u.appendChild(o.createElement("div"));
38
- return e.classList.add("folderPanePackageDiv"), c.fetcher.load(f.doc()).then(function() {
39
- l = e.appendChild(o.createElement("table")), l.classList.add("folderPaneMainTable"), r.getOutliner(o).GotoSubject(f, !0, void 0, !1, void 0, l);
40
- }), u;
41
- }
42
- l = u.appendChild(o.createElement("table")), l.classList.add("folderPaneMainTable"), l.refresh = a, a(), c.updater.addDownstreamChangeListener(n, a);
43
- let p = u.appendChild(o.createElement("div"));
44
- p.classList.add("folderPaneCreationDiv");
45
- let m = e.currentUser();
46
- if (!m) return u;
47
- let h = {
48
- folder: n,
49
- div: p,
50
- dom: o,
51
- statusArea: p,
52
- me: m
53
- };
54
- return h.refreshTarget = l, t.login.filterAvailablePanes(r.session.paneRegistry.list).then(function(e) {
55
- t.create.newThingUI(h, r, e), t.aclControl.preventBrowserDropEvents(o);
56
- let n;
57
- n = p.firstChild, n instanceof HTMLElement && n.classList.add("folderPaneDropTarget"), p.classList.add("folderPaneDropZone"), t.widgets.makeDropTarget(p, null, g);
58
- }), u;
59
- function g(e) {
60
- t.widgets.uploadFiles(c.fetcher, e, n.uri, n.uri, function(e, r) {
61
- let i = c.sym(r);
62
- console.log(" Upload: put OK: " + i), c.add(n, t.ns.ldp("contains"), i, n.doc()), l.refresh();
63
- });
64
- }
24
+ render: function(e, t, n) {
25
+ let r = t.dom, i = r.createElement("div");
26
+ i.classList.add("instancePane", "folder-pane");
27
+ let a = i.appendChild(r.createElement("folder-pane-view")), o = n && typeof n == "object" ? n : {};
28
+ return a.browserContext = t, a.subject = e, a.fullView = o.fullView === !0 || o.solo === !0, i;
65
29
  }
66
30
  };
67
- //#endregion
68
- export { n as default };
31
+ export { r as default };
69
32
 
70
33
  //# sourceMappingURL=folderPane.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"folderPane.esm.js","names":[],"sources":["../src/folderPane.ts"],"sourcesContent":["/* Folder pane\n **\n ** This outline pane lists the members of a folder\n */\n\nimport { authn } from 'solid-logic'\nimport * as UI from 'solid-ui'\nimport './styles/folderPane.css'\nimport './styles/utilities.css'\n\nexport default {\n icon: UI.icons.iconBase + 'noun_973694_expanded.svg',\n name: 'folder',\n\n // Create a new folder in a Solid system,\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n const newInstance =\n newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase)\n let u = newInstance.uri\n if (u.endsWith('/')) {\n u = u.slice(0, -1) // chop off trailer\n } // { throw new Error('URI of new folder must end in \"/\" :' + u) }\n newPaneOptions.newInstance = kb.sym(u + '/')\n\n return kb.fetcher\n .webOperation('PUT', newInstance.uri)\n .then(function () {\n console.log('New container created: ' + newInstance.uri)\n return newPaneOptions\n })\n },\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(subject, UI.ns.ldp('contains')).length\n if (n > 0) {\n return 'Contents (' + n + ')' // Show how many in hover text\n }\n if (kb.holds(subject, UI.ns.rdf('type'), UI.ns.ldp('Container'))) {\n // It is declared as being a container\n return 'Container (0)'\n }\n return null // Suppress pane otherwise\n },\n\n // Render a file folder in a LDP/solid system\n render: function (subject, context) {\n function noHiddenFiles (obj) {\n // @@ This hiddenness should actually be server defined\n const pathEnd = obj.uri.slice(obj.dir().uri.length)\n return !(\n pathEnd.startsWith('.') ||\n pathEnd.endsWith('.acl') ||\n pathEnd.endsWith('~')\n )\n }\n\n function refresh () {\n let objs = kb.each(subject, UI.ns.ldp('contains')).filter(noHiddenFiles)\n objs = objs.map(obj => [UI.utils.label(obj).toLowerCase(), obj])\n objs.sort() // Sort by label case-insensitive\n objs = objs.map(pair => pair[1])\n UI.utils.syncTableToArray(mainTable, objs, function (obj) {\n const st = kb.statementsMatching(subject, UI.ns.ldp('contains'), obj)[0]\n const defaultpropview = outliner.VIEWAS_boring_default\n const tr = outliner.propertyTR(dom, st, false)\n const predicateCell = tr.firstChild as HTMLElement\n predicateCell.textContent = '' // Was initialized to 'Contains'\n predicateCell.classList.add('folderPanePredicateCell')\n tr.appendChild(\n outliner.outlineObjectTD(obj, defaultpropview, undefined, st)\n )\n // UI.widgets.makeDraggable(tr, obj)\n return tr\n })\n }\n\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n let mainTable // This is a live synced table\n const div = dom.createElement('div')\n div.classList.add('instancePane', 'folderPaneInstancePane')\n \n const thisDir = subject.uri.endsWith('/') ? subject.uri : subject.uri + '/'\n const indexThing = kb.sym(thisDir + 'index.ttl#this')\n if (kb.holds(subject, UI.ns.ldp('contains'), indexThing.doc())) {\n console.log(\n 'View of folder will be view of indexThing. Loading ' + indexThing\n )\n const packageDiv = div.appendChild(dom.createElement('div'))\n packageDiv.classList.add('folderPanePackageDiv')\n kb.fetcher.load(indexThing.doc()).then(function () {\n mainTable = packageDiv.appendChild(dom.createElement('table'))\n mainTable.classList.add('folderPaneMainTable')\n context\n .getOutliner(dom)\n .GotoSubject(indexThing, true, undefined, false, undefined, mainTable)\n })\n return div\n } else {\n mainTable = div.appendChild(dom.createElement('table'))\n mainTable.classList.add('folderPaneMainTable')\n mainTable.refresh = refresh\n refresh()\n // addDownstreamChangeListener is a high level function which when someone else changes the resource,\n // reloads it into the kb, then must call addDownstreamChangeListener to be able to update the folder pane.\n kb.updater.addDownstreamChangeListener(subject, refresh) // Update store and call me if folder changes\n }\n\n // Allow user to create new things within the folder\n const creationDiv = div.appendChild(dom.createElement('div'))\n creationDiv.classList.add('folderPaneCreationDiv')\n const me = authn.currentUser() // @@ respond to login events\n if (!me) {\n return div // Cannot create new things without being logged in\n }\n const creationContext: UI.createTypes.CreateContext = {\n folder: subject,\n div: creationDiv,\n dom: dom,\n statusArea: creationDiv,\n me: me\n }\n creationContext.refreshTarget = mainTable\n UI.login\n .filterAvailablePanes(context.session.paneRegistry.list)\n .then(function (relevantPanes) {\n UI.create.newThingUI(creationContext, context, relevantPanes) // Have to pass panes down newUI\n\n UI.aclControl.preventBrowserDropEvents(dom)\n\n const explicitDropIcon = false\n let target\n if (explicitDropIcon) {\n target = creationDiv.insertBefore(\n dom.createElement('img'),\n creationDiv.firstChild\n )\n target.classList.add('folderPaneExplicitDropIcon')\n target.setAttribute('src', UI.icons.iconBase + 'noun_748003.svg')\n } else {\n target = creationDiv.firstChild // Overload drop target semantics onto the plus sign\n }\n\n if (target instanceof HTMLElement) {\n target.classList.add('folderPaneDropTarget')\n }\n\n creationDiv.classList.add('folderPaneDropZone')\n\n // /////////// Allow new file to be Uploaded\n UI.widgets.makeDropTarget(creationDiv, null, droppedFileHandler)\n })\n\n return div\n\n function droppedFileHandler (files) {\n UI.widgets.uploadFiles(\n kb.fetcher,\n files,\n subject.uri,\n subject.uri,\n function (file, uri) {\n // A file has been uploaded\n const destination = kb.sym(uri)\n console.log(' Upload: put OK: ' + destination)\n kb.add(subject, UI.ns.ldp('contains'), destination, subject.doc())\n mainTable.refresh()\n }\n )\n }\n }\n}\n// ends\n"],"mappings":";;;;;AAUA,IAAA,IAAe;CACb,MAAM,EAAG,MAAM,WAAW;CAC1B,MAAM;CAGN,SAAS,SAAU,GAAS,GAAgB;EAC1C,IAAM,IAAK,EAAQ,QAAQ,OACrB,IACJ,EAAe,eAAe,EAAG,IAAI,EAAe,OAAO,GACzD,IAAI,EAAY;EAMpB,OALI,EAAE,SAAS,GAAG,MAChB,IAAI,EAAE,MAAM,GAAG,EAAE,IAEnB,EAAe,cAAc,EAAG,IAAI,IAAI,GAAG,GAEpC,EAAG,QACP,aAAa,OAAO,EAAY,GAAG,CAAC,CACpC,KAAK,WAAY;GAEhB,OADA,QAAQ,IAAI,4BAA4B,EAAY,GAAG,GAChD;EACT,CAAC;CACL;CAEA,OAAO,SAAU,GAAS,GAAS;EACjC,IAAM,IAAK,EAAQ,QAAQ,OACrB,IAAI,EAAG,KAAK,GAAS,EAAG,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC;EAQlD,OAPI,IAAI,IACC,eAAe,IAAI,MAExB,EAAG,MAAM,GAAS,EAAG,GAAG,IAAI,MAAM,GAAG,EAAG,GAAG,IAAI,WAAW,CAAC,IAEtD,kBAEF;CACT;CAGA,QAAQ,SAAU,GAAS,GAAS;EAClC,SAAS,EAAe,GAAK;GAE3B,IAAM,IAAU,EAAI,IAA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sB,CAAW,GAC7C,EAAG,IAAI,GAAS,EAAG,GAAG,IAAI,UAAU,GAAG,GAAa,EAAQ,IAAI,CAAC,GACjE,EAAU,QAAQ;GACpB,CACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"folderPane.esm.js","names":["folderPane_default","icons","kb","context","u","newPaneOptions","normalizedInstance","isJavaScriptFile","subject","n","ns","dom","div","folderPaneView","renderOptions","paneOptions"],"sources":["../src/folderPane.ts"],"sourcesContent":["/* Folder pane\n **\n ** This outline pane lists the members of a folder\n */\n\nimport './components/folder-pane-view'\nimport type FolderPaneView from './components/folder-pane-view/FolderPaneView'\nimport { icons, ns } from 'solid-ui'\nimport { isJavaScriptFile } from './helpers'\nimport './styles/folderPane.css'\nimport './styles/utilities.css'\n\nexport { getCreationNoun, getCreationPanes, getPaneLabel } from './helpers'\n\ntype FolderPaneRenderOptions = {\n fullView?: boolean\n solo?: boolean\n}\n\nexport default {\n icon: icons.iconBase + 'noun_973694_expanded.svg',\n name: 'folder',\n\n // Create a new folder in a Solid system,\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n const newInstance =\n newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase)\n let u = newInstance.uri\n if (u.endsWith('/')) {\n u = u.slice(0, -1) // chop off trailer\n } // { throw new Error('URI of new folder must end in \"/\" :' + u) }\n const normalizedInstance = kb.sym(u + '/')\n newPaneOptions.newInstance = normalizedInstance\n\n return kb.fetcher\n .webOperation('PUT', normalizedInstance.uri)\n .then(function () {\n return newPaneOptions\n })\n },\n\n label: function (subject, context) {\n if (isJavaScriptFile(subject)) return null\n const kb = context.session.store\n const n = kb.each(subject, ns.ldp('contains')).length\n if (n > 0) {\n return 'Contents (' + n + ')' // Show how many in hover text\n }\n if (kb.holds(subject, ns.rdf('type'), ns.ldp('Container'))) {\n // It is declared as being a container\n return 'Container (0)'\n }\n return null // Suppress pane otherwise\n },\n\n // Render a file folder in a LDP/solid system\n render: function (subject, context, paneOptions?: unknown) {\n\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('instancePane', 'folder-pane')\n const folderPaneView = div.appendChild(dom.createElement('folder-pane-view')) as FolderPaneView\n const renderOptions = paneOptions && typeof paneOptions === 'object'\n ? paneOptions as FolderPaneRenderOptions\n : {}\n folderPaneView.browserContext = context\n folderPaneView.subject = subject\n folderPaneView.fullView = renderOptions.fullView === true || renderOptions.solo === true\n\n // The pane registry is needed to open the internal pane on Alt-click.\n // addDownstreamChangeListener is a high level function which when someone else changes the resource,\n // reloads it into the kb, then must call addDownstreamChangeListener to be able to update the folder pane.\n // SAM need to figure out how to add this line later kb.updater.addDownstreamChangeListener(subject, refresh) // Update store and call me if folder changes\n\n return div\n }\n}\n// ends\n"],"mappings":";;;;;;AAmBA,IAAAA,IAAe;CACb,MAAMC,EAAM,WAAW;CACvB,MAAM;CAGN,SAAS,SAAU,GAAS,GAAgB;EAC1C,IAAMC,IAAKC,EAAQ,QAAQ,OAGvBC,KADFC,EAAe,eAAeH,EAAG,IAAIG,EAAe,OAAO,EAAA,CACzC;EACpB,AAAID,EAAE,SAAS,GAAG,MAChB,IAAIA,EAAE,MAAM,GAAG,EAAE;EAEnB,IAAME,IAAqBJ,EAAG,IAAIE,IAAI,GAAG;EAGzC,OAFA,EAAe,cAAcE,GAEtBJ,EAAG,QACP,aAAa,OAAOI,EAAmB,GAAG,CAAC,CAC3C,KAAK,WAAY;GAChB,OAAOD;EACT,CAAC;CACL;CAEA,OAAO,SAAU,GAAS,GAAS;EACjC,IAAIE,EAAiBC,CAAO,GAAG,OAAO;EACtC,IAAMN,IAAKC,EAAQ,QAAQ,OACrBM,IAAIP,EAAG,KAAKM,GAASE,EAAG,IAAI,UAAU,CAAC,CAAC,CAAC;EAQ/C,OAPID,IAAI,IACC,eAAeA,IAAI,MAExBP,EAAG,MAAMM,GAASE,EAAG,IAAI,MAAM,GAAGA,EAAG,IAAI,WAAW,CAAC,IAEhD,kBAEF;CACT;CAGA,QAAQ,SAAU,GAAS,GAAS,GAAuB;EAEzD,IAAMC,IAAMR,EAAQ,KACdS,IAAMD,EAAI,cAAc,KAAK;EACnC,EAAI,UAAU,IAAI,gBAAgB,aAAa;EAC/C,IAAME,IAAiBD,EAAI,YAAYD,EAAI,cAAc,kBAAkB,CAAC,GACtEG,IAAgBC,KAAe,OAAOA,KAAgB,WACxDA,IACA,CAAC;EAUL,OATA,EAAe,iBAAiBZ,GAChC,EAAe,UAAUK,GACzB,EAAe,WAAWM,EAAc,aAAa,MAAQA,EAAc,SAAS,IAO7EF;CACT;AACF"}
@@ -0,0 +1,2 @@
1
+ let e=require("solid-ui");function t(e){return/\.[cm]?js$/i.test(new URL(e.uri).pathname)}function n(e){return e.isPublicKnown===!1?`unknown`:e.isPublic?`public`:`private`}function r(e){return e?.toLowerCase()===`source`?`file`:e||`item`}function i(t){if(t.mintClass)return e.utils.label(t.mintClass);let n=r(t.name);return n.charAt(0).toUpperCase()+n.slice(1)}function a(e){return`${e} ${e===1?`item`:`items`}`}function o(e){return e.filter(e=>!!e.mintNew&&e.name?.toLowerCase()!==`chat`)}function s(e=`Container`){let t=e.charAt(0).toUpperCase()+e.slice(1);return{title:`New ${t}`,placeholder:`Enter ${t} name`}}function c(e,n){return e.uri.endsWith(`/`)||!t(e)&&n.isContainer(e)}function l(e){let t=typeof e==`object`&&e?e:void 0;return t?.status===401||t?.status===403||t?.response?.status===401||t?.response?.status===403}function u(e){let t=/^(.*\/)index\.ttl#this$/.exec(e.uri);return t?t[1]:null}function d(e,t){return t?.toLowerCase()===`schedule`?`${e.uri}details.ttl#event`:`${e.uri}index.ttl#this`}function f(t,n){if(!n)return new Map;let r=n.getContainerMembers(t).filter(e=>!n.isHiddenFile(e)).filter((e,t,n)=>n.findIndex(t=>t.sameTerm(e))===t).filter(e=>{let n=t.uri.endsWith(`/`)?t.uri:`${t.uri}/`;return e.uri!==`${n}index.ttl#this`}).map(t=>[e.utils.label(t).toLowerCase(),t]);return r.sort(),new Map(r.map(([,e])=>[e.value,{id:e.value,subject:e,parentId:t.value,isContainer:c(e,n)}]))}exports.getContainerMemberCountLabel=a,exports.getCreationDialogText=s,exports.getCreationNoun=r,exports.getCreationPanes=o,exports.getIndexedApplicationSubject=d,exports.getIndexedContainer=u,exports.getPaneLabel=i,exports.getResourceAccessState=n,exports.getResourcesForContainer=f,exports.isAccessDeniedError=l,exports.isContainerResource=c,exports.isJavaScriptFile=t;
2
+ //# sourceMappingURL=helpers.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.cjs.js","names":["utils","solid_ui","isJavaScriptFile","resource","getResourceAccessState","access","getCreationNoun","paneName","getPaneLabel","pane","noun","getContainerMemberCountLabel","memberCount","getCreationPanes","panes","getCreationDialogText","displayLabel","paneLabel","isContainerResource","resourceLogic","isAccessDeniedError","response","error","getIndexedContainer","match","getIndexedApplicationSubject","container","getResourcesForContainer","labeledResources","allContainedResources","other","containedResource","index","containerUri"],"sources":["../src/helpers.ts"],"sourcesContent":["import type { NamedNode } from 'rdflib'\nimport { utils } from 'solid-ui'\nimport type { ResourceLogic } from 'solid-logic'\nimport type { PaneDefinition } from 'pane-registry'\nimport type { ResourceMap } from './types'\n\nexport type FolderPaneResourceLogic = Pick<\n ResourceLogic,\n 'getContainerMembers' | 'isHiddenFile' | 'isContainer' | 'containerHasIndexDocument' | 'getContainerIndexThing'\n>\n\nfunction isJavaScriptFile (resource: NamedNode): boolean {\n return /\\.[cm]?js$/i.test(new URL(resource.uri).pathname)\n}\n\ntype ResourceAccessMetadata = { isPublic?: boolean, isPublicKnown?: boolean }\n\nfunction getResourceAccessState (access: ResourceAccessMetadata): 'public' | 'private' | 'unknown' {\n if (access.isPublicKnown === false) return 'unknown'\n return access.isPublic ? 'public' : 'private'\n}\n\nfunction getCreationNoun (paneName?: string): string {\n if (paneName?.toLowerCase() === 'source') return 'file'\n return paneName || 'item'\n}\n\nfunction getPaneLabel (pane: Pick<PaneDefinition, 'name' | 'mintClass'>): string {\n if (pane.mintClass) return utils.label(pane.mintClass)\n const noun = getCreationNoun(pane.name)\n return noun.charAt(0).toUpperCase() + noun.slice(1)\n}\n\nfunction getContainerMemberCountLabel (memberCount: number): string {\n return `${memberCount} ${memberCount === 1 ? 'item' : 'items'}`\n}\n\nfunction getCreationPanes (panes: PaneDefinition[]): PaneDefinition[] {\n // Keep pane-registry order: it is also the pane priority order.\n return panes.filter(pane => !!pane.mintNew && pane.name?.toLowerCase() !== 'chat')\n}\n\nfunction getCreationDialogText (paneLabel = 'Container'): { title: string, placeholder: string } {\n const displayLabel = paneLabel.charAt(0).toUpperCase() + paneLabel.slice(1)\n return {\n title: `New ${displayLabel}`,\n placeholder: `Enter ${displayLabel} name`\n }\n}\n\nfunction isContainerResource (resource: NamedNode, resourceLogic: FolderPaneResourceLogic): boolean {\n return resource.uri.endsWith('/') || (!isJavaScriptFile(resource) && resourceLogic.isContainer(resource))\n}\n\nfunction isAccessDeniedError (error: unknown): boolean {\n const response = typeof error === 'object' && error !== null\n ? error as { status?: number, response?: { status?: number } }\n : undefined\n return response?.status === 401 || response?.status === 403 ||\n response?.response?.status === 401 || response?.response?.status === 403\n}\n\n/**\n * A pane's `index.ttl#this` stands for its container: return that container so\n * routing can render the pane without the file-explorer header.\n */\nfunction getIndexedContainer (resource: NamedNode): string | null {\n const match = /^(.*\\/)index\\.ttl#this$/.exec(resource.uri)\n return match ? match[1] : null\n}\n\nfunction getIndexedApplicationSubject (container: NamedNode, paneName?: string): string {\n return paneName?.toLowerCase() === 'schedule'\n ? `${container.uri}details.ttl#event`\n : `${container.uri}index.ttl#this`\n}\n\nfunction getResourcesForContainer (container: NamedNode, resourceLogic: FolderPaneResourceLogic | null): ResourceMap {\n if (!resourceLogic) return new Map()\n\n const containedResources = resourceLogic.getContainerMembers(container).filter(\n (resource) => !resourceLogic.isHiddenFile(resource)\n ).filter((containedResource, index, allContainedResources) => {\n return allContainedResources.findIndex(other => other.sameTerm(containedResource)) === index\n }).filter((resource) => {\n const containerUri = container.uri.endsWith('/') ? container.uri : `${container.uri}/`\n return resource.uri !== `${containerUri}index.ttl#this`\n })\n const labeledResources: Array<[string, NamedNode]> = containedResources.map(containedResource => [\n utils.label(containedResource).toLowerCase(),\n containedResource\n ])\n labeledResources.sort()\n\n return new Map(labeledResources.map(([, resource]) => [resource.value, {\n id: resource.value,\n subject: resource,\n parentId: container.value,\n isContainer: isContainerResource(resource, resourceLogic)\n }]))\n}\n\nexport {\n getCreationNoun,\n getCreationPanes,\n getCreationDialogText,\n getContainerMemberCountLabel,\n getIndexedApplicationSubject,\n getIndexedContainer,\n getPaneLabel,\n getResourceAccessState,\n getResourcesForContainer,\n isAccessDeniedError,\n isContainerResource,\n isJavaScriptFile\n}\n"],"mappings":"A,0BAWA,SAASE,EAAkB,EAA8B,CACvD,MAAO,cAAc,KAAK,IAAI,IAAIC,EAAS,GAAG,CAAC,CAAC,QAAQ,CAC1D,CAIA,SAASC,EAAwB,EAAkE,CAEjG,OADIC,EAAO,gBAAkB,GAAc,UACpCA,EAAO,SAAW,SAAW,SACtC,CAEA,SAASC,EAAiB,EAA2B,CAEnD,OADIC,GAAU,YAAY,IAAM,SAAiB,OAC1CA,GAAY,MACrB,CAEA,SAASC,EAAc,EAA0D,CAC/E,GAAIC,EAAK,UAAW,OAAOT,EAAAA,MAAM,MAAMS,EAAK,SAAS,EACrD,IAAMC,EAAOJ,EAAgBG,EAAK,IAAI,EACtC,OAAOC,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,EAAIA,EAAK,MAAM,CAAC,CACpD,CAEA,SAASC,EAA8B,EAA6B,CAClE,MAAO,GAAGC,EAAY,GAAGA,IAAgB,EAAI,OAAS,SACxD,CAEA,SAASC,EAAkB,EAA2C,CAEpE,OAAOC,EAAM,OAAO,GAAQ,CAAC,CAACL,EAAK,SAAWA,EAAK,MAAM,YAAY,IAAM,MAAM,CACnF,CAEA,SAASM,EAAuB,EAAY,YAAqD,CAC/F,IAAMC,EAAeC,EAAU,OAAO,CAAC,CAAC,CAAC,YAAY,EAA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,EAAiB,KAAK,EAAGzB,KAAc,CAACA,EAAS,MAAO,CACrE,GAAIA,EAAS,MACb,QAASA,EACT,SAAUuB,EAAU,MACpB,YAAaR,EAAoBf,EAAUgB,CAAa,CAC1D,CAAC,CAAC,CAAC,CACL,C"}
@@ -0,0 +1,30 @@
1
+ import { NamedNode } from 'rdflib';
2
+ import { ResourceLogic } from 'solid-logic';
3
+ import { PaneDefinition } from 'pane-registry';
4
+ import { ResourceMap } from './types';
5
+ export type FolderPaneResourceLogic = Pick<ResourceLogic, 'getContainerMembers' | 'isHiddenFile' | 'isContainer' | 'containerHasIndexDocument' | 'getContainerIndexThing'>;
6
+ declare function isJavaScriptFile(resource: NamedNode): boolean;
7
+ type ResourceAccessMetadata = {
8
+ isPublic?: boolean;
9
+ isPublicKnown?: boolean;
10
+ };
11
+ declare function getResourceAccessState(access: ResourceAccessMetadata): 'public' | 'private' | 'unknown';
12
+ declare function getCreationNoun(paneName?: string): string;
13
+ declare function getPaneLabel(pane: Pick<PaneDefinition, 'name' | 'mintClass'>): string;
14
+ declare function getContainerMemberCountLabel(memberCount: number): string;
15
+ declare function getCreationPanes(panes: PaneDefinition[]): PaneDefinition[];
16
+ declare function getCreationDialogText(paneLabel?: string): {
17
+ title: string;
18
+ placeholder: string;
19
+ };
20
+ declare function isContainerResource(resource: NamedNode, resourceLogic: FolderPaneResourceLogic): boolean;
21
+ declare function isAccessDeniedError(error: unknown): boolean;
22
+ /**
23
+ * A pane's `index.ttl#this` stands for its container: return that container so
24
+ * routing can render the pane without the file-explorer header.
25
+ */
26
+ declare function getIndexedContainer(resource: NamedNode): string | null;
27
+ declare function getIndexedApplicationSubject(container: NamedNode, paneName?: string): string;
28
+ declare function getResourcesForContainer(container: NamedNode, resourceLogic: FolderPaneResourceLogic | null): ResourceMap;
29
+ export { getCreationNoun, getCreationPanes, getCreationDialogText, getContainerMemberCountLabel, getIndexedApplicationSubject, getIndexedContainer, getPaneLabel, getResourceAccessState, getResourcesForContainer, isAccessDeniedError, isContainerResource, isJavaScriptFile };
30
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,aAAa,EACb,qBAAqB,GAAG,cAAc,GAAG,aAAa,GAAG,2BAA2B,GAAG,wBAAwB,CAChH,CAAA;AAED,iBAAS,gBAAgB,CAAE,QAAQ,EAAE,SAAS,GAAG,OAAO,CAEvD;AAED,KAAK,sBAAsB,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE7E,iBAAS,sBAAsB,CAAE,MAAM,EAAE,sBAAsB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAGjG;AAED,iBAAS,eAAe,CAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED,iBAAS,YAAY,CAAE,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG,MAAM,CAI/E;AAED,iBAAS,4BAA4B,CAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,iBAAS,gBAAgB,CAAE,KAAK,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAGpE;AAED,iBAAS,qBAAqB,CAAE,SAAS,SAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAM/F;AAED,iBAAS,mBAAmB,CAAE,QAAQ,EAAE,S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