solid-panes 5.1.0-1 → 5.1.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RDFXMLPane2.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
- package/dist/audio/audioPane.esm.js +1 -2
- package/dist/classInstancePane.esm.js +1 -2
- package/dist/components/editor-card/EditorCard.cjs.js +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.esm.js +6 -7
- package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js +7 -8
- package/dist/components/header/Header.styles.esm.js +1 -2
- package/dist/components/navbar/Navbar.cjs.js +2 -2
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js +8 -9
- package/dist/components/navbar/Navbar.styles.esm.js +1 -2
- package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
- package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
- package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
- package/dist/components/profile-heading/friendActions.esm.js +1 -2
- package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
- package/dist/dashboard/basicPreferences.esm.js +1 -2
- package/dist/dashboard/dashboardPane.esm.js +0 -1
- package/dist/dashboard/homepage.esm.js +1 -2
- package/dist/dashboard/ontologyData.esm.js +1 -2
- package/dist/dashboard/preferencesFormText.esm.js +1 -2
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.esm.js +2 -3
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.esm.js +2 -3
- package/dist/dokieli/dokieliPane.cjs.js +1 -1
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
- package/dist/dokieli/dokieliPane.esm.js +7 -12
- package/dist/dokieli/dokieliPane.esm.js.map +1 -1
- package/dist/dokieli/new.esm.js +1 -2
- package/dist/form/pane.esm.js +1 -2
- package/dist/home/homePane.esm.js +1 -2
- package/dist/humanReadablePane.d.ts +3 -0
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +276 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +428 -31
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/icons/folder.esm.js +1 -2
- package/dist/icons/friends.esm.js +1 -2
- package/dist/icons/person.esm.js +1 -2
- package/dist/imagePane.d.ts.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +2 -3
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.esm.js +1 -2
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.esm.js +2 -3
- package/dist/mainPage/header.esm.js +1 -2
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts +1 -1
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +6 -2
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.esm.js +1 -2
- package/dist/mainPage/navigation.cjs.js +1 -1
- package/dist/mainPage/navigation.cjs.js.map +1 -1
- package/dist/mainPage/navigation.d.ts.map +1 -1
- package/dist/mainPage/navigation.esm.js +14 -11
- package/dist/mainPage/navigation.esm.js.map +1 -1
- package/dist/mainPage/profileHeading2.esm.js +1 -2
- package/dist/n3Pane2.esm.js +1 -2
- package/dist/navigation/browserEvents.esm.js +1 -2
- package/dist/navigation/chrome.esm.js +1 -2
- package/dist/navigation/controller.cjs.js +1 -1
- package/dist/navigation/controller.cjs.js.map +1 -1
- package/dist/navigation/controller.esm.js +6 -7
- package/dist/navigation/controller.esm.js.map +1 -1
- package/dist/navigation/events.esm.js +1 -2
- package/dist/navigation/navbarVisibility.esm.js +1 -2
- package/dist/navigation/options.esm.js +1 -2
- package/dist/navigation/podContext.esm.js +1 -2
- package/dist/navigation/state.esm.js +1 -2
- package/dist/outline/context.esm.js +1 -2
- package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
- package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
- package/dist/outline/fileExplorerHelpers.d.ts +13 -0
- package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
- package/dist/outline/fileExplorerHelpers.esm.js +24 -0
- package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +422 -433
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/outlineDomHelpers.cjs.js +2 -0
- package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
- package/dist/outline/outlineDomHelpers.d.ts +30 -0
- package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
- package/dist/outline/outlineDomHelpers.esm.js +79 -0
- package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
- package/dist/outline/outlineIcons.esm.js +1 -2
- package/dist/outline/propertyViews.esm.js +1 -2
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +1 -2
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +9 -9
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +50 -40
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/outline/viewAsImage.esm.js +1 -2
- package/dist/outline/viewAsMbox.esm.js +1 -2
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.esm.js +2 -3
- package/dist/playlist/playlistPane.esm.js +1 -2
- package/dist/registerPanes.esm.js +1 -2
- package/dist/schedule/formsForSchedule.esm.js +1 -2
- package/dist/schedule/schedulePane.d.ts.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js +60 -59
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -2
- package/dist/slideshow/slideshowPane.esm.js +1 -2
- package/dist/social/editProfileDetails.cjs.js +1 -1
- package/dist/social/editProfileDetails.esm.js +1 -2
- package/dist/social/icons.esm.js +1 -2
- package/dist/social/socialPane2.esm.js +1 -2
- package/dist/social/socialSections.esm.js +1 -2
- package/dist/social/triage.esm.js +1 -2
- package/dist/tabbed/tabbedPane.esm.js +1 -2
- package/dist/tableViewPane.esm.js +1 -2
- package/dist/transaction/pane.esm.js +1 -2
- package/dist/transaction/period.esm.js +1 -2
- package/dist/trip/tripPane.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
- package/dist/ui/pane.esm.js +1 -2
- package/dist/utils/paneUtils.cjs.js +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.d.ts +5 -3
- package/dist/utils/paneUtils.d.ts.map +1 -1
- package/dist/utils/paneUtils.esm.js +36 -29
- package/dist/utils/paneUtils.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/podUtils.d.ts +9 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +22 -95
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/utils/viewerUtils.esm.js +1 -2
- package/dist/utils/webIdUtils.esm.js +1 -2
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +4 -5
- package/dist/versionInfo.esm.js.map +1 -1
- package/dist/video/videoPane.esm.js +1 -2
- package/package.json +7 -6
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/index.cjs.js +0 -1
- package/dist/components/file-explorer-header/index.d.ts +0 -3
- package/dist/components/file-explorer-header/index.d.ts.map +0 -1
- package/dist/components/file-explorer-header/index.esm.js +0 -2
- package/dist/components/file-explorer-header/types.d.ts +0 -10
- package/dist/components/file-explorer-header/types.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +0 -1
|
@@ -1,117 +1,44 @@
|
|
|
1
1
|
import { isWebIdUri as e } from "./webIdUtils.esm.js";
|
|
2
2
|
import { ns as t } from "solid-ui";
|
|
3
|
-
import {
|
|
4
|
-
import { parse as
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
if (!e) return t;
|
|
9
|
-
for (let n of e.split(",")) {
|
|
10
|
-
let e = n.trim().match(/^([A-Za-z]+)\s*=\s*"([^"]*)"$/);
|
|
11
|
-
if (e) {
|
|
12
|
-
let [, n, r] = e, i = r.trim().split(/\s+/).filter(Boolean);
|
|
13
|
-
t.set(n.toLowerCase(), new Set(i.map((e) => e.toLowerCase())));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return t;
|
|
17
|
-
}
|
|
18
|
-
function o(e) {
|
|
19
|
-
if (!e) return {
|
|
20
|
-
canEdit: !1,
|
|
21
|
-
isPublic: !1
|
|
22
|
-
};
|
|
23
|
-
let t = a(e), n = t.get("user") ?? /* @__PURE__ */ new Set(), r = t.get("public") ?? /* @__PURE__ */ new Set();
|
|
24
|
-
return {
|
|
25
|
-
canEdit: n.has("write"),
|
|
26
|
-
isPublic: r.has("read") || r.has("write")
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
async function s(n) {
|
|
30
|
-
if (e(n)) {
|
|
3
|
+
import { store as n } from "solid-logic";
|
|
4
|
+
import { parse as r } from "rdflib";
|
|
5
|
+
// src/utils/podUtils.ts
|
|
6
|
+
async function i(r) {
|
|
7
|
+
if (e(r)) {
|
|
31
8
|
try {
|
|
32
|
-
await
|
|
9
|
+
await n.fetcher.load(r.doc());
|
|
33
10
|
} catch (e) {
|
|
34
|
-
console.warn("Unable to load profile document for WebID",
|
|
11
|
+
console.warn("Unable to load profile document for WebID", r.doc().uri, e);
|
|
35
12
|
}
|
|
36
|
-
|
|
37
|
-
return (await Promise.all(e.map(async (e) => await l(e) ? e : null))).filter((e) => e !== null);
|
|
13
|
+
return n.each(r, t.space("storage")).filter((e) => e.termType === "NamedNode");
|
|
38
14
|
}
|
|
39
15
|
try {
|
|
40
|
-
let e = await
|
|
16
|
+
let e = await a(r);
|
|
41
17
|
return e ? [e] : [];
|
|
42
18
|
} catch (e) {
|
|
43
19
|
return console.error("cannot load container", e), [];
|
|
44
20
|
}
|
|
45
21
|
}
|
|
46
|
-
async function
|
|
47
|
-
let t = new URL(e.value || e.uri),
|
|
48
|
-
for (;
|
|
49
|
-
|
|
50
|
-
let e =
|
|
51
|
-
if (await
|
|
22
|
+
async function a(e) {
|
|
23
|
+
let t = new URL(e.value || e.uri), r = t.pathname;
|
|
24
|
+
for (; r.length;) {
|
|
25
|
+
r = r.substring(0, r.lastIndexOf("/"));
|
|
26
|
+
let e = n.sym(`${t.origin}${r}/`);
|
|
27
|
+
if (await o(e)) return e;
|
|
52
28
|
}
|
|
53
29
|
return null;
|
|
54
30
|
}
|
|
55
|
-
async function
|
|
56
|
-
return await
|
|
31
|
+
async function o(e) {
|
|
32
|
+
return await s(e), n.holds(e, t.rdf("type"), t.space("Storage"), e.doc());
|
|
57
33
|
}
|
|
58
|
-
async function
|
|
59
|
-
if (!
|
|
60
|
-
let t = (await
|
|
61
|
-
e.uri && t &&
|
|
34
|
+
async function s(e) {
|
|
35
|
+
if (!n.any(e, t.ldp("contains"), void 0, e.doc())) try {
|
|
36
|
+
let t = (await n.fetcher.webOperation("GET", e.uri, n.fetcher.initFetchOptions(e.uri, { headers: { accept: "text/turtle" } }))).responseText;
|
|
37
|
+
e.uri && t && r(t, n, e.uri, "text/turtle");
|
|
62
38
|
} catch (t) {
|
|
63
39
|
console.warn("Unable to load container representation for", e.uri, t);
|
|
64
40
|
}
|
|
65
41
|
}
|
|
66
|
-
|
|
67
|
-
if (!e || !n) return !1;
|
|
68
|
-
let r = e.sym(n), i = e.findTypeURIs(r);
|
|
69
|
-
return !!(i[t.ldp("Container").uri] || i[t.ldp("BasicContainer").uri] || r.uri.endsWith("/"));
|
|
70
|
-
}
|
|
71
|
-
function f(e, n) {
|
|
72
|
-
if (!e || !n) return 0;
|
|
73
|
-
let r = e.sym(n), i = /* @__PURE__ */ new Set();
|
|
74
|
-
for (let n of e.each(r, t.ldp("contains"))) if (n.termType === "NamedNode") {
|
|
75
|
-
let e = n, t = e.dir();
|
|
76
|
-
if (t) {
|
|
77
|
-
let n = e.uri.slice(t.uri.length);
|
|
78
|
-
!n.startsWith(".") && !n.endsWith(".acl") && !n.endsWith("~") && i.add(e.uri);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return i.size;
|
|
82
|
-
}
|
|
83
|
-
function p(e, r, i) {
|
|
84
|
-
let a, s = !1, c = !1, l, u;
|
|
85
|
-
if (i.headers && i.headers.get("content-type")) {
|
|
86
|
-
a = i.headers.get("content-type")?.split(";")[0] ?? void 0;
|
|
87
|
-
let n = o(i.headers.get("wac-allow"));
|
|
88
|
-
s = n.canEdit, c = n.isPublic, l = i.headers.get("etag") ?? void 0, u = e.anyValue(r, t.dct("modified")) || e.anyValue(r, t.dc("modified")) || void 0;
|
|
89
|
-
} else e.each(null, e.sym("http://www.w3.org/2007/ont/link#requestedURI"), r).forEach((n) => {
|
|
90
|
-
let i = e.any(n, e.sym("http://www.w3.org/2007/ont/link#response"));
|
|
91
|
-
if (i && i.termType === "NamedNode") {
|
|
92
|
-
a = e.anyValue(i, t.httph("content-type")) || void 0;
|
|
93
|
-
let n = o(e.anyValue(i, t.httph("wac-allow")) || e.anyValue(i, t.httph("WAC-Allow")));
|
|
94
|
-
s = n.canEdit, c = n.isPublic, l = e.anyValue(i, t.httph("etag")) || void 0, u = e.anyValue(r, t.dct("modified")) || e.anyValue(r, t.dc("modified")) || void 0;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
let d = e.any(r, n)?.value || void 0;
|
|
98
|
-
return {
|
|
99
|
-
contentType: a,
|
|
100
|
-
canEdit: s,
|
|
101
|
-
isPublic: c,
|
|
102
|
-
aclUri: d,
|
|
103
|
-
eTag: l,
|
|
104
|
-
modified: u
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
async function m(e, t) {
|
|
108
|
-
let n = await e.fetcher.webOperation("HEAD", t.uri);
|
|
109
|
-
if (!n.ok) throw Error(`HEAD request failed with status ${n.status}`);
|
|
110
|
-
let r = p(e, t, n);
|
|
111
|
-
if (!r.contentType) throw Error("No content-type available!");
|
|
112
|
-
return r;
|
|
113
|
-
}
|
|
114
|
-
//#endregion
|
|
115
|
-
export { m as fetchResourceMetadata, f as getContainerItemCount, s as getPodStorages, p as getResponseMetadata, d as isContainerSubject, u as loadContainerRepresentation };
|
|
42
|
+
export { i as getPodStorages, s as loadContainerRepresentation };
|
|
116
43
|
|
|
117
44
|
//# sourceMappingURL=podUtils.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podUtils.esm.js","names":["parseWacAllowHeader","permissions","headerValue","entry","match","permissionGroup","accessModes","modes","mode","deriveAccessFlags","wacAllow","userModes","publicModes","getPodStorages","isWebIdUri","url","store","err","podStorages","ns","isPodStorage","pod","storage","findPodStorageFromUrl","podStorage","pathStorage","candidate","loadContainerRepresentation","subject","containerTurtle","parse","isContainerSubject","subjectUri","typeUris","getContainerItemCount","seen","item","resource","parent","pathEnd","getResponseMetadata","contentType","canEdit","isPublic","eTag","modified","response","accessFlags","responseNode","req","aclUri","ACL_LINK","fetchResourceMetadata","metadata"],"sources":["../../src/utils/podUtils.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { ns } from 'solid-ui'\nimport { LiveStore, NamedNode, parse } from 'rdflib'\nimport { isWebIdUri } from './webIdUtils'\nimport { ACL_LINK } from 'solid-logic'\nimport { FileExplorerResourceMetadata } from 'src/components/file-explorer-header/types'\n\nfunction parseWacAllowHeader (headerValue: string | null | undefined) {\n const permissions = new Map<string, Set<string>>()\n if (!headerValue) return permissions\n\n for (const entry of headerValue.split(',')) {\n const match = entry.trim().match(/^([A-Za-z]+)\\s*=\\s*\"([^\"]*)\"$/)\n if (match) {\n const [, permissionGroup, accessModes] = match\n const modes = accessModes.trim().split(/\\s+/).filter(Boolean)\n permissions.set(permissionGroup.toLowerCase(), new Set(modes.map(mode => mode.toLowerCase())))\n }\n }\n\n return permissions\n}\n\nfunction deriveAccessFlags (wacAllow: string | null | undefined) {\n if (!wacAllow) {\n return { canEdit: false, isPublic: false }\n }\n\n const permissions = parseWacAllowHeader(wacAllow)\n const userModes = permissions.get('user') ?? new Set<string>()\n const publicModes = permissions.get('public') ?? new Set<string>()\n\n return {\n canEdit: userModes.has('write'),\n isPublic: publicModes.has('read') || publicModes.has('write')\n }\n}\n\nexport async function getPodStorages (url: NamedNode): Promise<NamedNode[]> {\n if (isWebIdUri(url)) {\n try {\n await store.fetcher.load(url.doc())\n } catch (err) {\n console.warn('Unable to load profile document for WebID', url.doc().uri, err)\n }\n const podStorages = store.each(url, ns.space('storage'))\n const results = await Promise.all(podStorages.map(async pod => await isPodStorage(pod as NamedNode) ? pod as NamedNode : null))\n return results.filter(pod => pod !== null) as NamedNode[]\n }\n try {\n const storage = await findPodStorageFromUrl(url)\n return storage ? [storage] : []\n } catch (err) {\n console.error('cannot load container', err)\n return []\n }\n}\n\nasync function findPodStorageFromUrl (url: NamedNode): Promise<NamedNode | null> {\n const podStorage = new URL(url.value || url.uri)\n let pathStorage = podStorage.pathname\n\n while (pathStorage.length) {\n pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'))\n const candidate = store.sym(`${podStorage.origin}${pathStorage}/`)\n if (await isPodStorage(candidate)) return candidate\n }\n\n // TODO should url.origin be added to pods list when there are no pim:Storage ???\n return null\n}\n\nasync function isPodStorage (pod: NamedNode): Promise<boolean> {\n await loadContainerRepresentation(pod)\n return store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())\n}\n\nexport async function loadContainerRepresentation (subject) {\n // force reload for index.html with RDFa\n if (!store.any(subject, ns.ldp('contains'), undefined, subject.doc())) {\n try {\n const response = await store.fetcher.webOperation('GET', subject.uri, store.fetcher.initFetchOptions(subject.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n if (subject.uri && containerTurtle) {\n parse(containerTurtle, store, subject.uri, 'text/turtle')\n }\n } catch (err) {\n console.warn('Unable to load container representation for', subject.uri, err)\n }\n }\n}\n\nexport function isContainerSubject (store: LiveStore | undefined, subjectUri: string | undefined): boolean {\n if (!store || !subjectUri) return false\n\n const subject = store.sym(subjectUri)\n const typeUris = store.findTypeURIs(subject)\n return Boolean(\n typeUris[ns.ldp('Container').uri] ||\n typeUris[ns.ldp('BasicContainer').uri] ||\n subject.uri.endsWith('/')\n )\n}\n\n// The shared rdflib store can hold duplicate ldp:contains statements for the\n// same child resource when the container and companion metadata are both loaded.\n// Count unique visible children here so the header summary matches the list UI.\nexport function getContainerItemCount (store: LiveStore | undefined, subjectUri: string | undefined): number {\n if (!store || !subjectUri) return 0\n\n const subject = store.sym(subjectUri)\n const seen = new Set<string>()\n\n for (const item of store.each(subject, ns.ldp('contains'))) {\n if (item.termType === 'NamedNode') {\n const resource = item as NamedNode\n const parent = resource.dir()\n\n if (parent) {\n const pathEnd = resource.uri.slice(parent.uri.length)\n if (\n !pathEnd.startsWith('.') &&\n !pathEnd.endsWith('.acl') &&\n !pathEnd.endsWith('~')\n ) {\n seen.add(resource.uri)\n }\n }\n }\n }\n return seen.size\n}\n\nexport function getResponseMetadata (store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata {\n let contentType: string | undefined\n let canEdit = false\n let isPublic = false\n let eTag: string | undefined\n let modified: string | undefined\n\n if (response.headers && response.headers.get('content-type')) {\n contentType = response.headers.get('content-type')?.split(';')[0] ?? undefined\n const accessFlags = deriveAccessFlags(response.headers.get('wac-allow'))\n\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = response.headers.get('etag') ?? undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n } else {\n const reqs = store.each(\n null,\n store.sym('http://www.w3.org/2007/ont/link#requestedURI'),\n subject\n )\n reqs.forEach((req: any) => {\n const responseNode = store.any(\n req as any,\n store.sym('http://www.w3.org/2007/ont/link#response')\n )\n if (responseNode && responseNode.termType === 'NamedNode') {\n contentType = store.anyValue(responseNode as any, ns.httph('content-type')) || undefined\n const wacAllow = (store.anyValue(responseNode as any, ns.httph('wac-allow')) as string | undefined) ||\n (store.anyValue(responseNode as any, ns.httph('WAC-Allow')) as string | undefined)\n const accessFlags = deriveAccessFlags(wacAllow)\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = store.anyValue(responseNode as any, ns.httph('etag')) || undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n }\n })\n }\n\n const aclUri = store.any(subject, ACL_LINK)?.value || undefined\n return { contentType, canEdit, isPublic, aclUri, eTag, modified }\n}\n\nexport async function fetchResourceMetadata (store: LiveStore, subject: NamedNode): Promise<FileExplorerResourceMetadata> {\n const response = await store.fetcher.webOperation('HEAD', subject.uri)\n\n if (!response.ok) {\n throw new Error(`HEAD request failed with status ${response.status}`)\n }\n\n const metadata = getResponseMetadata(store, subject, response)\n if (!metadata.contentType) {\n throw new Error('No content-type available!')\n }\n\n return metadata\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"podUtils.esm.js","names":["getPodStorages","isWebIdUri","url","store","err","ns","pod","storage","findPodStorageFromUrl","podStorage","pathStorage","candidate","isPodStorage","loadContainerRepresentation","subject","containerTurtle","parse"],"sources":["../../src/utils/podUtils.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { ns } from 'solid-ui'\nimport { LiveStore, NamedNode, parse } from 'rdflib'\nimport { isWebIdUri } from './webIdUtils'\nimport { ACL_LINK } from 'solid-logic'\n\ntype FileExplorerResourceMetadata = {\n contentType: string | undefined\n canEdit: boolean\n isPublic: boolean\n aclUri: string | undefined\n eTag: string | undefined\n modified: string | undefined\n}\n\nfunction parseWacAllowHeader (headerValue: string | null | undefined) {\n const permissions = new Map<string, Set<string>>()\n if (!headerValue) return permissions\n\n for (const entry of headerValue.split(',')) {\n const match = entry.trim().match(/^([A-Za-z]+)\\s*=\\s*\"([^\"]*)\"$/)\n if (match) {\n const [, permissionGroup, accessModes] = match\n const modes = accessModes.trim().split(/\\s+/).filter(Boolean)\n permissions.set(permissionGroup.toLowerCase(), new Set(modes.map(mode => mode.toLowerCase())))\n }\n }\n\n return permissions\n}\n\nfunction deriveAccessFlags (wacAllow: string | null | undefined) {\n if (!wacAllow) {\n return { canEdit: false, isPublic: false }\n }\n\n const permissions = parseWacAllowHeader(wacAllow)\n const userModes = permissions.get('user') ?? new Set<string>()\n const publicModes = permissions.get('public') ?? new Set<string>()\n\n return {\n canEdit: userModes.has('write'),\n isPublic: publicModes.has('read') || publicModes.has('write')\n }\n}\n\nexport async function getPodStorages (url: NamedNode): Promise<NamedNode[]> {\n if (isWebIdUri(url)) {\n try {\n await store.fetcher.load(url.doc())\n } catch (err) {\n console.warn('Unable to load profile document for WebID', url.doc().uri, err)\n }\n const podStorages = store.each(url, ns.space('storage'))\n // A WebID's pim:storage assertion is authoritative; not every server serializes space:Storage on its root container.\n return podStorages.filter((pod): pod is NamedNode => pod.termType === 'NamedNode')\n }\n try {\n const storage = await findPodStorageFromUrl(url)\n return storage ? [storage] : []\n } catch (err) {\n console.error('cannot load container', err)\n return []\n }\n}\n\nasync function findPodStorageFromUrl (url: NamedNode): Promise<NamedNode | null> {\n const podStorage = new URL(url.value || url.uri)\n let pathStorage = podStorage.pathname\n\n while (pathStorage.length) {\n pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'))\n const candidate = store.sym(`${podStorage.origin}${pathStorage}/`)\n if (await isPodStorage(candidate)) return candidate\n }\n\n // TODO should url.origin be added to pods list when there are no pim:Storage ???\n return null\n}\n\nasync function isPodStorage (pod: NamedNode): Promise<boolean> {\n await loadContainerRepresentation(pod)\n return store.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())\n}\n\nexport async function loadContainerRepresentation (subject) {\n // force reload for index.html with RDFa\n if (!store.any(subject, ns.ldp('contains'), undefined, subject.doc())) {\n try {\n const response = await store.fetcher.webOperation('GET', subject.uri, store.fetcher.initFetchOptions(subject.uri, { headers: { accept: 'text/turtle' } }))\n const containerTurtle = response.responseText\n if (subject.uri && containerTurtle) {\n parse(containerTurtle, store, subject.uri, 'text/turtle')\n }\n } catch (err) {\n console.warn('Unable to load container representation for', subject.uri, err)\n }\n }\n}\n\nexport function isContainerSubject (store: LiveStore | undefined, subjectUri: string | undefined): boolean {\n if (!store || !subjectUri) return false\n\n const subject = store.sym(subjectUri)\n const typeUris = store.findTypeURIs(subject)\n return Boolean(\n typeUris[ns.ldp('Container').uri] ||\n typeUris[ns.ldp('BasicContainer').uri] ||\n subject.uri.endsWith('/')\n )\n}\n\n// The shared rdflib store can hold duplicate ldp:contains statements for the\n// same child resource when the container and companion metadata are both loaded.\n// Count unique visible children here so the header summary matches the list UI.\nexport function getContainerItemCount (store: LiveStore | undefined, subjectUri: string | undefined): number {\n if (!store || !subjectUri) return 0\n\n const subject = store.sym(subjectUri)\n const seen = new Set<string>()\n\n for (const item of store.each(subject, ns.ldp('contains'))) {\n if (item.termType === 'NamedNode') {\n const resource = item as NamedNode\n const parent = resource.dir()\n\n if (parent) {\n const pathEnd = resource.uri.slice(parent.uri.length)\n if (\n !pathEnd.startsWith('.') &&\n !pathEnd.endsWith('.acl') &&\n !pathEnd.endsWith('~')\n ) {\n seen.add(resource.uri)\n }\n }\n }\n }\n return seen.size\n}\n\nexport function getResponseMetadata (store: LiveStore, subject: NamedNode, response: Response): FileExplorerResourceMetadata {\n let contentType: string | undefined\n let canEdit = false\n let isPublic = false\n let eTag: string | undefined\n let modified: string | undefined\n\n if (response.headers && response.headers.get('content-type')) {\n contentType = response.headers.get('content-type')?.split(';')[0] ?? undefined\n const accessFlags = deriveAccessFlags(response.headers.get('wac-allow'))\n\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = response.headers.get('etag') ?? undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n } else {\n const reqs = store.each(\n null,\n store.sym('http://www.w3.org/2007/ont/link#requestedURI'),\n subject\n )\n reqs.forEach((req: any) => {\n const responseNode = store.any(\n req as any,\n store.sym('http://www.w3.org/2007/ont/link#response')\n )\n if (responseNode && responseNode.termType === 'NamedNode') {\n contentType = store.anyValue(responseNode as any, ns.httph('content-type')) || undefined\n const wacAllow = (store.anyValue(responseNode as any, ns.httph('wac-allow')) as string | undefined) ||\n (store.anyValue(responseNode as any, ns.httph('WAC-Allow')) as string | undefined)\n const accessFlags = deriveAccessFlags(wacAllow)\n canEdit = accessFlags.canEdit\n isPublic = accessFlags.isPublic\n eTag = store.anyValue(responseNode as any, ns.httph('etag')) || undefined\n modified = store.anyValue(subject as any, ns.dct('modified')) || store.anyValue(subject as any, ns.dc('modified')) || undefined\n }\n })\n }\n\n const aclUri = store.any(subject, ACL_LINK)?.value || undefined\n return { contentType, canEdit, isPublic, aclUri, eTag, modified }\n}\n\nexport async function fetchResourceMetadata (store: LiveStore, subject: NamedNode): Promise<FileExplorerResourceMetadata> {\n const response = await store.fetcher.webOperation('HEAD', subject.uri)\n\n if (!response.ok) {\n throw new Error(`HEAD request failed with status ${response.status}`)\n }\n\n const metadata = getResponseMetadata(store, subject, response)\n if (!metadata.contentType) {\n throw new Error('No content-type available!')\n }\n\n return metadata\n}\n"],"mappings":";;;;;AA8CA,eAAsBA,EAAgB,GAAsC;CAC1E,IAAIC,EAAWC,CAAG,GAAG;EACnB,IAAI;GACF,MAAMC,EAAM,QAAQ,KAAKD,EAAI,IAAI,CAAC;EACpC,SAASE,GAAK;GACZ,QAAQ,KAAK,6CAA6CF,EAAI,IAAI,CAAC,CAAC,KAAKE,CAAG;EAC9E;EAGA,OAFoBD,EAAM,KAAKD,GAAKG,EAAG,MAAM,SAAS,CAE/C,CAAA,CAAY,QAAQ,MAA0BC,EAAI,aAAa,WAAW;CACnF;CACA,IAAI;EACF,IAAMC,IAAU,MAAMC,EAAsBN,CAAG;EAC/C,OAAOK,IAAU,CAACA,CAAO,IAAI,CAAC;CAChC,SAASH,GAAK;EAEZ,OADA,QAAQ,MAAM,yBAAyBA,CAAG,GACnC,CAAC;CACV;AACF;AAEA,eAAeI,EAAuB,GAA2C;CAC/E,IAAMC,IAAa,IAAI,IAAIP,EAAI,SAASA,EAAI,GAAG,GAC3CQ,IAAcD,EAAW;CAE7B,OAAOC,EAAY,SAAQ;EACzB,IAAcA,EAAY,UAAU,GAAGA,EAAY,YAAY,GAAG,CAAC;EACnE,IAAMC,IAAYR,EAAM,IAAI,GAAGM,EAAW,SAASC,EAAY,EAAE;EACjE,IAAI,MAAME,EAAaD,CAAS,GAAG,OAAOA;CAC5C;CAGA,OAAO;AACT;AAEA,eAAeC,EAAc,GAAkC;CAE7D,OADA,MAAMC,EAA4BP,CAAG,GAC9BH,EAAM,MAAMG,GAAKD,EAAG,IAAI,MAAM,GAAGA,EAAG,MAAM,SAAS,GAAGC,EAAI,IAAI,CAAC;AACxE;AAEA,eAAsBO,EAA6B,GAAS;CAE1D,IAAI,CAACV,EAAM,IAAIW,GAAST,EAAG,IAAI,UAAU,GAAG,KAAA,GAAWS,EAAQ,IAAI,CAAC,GAClE,IAAI;EAEF,IAAMC,KAAkB,MADDZ,EAAM,QAAQ,aAAa,OAAOW,EAAQ,KAAKX,EAAM,QAAQ,iBAAiBW,EAAQ,KAAK,EAAE,SAAS,EAAE,QAAQ,cAAc,EAAE,CAAC,CAAC,EAAA,CACxH;EACjC,AAAIA,EAAQ,OAAOC,KACjBC,EAAMD,GAAiBZ,GAAOW,EAAQ,KAAK,aAAa;CAE5D,SAASV,GAAK;EACZ,QAAQ,KAAK,+CAA+CU,EAAQ,KAAKV,CAAG;CAC9E;AAEJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { authn as e } from "solid-logic";
|
|
2
|
-
|
|
2
|
+
// src/utils/viewerUtils.ts
|
|
3
3
|
async function t() {
|
|
4
4
|
return e.currentUser() ?? await e.checkUser();
|
|
5
5
|
}
|
|
@@ -7,7 +7,6 @@ function n(t, n = e.currentUser()) {
|
|
|
7
7
|
let { value: r, uri: i } = typeof n == "object" && n ? n : {}, a = typeof n == "string" ? n : r || i || null;
|
|
8
8
|
return a ? a === t.value ? "owner" : "authenticated" : "anonymous";
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as getCurrentViewer, n as getViewerRelation };
|
|
12
11
|
|
|
13
12
|
//# sourceMappingURL=viewerUtils.esm.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ns as e } from "solid-ui";
|
|
2
2
|
import { authn as t, store as n } from "solid-logic";
|
|
3
3
|
import { sym as r } from "rdflib";
|
|
4
|
-
|
|
4
|
+
// src/utils/webIdUtils.ts
|
|
5
5
|
var i = "profile/card#me";
|
|
6
6
|
function a(e) {
|
|
7
7
|
let n = t.currentUser();
|
|
@@ -46,7 +46,6 @@ function s(e) {
|
|
|
46
46
|
function c(t, n) {
|
|
47
47
|
return t.anyValue(n, e.vcard("fn"), null, n.doc()) || t.anyValue(n, e.foaf("name"), null, n.doc()) || new URL(n.uri).host.split(".")[0];
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { c as getName, a as isOwnWebIdProfile, s as isWebIdUri, o as loadProfileFromURI };
|
|
51
50
|
|
|
52
51
|
//# sourceMappingURL=webIdUtils.esm.js.map
|
package/dist/versionInfo.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={buildTime:`2026-10-
|
|
1
|
+
var e={buildTime:`2026-10-23T08:31:30Z`,commit:`7bc3b0db4dfdd5ed724a27e1bd8a37e838053af8`,npmInfo:{"solid-panes":`5.1.0-2`,npm:`10.9.9`,node:`22.23.3`,acorn:`8.16.0`,ada:`2.9.2`,amaro:`1.1.8`,ares:`1.34.8`,brotli:`1.1.0`,cjs_module_lexer:`2.2.0`,cldr:`48.0`,icu:`78.3`,llhttp:`9.4.3`,modules:`127`,napi:`10`,nbytes:`0.1.3`,ncrypto:`0.0.1`,nghttp2:`1.69.0`,openssl:`3.5.8`,simdjson:`4.5.0`,simdutf:`6.4.2`,sqlite:`3.51.3`,tz:`2026c`,undici:`6.28.1`,unicode:`17.0`,uv:`1.51.0`,uvwasi:`0.0.23`,v8:`12.4.254.21-node.57`,zlib:`1.3.1-e00f703`,zstd:`1.5.7`}};exports.default=e;
|
|
2
2
|
//# sourceMappingURL=versionInfo.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.cjs.js","names":["versionInfo_default"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-10-
|
|
1
|
+
{"version":3,"file":"versionInfo.cjs.js","names":["versionInfo_default"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-10-23T08:31:30Z',\n commit: '7bc3b0db4dfdd5ed724a27e1bd8a37e838053af8',\n npmInfo: {\n 'solid-panes': '5.1.0-2',\n npm: '10.9.9',\n node: '22.23.3',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.8',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.3',\n llhttp: '9.4.3',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.8',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026c',\n undici: '6.28.1',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.57',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":"AAAA,IAAAA,EAAe,CACb,UAAW,uBACX,OAAQ,2CACR,QAAS,CACP,cAAe,UACf,IAAK,SACL,KAAM,UACN,MAAO,SACP,IAAK,QACL,MAAO,QACP,KAAM,SACN,OAAQ,QACR,iBAAkB,QAClB,KAAM,OACN,IAAK,OACL,OAAQ,QACR,QAAS,MACT,KAAM,KACN,OAAQ,QACR,QAAS,QACT,QAAS,SACT,QAAS,QACT,SAAU,QACV,QAAS,QACT,OAAQ,SACR,GAAI,QACJ,OAAQ,SACR,QAAS,OACT,GAAI,SACJ,OAAQ,SACR,GAAI,sBACJ,KAAM,gBACN,KAAM,OACR,CACF,E"}
|
package/dist/versionInfo.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// src/versionInfo.ts
|
|
2
2
|
var e = {
|
|
3
|
-
buildTime: "2026-10-
|
|
4
|
-
commit: "
|
|
3
|
+
buildTime: "2026-10-23T08:31:30Z",
|
|
4
|
+
commit: "7bc3b0db4dfdd5ed724a27e1bd8a37e838053af8",
|
|
5
5
|
npmInfo: {
|
|
6
|
-
"solid-panes": "5.1.0-
|
|
6
|
+
"solid-panes": "5.1.0-2",
|
|
7
7
|
npm: "10.9.9",
|
|
8
8
|
node: "22.23.3",
|
|
9
9
|
acorn: "8.16.0",
|
|
@@ -34,7 +34,6 @@ var e = {
|
|
|
34
34
|
zstd: "1.5.7"
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { e as default };
|
|
39
38
|
|
|
40
39
|
//# sourceMappingURL=versionInfo.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.esm.js","names":["versionInfo_default"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-10-
|
|
1
|
+
{"version":3,"file":"versionInfo.esm.js","names":["versionInfo_default"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-10-23T08:31:30Z',\n commit: '7bc3b0db4dfdd5ed724a27e1bd8a37e838053af8',\n npmInfo: {\n 'solid-panes': '5.1.0-2',\n npm: '10.9.9',\n node: '22.23.3',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.8',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.3',\n llhttp: '9.4.3',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.8',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026c',\n undici: '6.28.1',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.57',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":";AAAA,IAAAA,IAAe;CACb,WAAW;CACX,QAAQ;CACR,SAAS;EACP,eAAe;EACf,KAAK;EACL,MAAM;EACN,OAAO;EACP,KAAK;EACL,OAAO;EACP,MAAM;EACN,QAAQ;EACR,kBAAkB;EAClB,MAAM;EACN,KAAK;EACL,QAAQ;EACR,SAAS;EACT,MAAM;EACN,QAAQ;EACR,SAAS;EACT,SAAS;EACT,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,IAAI;EACJ,QAAQ;EACR,SAAS;EACT,IAAI;EACJ,QAAQ;EACR,IAAI;EACJ,MAAM;EACN,MAAM;CACR;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as e from "solid-ui";
|
|
2
2
|
import * as t from "rdflib";
|
|
3
|
-
|
|
3
|
+
// src/video/videoPane.js
|
|
4
4
|
var n = {
|
|
5
5
|
icon: e.icons.iconBase + "noun_1619.svg",
|
|
6
6
|
name: "video",
|
|
@@ -19,7 +19,6 @@ var n = {
|
|
|
19
19
|
}), a.setAttribute("width", "100%"), i;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { n as default };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=videoPane.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "5.1.0-
|
|
3
|
+
"version": "5.1.0-2",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,25 +56,26 @@
|
|
|
56
56
|
},
|
|
57
57
|
"homepage": "https://github.com/SolidOS/solid-panes",
|
|
58
58
|
"dependencies": {
|
|
59
|
+
"@lit/context": "^1.1.6",
|
|
59
60
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
60
61
|
"activitystreams-pane": "2.0.0",
|
|
61
62
|
"chat-pane": "4.0.0",
|
|
62
63
|
"contacts-pane": "4.0.0",
|
|
63
64
|
"dompurify": "^3.4.4",
|
|
64
|
-
"folder-pane": "4.0.0",
|
|
65
|
+
"folder-pane": "4.0.1-0",
|
|
65
66
|
"issue-pane": "4.0.0",
|
|
66
67
|
"lit-html": "^3.3.2",
|
|
67
68
|
"marked": "^18.0.3",
|
|
68
69
|
"meeting-pane": "4.0.0",
|
|
69
70
|
"mime-types": "^3.0.2",
|
|
70
71
|
"package-lock.json": "^1.0.0",
|
|
71
|
-
"pane-registry": "5.0.2-
|
|
72
|
+
"pane-registry": "5.0.2-1",
|
|
72
73
|
"profile-pane": "4.1.0-0",
|
|
73
74
|
"rdflib": "2.4.1",
|
|
74
|
-
"solid-logic": "6.0.1-
|
|
75
|
+
"solid-logic": "6.0.1-4",
|
|
75
76
|
"solid-namespace": "^0.5.4",
|
|
76
|
-
"solid-ui": "5.0.2-
|
|
77
|
-
"source-pane": "4.0.0"
|
|
77
|
+
"solid-ui": "5.0.2-3",
|
|
78
|
+
"source-pane": "4.0.1-0"
|
|
78
79
|
},
|
|
79
80
|
"overrides": {
|
|
80
81
|
"rdflib": "$rdflib"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 19l-7-7l7-7m7 7H5"/></svg>`}};customElements.get(`icon-lucide-arrow-left`)||customElements.define(`icon-lucide-arrow-left`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=arrow-left.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-left.cjs.js","names":["iconlucidearrowleft"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/arrow-left
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"/></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-arrow-left") || customElements.define("icon-lucide-arrow-left", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=arrow-left.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-left.esm.js","names":["iconlucidearrowleft"],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></g></svg>`}};customElements.get(`icon-lucide-ellipsis-vertical`)||customElements.define(`icon-lucide-ellipsis-vertical`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=ellipsis-vertical.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis-vertical.cjs.js","names":["iconlucideellipsisvertical"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/ellipsis-vertical
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"1\"/><circle cx=\"12\" cy=\"5\" r=\"1\"/><circle cx=\"12\" cy=\"19\" r=\"1\"/></g></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-ellipsis-vertical") || customElements.define("icon-lucide-ellipsis-vertical", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=ellipsis-vertical.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis-vertical.esm.js","names":["iconlucideellipsisvertical"],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg>`}};customElements.get(`icon-lucide-folder`)||customElements.define(`icon-lucide-folder`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=folder.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"folder.cjs.js","names":["iconlucidefolder"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/folder
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"/></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-folder") || customElements.define("icon-lucide-folder", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=folder.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"folder.esm.js","names":["iconlucidefolder"],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20"/></g></svg>`}};customElements.get(`icon-lucide-globe`)||customElements.define(`icon-lucide-globe`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=globe.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"globe.cjs.js","names":["iconlucideglobe"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/globe
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20\"/></g></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-globe") || customElements.define("icon-lucide-globe", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=globe.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"globe.esm.js","names":["iconlucideglobe"],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="16" r="1"/><rect width="18" height="12" x="3" y="10" rx="2"/><path d="M7 10V7a5 5 0 0 1 10 0v3"/></g></svg>`}};customElements.get(`icon-lucide-lock-keyhole`)||customElements.define(`icon-lucide-lock-keyhole`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=lock-keyhole.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lock-keyhole.cjs.js","names":["iconlucidelockkeyhole"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/lock-keyhole
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"16\" r=\"1\"/><rect width=\"18\" height=\"12\" x=\"3\" y=\"10\" rx=\"2\"/><path d=\"M7 10V7a5 5 0 0 1 10 0v3\"/></g></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-lock-keyhole") || customElements.define("icon-lucide-lock-keyhole", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=lock-keyhole.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lock-keyhole.esm.js","names":["iconlucidelockkeyhole"],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="m8.59 13.51l6.83 3.98m-.01-10.98l-6.82 3.98"/></g></svg>`}};customElements.get(`icon-lucide-share-2`)||customElements.define(`icon-lucide-share-2`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=share-2.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-2.cjs.js","names":["iconlucideshare2"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/share-2
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"18\" cy=\"5\" r=\"3\"/><circle cx=\"6\" cy=\"12\" r=\"3\"/><circle cx=\"18\" cy=\"19\" r=\"3\"/><path d=\"m8.59 13.51l6.83 3.98m-.01-10.98l-6.82 3.98\"/></g></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-share-2") || customElements.define("icon-lucide-share-2", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=share-2.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-2.esm.js","names":["iconlucideshare2"],"sources":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m14.305 19.53l.923-.382m0-2.296l-.923-.383m2.547-1.241l-.383-.923m.383 6.467l-.383.924m2.679-6.468l.383-.923m-.001 7.391l-.382-.924M2 21a8 8 0 0 1 10.434-7.62m8.338 3.472l.924-.383m-.924 2.679l.924.383"/><circle cx="10" cy="8" r="5"/><circle cx="18" cy="18" r="3"/></g></svg>`}};customElements.get(`icon-lucide-user-round-cog`)||customElements.define(`icon-lucide-user-round-cog`,e),exports.default=e;
|
|
2
|
-
//# sourceMappingURL=user-round-cog.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-round-cog.cjs.js","names":["iconlucideuserroundcog"],"sources":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ~icons/lucide/user-round-cog
|
|
2
|
-
var e = class extends HTMLElement {
|
|
3
|
-
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m14.305 19.53l.923-.382m0-2.296l-.923-.383m2.547-1.241l-.383-.923m.383 6.467l-.383.924m2.679-6.468l.383-.923m-.001 7.391l-.382-.924M2 21a8 8 0 0 1 10.434-7.62m8.338 3.472l.924-.383m-.924 2.679l.924.383\"/><circle cx=\"10\" cy=\"8\" r=\"5\"/><circle cx=\"18\" cy=\"18\" r=\"3\"/></g></svg>";
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
customElements.get("icon-lucide-user-round-cog") || customElements.define("icon-lucide-user-round-cog", e);
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as default };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=user-round-cog.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-round-cog.esm.js","names":["iconlucideuserroundcog"],"sources":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const e=require("../../utils/podUtils.cjs.js");require("../../_virtual/~icons/lucide/share-2.cjs.js"),require("../../_virtual/~icons/lucide/pencil.cjs.js"),require("../../_virtual/~icons/lucide/ellipsis-vertical.cjs.js");const t=require("./FileExplorerHeader.styles.cjs.js");require("./FileExplorerHeaderSummary.cjs.js"),require("./FileExplorerHeaderControls.cjs.js");let n=require("solid-ui"),r=require("rdflib"),i=require("lit/decorators.js"),a=require("@lit/context"),o=require("lit");var s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;function E(e,t,n){D(e,t),t.set(e,n)}function D(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function O(e,t,n){return e.set(A(e,t),n),n}function k(e,t){return e.get(A(e,t))}function A(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 j(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(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:F(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||F(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 I(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:N(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 N(e){var t=P(e,`string`);return typeof t==`symbol`?t:t+``}function P(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 F(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 I(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 L(e){return e}h=[(0,i.customElement)(`file-explorer-header`)];var R;new(w=(l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,T=(g=(0,a.consume)({context:n.fileExplorerContext,subscribe:!0}),v=(0,i.property)({attribute:!1}),b=(0,i.property)({attribute:!1}),S=(0,i.state)(),`_loadedMetadataForUri`),c=class extends n.WebComponent{constructor(...e){super(...e),j(this,T,void p(this)),E(this,l,_(this,void 0)),E(this,u,y(this,[])),E(this,d,x(this,void 0)),E(this,f,C(this,{modified:void 0,isPublic:!1,canEdit:!1,aclUri:void 0}))}get fileExplorerContext(){return k(l,this)}set fileExplorerContext(e){O(l,this,e)}get menuItems(){return k(u,this)}set menuItems(e){O(u,this,e)}get paneIcon(){return k(d,this)}set paneIcon(e){O(d,this,e)}get responseMetadata(){return k(f,this)}set responseMetadata(e){O(f,this,e)}getDefaultResponseMetadata(){return{modified:void 0,isPublic:!1,canEdit:!1,aclUri:void 0}}updated(){this.fileExplorerContext?.store&&this.fileExplorerContext.subjectUri&&this._loadedMetadataForUri!==this.fileExplorerContext.subjectUri&&(this._loadedMetadataForUri=this.fileExplorerContext.subjectUri,this.loadResponseMetadata())}async loadResponseMetadata(){if(this.fileExplorerContext?.store&&this.fileExplorerContext.subjectUri)try{let t=await e.fetchResourceMetadata(this.fileExplorerContext.store,(0,r.sym)(this.fileExplorerContext.subjectUri));this.responseMetadata={modified:t.modified,isPublic:t.isPublic,canEdit:t.canEdit,aclUri:t.aclUri}}catch(e){this.responseMetadata=this.getDefaultResponseMetadata(),console.warn(`Failed to load response metadata`,e)}}render(){return o.html`
|
|
2
|
-
<header>
|
|
3
|
-
<file-explorer-header-summary
|
|
4
|
-
.paneIcon=${this.paneIcon}
|
|
5
|
-
.onBackClick=${this.fileExplorerContext?.onBack}
|
|
6
|
-
.responseMetadata=${this.responseMetadata}
|
|
7
|
-
></file-explorer-header-summary>
|
|
8
|
-
<file-explorer-header-controls
|
|
9
|
-
.menuItems=${this.menuItems}
|
|
10
|
-
.canEdit=${this.responseMetadata.canEdit}
|
|
11
|
-
></file-explorer-header-controls>
|
|
12
|
-
</header>
|
|
13
|
-
`}},{e:[_,y,x,C,p],c:[R,m]}=M(c,[[g,1,`fileExplorerContext`],[v,1,`menuItems`],[b,1,`paneIcon`],[S,1,`responseMetadata`]],h,0,void 0,n.WebComponent),c),s=class extends L{constructor(){super(R),j(this,`styles`,t.default),m()}},j(s,w,void 0),s),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return R}});
|
|
14
|
-
//# sourceMappingURL=FileExplorerHeader.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerHeader.cjs.js","names":["sym","WebComponent","fileExplorerContext","customElement","property","state","consume","html","styles","fetchResourceMetadata","_classDecs","_FileExplorerHeader","_FileExplorerHeader2","_A","WeakMap","_B","_C","_D","_ref","_fileExplorerContextDecs","context","subscribe","_menuItemsDecs","attribute","_paneIconDecs","_responseMetadataDecs","_FileExplorerHeader3","FileExplorerHeader","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init_fileExplorerContext","undefined","_init_menuItems","_init_paneIcon","_init_responseMetadata","modified","isPublic","canEdit","aclUri","_classPrivateFieldGet","v","_classPrivateFieldSet","menuItems","paneIcon","responseMetadata","getDefaultResponseMetadata","updated","store","subjectUri","_loadedMetadataForUri","loadResponseMetadata","metadata","error","console","warn","render","onBack","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","consume","fileExplorerContext","property","state","WebComponent","fetchResourceMetadata","sym","styles","require_podUtils","require_FileExplorerHeader_styles","solid_ui","rdflib","lit_decorators_js","_lit_context","lit","_Class","_FileExplorerHeader3","_A","_B","_C","_D","_initProto","_initClass","_classDecs","_fileExplorerContextDecs","_init_fileExplorerContext","_menuItemsDecs","_init_menuItems","_paneIconDecs","_init_paneIcon","_responseMetadataDecs","_init_responseMetadata","_FileExplorerHeader2","_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","_FileExplorerHeader","args","metadata","error"],"sources":["../../../src/components/file-explorer-header/FileExplorerHeader.ts"],"sourcesContent":["import { sym } from 'rdflib'\nimport { WebComponent, type FileExplorerContext, fileExplorerContext } from 'solid-ui'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { html } from 'lit'\nimport '~icons/lucide/share-2'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/ellipsis-vertical'\nimport styles from './FileExplorerHeader.styles.css'\nimport './FileExplorerHeaderSummary'\nimport './FileExplorerHeaderControls'\nimport { PaneIcon } from './types'\nimport { fetchResourceMetadata } from '../../utils/podUtils'\nimport { type FileExplorerResourceMetadata } from './types'\n@customElement('file-explorer-header')\nexport default class FileExplorerHeader extends WebComponent {\n static styles = styles\n\n private _loadedMetadataForUri: string | undefined\n\n @consume({ context: fileExplorerContext, subscribe: true })\n accessor fileExplorerContext: FileExplorerContext = undefined as unknown as FileExplorerContext\n\n @property({ attribute: false })\n accessor menuItems: Array<{ label: string, action: (event: Event) => void }> = []\n\n @property({ attribute: false })\n accessor paneIcon: PaneIcon = undefined as unknown as PaneIcon\n\n @state()\n accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'aclUri'> = {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n aclUri: undefined\n }\n\n private getDefaultResponseMetadata (): Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'aclUri'> {\n return {\n modified: undefined,\n isPublic: false,\n canEdit: false,\n aclUri: undefined\n }\n }\n\n protected updated () {\n if (this.fileExplorerContext?.store && this.fileExplorerContext.subjectUri && this._loadedMetadataForUri !== this.fileExplorerContext.subjectUri) {\n this._loadedMetadataForUri = this.fileExplorerContext.subjectUri\n this.loadResponseMetadata()\n }\n }\n\n private async loadResponseMetadata () {\n if (!this.fileExplorerContext?.store || !this.fileExplorerContext.subjectUri) return\n\n try {\n const metadata = await fetchResourceMetadata(this.fileExplorerContext.store, sym(this.fileExplorerContext.subjectUri))\n this.responseMetadata = {\n modified: metadata.modified,\n isPublic: metadata.isPublic,\n canEdit: metadata.canEdit,\n aclUri: metadata.aclUri\n }\n } catch (error) {\n this.responseMetadata = this.getDefaultResponseMetadata()\n console.warn('Failed to load response metadata', error)\n }\n }\n\n render () {\n return html`\n <header>\n <file-explorer-header-summary\n .paneIcon=${this.paneIcon}\n .onBackClick=${this.fileExplorerContext?.onBack}\n .responseMetadata=${this.responseMetadata}\n ></file-explorer-header-summary>\n <file-explorer-header-controls\n .menuItems=${this.menuItems}\n .canEdit=${this.responseMetadata.canEdit}\n ></file-explorer-header-controls>\n </header>\n `\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { WebComponent, FileExplorerContext } from 'solid-ui';
|
|
2
|
-
import { PaneIcon, FileExplorerResourceMetadata } from './types';
|
|
3
|
-
export default class FileExplorerHeader extends WebComponent {
|
|
4
|
-
static styles: any;
|
|
5
|
-
private _loadedMetadataForUri;
|
|
6
|
-
accessor fileExplorerContext: FileExplorerContext;
|
|
7
|
-
accessor menuItems: Array<{
|
|
8
|
-
label: string;
|
|
9
|
-
action: (event: Event) => void;
|
|
10
|
-
}>;
|
|
11
|
-
accessor paneIcon: PaneIcon;
|
|
12
|
-
accessor responseMetadata: Pick<FileExplorerResourceMetadata, 'modified' | 'isPublic' | 'canEdit' | 'aclUri'>;
|
|
13
|
-
private getDefaultResponseMetadata;
|
|
14
|
-
protected updated(): void;
|
|
15
|
-
private loadResponseMetadata;
|
|
16
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=FileExplorerHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileExplorerHeader.d.ts","sourceRoot":"","sources":["../../../src/components/file-explorer-header/FileExplorerHeader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAuB,MAAM,UAAU,CAAA;AAItF,OAAO,uBAAuB,CAAA;AAC9B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,iCAAiC,CAAA;AAExC,OAAO,6BAA6B,CAAA;AACpC,OAAO,8BAA8B,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAE3D,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,YAAY;IAC1D,MAAM,CAAC,MAAM,MAAS;IAEtB,OAAO,CAAC,qBAAqB,CAAoB;IAGjD,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAA8C;IAG/F,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,CAAC,CAAK;IAGjF,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAmC;IAG9D,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC,CAK5G;IAED,OAAO,CAAC,0BAA0B;IASlC,SAAS,CAAC,OAAO;YAOH,oBAAoB;IAiBlC,MAAM;CAeP"}
|