folder-pane 4.0.1-1 → 4.0.1-2
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.
- package/dist/_virtual/~icons/lucide/chevron-left.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/chevron-left.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/{trash-2.esm.js → chevron-left.esm.js} +4 -4
- package/dist/_virtual/~icons/lucide/chevron-left.esm.js.map +1 -0
- package/dist/accessCache.cjs.js +2 -0
- package/dist/accessCache.cjs.js.map +1 -0
- package/dist/accessCache.d.ts +37 -0
- package/dist/accessCache.d.ts.map +1 -0
- package/dist/accessCache.esm.js +34 -0
- package/dist/accessCache.esm.js.map +1 -0
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +38 -35
- package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +19 -5
- package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +271 -197
- package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js.map +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js +1 -1
- package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js.map +1 -1
- package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js +1 -1
- package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js.map +1 -1
- package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js +1 -1
- package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js.map +1 -1
- package/dist/components/folder-pane-provider/FolderPaneProvider.cjs.js +2 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.cjs.js.map +1 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.d.ts +16 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.d.ts.map +1 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.esm.js +293 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.esm.js.map +1 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.styles.cjs.js +2 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.styles.cjs.js.map +1 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.styles.esm.js +6 -0
- package/dist/components/folder-pane-provider/FolderPaneProvider.styles.esm.js.map +1 -0
- package/dist/components/folder-pane-provider/index.cjs.js +1 -0
- package/dist/components/folder-pane-provider/index.d.ts +2 -0
- package/dist/components/folder-pane-provider/index.d.ts.map +1 -0
- package/dist/components/folder-pane-provider/index.esm.js +1 -0
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js +18 -19
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js.map +1 -1
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts +15 -2
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts.map +1 -1
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js +237 -108
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js.map +1 -1
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js +1 -1
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js.map +1 -1
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js +1 -1
- package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js.map +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js +32 -18
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js.map +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts +13 -2
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts.map +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js +191 -84
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js.map +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js.map +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js +1 -1
- package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js.map +1 -1
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js +90 -29
- package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -1
- package/dist/components/folder-pane-view/FolderPaneView.d.ts +35 -5
- package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -1
- package/dist/components/folder-pane-view/FolderPaneView.esm.js +495 -234
- package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -1
- package/dist/components/folder-pane-view/resourceLoad.cjs.js +2 -0
- package/dist/components/folder-pane-view/resourceLoad.cjs.js.map +1 -0
- package/dist/components/folder-pane-view/resourceLoad.d.ts +8 -0
- package/dist/components/folder-pane-view/resourceLoad.d.ts.map +1 -0
- package/dist/components/folder-pane-view/resourceLoad.esm.js +7 -0
- package/dist/components/folder-pane-view/resourceLoad.esm.js.map +1 -0
- package/dist/debug.cjs.js +2 -0
- package/dist/debug.cjs.js.map +1 -0
- package/dist/debug.d.ts +5 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/debug.esm.js +10 -0
- package/dist/debug.esm.js.map +1 -0
- package/dist/folderPane.cjs.js +2 -2
- package/dist/folderPane.cjs.js.map +1 -1
- package/dist/folderPane.d.ts +2 -2
- package/dist/folderPane.d.ts.map +1 -1
- package/dist/folderPane.esm.js +20 -19
- package/dist/folderPane.esm.js.map +1 -1
- package/dist/helpers.cjs.js +1 -1
- package/dist/helpers.cjs.js.map +1 -1
- package/dist/helpers.d.ts +12 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.esm.js +34 -14
- package/dist/helpers.esm.js.map +1 -1
- package/dist/primitives/context.cjs.js +2 -0
- package/dist/primitives/context.cjs.js.map +1 -0
- package/dist/primitives/context.d.ts +14 -0
- package/dist/primitives/context.d.ts.map +1 -0
- package/dist/primitives/context.esm.js +6 -0
- package/dist/primitives/context.esm.js.map +1 -0
- package/dist/requestQueue.cjs.js +1 -1
- package/dist/requestQueue.cjs.js.map +1 -1
- package/dist/requestQueue.d.ts +10 -2
- package/dist/requestQueue.d.ts.map +1 -1
- package/dist/requestQueue.esm.js +32 -22
- package/dist/requestQueue.esm.js.map +1 -1
- package/dist/resourceActionItems.cjs.js +2 -0
- package/dist/resourceActionItems.cjs.js.map +1 -0
- package/dist/resourceActionItems.d.ts +20 -0
- package/dist/resourceActionItems.d.ts.map +1 -0
- package/dist/resourceActionItems.esm.js +42 -0
- package/dist/resourceActionItems.esm.js.map +1 -0
- package/package.json +12 -8
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
|
@@ -1 +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","_L","_ref","_browserContextDecs","attribute","_subjectDecs","_fullViewDecs","type","Boolean","_hideStorageHeaderDecs","_selectedResourceDecs","_containerViewDecs","_searchQueryDecs","_contentErrorDecs","_contentViewDecs","_fullViewTargetDecs","_sidebarDecs","_statusAreaDecs","FolderPaneView","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_browserContext","undefined","_init_subject","_init_fullView","_init_hideStorageHeader","_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","hideStorageHeader","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","renderStorageHeader","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","_hideStorageHeaderDecs","_init_hideStorageHeader","_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","_L","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 /** Leaves out the storage header, keeping the sidebar and content. */\n @property({ type: Boolean, attribute: 'hide-storage-header' })\n accessor hideStorageHeader = 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 ${this.hideStorageHeader ? nothing : this.renderStorageHeader()}\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 renderStorageHeader () {\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 `\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,IAAAJ,QAAA,GAAAK,kBAAA,IAAAL,QAAA,GAAAM,kBAAA,IAAAN,QAAA,GAAAO,kBAAA,IAAAP,QAAA,GAAAQ,kBAAA,IAAAR,QAAA,GAAAS,kBAAA,IAAAT,QAAA,GAAAU,kBAAA,IAAAV,QAAA,GAAAW,kBAAA,IAAAX,QAAA;AAAAY,KAAAC,KAE/BjC,EAAS,EAAEkC,WAAW,GAAM,CAAC,GAACC,KAO9BnC,EAAS,EAAEkC,WAAW,GAAM,CAAC,GAACE,KAO9BpC,EAAS;CAAEqC,MAAMC;CAASJ,WAAW;AAAY,CAAC,GAACK,KAInDvC,EAAS;CAAEqC,MAAMC;CAASJ,WAAW;AAAsB,CAAC,GAACM,KAG7DtC,EAAM,GAACuC,KAGPvC,EAAM,GAACwC,KAGPxC,EAAM,GAACyC,IAGPzC,EAAM,GAAC0C,IASP3C,EAAM,qBAAqB,GAAC4C,KAG5B5C,EAAM,wBAAwB,GAAC6C,KAG/B7C,E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AC;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;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAA9B,IAAA,GAAA,KAAA,GApvB2CvB,CAAY,GAAAuR,GAAA"}
|
|
1
|
+
{"version":3,"file":"FolderPaneView.esm.js","names":["aclControl","composeExplorer","customElement","FILE_EXPLORER_BACK_EVENT","FILE_EXPLORER_OPEN_PANE_EVENT","getPreferredPane","getRelevantPanes","isExplorerEvent","log","ns","preparePaneMenuItems","showDialog","WebComponent","widgets","authn","authSession","resourceAccessCache","html","nothing","property","query","state","getIndexedApplicationSubject","getIndexedContainer","isAccessDeniedError","isContainerResource","isJavaScriptFile","invalidateRenderRequest","isCurrentRenderRequest","FolderPaneCreateDialog","getPaneLabel","isSafeCreationName","invalidCreationNameMessage","mintPaneInstance","PaneMintError","setMintStatus","debug","clearFailedResource","DEFAULT_SIDEBAR_WIDTH","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","MIN_CONTENT_WIDTH","SIDEBAR_RESIZE_STEP","NARROW_PANE_BREAKPOINT","clampSidebarWidth","requestedWidth","availableWidth","Number","isFinite","availableSidebarWidth","requested","Math","min","max","_classDecs","_FolderPaneView","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_Q","_ref","_browserContextDecs","attribute","_subjectDecs","_fullViewDecs","type","Boolean","_selectedResourceDecs","_standaloneBreadcrumbRootDecs","_containerViewDecs","_searchQueryDecs","_sidebarCollapsedDecs","_sidebarWidthDecs","_sidebarMaximumWidthDecs","_contentErrorDecs","_showingContainerDecs","_canCreateDecs","_contentViewDecs","_fullViewTargetDecs","_sidebarDecs","_statusAreaDecs","FolderPaneView","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_browserContext","undefined","_init_subject","_init_fullView","_init_selectedResource","_init_standaloneBreadcrumbRoot","_init_containerView","_init_searchQuery","_init_sidebarCollapsed","_init_sidebarWidth","_init_sidebarMaximumWidth","_init_contentError","_init_showingContainer","_init_canCreate","_defineProperty","_init_contentView","_init_fullViewTarget","_init_sidebar","_init_statusArea","clear","refreshCreationPermission","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","Error","message","String","store","input","createElement","multiple","addEventListener","files","Array","from","validFiles","filter","file","invalidFiles","forEach","length","uploadGeneration","uploadContext","remaining","refreshes","finish","dataset","status","replaceChildren","uploadFiles","fetcher","uri","_file","then","canNavigateToUpload","containedResource","sym","finally","click","contentError","retry","clearContentError","selectedResource","subject","showResourceInContentView","showInitialContainer","resource","searchQuery","showSubject","session","paneRegistry","byName","render","home","standaloneBreadcrumbRoot","resourceTarget","querySelector","view","setContainerView","isConnected","sidebarMaximumWidth","sidebarAvailableWidth","resizeSidebar","sidebarWidth","sidebarCollapsed","sidebarDrag","button","isPrimary","preventDefault","separator","currentTarget","setPointerCapture","pointerId","focus","startX","clientX","startWidth","drag","finishSidebarResize","altKey","ctrlKey","metaKey","width","key","sidebar","resizer","renderRoot","focusWasInSidebar","matches","shadowRoot","activeElement","focusWasOnResizer","updateComplete","title","showContentError","_classPrivateFieldGet","v","_classPrivateFieldSet","resourceLogic","logic","displayedResource","fullView","containerView","showingContainer","canCreate","contentView","fullViewTarget","createRenderRoot","connectedCallback","shell","sidebarResizeObserver","observe","dropProtectionAttached","preventBrowserDropEvents","handleCreatePane","handleUpload","handleResourceOpenPane","authListenersAttached","events","on","handleAuthChange","disconnectedCallback","disconnect","initialLoadGeneration","removeEventListener","off","firstUpdated","updateSidebarBounds","ResizeObserver","entries","contentRect","responsiveLayoutInitialized","handleSidebarToggle","Event","updated","changedProperties","has","getStandaloneBreadcrumbRoot","get","renderContainerView","url","URL","pathSegments","pathname","split","origin","clearContent","renderAccessDeniedScreen","loadResource","retryFailed","load","force","clearPreviousData","openCreatedResource","currentPane","selected","root","parent","dir","rootUri","endsWith","startsWith","permissionRequest","containerUri","permissionGeneration","fetchMetadata","metadata","access","canEdit","catch","warn","navigationGeneration","navigationContext","reload","confirmed","members","each","ldp","doc","member","termType","getState","value","unload","refreshResources","addOptimisticResource","refresh","target","document","generation","renderExplorerInto","options","relevantPanes","excludedPaneNames","fallbackPaneName","isCurrent","selectedPane","renderExplorerError","paneElement","paneOptions","provider","menuItems","panes","openPane","paneSubject","dispatchEvent","CustomEvent","bubbles","composed","subjectUri","parentContainer","nextPane","request","folderView","solo","header","showHeader","paneIcon","icon","indexRequested","isCurrentSelection","candidate","containerHasIndexDocument","applicationSubject","sourcePane","useIndexedApplication","indexedContainerUri","indexedContainer","divider","clientWidth","getBoundingClientRect","hasPointerCapture","releasePointerCapture","renderStorageHeader","renderContentError","handleResourceSelected","handleFolderPaneResourceError","handleSidebarPointerDown","handleSidebarPointerMove","handleSidebarPointerEnd","handleSidebarResizeKey","list","handleSelectHome","handleSelectBreadcrumbResource","handleContainerViewChange","handleSearch","retryContent","_FolderPaneView2","e","c","_initClass","_applyDecs","default","FolderPaneCreateDialog","error","_FolderPaneCreateDial","_FolderPaneView2","_initProto","_initClass","_classDecs","_browserContextDecs","_init_browserContext","_subjectDecs","_init_subject","_fullViewDecs","_init_fullView","_selectedResourceDecs","_init_selectedResource","_standaloneBreadcrumbRootDecs","_init_standaloneBreadcrumbRoot","_containerViewDecs","_init_containerView","_searchQueryDecs","_init_searchQuery","_sidebarCollapsedDecs","_init_sidebarCollapsed","_sidebarWidthDecs","_init_sidebarWidth","_sidebarMaximumWidthDecs","_init_sidebarMaximumWidth","_contentErrorDecs","_init_contentError","_showingContainerDecs","_init_showingContainer","_canCreateDecs","_init_canCreate","_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","clampSidebarWidth","availableWidth","availableSidebarWidth","requestedWidth","customElement","_FolderPaneView","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_Q","property","state","query","WebComponent","args","resourceAccessCache","event","authn","pane","container","dom","statusArea","operationGeneration","paneName","getPaneLabel","name","resolve","isSafeCreationName","invalidCreationNameMessage","created","mintPaneInstance","stillOwnsNavigation","error$1","error","PaneMintError","setMintStatus","input","files","validFiles","file","uploadGeneration","uploadContext","remaining","refreshes","finish","canNavigateToUpload","uri","message","retry","selectedResource","subject","clearFailedResource","resource","home","view","separator","drag","width","sidebar","resizer","focusWasInSidebar","focusWasOnResizer","title","shell","aclControl","authSession","invalidateRenderRequest","entries","changedProperties","url","pathSegments","clearContent","store","fetcher","retryFailed","isAccessDeniedError","currentPane","selected","isContainerResource","root","parent","rootUri","resourceLogic","force","permissionGeneration","metadata","warn","navigationGeneration","navigationContext","reload","log","confirmed","containedResource","members","ns","member","containerView","newInstance","target","generation","isJavaScriptFile","relevantPanes","getRelevantPanes","options","selectedPane","getPreferredPane","paneElement","provider","menuItems","preparePaneMenuItems","FILE_EXPLORER_OPEN_PANE_EVENT","paneSubject","FILE_EXPLORER_BACK_EVENT","isExplorerEvent","parentContainer","nextPane","request","isCurrentRenderRequest","composeExplorer","renderGeneration","browserContext","isCurrentSelection","candidate","indexRequested","applicationSubject","getIndexedApplicationSubject","sourcePane","useIndexedApplication","indexedContainerUri","getIndexedContainer","indexedContainer","divider","nothing"],"sources":["../../../src/components/folder-pane-view/FolderPaneView.ts"],"sourcesContent":["import { aclControl, composeExplorer, customElement, FILE_EXPLORER_BACK_EVENT, FILE_EXPLORER_OPEN_PANE_EVENT, getPreferredPane, getRelevantPanes, isExplorerEvent, log, ns, preparePaneMenuItems, showDialog, WebComponent, widgets } from 'solid-ui'\nimport { authn, authSession } from 'solid-logic'\nimport { resourceAccessCache } from '../../accessCache'\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 'solid-ui/components/button'\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 '~icons/lucide/chevron-left'\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'\nimport * as debug from '../../debug'\nimport { clearFailedResource } from './resourceLoad'\n\ntype CreatedResource = {\n container: NamedNode\n containedResource: NamedNode\n /** Omit to refresh listings without changing the content view (multi-file uploads). */\n newInstance?: NamedNode\n pane?: PaneDefinition\n}\n\ntype ExplorerRenderOptions = {\n paneOptions?: unknown\n isCurrent?: () => boolean\n showHeader?: boolean\n}\n\ntype ContentError = {\n title: string\n message: string\n retry?: () => void\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 256\nexport const MIN_SIDEBAR_WIDTH = 180\nexport const MAX_SIDEBAR_WIDTH = 480\nexport const MIN_CONTENT_WIDTH = 320\nexport const SIDEBAR_RESIZE_STEP = 16\nexport const NARROW_PANE_BREAKPOINT = 768\n\nexport function clampSidebarWidth (requestedWidth: number, availableWidth: number): number {\n if (!Number.isFinite(availableWidth) || availableWidth <= MIN_CONTENT_WIDTH) {\n return DEFAULT_SIDEBAR_WIDTH\n }\n const availableSidebarWidth = availableWidth - MIN_CONTENT_WIDTH\n if (availableSidebarWidth < MIN_SIDEBAR_WIDTH) {\n return DEFAULT_SIDEBAR_WIDTH\n }\n const requested = Number.isFinite(requestedWidth) ? requestedWidth : DEFAULT_SIDEBAR_WIDTH\n return Math.min(MAX_SIDEBAR_WIDTH, availableSidebarWidth, Math.max(MIN_SIDEBAR_WIDTH, requested))\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 private get displayedResource (): NamedNode | undefined {\n return this.selectedResource ?? this.subject\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 private accessor standaloneBreadcrumbRoot: NamedNode | undefined = undefined\n\n @state()\n accessor containerView: 'grid' | 'list' = 'grid'\n\n @state()\n accessor searchQuery = ''\n\n @state()\n private accessor sidebarCollapsed = false\n\n @state()\n private accessor sidebarWidth = DEFAULT_SIDEBAR_WIDTH\n\n @state()\n private accessor sidebarMaximumWidth = MAX_SIDEBAR_WIDTH\n\n @state()\n private accessor contentError: ContentError | undefined = undefined\n\n @state()\n private accessor showingContainer = false\n\n @state()\n private accessor canCreate = false\n\n private initialLoadGeneration = 0\n private renderGeneration = 0\n private permissionGeneration = 0\n private permissionRequest: { containerUri: string, resourceLogic: unknown } | undefined\n private creationInFlight = false\n private authListenersAttached = false\n private dropProtectionAttached = false\n private sidebarResizeObserver: ResizeObserver | undefined\n private responsiveLayoutInitialized = false\n private sidebarDrag: {\n separator: HTMLElement\n pointerId: number\n startX: number\n startWidth: number\n } | undefined\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 /** Below-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 const shell = this.querySelector('.folder-pane-main-content')\n if (shell) this.sidebarResizeObserver?.observe(shell)\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 this.addEventListener('resource-open-pane', this.handleResourceOpenPane as EventListener)\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 this.finishSidebarResize()\n this.sidebarResizeObserver?.disconnect()\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 this.removeEventListener('resource-open-pane', this.handleResourceOpenPane as EventListener)\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 protected firstUpdated () {\n this.updateSidebarBounds()\n if (typeof ResizeObserver !== 'undefined') {\n this.sidebarResizeObserver = new ResizeObserver(entries => {\n this.updateSidebarBounds()\n const width = entries[0]?.contentRect.width ?? 0\n if (this.responsiveLayoutInitialized || width <= 0) return\n this.responsiveLayoutInitialized = true\n if (width < NARROW_PANE_BREAKPOINT) {\n void this.handleSidebarToggle(new Event('folder-pane-responsive-collapse'))\n }\n })\n const shell = this.querySelector('.folder-pane-main-content')\n if (shell) this.sidebarResizeObserver.observe(shell)\n this.sidebarResizeObserver.observe(this)\n }\n }\n\n private handleAuthChange = () => {\n resourceAccessCache.clear()\n this.refreshCreationPermission(true)\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 debug.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 const uploadGeneration = this.renderGeneration\n const uploadContext = this.browserContext\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(() => {\n const canNavigateToUpload = this.renderGeneration === uploadGeneration &&\n this.browserContext === uploadContext\n return this.showCreatedResource({\n container,\n containedResource: this.store!.sym(uri),\n newInstance: validFiles.length === 1 && canNavigateToUpload\n ? this.store!.sym(uri)\n : undefined\n })\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 this.standaloneBreadcrumbRoot = this.fullView\n ? this.getStandaloneBreadcrumbRoot(this.subject)\n : this.subject\n if (changedProperties.has('subject') || changedProperties.has('browserContext')) {\n this.selectedResource = undefined\n this.renderGeneration++\n this.initialLoadGeneration++\n }\n this.refreshCreationPermission()\n void this.showInitialContainer(this.subject)\n return\n }\n\n if (changedProperties.has('selectedResource')) {\n this.refreshCreationPermission()\n }\n\n if (changedProperties.has('fullView') && changedProperties.get('fullView') !== undefined) {\n if (this.subject) {\n this.standaloneBreadcrumbRoot = this.fullView\n ? this.getStandaloneBreadcrumbRoot(this.subject)\n : this.subject\n }\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 private getStandaloneBreadcrumbRoot (subject: NamedNode): NamedNode {\n try {\n const url = new URL(subject.uri)\n const pathSegments = url.pathname.split('/').filter(Boolean)\n if (pathSegments.length <= 1) return subject\n return this.store?.sym(`${url.origin}/${pathSegments[0]}/`) ?? subject\n } catch {\n return subject\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: ContentError, clearContent = true) {\n if (clearContent) 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 async loadResource (resource: NamedNode, retryFailed = false): Promise<void> {\n const store = this.store\n if (!store) return\n const fetcher = store.fetcher\n // A failed request can be cached by rdflib. Do not clear it during normal\n // navigation: persistent failures such as CORS errors should settle once\n // instead of causing a new request on every render. An explicit retry is\n // the point at which the cached failure should be discarded.\n if (retryFailed) clearFailedResource(fetcher, resource)\n try {\n await fetcher.load(resource)\n } catch (error) {\n if (!retryFailed || !isAccessDeniedError(error) || !authn.currentUser()) throw error\n await fetcher.load(resource, { force: true, clearPreviousData: true })\n }\n }\n\n private clearContentError = () => {\n this.contentError = undefined\n }\n\n private retryContent = () => {\n const retry = this.contentError?.retry\n if (retry) {\n this.clearContentError()\n retry()\n return\n }\n\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, undefined, false, true)\n } else if (subject) {\n if (this.store) clearFailedResource(this.store.fetcher, 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.fullView ? this.standaloneBreadcrumbRoot : 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 private refreshCreationPermission (force = false) {\n const container = this.getActiveContainer()\n const resourceLogic = this.browserContext?.session.logic.resource\n if (\n !force &&\n container &&\n resourceLogic &&\n this.permissionRequest?.containerUri === container.uri &&\n this.permissionRequest.resourceLogic === resourceLogic\n ) return\n\n const permissionGeneration = ++this.permissionGeneration\n this.canCreate = false\n this.permissionRequest = container && resourceLogic\n ? { containerUri: container.uri, resourceLogic }\n : undefined\n if (!container || !resourceLogic) return\n\n void resourceLogic.fetchMetadata(container)\n .then(metadata => {\n if (\n permissionGeneration === this.permissionGeneration &&\n this.getActiveContainer()?.sameTerm(container) === true\n ) {\n this.canCreate = metadata.access.canEdit\n }\n })\n .catch(error => {\n if (permissionGeneration === this.permissionGeneration) {\n this.permissionRequest = undefined\n debug.warn('Unable to determine folder creation permission', error)\n }\n })\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\n this.showingContainer = true\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.loadResource(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 this.requestUpdate()\n if (!this.selectedResource) {\n this.showSubject(subject)\n }\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 || getPreferredPane(subject, this.browserContext, 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 = await preparePaneMenuItems({\n subject,\n context: this.browserContext,\n panes: relevantPanes,\n openPane: (paneSubject, paneName) => {\n provider.dispatchEvent(new CustomEvent(FILE_EXPLORER_OPEN_PANE_EVENT, {\n bubbles: true,\n composed: true,\n detail: { subjectUri: paneSubject.uri, paneName }\n }))\n }\n })\n\n provider.addEventListener(FILE_EXPLORER_BACK_EVENT, event => {\n if (!isExplorerEvent(event, provider)) return\n event.stopPropagation()\n // Return to the container that owns the displayed resource. Using the\n // explorer root here loses the user's position for resources in nested\n // containers.\n const parentContainer = this.getActiveContainer() || this.subject || subject\n this.renderGeneration++\n this.selectedResource = parentContainer\n this.renderContainerView(parentContainer)\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 paneOptions: nextPane.name === 'folder'\n ? { folderView: 'container', fullView: true, solo: true }\n : options.paneOptions,\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 this.showingContainer = false\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 retryFailed = false\n ) {\n const renderGeneration = ++this.renderGeneration\n\n try {\n const target = this.resourceTarget\n const browserContext = this.browserContext\n if (!target || !this.store || !this.resourceLogic || !browserContext) 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 (\n this.subject?.sameTerm(selectedResource) &&\n !pane &&\n !indexRequested &&\n isContainerResource(selectedResource, this.resourceLogic)\n ) {\n this.renderContainerView(selectedResource)\n return\n }\n\n // A pane supplied by an explicit creation or pane-selection action is\n // authoritative. In particular, freshly created text resources can\n // briefly inherit container metadata while the store is refreshed.\n // Some servers report file resources as containers. Keep known file\n // types out of the folder branch so pane selection can run normally.\n if (\n isContainerResource(selectedResource, this.resourceLogic) &&\n (pane?.name !== 'source' || indexRequested)\n ) {\n try {\n await this.loadResource(selectedResource, retryFailed)\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 (pane?.name === 'folder') {\n this.renderContainerView(selectedResource)\n return\n }\n\n if (\n pane?.name !== 'sharing' &&\n (indexRequested || this.resourceLogic.containerHasIndexDocument(selectedResource))\n ) {\n const applicationSubject = this.store.sym(\n getIndexedApplicationSubject(selectedResource, pane?.name)\n )\n try {\n await this.loadResource(applicationSubject.doc(), retryFailed)\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 const relevantPanes = await getRelevantPanes(selectedResource, browserContext, {\n excludedPaneNames: ['sharing'],\n fallbackPaneName: 'internal'\n })\n if (!isCurrentSelection(selectedResource)) return\n\n const selectedPane = pane || getPreferredPane(selectedResource, browserContext, relevantPanes)\n if (selectedPane?.name !== 'folder') {\n await this.renderExplorerInto(target, selectedResource, selectedPane, {\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.loadResource(selectedResource, retryFailed)\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 useIndexedApplication = pane?.name !== 'sharing'\n const indexedContainerUri = useIndexedApplication ? getIndexedContainer(resource) : undefined\n const indexedContainer = indexedContainerUri && this.store\n ? this.store.sym(indexedContainerUri)\n : undefined\n const subject = indexedContainer ?? resource\n const indexRequested = useIndexedApplication && !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 if (pane.name === 'folder') {\n this.showSubject(resource, pane)\n return\n }\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 const home = this.subject && this.standaloneBreadcrumbRoot?.sameTerm(this.subject)\n ? this.subject\n : this.standaloneBreadcrumbRoot\n if (home) this.showSubject(home)\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 private get sidebarAvailableWidth () {\n const shell = this.renderRoot.querySelector<HTMLElement>('.folder-pane-main-content')\n const divider = this.renderRoot.querySelector<HTMLElement>('.folder-pane-sidebar-resizer')\n return (shell?.clientWidth ?? 0) - (divider?.getBoundingClientRect().width ?? 0)\n }\n\n private resizeSidebar (width: number) {\n this.sidebarWidth = clampSidebarWidth(width, this.sidebarAvailableWidth)\n }\n\n private updateSidebarBounds = () => {\n if (!this.isConnected) return\n this.sidebarMaximumWidth = clampSidebarWidth(MAX_SIDEBAR_WIDTH, this.sidebarAvailableWidth)\n this.resizeSidebar(this.sidebarWidth)\n }\n\n private handleSidebarPointerDown = (event: PointerEvent) => {\n if (!this.isConnected || this.sidebarCollapsed || this.sidebarDrag ||\n event.button !== 0 || !event.isPrimary) return\n event.preventDefault()\n const separator = event.currentTarget as HTMLElement\n separator.setPointerCapture(event.pointerId)\n separator.focus()\n this.sidebarDrag = {\n separator,\n pointerId: event.pointerId,\n startX: event.clientX,\n startWidth: this.sidebarWidth\n }\n this.requestUpdate()\n }\n\n private handleSidebarPointerMove = (event: PointerEvent) => {\n const drag = this.sidebarDrag\n if (!this.isConnected || this.sidebarCollapsed || !drag || drag.pointerId !== event.pointerId) return\n this.resizeSidebar(drag.startWidth + event.clientX - drag.startX)\n }\n\n private finishSidebarResize () {\n const drag = this.sidebarDrag\n if (!drag) return\n this.sidebarDrag = undefined\n if (drag.separator.hasPointerCapture(drag.pointerId)) {\n drag.separator.releasePointerCapture(drag.pointerId)\n }\n if (this.isConnected) this.requestUpdate()\n }\n\n private handleSidebarPointerEnd = (event: PointerEvent) => {\n if (this.sidebarDrag?.pointerId === event.pointerId) this.finishSidebarResize()\n }\n\n private handleSidebarResizeKey = (event: KeyboardEvent) => {\n if (!this.isConnected || this.sidebarCollapsed || this.sidebarDrag ||\n event.altKey || event.ctrlKey || event.metaKey) return\n let width: number\n switch (event.key) {\n case 'ArrowLeft': width = this.sidebarWidth - SIDEBAR_RESIZE_STEP; break\n case 'ArrowRight': width = this.sidebarWidth + SIDEBAR_RESIZE_STEP; break\n case 'Home': width = MIN_SIDEBAR_WIDTH; break\n case 'End': width = MAX_SIDEBAR_WIDTH; break\n default: return\n }\n event.preventDefault()\n event.stopPropagation()\n this.resizeSidebar(width)\n }\n\n private handleSidebarToggle = async (event: Event) => {\n event.stopPropagation()\n const sidebar = this.sidebar\n const resizer = this.renderRoot.querySelector<HTMLElement>('.folder-pane-sidebar-resize-handle')\n const focusWasInSidebar = !!sidebar && (\n sidebar.matches(':focus-within') ||\n sidebar.shadowRoot?.activeElement != null\n )\n const focusWasOnResizer = resizer === this.ownerDocument.activeElement\n this.finishSidebarResize()\n this.sidebarCollapsed = !this.sidebarCollapsed\n if (!this.sidebarCollapsed || (!focusWasInSidebar && !focusWasOnResizer)) return\n await this.updateComplete\n this.renderRoot.querySelector<HTMLButtonElement>('.folder-pane-sidebar-toggle')?.focus()\n }\n\n private handleFolderPaneResourceError = (event: CustomEvent<{\n title?: string\n message?: string\n retry?: () => void\n }>) => {\n event.stopPropagation()\n const title = event.detail?.title || 'Unable to load this folder'\n const message = event.detail?.message || 'The folder could not be loaded. Try again.'\n this.showContentError({\n title,\n message,\n retry: event.detail?.retry\n }, false)\n }\n\n render () {\n if (this.fullView) {\n return html`\n <folder-pane-provider\n .rootResource=${this.subject}\n .displayedResource=${this.displayedResource}\n .activeContainer=${this.getActiveContainer()}\n .view=${this.containerView}\n .searchQuery=${this.searchQuery}\n .canCreate=${this.canCreate}\n >\n ${this.showingContainer ? this.renderStorageHeader() : nothing}\n ${this.renderContentError()}\n <div\n class=\"folder-pane-full-view\"\n ?hidden=${!!this.contentError}\n @resource-selected=${this.handleResourceSelected}\n ></div>\n <div class=\"folder-pane-status\"></div>\n </folder-pane-provider>\n `\n }\n\n return html`\n <folder-pane-provider\n .rootResource=${this.subject}\n .displayedResource=${this.displayedResource}\n .activeContainer=${this.getActiveContainer()}\n .view=${this.containerView}\n .searchQuery=${this.searchQuery}\n .canCreate=${this.canCreate}\n .sidebarCollapsed=${this.sidebarCollapsed}\n >\n ${this.renderStorageHeader()}\n <div\n class=\"folder-pane-main-content\"\n data-sidebar-collapsed=${String(this.sidebarCollapsed)}\n style=${`--folder-pane-sidebar-width: ${this.sidebarWidth}px`}\n @resource-selected=${this.handleResourceSelected}\n @folder-pane-resource-error=${this.handleFolderPaneResourceError}\n @folder-pane-toggle-sidebar=${this.handleSidebarToggle}\n >\n <folder-pane-sidebar\n ?inert=${this.sidebarCollapsed}\n aria-hidden=${this.sidebarCollapsed ? 'true' : 'false'}\n .store=${this.store}\n .resourceLogic=${this.resourceLogic}\n .subject=${this.subject}\n .selectedResource=${this.displayedResource}\n ></folder-pane-sidebar>\n <div\n class=\"folder-pane-sidebar-resizer\"\n data-resizing=${String(!!this.sidebarDrag)}\n >\n <div\n class=\"folder-pane-sidebar-resize-handle\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n aria-label=\"Resize navigation sidebar\"\n aria-valuemin=${MIN_SIDEBAR_WIDTH}\n aria-valuemax=${this.sidebarMaximumWidth}\n aria-valuenow=${this.sidebarWidth}\n tabindex=${this.sidebarCollapsed ? -1 : 0}\n ?hidden=${this.sidebarCollapsed}\n ?inert=${this.sidebarCollapsed}\n @pointerdown=${this.handleSidebarPointerDown}\n @pointermove=${this.handleSidebarPointerMove}\n @pointerup=${this.handleSidebarPointerEnd}\n @pointercancel=${this.handleSidebarPointerEnd}\n @lostpointercapture=${this.handleSidebarPointerEnd}\n @keydown=${this.handleSidebarResizeKey}\n ></div>\n <button\n type=\"button\"\n class=\"folder-pane-sidebar-toggle\"\n aria-label=${this.sidebarCollapsed ? 'Expand navigation' : 'Collapse navigation'}\n aria-expanded=${String(!this.sidebarCollapsed)}\n @click=${this.handleSidebarToggle}\n >\n <icon-lucide-chevron-left\n class=${`folder-pane-sidebar-toggle-icon${this.sidebarCollapsed ? ' folder-pane-sidebar-toggle-icon-collapsed' : ''}`}\n aria-hidden=\"true\"\n ></icon-lucide-chevron-left>\n </button>\n </div>\n <div class=\"folder-pane-content-column\">\n ${this.renderContentError()}\n <folder-pane-content ?hidden=${!!this.contentError}></folder-pane-content>\n <div class=\"folder-pane-status\"></div>\n </div>\n </div>\n </folder-pane-provider>\n `\n }\n\n private renderStorageHeader () {\n return html`\n <folder-pane-storage-header\n .subject=${this.subject}\n .breadcrumbRoot=${this.standaloneBreadcrumbRoot}\n .selectedResource=${this.displayedResource}\n .browserContext=${this.browserContext}\n .paneList=${this.browserContext?.session.paneRegistry.list ?? []}\n .view=${this.containerView}\n .searchQuery=${this.searchQuery}\n .canCreate=${this.canCreate}\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 `\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,SAAgB4C,E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":3,"file":"resourceLoad.cjs.js","names":["clearFailedResource","fetcher","resource","getState","value","unload","clearFailedResource","fetcher","resource"],"sources":["../../../src/components/folder-pane-view/resourceLoad.ts"],"sourcesContent":["import type { NamedNode } from 'rdflib'\n\ntype Fetcher = {\n getState: (uri: string) => string | undefined\n unload: (resource: NamedNode) => void\n}\n\nexport function clearFailedResource (fetcher: Fetcher, resource: NamedNode): boolean {\n if (fetcher.getState(resource.value) !== 'failed') return false\n fetcher.unload(resource)\n return true\n}\n"],"mappings":"AAOA,SAAgBA,EAAqBC,EAAkBC,EAA8B,CAGnF,OAFID,EAAQE,SAASD,EAASE,KAAK,IAAM,WACzCH,EAAQI,OAAOH,CAAQ,EAChB,GACT,C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NamedNode } from 'rdflib';
|
|
2
|
+
type Fetcher = {
|
|
3
|
+
getState: (uri: string) => string | undefined;
|
|
4
|
+
unload: (resource: NamedNode) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function clearFailedResource(fetcher: Fetcher, resource: NamedNode): boolean;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=resourceLoad.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceLoad.d.ts","sourceRoot":"","sources":["../../../src/components/folder-pane-view/resourceLoad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IAC7C,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,wBAAgB,mBAAmB,CAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,GAAG,OAAO,CAInF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceLoad.esm.js","names":["clearFailedResource","fetcher","resource","getState","value","unload","clearFailedResource","fetcher","resource"],"sources":["../../../src/components/folder-pane-view/resourceLoad.ts"],"sourcesContent":["import type { NamedNode } from 'rdflib'\n\ntype Fetcher = {\n getState: (uri: string) => string | undefined\n unload: (resource: NamedNode) => void\n}\n\nexport function clearFailedResource (fetcher: Fetcher, resource: NamedNode): boolean {\n if (fetcher.getState(resource.value) !== 'failed') return false\n fetcher.unload(resource)\n return true\n}\n"],"mappings":";AAOA,SAAgBA,EAAqBC,GAAkBC,GAA8B;CAGnF,OAFID,EAAQE,SAASD,EAASE,KAAK,MAAM,aACzCH,EAAQI,OAAOH,CAAQ,GAChB;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.cjs.js","names":["warn","args","error"],"sources":["../src/debug.ts"],"sourcesContent":["export function log (...args: any[]) {\n console.log(...args)\n}\n\nexport function warn (...args: any[]) {\n console.warn(...args)\n}\n\nexport function error (...args: any[]) {\n console.error(...args)\n}\n\nexport function trace (...args: any[]) {\n console.trace(...args)\n}\n"],"mappings":"AAIA,SAAgBA,EAAM,GAAGC,EAAa,CACpC,QAAQ,KAAK,GAAGA,CAAI,CACtB,CAEA,SAAgBC,EAAO,GAAGD,EAAa,CACrC,QAAQ,MAAM,GAAGA,CAAI,CACvB,C"}
|
package/dist/debug.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,QAElC;AAED,wBAAgB,IAAI,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,QAEnC;AAED,wBAAgB,KAAK,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,QAEpC;AAED,wBAAgB,KAAK,CAAE,GAAG,IAAI,EAAE,GAAG,EAAE,QAEpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.esm.js","names":["warn","args","error"],"sources":["../src/debug.ts"],"sourcesContent":["export function log (...args: any[]) {\n console.log(...args)\n}\n\nexport function warn (...args: any[]) {\n console.warn(...args)\n}\n\nexport function error (...args: any[]) {\n console.error(...args)\n}\n\nexport function trace (...args: any[]) {\n console.trace(...args)\n}\n"],"mappings":";AAIA,SAAgBA,EAAM,GAAGC,GAAa;CACpC,QAAQ,KAAK,GAAGA,CAAI;AACtB;AAEA,SAAgBC,EAAO,GAAGD,GAAa;CACrC,QAAQ,MAAM,GAAGA,CAAI;AACvB"}
|
package/dist/folderPane.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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
|
|
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--storage folder-pane-storage-header{--folder-pane-storage-toolbar-right-padding:8px;--folder-pane-storage-header-mobile-gap:0;--folder-pane-storage-header-mobile-padding:0 0 10px}folder-pane-view{flex-direction:column;flex:auto;width:100%;height:100%;min-height:0;display:flex}.folder-pane-main-content{box-sizing:border-box;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%;min-width:0;height:80vh;min-height:32rem;display:flex;overflow:hidden}.folder-pane-view-controls{flex:none;justify-content:flex-end;align-items:center;gap:5.6px;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{flex-direction:column;flex:0 0 var(--folder-pane-sidebar-width,256px);width:var(--folder-pane-sidebar-width,256px);box-sizing:border-box;border-right:1px solid var(--solid-ui-color-gray-200,#cbd5e1);min-width:0;max-width:100%;min-height:0;display:flex;overflow:hidden}.folder-pane-sidebar-resizer{background:0 0;flex:0 0 4px;width:4px;position:relative}.folder-pane-sidebar-resize-handle{cursor:col-resize;touch-action:none;position:absolute;inset:0}.folder-pane-sidebar-resize-handle:focus-visible{outline:1px solid var(--solid-ui-color-lavender-300,#e6dcff);outline-offset:0}.folder-pane-sidebar-resizer[data-resizing=true]{background:var(--solid-ui-color-lavender-300,#e6dcff)}.folder-pane-main-content:has(.folder-pane-sidebar-resizer[data-resizing=true]){-webkit-user-select:none;user-select:none}.folder-pane-sidebar-toggle{box-sizing:border-box;color:var(--solid-ui-color-gray-900,#101828);background:var(--solid-ui-color-zinc-300,#d4d4d8);z-index:1;border:0;border-radius:20px;justify-content:center;align-items:center;width:25px;min-width:25px;height:25px;min-height:25px;padding:0;display:flex;position:absolute;top:75%;left:calc(50% - 2px);transform:translate(-50%,-50%)}.folder-pane-sidebar-toggle:hover{background:var(--solid-ui-color-primary-hover)}.folder-pane-sidebar-toggle:focus-visible{outline:1px solid var(--solid-ui-color-lavender-300,#e6dcff);outline-offset:1px}.folder-pane-sidebar-toggle-icon{flex:none;width:12.308px;height:12.308px;display:block;position:relative;top:-1px}.folder-pane-sidebar-toggle-icon-collapsed{transform:rotate(90deg)scaleX(-1)}.folder-pane-main-content[data-sidebar-collapsed=true]>folder-pane-sidebar{border-right:0;flex-basis:0;width:0;min-width:0;overflow:hidden}.folder-pane-main-content[data-sidebar-collapsed=true]>.folder-pane-sidebar-resizer{flex-basis:4px}.folder-pane-main-content[data-sidebar-collapsed=true]>.folder-pane-sidebar-resizer>.folder-pane-sidebar-toggle{left:calc(50% + 12.5px)}.folder-pane-content-column{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;position:relative}@media (prefers-reduced-motion:reduce){.folder-pane-main-content,folder-pane-sidebar,.folder-pane-sidebar-toggle-icon,.resource-expand-button icon-lucide-chevron-right{transition:none}}.folder-pane-content-column>folder-pane-content{box-sizing:border-box;padding:16px}.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-top:1px solid var(--color-border,#ddd);text-align:left;flex-direction:column;flex:none;gap:8px;padding:8px 12px;display:flex}.folder-pane-status[data-status=progress]{accent-color:auto;text-align:center;outline:0;flex:none;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<=768px){.folder-pane{height:auto;margin-top:var(--spacing-2xs,.25em);margin-bottom:var(--spacing-2xs,.25em);overflow:visible}folder-pane-view{height:auto}.folder-pane-main-content,.folder-pane-full-view{flex:none;height:auto;min-height:0;overflow:visible}.folder-pane-main-content{border:0}.folder-pane-content-column{min-height:0;overflow:visible}solid-ui-file-explorer-provider,solid-ui-file-explorer-provider>.paneDiv,solid-ui-file-explorer-provider>.exceptionPane{height:auto;min-height:0;overflow:visible}.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)}})();require("./components/folder-pane-view/index.cjs.js"),require("./components/folder-pane-provider/index.cjs.js");const e=require("./helpers.cjs.js");;let t=require("solid-ui");var n=[`explorer`,`storage`,`container`];function r(e){return e.folderView&&n.includes(e.folderView)?e.folderView:e.fullView===!0||e.solo===!0?`container`:`explorer`}var i={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)||e.isJsonFile(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 i=t.dom,a=i.createElement(`div`);a.classList.add(`instancePane`,`folder-pane`);let o=a.appendChild(i.createElement(`folder-pane-view`)),s=n&&typeof n==`object`?n:{};o.browserContext=t,o.subject=e;let c=r(s);return a.classList.add(`folder-pane--${c}`),o.fullView=c===`container`,a}};exports.default=i,exports.folderViewFor=r;
|
|
3
3
|
//# sourceMappingURL=folderPane.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folderPane.cjs.js","names":["icons","isJavaScriptFile","ns","require_helpers","solid_ui","FOLDER_VIEWS","folderViewFor","options","folderPane_default","kb","context","u","newPaneOptions","normalizedInstance","subject","n","dom","div","folderPaneView","renderOptions","paneOptions","folderView"],"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\n/**\n * How a folder is presented:\n * - `explorer`: storage header, sidebar and content (the viewer's own storage, the server root)\n * - `storage`: sidebar and content
|
|
1
|
+
{"version":3,"file":"folderPane.cjs.js","names":["icons","isJavaScriptFile","isJsonFile","ns","require_helpers","solid_ui","FOLDER_VIEWS","folderViewFor","options","folderPane_default","kb","context","u","newPaneOptions","normalizedInstance","subject","n","dom","div","folderPaneView","renderOptions","paneOptions","folderView"],"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 './components/folder-pane-provider'\nimport type FolderPaneView from './components/folder-pane-view/FolderPaneView'\nimport { icons, ns } from 'solid-ui'\nimport { isJavaScriptFile, isJsonFile } from './helpers'\nimport './styles/folderPane.css'\nimport './styles/utilities.css'\n\nexport { getCreationNoun, getCreationPanes, getPaneLabel } from './helpers'\n\n/**\n * How a folder is presented:\n * - `explorer`: storage header, sidebar and content (the viewer's own storage, the server root)\n * - `storage`: storage header, sidebar and content under the navbar of someone else's pod\n * - `container`: storage header and container contents, without a sidebar (a container URL opened on its own)\n */\nexport type FolderView = 'explorer' | 'storage' | 'container'\n\ntype FolderPaneRenderOptions = {\n folderView?: FolderView\n fullView?: boolean\n solo?: boolean\n}\n\nconst FOLDER_VIEWS: FolderView[] = ['explorer', 'storage', 'container']\n\nexport function folderViewFor (options: FolderPaneRenderOptions): FolderView {\n if (options.folderView && FOLDER_VIEWS.includes(options.folderView)) return options.folderView\n return options.fullView === true || options.solo === true ? 'container' : 'explorer'\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) || isJsonFile(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 const folderView = folderViewFor(renderOptions)\n div.classList.add(`folder-pane--${folderView}`)\n folderPaneView.fullView = folderView === 'container'\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,yPA6BA,IAAMM,EAA6B,CAAC,WAAY,UAAW,WAAW,EAEtE,SAAgBC,EAAe,EAA8C,CAE3E,OADIC,EAAQ,YAAcF,EAAa,SAASE,EAAQ,UAAU,EAAUA,EAAQ,WAC7EA,EAAQ,WAAa,IAAQA,EAAQ,OAAS,GAAO,YAAc,UAC5E,CAEA,IAAAC,EAAe,CACb,KAAMT,EAAAA,MAAM,SAAW,2BACvB,KAAM,SAGN,QAAS,SAAU,EAAS,EAAgB,CAC1C,IAAMU,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,GAAIZ,EAAAA,iBAAiBc,CAAO,GAAKb,EAAAA,WAAWa,CAAO,EAAG,OAAO,KAC7D,IAAML,EAAKC,EAAQ,QAAQ,MACrBK,EAAIN,EAAG,KAAKK,EAASZ,EAAAA,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,OAQ/C,OAPIa,EAAI,EACC,aAAeA,EAAI,IAExBN,EAAG,MAAMK,EAASZ,EAAAA,GAAG,IAAI,MAAM,EAAGA,EAAAA,GAAG,IAAI,WAAW,CAAC,EAEhD,gBAEF,IACT,EAGA,OAAQ,SAAU,EAAS,EAAS,EAAuB,CAEzD,IAAMc,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,EACL,EAAe,eAAiBV,EAChC,EAAe,QAAUI,EACzB,IAAMO,EAAaf,EAAca,CAAa,EAS9C,OARAF,EAAI,UAAU,IAAI,gBAAgBI,GAAY,EAC9C,EAAe,SAAWA,IAAe,YAOlCJ,CACT,CACF,E"}
|
package/dist/folderPane.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { getCreationNoun, getCreationPanes, getPaneLabel } from './helpers';
|
|
|
2
2
|
/**
|
|
3
3
|
* How a folder is presented:
|
|
4
4
|
* - `explorer`: storage header, sidebar and content (the viewer's own storage, the server root)
|
|
5
|
-
* - `storage`: sidebar and content
|
|
6
|
-
* - `container`:
|
|
5
|
+
* - `storage`: storage header, sidebar and content under the navbar of someone else's pod
|
|
6
|
+
* - `container`: storage header and container contents, without a sidebar (a container URL opened on its own)
|
|
7
7
|
*/
|
|
8
8
|
export type FolderView = 'explorer' | 'storage' | 'container';
|
|
9
9
|
type FolderPaneRenderOptions = {
|
package/dist/folderPane.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folderPane.d.ts","sourceRoot":"","sources":["../src/folderPane.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"folderPane.d.ts","sourceRoot":"","sources":["../src/folderPane.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAA;AACtC,OAAO,mCAAmC,CAAA;AAI1C,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAA;AAE7D,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAID,wBAAgB,aAAa,CAAE,OAAO,EAAE,uBAAuB,GAAG,UAAU,CAG3E;;;;;;uDAwCmD,OAAO;;AAtC3D,wBA4DC"}
|