folder-pane 4.0.1-1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +4 -0
  2. package/dist/_virtual/~icons/lucide/chevron-left.cjs.js +2 -0
  3. package/dist/_virtual/~icons/lucide/chevron-left.cjs.js.map +1 -0
  4. package/dist/_virtual/~icons/lucide/{trash-2.esm.js → chevron-left.esm.js} +4 -4
  5. package/dist/_virtual/~icons/lucide/chevron-left.esm.js.map +1 -0
  6. package/dist/accessCache.cjs.js +2 -0
  7. package/dist/accessCache.cjs.js.map +1 -0
  8. package/dist/accessCache.d.ts +37 -0
  9. package/dist/accessCache.d.ts.map +1 -0
  10. package/dist/accessCache.esm.js +34 -0
  11. package/dist/accessCache.esm.js.map +1 -0
  12. package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js +50 -38
  13. package/dist/components/folder-pane-container/FolderPaneContainer.cjs.js.map +1 -1
  14. package/dist/components/folder-pane-container/FolderPaneContainer.d.ts +29 -5
  15. package/dist/components/folder-pane-container/FolderPaneContainer.d.ts.map +1 -1
  16. package/dist/components/folder-pane-container/FolderPaneContainer.esm.js +321 -194
  17. package/dist/components/folder-pane-container/FolderPaneContainer.esm.js.map +1 -1
  18. package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js +1 -1
  19. package/dist/components/folder-pane-container/FolderPaneContainer.styles.cjs.js.map +1 -1
  20. package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js +1 -1
  21. package/dist/components/folder-pane-container/FolderPaneContainer.styles.esm.js.map +1 -1
  22. package/dist/components/folder-pane-content/FolderPaneContent.cjs.js.map +1 -1
  23. package/dist/components/folder-pane-content/FolderPaneContent.esm.js.map +1 -1
  24. package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js +1 -1
  25. package/dist/components/folder-pane-content/FolderPaneContent.styles.cjs.js.map +1 -1
  26. package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js +1 -1
  27. package/dist/components/folder-pane-content/FolderPaneContent.styles.esm.js.map +1 -1
  28. package/dist/components/folder-pane-provider/FolderPaneProvider.cjs.js +2 -0
  29. package/dist/components/folder-pane-provider/FolderPaneProvider.cjs.js.map +1 -0
  30. package/dist/components/folder-pane-provider/FolderPaneProvider.d.ts +16 -0
  31. package/dist/components/folder-pane-provider/FolderPaneProvider.d.ts.map +1 -0
  32. package/dist/components/folder-pane-provider/FolderPaneProvider.esm.js +293 -0
  33. package/dist/components/folder-pane-provider/FolderPaneProvider.esm.js.map +1 -0
  34. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.cjs.js +2 -0
  35. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.cjs.js.map +1 -0
  36. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.esm.js +6 -0
  37. package/dist/components/folder-pane-provider/FolderPaneProvider.styles.esm.js.map +1 -0
  38. package/dist/components/folder-pane-provider/index.cjs.js +1 -0
  39. package/dist/components/folder-pane-provider/index.d.ts +2 -0
  40. package/dist/components/folder-pane-provider/index.d.ts.map +1 -0
  41. package/dist/components/folder-pane-provider/index.esm.js +1 -0
  42. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js +23 -23
  43. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.cjs.js.map +1 -1
  44. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts +17 -2
  45. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.d.ts.map +1 -1
  46. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js +249 -113
  47. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.esm.js.map +1 -1
  48. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js +1 -1
  49. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.cjs.js.map +1 -1
  50. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js +1 -1
  51. package/dist/components/folder-pane-sidebar/FolderPaneSidebar.styles.esm.js.map +1 -1
  52. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.cjs.js.map +1 -1
  53. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.esm.js.map +1 -1
  54. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.cjs.js.map +1 -1
  55. package/dist/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.esm.js.map +1 -1
  56. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js +35 -21
  57. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.cjs.js.map +1 -1
  58. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts +14 -2
  59. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.d.ts.map +1 -1
  60. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js +201 -88
  61. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.esm.js.map +1 -1
  62. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js +1 -1
  63. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.cjs.js.map +1 -1
  64. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js +1 -1
  65. package/dist/components/folder-pane-storage-header/FolderPaneStorageHeader.styles.esm.js.map +1 -1
  66. package/dist/components/folder-pane-view/FolderPaneView.cjs.js +90 -29
  67. package/dist/components/folder-pane-view/FolderPaneView.cjs.js.map +1 -1
  68. package/dist/components/folder-pane-view/FolderPaneView.d.ts +41 -5
  69. package/dist/components/folder-pane-view/FolderPaneView.d.ts.map +1 -1
  70. package/dist/components/folder-pane-view/FolderPaneView.esm.js +573 -266
  71. package/dist/components/folder-pane-view/FolderPaneView.esm.js.map +1 -1
  72. package/dist/components/folder-pane-view/resourceLoad.cjs.js +2 -0
  73. package/dist/components/folder-pane-view/resourceLoad.cjs.js.map +1 -0
  74. package/dist/components/folder-pane-view/resourceLoad.d.ts +8 -0
  75. package/dist/components/folder-pane-view/resourceLoad.d.ts.map +1 -0
  76. package/dist/components/folder-pane-view/resourceLoad.esm.js +7 -0
  77. package/dist/components/folder-pane-view/resourceLoad.esm.js.map +1 -0
  78. package/dist/debug.cjs.js +2 -0
  79. package/dist/debug.cjs.js.map +1 -0
  80. package/dist/debug.d.ts +5 -0
  81. package/dist/debug.d.ts.map +1 -0
  82. package/dist/debug.esm.js +10 -0
  83. package/dist/debug.esm.js.map +1 -0
  84. package/dist/folderPane.cjs.js +2 -2
  85. package/dist/folderPane.cjs.js.map +1 -1
  86. package/dist/folderPane.d.ts +2 -2
  87. package/dist/folderPane.d.ts.map +1 -1
  88. package/dist/folderPane.esm.js +13 -10
  89. package/dist/folderPane.esm.js.map +1 -1
  90. package/dist/helpers.cjs.js +1 -1
  91. package/dist/helpers.cjs.js.map +1 -1
  92. package/dist/helpers.d.ts +13 -2
  93. package/dist/helpers.d.ts.map +1 -1
  94. package/dist/helpers.esm.js +34 -14
  95. package/dist/helpers.esm.js.map +1 -1
  96. package/dist/primitives/context.cjs.js +2 -0
  97. package/dist/primitives/context.cjs.js.map +1 -0
  98. package/dist/primitives/context.d.ts +14 -0
  99. package/dist/primitives/context.d.ts.map +1 -0
  100. package/dist/primitives/context.esm.js +6 -0
  101. package/dist/primitives/context.esm.js.map +1 -0
  102. package/dist/requestQueue.cjs.js +1 -1
  103. package/dist/requestQueue.cjs.js.map +1 -1
  104. package/dist/requestQueue.d.ts +10 -2
  105. package/dist/requestQueue.d.ts.map +1 -1
  106. package/dist/requestQueue.esm.js +32 -22
  107. package/dist/requestQueue.esm.js.map +1 -1
  108. package/dist/resourceActionItems.cjs.js +2 -0
  109. package/dist/resourceActionItems.cjs.js.map +1 -0
  110. package/dist/resourceActionItems.d.ts +19 -0
  111. package/dist/resourceActionItems.d.ts.map +1 -0
  112. package/dist/resourceActionItems.esm.js +42 -0
  113. package/dist/resourceActionItems.esm.js.map +1 -0
  114. package/package.json +12 -8
  115. package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
  116. package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
  117. package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneSidebar.esm.js","names":["customElement","utils","WebComponent","html","nothing","repeat","property","state","styles","getResourcesForContainer","_classDecs","_FolderPaneSidebar","_FolderPaneSidebar2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_storeDecs","attribute","_subjectDecs","_resourceLogicDecs","_selectedResourceDecs","_resourcesDecs","_expandedContainersDecs","_homeExpandedDecs","_expansionErrorDecs","_FolderPaneSidebar3","FolderPaneSidebar","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_store","_init_subject","undefined","_init_resourceLogic","_init_selectedResource","_init_resources","Map","_init_expandedContainers","Set","_init_homeExpanded","_init_expansionError","_defineProperty","_classPrivateFieldGet","store","v","_classPrivateFieldSet","subject","resourceLogic","selectedResource","resources","expandedContainers","homeExpanded","expansionError","loadResources","resourceGeneration","refreshResources","container","sameTerm","expanded","current","add","value","parent","dir","toggleContainer","resource","isContainer","generation","nextExpandedContainers","has","id","delete","fetcher","load","error","console","label","isSelected","isNamed","name","toLowerCase","getHomeResource","parentId","selectResource","dispatchEvent","CustomEvent","detail","bubbles","composed","renderRow","icon","toggle","special","chevron","event","preventDefault","stopPropagation","key","shouldExpand","renderItem","children","selected","String","toNT","renderSpecialIcon","renderResourceItem","specialIcon","renderResourceGroup","Boolean","list","Array","isArray","values","renderTree","homeResource","orderedResources","takeNamed","index","findIndex","splice","publicResource","trashResource","willUpdate","changedProperties","render","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","FolderPaneSidebar_styles_default","_Class","_FolderPaneSidebar3","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_storeDecs","_init_store","_subjectDecs","_init_subject","_resourceLogicDecs","_init_resourceLogic","_selectedResourceDecs","_init_selectedResource","_resourcesDecs","_init_resources","_expandedContainersDecs","_init_expandedContainers","_homeExpandedDecs","_init_homeExpanded","_expansionErrorDecs","_init_expansionError","_FolderPaneSidebar2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_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","_identity","customElement","_FolderPaneSidebar","property","state","WebComponent","args","getResourcesForContainer","container","expanded","current","parent","resource","generation","nextExpandedContainers","error","utils","name","chevron","label","event","toggle","special","icon","selected","nothing","children","specialIcon","list","resources","repeat","homeResource","orderedResources","takeNamed","index","publicResource","trashResource","changedProperties"],"sources":["../../../src/components/folder-pane-sidebar/FolderPaneSidebar.ts"],"sourcesContent":["import { customElement, utils, WebComponent } from 'solid-ui'\nimport { html, nothing } from 'lit'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { property, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport styles from './FolderPaneSidebar.styles.css'\nimport type { LiveStore, NamedNode } from 'rdflib'\nimport type { Resource, ResourceMap } from '../../types'\nimport '~icons/lucide/chevron-right'\nimport '~icons/lucide/circle-small'\nimport '~icons/lucide/folder'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/trash-2'\nimport { getResourcesForContainer, type FolderPaneResourceLogic } from '../../helpers'\n\ntype SpecialIcon = 'folder' | 'globe' | 'trash'\n\n@customElement('folder-pane-sidebar')\nexport default class FolderPaneSidebar extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor store: LiveStore | null = null\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor resourceLogic: FolderPaneResourceLogic | null = null\n\n @property({ attribute: false })\n accessor selectedResource: NamedNode | undefined = undefined\n\n @state()\n accessor resources: ResourceMap = new Map()\n\n @state()\n accessor expandedContainers: Set<string> = new Set()\n\n @state()\n accessor homeExpanded = true\n @state()\n accessor expansionError: string | undefined = undefined\n private resourceGeneration = 0\n\n private loadResources () {\n this.resourceGeneration++\n if (!this.store || !this.subject) {\n this.resources = new Map()\n this.expandedContainers = new Set()\n return\n }\n\n this.resources = getResourcesForContainer(this.subject, this.resourceLogic)\n }\n\n refreshResources (container?: NamedNode) {\n this.loadResources()\n if (!container || !this.subject || container.sameTerm(this.subject)) return\n\n const expanded = new Set(this.expandedContainers)\n let current = container\n while (!current.sameTerm(this.subject)) {\n expanded.add(current.value)\n const parent = current.dir()\n if (!parent || parent.sameTerm(current)) break\n current = parent\n }\n this.expandedContainers = expanded\n }\n\n private async toggleContainer (resource: Resource) {\n if (!resource.isContainer) return\n\n const generation = this.resourceGeneration\n const nextExpandedContainers = new Set(this.expandedContainers)\n if (nextExpandedContainers.has(resource.id)) {\n nextExpandedContainers.delete(resource.id)\n this.expandedContainers = nextExpandedContainers\n return\n }\n\n try {\n await this.store?.fetcher?.load(resource.subject)\n } catch (error) {\n console.error('Unable to expand storage container', error)\n this.expansionError = `Unable to load ${utils.label(resource.subject)}. Try expanding it again.`\n return\n }\n\n if (generation !== this.resourceGeneration) return\n this.expansionError = undefined\n this.expandedContainers = new Set(this.expandedContainers).add(resource.id)\n }\n\n private isSelected (resource: Resource | null) {\n return resource ? this.selectedResource?.sameTerm(resource.subject) ?? false : false\n }\n\n private isNamed (resource: Resource, name: string) {\n return utils.label(resource.subject).toLowerCase() === name\n }\n\n private getHomeResource (): Resource | null {\n if (!this.subject) return null\n\n return {\n id: this.subject.value,\n subject: this.subject,\n parentId: null,\n isContainer: true,\n }\n }\n\n private selectResource (resource: Resource) {\n this.dispatchEvent(new CustomEvent('resource-selected', {\n detail: { resource: resource.subject },\n bubbles: true,\n composed: true,\n }))\n }\n\n private renderRow (\n resource: Resource,\n label: string,\n icon: unknown,\n expanded: boolean,\n toggle: () => void,\n special = false\n ) {\n const chevron = resource.isContainer\n ? html`\n <button\n class=\"resource-expand-button\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=${expanded ? `Collapse ${label}` : `Expand ${label}`}\n @click=${(event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n toggle()\n }}\n >\n <icon-lucide-chevron-right></icon-lucide-chevron-right>\n </button>\n `\n : html`<span class=\"resource-expand-spacer\" aria-hidden=\"true\"></span>`\n\n return html`\n <div\n class=${special ? 'resource-row resource-row-special' : 'resource-row'}\n tabindex=\"0\"\n @click=${() => this.selectResource(resource)}\n @keydown=${(event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n this.selectResource(resource)\n } else if (resource.isContainer && (event.key === 'ArrowRight' || event.key === 'ArrowLeft')) {\n const shouldExpand = event.key === 'ArrowRight'\n if (shouldExpand !== expanded) {\n event.preventDefault()\n toggle()\n }\n }\n }}\n >\n ${chevron}\n ${icon}\n <span class=\"resource-label\">${label}</span>\n </div>\n `\n }\n\n private renderItem (\n resource: Resource,\n label: string,\n icon: unknown,\n expanded: boolean,\n toggle: () => void,\n children: unknown,\n special = false\n ) {\n const selected = this.isSelected(resource)\n\n return html`\n <li\n class=${selected ? 'resource-item selected' : 'resource-item'}\n notSelectable=\"false\"\n role=\"treeitem\"\n aria-label=${label}\n aria-selected=${String(selected)}\n aria-expanded=${resource.isContainer ? String(expanded) : nothing}\n data-expanded=${String(expanded)}\n about=${resource.subject.toNT()}\n .subject=${resource.subject}\n >\n ${this.renderRow(resource, label, icon, expanded, toggle, special)}\n ${expanded ? children : nothing}\n </li>\n `\n }\n\n private renderSpecialIcon (icon: SpecialIcon) {\n if (icon === 'globe') return html`<icon-lucide-globe></icon-lucide-globe>`\n if (icon === 'trash') return html`<icon-lucide-trash-2></icon-lucide-trash-2>`\n return html`<icon-lucide-folder></icon-lucide-folder>`\n }\n\n private renderResourceItem (resource: Resource, label = utils.label(resource.subject), specialIcon?: SpecialIcon) {\n const expanded = this.expandedContainers.has(resource.id)\n const children = resource.isContainer && expanded\n ? this.renderResourceGroup(getResourcesForContainer(resource.subject, this.resourceLogic))\n : nothing\n const icon = specialIcon\n ? this.renderSpecialIcon(specialIcon)\n : html`<icon-lucide-circle-small></icon-lucide-circle-small>`\n\n return this.renderItem(\n resource,\n label,\n icon,\n expanded,\n () => { void this.toggleContainer(resource) },\n children,\n Boolean(specialIcon)\n )\n }\n\n private renderResourceGroup (resources: ResourceMap | Resource[]) {\n const list = Array.isArray(resources) ? resources : [...resources.values()]\n\n return html`\n <ul role=\"group\" class=\"resource-group\">\n ${repeat(list, (resource) => resource.id, (resource) => this.renderResourceItem(resource))}\n </ul>\n `\n }\n\n private renderTree () {\n const homeResource = this.getHomeResource()\n if (!homeResource) return nothing\n\n const orderedResources = [...this.resources.values()]\n const takeNamed = (name: string) => {\n const index = orderedResources.findIndex(resource => this.isNamed(resource, name))\n return index >= 0 ? orderedResources.splice(index, 1)[0] : null\n }\n const publicResource = takeNamed('public')\n const trashResource = takeNamed('trash')\n\n return html`\n <ul role=\"tree\" class=\"resource-tree\" aria-label=\"Storage resources\">\n ${this.renderItem(\n homeResource,\n 'Home',\n this.renderSpecialIcon('folder'),\n this.homeExpanded,\n () => { this.homeExpanded = !this.homeExpanded },\n this.renderResourceGroup(orderedResources),\n true\n )}\n ${publicResource ? this.renderResourceItem(publicResource, 'Public', 'globe') : nothing}\n ${trashResource ? this.renderResourceItem(trashResource, 'Trash', 'trash') : nothing}\n </ul>\n `\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n if (changedProperties.has('subject')) {\n this.expandedContainers = new Set()\n this.homeExpanded = true\n }\n if (\n changedProperties.has('store') ||\n changedProperties.has('subject') ||\n changedProperties.has('resourceLogic')\n ) {\n this.loadResources()\n }\n }\n\n render () {\n return html`\n <aside>\n ${this.expansionError ? html`<div class=\"folder-pane-sidebar-error\" role=\"alert\">${this.expansionError}</div>` : nothing}\n ${this.renderTree()}\n </aside>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;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A;CAAA;CAAA;EAAAE;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,GAAArB,GAAA,GAAA,KAAA,GAhR8CR,CAAY,GAAA8B,IAAAyG,IAAA,cAAAC,EAAA;CAAAxG,cAAA;EAAA,MAAAvB,CAAA,GAAAsC,EAAA,MAAA,UACzCzC,CAAM,GAAA+H,EAAA;CAAA;AAAA,GAAAtF,EAAAwF,GAAA7H,GAAA,KAAA,CAAA,GAAA6H,GAAA"}
1
+ {"version":3,"file":"FolderPaneSidebar.esm.js","names":["customElement","utils","WebComponent","widgets","html","nothing","keyed","ref","repeat","property","state","styles","getResourcesForContainer","debug","_classDecs","_FolderPaneSidebar","_FolderPaneSidebar2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_storeDecs","attribute","_subjectDecs","_resourceLogicDecs","_selectedResourceDecs","_resourcesDecs","_expandedContainersDecs","_homeExpandedDecs","_activeResourceIdDecs","_FolderPaneSidebar3","FolderPaneSidebar","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_store","_init_subject","undefined","_init_resourceLogic","_init_selectedResource","_init_resources","Map","_init_expandedContainers","Set","_init_homeExpanded","_init_activeResourceId","_defineProperty","WeakSet","_classPrivateFieldGet","store","v","_classPrivateFieldSet","subject","resourceLogic","selectedResource","resources","expandedContainers","homeExpanded","activeResourceId","makeResourceDraggable","element","resource","draggableRows","has","makeDraggable","add","loadResources","hadFocus","isTreeFocused","previousResources","getVisibleResources","map","id","previousActiveId","resourceGeneration","visibleIds","getVisibleResourceIds","includes","candidate","get","fallback","parentId","getParentResourceId","getHomeResource","pendingFocusResourceId","home","visible","addChildren","expanded","isContainer","children","values","child","push","getFirstChildResource","getNextVisibleResourceId","ids","indexOf","getPreviousVisibleResourceId","tree","renderRoot","querySelector","activeElement","document","contains","focusResource","scroll","fromTreeEvent","updateComplete","item","Array","from","querySelectorAll","find","dataset","resourceId","isConnected","focus","scrollIntoView","block","setActiveFromFocus","event","target","closest","refreshResources","container","sameTerm","current","value","parent","dir","toggleContainer","generation","nextExpandedContainers","delete","fetcher","reportExpansionError","load","error","some","dispatchEvent","CustomEvent","detail","title","label","message","retry","bubbles","composed","isSelected","selectResource","renderRow","icon","toggle","special","chevron","preventDefault","stopPropagation","then","renderItem","selected","String","toNT","handleKeydown","currentTarget","key","currentId","currentResource","slice","renderSpecialIcon","renderResourceItem","specialIcon","renderResourceGroup","Boolean","list","isArray","length","renderTree","homeResource","orderedResources","willUpdate","changedProperties","focusHomeOnUpdate","updated","render","e","c","_initClass","_applyDecs","_Class","_identity","FolderPaneSidebar_styles_default","_Class","_FolderPaneSidebar3","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_storeDecs","_init_store","_subjectDecs","_init_subject","_resourceLogicDecs","_init_resourceLogic","_selectedResourceDecs","_init_selectedResource","_resourcesDecs","_init_resources","_expandedContainersDecs","_init_expandedContainers","_homeExpandedDecs","_init_homeExpanded","_activeResourceIdDecs","_init_activeResourceId","_FolderPaneSidebar2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_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","_identity","customElement","_FolderPaneSidebar","property","state","WebComponent","args","element","widgets","resource","hadFocus","previousResources","previousActiveId","getResourcesForContainer","visibleIds","candidate","fallback","parentId","home","visible","addChildren","expanded","children","child","ids","id","tree","activeElement","fromTreeEvent","item","scroll","event","container","current","parent","generation","subject","store","resourceLogic","nextExpandedContainers","fetcher","error","error$1","utils","chevron","label","toggle","ref","special","icon","selected","nothing","currentId","currentResource","focus","specialIcon","list","resources","repeat","homeResource","orderedResources","changedProperties","keyed"],"sources":["../../../src/components/folder-pane-sidebar/FolderPaneSidebar.ts"],"sourcesContent":["import { customElement, utils, WebComponent, widgets } from 'solid-ui'\nimport { html, nothing } from 'lit'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { ref } from 'lit/directives/ref.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { property, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport styles from './FolderPaneSidebar.styles.css'\nimport type { LiveStore, NamedNode } from 'rdflib'\nimport type { Resource, ResourceMap } from '../../types'\nimport '~icons/lucide/chevron-down'\nimport '~icons/lucide/chevron-right'\nimport '~icons/lucide/circle-small'\nimport '~icons/lucide/folder'\nimport { getResourcesForContainer, type FolderPaneResourceLogic } from '../../helpers'\nimport * as debug from '../../debug'\n\ntype SpecialIcon = 'folder'\n\n@customElement('folder-pane-sidebar')\nexport default class FolderPaneSidebar extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor store: LiveStore | null = null\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor resourceLogic: FolderPaneResourceLogic | null = null\n\n @property({ attribute: false })\n accessor selectedResource: NamedNode | undefined = undefined\n\n @state()\n accessor resources: ResourceMap = new Map()\n\n @state()\n accessor expandedContainers: Set<string> = new Set()\n\n @state()\n accessor homeExpanded = true\n @state()\n private accessor activeResourceId: string | null = null\n private pendingFocusResourceId: string | null = null\n private resourceGeneration = 0\n private focusHomeOnUpdate = false\n private draggableRows = new WeakSet<Element>()\n\n private makeResourceDraggable (element: Element | undefined, resource: Resource) {\n if (!element || this.draggableRows.has(element)) return\n widgets.makeDraggable(element, resource.subject)\n this.draggableRows.add(element)\n }\n\n private loadResources () {\n const hadFocus = this.isTreeFocused()\n const previousResources = new Map(this.getVisibleResources().map(resource => [resource.id, resource]))\n const previousActiveId = this.activeResourceId\n this.resourceGeneration++\n if (!this.store || !this.subject) {\n this.resources = new Map()\n this.expandedContainers = new Set()\n this.activeResourceId = null\n return\n }\n\n this.resources = getResourcesForContainer(this.subject, this.resourceLogic)\n const visibleIds = this.getVisibleResourceIds()\n if (previousActiveId && !visibleIds.includes(previousActiveId)) {\n let candidate = previousResources.get(previousActiveId)\n let fallback: string | null = null\n while (candidate) {\n const parentId = this.getParentResourceId(candidate)\n if (parentId && visibleIds.includes(parentId)) {\n fallback = parentId\n break\n }\n candidate = parentId ? previousResources.get(parentId) : undefined\n }\n this.activeResourceId = fallback ?? this.getHomeResource()?.id ?? null\n }\n if (hadFocus && this.activeResourceId) this.pendingFocusResourceId = this.activeResourceId\n }\n\n private getVisibleResources (): Resource[] {\n const home = this.getHomeResource()\n if (!home) return []\n const visible: Resource[] = [home]\n const addChildren = (resource: Resource) => {\n const expanded = resource.id === home.id ? this.homeExpanded : this.expandedContainers.has(resource.id)\n if (!resource.isContainer || !expanded) return\n const children = resource.id === home.id\n ? [...this.resources.values()]\n : [...getResourcesForContainer(resource.subject, this.resourceLogic).values()]\n for (const child of children) {\n visible.push(child)\n addChildren(child)\n }\n }\n addChildren(home)\n return visible\n }\n\n private getVisibleResourceIds () {\n return this.getVisibleResources().map(resource => resource.id)\n }\n\n private getParentResourceId (resource: Resource) {\n return resource.parentId ?? this.getHomeResource()?.id ?? null\n }\n\n private getFirstChildResource (resource: Resource) {\n if (!resource.isContainer) return null\n const children = resource.id === this.getHomeResource()?.id\n ? [...this.resources.values()]\n : [...getResourcesForContainer(resource.subject, this.resourceLogic).values()]\n return children[0] ?? null\n }\n\n private getNextVisibleResourceId (id: string) {\n const ids = this.getVisibleResourceIds()\n return ids[ids.indexOf(id) + 1] ?? null\n }\n\n private getPreviousVisibleResourceId (id: string) {\n const ids = this.getVisibleResourceIds()\n return ids[ids.indexOf(id) - 1] ?? null\n }\n\n private isTreeFocused () {\n const tree = this.renderRoot?.querySelector('[role=\"tree\"]')\n const activeElement = (this.renderRoot as ShadowRoot)?.activeElement ?? document.activeElement\n return !!tree && (tree.contains(activeElement) || document.activeElement === this)\n }\n\n private async focusResource (id: string | null, scroll = true, fromTreeEvent = false) {\n if (!id || (!fromTreeEvent && !this.isTreeFocused())) return\n this.activeResourceId = id\n await this.updateComplete\n const item = Array.from(this.renderRoot.querySelectorAll<HTMLElement>('[role=\"treeitem\"]'))\n .find(candidate => candidate.dataset.resourceId === id)\n if (!item?.isConnected) {\n this.pendingFocusResourceId = null\n return\n }\n if (!fromTreeEvent && !this.isTreeFocused()) return\n this.pendingFocusResourceId = id\n item.focus()\n this.pendingFocusResourceId = null\n if (scroll && typeof item.scrollIntoView === 'function') item.scrollIntoView({ block: 'nearest' })\n }\n\n private setActiveFromFocus (event: FocusEvent) {\n const item = (event.target as HTMLElement).closest<HTMLElement>('[role=\"treeitem\"]')\n if (this.pendingFocusResourceId && item?.dataset.resourceId !== this.pendingFocusResourceId) return\n if (item && (this.renderRoot as ShadowRoot)?.activeElement &&\n (this.renderRoot as ShadowRoot).activeElement !== item) return\n if (item?.dataset.resourceId) this.activeResourceId = item.dataset.resourceId\n }\n\n refreshResources (container?: NamedNode) {\n this.loadResources()\n if (!container || !this.subject || container.sameTerm(this.subject)) return\n\n const expanded = new Set(this.expandedContainers)\n let current = container\n while (!current.sameTerm(this.subject)) {\n expanded.add(current.value)\n const parent = current.dir()\n if (!parent || parent.sameTerm(current)) break\n current = parent\n }\n this.expandedContainers = expanded\n }\n\n private async toggleContainer (resource: Resource) {\n if (!resource.isContainer) return\n\n const generation = this.resourceGeneration\n const subject = this.subject\n const store = this.store\n const resourceLogic = this.resourceLogic\n const hadFocus = this.isTreeFocused()\n const nextExpandedContainers = new Set(this.expandedContainers)\n if (nextExpandedContainers.has(resource.id)) {\n nextExpandedContainers.delete(resource.id)\n this.expandedContainers = nextExpandedContainers\n return\n }\n\n const fetcher = this.store?.fetcher\n if (!fetcher) {\n this.reportExpansionError(resource)\n return\n }\n\n try {\n await fetcher.load(resource.subject)\n } catch (error) {\n if (generation !== this.resourceGeneration ||\n this.subject !== subject ||\n this.store !== store ||\n this.resourceLogic !== resourceLogic) return\n this.reportExpansionError(resource, error)\n return\n }\n\n if (generation !== this.resourceGeneration ||\n this.subject !== subject ||\n this.store !== store ||\n this.resourceLogic !== resourceLogic ||\n !this.getVisibleResources().some(candidate =>\n candidate.id === resource.id && candidate.subject.sameTerm(resource.subject))) return\n // Loading a container updates the RDF store asynchronously. Refresh the\n // root snapshot so a subsequent render sees the newly loaded members.\n if (this.store && this.subject) {\n this.resources = getResourcesForContainer(this.subject, this.resourceLogic)\n }\n this.expandedContainers = new Set(this.expandedContainers).add(resource.id)\n if (hadFocus && this.activeResourceId === resource.id && this.isTreeFocused()) {\n await this.updateComplete\n if (this.activeResourceId !== resource.id || !this.isTreeFocused()) return\n await this.focusResource(resource.id, false, true)\n }\n }\n\n private reportExpansionError (resource: Resource, error?: unknown) {\n if (error) debug.error('Unable to expand storage container', error)\n this.dispatchEvent(new CustomEvent('folder-pane-resource-error', {\n detail: {\n title: `Unable to load ${utils.label(resource.subject)}`,\n message: 'Try expanding the folder again.',\n retry: () => { void this.toggleContainer(resource) }\n },\n bubbles: true,\n composed: true\n }))\n }\n\n private isSelected (resource: Resource | null) {\n return resource ? this.selectedResource?.sameTerm(resource.subject) ?? false : false\n }\n\n private getHomeResource (): Resource | null {\n if (!this.subject) return null\n\n return {\n id: this.subject.value,\n subject: this.subject,\n parentId: null,\n isContainer: true,\n }\n }\n\n private selectResource (resource: Resource) {\n this.dispatchEvent(new CustomEvent('resource-selected', {\n detail: { resource: resource.subject },\n bubbles: true,\n composed: true,\n }))\n }\n\n private renderRow (\n resource: Resource,\n label: string,\n icon: unknown,\n expanded: boolean,\n toggle: () => void,\n special = false\n ) {\n const chevron = resource.isContainer\n ? html`\n <button\n class=\"resource-expand-button\"\n type=\"button\"\n tabindex=\"-1\"\n aria-label=${expanded ? `Collapse ${label}` : `Expand ${label}`}\n @click=${(event: MouseEvent) => {\n event.preventDefault()\n event.stopPropagation()\n void this.focusResource(resource.id, false).then(toggle)\n }}\n >\n ${expanded\n ? html`<icon-lucide-chevron-down></icon-lucide-chevron-down>`\n : html`<icon-lucide-chevron-right></icon-lucide-chevron-right>`}\n </button>\n `\n : html`<span class=\"resource-expand-spacer\" aria-hidden=\"true\"></span>`\n\n return html`\n <div\n ${ref(element => this.makeResourceDraggable(element, resource))}\n class=${special ? 'resource-row resource-row-special' : 'resource-row'}\n @click=${() => this.selectResource(resource)}\n >\n ${chevron}\n ${icon}\n <span class=\"resource-label\">${label}</span>\n </div>\n `\n }\n\n private renderItem (\n resource: Resource,\n label: string,\n icon: unknown,\n expanded: boolean,\n toggle: () => void,\n children: unknown,\n special = false\n ) {\n const selected = this.isSelected(resource)\n\n return html`\n <li\n class=${selected ? 'resource-item selected' : 'resource-item'}\n notSelectable=\"false\"\n role=\"treeitem\"\n tabindex=${this.activeResourceId === resource.id || this.activeResourceId === null && resource.id === this.getHomeResource()?.id ? '0' : '-1'}\n data-resource-id=${resource.id}\n aria-label=${label}\n aria-selected=${String(selected)}\n aria-expanded=${resource.isContainer ? String(expanded) : nothing}\n data-expanded=${String(expanded)}\n about=${resource.subject.toNT()}\n .subject=${resource.subject}\n @focusin=${this.setActiveFromFocus}\n @keydown=${(event: KeyboardEvent) => this.handleKeydown(event, resource, expanded, toggle)}\n >\n ${this.renderRow(resource, label, icon, expanded, toggle, special)}\n ${expanded ? children : nothing}\n </li>\n `\n }\n\n private handleKeydown (event: KeyboardEvent, resource: Resource, expanded: boolean, toggle: () => void) {\n if ((event.target as HTMLElement).closest('[role=\"treeitem\"]') !== event.currentTarget) return\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End', 'ArrowRight', 'ArrowLeft', 'Enter', ' '].includes(event.key)) return\n event.stopPropagation()\n // Keep the navigation origin current even when focusin was not emitted\n // (for example, repeated key events on the same DOM node).\n const currentId = (event.currentTarget as HTMLElement).dataset.resourceId ?? resource.id\n const currentResource = this.getVisibleResources().find(candidate => candidate.id === currentId)\n if (currentResource) {\n resource = currentResource\n expanded = resource.id === this.getHomeResource()?.id\n ? this.homeExpanded\n : this.expandedContainers.has(resource.id)\n toggle = () => {\n if (resource.id === this.getHomeResource()?.id) this.homeExpanded = !this.homeExpanded\n else void this.toggleContainer(resource)\n }\n }\n this.activeResourceId = currentId\n const focus = (id: string | null) => {\n if (id) {\n event.preventDefault()\n this.activeResourceId = id\n void this.focusResource(id, true, true)\n }\n }\n switch (event.key) {\n case 'ArrowDown':\n focus(this.getNextVisibleResourceId(resource.id))\n break\n case 'ArrowUp':\n focus(this.getPreviousVisibleResourceId(resource.id))\n break\n case 'Home':\n focus(this.getVisibleResourceIds()[0] ?? null)\n break\n case 'End':\n focus(this.getVisibleResourceIds().slice(-1)[0] ?? null)\n break\n case 'ArrowRight':\n if (!resource.isContainer) break\n if (!expanded) {\n event.preventDefault()\n void toggle()\n } else {\n focus(this.getFirstChildResource(resource)?.id ?? null)\n }\n break\n case 'ArrowLeft': {\n if (resource.isContainer && expanded) {\n event.preventDefault()\n void this.focusResource(resource.id, false, true).then(toggle)\n } else {\n focus(this.getParentResourceId(resource))\n }\n break\n }\n case 'Enter':\n case ' ':\n event.preventDefault()\n this.selectResource(resource)\n break\n }\n }\n\n private renderSpecialIcon (icon: SpecialIcon) {\n return html`<icon-lucide-folder></icon-lucide-folder>`\n }\n\n private renderResourceItem (resource: Resource, label = utils.label(resource.subject), specialIcon?: SpecialIcon) {\n const expanded = this.expandedContainers.has(resource.id)\n const children = resource.isContainer && expanded\n ? this.renderResourceGroup(getResourcesForContainer(resource.subject, this.resourceLogic))\n : nothing\n const icon = specialIcon\n ? this.renderSpecialIcon(specialIcon)\n : html`<icon-lucide-circle-small></icon-lucide-circle-small>`\n\n return this.renderItem(\n resource,\n label,\n icon,\n expanded,\n () => { void this.toggleContainer(resource) },\n children,\n Boolean(specialIcon)\n )\n }\n\n private renderResourceGroup (resources: ResourceMap | Resource[]) {\n const list = Array.isArray(resources) ? resources : [...resources.values()]\n if (list.length === 0) return nothing\n\n return html`\n <ul role=\"group\" class=\"resource-group\">\n ${repeat(list, (resource) => resource.id, (resource) => this.renderResourceItem(resource))}\n </ul>\n `\n }\n\n private renderTree () {\n const homeResource = this.getHomeResource()\n if (!homeResource) return nothing\n\n const orderedResources = [...this.resources.values()]\n\n return html`\n <ul role=\"tree\" class=\"resource-tree\" aria-label=\"Storage resources\">\n ${this.renderItem(\n homeResource,\n 'Home',\n this.renderSpecialIcon('folder'),\n this.homeExpanded,\n () => { this.homeExpanded = !this.homeExpanded },\n this.renderResourceGroup(orderedResources),\n true\n )}\n </ul>\n `\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n if (this.pendingFocusResourceId && !this.isTreeFocused()) {\n this.pendingFocusResourceId = null\n }\n if (changedProperties.has('subject')) {\n const hadFocus = this.isTreeFocused()\n this.focusHomeOnUpdate = !!this.subject &&\n (hadFocus || changedProperties.get('subject') === undefined)\n this.expandedContainers = new Set()\n this.homeExpanded = true\n this.activeResourceId = this.subject?.value ?? null\n }\n if (\n changedProperties.has('store') ||\n changedProperties.has('subject') ||\n changedProperties.has('resourceLogic')\n ) {\n this.loadResources()\n }\n }\n\n protected updated (changedProperties: PropertyValues<this>) {\n super.updated(changedProperties)\n if (this.focusHomeOnUpdate) {\n const home = this.renderRoot.querySelector<HTMLElement>('[role=\"treeitem\"]')\n if (home) {\n this.focusHomeOnUpdate = false\n home.focus()\n this.pendingFocusResourceId = null\n }\n return\n }\n if (this.pendingFocusResourceId) {\n const item = Array.from(this.renderRoot.querySelectorAll<HTMLElement>('[role=\"treeitem\"]'))\n .find(candidate => candidate.dataset.resourceId === this.pendingFocusResourceId)\n if (item?.isConnected) item.focus()\n this.pendingFocusResourceId = null\n }\n }\n\n render () {\n return html`\n <aside>\n ${keyed(this.subject?.value, this.renderTree())}\n </aside>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAA;CAAA;EAAAT;EAAA;EAAA;CAAA;CAAA;EAAAE;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,GAAArB,GAAA,GAAA,KAAA,GAve8CZ,CAAY,GAAAkC,IAAAgK,IAAA,cAAAC,GAAA;CAAA/J,cAAA;EAAA,MAAAvB,CAAA,GAAAsC,EAAA,MAAA,UACzC1C,CAAM,GAAAuL,EAAA;CAAA;AAAA,GAAA7I,EAAA+I,GAAApL,GAAA,KAAA,CAAA,GAAAoL,GAAA"}
@@ -1,2 +1,2 @@
1
- var e=require("lit").css`:host{flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden}:host aside{box-sizing:border-box;background:var(--solid-ui-color-neutral-50,#fafafa);scrollbar-width:thin;scrollbar-color:transparent transparent;border-radius:5px 0 0 5px;flex-direction:column;flex:auto;min-height:0;padding:17px 10px 0;display:flex;overflow:auto}:host aside::-webkit-scrollbar{width:6px}:host aside::-webkit-scrollbar-track{background:0 0}:host aside::-webkit-scrollbar-thumb{background:0 0;border-radius:999px}:host aside:hover{scrollbar-color:var(--solid-ui-color-gray-300,#d1d5dc) transparent}:host aside:hover::-webkit-scrollbar-thumb{background:var(--solid-ui-color-gray-300,#d1d5dc)}:host ul{list-style:none}:host .resource-tree{flex:auto;width:100%;margin:0;padding:0 0 10px}:host .resource-item{flex-direction:column;justify-content:center;align-self:stretch;align-items:flex-start;display:flex}:host .resource-group{flex-direction:column;align-self:stretch;align-items:flex-start;gap:4px;margin:0;padding:10px 5px 10px 25px;display:flex;position:relative}:host .resource-group:before{content:\"\";border-left:1px solid var(--solid-ui-color-gray-200,#cbd5e1);position:absolute;top:10px;bottom:10px;left:20px}:host .resource-row{color:var(--solid-ui-color-gray-500,#6a7282);font-size:var(--solid-ui-font-size-sm,.875rem);box-sizing:border-box;cursor:pointer;border-radius:5px;align-items:center;gap:10px;width:100%;padding:5px 15px 5px 10px;display:flex}:host .resource-row:hover{background:color-mix(in srgb, var(--solid-ui-color-gray-200,#cbd5e1) 40%, transparent)}:host .resource-row:focus-visible{outline:2px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:-2px}:host .resource-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}:host .resource-item.selected>.resource-row{background:var(--solid-ui-color-primary-selected);color:var(--solid-ui-color-primary)}:host .resource-item.selected>.resource-row icon-lucide-chevron-right,:host .resource-item.selected>.resource-row icon-lucide-circle-small{color:currentColor;stroke:currentColor}:host .resource-row-special icon-lucide-folder,:host .resource-row-special icon-lucide-globe,:host .resource-row-special icon-lucide-trash-2{flex-shrink:0;width:16px;height:16px}:host icon-lucide-circle-small{aspect-ratio:1;stroke-width:1px;width:6px;height:6px;stroke:var(--solid-ui-color-gray-500,#6a7282);flex-shrink:0}:host .resource-expand-button,:host .resource-expand-spacer{flex:0 0 16px;width:16px;height:16px}:host .resource-expand-button{color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}:host .resource-expand-button icon-lucide-chevron-right{width:16px;height:16px;color:var(--solid-ui-color-gray-300,#d1d5dc);transition:transform .12s}:host li[data-expanded=true]>.resource-row icon-lucide-chevron-right{transform:rotate(90deg)}`;exports.default=e;
1
+ var e=require("lit").css`:host{flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden}:host aside{box-sizing:border-box;background:var(--solid-ui-color-neutral-50,#fafafa);scrollbar-width:thin;scrollbar-color:transparent transparent;border-radius:5px 0 0 5px;flex-direction:column;flex:auto;min-height:0;padding:17px 10px 0;display:flex;overflow:auto}:host aside::-webkit-scrollbar{width:6px}:host aside::-webkit-scrollbar-track{background:0 0}:host aside::-webkit-scrollbar-thumb{background:0 0;border-radius:999px}:host aside:hover{scrollbar-color:var(--solid-ui-color-gray-300,#d1d5dc) transparent}:host aside:hover::-webkit-scrollbar-thumb{background:var(--solid-ui-color-gray-300,#d1d5dc)}:host ul{list-style:none}:host .resource-tree{flex:auto;width:100%;margin:0;padding:0 0 10px}:host .resource-item{flex-direction:column;justify-content:center;align-self:stretch;align-items:flex-start;display:flex}:host .resource-group{flex-direction:column;align-self:stretch;align-items:flex-start;gap:4px;margin:0;padding:0 5px 0 25px;display:flex;position:relative}:host .resource-group:before{content:\"\";border-left:1px solid var(--solid-ui-color-gray-200,#cbd5e1);position:absolute;top:10px;bottom:10px;left:20px}:host .resource-row{color:var(--solid-ui-color-gray-500,#6a7282);font-size:var(--solid-ui-font-size-sm,.875rem);box-sizing:border-box;cursor:pointer;border-radius:5px;align-items:center;gap:10px;width:100%;padding:5px 15px 5px 10px;display:flex}:host .resource-row:hover{background:color-mix(in srgb, var(--solid-ui-color-gray-200,#cbd5e1) 40%, transparent)}:host .resource-row:focus-visible,:host .resource-item:focus-visible>.resource-row{outline:1px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:-1px}:host .resource-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}:host .resource-item.selected>.resource-row{background:var(--solid-ui-color-primary-selected);color:var(--solid-ui-color-primary)}:host .resource-item.selected>.resource-row icon-lucide-chevron-right,:host .resource-item.selected>.resource-row icon-lucide-chevron-down,:host .resource-item.selected>.resource-row icon-lucide-circle-small{color:currentColor;stroke:currentColor}:host .resource-row-special icon-lucide-folder{flex-shrink:0;width:16px;height:16px}:host icon-lucide-circle-small{aspect-ratio:1;stroke-width:1px;width:6px;height:6px;stroke:var(--solid-ui-color-gray-500,#6a7282);flex-shrink:0}:host .resource-expand-button,:host .resource-expand-spacer{flex:0 0 16px;width:16px;height:16px}:host .resource-expand-button{color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}:host .resource-expand-button:focus-visible{outline:1px solid var(--solid-ui-color-lavender-300,#e6dcff);outline-offset:1px}:host .resource-expand-button icon-lucide-chevron-right,:host .resource-expand-button icon-lucide-chevron-down{width:16px;height:16px;color:var(--solid-ui-color-gray-300,#d1d5dc)}`;exports.default=e;
2
2
  //# sourceMappingURL=FolderPaneSidebar.styles.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneSidebar.styles.cjs.js","names":["FolderPaneSidebar_styles_default"],"sources":["../../../src/components/folder-pane-sidebar/FolderPaneSidebar.styles.css"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n\n aside {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n box-sizing: border-box;\n padding: 17px 10px 0;\n border-radius: 5px 0 0 5px;\n background: var(--solid-ui-color-neutral-50, #fafafa);\n /* Firefox */\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n }\n\n /* Chrome, Edge, Safari */\n aside::-webkit-scrollbar {\n width: 6px;\n }\n\n aside::-webkit-scrollbar-track {\n background: transparent;\n }\n\n aside::-webkit-scrollbar-thumb {\n background: transparent;\n border-radius: 999px;\n }\n\n aside:hover {\n scrollbar-color: var(--solid-ui-color-gray-300, #d1d5dc) transparent;\n }\n\n aside:hover::-webkit-scrollbar-thumb {\n background: var(--solid-ui-color-gray-300, #d1d5dc);\n }\n\n ul {\n list-style: none;\n }\n\n .resource-tree {\n flex: 1 1 auto;\n padding: 0 0 10px;\n margin: 0;\n width: 100%;\n }\n\n .resource-item {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n align-self: stretch;\n }\n\n .resource-group {\n position: relative;\n display: flex;\n margin: 0;\n padding: 10px 5px 10px 25px;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n align-self: stretch;\n }\n\n .resource-group::before {\n content: '';\n position: absolute;\n left: 20px;\n top: 10px;\n bottom: 10px;\n border-left: 1px solid var(--solid-ui-color-gray-200, #cbd5e1);\n }\n\n .resource-row {\n color: var(--solid-ui-color-gray-500, #6a7282);\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: var(--solid-ui-font-size-sm, .875rem);\n width: 100%;\n box-sizing: border-box;\n padding: 5px 15px 5px 10px;\n cursor: pointer;\n border-radius: 5px;\n }\n\n .resource-row:hover {\n background: color-mix(in srgb, var(--solid-ui-color-gray-200, #cbd5e1) 40%, transparent);\n }\n\n .resource-row:focus-visible {\n outline: 2px solid var(--solid-ui-color-primary, #7c4dff);\n outline-offset: -2px;\n }\n\n .resource-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .resource-item.selected > .resource-row {\n background: var(--solid-ui-color-primary-selected);\n color: var(--solid-ui-color-primary);\n }\n\n .resource-item.selected > .resource-row icon-lucide-chevron-right,\n .resource-item.selected > .resource-row icon-lucide-circle-small {\n color: currentColor;\n stroke: currentColor;\n }\n\n .resource-row-special icon-lucide-folder,\n .resource-row-special icon-lucide-globe,\n .resource-row-special icon-lucide-trash-2 {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n }\n\n icon-lucide-circle-small {\n width: 6px;\n height: 6px;\n flex-shrink: 0;\n aspect-ratio: 1/1;\n stroke-width: 1px;\n stroke: var(--solid-ui-color-gray-500, #6a7282);\n }\n\n .resource-expand-button,\n .resource-expand-spacer {\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n }\n\n .resource-expand-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n }\n\n .resource-expand-button icon-lucide-chevron-right {\n width: 16px;\n height: 16px;\n /* The lucide icon strokes with currentColor, so fill has no effect. */\n color: var(--solid-ui-color-gray-300, #d1d5dc);\n transition: transform 120ms ease;\n }\n\n li[data-expanded='true'] > .resource-row icon-lucide-chevron-right {\n transform: rotate(90deg);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FolderPaneSidebar.styles.cjs.js","names":["FolderPaneSidebar_styles_default"],"sources":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import { css as e } from "lit";
2
2
  // src/components/folder-pane-sidebar/FolderPaneSidebar.styles.css
3
- var t = e`:host{flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden}:host aside{box-sizing:border-box;background:var(--solid-ui-color-neutral-50,#fafafa);scrollbar-width:thin;scrollbar-color:transparent transparent;border-radius:5px 0 0 5px;flex-direction:column;flex:auto;min-height:0;padding:17px 10px 0;display:flex;overflow:auto}:host aside::-webkit-scrollbar{width:6px}:host aside::-webkit-scrollbar-track{background:0 0}:host aside::-webkit-scrollbar-thumb{background:0 0;border-radius:999px}:host aside:hover{scrollbar-color:var(--solid-ui-color-gray-300,#d1d5dc) transparent}:host aside:hover::-webkit-scrollbar-thumb{background:var(--solid-ui-color-gray-300,#d1d5dc)}:host ul{list-style:none}:host .resource-tree{flex:auto;width:100%;margin:0;padding:0 0 10px}:host .resource-item{flex-direction:column;justify-content:center;align-self:stretch;align-items:flex-start;display:flex}:host .resource-group{flex-direction:column;align-self:stretch;align-items:flex-start;gap:4px;margin:0;padding:10px 5px 10px 25px;display:flex;position:relative}:host .resource-group:before{content:\"\";border-left:1px solid var(--solid-ui-color-gray-200,#cbd5e1);position:absolute;top:10px;bottom:10px;left:20px}:host .resource-row{color:var(--solid-ui-color-gray-500,#6a7282);font-size:var(--solid-ui-font-size-sm,.875rem);box-sizing:border-box;cursor:pointer;border-radius:5px;align-items:center;gap:10px;width:100%;padding:5px 15px 5px 10px;display:flex}:host .resource-row:hover{background:color-mix(in srgb, var(--solid-ui-color-gray-200,#cbd5e1) 40%, transparent)}:host .resource-row:focus-visible{outline:2px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:-2px}:host .resource-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}:host .resource-item.selected>.resource-row{background:var(--solid-ui-color-primary-selected);color:var(--solid-ui-color-primary)}:host .resource-item.selected>.resource-row icon-lucide-chevron-right,:host .resource-item.selected>.resource-row icon-lucide-circle-small{color:currentColor;stroke:currentColor}:host .resource-row-special icon-lucide-folder,:host .resource-row-special icon-lucide-globe,:host .resource-row-special icon-lucide-trash-2{flex-shrink:0;width:16px;height:16px}:host icon-lucide-circle-small{aspect-ratio:1;stroke-width:1px;width:6px;height:6px;stroke:var(--solid-ui-color-gray-500,#6a7282);flex-shrink:0}:host .resource-expand-button,:host .resource-expand-spacer{flex:0 0 16px;width:16px;height:16px}:host .resource-expand-button{color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}:host .resource-expand-button icon-lucide-chevron-right{width:16px;height:16px;color:var(--solid-ui-color-gray-300,#d1d5dc);transition:transform .12s}:host li[data-expanded=true]>.resource-row icon-lucide-chevron-right{transform:rotate(90deg)}`;
3
+ var t = e`:host{flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden}:host aside{box-sizing:border-box;background:var(--solid-ui-color-neutral-50,#fafafa);scrollbar-width:thin;scrollbar-color:transparent transparent;border-radius:5px 0 0 5px;flex-direction:column;flex:auto;min-height:0;padding:17px 10px 0;display:flex;overflow:auto}:host aside::-webkit-scrollbar{width:6px}:host aside::-webkit-scrollbar-track{background:0 0}:host aside::-webkit-scrollbar-thumb{background:0 0;border-radius:999px}:host aside:hover{scrollbar-color:var(--solid-ui-color-gray-300,#d1d5dc) transparent}:host aside:hover::-webkit-scrollbar-thumb{background:var(--solid-ui-color-gray-300,#d1d5dc)}:host ul{list-style:none}:host .resource-tree{flex:auto;width:100%;margin:0;padding:0 0 10px}:host .resource-item{flex-direction:column;justify-content:center;align-self:stretch;align-items:flex-start;display:flex}:host .resource-group{flex-direction:column;align-self:stretch;align-items:flex-start;gap:4px;margin:0;padding:0 5px 0 25px;display:flex;position:relative}:host .resource-group:before{content:\"\";border-left:1px solid var(--solid-ui-color-gray-200,#cbd5e1);position:absolute;top:10px;bottom:10px;left:20px}:host .resource-row{color:var(--solid-ui-color-gray-500,#6a7282);font-size:var(--solid-ui-font-size-sm,.875rem);box-sizing:border-box;cursor:pointer;border-radius:5px;align-items:center;gap:10px;width:100%;padding:5px 15px 5px 10px;display:flex}:host .resource-row:hover{background:color-mix(in srgb, var(--solid-ui-color-gray-200,#cbd5e1) 40%, transparent)}:host .resource-row:focus-visible,:host .resource-item:focus-visible>.resource-row{outline:1px solid var(--solid-ui-color-primary,#7c4dff);outline-offset:-1px}:host .resource-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}:host .resource-item.selected>.resource-row{background:var(--solid-ui-color-primary-selected);color:var(--solid-ui-color-primary)}:host .resource-item.selected>.resource-row icon-lucide-chevron-right,:host .resource-item.selected>.resource-row icon-lucide-chevron-down,:host .resource-item.selected>.resource-row icon-lucide-circle-small{color:currentColor;stroke:currentColor}:host .resource-row-special icon-lucide-folder{flex-shrink:0;width:16px;height:16px}:host icon-lucide-circle-small{aspect-ratio:1;stroke-width:1px;width:6px;height:6px;stroke:var(--solid-ui-color-gray-500,#6a7282);flex-shrink:0}:host .resource-expand-button,:host .resource-expand-spacer{flex:0 0 16px;width:16px;height:16px}:host .resource-expand-button{color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}:host .resource-expand-button:focus-visible{outline:1px solid var(--solid-ui-color-lavender-300,#e6dcff);outline-offset:1px}:host .resource-expand-button icon-lucide-chevron-right,:host .resource-expand-button icon-lucide-chevron-down{width:16px;height:16px;color:var(--solid-ui-color-gray-300,#d1d5dc)}`;
4
4
  export { t as default };
5
5
 
6
6
  //# sourceMappingURL=FolderPaneSidebar.styles.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneSidebar.styles.esm.js","names":["FolderPaneSidebar_styles_default"],"sources":["../../../src/components/folder-pane-sidebar/FolderPaneSidebar.styles.css"],"sourcesContent":[":host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n\n aside {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n box-sizing: border-box;\n padding: 17px 10px 0;\n border-radius: 5px 0 0 5px;\n background: var(--solid-ui-color-neutral-50, #fafafa);\n /* Firefox */\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n }\n\n /* Chrome, Edge, Safari */\n aside::-webkit-scrollbar {\n width: 6px;\n }\n\n aside::-webkit-scrollbar-track {\n background: transparent;\n }\n\n aside::-webkit-scrollbar-thumb {\n background: transparent;\n border-radius: 999px;\n }\n\n aside:hover {\n scrollbar-color: var(--solid-ui-color-gray-300, #d1d5dc) transparent;\n }\n\n aside:hover::-webkit-scrollbar-thumb {\n background: var(--solid-ui-color-gray-300, #d1d5dc);\n }\n\n ul {\n list-style: none;\n }\n\n .resource-tree {\n flex: 1 1 auto;\n padding: 0 0 10px;\n margin: 0;\n width: 100%;\n }\n\n .resource-item {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n align-self: stretch;\n }\n\n .resource-group {\n position: relative;\n display: flex;\n margin: 0;\n padding: 10px 5px 10px 25px;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n align-self: stretch;\n }\n\n .resource-group::before {\n content: '';\n position: absolute;\n left: 20px;\n top: 10px;\n bottom: 10px;\n border-left: 1px solid var(--solid-ui-color-gray-200, #cbd5e1);\n }\n\n .resource-row {\n color: var(--solid-ui-color-gray-500, #6a7282);\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: var(--solid-ui-font-size-sm, .875rem);\n width: 100%;\n box-sizing: border-box;\n padding: 5px 15px 5px 10px;\n cursor: pointer;\n border-radius: 5px;\n }\n\n .resource-row:hover {\n background: color-mix(in srgb, var(--solid-ui-color-gray-200, #cbd5e1) 40%, transparent);\n }\n\n .resource-row:focus-visible {\n outline: 2px solid var(--solid-ui-color-primary, #7c4dff);\n outline-offset: -2px;\n }\n\n .resource-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .resource-item.selected > .resource-row {\n background: var(--solid-ui-color-primary-selected);\n color: var(--solid-ui-color-primary);\n }\n\n .resource-item.selected > .resource-row icon-lucide-chevron-right,\n .resource-item.selected > .resource-row icon-lucide-circle-small {\n color: currentColor;\n stroke: currentColor;\n }\n\n .resource-row-special icon-lucide-folder,\n .resource-row-special icon-lucide-globe,\n .resource-row-special icon-lucide-trash-2 {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n }\n\n icon-lucide-circle-small {\n width: 6px;\n height: 6px;\n flex-shrink: 0;\n aspect-ratio: 1/1;\n stroke-width: 1px;\n stroke: var(--solid-ui-color-gray-500, #6a7282);\n }\n\n .resource-expand-button,\n .resource-expand-spacer {\n flex: 0 0 16px;\n width: 16px;\n height: 16px;\n }\n\n .resource-expand-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n }\n\n .resource-expand-button icon-lucide-chevron-right {\n width: 16px;\n height: 16px;\n /* The lucide icon strokes with currentColor, so fill has no effect. */\n color: var(--solid-ui-color-gray-300, #d1d5dc);\n transition: transform 120ms ease;\n }\n\n li[data-expanded='true'] > .resource-row icon-lucide-chevron-right {\n transform: rotate(90deg);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FolderPaneSidebar.styles.esm.js","names":["FolderPaneSidebar_styles_default"],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneCreateDialog.cjs.js","names":["DialogComponent","customElement","html","property","query","state","getCreationDialogText","invalidCreationNameMessage","isSafeCreationName","styles","_classDecs","_FolderPaneCreateDial","_FolderPaneCreateDial2","_A","WeakMap","_B","_C","_D","_ref","_labelDecs","attribute","_nameDecs","_validationMessageDecs","_nameInputDecs","_FolderPaneCreateDialog","FolderPaneCreateDialog","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_label","_init_name","_init_validationMessage","_init_nameInput","_defineProperty","close","name","trim","validationMessage","event","target","value","key","preventDefault","confirm","_classPrivateFieldGet","label","v","_classPrivateFieldSet","nameInput","firstUpdated","requestAnimationFrame","focus","setSelectionRange","length","render","paneLabel","title","placeholder","displayLabel","slice","fieldLabel","cancel","onNameInput","onNameKeydown","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","property","state","query","DialogComponent","isSafeCreationName","invalidCreationNameMessage","getCreationDialogText","styles","require_helpers","require_creationSafety","require_FolderPaneCreateDialog_styles","solid_ui","lit","lit_decorators_js","_Class","_FolderPaneCreateDialog","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_labelDecs","_init_label","_nameDecs","_init_name","_validationMessageDecs","_init_validationMessage","_nameInputDecs","_init_nameInput","_FolderPaneCreateDial2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_FolderPaneCreateDial","args","name","event","paneLabel","fieldLabel","title","placeholder"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.ts"],"sourcesContent":["import { DialogComponent, customElement } from 'solid-ui'\nimport { html } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { getCreationDialogText } from '../../helpers'\nimport { invalidCreationNameMessage, isSafeCreationName } from '../../creationSafety'\nimport styles from './FolderPaneCreateDialog.styles.css'\n\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/dialog'\nimport 'solid-ui/components/dialog-content'\nimport 'solid-ui/components/dialog-footer'\nimport 'solid-ui/components/dialog-header'\nimport '~icons/lucide/x'\n\n@customElement('folder-pane-create-dialog')\nexport default class FolderPaneCreateDialog extends DialogComponent<string> {\n static styles = styles\n\n @property({ attribute: false })\n accessor label: string | null = null\n\n @state()\n accessor name = ''\n\n @state()\n accessor validationMessage = ''\n\n @query('input')\n private accessor nameInput: HTMLInputElement | null = null\n\n private cancel = () => this.close()\n\n private confirm = () => {\n const name = this.name.trim()\n\n if (!isSafeCreationName(name)) {\n this.validationMessage = invalidCreationNameMessage\n return\n }\n\n this.close(name)\n }\n\n private onNameInput = (event: Event) => {\n this.name = (event.target as HTMLInputElement).value\n this.validationMessage = ''\n }\n\n private onNameKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n this.confirm()\n }\n }\n\n protected firstUpdated () {\n requestAnimationFrame(() => {\n this.nameInput?.focus()\n this.nameInput?.setSelectionRange(0, this.nameInput.value.length)\n })\n }\n\n protected render () {\n const paneLabel = this.label ?? 'Container'\n const { title, placeholder } = getCreationDialogText(paneLabel)\n const displayLabel = title.slice(4)\n const fieldLabel = `${displayLabel} name`\n\n return html`\n <solid-ui-dialog>\n <solid-ui-dialog-header slot=\"header\" class=\"folder-pane-create-dialog-header\">\n <h1>${title}</h1>\n <solid-ui-button variant=\"ghost\" @click=${this.cancel} title=\"Close\" aria-label=\"Close\">\n <icon-lucide-x slot=\"icon\"></icon-lucide-x>\n </solid-ui-button>\n </solid-ui-dialog-header>\n <solid-ui-dialog-content>\n <label class=\"folder-pane-create-dialog-label\">\n <span>${fieldLabel}</span>\n <input\n type=\"text\"\n placeholder=${placeholder}\n .value=${this.name}\n @input=${this.onNameInput}\n @keydown=${this.onNameKeydown}\n />\n ${this.validationMessage\n ? html`<span class=\"folder-pane-create-dialog-error\" role=\"alert\">${this.validationMessage}</span>`\n : ''}\n </label>\n </solid-ui-dialog-content>\n <solid-ui-dialog-footer>\n <solid-ui-button variant=\"secondary\" @click=${this.cancel}>\n Cancel\n </solid-ui-button>\n <solid-ui-button ?disabled=${!this.name.trim()} @click=${this.confirm}>\n Create\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </solid-ui-dialog>\n `\n }\n}\n"],"mappings":"A,ukJAYwBU,EAAA,EAAA,EAEvBT,EAAAA,cAAAA,CAAc,2BAA2B,CAAC,EAAA,IAAAU,EAAA,IAAAC,G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A,WAAA,CAAA,EAAAb,EAAA,EAAA,IAAA,GAvFmDV,EAAAA,eAAe,EAAAwB,GAAA6C,EAAA,cAAAC,CAAA,CAAA5C,aAAA,CAAA,MAAAf,CAAA,EAAAuB,EAAA,KAAA,SACjDzB,EAAAA,OAAM,EAAA0D,EAAA,CAAA,CAAA,EAAAjC,EAAAmC,EAAAzD,EAAA,IAAA,EAAA,EAAAyD,G"}
1
+ {"version":3,"file":"FolderPaneCreateDialog.cjs.js","names":["DialogComponent","customElement","html","property","query","state","getCreationDialogText","invalidCreationNameMessage","isSafeCreationName","styles","_classDecs","_FolderPaneCreateDial","_FolderPaneCreateDial2","_A","WeakMap","_B","_C","_D","_ref","_labelDecs","attribute","_nameDecs","_validationMessageDecs","_nameInputDecs","_FolderPaneCreateDialog","FolderPaneCreateDialog","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_label","_init_name","_init_validationMessage","_init_nameInput","_defineProperty","close","name","trim","validationMessage","event","target","value","key","preventDefault","confirm","_classPrivateFieldGet","label","v","_classPrivateFieldSet","nameInput","firstUpdated","requestAnimationFrame","focus","setSelectionRange","length","render","paneLabel","title","placeholder","displayLabel","slice","fieldLabel","cancel","onNameInput","onNameKeydown","e","c","_initClass","_applyDecs","_Class","_identity","require_helpers","require_creationSafety","require_FolderPaneCreateDialog_styles","solid_ui","lit","lit_decorators_js","_Class","_FolderPaneCreateDialog","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_labelDecs","_init_label","_nameDecs","_init_name","_validationMessageDecs","_init_validationMessage","_nameInputDecs","_init_nameInput","_FolderPaneCreateDial2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_FolderPaneCreateDial","args","name","event","paneLabel","fieldLabel","title","placeholder"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.ts"],"sourcesContent":["import { DialogComponent, customElement } from 'solid-ui'\nimport { html } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { getCreationDialogText } from '../../helpers'\nimport { invalidCreationNameMessage, isSafeCreationName } from '../../creationSafety'\nimport styles from './FolderPaneCreateDialog.styles.css'\n\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/dialog'\nimport 'solid-ui/components/dialog-content'\nimport 'solid-ui/components/dialog-footer'\nimport 'solid-ui/components/dialog-header'\nimport '~icons/lucide/x'\n\n@customElement('folder-pane-create-dialog')\nexport default class FolderPaneCreateDialog extends DialogComponent<string> {\n static styles = styles\n\n @property({ attribute: false })\n accessor label: string | null = null\n\n @state()\n accessor name = ''\n\n @state()\n accessor validationMessage = ''\n\n @query('input')\n private accessor nameInput: HTMLInputElement | null = null\n\n private cancel = () => this.close()\n\n private confirm = () => {\n const name = this.name.trim()\n\n if (!isSafeCreationName(name)) {\n this.validationMessage = invalidCreationNameMessage\n return\n }\n\n this.close(name)\n }\n\n private onNameInput = (event: Event) => {\n this.name = (event.target as HTMLInputElement).value\n this.validationMessage = ''\n }\n\n private onNameKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n this.confirm()\n }\n }\n\n protected firstUpdated () {\n requestAnimationFrame(() => {\n this.nameInput?.focus()\n this.nameInput?.setSelectionRange(0, this.nameInput.value.length)\n })\n }\n\n protected render () {\n const paneLabel = this.label ?? 'Container'\n const { title, placeholder } = getCreationDialogText(paneLabel)\n const displayLabel = title.slice(4)\n const fieldLabel = `${displayLabel} name`\n\n return html`\n <solid-ui-dialog>\n <solid-ui-dialog-header slot=\"header\" class=\"folder-pane-create-dialog-header\">\n <h1>${title}</h1>\n <solid-ui-button variant=\"ghost\" @click=${this.cancel} title=\"Close\" aria-label=\"Close\">\n <icon-lucide-x slot=\"icon\"></icon-lucide-x>\n </solid-ui-button>\n </solid-ui-dialog-header>\n <solid-ui-dialog-content>\n <label class=\"folder-pane-create-dialog-label\">\n <span>${fieldLabel}</span>\n <input\n type=\"text\"\n placeholder=${placeholder}\n .value=${this.name}\n @input=${this.onNameInput}\n @keydown=${this.onNameKeydown}\n />\n ${this.validationMessage\n ? html`<span class=\"folder-pane-create-dialog-error\" role=\"alert\">${this.validationMessage}</span>`\n : ''}\n </label>\n </solid-ui-dialog-content>\n <solid-ui-dialog-footer>\n <solid-ui-button variant=\"secondary\" @click=${this.cancel}>\n Cancel\n </solid-ui-button>\n <solid-ui-button ?disabled=${!this.name.trim()} @click=${this.confirm}>\n Create\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </solid-ui-dialog>\n `\n }\n}\n"],"mappings":"A,ukJAYwBU,EAAA,EAAA,EAEvBT,EAAAA,cAAAA,CAAc,2BAA2B,CAAC,EAAA,IAAAU,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,GAAAC,GAAAA,EAIxChB,EAAAA,SAAAA,CAAS,CAAEiB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BhB,EAAAA,MAAAA,CAAM,EAACiB,GAAAA,EAGPjB,EAAAA,MAAAA,CAAM,EAACkB,GAAAA,EAGPnB,EAAAA,MAAAA,CAAM,OAAO,EAAC,SAAAoB,EAbjB,cACoDxB,EAAAA,eAAwB,CAAA0B,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAf,GAAAgB,EAAA,IAAA,EAAAC,EAAA,KAI1C,IAAI,EAAA,EAAAF,EAAA,KAAAb,EAAAgB,EAAA,KAGpB,EAAE,CAAA,EAAAH,EAAA,KAAAZ,EAAAgB,EAAA,KAGW,EAAE,CAAA,EAAAJ,EAAA,KAAAX,EAAAgB,EAAA,KAGuB,IAAI,CAAA,EAAAC,EAAA,KAAA,aAEnC,KAAKC,MAAM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GAAAA,IAAI;;;gBAGCuD,EAAK;oDAC+B,KAAKK,OAAM;;;;;;oBAM3CD,EAAU;;;4BAGFH,EAAW;uBAChB,KAAKtB,KAAI;uBACT,KAAK2B,YAAW;yBACd,KAAKC,cAAa;;cAE7B,KAAK1B,kBACHpC,EAAAA,IAAI,8DAA8D,KAAKoC,kBAAiB,SACxF,GAAE;;;;wDAIsC,KAAKwB,OAAM;;;uCAG5B,CAAC,KAAK1B,KAAKC,KAAK,EAAC,UAAW,KAAKO,QAAO;;;;;KAM7E,CACF,EAAC,CAAAqB,EAAA,CAAAnC,EAAAC,EAAAC,EAAAC,EAAAJ,GAAAqC,EAAA,CAAAvD,EAAAwD,IAAAC,EAAA5C,EAAA,CAAA,CAAAL,EAAA,EAAA,OAAA,EAAA,CAAAE,EAAA,EAAA,MAAA,EAAA,CAAAC,EAAA,EAAA,mBAAA,EAAA,CAAAC,EAAA,EAAA,WAAA,CAAA,EAAAb,EAAA,EAAA,IAAA,GAvFmDV,EAAAA,eAAe,EAAAwB,GAAA6C,EAAA,cAAAC,CAAA,CAAA5C,aAAA,CAAA,MAAAf,CAAA,EAAAuB,EAAA,KAAA,SACjDzB,EAAAA,OAAM,EAAA0D,EAAA,CAAA,CAAA,EAAAjC,EAAAmC,EAAAzD,EAAA,IAAA,EAAA,EAAAyD,G"}
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneCreateDialog.esm.js","names":["DialogComponent","customElement","html","property","query","state","getCreationDialogText","invalidCreationNameMessage","isSafeCreationName","styles","_classDecs","_FolderPaneCreateDial","_FolderPaneCreateDial2","_A","WeakMap","_B","_C","_D","_ref","_labelDecs","attribute","_nameDecs","_validationMessageDecs","_nameInputDecs","_FolderPaneCreateDialog","FolderPaneCreateDialog","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_label","_init_name","_init_validationMessage","_init_nameInput","_defineProperty","close","name","trim","validationMessage","event","target","value","key","preventDefault","confirm","_classPrivateFieldGet","label","v","_classPrivateFieldSet","nameInput","firstUpdated","requestAnimationFrame","focus","setSelectionRange","length","render","paneLabel","title","placeholder","displayLabel","slice","fieldLabel","cancel","onNameInput","onNameKeydown","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","FolderPaneCreateDialog_styles_default","_Class","_FolderPaneCreateDialog","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_labelDecs","_init_label","_nameDecs","_init_name","_validationMessageDecs","_init_validationMessage","_nameInputDecs","_init_nameInput","_FolderPaneCreateDial2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_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","_identity","customElement","_FolderPaneCreateDial","property","state","query","DialogComponent","args","name","isSafeCreationName","invalidCreationNameMessage","event","paneLabel","getCreationDialogText","fieldLabel","title","placeholder"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.ts"],"sourcesContent":["import { DialogComponent, customElement } from 'solid-ui'\nimport { html } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { getCreationDialogText } from '../../helpers'\nimport { invalidCreationNameMessage, isSafeCreationName } from '../../creationSafety'\nimport styles from './FolderPaneCreateDialog.styles.css'\n\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/dialog'\nimport 'solid-ui/components/dialog-content'\nimport 'solid-ui/components/dialog-footer'\nimport 'solid-ui/components/dialog-header'\nimport '~icons/lucide/x'\n\n@customElement('folder-pane-create-dialog')\nexport default class FolderPaneCreateDialog extends DialogComponent<string> {\n static styles = styles\n\n @property({ attribute: false })\n accessor label: string | null = null\n\n @state()\n accessor name = ''\n\n @state()\n accessor validationMessage = ''\n\n @query('input')\n private accessor nameInput: HTMLInputElement | null = null\n\n private cancel = () => this.close()\n\n private confirm = () => {\n const name = this.name.trim()\n\n if (!isSafeCreationName(name)) {\n this.validationMessage = invalidCreationNameMessage\n return\n }\n\n this.close(name)\n }\n\n private onNameInput = (event: Event) => {\n this.name = (event.target as HTMLInputElement).value\n this.validationMessage = ''\n }\n\n private onNameKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n this.confirm()\n }\n }\n\n protected firstUpdated () {\n requestAnimationFrame(() => {\n this.nameInput?.focus()\n this.nameInput?.setSelectionRange(0, this.nameInput.value.length)\n })\n }\n\n protected render () {\n const paneLabel = this.label ?? 'Container'\n const { title, placeholder } = getCreationDialogText(paneLabel)\n const displayLabel = title.slice(4)\n const fieldLabel = `${displayLabel} name`\n\n return html`\n <solid-ui-dialog>\n <solid-ui-dialog-header slot=\"header\" class=\"folder-pane-create-dialog-header\">\n <h1>${title}</h1>\n <solid-ui-button variant=\"ghost\" @click=${this.cancel} title=\"Close\" aria-label=\"Close\">\n <icon-lucide-x slot=\"icon\"></icon-lucide-x>\n </solid-ui-button>\n </solid-ui-dialog-header>\n <solid-ui-dialog-content>\n <label class=\"folder-pane-create-dialog-label\">\n <span>${fieldLabel}</span>\n <input\n type=\"text\"\n placeholder=${placeholder}\n .value=${this.name}\n @input=${this.onNameInput}\n @keydown=${this.onNameKeydown}\n />\n ${this.validationMessage\n ? html`<span class=\"folder-pane-create-dialog-error\" role=\"alert\">${this.validationMessage}</span>`\n : ''}\n </label>\n </solid-ui-dialog-content>\n <solid-ui-dialog-footer>\n <solid-ui-button variant=\"secondary\" @click=${this.cancel}>\n Cancel\n </solid-ui-button>\n <solid-ui-button ?disabled=${!this.name.trim()} @click=${this.confirm}>\n Create\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </solid-ui-dialog>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAb,GAAA,GAAA,KAAA,GAvFmDV,CAAe,GAAAwB,IAAA6C,IAAA,cAAAC,EAAA;CAAA5C,cAAA;EAAA,MAAAf,CAAA,GAAAuB,EAAA,MAAA,UACjDzB,CAAM,GAAA0D,EAAA;CAAA;AAAA,GAAAjC,EAAAmC,GAAAzD,GAAA,KAAA,CAAA,GAAAyD,GAAA"}
1
+ {"version":3,"file":"FolderPaneCreateDialog.esm.js","names":["DialogComponent","customElement","html","property","query","state","getCreationDialogText","invalidCreationNameMessage","isSafeCreationName","styles","_classDecs","_FolderPaneCreateDial","_FolderPaneCreateDial2","_A","WeakMap","_B","_C","_D","_ref","_labelDecs","attribute","_nameDecs","_validationMessageDecs","_nameInputDecs","_FolderPaneCreateDialog","FolderPaneCreateDialog","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_label","_init_name","_init_validationMessage","_init_nameInput","_defineProperty","close","name","trim","validationMessage","event","target","value","key","preventDefault","confirm","_classPrivateFieldGet","label","v","_classPrivateFieldSet","nameInput","firstUpdated","requestAnimationFrame","focus","setSelectionRange","length","render","paneLabel","title","placeholder","displayLabel","slice","fieldLabel","cancel","onNameInput","onNameKeydown","e","c","_initClass","_applyDecs","_Class","_identity","FolderPaneCreateDialog_styles_default","_Class","_FolderPaneCreateDialog","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_labelDecs","_init_label","_nameDecs","_init_name","_validationMessageDecs","_init_validationMessage","_nameInputDecs","_init_nameInput","_FolderPaneCreateDial2","_ref","_classPrivateFieldInitSpec","a","_checkPrivateRedeclaration","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_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","_identity","customElement","_FolderPaneCreateDial","property","state","query","DialogComponent","args","name","isSafeCreationName","invalidCreationNameMessage","event","paneLabel","getCreationDialogText","fieldLabel","title","placeholder"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.ts"],"sourcesContent":["import { DialogComponent, customElement } from 'solid-ui'\nimport { html } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { getCreationDialogText } from '../../helpers'\nimport { invalidCreationNameMessage, isSafeCreationName } from '../../creationSafety'\nimport styles from './FolderPaneCreateDialog.styles.css'\n\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/dialog'\nimport 'solid-ui/components/dialog-content'\nimport 'solid-ui/components/dialog-footer'\nimport 'solid-ui/components/dialog-header'\nimport '~icons/lucide/x'\n\n@customElement('folder-pane-create-dialog')\nexport default class FolderPaneCreateDialog extends DialogComponent<string> {\n static styles = styles\n\n @property({ attribute: false })\n accessor label: string | null = null\n\n @state()\n accessor name = ''\n\n @state()\n accessor validationMessage = ''\n\n @query('input')\n private accessor nameInput: HTMLInputElement | null = null\n\n private cancel = () => this.close()\n\n private confirm = () => {\n const name = this.name.trim()\n\n if (!isSafeCreationName(name)) {\n this.validationMessage = invalidCreationNameMessage\n return\n }\n\n this.close(name)\n }\n\n private onNameInput = (event: Event) => {\n this.name = (event.target as HTMLInputElement).value\n this.validationMessage = ''\n }\n\n private onNameKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n this.confirm()\n }\n }\n\n protected firstUpdated () {\n requestAnimationFrame(() => {\n this.nameInput?.focus()\n this.nameInput?.setSelectionRange(0, this.nameInput.value.length)\n })\n }\n\n protected render () {\n const paneLabel = this.label ?? 'Container'\n const { title, placeholder } = getCreationDialogText(paneLabel)\n const displayLabel = title.slice(4)\n const fieldLabel = `${displayLabel} name`\n\n return html`\n <solid-ui-dialog>\n <solid-ui-dialog-header slot=\"header\" class=\"folder-pane-create-dialog-header\">\n <h1>${title}</h1>\n <solid-ui-button variant=\"ghost\" @click=${this.cancel} title=\"Close\" aria-label=\"Close\">\n <icon-lucide-x slot=\"icon\"></icon-lucide-x>\n </solid-ui-button>\n </solid-ui-dialog-header>\n <solid-ui-dialog-content>\n <label class=\"folder-pane-create-dialog-label\">\n <span>${fieldLabel}</span>\n <input\n type=\"text\"\n placeholder=${placeholder}\n .value=${this.name}\n @input=${this.onNameInput}\n @keydown=${this.onNameKeydown}\n />\n ${this.validationMessage\n ? html`<span class=\"folder-pane-create-dialog-error\" role=\"alert\">${this.validationMessage}</span>`\n : ''}\n </label>\n </solid-ui-dialog-content>\n <solid-ui-dialog-footer>\n <solid-ui-button variant=\"secondary\" @click=${this.cancel}>\n Cancel\n </solid-ui-button>\n <solid-ui-button ?disabled=${!this.name.trim()} @click=${this.confirm}>\n Create\n </solid-ui-button>\n </solid-ui-dialog-footer>\n </solid-ui-dialog>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYwBU,IAAA,CAEvBT,EAAc,2BAA2B,CAAC;AAAA,IAAAU;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAAA,GAAAC,kBAAA,IAAAD,QAAA,GAAAE,kBAAA,IAAAF,QAAA,GAAAG,kBAAA,IAAAH,QAAA,GAAAI,KAAAC,IAIxChB,EAAS,EAAEiB,WAAW,GAAM,CAAC,GAACC,IAG9BhB,EAAM,GAACiB,IAGPjB,EAAM,GAACkB,IAGPnB,EAAM,OAAO,GAAC,UAAAoB,IAbjB,cACoDxB,EAAwB;CAAA0B,YAAA,GAAAC,GAAA;EA+BzEO,AA/ByE,MAAA,GAAAP,CAAA,GAAAC,EAAA,MAAAf,IAAAgB,EAAA,IAAA,GAAAC,EAAA,MAI1C,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,kBAAkB,GAAG,KAAKJ,UAAUR,MAAMa,MAAM;EAClE,CAAC;CACH;CAEUC,SAAU;EAClB,IAAMC,IAAY,KAAKV,SAAS,aAC1B,EAAEW,UAAOC,mBAAgBpD,EAAsBkD,CAAS,GAExDK,IAAa,GADEJ,EAAMG,MAAM,CACXD,EAAY;EAElC,OAAOzD,CAAI;;;gBAGCuD,EAAK;oDAC+B,KAAKK,OAAM;;;;;;oBAM3CD,EAAU;;;4BAGFH,EAAW;uBAChB,KAAKtB,KAAI;uBACT,KAAK2B,YAAW;yBACd,KAAKC,cAAa;;cAE7B,KAAK1B,oBACHpC,CAAI,8DAA8D,KAAKoC,kBAAiB,WACxF,GAAE;;;;wDAIsC,KAAKwB,OAAM;;;uCAG5B,CAAC,KAAK1B,KAAKC,KAAK,EAAC,UAAW,KAAKO,QAAO;;;;;;CAM7E;AACF,GAAC,CAAAqB,GAAA,CAAAnC,GAAAC,GAAAC,GAAAC,GAAAJ,IAAAqC,GAAA,CAAAvD,GAAAwD,MAAAC,EAAA5C,GAAA;CAAA;EAAAL;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAb,GAAA,GAAA,KAAA,GAvFmDV,CAAe,GAAAwB,IAAA6C,IAAA,cAAAC,EAAA;CAAA5C,cAAA;EAAA,MAAAf,CAAA,GAAAuB,EAAA,MAAA,UACjDzB,CAAM,GAAA0D,EAAA;CAAA;AAAA,GAAAjC,EAAAmC,GAAAzD,GAAA,KAAA,CAAA,GAAAyD,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneCreateDialog.styles.cjs.js","names":["FolderPaneCreateDialog_styles_default"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.css"],"sourcesContent":[":host {\n display: block;\n\n .folder-pane-create-dialog-header {\n padding: 20px 25px;\n gap: 25px;\n border-radius: 5px 5px 0 0;\n border: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-slate-50, #F8FAFC);\n }\n\n h1 {\n margin: 0;\n font-weight: 500;\n color: var(--solid-ui-color-gray-800, #1E2939);\n font-size: var(--solid-ui-font-size-xl, 1.25rem);\n }\n\n .folder-pane-create-dialog-label {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n flex: 1 0 0;\n align-self: stretch;\n color: var(--solid-ui-color-gray-600, #4A5565);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n }\n\n input {\n display: block;\n box-sizing: border-box;\n width: 100%;\n height: 40px;\n padding: 10px;\n border-radius: 5px;\n border: 1px solid var(--solid-ui-color-gray-400, #99A1AF);\n background: var(--solid-ui-color-white, #FFF);\n color: var(--solid-ui-color-gray-900, #101828);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n font-weight: 500;\n }\n\n solid-ui-dialog-content {\n display: flex;\n padding: 25px 25px 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n }\n\n solid-ui-dialog-footer {\n display: flex;\n padding: 20px 30px;\n justify-content: flex-end;\n align-items: center;\n gap: 15px;\n align-self: stretch;\n border-top: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-gray-50, #F9FAFB);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FolderPaneCreateDialog.styles.cjs.js","names":["FolderPaneCreateDialog_styles_default"],"sources":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneCreateDialog.styles.esm.js","names":["FolderPaneCreateDialog_styles_default"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneCreateDialog.styles.css"],"sourcesContent":[":host {\n display: block;\n\n .folder-pane-create-dialog-header {\n padding: 20px 25px;\n gap: 25px;\n border-radius: 5px 5px 0 0;\n border: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-slate-50, #F8FAFC);\n }\n\n h1 {\n margin: 0;\n font-weight: 500;\n color: var(--solid-ui-color-gray-800, #1E2939);\n font-size: var(--solid-ui-font-size-xl, 1.25rem);\n }\n\n .folder-pane-create-dialog-label {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n flex: 1 0 0;\n align-self: stretch;\n color: var(--solid-ui-color-gray-600, #4A5565);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n }\n\n input {\n display: block;\n box-sizing: border-box;\n width: 100%;\n height: 40px;\n padding: 10px;\n border-radius: 5px;\n border: 1px solid var(--solid-ui-color-gray-400, #99A1AF);\n background: var(--solid-ui-color-white, #FFF);\n color: var(--solid-ui-color-gray-900, #101828);\n font-size: var(--solid-ui-font-size-sm, .875rem);\n font-weight: 500;\n }\n\n solid-ui-dialog-content {\n display: flex;\n padding: 25px 25px 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n }\n\n solid-ui-dialog-footer {\n display: flex;\n padding: 20px 30px;\n justify-content: flex-end;\n align-items: center;\n gap: 15px;\n align-self: stretch;\n border-top: 1px solid var(--solid-ui-color-slate-200, #E2E8F0);\n background: var(--solid-ui-color-gray-50, #F9FAFB);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"FolderPaneCreateDialog.styles.esm.js","names":["FolderPaneCreateDialog_styles_default"],"sources":[],"mappings":""}
@@ -1,16 +1,16 @@
1
- const e=require("../../helpers.cjs.js");require("../../_virtual/~icons/lucide/folder-open.cjs.js"),require("../../_virtual/~icons/lucide/layout-grid.cjs.js"),require("../../_virtual/~icons/lucide/list.cjs.js"),require("../../_virtual/~icons/lucide/chevron-down.cjs.js"),require("../../_virtual/~icons/lucide/plus.cjs.js"),require("../../_virtual/~icons/lucide/upload.cjs.js"),require("../../_virtual/~icons/lucide/search.cjs.js");const t=require("./FolderPaneStorageHeader.styles.cjs.js");let n=require("solid-ui"),r=require("lit"),i=require("lit/decorators.js");require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item");var a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F;function I(e,t,n){L(e,t),t.set(e,n)}function L(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function R(e,t,n){return e.set(B(e,t),n),n}function z(e,t){return e.get(B(e,t))}function B(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function V(e,t,n){return(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:G(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||G(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return K(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:U(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function U(e){var t=W(e,`string`);return typeof t==`symbol`?t:t+``}function W(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function G(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function K(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function q(e){return e}_=[(0,n.customElement)(`folder-pane-storage-header`)];var J;new(P=(s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,F=(v=(0,i.property)({attribute:!1}),b=(0,i.property)({attribute:!1}),S=(0,i.property)({attribute:!1}),w=(0,i.property)({attribute:!1}),E=(0,i.property)(),O=(0,i.property)(),A=(0,i.property)({type:Boolean}),M=(0,i.state)(),`subject`),o=class extends n.WebComponent{constructor(...e){super(...e),I(this,s,(h(this),y(this,void 0))),I(this,c,x(this,void 0)),I(this,l,C(this,void 0)),I(this,u,T(this,[])),I(this,d,D(this,`grid`)),I(this,f,k(this,``)),I(this,p,j(this,!1)),I(this,m,N(this,[])),V(this,`availablePanesGeneration`,0)}get[F](){return z(s,this)}set subject(e){R(s,this,e)}get selectedResource(){return z(c,this)}set selectedResource(e){R(c,this,e)}get browserContext(){return z(l,this)}set browserContext(e){R(l,this,e)}get paneList(){return z(u,this)}set paneList(e){R(u,this,e)}get view(){return z(d,this)}set view(e){R(d,this,e)}get searchQuery(){return z(f,this)}set searchQuery(e){R(f,this,e)}get canCreate(){return z(p,this)}set canCreate(e){R(p,this,e)}get availablePanes(){return z(m,this)}set availablePanes(e){R(m,this,e)}updated(t){if(!t.has(`paneList`)&&!t.has(`browserContext`))return;let r=++this.availablePanesGeneration;n.login.filterAvailablePanes(this.paneList).then(t=>{r===this.availablePanesGeneration&&(this.availablePanes=e.getCreationPanes(t))}).catch(e=>console.error(`Unable to load folder creation panes`,e))}get breadcrumbResources(){let e=this.subject,t=this.selectedResource;if(!e||!t)return e?[e]:[];let n=[t],r=t;for(;!r.sameTerm(e);){let i=r.dir();if(!i||i.sameTerm(r)||(n.unshift(i),r=i,n.length>32))return[e,t]}return n}getResourceLabel(e,t){if(this.subject?.sameTerm(e)||t===0)return`Home`;try{let t=new URL(e.uri).pathname.split(`/`).filter(Boolean);return decodeURIComponent(t[t.length-1]||e.uri)}catch{return e.uri}}selectHome(){this.dispatchEvent(new CustomEvent(`folder-pane-select-home`,{bubbles:!0,composed:!0}))}selectView(e){this.dispatchEvent(new CustomEvent(`folder-pane-change-view`,{detail:{view:e},bubbles:!0,composed:!0}))}selectResource(e){this.dispatchEvent(new CustomEvent(`folder-pane-select-resource`,{detail:{resource:e},bubbles:!0,composed:!0}))}requestUpload(){this.dispatchEvent(new CustomEvent(`folder-pane-upload`,{bubbles:!0,composed:!0}))}updateSearch(e){this.dispatchEvent(new CustomEvent(`folder-pane-search`,{detail:{query:e.target.value},bubbles:!0,composed:!0}))}createPane(e){this.dispatchEvent(new CustomEvent(`folder-pane-create-pane`,{detail:{pane:e},bubbles:!0,composed:!0}))}render(){return r.html`
1
+ require("../../_virtual/~icons/lucide/folder-open.cjs.js"),require("../../_virtual/~icons/lucide/folder.cjs.js"),require("../../_virtual/~icons/lucide/layout-grid.cjs.js"),require("../../_virtual/~icons/lucide/list.cjs.js"),require("../../_virtual/~icons/lucide/chevron-down.cjs.js"),require("../../_virtual/~icons/lucide/plus.cjs.js"),require("../../_virtual/~icons/lucide/upload.cjs.js"),require("../../_virtual/~icons/lucide/search.cjs.js");const e=require("../../helpers.cjs.js"),t=require("../../accessCache.cjs.js"),n=require("../../resourceActionItems.cjs.js"),r=require("../../debug.cjs.js"),i=require("./FolderPaneStorageHeader.styles.cjs.js");let a=require("solid-ui"),o=require("solid-logic"),s=require("lit"),c=require("lit/decorators.js");require("solid-ui/components/resource-actions-menu"),require("solid-ui/components/button"),require("solid-ui/components/menu"),require("solid-ui/components/menu-item");var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J;function Y(e,t,n){ee(e,t),t.set(e,n)}function ee(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function X(e,t,n){return e.set(te(e,t),n),n}function Z(e,t){return e.get(te(e,t))}function te(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Q(e,t,n){return(t=re(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:ae(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||ae(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return oe(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:re(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function re(e){var t=ie(e,`string`);return typeof t==`symbol`?t:t+``}function ie(e,t){if(typeof e!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ae(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function oe(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function se(e){return e}w=[(0,a.customElement)(`folder-pane-storage-header`)];var $;new(q=(d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,J=(T=(0,c.property)({attribute:!1}),D=(0,c.property)({attribute:!1}),k=(0,c.property)({attribute:!1}),j=(0,c.property)({attribute:!1}),N=(0,c.property)({attribute:!1}),F=(0,c.property)(),L=(0,c.property)(),z=(0,c.property)({type:Boolean}),V=(0,c.state)(),U=(0,c.state)(),G=(0,c.state)(),`subject`),u=class extends a.WebComponent{constructor(...e){super(...e),Y(this,d,(S(this),E(this,void 0))),Y(this,f,O(this,void 0)),Y(this,p,A(this,void 0)),Y(this,m,M(this,void 0)),Y(this,h,P(this,[])),Y(this,g,I(this,`grid`)),Y(this,_,R(this,``)),Y(this,v,B(this,!1)),Y(this,y,H(this,[])),Y(this,b,W(this,[])),Y(this,x,K(this,!1)),Q(this,`availablePanesGeneration`,0),Q(this,`resourceActionsGeneration`,0),Q(this,`authListenersAttached`,!1),Q(this,`handleAuthChange`,()=>{this.loadResourceActions()}),Q(this,`openAccessControls`,()=>{let e=this.displayedResource;e&&(t.resourceAccessCache.delete(e.uri),this.dispatchEvent(new CustomEvent(`resource-open-pane`,{detail:{resource:e,paneName:`sharing`},bubbles:!0,composed:!0})))})}get[J](){return Z(d,this)}set subject(e){X(d,this,e)}get breadcrumbRoot(){return Z(f,this)}set breadcrumbRoot(e){X(f,this,e)}get selectedResource(){return Z(p,this)}set selectedResource(e){X(p,this,e)}get browserContext(){return Z(m,this)}set browserContext(e){X(m,this,e)}get paneList(){return Z(h,this)}set paneList(e){X(h,this,e)}get view(){return Z(g,this)}set view(e){X(g,this,e)}get searchQuery(){return Z(_,this)}set searchQuery(e){X(_,this,e)}get canCreate(){return Z(v,this)}set canCreate(e){X(v,this,e)}get availablePanes(){return Z(y,this)}set availablePanes(e){X(y,this,e)}get resourceActionMenuItems(){return Z(b,this)}set resourceActionMenuItems(e){X(b,this,e)}get canManageAccess(){return Z(x,this)}set canManageAccess(e){X(x,this,e)}willUpdate(t){if(t.has(`paneList`)||t.has(`browserContext`)){let t=++this.availablePanesGeneration;a.login.filterAvailablePanes(this.paneList).then(n=>{t===this.availablePanesGeneration&&(this.availablePanes=e.getCreationPanes(n))}).catch(e=>r.error(`Unable to load folder creation panes`,e))}(t.has(`selectedResource`)||t.has(`subject`)||t.has(`browserContext`))&&this.loadResourceActions()}connectedCallback(){super.connectedCallback(),this.authListenersAttached||=(o.authSession.events.on(`login`,this.handleAuthChange),o.authSession.events.on(`logout`,this.handleAuthChange),!0)}disconnectedCallback(){this.resourceActionsGeneration++,this.authListenersAttached&&=(o.authSession.events.off(`login`,this.handleAuthChange),o.authSession.events.off(`logout`,this.handleAuthChange),!1),super.disconnectedCallback()}get displayedResource(){return this.selectedResource??this.subject}async loadResourceActions(){let t=++this.resourceActionsGeneration,i=this.displayedResource,a=this.browserContext;if(this.resourceActionMenuItems=[],this.canManageAccess=!1,!i||!a)return;let o=a.session.logic.resource,s=o,c=o.fetchMetadata(i).then(e=>e.access.canManageAccess).catch(e=>(r.warn(`Unable to load storage-header access metadata`,e),!1));try{let r=await n.loadResourcePaneMenuItems({resource:i,isContainer:e.isContainerResource(i,s),context:a,resourceLogic:s,openPane:(e,t,n)=>{n.stopPropagation(),this.dispatchEvent(new CustomEvent(`resource-open-pane`,{detail:{resource:e,paneName:t},bubbles:!0,composed:!0}))},isCurrent:()=>t===this.resourceActionsGeneration&&i===this.displayedResource});r&&(this.resourceActionMenuItems=r)}catch(e){t===this.resourceActionsGeneration&&r.warn(`Unable to load storage-header pane actions`,e)}finally{let e=await c;t===this.resourceActionsGeneration&&i===this.displayedResource&&(this.canManageAccess=e)}}get breadcrumbResources(){let e=this.breadcrumbRoot??this.subject,t=this.selectedResource;if(!e||!t)return e?[e]:[];let n=[t],r=t;for(;!r.sameTerm(e);){let i=r.dir();if(!i||i.sameTerm(r)||(n.unshift(i),r=i,n.length>32))return[e,t]}return n}isHomeResource(e){try{return new URL(e.uri).pathname.split(`/`).filter(Boolean).length===0}catch{return!1}}getResourceLabel(e){if(this.isHomeResource(e))return`Home`;try{let t=new URL(e.uri).pathname.split(`/`).filter(Boolean);return decodeURIComponent(t[t.length-1]||e.uri)}catch{return e.uri}}selectHome(){this.dispatchEvent(new CustomEvent(`folder-pane-select-home`,{bubbles:!0,composed:!0}))}selectView(e){this.dispatchEvent(new CustomEvent(`folder-pane-change-view`,{detail:{view:e},bubbles:!0,composed:!0}))}selectResource(e){this.dispatchEvent(new CustomEvent(`folder-pane-select-resource`,{detail:{resource:e},bubbles:!0,composed:!0}))}requestUpload(){this.dispatchEvent(new CustomEvent(`folder-pane-upload`,{bubbles:!0,composed:!0}))}updateSearch(e){this.dispatchEvent(new CustomEvent(`folder-pane-search`,{detail:{query:e.target.value},bubbles:!0,composed:!0}))}createPane(e){this.dispatchEvent(new CustomEvent(`folder-pane-create-pane`,{detail:{pane:e},bubbles:!0,composed:!0}))}render(){return s.html`
2
2
  <header class="folder-pane-storage-header">
3
3
  <nav class="folder-pane-storage-header-breadcrumbs" aria-label="Storage breadcrumb">
4
4
  <icon-lucide-folder-open aria-hidden="true"></icon-lucide-folder-open>
5
5
  <ol>
6
- ${this.breadcrumbResources.map((e,t,n)=>r.html`
6
+ ${this.breadcrumbResources.map((e,t,n)=>s.html`
7
7
  <li>
8
- ${t===n.length-1?r.html`<span aria-current="page">${this.getResourceLabel(e,t)}</span>`:r.html`
8
+ ${t>0?s.html`<span class="separator" aria-hidden="true">/</span>`:s.nothing}
9
+ ${t===n.length-1?s.html`<span aria-current="page">${this.getResourceLabel(e)}</span>`:s.html`
9
10
  <button
10
11
  type="button"
11
- @click=${()=>t===0?this.selectHome():this.selectResource(e)}
12
- >${this.getResourceLabel(e,t)}</button>
13
- <span class="separator" aria-hidden="true">/</span>
12
+ @click=${()=>this.isHomeResource(e)?this.selectHome():this.selectResource(e)}
13
+ >${this.getResourceLabel(e)}</button>
14
14
  `}
15
15
  </li>
16
16
  `)}
@@ -26,6 +26,17 @@ const e=require("../../helpers.cjs.js");require("../../_virtual/~icons/lucide/fo
26
26
  @input=${this.updateSearch}
27
27
  >
28
28
  </label>
29
+ ${this.displayedResource&&this.browserContext?s.html`
30
+ <solid-ui-resource-actions-menu
31
+ class="folder-pane-storage-header-resource-actions"
32
+ .store=${this.browserContext.session.store}
33
+ .subjectUri=${this.displayedResource.uri}
34
+ .menuItems=${this.resourceActionMenuItems}
35
+ .canManageAccess=${this.canManageAccess}
36
+ .showAccessInMenu=${!0}
37
+ .handleAccessClick=${this.openAccessControls}
38
+ ></solid-ui-resource-actions-menu>
39
+ `:s.nothing}
29
40
  <div class="folder-pane-storage-header-view-controls" role="group" aria-label="Container view">
30
41
  <div class=${`folder-pane-storage-header-view-toggle ${this.view===`grid`?`is-selected`:``}`}>
31
42
  <solid-ui-button
@@ -48,23 +59,26 @@ const e=require("../../helpers.cjs.js");require("../../_virtual/~icons/lucide/fo
48
59
  </solid-ui-button>
49
60
  </div>
50
61
  </div>
51
- ${this.canCreate?r.html`<solid-ui-menu class="folder-pane-storage-header-add-menu" placement="bottom-end">
52
- <solid-ui-button
53
- slot="trigger"
54
- variant="primary"
55
- aria-haspopup="menu"
56
- >
57
- <icon-lucide-plus slot="left-icon" aria-hidden="true"></icon-lucide-plus>
58
- Add
59
- <icon-lucide-chevron-down slot="right-icon" aria-hidden="true"></icon-lucide-chevron-down>
60
- </solid-ui-button>
61
- ${this.availablePanes.map(t=>r.html`
62
+ ${this.canCreate?s.html`<solid-ui-menu class="folder-pane-storage-header-add-menu" placement="bottom-end">
63
+ <div slot="trigger" class="folder-pane-storage-header-add-trigger">
64
+ <button
65
+ type="button"
66
+ class="folder-pane-storage-header-add-button"
67
+ aria-label="Add"
68
+ aria-haspopup="menu"
69
+ >
70
+ <icon-lucide-plus aria-hidden="true"></icon-lucide-plus>
71
+ <span class="folder-pane-storage-header-add-label">Add</span>
72
+ <icon-lucide-chevron-down class="folder-pane-storage-header-add-chevron" aria-hidden="true"></icon-lucide-chevron-down>
73
+ </button>
74
+ </div>
75
+ ${this.availablePanes.map(t=>s.html`
62
76
  <solid-ui-menu-item @solid-ui-select=${()=>this.createPane(t)}>
63
- ${t.icon?r.html`<img
77
+ ${t.icon?s.html`<img
64
78
  slot="left-icon"
65
79
  src=${String(t.icon)}
66
80
  alt=""
67
- >`:r.nothing}
81
+ >`:s.nothing}
68
82
  New ${e.getPaneLabel(t)}
69
83
  </solid-ui-menu-item>
70
84
  `)}
@@ -72,8 +86,8 @@ const e=require("../../helpers.cjs.js");require("../../_virtual/~icons/lucide/fo
72
86
  <icon-lucide-upload slot="left-icon" aria-hidden="true"></icon-lucide-upload>
73
87
  Upload
74
88
  </solid-ui-menu-item>
75
- </solid-ui-menu>`:r.nothing}
89
+ </solid-ui-menu>`:s.nothing}
76
90
  </div>
77
91
  </header>
78
- `}},{e:[y,x,C,T,D,k,j,N,h],c:[J,g]}=H(o,[[v,1,`subject`],[b,1,`selectedResource`],[S,1,`browserContext`],[w,1,`paneList`],[E,1,`view`],[O,1,`searchQuery`],[A,1,`canCreate`],[M,1,`availablePanes`]],_,0,void 0,n.WebComponent),o),a=class extends q{constructor(){super(J),V(this,`styles`,t.default),g()}},V(a,P,void 0),a),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return J}});
92
+ `}},{e:[E,O,A,M,P,I,R,B,H,W,K,S],c:[$,C]}=ne(u,[[T,1,`subject`],[D,1,`breadcrumbRoot`],[k,1,`selectedResource`],[j,1,`browserContext`],[N,1,`paneList`],[F,1,`view`],[L,1,`searchQuery`],[z,1,`canCreate`],[V,1,`availablePanes`],[U,1,`resourceActionMenuItems`],[G,1,`canManageAccess`]],w,0,void 0,a.WebComponent),u),l=class extends se{constructor(){super($),Q(this,`styles`,i.default),C()}},Q(l,q,void 0),l),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return $}});
79
93
  //# sourceMappingURL=FolderPaneStorageHeader.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FolderPaneStorageHeader.cjs.js","names":["html","nothing","property","state","customElement","login","WebComponent","getCreationPanes","getPaneLabel","styles","_classDecs","_FolderPaneStorageHea","_FolderPaneStorageHea2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_subjectDecs","attribute","_selectedResourceDecs","_browserContextDecs","_paneListDecs","_viewDecs","_searchQueryDecs","_canCreateDecs","type","Boolean","_availablePanesDecs","_FolderPaneStorageHeader","FolderPaneStorageHeader","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_subject","undefined","_init_selectedResource","_init_browserContext","_init_paneList","_init_view","_init_searchQuery","_init_canCreate","_init_availablePanes","_defineProperty","_classPrivateFieldGet","subject","v","_classPrivateFieldSet","selectedResource","browserContext","paneList","view","searchQuery","canCreate","availablePanes","updated","changedProperties","has","generation","availablePanesGeneration","filterAvailablePanes","then","panes","catch","error","console","breadcrumbResources","root","selected","resources","current","sameTerm","parent","dir","unshift","length","getResourceLabel","resource","index","pathSegments","URL","uri","pathname","split","filter","decodeURIComponent","selectHome","dispatchEvent","CustomEvent","bubbles","composed","selectView","detail","selectResource","requestUpload","updateSearch","event","query","target","value","createPane","pane","render","map","String","icon","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","property","state","WebComponent","login","getCreationPanes","nothing","getPaneLabel","styles","require_helpers","require_FolderPaneStorageHeader_styles","solid_ui","lit","lit_decorators_js","_Class","_FolderPaneStorageHeader","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_subjectDecs","_init_subject","_selectedResourceDecs","_init_selectedResource","_browserContextDecs","_init_browserContext","_paneListDecs","_init_paneList","_viewDecs","_init_view","_searchQueryDecs","_init_searchQuery","_canCreateDecs","_init_canCreate","_availablePanesDecs","_init_availablePanes","_FolderPaneStorageHea2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_FolderPaneStorageHea","args","changedProperties","generation","panes","error","root","selected","resources","current","parent","resource","index","pathSegments","event","pane"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneStorageHeader.ts"],"sourcesContent":["import { html, nothing } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { customElement, login, WebComponent } from 'solid-ui'\nimport type { NamedNode } from 'rdflib'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/menu-item'\nimport '~icons/lucide/folder-open'\nimport '~icons/lucide/layout-grid'\nimport '~icons/lucide/list'\nimport '~icons/lucide/chevron-down'\nimport '~icons/lucide/plus'\nimport '~icons/lucide/upload'\nimport '~icons/lucide/search'\nimport { getCreationPanes, getPaneLabel } from '../../helpers'\nimport styles from './FolderPaneStorageHeader.styles.css'\n\n@customElement('folder-pane-storage-header')\nexport default class FolderPaneStorageHeader extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor selectedResource: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor browserContext: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor paneList: PaneDefinition[] = []\n\n @property()\n accessor view: 'grid' | 'list' = 'grid'\n\n @property()\n accessor searchQuery = ''\n\n @property({ type: Boolean })\n accessor canCreate = false\n\n @state()\n accessor availablePanes: PaneDefinition[] = []\n\n private availablePanesGeneration = 0\n\n protected updated (changedProperties: PropertyValues<this>) {\n if (!changedProperties.has('paneList') && !changedProperties.has('browserContext')) return\n const generation = ++this.availablePanesGeneration\n void login.filterAvailablePanes(this.paneList)\n .then(panes => {\n if (generation === this.availablePanesGeneration) {\n this.availablePanes = getCreationPanes(panes)\n }\n })\n .catch(error => console.error('Unable to load folder creation panes', error))\n }\n\n private get breadcrumbResources () {\n const root = this.subject\n const selected = this.selectedResource\n if (!root || !selected) return root ? [root] : []\n\n const resources = [selected]\n let current = selected\n while (!current.sameTerm(root)) {\n const parent = current.dir()\n if (!parent || parent.sameTerm(current)) return [root, selected]\n resources.unshift(parent)\n current = parent\n if (resources.length > 32) return [root, selected]\n }\n return resources\n }\n\n private getResourceLabel (resource: NamedNode, index: number) {\n if (this.subject?.sameTerm(resource) || index === 0) return 'Home'\n\n try {\n const pathSegments = new URL(resource.uri).pathname.split('/').filter(Boolean)\n return decodeURIComponent(pathSegments[pathSegments.length - 1] || resource.uri)\n } catch {\n return resource.uri\n }\n }\n\n private selectHome () {\n this.dispatchEvent(new CustomEvent('folder-pane-select-home', {\n bubbles: true,\n composed: true\n }))\n }\n\n private selectView (view: 'grid' | 'list') {\n this.dispatchEvent(new CustomEvent('folder-pane-change-view', {\n detail: { view },\n bubbles: true,\n composed: true\n }))\n }\n\n private selectResource (resource: NamedNode) {\n this.dispatchEvent(new CustomEvent('folder-pane-select-resource', {\n detail: { resource },\n bubbles: true,\n composed: true\n }))\n }\n\n private requestUpload () {\n this.dispatchEvent(new CustomEvent('folder-pane-upload', {\n bubbles: true,\n composed: true\n }))\n }\n\n private updateSearch (event: Event) {\n this.dispatchEvent(new CustomEvent('folder-pane-search', {\n detail: { query: (event.target as HTMLInputElement).value },\n bubbles: true,\n composed: true\n }))\n }\n\n private createPane (pane: PaneDefinition) {\n this.dispatchEvent(new CustomEvent('folder-pane-create-pane', {\n detail: { pane },\n bubbles: true,\n composed: true\n }))\n }\n\n render () {\n return html`\n <header class=\"folder-pane-storage-header\">\n <nav class=\"folder-pane-storage-header-breadcrumbs\" aria-label=\"Storage breadcrumb\">\n <icon-lucide-folder-open aria-hidden=\"true\"></icon-lucide-folder-open>\n <ol>\n ${this.breadcrumbResources.map((resource, index, resources) => html`\n <li>\n ${index === resources.length - 1\n ? html`<span aria-current=\"page\">${this.getResourceLabel(resource, index)}</span>`\n : html`\n <button\n type=\"button\"\n @click=${() => index === 0 ? this.selectHome() : this.selectResource(resource)}\n >${this.getResourceLabel(resource, index)}</button>\n <span class=\"separator\" aria-hidden=\"true\">/</span>\n `}\n </li>\n `)}\n </ol>\n </nav>\n <div class=\"folder-pane-storage-header-toolbar\">\n <label class=\"folder-pane-storage-header-search\">\n <icon-lucide-search aria-hidden=\"true\"></icon-lucide-search>\n <input\n aria-label=\"Search\"\n type=\"search\"\n .value=${this.searchQuery}\n @input=${this.updateSearch}\n >\n </label>\n <div class=\"folder-pane-storage-header-view-controls\" role=\"group\" aria-label=\"Container view\">\n <div class=${`folder-pane-storage-header-view-toggle ${this.view === 'grid' ? 'is-selected' : ''}`}>\n <solid-ui-button\n variant=\"ghost\"\n aria-label=\"Grid view\"\n aria-pressed=${String(this.view === 'grid')}\n @click=${() => this.selectView('grid')}\n >\n <icon-lucide-layout-grid slot=\"icon\" aria-hidden=\"true\"></icon-lucide-layout-grid>\n </solid-ui-button>\n </div>\n <div class=${`folder-pane-storage-header-view-toggle ${this.view === 'list' ? 'is-selected' : ''}`}>\n <solid-ui-button\n variant=\"ghost\"\n aria-label=\"List view\"\n aria-pressed=${String(this.view === 'list')}\n @click=${() => this.selectView('list')}\n >\n <icon-lucide-list slot=\"icon\" aria-hidden=\"true\"></icon-lucide-list>\n </solid-ui-button>\n </div>\n </div>\n ${this.canCreate ? html`<solid-ui-menu class=\"folder-pane-storage-header-add-menu\" placement=\"bottom-end\">\n <solid-ui-button\n slot=\"trigger\"\n variant=\"primary\"\n aria-haspopup=\"menu\"\n >\n <icon-lucide-plus slot=\"left-icon\" aria-hidden=\"true\"></icon-lucide-plus>\n Add\n <icon-lucide-chevron-down slot=\"right-icon\" aria-hidden=\"true\"></icon-lucide-chevron-down>\n </solid-ui-button>\n ${this.availablePanes.map(pane => html`\n <solid-ui-menu-item @solid-ui-select=${() => this.createPane(pane)}>\n ${pane.icon\n ? html`<img\n slot=\"left-icon\"\n src=${String(pane.icon)}\n alt=\"\"\n >`\n : nothing}\n New ${getPaneLabel(pane)}\n </solid-ui-menu-item>\n `)}\n <solid-ui-menu-item @solid-ui-select=${this.requestUpload}>\n <icon-lucide-upload slot=\"left-icon\" aria-hidden=\"true\"></icon-lucide-upload>\n Upload\n </solid-ui-menu-item>\n </solid-ui-menu>` : nothing}\n </div>\n </header>\n `\n }\n}\n"],"mappings":"A,izJAiByDU,EAAA,EAAA,EAExDN,EAAAA,cAAAA,CAAc,4BAA4B,CAAC,EAAA,IAAAO,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,EAAA,IAAAP,QAAAQ,GAAAC,GAAAA,EAIzCrB,EAAAA,SAAAA,CAAS,CAAEsB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BvB,EAAAA,SAAAA,CAAS,CAAEsB,UAAW,EAAM,CAAC,EAACE,GAAAA,EAG9BxB,EAAAA,SAAAA,CAAS,CAAEsB,UAAW,EAAM,CA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,CAAAxE,EAAAE,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAT,GAAA0E,EAAA,CAAAtG,EAAAuG,IAAAC,EAAAjF,EAAA,CAAA,CAAAX,EAAA,EAAA,SAAA,EAAA,CAAAE,EAAA,EAAA,kBAAA,EAAA,CAAAC,EAAA,EAAA,gBAAA,EAAA,CAAAC,EAAA,EAAA,UAAA,EAAA,CAAAC,EAAA,EAAA,MAAA,EAAA,CAAAC,EAAA,EAAA,aAAA,EAAA,CAAAC,EAAA,EAAA,WAAA,EAAA,CAAAG,EAAA,EAAA,gBAAA,CAAA,EAAAvB,EAAA,EAAA,IAAA,GAvMoDJ,EAAAA,YAAY,EAAA4B,GAAAkF,EAAA,cAAAC,CAAA,CAAAjF,aAAA,CAAA,MAAAzB,CAAA,EAAAsC,EAAA,KAAA,SAC/CxC,EAAAA,OAAM,EAAAyG,EAAA,CAAA,CAAA,EAAAjE,EAAAmE,EAAAxG,EAAA,IAAA,EAAA,EAAAwG,G"}
1
+ {"version":3,"file":"FolderPaneStorageHeader.cjs.js","names":["html","nothing","property","state","authSession","customElement","login","WebComponent","getCreationPanes","getPaneLabel","isContainerResource","resourceAccessCache","loadResourcePaneMenuItems","debug","styles","_classDecs","_FolderPaneStorageHea","_FolderPaneStorageHea2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_ref","_subjectDecs","attribute","_breadcrumbRootDecs","_selectedResourceDecs","_browserContextDecs","_paneListDecs","_viewDecs","_searchQueryDecs","_canCreateDecs","type","Boolean","_availablePanesDecs","_resourceActionMenuItemsDecs","_canManageAccessDecs","_FolderPaneStorageHeader","FolderPaneStorageHeader","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_subject","undefined","_init_breadcrumbRoot","_init_selectedResource","_init_browserContext","_init_paneList","_init_view","_init_searchQuery","_init_canCreate","_init_availablePanes","_init_resourceActionMenuItems","_init_canManageAccess","_defineProperty","loadResourceActions","resource","displayedResource","delete","uri","dispatchEvent","CustomEvent","detail","paneName","bubbles","composed","_classPrivateFieldGet","subject","v","_classPrivateFieldSet","breadcrumbRoot","selectedResource","browserContext","paneList","view","searchQuery","canCreate","availablePanes","resourceActionMenuItems","canManageAccess","willUpdate","changedProperties","has","generation","availablePanesGeneration","filterAvailablePanes","then","panes","catch","error","connectedCallback","authListenersAttached","events","on","handleAuthChange","disconnectedCallback","resourceActionsGeneration","off","context","resourceLogic","session","logic","folderPaneResourceLogic","accessMetadata","fetchMetadata","metadata","access","items","isContainer","openPane","event","stopPropagation","isCurrent","breadcrumbResources","root","selected","resources","current","sameTerm","parent","dir","unshift","length","isHomeResource","url","URL","pathSegments","pathname","split","filter","getResourceLabel","decodeURIComponent","selectHome","selectView","selectResource","requestUpload","updateSearch","query","target","value","createPane","pane","render","map","index","store","openAccessControls","String","icon","e","c","_initClass","_applyDecs","_Class","_identity","require_helpers","require_accessCache","require_resourceActionItems","require_debug","require_FolderPaneStorageHeader_styles","solid_ui","solid_logic","lit","lit_decorators_js","_Class","_FolderPaneStorageHeader","_A","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_initProto","_initClass","_classDecs","_subjectDecs","_init_subject","_breadcrumbRootDecs","_init_breadcrumbRoot","_selectedResourceDecs","_init_selectedResource","_browserContextDecs","_init_browserContext","_paneListDecs","_init_paneList","_viewDecs","_init_view","_searchQueryDecs","_init_searchQuery","_canCreateDecs","_init_canCreate","_availablePanesDecs","_init_availablePanes","_resourceActionMenuItemsDecs","_init_resourceActionMenuItems","_canManageAccessDecs","_init_canManageAccess","_FolderPaneStorageHea2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_FolderPaneStorageHea","args","resource","changedProperties","generation","panes","error$1","context","resourceLogic","folderPaneResourceLogic","accessMetadata","metadata","error","items","event","subject","canManageAccess","root","selected","resources","current","parent","pathSegments","index","pane"],"sources":["../../../src/components/folder-pane-storage-header/FolderPaneStorageHeader.ts"],"sourcesContent":["import { html, nothing } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { authSession } from 'solid-logic'\nimport { customElement, login, WebComponent } from 'solid-ui'\nimport type { PaneMenuItem } from 'solid-ui'\nimport type { NamedNode } from 'rdflib'\nimport type { ResourceMetadata } from 'solid-logic'\nimport 'solid-ui/components/button'\nimport 'solid-ui/components/menu'\nimport 'solid-ui/components/menu-item'\nimport 'solid-ui/components/resource-actions-menu'\nimport '~icons/lucide/folder-open'\nimport '~icons/lucide/folder'\nimport '~icons/lucide/layout-grid'\nimport '~icons/lucide/list'\nimport '~icons/lucide/chevron-down'\nimport '~icons/lucide/plus'\nimport '~icons/lucide/upload'\nimport '~icons/lucide/search'\nimport { getCreationPanes, getPaneLabel, isContainerResource, type FolderPaneResourceLogic } from '../../helpers'\nimport { resourceAccessCache } from '../../accessCache'\nimport { loadResourcePaneMenuItems } from '../../resourceActionItems'\nimport * as debug from '../../debug'\nimport styles from './FolderPaneStorageHeader.styles.css'\n\n@customElement('folder-pane-storage-header')\nexport default class FolderPaneStorageHeader extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor subject: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor breadcrumbRoot: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor selectedResource: NamedNode | undefined = undefined\n\n @property({ attribute: false })\n accessor browserContext: DataBrowserContext | undefined = undefined\n\n @property({ attribute: false })\n accessor paneList: PaneDefinition[] = []\n\n @property()\n accessor view: 'grid' | 'list' = 'grid'\n\n @property()\n accessor searchQuery = ''\n\n @property({ type: Boolean })\n accessor canCreate = false\n\n @state()\n accessor availablePanes: PaneDefinition[] = []\n\n @state()\n accessor resourceActionMenuItems: PaneMenuItem[] = []\n\n @state()\n accessor canManageAccess = false\n\n private availablePanesGeneration = 0\n private resourceActionsGeneration = 0\n private authListenersAttached = false\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n if (changedProperties.has('paneList') || changedProperties.has('browserContext')) {\n const generation = ++this.availablePanesGeneration\n void login.filterAvailablePanes(this.paneList)\n .then(panes => {\n if (generation === this.availablePanesGeneration) {\n this.availablePanes = getCreationPanes(panes)\n }\n })\n .catch(error => debug.error('Unable to load folder creation panes', error))\n }\n\n if (\n changedProperties.has('selectedResource') ||\n changedProperties.has('subject') ||\n changedProperties.has('browserContext')\n ) {\n void this.loadResourceActions()\n }\n }\n\n connectedCallback () {\n super.connectedCallback()\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.resourceActionsGeneration++\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 void this.loadResourceActions()\n }\n\n private get displayedResource () {\n return this.selectedResource ?? this.subject\n }\n\n private async loadResourceActions () {\n const generation = ++this.resourceActionsGeneration\n const resource = this.displayedResource\n const context = this.browserContext\n this.resourceActionMenuItems = []\n this.canManageAccess = false\n if (!resource || !context) return\n\n const resourceLogic = context.session.logic.resource\n const folderPaneResourceLogic = resourceLogic as FolderPaneResourceLogic\n const accessMetadata = resourceLogic.fetchMetadata(resource)\n .then((metadata: ResourceMetadata) => metadata.access.canManageAccess)\n .catch(error => {\n debug.warn('Unable to load storage-header access metadata', error)\n return false\n })\n\n try {\n const items = await loadResourcePaneMenuItems({\n resource,\n isContainer: isContainerResource(resource, folderPaneResourceLogic),\n context,\n resourceLogic: folderPaneResourceLogic,\n openPane: (subject, paneName, event) => {\n event.stopPropagation()\n this.dispatchEvent(new CustomEvent('resource-open-pane', {\n detail: { resource: subject, paneName },\n bubbles: true,\n composed: true\n }))\n },\n isCurrent: () => generation === this.resourceActionsGeneration && resource === this.displayedResource\n })\n if (items) this.resourceActionMenuItems = items\n } catch (error) {\n if (generation === this.resourceActionsGeneration) {\n debug.warn('Unable to load storage-header pane actions', error)\n }\n } finally {\n const canManageAccess = await accessMetadata\n if (generation === this.resourceActionsGeneration && resource === this.displayedResource) {\n this.canManageAccess = canManageAccess\n }\n }\n }\n\n private openAccessControls = () => {\n const resource = this.displayedResource\n if (!resource) return\n resourceAccessCache.delete(resource.uri)\n this.dispatchEvent(new CustomEvent('resource-open-pane', {\n detail: { resource, paneName: 'sharing' },\n bubbles: true,\n composed: true\n }))\n }\n\n private get breadcrumbResources () {\n const root = this.breadcrumbRoot ?? this.subject\n const selected = this.selectedResource\n if (!root || !selected) return root ? [root] : []\n\n const resources = [selected]\n let current = selected\n while (!current.sameTerm(root)) {\n const parent = current.dir()\n if (!parent || parent.sameTerm(current)) return [root, selected]\n resources.unshift(parent)\n current = parent\n if (resources.length > 32) return [root, selected]\n }\n return resources\n }\n\n private isHomeResource (resource: NamedNode) {\n try {\n const url = new URL(resource.uri)\n const pathSegments = url.pathname.split('/').filter(Boolean)\n return pathSegments.length === 0\n } catch {\n return false\n }\n }\n\n private getResourceLabel (resource: NamedNode) {\n if (this.isHomeResource(resource)) return 'Home'\n\n try {\n const pathSegments = new URL(resource.uri).pathname.split('/').filter(Boolean)\n return decodeURIComponent(pathSegments[pathSegments.length - 1] || resource.uri)\n } catch {\n return resource.uri\n }\n }\n\n private selectHome () {\n this.dispatchEvent(new CustomEvent('folder-pane-select-home', {\n bubbles: true,\n composed: true\n }))\n }\n\n private selectView (view: 'grid' | 'list') {\n this.dispatchEvent(new CustomEvent('folder-pane-change-view', {\n detail: { view },\n bubbles: true,\n composed: true\n }))\n }\n\n private selectResource (resource: NamedNode) {\n this.dispatchEvent(new CustomEvent('folder-pane-select-resource', {\n detail: { resource },\n bubbles: true,\n composed: true\n }))\n }\n\n private requestUpload () {\n this.dispatchEvent(new CustomEvent('folder-pane-upload', {\n bubbles: true,\n composed: true\n }))\n }\n\n private updateSearch (event: Event) {\n this.dispatchEvent(new CustomEvent('folder-pane-search', {\n detail: { query: (event.target as HTMLInputElement).value },\n bubbles: true,\n composed: true\n }))\n }\n\n private createPane (pane: PaneDefinition) {\n this.dispatchEvent(new CustomEvent('folder-pane-create-pane', {\n detail: { pane },\n bubbles: true,\n composed: true\n }))\n }\n\n render () {\n return html`\n <header class=\"folder-pane-storage-header\">\n <nav class=\"folder-pane-storage-header-breadcrumbs\" aria-label=\"Storage breadcrumb\">\n <icon-lucide-folder-open aria-hidden=\"true\"></icon-lucide-folder-open>\n <ol>\n ${this.breadcrumbResources.map((resource, index, resources) => {\n return html`\n <li>\n ${index > 0 ? html`<span class=\"separator\" aria-hidden=\"true\">/</span>` : nothing}\n ${index === resources.length - 1\n ? html`<span aria-current=\"page\">${this.getResourceLabel(resource)}</span>`\n : html`\n <button\n type=\"button\"\n @click=${() => this.isHomeResource(resource) ? this.selectHome() : this.selectResource(resource)}\n >${this.getResourceLabel(resource)}</button>\n `}\n </li>\n `})}\n </ol>\n </nav>\n <div class=\"folder-pane-storage-header-toolbar\">\n <label class=\"folder-pane-storage-header-search\">\n <icon-lucide-search aria-hidden=\"true\"></icon-lucide-search>\n <input\n aria-label=\"Search\"\n type=\"search\"\n .value=${this.searchQuery}\n @input=${this.updateSearch}\n >\n </label>\n ${this.displayedResource && this.browserContext ? html`\n <solid-ui-resource-actions-menu\n class=\"folder-pane-storage-header-resource-actions\"\n .store=${this.browserContext.session.store}\n .subjectUri=${this.displayedResource.uri}\n .menuItems=${this.resourceActionMenuItems}\n .canManageAccess=${this.canManageAccess}\n .showAccessInMenu=${true}\n .handleAccessClick=${this.openAccessControls}\n ></solid-ui-resource-actions-menu>\n ` : nothing}\n <div class=\"folder-pane-storage-header-view-controls\" role=\"group\" aria-label=\"Container view\">\n <div class=${`folder-pane-storage-header-view-toggle ${this.view === 'grid' ? 'is-selected' : ''}`}>\n <solid-ui-button\n variant=\"ghost\"\n aria-label=\"Grid view\"\n aria-pressed=${String(this.view === 'grid')}\n @click=${() => this.selectView('grid')}\n >\n <icon-lucide-layout-grid slot=\"icon\" aria-hidden=\"true\"></icon-lucide-layout-grid>\n </solid-ui-button>\n </div>\n <div class=${`folder-pane-storage-header-view-toggle ${this.view === 'list' ? 'is-selected' : ''}`}>\n <solid-ui-button\n variant=\"ghost\"\n aria-label=\"List view\"\n aria-pressed=${String(this.view === 'list')}\n @click=${() => this.selectView('list')}\n >\n <icon-lucide-list slot=\"icon\" aria-hidden=\"true\"></icon-lucide-list>\n </solid-ui-button>\n </div>\n </div>\n ${this.canCreate ? html`<solid-ui-menu class=\"folder-pane-storage-header-add-menu\" placement=\"bottom-end\">\n <div slot=\"trigger\" class=\"folder-pane-storage-header-add-trigger\">\n <button\n type=\"button\"\n class=\"folder-pane-storage-header-add-button\"\n aria-label=\"Add\"\n aria-haspopup=\"menu\"\n >\n <icon-lucide-plus aria-hidden=\"true\"></icon-lucide-plus>\n <span class=\"folder-pane-storage-header-add-label\">Add</span>\n <icon-lucide-chevron-down class=\"folder-pane-storage-header-add-chevron\" aria-hidden=\"true\"></icon-lucide-chevron-down>\n </button>\n </div>\n ${this.availablePanes.map(pane => html`\n <solid-ui-menu-item @solid-ui-select=${() => this.createPane(pane)}>\n ${pane.icon\n ? html`<img\n slot=\"left-icon\"\n src=${String(pane.icon)}\n alt=\"\"\n >`\n : nothing}\n New ${getPaneLabel(pane)}\n </solid-ui-menu-item>\n `)}\n <solid-ui-menu-item @solid-ui-select=${this.requestUpload}>\n <icon-lucide-upload slot=\"left-icon\" aria-hidden=\"true\"></icon-lucide-upload>\n Upload\n </solid-ui-menu-item>\n </solid-ui-menu>` : nothing}\n </div>\n </header>\n `\n }\n}\n"],"mappings":"A,skKAyByDe,EAAA,EAAA,EAExDV,EAAAA,cAAAA,CAAc,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