solid-ui 5.0.2-2 → 5.0.2-4

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 (236) hide show
  1. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +2 -0
  2. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -0
  3. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +10 -0
  4. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -0
  5. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +2 -0
  6. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -0
  7. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +10 -0
  8. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -0
  9. package/dist/_virtual/~icons/lucide/file.cjs.js +2 -0
  10. package/dist/_virtual/~icons/lucide/file.cjs.js.map +1 -0
  11. package/dist/_virtual/~icons/lucide/file.esm.js +10 -0
  12. package/dist/_virtual/~icons/lucide/file.esm.js.map +1 -0
  13. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
  14. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
  15. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +10 -0
  16. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
  17. package/dist/_virtual/~icons/lucide/pencil.cjs.js +2 -0
  18. package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -0
  19. package/dist/_virtual/~icons/lucide/pencil.esm.js +10 -0
  20. package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -0
  21. package/dist/_virtual/~icons/lucide/share-2.cjs.js +2 -0
  22. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -0
  23. package/dist/_virtual/~icons/lucide/share-2.esm.js +10 -0
  24. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -0
  25. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +2 -0
  26. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -0
  27. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +10 -0
  28. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -0
  29. package/dist/chunks/DialogProvider-CdesAsw-.js +208 -0
  30. package/dist/chunks/DialogProvider-CdesAsw-.js.map +1 -0
  31. package/dist/chunks/ResourceActionsMenu-Bllpr4M5.js +378 -0
  32. package/dist/chunks/ResourceActionsMenu-Bllpr4M5.js.map +1 -0
  33. package/dist/chunks/{access-control-modal-Dcg6-f4V.js → access-control-modal-CwmY_Dod.js} +419 -432
  34. package/dist/chunks/access-control-modal-CwmY_Dod.js.map +1 -0
  35. package/dist/chunks/{account-D6JK-n7u.js → account-CoHPKKDu.js} +6 -6
  36. package/dist/chunks/{account-D6JK-n7u.js.map → account-CoHPKKDu.js.map} +1 -1
  37. package/dist/chunks/{auth-B_abPDvH.js → auth-CocCqS1p.js} +23 -22
  38. package/dist/chunks/{auth-B_abPDvH.js.map → auth-CocCqS1p.js.map} +1 -1
  39. package/dist/chunks/{avatar-BR3COVSQ.js → avatar-sNdKdWVO.js} +2 -2
  40. package/dist/chunks/{avatar-BR3COVSQ.js.map → avatar-sNdKdWVO.js.map} +1 -1
  41. package/dist/chunks/context-BDrfQ9bN.js +21 -0
  42. package/dist/chunks/context-BDrfQ9bN.js.map +1 -0
  43. package/dist/chunks/{dialogs-root-BcQo2XMF.js → dialogs-root-BNF3_SA8.js} +2 -2
  44. package/dist/chunks/{dialogs-root-BcQo2XMF.js.map → dialogs-root-BNF3_SA8.js.map} +1 -1
  45. package/dist/chunks/events-CXQHDCs2.js +8 -0
  46. package/dist/chunks/events-CXQHDCs2.js.map +1 -0
  47. package/dist/chunks/file-explorer-header-D0TebSYR.js +962 -0
  48. package/dist/chunks/file-explorer-header-D0TebSYR.js.map +1 -0
  49. package/dist/chunks/file-explorer-provider-DpjC7uds.js +295 -0
  50. package/dist/chunks/file-explorer-provider-DpjC7uds.js.map +1 -0
  51. package/dist/chunks/globe-CsCgZcy5.js +16 -0
  52. package/dist/chunks/globe-CsCgZcy5.js.map +1 -0
  53. package/dist/chunks/{guard-bTeM7wd7.js → guard-BOicu9dt.js} +2 -2
  54. package/dist/chunks/{guard-bTeM7wd7.js.map → guard-BOicu9dt.js.map} +1 -1
  55. package/dist/chunks/index.esm-C9oV3H3X.js +6 -0
  56. package/dist/chunks/index.esm-C9oV3H3X.js.map +1 -0
  57. package/dist/chunks/{jsonld-CnfzCyCn.js → jsonld-D-TE94B0.js} +2 -2
  58. package/dist/chunks/{jsonld-CnfzCyCn.js.map → jsonld-D-TE94B0.js.map} +1 -1
  59. package/dist/chunks/{login-button-Div4ZT4J.js → login-button-clTw_9tX.js} +2 -2
  60. package/dist/chunks/{login-button-Div4ZT4J.js.map → login-button-clTw_9tX.js.map} +1 -1
  61. package/dist/chunks/{logout-button-D3lqlnCX.js → logout-button-CP-Pz70O.js} +2 -2
  62. package/dist/chunks/{logout-button-D3lqlnCX.js.map → logout-button-CP-Pz70O.js.map} +1 -1
  63. package/dist/chunks/provide-z9U64q4m.js +111 -0
  64. package/dist/chunks/provide-z9U64q4m.js.map +1 -0
  65. package/dist/chunks/{provider-Dcd1NPYx.js → provider-Cuv3Kp6G.js} +4 -4
  66. package/dist/chunks/{provider-Dcd1NPYx.js.map → provider-Cuv3Kp6G.js.map} +1 -1
  67. package/dist/chunks/{rdf-form-CmPnHKR-.js → rdf-form-DVmTw3RG.js} +20 -20
  68. package/dist/chunks/{rdf-form-CmPnHKR-.js.map → rdf-form-DVmTw3RG.js.map} +1 -1
  69. package/dist/chunks/{rdf-input-3AgoeCkJ.js → rdf-input-CRYLK-27.js} +42 -42
  70. package/dist/chunks/{rdf-input-3AgoeCkJ.js.map → rdf-input-CRYLK-27.js.map} +1 -1
  71. package/dist/chunks/{signup-button-2fAoS0Nv.js → signup-button-CexdMWj6.js} +2 -2
  72. package/dist/chunks/{signup-button-2fAoS0Nv.js.map → signup-button-CexdMWj6.js.map} +1 -1
  73. package/dist/chunks/{index.esm-CECfD0e9.js → solidLogicSingleton.esm-BXyHD7mn.js} +1210 -1161
  74. package/dist/chunks/solidLogicSingleton.esm-BXyHD7mn.js.map +1 -0
  75. package/dist/chunks/{src-Dx7k_VIe.js → src-DQgHAH3d.js} +4579 -4542
  76. package/dist/chunks/src-DQgHAH3d.js.map +1 -0
  77. package/dist/chunks/{style-w0Fl0xnd.js → style-CXaw5EYi.js} +9 -8
  78. package/dist/chunks/{style-w0Fl0xnd.js.map → style-CXaw5EYi.js.map} +1 -1
  79. package/dist/chunks/{widgets-BWpm5CPx.js → widgets-BBEQu0CS.js} +722 -721
  80. package/dist/chunks/{widgets-BWpm5CPx.js.map → widgets-BBEQu0CS.js.map} +1 -1
  81. package/dist/components/access-control-modal/AccessControlModal.cjs.js +1 -1
  82. package/dist/components/access-control-modal/AccessControlModal.cjs.js.map +1 -1
  83. package/dist/components/access-control-modal/AccessControlModal.esm.js +1 -1
  84. package/dist/components/access-control-modal/AccessControlModal.esm.js.map +1 -1
  85. package/dist/components/access-control-modal.js +1 -1
  86. package/dist/components/account.js +1 -1
  87. package/dist/components/all.cjs.js +1 -1
  88. package/dist/components/all.esm.js +3 -0
  89. package/dist/components/avatar.js +1 -1
  90. package/dist/components/dialog-provider.js +1 -1
  91. package/dist/components/dialogs-root.js +1 -1
  92. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +15 -0
  93. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -0
  94. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +20 -0
  95. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -0
  96. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +310 -0
  97. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -0
  98. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +2 -0
  99. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -0
  100. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +6 -0
  101. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -0
  102. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +35 -0
  103. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -0
  104. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +23 -0
  105. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -0
  106. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +318 -0
  107. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -0
  108. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +2 -0
  109. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -0
  110. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +6 -0
  111. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -0
  112. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +35 -0
  113. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -0
  114. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +22 -0
  115. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -0
  116. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +356 -0
  117. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -0
  118. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +2 -0
  119. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -0
  120. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +6 -0
  121. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -0
  122. package/dist/components/file-explorer-header/index.cjs.js +2 -0
  123. package/dist/components/file-explorer-header/index.cjs.js.map +1 -0
  124. package/dist/components/file-explorer-header/index.d.ts +4 -0
  125. package/dist/components/file-explorer-header/index.d.ts.map +1 -0
  126. package/dist/components/file-explorer-header/index.esm.js +6 -0
  127. package/dist/components/file-explorer-header/index.esm.js.map +1 -0
  128. package/dist/components/file-explorer-header/types.d.ts +11 -0
  129. package/dist/components/file-explorer-header/types.d.ts.map +1 -0
  130. package/dist/components/file-explorer-header.js +1 -0
  131. package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js +2 -0
  132. package/dist/components/file-explorer-provider/FileExplorerProvider.cjs.js.map +1 -0
  133. package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts +17 -0
  134. package/dist/components/file-explorer-provider/FileExplorerProvider.d.ts.map +1 -0
  135. package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js +297 -0
  136. package/dist/components/file-explorer-provider/FileExplorerProvider.esm.js.map +1 -0
  137. package/dist/components/file-explorer-provider/index.cjs.js +2 -0
  138. package/dist/components/file-explorer-provider/index.cjs.js.map +1 -0
  139. package/dist/components/file-explorer-provider/index.d.ts +4 -0
  140. package/dist/components/file-explorer-provider/index.d.ts.map +1 -0
  141. package/dist/components/file-explorer-provider/index.esm.js +6 -0
  142. package/dist/components/file-explorer-provider/index.esm.js.map +1 -0
  143. package/dist/components/file-explorer-provider.js +1 -0
  144. package/dist/components/guard.js +1 -1
  145. package/dist/components/index.cjs.js +1 -1
  146. package/dist/components/index.d.ts.map +1 -1
  147. package/dist/components/index.esm.js +1 -0
  148. package/dist/components/login-button.js +1 -1
  149. package/dist/components/login-modal.js +1 -1
  150. package/dist/components/logout-button.js +1 -1
  151. package/dist/components/provider.js +1 -1
  152. package/dist/components/rdf-form.js +1 -1
  153. package/dist/components/rdf-input.js +1 -1
  154. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +8 -0
  155. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +1 -0
  156. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +27 -0
  157. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -0
  158. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +23 -0
  159. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -0
  160. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +344 -0
  161. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -0
  162. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +2 -0
  163. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -0
  164. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +6 -0
  165. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -0
  166. package/dist/components/resource-actions-menu/ResourceActionsMenu.test.d.ts +1 -0
  167. package/dist/components/resource-actions-menu/ResourceActionsMenu.test.d.ts.map +1 -0
  168. package/dist/components/resource-actions-menu/index.cjs.js +1 -0
  169. package/dist/components/resource-actions-menu/index.d.ts +2 -0
  170. package/dist/components/resource-actions-menu/index.d.ts.map +1 -0
  171. package/dist/components/resource-actions-menu/index.esm.js +1 -0
  172. package/dist/components/resource-actions-menu.js +1 -0
  173. package/dist/components/signup-button.js +1 -1
  174. package/dist/components.js +15 -12
  175. package/dist/index.cjs.js +1 -1
  176. package/dist/index.cjs.js.map +1 -1
  177. package/dist/index.d.ts +1 -1
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.esm.js +8 -4
  180. package/dist/index.esm.js.map +1 -1
  181. package/dist/index.js +11 -9
  182. package/dist/lib/context/noopContext.cjs.js +2 -0
  183. package/dist/lib/context/noopContext.cjs.js.map +1 -0
  184. package/dist/lib/context/noopContext.d.ts +2 -0
  185. package/dist/lib/context/noopContext.d.ts.map +1 -0
  186. package/dist/lib/context/noopContext.esm.js +18 -0
  187. package/dist/lib/context/noopContext.esm.js.map +1 -0
  188. package/dist/lib/file-explorer/compose-explorer.cjs.js +2 -0
  189. package/dist/lib/file-explorer/compose-explorer.cjs.js.map +1 -0
  190. package/dist/lib/file-explorer/compose-explorer.d.ts +17 -0
  191. package/dist/lib/file-explorer/compose-explorer.d.ts.map +1 -0
  192. package/dist/lib/file-explorer/compose-explorer.esm.js +18 -0
  193. package/dist/lib/file-explorer/compose-explorer.esm.js.map +1 -0
  194. package/dist/lib/file-explorer/context.cjs.js +1 -1
  195. package/dist/lib/file-explorer/context.cjs.js.map +1 -1
  196. package/dist/lib/file-explorer/context.d.ts +12 -14
  197. package/dist/lib/file-explorer/context.d.ts.map +1 -1
  198. package/dist/lib/file-explorer/context.esm.js +4 -3
  199. package/dist/lib/file-explorer/context.esm.js.map +1 -1
  200. package/dist/lib/file-explorer/events.cjs.js +2 -0
  201. package/dist/lib/file-explorer/events.cjs.js.map +1 -0
  202. package/dist/lib/file-explorer/events.d.ts +16 -0
  203. package/dist/lib/file-explorer/events.d.ts.map +1 -0
  204. package/dist/lib/file-explorer/events.esm.js +8 -0
  205. package/dist/lib/file-explorer/events.esm.js.map +1 -0
  206. package/dist/lib/file-explorer/index.cjs.js +1 -0
  207. package/dist/lib/file-explorer/index.d.ts +5 -0
  208. package/dist/lib/file-explorer/index.d.ts.map +1 -0
  209. package/dist/lib/file-explorer/index.esm.js +5 -0
  210. package/dist/lib/file-explorer/relevant-panes.cjs.js +2 -0
  211. package/dist/lib/file-explorer/relevant-panes.cjs.js.map +1 -0
  212. package/dist/lib/file-explorer/relevant-panes.d.ts +22 -0
  213. package/dist/lib/file-explorer/relevant-panes.d.ts.map +1 -0
  214. package/dist/lib/file-explorer/relevant-panes.esm.js +23 -0
  215. package/dist/lib/file-explorer/relevant-panes.esm.js.map +1 -0
  216. package/dist/loader.js +11 -9
  217. package/dist/solid-ui.js +211 -107
  218. package/dist/solid-ui.min.js +211 -107
  219. package/dist/solid-ui.min.js.map +1 -1
  220. package/dist/theme.css +1 -1
  221. package/dist/utils/podUtils.cjs.js +2 -0
  222. package/dist/utils/podUtils.cjs.js.map +1 -0
  223. package/dist/utils/podUtils.d.ts +6 -0
  224. package/dist/utils/podUtils.d.ts.map +1 -0
  225. package/dist/utils/podUtils.esm.js +22 -0
  226. package/dist/utils/podUtils.esm.js.map +1 -0
  227. package/dist/utils/webIdUtils.cjs.js +1 -0
  228. package/dist/utils/webIdUtils.d.ts +7 -0
  229. package/dist/utils/webIdUtils.d.ts.map +1 -0
  230. package/dist/utils/webIdUtils.esm.js +3 -0
  231. package/package.json +3 -3
  232. package/dist/chunks/DialogProvider-C89v7x0r.js +0 -314
  233. package/dist/chunks/DialogProvider-C89v7x0r.js.map +0 -1
  234. package/dist/chunks/access-control-modal-Dcg6-f4V.js.map +0 -1
  235. package/dist/chunks/index.esm-CECfD0e9.js.map +0 -1
  236. package/dist/chunks/src-Dx7k_VIe.js.map +0 -1
@@ -0,0 +1,318 @@
1
+ import { customElement as e } from "../../lib/components/decorators.esm.js";
2
+ import t from "../../lib/components/web-component/WebComponent.esm.js";
3
+ import "../../lib/components/index.esm.js";
4
+ import "../button/index.esm.js";
5
+ import { DEFAULT_FILE_EXPLORER_CONTEXT as n, fileExplorerContext as r } from "../../lib/file-explorer/context.esm.js";
6
+ import { FILE_EXPLORER_MANAGE_ACCESS_EVENT as i } from "../../lib/file-explorer/events.esm.js";
7
+ import "../../_virtual/~icons/lucide/pencil.esm.js";
8
+ import { isContainerSubject as a } from "../../utils/podUtils.esm.js";
9
+ import "../../_virtual/~icons/lucide/user-round-cog.esm.js";
10
+ import o from "./FileExplorerHeaderControls.styles.esm.js";
11
+ import "../resource-actions-menu/ResourceActionsMenu.esm.js";
12
+ import { consume as s } from "@lit/context";
13
+ import { html as c, nothing as l } from "lit";
14
+ import { property as u, state as d } from "lit/decorators.js";
15
+ // src/components/file-explorer-header/FileExplorerHeaderControls.ts
16
+ var f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N;
17
+ function P(e, t, n) {
18
+ F(e, t), t.set(e, n);
19
+ }
20
+ function F(e, t) {
21
+ if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
22
+ }
23
+ function I(e, t, n) {
24
+ return e.set(R(e, t), n), n;
25
+ }
26
+ function L(e, t) {
27
+ return e.get(R(e, t));
28
+ }
29
+ function R(e, t, n) {
30
+ if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
31
+ throw TypeError("Private element is not present on this object");
32
+ }
33
+ function z(e, t, n) {
34
+ return (t = V(t)) in e ? Object.defineProperty(e, t, {
35
+ value: n,
36
+ enumerable: !0,
37
+ configurable: !0,
38
+ writable: !0
39
+ }) : e[t] = n, e;
40
+ }
41
+ function B(e, t, n, r, i, a) {
42
+ function o(e, t, n) {
43
+ return function(r, i) {
44
+ return n && n(r), e[t].call(r, i);
45
+ };
46
+ }
47
+ function s(e, t) {
48
+ for (var n = 0; n < e.length; n++) e[n].call(t);
49
+ return t;
50
+ }
51
+ function c(e, t, n, r) {
52
+ if (typeof e != "function" && (r || e !== void 0)) throw TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
53
+ return e;
54
+ }
55
+ function l(e, t, n, r, i, a, s, l, u, d, f, p, m) {
56
+ function h(e) {
57
+ if (!m(e)) throw TypeError("Attempted to access private element on non-instance");
58
+ }
59
+ var g, _ = t[0], v = t[3], y = !l;
60
+ if (!y) {
61
+ n || Array.isArray(_) || (_ = [_]);
62
+ var b = {}, x = [], S = i === 3 ? "get" : i === 4 || p ? "set" : "value";
63
+ d ? (f || p ? b = {
64
+ get: U(function() {
65
+ return v(this);
66
+ }, r, "get"),
67
+ set: function(e) {
68
+ t[4](this, e);
69
+ }
70
+ } : b[S] = v, f || U(b[S], r, i === 2 ? "" : S)) : f || (b = Object.getOwnPropertyDescriptor(e, r));
71
+ }
72
+ for (var C = e, w = _.length - 1; w >= 0; w -= n ? 2 : 1) {
73
+ var T = _[w], E = n ? _[w - 1] : void 0, D = {}, O = {
74
+ kind: [
75
+ "field",
76
+ "accessor",
77
+ "method",
78
+ "getter",
79
+ "setter",
80
+ "class"
81
+ ][i],
82
+ name: r,
83
+ metadata: a,
84
+ addInitializer: function(e, t) {
85
+ if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
86
+ c(t, "An initializer", "be", !0), s.push(t);
87
+ }.bind(null, D)
88
+ };
89
+ try {
90
+ if (y) (g = c(T.call(E, C, O), "class decorators", "return")) && (C = g);
91
+ else {
92
+ var k, A;
93
+ O.static = u, O.private = d, d ? i === 2 ? k = function(e) {
94
+ return h(e), b.value;
95
+ } : (i < 4 && (k = o(b, "get", h)), i !== 3 && (A = o(b, "set", h))) : (k = function(e) {
96
+ return e[r];
97
+ }, (i < 2 || i === 4) && (A = function(e, t) {
98
+ e[r] = t;
99
+ }));
100
+ var j = O.access = { has: d ? m.bind() : function(e) {
101
+ return r in e;
102
+ } };
103
+ if (k && (j.get = k), A && (j.set = A), C = T.call(E, p ? {
104
+ get: b.get,
105
+ set: b.set
106
+ } : b[S], O), p) {
107
+ 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);
108
+ else if (C !== void 0) throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
109
+ } else c(C, (f ? "field" : "method") + " decorators", "return") && (f ? x.push(C) : b[S] = C);
110
+ }
111
+ } finally {
112
+ D.v = !0;
113
+ }
114
+ }
115
+ return (f || p) && l.push(function(e, t) {
116
+ for (var n = x.length - 1; n >= 0; n--) t = x[n].call(e, t);
117
+ return t;
118
+ }), 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;
119
+ }
120
+ function u(e, t) {
121
+ return Object.defineProperty(e, Symbol.metadata || Symbol.for("Symbol.metadata"), {
122
+ configurable: !0,
123
+ enumerable: !0,
124
+ value: t
125
+ });
126
+ }
127
+ if (arguments.length >= 6) var d = a[Symbol.metadata || Symbol.for("Symbol.metadata")];
128
+ var f = Object.create(d ?? null), p = function(e, t, n, r) {
129
+ var i, a, o = [], c = function(t) {
130
+ return W(t) === e;
131
+ }, u = /* @__PURE__ */ new Map();
132
+ function d(e) {
133
+ e && o.push(s.bind(null, e));
134
+ }
135
+ for (var f = 0; f < t.length; f++) {
136
+ var p = t[f];
137
+ if (Array.isArray(p)) {
138
+ var m = p[1], h = p[2], g = p.length > 3, _ = 16 & m, v = !!(8 & m), y = (m &= 7) == 0, b = h + "/" + v;
139
+ if (!y && !g) {
140
+ var x = u.get(b);
141
+ 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);
142
+ u.set(b, !(m > 2) || m);
143
+ }
144
+ l(v ? e : e.prototype, p, _, g ? "#" + h : V(h), m, r, v ? a ||= [] : i ||= [], o, v, g, y, m === 1, v && g ? c : n);
145
+ }
146
+ }
147
+ return d(i), d(a), o;
148
+ }(e, t, i, f);
149
+ return n.length || u(e, f), {
150
+ e: p,
151
+ get c() {
152
+ var t = [];
153
+ return n.length && [u(l(e, [n], r, e.name, 5, f, t), f), s.bind(null, t, e)];
154
+ }
155
+ };
156
+ }
157
+ function V(e) {
158
+ var t = H(e, "string");
159
+ return typeof t == "symbol" ? t : t + "";
160
+ }
161
+ function H(e, t) {
162
+ if (typeof e != "object" || !e) return e;
163
+ var n;
164
+ if (typeof Symbol < "u" && (n = e[Symbol.toPrimitive]) !== void 0) {
165
+ var r = n.call(e, t || "default");
166
+ if (typeof r != "object") return r;
167
+ throw TypeError("@@toPrimitive must return a primitive value.");
168
+ }
169
+ return (t === "string" ? String : Number)(e);
170
+ }
171
+ function U(e, t, n) {
172
+ typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
173
+ try {
174
+ Object.defineProperty(e, "name", {
175
+ configurable: !0,
176
+ value: n ? n + " " + t : t
177
+ });
178
+ } catch {}
179
+ return e;
180
+ }
181
+ function W(e) {
182
+ if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e === null ? "null" : typeof e));
183
+ return e;
184
+ }
185
+ function G(e) {
186
+ return e;
187
+ }
188
+ x = [e("solid-ui-file-explorer-header-controls")];
189
+ var K;
190
+ new (M = (m = /*#__PURE__*/ new WeakMap(), h = /*#__PURE__*/ new WeakMap(), g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), N = (S = s({
191
+ context: r,
192
+ subscribe: !0
193
+ }), w = u({ attribute: !1 }), E = u({ type: Boolean }), O = u({ type: Boolean }), A = d(), "mobileMediaQuery"), p = class extends t {
194
+ constructor(...e) {
195
+ super(...e), z(this, N, void y(this)), z(this, "mobileQuery", "(max-width: 600px)"), z(this, "handleMobileMediaChange", (e) => {
196
+ this.isMobile = e.matches;
197
+ }), P(this, m, C(this, n)), P(this, h, T(this, [])), P(this, g, D(this, !1)), P(this, _, k(this, !1)), P(this, v, j(this, typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(max-width: 600px)").matches)), z(this, "handleManageAccess", () => {
198
+ let e = this.fileExplorerContext.subjectUri;
199
+ e && this.dispatchEvent(new CustomEvent(i, {
200
+ bubbles: !0,
201
+ composed: !0,
202
+ detail: { subjectUri: e }
203
+ }));
204
+ });
205
+ }
206
+ get fileExplorerContext() {
207
+ return L(m, this);
208
+ }
209
+ set fileExplorerContext(e) {
210
+ I(m, this, e);
211
+ }
212
+ get menuItems() {
213
+ return L(h, this);
214
+ }
215
+ set menuItems(e) {
216
+ I(h, this, e);
217
+ }
218
+ get canEdit() {
219
+ return L(g, this);
220
+ }
221
+ set canEdit(e) {
222
+ I(g, this, e);
223
+ }
224
+ get canManageAccess() {
225
+ return L(_, this);
226
+ }
227
+ set canManageAccess(e) {
228
+ I(_, this, e);
229
+ }
230
+ get isMobile() {
231
+ return L(v, this);
232
+ }
233
+ set isMobile(e) {
234
+ I(v, this, e);
235
+ }
236
+ connectedCallback() {
237
+ super.connectedCallback(), typeof window < "u" && typeof window.matchMedia == "function" && (this.mobileMediaQuery = window.matchMedia(this.mobileQuery), this.isMobile = this.mobileMediaQuery.matches, this.mobileMediaQuery.addEventListener("change", this.handleMobileMediaChange));
238
+ }
239
+ disconnectedCallback() {
240
+ this.mobileMediaQuery?.removeEventListener("change", this.handleMobileMediaChange), this.mobileMediaQuery = void 0, super.disconnectedCallback();
241
+ }
242
+ getEditTooltip() {
243
+ return this.canEdit ? "Edit" : "No Access";
244
+ }
245
+ renderDirtyIndicator() {
246
+ return this.fileExplorerContext.isDirty ? c`<span class="dirtyIndicator" title="This file has unsaved changes">Unsaved</span>` : l;
247
+ }
248
+ render() {
249
+ let e = a(this.fileExplorerContext.store, this.fileExplorerContext.subjectUri), t = this.fileExplorerContext.canEdit;
250
+ return c`
251
+ <div>
252
+ ${this.renderDirtyIndicator()}
253
+ ${!e && !this.isMobile && this.canManageAccess ? c`
254
+ <solid-ui-button class="file-explorer-header-action-button" variant="ghost" title="Manage Access" @click=${this.handleManageAccess}>
255
+ <icon-lucide-user-round-cog slot="icon"></icon-lucide-user-round-cog>
256
+ <span class="sr-only">Manage access</span>
257
+ </solid-ui-button>
258
+ ${t ? c`
259
+ <solid-ui-button
260
+ class="file-explorer-header-action-button"
261
+ variant="ghost"
262
+ title=${this.getEditTooltip()}
263
+ ?disabled=${!this.canEdit}
264
+ @click=${this.fileExplorerContext.beginEditing}
265
+ >
266
+ <icon-lucide-pencil slot="icon"></icon-lucide-pencil>
267
+ <span class="sr-only">Edit</span>
268
+ </solid-ui-button>
269
+ ` : l}
270
+ ` : l}
271
+ <solid-ui-resource-actions-menu
272
+ .store=${this.fileExplorerContext.store}
273
+ .handleAccessClick=${this.handleManageAccess}
274
+ .handleEditingClick=${this.fileExplorerContext.beginEditing}
275
+ .paneSupportsEditing=${this.fileExplorerContext.canEdit}
276
+ .canEdit=${this.canEdit}
277
+ .canManageAccess=${this.canManageAccess}
278
+ .subjectUri=${this.fileExplorerContext.subjectUri}
279
+ .menuItems=${this.menuItems}
280
+ .isMobile=${this.isMobile}
281
+ ></solid-ui-resource-actions-menu>
282
+ </div>
283
+ `;
284
+ }
285
+ }, {e: [C, T, D, k, j, y], c: [K, b]} = B(p, [
286
+ [
287
+ S,
288
+ 1,
289
+ "fileExplorerContext"
290
+ ],
291
+ [
292
+ w,
293
+ 1,
294
+ "menuItems"
295
+ ],
296
+ [
297
+ E,
298
+ 1,
299
+ "canEdit"
300
+ ],
301
+ [
302
+ O,
303
+ 1,
304
+ "canManageAccess"
305
+ ],
306
+ [
307
+ A,
308
+ 1,
309
+ "isMobile"
310
+ ]
311
+ ], x, 0, void 0, t), p), f = class extends G {
312
+ constructor() {
313
+ super(K), z(this, "styles", o), b();
314
+ }
315
+ }, z(f, M, void 0), f)();
316
+ export { K as default };
317
+
318
+ //# sourceMappingURL=FileExplorerHeaderControls.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeaderControls.esm.js","names":["customElement","WebComponent","property","state","consume","html","nothing","styles","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","FILE_EXPLORER_MANAGE_ACCESS_EVENT","isContainerSubject","_classDecs","_FileExplorerHeaderCo","_FileExplorerHeaderCo2","_A","WeakMap","_B","_C","_D","_E","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_canEditDecs","type","Boolean","_canManageAccessDecs","_isMobileDecs","_FileExplorerHeaderControls","FileExplorerHeaderControls","constructor","args","_defineProperty","_initProto","event","isMobile","matches","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_menuItems","_init_canEdit","_init_canManageAccess","_init_isMobile","window","matchMedia","subjectUri","dispatchEvent","CustomEvent","bubbles","composed","detail","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","canEdit","canManageAccess","connectedCallback","mobileMediaQuery","mobileQuery","addEventListener","handleMobileMediaChange","disconnectedCallback","removeEventListener","undefined","getEditTooltip","renderDirtyIndicator","isDirty","render","isContainerResource","store","supportsEditing","handleManageAccess","beginEditing","e","c","_initClass","_applyDecs","_Class","_identity","default","styles","WebComponent","FileExplorerHeaderControls_styles_default","_Class","_FileExplorerHeaderControls","_A","_B","_C","_D","_E","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_menuItemsDecs","_init_menuItems","_canEditDecs","_init_canEdit","_canManageAccessDecs","_init_canManageAccess","_isMobileDecs","_init_isMobile","_FileExplorerHeaderCo2","_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","_FileExplorerHeaderCo","consume","fileExplorerContext","property","state","args","event","DEFAULT_FILE_EXPLORER_CONTEXT","subjectUri","FILE_EXPLORER_MANAGE_ACCESS_EVENT","nothing","isContainerResource","isContainerSubject","supportsEditing"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html, nothing } from 'lit'\nimport '@/components/button'\nimport '~icons/lucide/user-round-cog'\nimport '~icons/lucide/pencil'\nimport styles from './FileExplorerHeaderControls.styles.css'\nimport '@/components/resource-actions-menu/ResourceActionsMenu'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport { FILE_EXPLORER_MANAGE_ACCESS_EVENT } from '@/lib/file-explorer/events'\nimport { isContainerSubject } from '@/utils/podUtils'\n\n@customElement('solid-ui-file-explorer-header-controls')\nexport default class FileExplorerHeaderControls extends WebComponent {\n static styles = styles\n\n private mobileMediaQuery: MediaQueryList | undefined\n private readonly mobileQuery = '(max-width: 600px)'\n private readonly handleMobileMediaChange = (event: MediaQueryListEvent) => {\n this.isMobile = event.matches\n }\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor menuItems: Array<{ label: string, action: (event: Event) => void, icon?: HTMLElement }> = []\n\n @property({ type: Boolean })\n accessor canEdit: boolean = false\n\n @property({ type: Boolean })\n accessor canManageAccess = false\n\n @state()\n accessor isMobile = typeof window !== 'undefined' && typeof window.matchMedia === 'function'\n ? window.matchMedia('(max-width: 600px)').matches\n : false\n\n connectedCallback () {\n super.connectedCallback()\n\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return\n }\n\n this.mobileMediaQuery = window.matchMedia(this.mobileQuery)\n this.isMobile = this.mobileMediaQuery.matches\n this.mobileMediaQuery.addEventListener('change', this.handleMobileMediaChange)\n }\n\n disconnectedCallback () {\n this.mobileMediaQuery?.removeEventListener('change', this.handleMobileMediaChange)\n this.mobileMediaQuery = undefined\n super.disconnectedCallback()\n }\n\n // TODO: Add broken then use this function to set tooltip and disable edit button\n /* private setEditable() {\n const sourcePaneState = this.sourceContext?.sourcePaneState\n const { canEdit } = this.sourceContext?.headerMetadata ?? { canEdit: false }\n const subject = this.sourceContext?.subject\n if (!sourcePaneState || !canEdit || sourcePaneState.broken || (subject && subject.endsWith('/'))) return\n\n this.sourceContext?.setEditing?.()\n } */\n\n private getEditTooltip () {\n if (!this.canEdit) return 'No Access'\n return 'Edit'\n }\n\n private handleManageAccess = () => {\n const subjectUri = this.fileExplorerContext.subjectUri\n if (!subjectUri) return\n\n this.dispatchEvent(new CustomEvent(FILE_EXPLORER_MANAGE_ACCESS_EVENT, {\n bubbles: true,\n composed: true,\n detail: { subjectUri }\n }))\n }\n\n private renderDirtyIndicator () {\n if (!this.fileExplorerContext.isDirty) return nothing\n\n return html`<span class=\"dirtyIndicator\" title=\"This file has unsaved changes\">Unsaved</span>`\n }\n\n render () {\n const isContainerResource = isContainerSubject(this.fileExplorerContext.store, this.fileExplorerContext.subjectUri)\n const supportsEditing = this.fileExplorerContext.canEdit\n\n return html`\n <div>\n ${this.renderDirtyIndicator()}\n ${!isContainerResource && !this.isMobile && this.canManageAccess\n ? html`\n <solid-ui-button class=\"file-explorer-header-action-button\" variant=\"ghost\" title=\"Manage Access\" @click=${this.handleManageAccess}>\n <icon-lucide-user-round-cog slot=\"icon\"></icon-lucide-user-round-cog>\n <span class=\"sr-only\">Manage access</span>\n </solid-ui-button>\n ${supportsEditing\n ? html`\n <solid-ui-button\n class=\"file-explorer-header-action-button\"\n variant=\"ghost\"\n title=${this.getEditTooltip()}\n ?disabled=${!this.canEdit}\n @click=${this.fileExplorerContext.beginEditing}\n >\n <icon-lucide-pencil slot=\"icon\"></icon-lucide-pencil>\n <span class=\"sr-only\">Edit</span>\n </solid-ui-button>\n `\n : nothing}\n `\n : nothing}\n <solid-ui-resource-actions-menu\n .store=${this.fileExplorerContext.store}\n .handleAccessClick=${this.handleManageAccess}\n .handleEditingClick=${this.fileExplorerContext.beginEditing}\n .paneSupportsEditing=${this.fileExplorerContext.canEdit}\n .canEdit=${this.canEdit}\n .canManageAccess=${this.canManageAccess}\n .subjectUri=${this.fileExplorerContext.subjectUri}\n .menuItems=${this.menuItems}\n .isMobile=${this.isMobile}\n ></solid-ui-resource-actions-menu>\n </div>\n `\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWqDY,IAAA,CAEpDZ,EAAc,wCAAwC,CAAC;AAAA,IAAAa;AAAA,KAAAC,KAAAC,kBAAA,IAAAC,QAA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,GAC5G0B,IAAkB,KAAKlE,oBAAoBkD;EAEjD,OAAOtD,CAAI;;UAEL,KAAKiE,qBAAqB,EAAC;UAC3B,CAACG,KAAuB,CAAC,KAAKlC,YAAY,KAAKqB,kBAC7CvD,CAAI;yHACyG,KAAKuE,mBAAkB;;;;gBAIhID,IACEtE,CAAI;;;;8BAIQ,KAAKgE,eAAe,EAAC;kCACjB,CAAC,KAAKV,QAAO;+BAChB,KAAKlD,oBAAoBoE,aAAY;;;;;sBAMlDvE,EAAO;gBAEbA,EAAO;;mBAEA,KAAKG,oBAAoBiE,MAAK;+BAClB,KAAKE,mBAAkB;gCACtB,KAAKnE,oBAAoBoE,aAAY;iCACpC,KAAKpE,oBAAoBkD,QAAO;qBAC5C,KAAKA,QAAO;6BACJ,KAAKC,gBAAe;wBACzB,KAAKnD,oBAAoBwC,WAAU;uBACpC,KAAKS,UAAS;sBACf,KAAKnB,SAAQ;;;;CAIjC;AACF,GAAC,CAAAuC,GAAA,CAAApC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAT,IAAA0C,GAAA,CAAAlE,GAAAmE,MAAAC,EAAAjD,GAAA;CAAA;EAAAV;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAE;EAAA;EAAA;CAAA;CAAA;EAAAG;EAAA;EAAA;CAAA;CAAA;EAAAC;EAAA;EAAA;CAAA;AAAA,GAAAnB,GAAA,GAAA,KAAA,GAvHuDX,CAAY,GAAA+B,IAAAkD,IAAA,cAAAC,EAAA;CAAAjD,cAAA;EAAA,MAAArB,CAAA,GAAAuB,EAAA,MAAA,UAClD7B,CAAM,GAAAyE,EAAA;CAAA;AAAA,GAAA5C,EAAA8C,GAAApE,GAAA,KAAA,CAAA,GAAAoE,GAAA"}
@@ -0,0 +1,2 @@
1
+ var e=require("lit").css`:host{flex:0 auto;min-width:0}:host div{text-align:right;flex:none;justify-content:flex-end;align-items:center;gap:6px;display:flex}:host div>*{flex:0 auto}:host .file-explorer-header-action-button{width:var(--solid-ui-clickable-area,42px);height:var(--solid-ui-clickable-area,42px);padding:0}:host .dirtyIndicator{color:#92400e;white-space:nowrap;background:#fffbeb;border:1px solid #f59e0b;border-radius:999px;align-items:center;padding:4px 8px;font-size:.72rem;font-weight:600;line-height:1;display:inline-flex}:host icon-lucide-user-round-cog,:host icon-lucide-pencil{width:16px;height:16px}@media (width<=900px){:host div{padding-right:3px}}@media (width<=600px){:host div{justify-content:flex-start;gap:5px}:host .file-explorer-header-action-button{display:none}:host icon-lucide-ellipsis-vertical{aspect-ratio:1;flex-shrink:0;width:15.36px;height:15.36px}}`;exports.default=e;
2
+ //# sourceMappingURL=FileExplorerHeaderControls.styles.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeaderControls.styles.cjs.js","names":["FileExplorerHeaderControls_styles_default"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.styles.css"],"sourcesContent":[":host {\n flex: 0 1 auto;\n min-width: 0;\n\n div {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 6px;\n flex: 0 0 auto;\n text-align: right;\n }\n\n /* generative ai */\n div > * {\n flex: 0 1 auto;\n }\n\n .file-explorer-header-action-button {\n width: var(--solid-ui-clickable-area, 42px);\n height: var(--solid-ui-clickable-area, 42px);\n padding: 0;\n }\n\n /* TODO: look into what colors to use this is just to show */\n .dirtyIndicator {\n display: inline-flex;\n align-items: center;\n border: 1px solid #F59E0B;\n color: #92400E;\n background: #FFFBEB;\n border-radius: 999px;\n font-size: 0.72rem;\n font-weight: 600;\n line-height: 1;\n padding: 4px 8px;\n white-space: nowrap;\n }\n\n icon-lucide-user-round-cog,\n icon-lucide-pencil {\n width: 16px;\n height: 16px;\n }\n\n @media (max-width: 900px) {\n div {\n padding-right: 3px;\n }\n }\n\n @media (max-width: 600px) {\n div {\n justify-content: flex-start;\n gap: 5px;\n }\n\n .file-explorer-header-action-button {\n display: none;\n }\n\n icon-lucide-ellipsis-vertical {\n width: 15.36px;\n height: 15.36px;\n flex-shrink: 0;\n aspect-ratio: 1 / 1;\n }\n }\n}\n"],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { css as e } from "lit";
2
+ // src/components/file-explorer-header/FileExplorerHeaderControls.styles.css
3
+ var t = e`:host{flex:0 auto;min-width:0}:host div{text-align:right;flex:none;justify-content:flex-end;align-items:center;gap:6px;display:flex}:host div>*{flex:0 auto}:host .file-explorer-header-action-button{width:var(--solid-ui-clickable-area,42px);height:var(--solid-ui-clickable-area,42px);padding:0}:host .dirtyIndicator{color:#92400e;white-space:nowrap;background:#fffbeb;border:1px solid #f59e0b;border-radius:999px;align-items:center;padding:4px 8px;font-size:.72rem;font-weight:600;line-height:1;display:inline-flex}:host icon-lucide-user-round-cog,:host icon-lucide-pencil{width:16px;height:16px}@media (width<=900px){:host div{padding-right:3px}}@media (width<=600px){:host div{justify-content:flex-start;gap:5px}:host .file-explorer-header-action-button{display:none}:host icon-lucide-ellipsis-vertical{aspect-ratio:1;flex-shrink:0;width:15.36px;height:15.36px}}`;
4
+ export { t as default };
5
+
6
+ //# sourceMappingURL=FileExplorerHeaderControls.styles.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeaderControls.styles.esm.js","names":["FileExplorerHeaderControls_styles_default"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderControls.styles.css"],"sourcesContent":[":host {\n flex: 0 1 auto;\n min-width: 0;\n\n div {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 6px;\n flex: 0 0 auto;\n text-align: right;\n }\n\n /* generative ai */\n div > * {\n flex: 0 1 auto;\n }\n\n .file-explorer-header-action-button {\n width: var(--solid-ui-clickable-area, 42px);\n height: var(--solid-ui-clickable-area, 42px);\n padding: 0;\n }\n\n /* TODO: look into what colors to use this is just to show */\n .dirtyIndicator {\n display: inline-flex;\n align-items: center;\n border: 1px solid #F59E0B;\n color: #92400E;\n background: #FFFBEB;\n border-radius: 999px;\n font-size: 0.72rem;\n font-weight: 600;\n line-height: 1;\n padding: 4px 8px;\n white-space: nowrap;\n }\n\n icon-lucide-user-round-cog,\n icon-lucide-pencil {\n width: 16px;\n height: 16px;\n }\n\n @media (max-width: 900px) {\n div {\n padding-right: 3px;\n }\n }\n\n @media (max-width: 600px) {\n div {\n justify-content: flex-start;\n gap: 5px;\n }\n\n .file-explorer-header-action-button {\n display: none;\n }\n\n icon-lucide-ellipsis-vertical {\n width: 15.36px;\n height: 15.36px;\n flex-shrink: 0;\n aspect-ratio: 1 / 1;\n }\n }\n}\n"],"mappings":""}
@@ -0,0 +1,35 @@
1
+ const e=require("../../utils/label.cjs.js");require("../../utils/index.cjs.js");const t=require("../../widgets/dragAndDrop.cjs.js");require("../../widgets/index.cjs.js");const n=require("../../lib/components/decorators.cjs.js"),r=require("../../lib/components/web-component/WebComponent.cjs.js");require("../../lib/components/index.cjs.js"),require("../button/index.cjs.js");const i=require("../../lib/file-explorer/context.cjs.js");require("../../_virtual/~icons/lucide/folder.cjs.js"),require("../../_virtual/~icons/lucide/globe.cjs.js"),require("../../_virtual/~icons/lucide/lock-keyhole.cjs.js"),require("../../_virtual/~icons/lucide/arrow-left.cjs.js");const a=require("./FileExplorerHeaderSummary.styles.cjs.js"),o=require("../../utils/podUtils.cjs.js");let s=require("rdflib"),c=require("@lit/context"),l=require("lit"),u=require("lit/decorators.js");var 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}x=[n.customElement(`solid-ui-file-explorer-header-summary`)];var J;new(P=(p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,F=(S=(0,c.consume)({context:i.fileExplorerContext,subscribe:!0}),w=(0,u.property)({attribute:!1}),E=(0,u.property)({attribute:!1}),O=(0,u.property)({attribute:!1}),A=(0,u.state)(),M=(0,u.query)(`h1`),`_draggableSubjectUri`),f=class extends r.default{constructor(...e){super(...e),V(this,F,void y(this)),V(this,`_paneIconGeneration`,0),I(this,p,C(this,i.DEFAULT_FILE_EXPLORER_CONTEXT)),I(this,m,T(this)),I(this,h,D(this)),I(this,g,k(this,{modified:void 0,isPublic:!1})),I(this,_,j(this,void 0)),I(this,v,N(this,null))}get fileExplorerContext(){return z(p,this)}set fileExplorerContext(e){R(p,this,e)}get paneIcon(){return z(m,this)}set paneIcon(e){R(m,this,e)}get onBackClick(){return z(h,this)}set onBackClick(e){R(h,this,e)}get responseMetadata(){return z(g,this)}set responseMetadata(e){R(g,this,e)}get resolvedPaneIcon(){return z(_,this)}set resolvedPaneIcon(e){R(_,this,e)}get titleHeading(){return z(v,this)}set titleHeading(e){R(v,this,e)}formatModifiedDate(e){if(!e)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=new Intl.DateTimeFormat(`en-GB`,{day:`2-digit`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!0}).formatToParts(t),r=e=>n.find(t=>t.type===e)?.value??``;return`${r(`day`)} ${r(`month`)}, ${r(`year`)} at ${r(`hour`)}:${r(`minute`)} ${r(`dayPeriod`).toUpperCase()}`}willUpdate(e){if(e.has(`paneIcon`)){let e=++this._paneIconGeneration;this.resolvedPaneIcon=void 0,this.resolvePaneIcon(this.paneIcon,e)}}updated(){this.titleHeading&&this.fileExplorerContext?.subjectUri&&this._draggableSubjectUri!==this.fileExplorerContext.subjectUri&&(t.makeDraggable(this.titleHeading,(0,s.sym)(this.fileExplorerContext.subjectUri)),this._draggableSubjectUri=this.fileExplorerContext.subjectUri)}async resolvePaneIcon(e,t){try{if(e==null)return;let n=await e;t===this._paneIconGeneration&&(this.resolvedPaneIcon=n??void 0)}catch(e){t===this._paneIconGeneration&&(this.resolvedPaneIcon=void 0,console.warn(`file-explorer-header-summary: failed to resolve pane icon`,e))}}renderContainerResourceHeader(e,t){let n=o.getContainerItemCount(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri)??0;return l.html`
2
+ <div class="container-info">
3
+ <h1>
4
+ <span>${e}</span>
5
+ </h1>
6
+ <p>
7
+ ${n} items
8
+ ${t?l.html`<span class="public"><icon-lucide-globe aria-hidden="true"></icon-lucide-globe><span class="sr-only">Public</span></span>`:l.html`<span class="private"><icon-lucide-lock-keyhole aria-hidden="true"></icon-lucide-lock-keyhole><span class="sr-only">Private</span></span>`}
9
+ </p>
10
+ </div>
11
+ `}renderResourceHeader(e,t){let n=this.formatModifiedDate(this.responseMetadata.modified);return l.html`
12
+ <div class="resource-info">
13
+ <h1>
14
+ <span>${e}</span>
15
+ </h1>
16
+ <p><span class="resource-date">${n}</span> ${t?l.html`<span class="public"><icon-lucide-globe></icon-lucide-globe> Public</span>`:l.html`<span class="private"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>
17
+ </div>
18
+ `}render(){let t=this.fileExplorerContext?.subjectUri?(0,s.sym)(this.fileExplorerContext.subjectUri):void 0,n=t?e.label(t):``,r=this.responseMetadata.isPublic,i=o.isContainerSubject(this.fileExplorerContext?.store,this.fileExplorerContext?.subjectUri);return l.html`
19
+ <div class="file-explorer-header-summary">
20
+ <solid-ui-button
21
+ variant="ghost"
22
+ @click=${this.onBackClick}
23
+ title="Back"
24
+ >
25
+ <icon-lucide-arrow-left></icon-lucide-arrow-left>
26
+ <span class="sr-only">Back</span>
27
+ </solid-ui-button>
28
+ <span class="pane-icon">
29
+ ${this.resolvedPaneIcon?l.html`<img src=${this.resolvedPaneIcon} alt="" />`:``}
30
+ </span>
31
+ ${i?this.renderContainerResourceHeader(n,r):this.renderResourceHeader(n,r)}
32
+ </div>
33
+ </div>
34
+ `}},{e:[C,T,D,k,j,N,y],c:[J,b]}=H(f,[[S,1,`fileExplorerContext`],[w,1,`paneIcon`],[E,1,`onBackClick`],[O,1,`responseMetadata`],[A,1,`resolvedPaneIcon`],[M,1,`titleHeading`]],x,0,void 0,r.default),f),d=class extends q{constructor(){super(J),V(this,`styles`,a.default),b()}},V(d,P,void 0),d),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return J}});
35
+ //# sourceMappingURL=FileExplorerHeaderSummary.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeaderSummary.cjs.js","names":["sym","customElement","WebComponent","utils","widgets","DEFAULT_FILE_EXPLORER_CONTEXT","fileExplorerContext","property","query","state","html","consume","styles","getContainerItemCount","isContainerSubject","_classDecs","_FileExplorerHeaderSu","_FileExplorerHeaderSu2","_A","WeakMap","_B","_C","_D","_E","_F","_ref","_fileExplorerContextDecs","context","subscribe","_paneIconDecs","attribute","_onBackClickDecs","_responseMetadataDecs","_resolvedPaneIconDecs","_titleHeadingDecs","_FileExplorerHeaderSummary","FileExplorerHeaderSummary","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","_init_paneIcon","_init_onBackClick","_init_responseMetadata","modified","undefined","isPublic","_init_resolvedPaneIcon","_init_titleHeading","_classPrivateFieldGet","v","_classPrivateFieldSet","paneIcon","onBackClick","responseMetadata","resolvedPaneIcon","titleHeading","formatModifiedDate","date","Date","Number","isNaN","getTime","parts","Intl","DateTimeFormat","day","month","year","hour","minute","hour12","formatToParts","getPart","type","find","part","value","dayPeriod","toUpperCase","willUpdate","changedProperties","has","generation","_paneIconGeneration","resolvePaneIcon","updated","subjectUri","_draggableSubjectUri","makeDraggable","icon","error","console","warn","renderContainerResourceHeader","label","itemCount","store","renderResourceHeader","render","subject","isContainerResource","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","consume","fileExplorerContext","property","state","query","WebComponent","DEFAULT_FILE_EXPLORER_CONTEXT","sym","getContainerItemCount","label","isContainerSubject","styles","require_label","require_dragAndDrop","require_decorators","require_WebComponent","require_context","require_FileExplorerHeaderSummary_styles","require_podUtils","rdflib","_lit_context","lit","lit_decorators_js","_Class","_FileExplorerHeaderSummary","_A","_B","_C","_D","_E","_F","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_paneIconDecs","_init_paneIcon","_onBackClickDecs","_init_onBackClick","_responseMetadataDecs","_init_responseMetadata","_resolvedPaneIconDecs","_init_resolvedPaneIcon","_titleHeadingDecs","_init_titleHeading","_FileExplorerHeaderSu2","_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","_FileExplorerHeaderSu","args","modified","date","parts","getPart","part","type","changedProperties","generation","paneIcon","icon","error","itemCount","label","isPublic","subject","label$1","isContainerResource"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { customElement, WebComponent } from '@/lib/components'\nimport * as utils from '@/utils'\nimport * as widgets from '@/widgets/index'\nimport { DEFAULT_FILE_EXPLORER_CONTEXT, fileExplorerContext } from '@/lib/file-explorer/context'\nimport '@/components/button'\nimport { property, query, state } from 'lit/decorators.js'\nimport type { PropertyValues } from 'lit'\nimport { html } from 'lit'\nimport { consume } from '@lit/context'\nimport { PaneIcon } from './types'\nimport '~icons/lucide/globe'\nimport '~icons/lucide/lock-keyhole'\nimport '~icons/lucide/arrow-left'\nimport '~icons/lucide/folder'\nimport styles from './FileExplorerHeaderSummary.styles.css'\nimport { getContainerItemCount, isContainerSubject } from '@/utils/podUtils'\nimport type { FileExplorerResourceMetadata } from './types'\n\n@customElement('solid-ui-file-explorer-header-summary')\nexport default class FileExplorerHeaderSummary extends WebComponent {\n static styles = styles\n\n private _draggableSubjectUri: string | undefined\n private _paneIconGeneration = 0\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext = DEFAULT_FILE_EXPLORER_CONTEXT\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon | undefined\n\n @property({ attribute: false })\n accessor onBackClick: (() => void) | undefined\n\n @property({ attribute: false })\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'> = {\n modified: undefined,\n isPublic: false\n }\n\n @state()\n accessor resolvedPaneIcon: string | undefined = undefined\n\n @query('h1')\n private accessor titleHeading: HTMLHeadingElement | null = null\n\n private formatModifiedDate (modified: string | undefined) {\n if (!modified) return ''\n\n const date = new Date(modified)\n if (Number.isNaN(date.getTime())) return modified\n\n const parts = new Intl.DateTimeFormat('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n hour12: true\n }).formatToParts(date)\n\n const getPart = (type: Intl.DateTimeFormatPartTypes) => parts.find(part => part.type === type)?.value ?? ''\n const day = getPart('day')\n const month = getPart('month')\n const year = getPart('year')\n const hour = getPart('hour')\n const minute = getPart('minute')\n const dayPeriod = getPart('dayPeriod').toUpperCase()\n\n return `${day} ${month}, ${year} at ${hour}:${minute} ${dayPeriod}`\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n if (changedProperties.has('paneIcon')) {\n const generation = ++this._paneIconGeneration\n this.resolvedPaneIcon = undefined\n this.resolvePaneIcon(this.paneIcon, generation)\n }\n }\n\n protected updated () {\n if (!this.titleHeading || !this.fileExplorerContext?.subjectUri || this._draggableSubjectUri === this.fileExplorerContext.subjectUri) return\n\n widgets.makeDraggable(this.titleHeading, sym(this.fileExplorerContext.subjectUri)) // doing it this way for now, just to keep the same functionality\n this._draggableSubjectUri = this.fileExplorerContext.subjectUri\n }\n\n // Needed because humanReadable pane can return a promise for an icon.\n private async resolvePaneIcon (paneIcon: PaneIcon | undefined, generation: number) {\n try {\n if (paneIcon == null) return\n\n const icon = await paneIcon\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = icon ?? undefined\n }\n } catch (error) {\n if (generation === this._paneIconGeneration) {\n this.resolvedPaneIcon = undefined\n console.warn('file-explorer-header-summary: failed to resolve pane icon', error)\n }\n }\n }\n\n private renderContainerResourceHeader (label: string, isPublic: boolean) {\n const itemCount = getContainerItemCount(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri) ?? 0\n return html`\n <div class=\"container-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p>\n ${itemCount} items\n ${isPublic\n ? html`<span class=\"public\"><icon-lucide-globe aria-hidden=\"true\"></icon-lucide-globe><span class=\"sr-only\">Public</span></span>`\n : html`<span class=\"private\"><icon-lucide-lock-keyhole aria-hidden=\"true\"></icon-lucide-lock-keyhole><span class=\"sr-only\">Private</span></span>`}\n </p>\n </div>\n `\n }\n\n private renderResourceHeader (label: string, isPublic: boolean) {\n const modified = this.formatModifiedDate(this.responseMetadata.modified)\n\n return html`\n <div class=\"resource-info\">\n <h1>\n <span>${label}</span>\n </h1>\n <p><span class=\"resource-date\">${modified}</span> ${isPublic ? html`<span class=\"public\"><icon-lucide-globe></icon-lucide-globe> Public</span>` : html`<span class=\"private\"><icon-lucide-lock-keyhole></icon-lucide-lock-keyhole> Private</span>`}</p>\n </div>\n `\n }\n\n render () {\n const subject = this.fileExplorerContext?.subjectUri ? sym(this.fileExplorerContext.subjectUri) : undefined\n const label = subject ? utils.label(subject) : ''\n const isPublic = this.responseMetadata.isPublic\n const isContainerResource = isContainerSubject(this.fileExplorerContext?.store, this.fileExplorerContext?.subjectUri)\n\n return html`\n <div class=\"file-explorer-header-summary\">\n <solid-ui-button\n variant=\"ghost\"\n @click=${this.onBackClick}\n title=\"Back\"\n >\n <icon-lucide-arrow-left></icon-lucide-arrow-left>\n <span class=\"sr-only\">Back</span>\n </solid-ui-button>\n <span class=\"pane-icon\">\n ${this.resolvedPaneIcon ? html`<img src=${this.resolvedPaneIcon} alt=\"\" />` : ''}\n </span>\n ${isContainerResource ? this.renderContainerResourceHeader(label, isPublic) : this.renderResourceHeader(label, isPublic)}\n </div>\n </div>\n `\n }\n}\n"],"mappings":"A,y9JAgB4Ee,EAAA,CAG3Ed,EAAAA,cAAc,uCAAuC,CAAC,EAAA,IAAAe,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,GAAAC,GAAAA,EAOpDf,EAAAA,QAAAA,CAAQ,CAAEgB,QAASrB,EAAAA,oBAAqBsB,UAAW,EAAK,CAAC,EAACC,GAAAA,EAG1DtB,EAAAA,SAAAA,CAAS,CAAEuB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BxB,EAAAA,SAAAA,CAAS,CAAEuB,UAAW,EAAM,CAAC,EAACE,GAAAA,EAG9BzB,EAAAA,SAAAA,CAAS,CAAEuB,UAAW,EAAM,CAAC,EAACG,GAAAA,EAM9BxB,EAAAA,MAAAA,CAAM,EAACyB,GAAAA,EAGP1B,EAAAA,MAAAA,CAAM,IAAI,EAAC,wBAAA2B,EAzBd,cACuDjC,EAAAA,OAAa,CAAAmC,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAd,EAAA,KAAAe,EAAA,IAAA,CAAA,EAAAD,EAAA,KAAA,sBAIpC,CAAC,EAAAE,EAAA,KAAAvB,EAAAwB,EAAA,KAGArC,EAAAA,6BAA6B,CAAA,EAAAoC,EAAA,KAAArB,EAAAuB,EAAA,IAAA,CAAA,EAAAF,EAAA,KAAApB,EAAAuB,EAAA,IAAA,CAAA,EAAAH,EAAA,KAAAnB,EAAAuB,EAAA,KAS6B,CACvFC,SAAUC,IAAAA,GACVC,SAAU,EACZ,CAAC,CAAA,EAAAP,EAAA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B,CAAA,EAAAuB,EAAA,KAAA,SACjD3B,EAAAA,OAAM,EAAA8F,EAAA,CAAA,CAAA,EAAAnE,EAAAqE,EAAA3F,EAAA,IAAA,EAAA,EAAA2F,G"}
@@ -0,0 +1,22 @@
1
+ import { WebComponent } from '../../lib/components';
2
+ import { PropertyValues } from 'lit';
3
+ import { PaneIcon, FileExplorerResourceMetadata } from './types';
4
+ export default class FileExplorerHeaderSummary extends WebComponent {
5
+ static styles: import('lit').CSSResult;
6
+ private _draggableSubjectUri;
7
+ private _paneIconGeneration;
8
+ accessor fileExplorerContext: import('../../lib/file-explorer/context').FileExplorerContext;
9
+ accessor paneIcon: PaneIcon | undefined;
10
+ accessor onBackClick: (() => void) | undefined;
11
+ accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic'>;
12
+ accessor resolvedPaneIcon: string | undefined;
13
+ private accessor titleHeading;
14
+ private formatModifiedDate;
15
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
16
+ protected updated(): void;
17
+ private resolvePaneIcon;
18
+ private renderContainerResourceHeader;
19
+ private renderResourceHeader;
20
+ render(): import('lit-html').TemplateResult<1>;
21
+ }
22
+ //# sourceMappingURL=FileExplorerHeaderSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileExplorerHeaderSummary.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerHeaderSummary.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAI9D,OAAO,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAGzC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS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