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,14 +1,14 @@
|
|
|
1
1
|
import "../../_virtual/~icons/lucide/help-circle.esm.js";
|
|
2
2
|
import e from "./Navbar.styles.esm.js";
|
|
3
3
|
import { WebComponent as t, customElement as n } from "solid-ui";
|
|
4
|
-
import { property as r } from "lit/decorators.js";
|
|
5
|
-
import { html as i } from "lit";
|
|
6
4
|
import "solid-ui/components/button";
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
5
|
+
import { html as r } from "lit";
|
|
6
|
+
import { property as i } from "lit/decorators.js";
|
|
9
7
|
import "solid-ui/components/account";
|
|
8
|
+
import "solid-ui/components/menu-item";
|
|
9
|
+
import "solid-ui/components/menu";
|
|
10
10
|
import "solid-ui/components/solid-emblem";
|
|
11
|
-
|
|
11
|
+
// src/components/navbar/Navbar.ts
|
|
12
12
|
var a, o, s, c, l, u, d, f, p, m;
|
|
13
13
|
function h(e, t, n) {
|
|
14
14
|
g(e, t), t.set(e, n);
|
|
@@ -183,7 +183,7 @@ function E(e) {
|
|
|
183
183
|
}
|
|
184
184
|
u = [n("solid-panes-navbar")];
|
|
185
185
|
var D;
|
|
186
|
-
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d =
|
|
186
|
+
new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = i({ type: Array }), "navbarItems"), o = class extends t {
|
|
187
187
|
constructor(...e) {
|
|
188
188
|
super(...e), h(this, s, (c(this), f(this, [])));
|
|
189
189
|
}
|
|
@@ -202,9 +202,9 @@ new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = r({ type: Array }), "navbarI
|
|
|
202
202
|
}));
|
|
203
203
|
}
|
|
204
204
|
render() {
|
|
205
|
-
return
|
|
205
|
+
return r`
|
|
206
206
|
<nav class="navbar">
|
|
207
|
-
${this.navbarItems.map((e) =>
|
|
207
|
+
${this.navbarItems.map((e) => r`
|
|
208
208
|
<button
|
|
209
209
|
type="button"
|
|
210
210
|
class=${e.selected ? "selected" : ""}
|
|
@@ -226,7 +226,6 @@ new (p = (s = /*#__PURE__*/ new WeakMap(), m = (d = r({ type: Array }), "navbarI
|
|
|
226
226
|
super(D), b(this, "styles", e), l();
|
|
227
227
|
}
|
|
228
228
|
}, b(a, p, void 0), a)();
|
|
229
|
-
//#endregion
|
|
230
229
|
export { D as default };
|
|
231
230
|
|
|
232
231
|
//# sourceMappingURL=Navbar.esm.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { css as e } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/navbar/Navbar.styles.css
|
|
3
3
|
var t = e`:host{z-index:1;flex-shrink:0;margin-bottom:20px;display:block;position:relative}:host(.navbar--hidden){display:none!important}.navbar{border:1px solid var(--color-border,#444);background:var(--solid-ui-color-white,#fff);border-radius:5px;transition:box-shadow .2s;display:flex;overflow:hidden}.navbar:hover{box-shadow:0 8px 10px #7c4dff1a}button{color:inherit;cursor:pointer;background:0 0;border-bottom:2px solid #0000;padding:10px 25px;font-size:90%;font-weight:500}button.selected,button:active,button:hover,button:focus{border-bottom-color:var(--solid-ui-color-primary,#7c4dff);color:var(--solid-ui-color-primary,#7c4dff);text-transform:capitalize;background:color-mix(in srgb, currentColor 25%, transparent);border-radius:0}`;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=Navbar.styles.esm.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require("./editor/utils/errorDisplay.cjs.js");require("../../_virtual/~icons/lucide/circle-user-round.cjs.js");const t=require("./editor/sections/heading/HeadingEditDialog.cjs.js"),n=require("./friendActions.cjs.js");require("../../_virtual/~icons/lucide/cake.cjs.js"),require("../../_virtual/~icons/lucide/mail.cjs.js"),require("../../_virtual/~icons/lucide/map-pin.cjs.js"),require("../../_virtual/~icons/lucide/pencil.cjs.js"),require("../../_virtual/~icons/lucide/phone.cjs.js"),require("../../_virtual/~icons/lucide/user-round-plus.cjs.js");const r=require("./ProfileHeading.styles.cjs.js");let i=require("solid-ui"),a=require("solid-logic");require("solid-ui/components/button");let o=require("lit"),s=require("lit/decorators.js");var c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R;function z(e,t,n){B(e,t),t.set(e,n)}function B(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function V(e,t,n){return e.set(U(e,t),n),n}function H(e,t){return e.get(U(e,t))}function U(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 W(e,t,n){return(t=K(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(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:J(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||J(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 Y(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:K(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 K(e){var t=q(e,`string`);return typeof t==`symbol`?t:t+``}function q(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 J(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 Y(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 X(e){return e}b=[(0,i.customElement)(`solid-panes-profile-heading`)];var Z;new(L=(u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,R=(x=(0,s.property)({attribute:!1}),C=(0,s.property)({attribute:!1}),T=(0,s.property)({attribute:!1}),D=(0,s.property)({type:Boolean,reflect:!0}),k=(0,s.state)(),j=(0,s.state)(),N=(0,s.state)(),F=(0,s.state)(),`profileData`),l=class extends i.WebComponent{constructor(...e){super(...e),z(this,u,(v(this),S(this,void 0))),z(this,d,w(this,void 0)),z(this,f,E(this,void 0)),z(this,p,O(this,!1)),z(this,m,A(this,void 0)),z(this,h,M(this,`loading`)),z(this,g,P(this,``)),z(this,_,I(this,!1)),W(this,`friendRequest`,0),W(this,`friendRequestInterrupted`,!1),W(this,`friendMessageTimer`,void 0),W(this,`handleAddFriend`,async e=>{if(e.preventDefault(),this.friendState!==`available`&&this.friendState!==`error`)return;let t=this.friendSubject;if(!t)return;let r=this.friendRequest;this.friendState=`saving`,this.clearFriendMessage();try{let e=a.authn.currentUser();if(!e)throw Error(n.friendTexts.loginRequired);if(await n.addFriend(e,t),r!==this.friendRequest||this.friendSubject!==t)return;this.friendState=`exists`,await this.showFriendMessage(n.friendTexts.success,!1)}catch(e){if(r!==this.friendRequest||this.friendSubject!==t)return;this.friendState=`error`,await this.showFriendMessage(e,!0)}}),W(this,`handleEdit`,e=>{let n=this.editContext;n&&t.createHeadingEditDialog(e,a.store,n.subject,n.profileData,n.viewerMode,async()=>{this.dispatchEvent(new CustomEvent(`profile-heading-saved`,{bubbles:!0,composed:!0,detail:{subjectUri:n.subject.value}})),await n.onSaved()}).catch(e=>{console.error(`Failed to edit profile heading.`,e)})}),W(this,`handleImageError`,e=>{this.failedImageSrc=e.currentTarget.getAttribute(`src`)??void 0})}get[R](){return H(u,this)}set profileData(e){V(u,this,e)}get editContext(){return H(d,this)}set editContext(e){V(d,this,e)}get friendSubject(){return H(f,this)}set friendSubject(e){V(f,this,e)}get compact(){return H(p,this)}set compact(e){V(p,this,e)}get failedImageSrc(){return H(m,this)}set failedImageSrc(e){V(m,this,e)}get friendState(){return H(h,this)}set friendState(e){V(h,this,e)}get friendMessage(){return H(g,this)}set friendMessage(e){V(g,this,e)}get friendError(){return H(_,this)}set friendError(e){V(_,this,e)}connectedCallback(){super.connectedCallback(),this.friendRequestInterrupted&&(this.friendRequestInterrupted=!1,this.startFriendCheck())}disconnectedCallback(){super.disconnectedCallback(),this.friendRequest++,(this.friendState===`loading`||this.friendState===`saving`)&&(this.friendRequestInterrupted=!0),this.clearFriendMessage()}clearFriendMessage(){clearTimeout(this.friendMessageTimer),this.friendMessageTimer=void 0,this.friendMessage=``}willUpdate(e){super.willUpdate(e),e.has(`profileData`)&&e.get(`profileData`)?.imageSrc!==this.profileData?.imageSrc&&(this.failedImageSrc=void 0),e.has(`friendSubject`)&&(this.friendRequestInterrupted=!1,this.startFriendCheck())}startFriendCheck(){let e=++this.friendRequest;this.friendState=`loading`,this.clearFriendMessage(),this.friendError=!1;let t=this.friendSubject,r=a.authn.currentUser();t&&r&&!r.sameTerm(t)&&n.checkFriend(r,t).then(n=>{e===this.friendRequest&&this.friendSubject===t&&(this.friendState=n?`exists`:`available`)}).catch(n=>{e===this.friendRequest&&this.friendSubject===t&&(this.friendState=`error`,this.showFriendMessage(n,!0))})}async showFriendMessage(t,n){this.clearFriendMessage(),this.friendMessage=e.formatDisplayError(t),this.friendError=n,this.friendMessageTimer=setTimeout(()=>{this.clearFriendMessage()},1e4),await this.updateComplete,this.shadowRoot?.querySelector(`.friend-message`)?.focus()}render(){let e=this.profileData;if(!e)return o.html``;let t=Q(e.primaryPhone?.valueNode).replace(/^tel:/i,``),r=Q(e.primaryEmail?.valueNode).replace(/^mailto:/i,``),i=$(e.dateOfBirth),s=!!(e.imageSrc&&this.failedImageSrc!==e.imageSrc),c=a.authn.currentUser(),l=!!(this.friendSubject&&c&&!c.sameTerm(this.friendSubject));return o.html`
|
|
2
2
|
<section class="profile-heading" aria-labelledby="profile-heading-name">
|
|
3
3
|
<div class="avatar">
|
|
4
|
-
<div class="image-frame ${
|
|
5
|
-
${o
|
|
4
|
+
<div class="image-frame ${s?``:`image-frame--fallback`}">
|
|
5
|
+
${s?o.html`<img
|
|
6
6
|
class="hero"
|
|
7
7
|
src=${e.imageSrc}
|
|
8
8
|
alt=${e.name}
|
|
@@ -10,7 +10,7 @@ require("../../_virtual/~icons/lucide/pencil.cjs.js");const e=require("./editor/
|
|
|
10
10
|
height="140"
|
|
11
11
|
loading="eager"
|
|
12
12
|
@error=${this.handleImageError}
|
|
13
|
-
/>`:
|
|
13
|
+
/>`:o.nothing}
|
|
14
14
|
<div class="hero-fallback" role="img" aria-label=${e.name}>
|
|
15
15
|
<icon-lucide-circle-user-round aria-hidden="true"></icon-lucide-circle-user-round>
|
|
16
16
|
</div>
|
|
@@ -21,15 +21,15 @@ require("../../_virtual/~icons/lucide/pencil.cjs.js");const e=require("./editor/
|
|
|
21
21
|
<header class="header-bar">
|
|
22
22
|
<div class="identity" role="group" aria-label=${this.compact?`Name`:`Name and pronouns`}>
|
|
23
23
|
<h1 id="profile-heading-name" class="name">${e.name}</h1>
|
|
24
|
-
${e.pronouns?
|
|
24
|
+
${e.pronouns?o.html`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>`:o.nothing}
|
|
25
25
|
</div>
|
|
26
|
-
${e.jobTitle?
|
|
26
|
+
${e.jobTitle?o.html`<div class="role">${e.jobTitle}</div>`:o.nothing}
|
|
27
27
|
</header>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
-
${(this.editContext||l)&&!this.compact?
|
|
30
|
+
${(this.editContext||l)&&!this.compact?o.html`
|
|
31
31
|
<div class="profile__actions profile__heading-edit-action">
|
|
32
|
-
${l?
|
|
32
|
+
${l?o.html`
|
|
33
33
|
<div class="profile-friends-button__section" role="group" aria-label="Friend relationship actions">
|
|
34
34
|
<solid-ui-button
|
|
35
35
|
variant="secondary"
|
|
@@ -37,15 +37,15 @@ require("../../_virtual/~icons/lucide/pencil.cjs.js");const e=require("./editor/
|
|
|
37
37
|
?disabled=${this.friendState===`loading`||this.friendState===`saving`||this.friendState===`exists`}
|
|
38
38
|
aria-busy=${this.friendState===`loading`||this.friendState===`saving`?`true`:`false`}
|
|
39
39
|
@click=${this.handleAddFriend}
|
|
40
|
-
>${this.friendState===`exists`?
|
|
41
|
-
${this.friendMessage?
|
|
40
|
+
>${this.friendState===`exists`?o.nothing:o.html`<icon-lucide-user-round-plus slot="icon" class="profile__btn-friends-icon" aria-hidden="true"></icon-lucide-user-round-plus>`}${this.friendState===`exists`?n.friendTexts.exists:n.friendTexts.add}</solid-ui-button>
|
|
41
|
+
${this.friendMessage?o.html`
|
|
42
42
|
<div class="friend-message" role=${this.friendError?`alert`:`status`}
|
|
43
43
|
aria-live=${this.friendError?`assertive`:`polite`} tabindex="0">
|
|
44
44
|
${this.friendMessage}
|
|
45
|
-
</div>`:
|
|
45
|
+
</div>`:o.nothing}
|
|
46
46
|
</div>
|
|
47
|
-
`:
|
|
48
|
-
${this.editContext?
|
|
47
|
+
`:o.nothing}
|
|
48
|
+
${this.editContext?o.html`
|
|
49
49
|
<solid-ui-button
|
|
50
50
|
variant="tertiary"
|
|
51
51
|
class="profile-section-collapsible__edit-button desktop-edit-button"
|
|
@@ -67,9 +67,9 @@ require("../../_virtual/~icons/lucide/pencil.cjs.js");const e=require("./editor/
|
|
|
67
67
|
${this.renderEditIcon()}
|
|
68
68
|
</span>
|
|
69
69
|
</solid-ui-button>
|
|
70
|
-
`:
|
|
70
|
+
`:o.nothing}
|
|
71
71
|
</div>
|
|
72
|
-
`:
|
|
72
|
+
`:o.nothing}
|
|
73
73
|
|
|
74
74
|
<div class="details-collapse" aria-hidden=${this.compact?`true`:`false`} ?inert=${this.compact}>
|
|
75
75
|
<div class="details">
|
|
@@ -84,12 +84,12 @@ require("../../_virtual/~icons/lucide/pencil.cjs.js");const e=require("./editor/
|
|
|
84
84
|
</div>
|
|
85
85
|
</div>
|
|
86
86
|
</section>
|
|
87
|
-
`}renderLine(e,t){return e?
|
|
87
|
+
`}renderLine(e,t){return e?o.html`
|
|
88
88
|
<div class="detail-item">
|
|
89
89
|
<span class="detail-icon" aria-hidden="true">
|
|
90
90
|
${this.renderIcon(t)}
|
|
91
91
|
</span>
|
|
92
92
|
<span class="detail-value">${e}</span>
|
|
93
93
|
</div>
|
|
94
|
-
`:
|
|
94
|
+
`:o.nothing}renderIcon(e){switch(e){case`birthday`:return o.html`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;case`location`:return o.html`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;case`phone`:return o.html`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;case`email`:return o.html`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`}}renderEditIcon(){return o.html`<icon-lucide-pencil aria-hidden="true"></icon-lucide-pencil>`}},{e:[S,w,E,O,A,M,P,I,v],c:[Z,y]}=G(l,[[x,1,`profileData`],[C,1,`editContext`],[T,1,`friendSubject`],[D,1,`compact`],[k,1,`failedImageSrc`],[j,1,`friendState`],[N,1,`friendMessage`],[F,1,`friendError`]],b,0,void 0,i.WebComponent),l),c=class extends X{constructor(){super(Z),W(this,`styles`,r.default),y()}},W(c,L,void 0),c);function Q(e){return e?.value??``}function $(e){let t=(e||``).trim(),n=t.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n){let[,e,t,r]=n;return`${r}-${t}-${e}`}let r=t.match(/^(\d{2})[/-](\d{2})[/-](\d{4})$/);if(r){let[,e,t,n]=r;return`${e}-${t}-${n}`}return t}Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return Z}});
|
|
95
95
|
//# sourceMappingURL=ProfileHeading.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileHeading.cjs.js","names":["authn","store","customElement","WebComponent","html","nothing","property","state","createHeadingEditDialog","addFriend","checkFriend","friendTexts","formatDisplayError","styles","_classDecs","_ProfileHeading","_ProfileHeading2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_profileDataDecs","attribute","_editContextDecs","_friendSubjectDecs","_compactDecs","type","Boolean","reflect","_failedImageSrcDecs","_friendStateDecs","_friendMessageDecs","_friendErrorDecs","_ProfileHeading3","ProfileHeading","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_profileData","undefined","_init_editContext","_init_friendSubject","_init_compact","_init_failedImageSrc","_init_friendState","_init_friendMessage","_init_friendError","_defineProperty","event","preventDefault","friendState","subject","friendSubject","request","friendRequest","clearFriendMessage","viewer","currentUser","Error","loginRequired","showFriendMessage","success","error","context","editContext","profileData","viewerMode","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","value","onSaved","catch","console","failedImageSrc","currentTarget","getAttribute","_classPrivateFieldGet","v","_classPrivateFieldSet","compact","friendMessage","friendError","connectedCallback","friendRequestInterrupted","startFriendCheck","disconnectedCallback","clearTimeout","friendMessageTimer","willUpdate","changed","has","get","imageSrc","sameTerm","then","exists","message","setTimeout","updateComplete","shadowRoot","querySelector","focus","render","profile","phone","textValue","primaryPhone","valueNode","replace","email","primaryEmail","dateOfBirth","displayDate","showImage","showFriend","name","handleImageError","pronouns","jobTitle","handleAddFriend","add","handleEdit","renderEditIcon","renderLine","location","icon","renderIcon","e","c","_initClass","_applyDecs","_Class","_identity","default","raw","trim","isoDate","match","year","month","day","dmyDate","customElement","property","state","WebComponent","authn","friendTexts","addFriend","store","formatDisplayError","nothing","styles","require_errorDisplay","require_HeadingEditDialog","require_friendActions","require_ProfileHeading_styles","solid_ui","solid_logic","lit_decorators_js","lit","_Class","_ProfileHeading3","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_profileDataDecs","_init_profileData","_editContextDecs","_init_editContext","_friendSubjectDecs","_init_friendSubject","_compactDecs","_init_compact","_failedImageSrcDecs","_init_failedImageSrc","_friendStateDecs","_init_friendState","_friendMessageDecs","_init_friendMessage","_friendErrorDecs","_init_friendError","_ProfileHeading2","_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","_ProfileHeading","args","event","subject","request","viewer","error","context","changed","exists","message","profile","phone","textValue","email","dateOfBirth","displayDate","showImage","showFriend","value","icon","raw","isoDate","year","month","day","dmyDate"],"sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport type { NamedNode, Node } from 'rdflib'\nimport { customElement, WebComponent } from 'solid-ui'\nimport { html, nothing, type PropertyValues, type TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { createHeadingEditDialog } from './editor/sections/heading/HeadingEditDialog'\nimport type { ProfileDetails, ProfilePresentation } from './editor/sections/heading/types'\nimport type { PointDetails } from './editor/sections/contactInfo/types'\nimport type { ViewerMode } from '../../types'\nimport { addFriend, checkFriend, friendTexts } from './friendActions'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/cake'\nimport '~icons/lucide/circle-user-round'\nimport '~icons/lucide/mail'\nimport '~icons/lucide/map-pin'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/phone'\nimport '~icons/lucide/user-round-plus'\nimport styles from './ProfileHeading.styles.css'\n\nexport type ProfileHeadingPoint = Pick<PointDetails, 'valueNode'>\n\n// The heading renders a subset of the shared presentation model used by the editor.\nexport type ProfileHeadingData =\n Pick<ProfilePresentation, 'name' | 'imageSrc' | 'location' | 'pronouns' | 'dateOfBirth' | 'jobTitle'> & {\n primaryPhone?: ProfileHeadingPoint\n primaryEmail?: ProfileHeadingPoint\n }\n\nexport interface ProfileHeadingEditContext {\n subject: NamedNode\n profileData: ProfileDetails\n viewerMode: ViewerMode\n onSaved: () => Promise<void> | void\n}\n\n@customElement('solid-panes-profile-heading')\nexport default class ProfileHeading extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor profileData: ProfileHeadingData | undefined = undefined\n\n @property({ attribute: false })\n accessor editContext: ProfileHeadingEditContext | undefined = undefined\n\n @property({ attribute: false })\n accessor friendSubject: NamedNode | undefined = undefined\n\n @property({ type: Boolean, reflect: true })\n accessor compact = false\n\n @state()\n accessor failedImageSrc: string | undefined = undefined\n\n @state()\n accessor friendState: 'loading' | 'available' | 'exists' | 'saving' | 'error' = 'loading'\n\n @state()\n accessor friendMessage = ''\n\n @state()\n accessor friendError = false\n\n private friendRequest = 0\n private friendRequestInterrupted = false\n private friendMessageTimer: ReturnType<typeof setTimeout> | undefined\n\n connectedCallback (): void {\n super.connectedCallback()\n if (this.friendRequestInterrupted) {\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n }\n\n disconnectedCallback (): void {\n super.disconnectedCallback()\n this.friendRequest++\n if (this.friendState === 'loading' || this.friendState === 'saving') {\n this.friendRequestInterrupted = true\n }\n this.clearFriendMessage()\n }\n\n private clearFriendMessage (): void {\n clearTimeout(this.friendMessageTimer)\n this.friendMessageTimer = undefined\n this.friendMessage = ''\n }\n\n protected willUpdate (changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (changed.has('profileData') && changed.get('profileData')?.imageSrc !== this.profileData?.imageSrc) {\n this.failedImageSrc = undefined\n }\n if (!changed.has('friendSubject')) return\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n\n private startFriendCheck (): void {\n const request = ++this.friendRequest\n this.friendState = 'loading'\n this.clearFriendMessage()\n this.friendError = false\n const subject = this.friendSubject\n const viewer = authn.currentUser()\n if (!subject || !viewer || viewer.sameTerm(subject)) return\n\n checkFriend(viewer, subject).then((exists) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = exists ? 'exists' : 'available'\n }).catch((error: unknown) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n this.showFriendMessage(error, true)\n })\n }\n\n private async showFriendMessage (message: unknown, error: boolean): Promise<void> {\n this.clearFriendMessage()\n this.friendMessage = formatDisplayError(message)\n this.friendError = error\n this.friendMessageTimer = setTimeout(() => {\n this.clearFriendMessage()\n }, 10000)\n await this.updateComplete\n this.shadowRoot?.querySelector<HTMLElement>('.friend-message')?.focus()\n }\n\n private handleAddFriend = async (event: Event): Promise<void> => {\n event.preventDefault()\n if (this.friendState !== 'available' && this.friendState !== 'error') return\n const subject = this.friendSubject\n if (!subject) return\n const request = this.friendRequest\n this.friendState = 'saving'\n this.clearFriendMessage()\n try {\n const viewer = authn.currentUser()\n if (!viewer) throw new Error(friendTexts.loginRequired)\n await addFriend(viewer, subject)\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'exists'\n await this.showFriendMessage(friendTexts.success, false)\n } catch (error: unknown) {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n await this.showFriendMessage(error, true)\n }\n }\n\n private handleEdit = (event: Event) => {\n const context = this.editContext\n if (!context) return\n\n createHeadingEditDialog(\n event,\n store,\n context.subject,\n context.profileData,\n context.viewerMode,\n async () => {\n this.dispatchEvent(new CustomEvent('profile-heading-saved', {\n bubbles: true,\n composed: true,\n detail: { subjectUri: context.subject.value }\n }))\n await context.onSaved()\n }\n ).catch((error: unknown) => {\n console.error('Failed to edit profile heading.', error)\n })\n }\n\n private handleImageError = (event: Event) => {\n this.failedImageSrc = (event.currentTarget as HTMLImageElement).getAttribute('src') ?? undefined\n }\n\n render (): TemplateResult<1> {\n const profile = this.profileData\n if (!profile) return html``\n\n const phone = textValue(profile.primaryPhone?.valueNode).replace(/^tel:/i, '')\n const email = textValue(profile.primaryEmail?.valueNode).replace(/^mailto:/i, '')\n const dateOfBirth = displayDate(profile.dateOfBirth)\n const showImage = Boolean(profile.imageSrc && this.failedImageSrc !== profile.imageSrc)\n const viewer = authn.currentUser()\n const showFriend = Boolean(this.friendSubject && viewer && !viewer.sameTerm(this.friendSubject))\n\n return html`\n <section class=\"profile-heading\" aria-labelledby=\"profile-heading-name\">\n <div class=\"avatar\">\n <div class=\"image-frame ${showImage ? '' : 'image-frame--fallback'}\">\n ${showImage\n ? html`<img\n class=\"hero\"\n src=${profile.imageSrc}\n alt=${profile.name}\n width=\"140\"\n height=\"140\"\n loading=\"eager\"\n @error=${this.handleImageError}\n />`\n : nothing}\n <div class=\"hero-fallback\" role=\"img\" aria-label=${profile.name}>\n <icon-lucide-circle-user-round aria-hidden=\"true\"></icon-lucide-circle-user-round>\n </div>\n </div>\n </div>\n\n <div class=\"info\">\n <header class=\"header-bar\">\n <div class=\"identity\" role=\"group\" aria-label=${this.compact ? 'Name' : 'Name and pronouns'}>\n <h1 id=\"profile-heading-name\" class=\"name\">${profile.name}</h1>\n ${profile.pronouns ? html`<span class=\"pronouns\" ?hidden=${this.compact}>(${profile.pronouns})</span>` : nothing}\n </div>\n ${profile.jobTitle ? html`<div class=\"role\">${profile.jobTitle}</div>` : nothing}\n </header>\n </div>\n\n ${(this.editContext || showFriend) && !this.compact\n ? html`\n <div class=\"profile__actions profile__heading-edit-action\">\n ${showFriend\n ? html`\n <div class=\"profile-friends-button__section\" role=\"group\" aria-label=\"Friend relationship actions\">\n <solid-ui-button\n variant=\"secondary\"\n class=\"profile__btn-friends\"\n ?disabled=${this.friendState === 'loading' || this.friendState === 'saving' || this.friendState === 'exists'}\n aria-busy=${this.friendState === 'loading' || this.friendState === 'saving' ? 'true' : 'false'}\n @click=${this.handleAddFriend}\n >${this.friendState === 'exists'\n ? nothing\n : html`<icon-lucide-user-round-plus slot=\"icon\" class=\"profile__btn-friends-icon\" aria-hidden=\"true\"></icon-lucide-user-round-plus>`}${this.friendState === 'exists' ? friendTexts.exists : friendTexts.add}</solid-ui-button>\n ${this.friendMessage\n ? html`\n <div class=\"friend-message\" role=${this.friendError ? 'alert' : 'status'}\n aria-live=${this.friendError ? 'assertive' : 'polite'} tabindex=\"0\">\n ${this.friendMessage}\n </div>`\n : nothing}\n </div>\n `\n : nothing}\n ${this.editContext\n ? html`\n <solid-ui-button\n variant=\"tertiary\"\n class=\"profile-section-collapsible__edit-button desktop-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"left-icon\" class=\"profile-section-collapsible__action-label profile__add-more-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n <span class=\"profile-section-collapsible__action-label edit-label\">Edit</span>\n </solid-ui-button>\n <solid-ui-button\n variant=\"ghost\"\n class=\"profile-section-collapsible__edit-button mobile-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"icon\" class=\"profile-section-collapsible__edit-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n </solid-ui-button>\n `\n : nothing}\n </div>\n `\n : nothing}\n\n <div class=\"details-collapse\" aria-hidden=${this.compact ? 'true' : 'false'} ?inert=${this.compact}>\n <div class=\"details\">\n <div class=\"detail-row\" role=\"group\" aria-label=\"Additional profile information\">\n ${this.renderLine(dateOfBirth, 'birthday')}\n ${this.renderLine(profile.location, 'location')}\n </div>\n <div class=\"detail-row\" role=\"group\" aria-label=\"Contact information\">\n ${this.renderLine(phone, 'phone')}\n ${this.renderLine(email, 'email')}\n </div>\n </div>\n </div>\n </section>\n `\n }\n\n private renderLine (value: string | undefined, icon: 'birthday' | 'location' | 'phone' | 'email') {\n if (!value) return nothing\n\n return html`\n <div class=\"detail-item\">\n <span class=\"detail-icon\" aria-hidden=\"true\">\n ${this.renderIcon(icon)}\n </span>\n <span class=\"detail-value\">${value}</span>\n </div>\n `\n }\n\n private renderIcon (icon: 'birthday' | 'location' | 'phone' | 'email'): TemplateResult {\n switch (icon) {\n case 'birthday':\n return html`<icon-lucide-cake aria-hidden=\"true\"></icon-lucide-cake>`\n case 'location':\n return html`<icon-lucide-map-pin aria-hidden=\"true\"></icon-lucide-map-pin>`\n case 'phone':\n return html`<icon-lucide-phone aria-hidden=\"true\"></icon-lucide-phone>`\n case 'email':\n return html`<icon-lucide-mail aria-hidden=\"true\"></icon-lucide-mail>`\n }\n }\n\n private renderEditIcon (): TemplateResult {\n return html`<icon-lucide-pencil aria-hidden=\"true\"></icon-lucide-pencil>`\n }\n}\n\nfunction textValue (value: Node | undefined): string {\n return value?.value ?? ''\n}\n\nfunction displayDate (value?: string): string {\n const raw = (value || '').trim()\n const isoDate = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})/)\n if (isoDate) {\n const [, year, month, day] = isoDate\n return `${day}-${month}-${year}`\n }\n\n const dmyDate = raw.match(/^(\\d{2})[/-](\\d{2})[/-](\\d{4})$/)\n if (dmyDate) {\n const [, day, month, year] = dmyDate\n return `${day}-${month}-${year}`\n }\n\n return raw\n}\n"],"mappings":"A,g3JAuBAc,EAAA,EAAA,EAcCZ,EAAAA,cAAAA,CAAc,6BAA6B,CAAC,EAAA,IAAAa,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,EAAA,IAAAP,QAAAQ,GAAAC,GAAAA,EAI1CrB,EAAAA,SAAAA,CAAS,CAAEsB,UAAW,EAAM,CAAC,EAACC,GAAAA,EAG9BvB,EAAAA,SAAAA,CAAS,CAAEsB,UAAW,EAAM,CAAC,EAACE,GAAAA,EAG9BxB,EAAAA,SAAAA,CAAS,CAAEsB,UAAW,EAAM,CAAC,EAACG,GAAAA,EAG9BzB,EAAAA,SAAAA,CAAS,CAAE0B,KAAMC,QAASC,QAAS,EAAK,CAAC,EAACC,GAAAA,EAG1C5B,EAAAA,MAAAA,CAAM,EAAC6B,GAAAA,EAGP7B,EAAAA,MAAAA,CAAM,EAAC8B,GAAAA,EAGP9B,EAAAA,MAAAA,CAAM,EAAC+B,GAAAA,EAGP/B,EAAAA,MAAAA,CAAM,EAAC,eAAAgC,EAzBV,cAC4CpC,EAAAA,YAAa,CAAAsC,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA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5C,IAAMiE,GAAOjE,GAAS,GAAA,CAAIkE,KAAK,EACzBC,EAAUF,EAAIG,MAAM,0BAA0B,EACpD,GAAID,EAAS,CACX,GAAM,EAAGE,EAAMC,EAAOC,GAAOJ,EAC7B,MAAO,GAAGI,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,IAAMG,EAAUP,EAAIG,MAAM,iCAAiC,EAC3D,GAAII,EAAS,CACX,GAAM,EAAGD,EAAKD,EAAOD,GAAQG,EAC7B,MAAO,GAAGD,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,OAAOJ,CACT,C"}
|
|
1
|
+
{"version":3,"file":"ProfileHeading.cjs.js","names":["authn","store","customElement","WebComponent","html","nothing","property","state","createHeadingEditDialog","addFriend","checkFriend","friendTexts","formatDisplayError","styles","_classDecs","_ProfileHeading","_ProfileHeading2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_ref","_profileDataDecs","attribute","_editContextDecs","_friendSubjectDecs","_compactDecs","type","Boolean","reflect","_failedImageSrcDecs","_friendStateDecs","_friendMessageDecs","_friendErrorDecs","_ProfileHeading3","ProfileHeading","constructor","args","_classPrivateFieldInitSpec","_initProto","_init_profileData","undefined","_init_editContext","_init_friendSubject","_init_compact","_init_failedImageSrc","_init_friendState","_init_friendMessage","_init_friendError","_defineProperty","event","preventDefault","friendState","subject","friendSubject","request","friendRequest","clearFriendMessage","viewer","currentUser","Error","loginRequired","showFriendMessage","success","error","context","editContext","profileData","viewerMode","dispatchEvent","CustomEvent","bubbles","composed","detail","subjectUri","value","onSaved","catch","console","failedImageSrc","currentTarget","getAttribute","_classPrivateFieldGet","v","_classPrivateFieldSet","compact","friendMessage","friendError","connectedCallback","friendRequestInterrupted","startFriendCheck","disconnectedCallback","clearTimeout","friendMessageTimer","willUpdate","changed","has","get","imageSrc","sameTerm","then","exists","message","setTimeout","updateComplete","shadowRoot","querySelector","focus","render","profile","phone","textValue","primaryPhone","valueNode","replace","email","primaryEmail","dateOfBirth","displayDate","showImage","showFriend","name","handleImageError","pronouns","jobTitle","handleAddFriend","add","handleEdit","renderEditIcon","renderLine","location","icon","renderIcon","e","c","_initClass","_applyDecs","_Class","_identity","default","raw","trim","isoDate","match","year","month","day","dmyDate","customElement","property","state","WebComponent","authn","friendTexts","addFriend","store","formatDisplayError","nothing","styles","require_errorDisplay","require_HeadingEditDialog","require_friendActions","require_ProfileHeading_styles","solid_ui","solid_logic","lit","lit_decorators_js","_Class","_ProfileHeading3","_A","_B","_C","_D","_E","_F","_G","_H","_initProto","_initClass","_classDecs","_profileDataDecs","_init_profileData","_editContextDecs","_init_editContext","_friendSubjectDecs","_init_friendSubject","_compactDecs","_init_compact","_failedImageSrcDecs","_init_failedImageSrc","_friendStateDecs","_init_friendState","_friendMessageDecs","_init_friendMessage","_friendErrorDecs","_init_friendError","_ProfileHeading2","_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","_ProfileHeading","args","event","subject","request","viewer","error","context","changed","exists","message","profile","phone","textValue","email","dateOfBirth","displayDate","showImage","showFriend","value","icon","raw","isoDate","year","month","day","dmyDate"],"sources":["../../../src/components/profile-heading/ProfileHeading.ts"],"sourcesContent":["import { authn, store } from 'solid-logic'\nimport type { NamedNode, Node } from 'rdflib'\nimport { customElement, WebComponent } from 'solid-ui'\nimport { html, nothing, type PropertyValues, type TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { createHeadingEditDialog } from './editor/sections/heading/HeadingEditDialog'\nimport type { ProfileDetails, ProfilePresentation } from './editor/sections/heading/types'\nimport type { PointDetails } from './editor/sections/contactInfo/types'\nimport type { ViewerMode } from '../../types'\nimport { addFriend, checkFriend, friendTexts } from './friendActions'\nimport { formatDisplayError } from './editor/utils/errorDisplay'\nimport 'solid-ui/components/button'\nimport '~icons/lucide/cake'\nimport '~icons/lucide/circle-user-round'\nimport '~icons/lucide/mail'\nimport '~icons/lucide/map-pin'\nimport '~icons/lucide/pencil'\nimport '~icons/lucide/phone'\nimport '~icons/lucide/user-round-plus'\nimport styles from './ProfileHeading.styles.css'\n\nexport type ProfileHeadingPoint = Pick<PointDetails, 'valueNode'>\n\n// The heading renders a subset of the shared presentation model used by the editor.\nexport type ProfileHeadingData =\n Pick<ProfilePresentation, 'name' | 'imageSrc' | 'location' | 'pronouns' | 'dateOfBirth' | 'jobTitle'> & {\n primaryPhone?: ProfileHeadingPoint\n primaryEmail?: ProfileHeadingPoint\n }\n\nexport interface ProfileHeadingEditContext {\n subject: NamedNode\n profileData: ProfileDetails\n viewerMode: ViewerMode\n onSaved: () => Promise<void> | void\n}\n\n@customElement('solid-panes-profile-heading')\nexport default class ProfileHeading extends WebComponent {\n static styles = styles\n\n @property({ attribute: false })\n accessor profileData: ProfileHeadingData | undefined = undefined\n\n @property({ attribute: false })\n accessor editContext: ProfileHeadingEditContext | undefined = undefined\n\n @property({ attribute: false })\n accessor friendSubject: NamedNode | undefined = undefined\n\n @property({ type: Boolean, reflect: true })\n accessor compact = false\n\n @state()\n accessor failedImageSrc: string | undefined = undefined\n\n @state()\n accessor friendState: 'loading' | 'available' | 'exists' | 'saving' | 'error' = 'loading'\n\n @state()\n accessor friendMessage = ''\n\n @state()\n accessor friendError = false\n\n private friendRequest = 0\n private friendRequestInterrupted = false\n private friendMessageTimer: ReturnType<typeof setTimeout> | undefined\n\n connectedCallback (): void {\n super.connectedCallback()\n if (this.friendRequestInterrupted) {\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n }\n\n disconnectedCallback (): void {\n super.disconnectedCallback()\n this.friendRequest++\n if (this.friendState === 'loading' || this.friendState === 'saving') {\n this.friendRequestInterrupted = true\n }\n this.clearFriendMessage()\n }\n\n private clearFriendMessage (): void {\n clearTimeout(this.friendMessageTimer)\n this.friendMessageTimer = undefined\n this.friendMessage = ''\n }\n\n protected willUpdate (changed: PropertyValues<this>): void {\n super.willUpdate(changed)\n if (changed.has('profileData') && changed.get('profileData')?.imageSrc !== this.profileData?.imageSrc) {\n this.failedImageSrc = undefined\n }\n if (!changed.has('friendSubject')) return\n this.friendRequestInterrupted = false\n this.startFriendCheck()\n }\n\n private startFriendCheck (): void {\n const request = ++this.friendRequest\n this.friendState = 'loading'\n this.clearFriendMessage()\n this.friendError = false\n const subject = this.friendSubject\n const viewer = authn.currentUser()\n if (!subject || !viewer || viewer.sameTerm(subject)) return\n\n checkFriend(viewer, subject).then((exists) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = exists ? 'exists' : 'available'\n }).catch((error: unknown) => {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n this.showFriendMessage(error, true)\n })\n }\n\n private async showFriendMessage (message: unknown, error: boolean): Promise<void> {\n this.clearFriendMessage()\n this.friendMessage = formatDisplayError(message)\n this.friendError = error\n this.friendMessageTimer = setTimeout(() => {\n this.clearFriendMessage()\n }, 10000)\n await this.updateComplete\n this.shadowRoot?.querySelector<HTMLElement>('.friend-message')?.focus()\n }\n\n private handleAddFriend = async (event: Event): Promise<void> => {\n event.preventDefault()\n if (this.friendState !== 'available' && this.friendState !== 'error') return\n const subject = this.friendSubject\n if (!subject) return\n const request = this.friendRequest\n this.friendState = 'saving'\n this.clearFriendMessage()\n try {\n const viewer = authn.currentUser()\n if (!viewer) throw new Error(friendTexts.loginRequired)\n await addFriend(viewer, subject)\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'exists'\n await this.showFriendMessage(friendTexts.success, false)\n } catch (error: unknown) {\n if (request !== this.friendRequest || this.friendSubject !== subject) return\n this.friendState = 'error'\n await this.showFriendMessage(error, true)\n }\n }\n\n private handleEdit = (event: Event) => {\n const context = this.editContext\n if (!context) return\n\n createHeadingEditDialog(\n event,\n store,\n context.subject,\n context.profileData,\n context.viewerMode,\n async () => {\n this.dispatchEvent(new CustomEvent('profile-heading-saved', {\n bubbles: true,\n composed: true,\n detail: { subjectUri: context.subject.value }\n }))\n await context.onSaved()\n }\n ).catch((error: unknown) => {\n console.error('Failed to edit profile heading.', error)\n })\n }\n\n private handleImageError = (event: Event) => {\n this.failedImageSrc = (event.currentTarget as HTMLImageElement).getAttribute('src') ?? undefined\n }\n\n render (): TemplateResult<1> {\n const profile = this.profileData\n if (!profile) return html``\n\n const phone = textValue(profile.primaryPhone?.valueNode).replace(/^tel:/i, '')\n const email = textValue(profile.primaryEmail?.valueNode).replace(/^mailto:/i, '')\n const dateOfBirth = displayDate(profile.dateOfBirth)\n const showImage = Boolean(profile.imageSrc && this.failedImageSrc !== profile.imageSrc)\n const viewer = authn.currentUser()\n const showFriend = Boolean(this.friendSubject && viewer && !viewer.sameTerm(this.friendSubject))\n\n return html`\n <section class=\"profile-heading\" aria-labelledby=\"profile-heading-name\">\n <div class=\"avatar\">\n <div class=\"image-frame ${showImage ? '' : 'image-frame--fallback'}\">\n ${showImage\n ? html`<img\n class=\"hero\"\n src=${profile.imageSrc}\n alt=${profile.name}\n width=\"140\"\n height=\"140\"\n loading=\"eager\"\n @error=${this.handleImageError}\n />`\n : nothing}\n <div class=\"hero-fallback\" role=\"img\" aria-label=${profile.name}>\n <icon-lucide-circle-user-round aria-hidden=\"true\"></icon-lucide-circle-user-round>\n </div>\n </div>\n </div>\n\n <div class=\"info\">\n <header class=\"header-bar\">\n <div class=\"identity\" role=\"group\" aria-label=${this.compact ? 'Name' : 'Name and pronouns'}>\n <h1 id=\"profile-heading-name\" class=\"name\">${profile.name}</h1>\n ${profile.pronouns ? html`<span class=\"pronouns\" ?hidden=${this.compact}>(${profile.pronouns})</span>` : nothing}\n </div>\n ${profile.jobTitle ? html`<div class=\"role\">${profile.jobTitle}</div>` : nothing}\n </header>\n </div>\n\n ${(this.editContext || showFriend) && !this.compact\n ? html`\n <div class=\"profile__actions profile__heading-edit-action\">\n ${showFriend\n ? html`\n <div class=\"profile-friends-button__section\" role=\"group\" aria-label=\"Friend relationship actions\">\n <solid-ui-button\n variant=\"secondary\"\n class=\"profile__btn-friends\"\n ?disabled=${this.friendState === 'loading' || this.friendState === 'saving' || this.friendState === 'exists'}\n aria-busy=${this.friendState === 'loading' || this.friendState === 'saving' ? 'true' : 'false'}\n @click=${this.handleAddFriend}\n >${this.friendState === 'exists'\n ? nothing\n : html`<icon-lucide-user-round-plus slot=\"icon\" class=\"profile__btn-friends-icon\" aria-hidden=\"true\"></icon-lucide-user-round-plus>`}${this.friendState === 'exists' ? friendTexts.exists : friendTexts.add}</solid-ui-button>\n ${this.friendMessage\n ? html`\n <div class=\"friend-message\" role=${this.friendError ? 'alert' : 'status'}\n aria-live=${this.friendError ? 'assertive' : 'polite'} tabindex=\"0\">\n ${this.friendMessage}\n </div>`\n : nothing}\n </div>\n `\n : nothing}\n ${this.editContext\n ? html`\n <solid-ui-button\n variant=\"tertiary\"\n class=\"profile-section-collapsible__edit-button desktop-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"left-icon\" class=\"profile-section-collapsible__action-label profile__add-more-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n <span class=\"profile-section-collapsible__action-label edit-label\">Edit</span>\n </solid-ui-button>\n <solid-ui-button\n variant=\"ghost\"\n class=\"profile-section-collapsible__edit-button mobile-edit-button\"\n aria-label=\"Add or edit heading information\"\n @click=${this.handleEdit}\n >\n <span slot=\"icon\" class=\"profile-section-collapsible__edit-icon\" aria-hidden=\"true\">\n ${this.renderEditIcon()}\n </span>\n </solid-ui-button>\n `\n : nothing}\n </div>\n `\n : nothing}\n\n <div class=\"details-collapse\" aria-hidden=${this.compact ? 'true' : 'false'} ?inert=${this.compact}>\n <div class=\"details\">\n <div class=\"detail-row\" role=\"group\" aria-label=\"Additional profile information\">\n ${this.renderLine(dateOfBirth, 'birthday')}\n ${this.renderLine(profile.location, 'location')}\n </div>\n <div class=\"detail-row\" role=\"group\" aria-label=\"Contact information\">\n ${this.renderLine(phone, 'phone')}\n ${this.renderLine(email, 'email')}\n </div>\n </div>\n </div>\n </section>\n `\n }\n\n private renderLine (value: string | undefined, icon: 'birthday' | 'location' | 'phone' | 'email') {\n if (!value) return nothing\n\n return html`\n <div class=\"detail-item\">\n <span class=\"detail-icon\" aria-hidden=\"true\">\n ${this.renderIcon(icon)}\n </span>\n <span class=\"detail-value\">${value}</span>\n </div>\n `\n }\n\n private renderIcon (icon: 'birthday' | 'location' | 'phone' | 'email'): TemplateResult {\n switch (icon) {\n case 'birthday':\n return html`<icon-lucide-cake aria-hidden=\"true\"></icon-lucide-cake>`\n case 'location':\n return html`<icon-lucide-map-pin aria-hidden=\"true\"></icon-lucide-map-pin>`\n case 'phone':\n return html`<icon-lucide-phone aria-hidden=\"true\"></icon-lucide-phone>`\n case 'email':\n return html`<icon-lucide-mail aria-hidden=\"true\"></icon-lucide-mail>`\n }\n }\n\n private renderEditIcon (): TemplateResult {\n return html`<icon-lucide-pencil aria-hidden=\"true\"></icon-lucide-pencil>`\n }\n}\n\nfunction textValue (value: Node | undefined): string {\n return value?.value ?? ''\n}\n\nfunction displayDate (value?: string): string {\n const raw = (value || '').trim()\n const isoDate = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})/)\n if (isoDate) {\n const [, year, month, day] = isoDate\n return `${day}-${month}-${year}`\n }\n\n const dmyDate = raw.match(/^(\\d{2})[/-](\\d{2})[/-](\\d{4})$/)\n if (dmyDate) {\n const [, day, month, year] = dmyDate\n return `${day}-${month}-${year}`\n }\n\n return raw\n}\n"],"mappings":"A,o3JAuBAc,EAAA,EAAA,EAcCZ,EAAAA,cAAAA,CAAc,6BAA6B,CAAC,EAAA,IAAAa,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAA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5H,EAAA6H,IAAAC,EAAAtG,EAAA,CAAA,CAAAZ,EAAA,EAAA,aAAA,EAAA,CAAAE,EAAA,EAAA,aAAA,EAAA,CAAAC,EAAA,EAAA,eAAA,EAAA,CAAAC,EAAA,EAAA,SAAA,EAAA,CAAAI,EAAA,EAAA,gBAAA,EAAA,CAAAC,EAAA,EAAA,aAAA,EAAA,CAAAC,EAAA,EAAA,eAAA,EAAA,CAAAC,EAAA,EAAA,aAAA,CAAA,EAAAxB,EAAA,EAAA,IAAA,GA5R2CX,EAAAA,YAAY,EAAAoC,GAAAuG,EAAA,cAAAC,CAAA,CAAAtG,aAAA,CAAA,MAAA1B,CAAA,EAAAuC,EAAA,KAAA,SACtCzC,EAAAA,OAAM,EAAA+H,EAAA,CAAA,CAAA,EAAAtF,EAAAwF,EAAA9H,EAAA,IAAA,EAAA,EAAA8H,GA6RxB,SAAS1B,EAAWpC,EAAiC,CACnD,OAAOA,GAAOA,OAAS,EACzB,CAEA,SAAS2C,EAAa3C,EAAwB,CAC5C,IAAMiE,GAAOjE,GAAS,GAAA,CAAIkE,KAAK,EACzBC,EAAUF,EAAIG,MAAM,0BAA0B,EACpD,GAAID,EAAS,CACX,GAAM,EAAGE,EAAMC,EAAOC,GAAOJ,EAC7B,MAAO,GAAGI,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,IAAMG,EAAUP,EAAIG,MAAM,iCAAiC,EAC3D,GAAII,EAAS,CACX,GAAM,EAAGD,EAAKD,EAAOD,GAAQG,EAC7B,MAAO,GAAGD,EAAG,GAAID,EAAK,GAAID,GAC5B,CAEA,OAAOJ,CACT,C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "../../_virtual/~icons/lucide/pencil.esm.js";
|
|
2
1
|
import { formatDisplayError as e } from "./editor/utils/errorDisplay.esm.js";
|
|
3
2
|
import "../../_virtual/~icons/lucide/circle-user-round.esm.js";
|
|
4
3
|
import { createHeadingEditDialog as t } from "./editor/sections/heading/HeadingEditDialog.esm.js";
|
|
@@ -6,15 +5,16 @@ import { addFriend as n, checkFriend as r, friendTexts as i } from "./friendActi
|
|
|
6
5
|
import "../../_virtual/~icons/lucide/cake.esm.js";
|
|
7
6
|
import "../../_virtual/~icons/lucide/mail.esm.js";
|
|
8
7
|
import "../../_virtual/~icons/lucide/map-pin.esm.js";
|
|
8
|
+
import "../../_virtual/~icons/lucide/pencil.esm.js";
|
|
9
9
|
import "../../_virtual/~icons/lucide/phone.esm.js";
|
|
10
10
|
import "../../_virtual/~icons/lucide/user-round-plus.esm.js";
|
|
11
11
|
import a from "./ProfileHeading.styles.esm.js";
|
|
12
12
|
import { WebComponent as o, customElement as s } from "solid-ui";
|
|
13
13
|
import { authn as c, store as l } from "solid-logic";
|
|
14
|
-
import { property as u, state as d } from "lit/decorators.js";
|
|
15
|
-
import { html as f, nothing as p } from "lit";
|
|
16
14
|
import "solid-ui/components/button";
|
|
17
|
-
|
|
15
|
+
import { html as u, nothing as d } from "lit";
|
|
16
|
+
import { property as f, state as p } from "lit/decorators.js";
|
|
17
|
+
// src/components/profile-heading/ProfileHeading.ts
|
|
18
18
|
var m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, L, R, z, B, V, H, U, W;
|
|
19
19
|
function G(e, t, n) {
|
|
20
20
|
ee(e, t), t.set(e, n);
|
|
@@ -189,10 +189,10 @@ function ie(e) {
|
|
|
189
189
|
}
|
|
190
190
|
E = [s("solid-panes-profile-heading")];
|
|
191
191
|
var Q;
|
|
192
|
-
new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), W = (D =
|
|
192
|
+
new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v = /*#__PURE__*/ new WeakMap(), y = /*#__PURE__*/ new WeakMap(), b = /*#__PURE__*/ new WeakMap(), x = /*#__PURE__*/ new WeakMap(), S = /*#__PURE__*/ new WeakMap(), C = /*#__PURE__*/ new WeakMap(), W = (D = f({ attribute: !1 }), k = f({ attribute: !1 }), j = f({ attribute: !1 }), N = f({
|
|
193
193
|
type: Boolean,
|
|
194
194
|
reflect: !0
|
|
195
|
-
}), F =
|
|
195
|
+
}), F = p(), L = p(), z = p(), V = p(), "profileData"), h = class extends o {
|
|
196
196
|
constructor(...e) {
|
|
197
197
|
super(...e), G(this, g, (w(this), O(this, void 0))), G(this, _, A(this, void 0)), G(this, v, M(this, void 0)), G(this, y, P(this, !1)), G(this, b, I(this, void 0)), G(this, x, R(this, "loading")), G(this, S, B(this, "")), G(this, C, H(this, !1)), Y(this, "friendRequest", 0), Y(this, "friendRequestInterrupted", !1), Y(this, "friendMessageTimer", void 0), Y(this, "handleAddFriend", async (e) => {
|
|
198
198
|
if (e.preventDefault(), this.friendState !== "available" && this.friendState !== "error") return;
|
|
@@ -301,13 +301,13 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
301
301
|
}
|
|
302
302
|
render() {
|
|
303
303
|
let e = this.profileData;
|
|
304
|
-
if (!e) return
|
|
304
|
+
if (!e) return u``;
|
|
305
305
|
let t = $(e.primaryPhone?.valueNode).replace(/^tel:/i, ""), n = $(e.primaryEmail?.valueNode).replace(/^mailto:/i, ""), r = ae(e.dateOfBirth), a = !!(e.imageSrc && this.failedImageSrc !== e.imageSrc), o = c.currentUser(), s = !!(this.friendSubject && o && !o.sameTerm(this.friendSubject));
|
|
306
|
-
return
|
|
306
|
+
return u`
|
|
307
307
|
<section class="profile-heading" aria-labelledby="profile-heading-name">
|
|
308
308
|
<div class="avatar">
|
|
309
309
|
<div class="image-frame ${a ? "" : "image-frame--fallback"}">
|
|
310
|
-
${a ?
|
|
310
|
+
${a ? u`<img
|
|
311
311
|
class="hero"
|
|
312
312
|
src=${e.imageSrc}
|
|
313
313
|
alt=${e.name}
|
|
@@ -315,7 +315,7 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
315
315
|
height="140"
|
|
316
316
|
loading="eager"
|
|
317
317
|
@error=${this.handleImageError}
|
|
318
|
-
/>` :
|
|
318
|
+
/>` : d}
|
|
319
319
|
<div class="hero-fallback" role="img" aria-label=${e.name}>
|
|
320
320
|
<icon-lucide-circle-user-round aria-hidden="true"></icon-lucide-circle-user-round>
|
|
321
321
|
</div>
|
|
@@ -326,15 +326,15 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
326
326
|
<header class="header-bar">
|
|
327
327
|
<div class="identity" role="group" aria-label=${this.compact ? "Name" : "Name and pronouns"}>
|
|
328
328
|
<h1 id="profile-heading-name" class="name">${e.name}</h1>
|
|
329
|
-
${e.pronouns ?
|
|
329
|
+
${e.pronouns ? u`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>` : d}
|
|
330
330
|
</div>
|
|
331
|
-
${e.jobTitle ?
|
|
331
|
+
${e.jobTitle ? u`<div class="role">${e.jobTitle}</div>` : d}
|
|
332
332
|
</header>
|
|
333
333
|
</div>
|
|
334
334
|
|
|
335
|
-
${(this.editContext || s) && !this.compact ?
|
|
335
|
+
${(this.editContext || s) && !this.compact ? u`
|
|
336
336
|
<div class="profile__actions profile__heading-edit-action">
|
|
337
|
-
${s ?
|
|
337
|
+
${s ? u`
|
|
338
338
|
<div class="profile-friends-button__section" role="group" aria-label="Friend relationship actions">
|
|
339
339
|
<solid-ui-button
|
|
340
340
|
variant="secondary"
|
|
@@ -342,15 +342,15 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
342
342
|
?disabled=${this.friendState === "loading" || this.friendState === "saving" || this.friendState === "exists"}
|
|
343
343
|
aria-busy=${this.friendState === "loading" || this.friendState === "saving" ? "true" : "false"}
|
|
344
344
|
@click=${this.handleAddFriend}
|
|
345
|
-
>${this.friendState === "exists" ?
|
|
346
|
-
${this.friendMessage ?
|
|
345
|
+
>${this.friendState === "exists" ? d : u`<icon-lucide-user-round-plus slot="icon" class="profile__btn-friends-icon" aria-hidden="true"></icon-lucide-user-round-plus>`}${this.friendState === "exists" ? i.exists : i.add}</solid-ui-button>
|
|
346
|
+
${this.friendMessage ? u`
|
|
347
347
|
<div class="friend-message" role=${this.friendError ? "alert" : "status"}
|
|
348
348
|
aria-live=${this.friendError ? "assertive" : "polite"} tabindex="0">
|
|
349
349
|
${this.friendMessage}
|
|
350
|
-
</div>` :
|
|
350
|
+
</div>` : d}
|
|
351
351
|
</div>
|
|
352
|
-
` :
|
|
353
|
-
${this.editContext ?
|
|
352
|
+
` : d}
|
|
353
|
+
${this.editContext ? u`
|
|
354
354
|
<solid-ui-button
|
|
355
355
|
variant="tertiary"
|
|
356
356
|
class="profile-section-collapsible__edit-button desktop-edit-button"
|
|
@@ -372,9 +372,9 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
372
372
|
${this.renderEditIcon()}
|
|
373
373
|
</span>
|
|
374
374
|
</solid-ui-button>
|
|
375
|
-
` :
|
|
375
|
+
` : d}
|
|
376
376
|
</div>
|
|
377
|
-
` :
|
|
377
|
+
` : d}
|
|
378
378
|
|
|
379
379
|
<div class="details-collapse" aria-hidden=${this.compact ? "true" : "false"} ?inert=${this.compact}>
|
|
380
380
|
<div class="details">
|
|
@@ -392,25 +392,25 @@ new (U = (g = /*#__PURE__*/ new WeakMap(), _ = /*#__PURE__*/ new WeakMap(), v =
|
|
|
392
392
|
`;
|
|
393
393
|
}
|
|
394
394
|
renderLine(e, t) {
|
|
395
|
-
return e ?
|
|
395
|
+
return e ? u`
|
|
396
396
|
<div class="detail-item">
|
|
397
397
|
<span class="detail-icon" aria-hidden="true">
|
|
398
398
|
${this.renderIcon(t)}
|
|
399
399
|
</span>
|
|
400
400
|
<span class="detail-value">${e}</span>
|
|
401
401
|
</div>
|
|
402
|
-
` :
|
|
402
|
+
` : d;
|
|
403
403
|
}
|
|
404
404
|
renderIcon(e) {
|
|
405
405
|
switch (e) {
|
|
406
|
-
case "birthday": return
|
|
407
|
-
case "location": return
|
|
408
|
-
case "phone": return
|
|
409
|
-
case "email": return
|
|
406
|
+
case "birthday": return u`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;
|
|
407
|
+
case "location": return u`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;
|
|
408
|
+
case "phone": return u`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;
|
|
409
|
+
case "email": return u`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
renderEditIcon() {
|
|
413
|
-
return
|
|
413
|
+
return u`<icon-lucide-pencil aria-hidden="true"></icon-lucide-pencil>`;
|
|
414
414
|
}
|
|
415
415
|
}, {e: [O, A, M, P, I, R, B, H, w], c: [Q, T]} = te(h, [
|
|
416
416
|
[
|
|
@@ -474,7 +474,6 @@ function ae(e) {
|
|
|
474
474
|
}
|
|
475
475
|
return t;
|
|
476
476
|
}
|
|
477
|
-
//#endregion
|
|
478
477
|
export { Q as default };
|
|
479
478
|
|
|
480
479
|
//# sourceMappingURL=ProfileHeading.esm.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { css as e } from "lit";
|
|
2
|
-
|
|
2
|
+
// src/components/profile-heading/ProfileHeading.styles.css
|
|
3
3
|
var t = e`:host{--profile-avatar-size:8.75rem;--profile-fallback-padding:36.4px;width:100%;color:var(--color-text-secondary,#4a5565);font-family:inherit;display:block}.profile-heading{box-sizing:border-box;background:var(--solid-ui-color-white,#fff);border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);border-radius:5px;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:\"avatar info edit\"\"avatar details details\";align-items:start;gap:20px;width:100%;padding:25px;transition:box-shadow .2s,transform .2s,padding .3s,row-gap .3s;display:grid;overflow-x:clip}.profile-heading:hover{box-shadow:0 8px 10px #7c4dff1a}.avatar{grid-area:avatar}.image-frame{width:var(--profile-avatar-size);aspect-ratio:1;place-items:center;transition:width .3s;display:grid;position:relative;overflow:hidden}.image-frame--fallback{border:1px dashed var(--solid-ui-color-slate-200,#e2e8f0);background:var(--solid-ui-color-slate-50,#f8fafc);box-sizing:border-box}.hero{border:1px solid var(--solid-ui-color-primary,#7c4dff);background:var(--color-surface-placeholder,var(--gray-300,#d1d5dc)) 50% / cover no-repeat;object-fit:cover;object-position:center;box-sizing:border-box;border-radius:10px;width:100%;height:100%;position:absolute;inset:0}.hero-fallback{width:100%;height:100%;padding:0 var(--profile-fallback-padding);box-sizing:border-box;justify-content:center;align-items:center;transition:padding .3s;display:none}.hero-fallback icon-lucide-circle-user-round{color:#cbd5e1;width:100%;height:100%;display:block}.image-frame--fallback .hero-fallback{display:flex}.info{grid-area:info;min-width:0}.profile__heading-edit-action{grid-area:edit;justify-content:flex-end;place-self:flex-start end;align-items:flex-start;gap:8px;margin-bottom:0;margin-left:auto;margin-right:0;padding:0;display:flex}.profile-friends-button__section{gap:8px;max-width:16rem;display:grid}.profile__btn-friends-icon{align-self:center;width:14px;height:14px;display:block;transform:translateY(-3px)}.friend-message{text-align:center;font-size:var(--solid-ui-font-size-sm,.875rem);overflow-wrap:anywhere}.friend-message[role=alert]{color:var(--solid-ui-color-red-700,#b91c1c)}.friend-message[role=status]{color:var(--solid-ui-color-green-700,#15803d)}.profile-section-collapsible__edit-button{min-width:0}.mobile-edit-button{color:var(--solid-ui-color-primary,#7c4dff);display:none}.profile-section-collapsible__action-label{font-size:var(--solid-ui-font-size-sm,.875rem)}.profile__add-more-icon{margin-right:0;line-height:0;position:relative;top:0;transform:translateY(0)}.profile__add-more-icon icon-lucide-pencil,.profile-section-collapsible__edit-icon icon-lucide-pencil{width:14px;height:14px;display:block}.header-bar{flex-direction:column;align-items:flex-start;gap:2px;width:100%;margin:0;padding:0;display:flex}.identity{flex-wrap:wrap;align-items:baseline;gap:7px;width:100%;display:flex}.name{color:var(--color-text-heading,#000);overflow-wrap:anywhere;margin:0;font-size:1.75rem;font-weight:600;line-height:1.2;display:block}.pronouns{color:var(--color-text-secondary,#4a5565);font-size:var(--solid-ui-font-size-sm,.875rem);font-weight:400;line-height:1.2}.role{width:100%;color:var(--solid-ui-color-gray-800,#101828);font-size:var(--solid-ui-font-size-lg,1.125rem);overflow-wrap:anywhere;font-weight:500;line-height:1.25}.details-collapse{grid-area:details;grid-template-rows:1fr;transition:grid-template-rows .3s,opacity .3s;display:grid}.details{width:100%;min-width:0;min-height:0;font-size:var(--font-size-sm,.875rem);flex-wrap:wrap;align-content:flex-start;align-items:flex-start;gap:12px 32px;display:flex;overflow:hidden}:host([compact]) .profile-heading{row-gap:0;padding:12.5px}:host([compact]) .image-frame{width:calc(var(--profile-avatar-size) / 2)}:host([compact]) .hero-fallback{padding-inline:calc(var(--profile-fallback-padding) / 2)}:host([compact]) .info{align-self:center}:host([compact]) .name{white-space:normal;overflow-wrap:anywhere}:host([compact]) .details-collapse{opacity:0;visibility:hidden;grid-template-rows:0fr}.pronouns[hidden]{display:none}.detail-row{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px clamp(12px,2vw,24px);width:min(100%,544px);display:grid}.detail-item{align-items:flex-start;gap:7px;min-width:0;display:flex}.detail-icon{flex:0 0 16px;width:16px;height:16px;margin-top:1px;display:inline-flex}.detail-icon>icon-lucide-cake,.detail-icon>icon-lucide-map-pin,.detail-icon>icon-lucide-phone,.detail-icon>icon-lucide-mail{color:currentColor;width:16px;height:16px;display:block}.detail-value{overflow-wrap:anywhere;word-break:break-word;min-width:0}@media (width<=1200px){:host{--profile-avatar-size:6.5rem;--profile-fallback-padding:27px}.profile-heading{column-gap:15px}}@media (width<=768px){.profile-heading:has(.profile-friends-button__section) .name{white-space:normal;overflow-wrap:anywhere}.profile__btn-friends-icon,.profile__btn-friends[disabled]:not([aria-busy=true]){display:none}:host{--profile-avatar-size:4.375rem;--profile-fallback-padding:0px}.profile-heading{grid-template-areas:\"avatar info edit\"\"details details details\";gap:12px 8px}.profile-section-collapsible__edit-button{width:var(--solid-ui-clickable-area,42px);height:var(--solid-ui-clickable-area,42px)}.desktop-edit-button{display:none}.mobile-edit-button{display:inline-flex;position:relative;top:-12px;right:-12px}.profile-section-collapsible__edit-icon{justify-content:center;align-items:center;line-height:0;display:inline-flex}.profile-heading{column-gap:10px}.hero-fallback icon-lucide-circle-user-round{width:3rem;height:3rem;transition:width .3s,height .3s}:host([compact]) .hero-fallback icon-lucide-circle-user-round{width:1.5rem;height:1.5rem}.name{white-space:normal;overflow-wrap:anywhere;font-size:1.375rem;line-height:1.15;display:inline}.identity{gap:0}.pronouns{white-space:nowrap;margin-left:2px;font-size:.6875rem;line-height:1.1}.role{font-size:var(--solid-ui-font-size-sm,.875rem)}.details{gap:12px;font-size:.75rem}.detail-row{column-gap:2px}}@media (prefers-reduced-motion:reduce){.profile-heading,.image-frame,.hero-fallback,.hero-fallback icon-lucide-circle-user-round,.details-collapse{transition:none}}`;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as default };
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=ProfileHeading.styles.esm.js.map
|