solid-panes 5.1.0-1 → 5.1.0-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +6 -0
  2. package/dist/RDFXMLPane2.esm.js +1 -2
  3. package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
  4. package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
  5. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
  6. package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
  7. package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
  8. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
  9. package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
  10. package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
  11. package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
  12. package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
  13. package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
  14. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
  15. package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
  16. package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
  17. package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
  18. package/dist/audio/audioPane.esm.js +1 -2
  19. package/dist/classInstancePane.esm.js +1 -2
  20. package/dist/components/editor-card/EditorCard.cjs.js +1 -1
  21. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  22. package/dist/components/editor-card/EditorCard.esm.js +6 -7
  23. package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
  24. package/dist/components/header/Header.cjs.js +1 -1
  25. package/dist/components/header/Header.cjs.js.map +1 -1
  26. package/dist/components/header/Header.esm.js +7 -8
  27. package/dist/components/header/Header.styles.esm.js +1 -2
  28. package/dist/components/navbar/Navbar.cjs.js +2 -2
  29. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  30. package/dist/components/navbar/Navbar.esm.js +8 -9
  31. package/dist/components/navbar/Navbar.styles.esm.js +1 -2
  32. package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
  33. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
  34. package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
  35. package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -1
  36. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js +1 -1
  37. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -1
  38. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +2 -3
  39. package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -1
  40. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
  41. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
  42. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
  43. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
  44. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
  45. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
  46. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
  47. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
  48. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
  49. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
  50. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
  51. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
  52. package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
  53. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
  54. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
  55. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
  56. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
  57. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
  58. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
  59. package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
  60. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
  61. package/dist/components/profile-heading/friendActions.esm.js +1 -2
  62. package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
  63. package/dist/dashboard/basicPreferences.esm.js +1 -2
  64. package/dist/dashboard/dashboardPane.esm.js +0 -1
  65. package/dist/dashboard/homepage.esm.js +1 -2
  66. package/dist/dashboard/ontologyData.esm.js +1 -2
  67. package/dist/dashboard/preferencesFormText.esm.js +1 -2
  68. package/dist/dataContentPane2.cjs.js +1 -1
  69. package/dist/dataContentPane2.esm.js +2 -3
  70. package/dist/defaultPane2.cjs.js +1 -1
  71. package/dist/defaultPane2.esm.js +2 -3
  72. package/dist/dokieli/dokieliPane.cjs.js +1 -1
  73. package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
  74. package/dist/dokieli/dokieliPane.esm.js +7 -12
  75. package/dist/dokieli/dokieliPane.esm.js.map +1 -1
  76. package/dist/dokieli/new.esm.js +1 -2
  77. package/dist/form/pane.esm.js +1 -2
  78. package/dist/home/homePane.esm.js +1 -2
  79. package/dist/humanReadablePane.d.ts +3 -0
  80. package/dist/humanReadablePane.d.ts.map +1 -1
  81. package/dist/humanReadablePane2.cjs.js +276 -1
  82. package/dist/humanReadablePane2.cjs.js.map +1 -1
  83. package/dist/humanReadablePane2.esm.js +428 -31
  84. package/dist/humanReadablePane2.esm.js.map +1 -1
  85. package/dist/icons/folder.esm.js +1 -2
  86. package/dist/icons/friends.esm.js +1 -2
  87. package/dist/icons/person.esm.js +1 -2
  88. package/dist/imagePane.d.ts.map +1 -1
  89. package/dist/imagePane2.cjs.js +1 -1
  90. package/dist/imagePane2.cjs.js.map +1 -1
  91. package/dist/imagePane2.esm.js +2 -3
  92. package/dist/imagePane2.esm.js.map +1 -1
  93. package/dist/index.cjs.js +1 -1
  94. package/dist/index.cjs.js.map +1 -1
  95. package/dist/index.d.ts +1 -0
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.esm.js +17 -17
  98. package/dist/index.esm.js.map +1 -1
  99. package/dist/internal/internalPane2.cjs.js +1 -1
  100. package/dist/internal/internalPane2.esm.js +2 -3
  101. package/dist/mainPage/header.esm.js +1 -2
  102. package/dist/mainPage/index.cjs.js +1 -1
  103. package/dist/mainPage/index.cjs.js.map +1 -1
  104. package/dist/mainPage/index.d.ts +1 -1
  105. package/dist/mainPage/index.d.ts.map +1 -1
  106. package/dist/mainPage/index.esm.js +42 -27
  107. package/dist/mainPage/index.esm.js.map +1 -1
  108. package/dist/mainPage/navbar.esm.js +1 -2
  109. package/dist/mainPage/navigation.cjs.js +1 -1
  110. package/dist/mainPage/navigation.cjs.js.map +1 -1
  111. package/dist/mainPage/navigation.d.ts.map +1 -1
  112. package/dist/mainPage/navigation.esm.js +14 -11
  113. package/dist/mainPage/navigation.esm.js.map +1 -1
  114. package/dist/mainPage/profileHeading.d.ts +2 -1
  115. package/dist/mainPage/profileHeading.d.ts.map +1 -1
  116. package/dist/mainPage/profileHeading2.cjs.js +1 -1
  117. package/dist/mainPage/profileHeading2.cjs.js.map +1 -1
  118. package/dist/mainPage/profileHeading2.esm.js +76 -77
  119. package/dist/mainPage/profileHeading2.esm.js.map +1 -1
  120. package/dist/n3Pane2.esm.js +1 -2
  121. package/dist/navigation/browserEvents.esm.js +1 -2
  122. package/dist/navigation/chrome.cjs.js +1 -1
  123. package/dist/navigation/chrome.cjs.js.map +1 -1
  124. package/dist/navigation/chrome.d.ts +20 -2
  125. package/dist/navigation/chrome.d.ts.map +1 -1
  126. package/dist/navigation/chrome.esm.js +15 -10
  127. package/dist/navigation/chrome.esm.js.map +1 -1
  128. package/dist/navigation/controller.cjs.js +1 -1
  129. package/dist/navigation/controller.cjs.js.map +1 -1
  130. package/dist/navigation/controller.d.ts +3 -0
  131. package/dist/navigation/controller.d.ts.map +1 -1
  132. package/dist/navigation/controller.esm.js +50 -30
  133. package/dist/navigation/controller.esm.js.map +1 -1
  134. package/dist/navigation/events.esm.js +1 -2
  135. package/dist/navigation/navbarVisibility.esm.js +1 -2
  136. package/dist/navigation/options.cjs.js +1 -1
  137. package/dist/navigation/options.cjs.js.map +1 -1
  138. package/dist/navigation/options.d.ts +12 -0
  139. package/dist/navigation/options.d.ts.map +1 -1
  140. package/dist/navigation/options.esm.js +5 -3
  141. package/dist/navigation/options.esm.js.map +1 -1
  142. package/dist/navigation/podContext.cjs.js +1 -1
  143. package/dist/navigation/podContext.cjs.js.map +1 -1
  144. package/dist/navigation/podContext.d.ts.map +1 -1
  145. package/dist/navigation/podContext.esm.js +15 -16
  146. package/dist/navigation/podContext.esm.js.map +1 -1
  147. package/dist/navigation/state.esm.js +1 -2
  148. package/dist/outline/context.esm.js +1 -2
  149. package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
  150. package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
  151. package/dist/outline/fileExplorerHelpers.d.ts +13 -0
  152. package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
  153. package/dist/outline/fileExplorerHelpers.esm.js +24 -0
  154. package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
  155. package/dist/outline/manager2.cjs.js +1 -1
  156. package/dist/outline/manager2.cjs.js.map +1 -1
  157. package/dist/outline/manager2.esm.js +457 -437
  158. package/dist/outline/manager2.esm.js.map +1 -1
  159. package/dist/outline/outlineDomHelpers.cjs.js +2 -0
  160. package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
  161. package/dist/outline/outlineDomHelpers.d.ts +30 -0
  162. package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
  163. package/dist/outline/outlineDomHelpers.esm.js +79 -0
  164. package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
  165. package/dist/outline/outlineIcons.esm.js +1 -2
  166. package/dist/outline/propertyViews.esm.js +1 -2
  167. package/dist/outline/queryByExample.cjs.js.map +1 -1
  168. package/dist/outline/queryByExample.esm.js +1 -2
  169. package/dist/outline/queryByExample.esm.js.map +1 -1
  170. package/dist/outline/userInput.cjs.js +9 -9
  171. package/dist/outline/userInput.cjs.js.map +1 -1
  172. package/dist/outline/userInput.esm.js +50 -40
  173. package/dist/outline/userInput.esm.js.map +1 -1
  174. package/dist/outline/viewAsImage.esm.js +1 -2
  175. package/dist/outline/viewAsMbox.esm.js +1 -2
  176. package/dist/pad/padPane2.cjs.js +1 -1
  177. package/dist/pad/padPane2.esm.js +2 -3
  178. package/dist/playlist/playlistPane.esm.js +1 -2
  179. package/dist/registerPanes.esm.js +1 -2
  180. package/dist/schedule/formsForSchedule.esm.js +1 -2
  181. package/dist/schedule/schedulePane.d.ts.map +1 -1
  182. package/dist/schedule/schedulePane2.cjs.js +1 -1
  183. package/dist/schedule/schedulePane2.cjs.js.map +1 -1
  184. package/dist/schedule/schedulePane2.esm.js +60 -59
  185. package/dist/schedule/schedulePane2.esm.js.map +1 -1
  186. package/dist/sharing/sharingPane.esm.js +1 -2
  187. package/dist/slideshow/slideshowPane.esm.js +1 -2
  188. package/dist/social/editProfileDetails.cjs.js +1 -1
  189. package/dist/social/editProfileDetails.esm.js +1 -2
  190. package/dist/social/icons.esm.js +1 -2
  191. package/dist/social/socialPane2.esm.js +1 -2
  192. package/dist/social/socialSections.esm.js +1 -2
  193. package/dist/social/triage.esm.js +1 -2
  194. package/dist/tabbed/tabbedPane.esm.js +1 -2
  195. package/dist/tableViewPane.esm.js +1 -2
  196. package/dist/transaction/pane.esm.js +1 -2
  197. package/dist/transaction/period.esm.js +1 -2
  198. package/dist/trip/tripPane.esm.js +1 -2
  199. package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
  200. package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
  201. package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
  202. package/dist/ui/pane.esm.js +1 -2
  203. package/dist/utils/paneUtils.cjs.js +1 -1
  204. package/dist/utils/paneUtils.cjs.js.map +1 -1
  205. package/dist/utils/paneUtils.d.ts +5 -3
  206. package/dist/utils/paneUtils.d.ts.map +1 -1
  207. package/dist/utils/paneUtils.esm.js +36 -29
  208. package/dist/utils/paneUtils.esm.js.map +1 -1
  209. package/dist/utils/podUtils.cjs.js +1 -1
  210. package/dist/utils/podUtils.cjs.js.map +1 -1
  211. package/dist/utils/podUtils.d.ts +9 -1
  212. package/dist/utils/podUtils.d.ts.map +1 -1
  213. package/dist/utils/podUtils.esm.js +22 -95
  214. package/dist/utils/podUtils.esm.js.map +1 -1
  215. package/dist/utils/viewerUtils.esm.js +1 -2
  216. package/dist/utils/webIdUtils.esm.js +1 -2
  217. package/dist/versionInfo.cjs.js +1 -1
  218. package/dist/versionInfo.cjs.js.map +1 -1
  219. package/dist/versionInfo.esm.js +4 -5
  220. package/dist/versionInfo.esm.js.map +1 -1
  221. package/dist/video/videoPane.esm.js +1 -2
  222. package/package.json +7 -6
  223. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
  224. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
  225. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
  226. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
  227. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
  228. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
  229. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
  230. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
  231. package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
  232. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
  233. package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
  234. package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
  235. package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
  236. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
  237. package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
  238. package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
  239. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
  240. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
  241. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
  242. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
  243. package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
  244. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
  245. package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
  246. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
  247. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
  248. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
  249. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
  250. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
  251. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
  252. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
  253. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
  254. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
  255. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
  256. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
  257. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
  258. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
  259. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
  260. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
  261. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
  262. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
  263. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
  264. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
  265. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
  266. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
  267. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
  268. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
  269. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
  270. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
  271. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
  272. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
  273. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
  274. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
  275. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
  276. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
  277. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
  278. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
  279. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
  280. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
  281. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
  282. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
  283. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
  284. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
  285. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
  286. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
  287. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
  288. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
  289. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
  290. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
  291. package/dist/components/file-explorer-header/index.cjs.js +0 -1
  292. package/dist/components/file-explorer-header/index.d.ts +0 -3
  293. package/dist/components/file-explorer-header/index.d.ts.map +0 -1
  294. package/dist/components/file-explorer-header/index.esm.js +0 -2
  295. package/dist/components/file-explorer-header/types.d.ts +0 -10
  296. package/dist/components/file-explorer-header/types.d.ts.map +0 -1
  297. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
  298. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
  299. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
  300. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
  301. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
  302. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
  303. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
  304. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
  305. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
  306. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
  307. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
  308. 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 "solid-ui/components/menu";
8
- import "solid-ui/components/menu-item";
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
- //#region src/components/navbar/Navbar.ts
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 = r({ type: Array }), "navbarItems"), o = class extends t {
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 i`
205
+ return r`
206
206
  <nav class="navbar">
207
- ${this.navbarItems.map((e) => i`
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
- //#region src/components/navbar/Navbar.styles.css
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
- require("../../_virtual/~icons/lucide/pencil.cjs.js");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/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"),o=require("lit/decorators.js"),s=require("lit");require("solid-ui/components/button");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,o.property)({attribute:!1}),C=(0,o.property)({attribute:!1}),T=(0,o.property)({attribute:!1}),D=(0,o.property)({type:Boolean,reflect:!0}),k=(0,o.state)(),j=(0,o.state)(),N=(0,o.state)(),F=(0,o.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 s.html``;let t=Q(e.primaryPhone?.valueNode).replace(/^tel:/i,``),r=Q(e.primaryEmail?.valueNode).replace(/^mailto:/i,``),i=$(e.dateOfBirth),o=!!(e.imageSrc&&this.failedImageSrc!==e.imageSrc),c=a.authn.currentUser(),l=!!(this.friendSubject&&c&&!c.sameTerm(this.friendSubject));return s.html`
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 ${o?``:`image-frame--fallback`}">
5
- ${o?s.html`<img
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
- />`:s.nothing}
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?s.html`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>`:s.nothing}
24
+ ${e.pronouns?o.html`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>`:o.nothing}
25
25
  </div>
26
- ${e.jobTitle?s.html`<div class="role">${e.jobTitle}</div>`:s.nothing}
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?s.html`
30
+ ${this.editContext&&!this.compact||l?o.html`
31
31
  <div class="profile__actions profile__heading-edit-action">
32
- ${l?s.html`
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`?s.nothing:s.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?s.html`
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>`:s.nothing}
45
+ </div>`:o.nothing}
46
46
  </div>
47
- `:s.nothing}
48
- ${this.editContext?s.html`
47
+ `:o.nothing}
48
+ ${this.editContext&&!this.compact?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
- `:s.nothing}
70
+ `:o.nothing}
71
71
  </div>
72
- `:s.nothing}
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?s.html`
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
- `:s.nothing}renderIcon(e){switch(e){case`birthday`:return s.html`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;case`location`:return s.html`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;case`phone`:return s.html`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;case`email`:return s.html`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`}}renderEditIcon(){return s.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}});
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,EA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B,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
+ {"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 && !this.compact) || showFriend\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 && !this.compact\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 }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A,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
- //#region src/components/profile-heading/ProfileHeading.ts
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 = u({ attribute: !1 }), k = u({ attribute: !1 }), j = u({ attribute: !1 }), N = u({
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 = d(), L = d(), z = d(), V = d(), "profileData"), h = class extends o {
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 f``;
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 f`
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 ? f`<img
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
- />` : p}
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 ? f`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>` : p}
329
+ ${e.pronouns ? u`<span class="pronouns" ?hidden=${this.compact}>(${e.pronouns})</span>` : d}
330
330
  </div>
331
- ${e.jobTitle ? f`<div class="role">${e.jobTitle}</div>` : p}
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 ? f`
335
+ ${this.editContext && !this.compact || s ? u`
336
336
  <div class="profile__actions profile__heading-edit-action">
337
- ${s ? f`
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" ? p : f`<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 ? f`
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>` : p}
350
+ </div>` : d}
351
351
  </div>
352
- ` : p}
353
- ${this.editContext ? f`
352
+ ` : d}
353
+ ${this.editContext && !this.compact ? 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
- ` : p}
375
+ ` : d}
376
376
  </div>
377
- ` : p}
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 ? f`
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
- ` : p;
402
+ ` : d;
403
403
  }
404
404
  renderIcon(e) {
405
405
  switch (e) {
406
- case "birthday": return f`<icon-lucide-cake aria-hidden="true"></icon-lucide-cake>`;
407
- case "location": return f`<icon-lucide-map-pin aria-hidden="true"></icon-lucide-map-pin>`;
408
- case "phone": return f`<icon-lucide-phone aria-hidden="true"></icon-lucide-phone>`;
409
- case "email": return f`<icon-lucide-mail aria-hidden="true"></icon-lucide-mail>`;
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 f`<icon-lucide-pencil aria-hidden="true"></icon-lucide-pencil>`;
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