solid-panes 5.0.0-1 → 5.1.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +67 -2
  2. package/dist/RDFXMLPane2.cjs.js.map +1 -1
  3. package/dist/RDFXMLPane2.esm.js.map +1 -1
  4. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -1
  5. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -1
  6. package/dist/_virtual/~icons/lucide/cake.cjs.js +2 -0
  7. package/dist/_virtual/~icons/lucide/cake.cjs.js.map +1 -0
  8. package/dist/_virtual/~icons/lucide/cake.esm.js +11 -0
  9. package/dist/_virtual/~icons/lucide/cake.esm.js.map +1 -0
  10. package/dist/_virtual/~icons/lucide/camera.cjs.js +2 -0
  11. package/dist/_virtual/~icons/lucide/camera.cjs.js.map +1 -0
  12. package/dist/_virtual/~icons/lucide/camera.esm.js +11 -0
  13. package/dist/_virtual/~icons/lucide/camera.esm.js.map +1 -0
  14. package/dist/_virtual/~icons/lucide/circle-user-round.cjs.js +2 -0
  15. package/dist/_virtual/~icons/lucide/circle-user-round.cjs.js.map +1 -0
  16. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +11 -0
  17. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js.map +1 -0
  18. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -1
  19. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -1
  20. package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -1
  21. package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -1
  22. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -1
  23. package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -1
  24. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -1
  25. package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -1
  26. package/dist/_virtual/~icons/lucide/help-circle.cjs.js.map +1 -1
  27. package/dist/_virtual/~icons/lucide/help-circle.esm.js.map +1 -1
  28. package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +1 -1
  29. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js.map +1 -1
  30. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -1
  31. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -1
  32. package/dist/_virtual/~icons/lucide/mail.cjs.js +2 -0
  33. package/dist/_virtual/~icons/lucide/mail.cjs.js.map +1 -0
  34. package/dist/_virtual/~icons/lucide/mail.esm.js +11 -0
  35. package/dist/_virtual/~icons/lucide/mail.esm.js.map +1 -0
  36. package/dist/_virtual/~icons/lucide/map-pin.cjs.js +2 -0
  37. package/dist/_virtual/~icons/lucide/map-pin.cjs.js.map +1 -0
  38. package/dist/_virtual/~icons/lucide/map-pin.esm.js +11 -0
  39. package/dist/_virtual/~icons/lucide/map-pin.esm.js.map +1 -0
  40. package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -1
  41. package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -1
  42. package/dist/_virtual/~icons/lucide/phone.cjs.js +2 -0
  43. package/dist/_virtual/~icons/lucide/phone.cjs.js.map +1 -0
  44. package/dist/_virtual/~icons/lucide/phone.esm.js +11 -0
  45. package/dist/_virtual/~icons/lucide/phone.esm.js.map +1 -0
  46. package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +1 -1
  47. package/dist/_virtual/~icons/lucide/settings-2.esm.js.map +1 -1
  48. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -1
  49. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -1
  50. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -1
  51. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -1
  52. package/dist/_virtual/~icons/lucide/user-round-plus.cjs.js +2 -0
  53. package/dist/_virtual/~icons/lucide/user-round-plus.cjs.js.map +1 -0
  54. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +11 -0
  55. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js.map +1 -0
  56. package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -1
  57. package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -1
  58. package/dist/_virtual/~icons/lucide/users.cjs.js.map +1 -1
  59. package/dist/_virtual/~icons/lucide/users.esm.js.map +1 -1
  60. package/dist/_virtual/~icons/lucide/x.cjs.js +2 -0
  61. package/dist/_virtual/~icons/lucide/x.cjs.js.map +1 -0
  62. package/dist/_virtual/~icons/lucide/x.esm.js +11 -0
  63. package/dist/_virtual/~icons/lucide/x.esm.js.map +1 -0
  64. package/dist/audio/audioPane.cjs.js +1 -1
  65. package/dist/audio/audioPane.cjs.js.map +1 -1
  66. package/dist/audio/audioPane.esm.js +1 -5
  67. package/dist/audio/audioPane.esm.js.map +1 -1
  68. package/dist/classInstancePane.cjs.js.map +1 -1
  69. package/dist/classInstancePane.esm.js.map +1 -1
  70. package/dist/components/editor-card/EditorCard.cjs.js +1 -1
  71. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  72. package/dist/components/editor-card/EditorCard.esm.js +4 -7
  73. package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
  74. package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -1
  75. package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -1
  76. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +1 -1
  77. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
  78. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +2 -2
  79. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
  80. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -1
  81. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -1
  82. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +1 -1
  83. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
  84. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +3 -3
  85. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
  86. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
  87. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
  88. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +1 -1
  89. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
  90. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +2 -2
  91. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
  92. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -1
  93. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -1
  94. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +5 -5
  95. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
  96. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
  97. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +97 -96
  98. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
  99. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -1
  100. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -1
  101. package/dist/components/header/Header.cjs.js +1 -1
  102. package/dist/components/header/Header.cjs.js.map +1 -1
  103. package/dist/components/header/Header.esm.js +2 -2
  104. package/dist/components/header/Header.esm.js.map +1 -1
  105. package/dist/components/header/Header.styles.cjs.js +1 -1
  106. package/dist/components/header/Header.styles.cjs.js.map +1 -1
  107. package/dist/components/header/Header.styles.esm.js +1 -1
  108. package/dist/components/header/Header.styles.esm.js.map +1 -1
  109. package/dist/components/navbar/Navbar.cjs.js +1 -1
  110. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  111. package/dist/components/navbar/Navbar.d.ts +2 -0
  112. package/dist/components/navbar/Navbar.d.ts.map +1 -1
  113. package/dist/components/navbar/Navbar.esm.js +2 -2
  114. package/dist/components/navbar/Navbar.esm.js.map +1 -1
  115. package/dist/components/navbar/Navbar.styles.cjs.js +1 -1
  116. package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
  117. package/dist/components/navbar/Navbar.styles.esm.js +1 -1
  118. package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
  119. package/dist/components/profile-heading/ProfileHeading.cjs.js +95 -0
  120. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -0
  121. package/dist/components/profile-heading/ProfileHeading.d.ts +45 -0
  122. package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -0
  123. package/dist/components/profile-heading/ProfileHeading.esm.js +480 -0
  124. package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -0
  125. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js +2 -0
  126. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -0
  127. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +7 -0
  128. package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -0
  129. package/dist/components/profile-heading/editor/index.d.ts +3 -0
  130. package/dist/components/profile-heading/editor/index.d.ts.map +1 -0
  131. package/dist/components/profile-heading/editor/sections/contactInfo/types.d.ts +44 -0
  132. package/dist/components/profile-heading/editor/sections/contactInfo/types.d.ts.map +1 -0
  133. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +297 -0
  134. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -0
  135. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.d.ts +5 -0
  136. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.d.ts.map +1 -0
  137. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +642 -0
  138. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -0
  139. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js +2 -0
  140. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -0
  141. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.d.ts +4 -0
  142. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.d.ts.map +1 -0
  143. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +16 -0
  144. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -0
  145. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js +2 -0
  146. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -0
  147. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.d.ts +5 -0
  148. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.d.ts.map +1 -0
  149. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +76 -0
  150. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js.map +1 -0
  151. package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js +19 -0
  152. package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -0
  153. package/dist/components/profile-heading/editor/sections/heading/imagePreview.d.ts +2 -0
  154. package/dist/components/profile-heading/editor/sections/heading/imagePreview.d.ts.map +1 -0
  155. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +28 -0
  156. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js.map +1 -0
  157. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +2 -0
  158. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -0
  159. package/dist/components/profile-heading/editor/sections/heading/mutations.d.ts +4 -0
  160. package/dist/components/profile-heading/editor/sections/heading/mutations.d.ts.map +1 -0
  161. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +151 -0
  162. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js.map +1 -0
  163. package/dist/components/profile-heading/editor/sections/heading/types.d.ts +34 -0
  164. package/dist/components/profile-heading/editor/sections/heading/types.d.ts.map +1 -0
  165. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js +2 -0
  166. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -0
  167. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.d.ts +7 -0
  168. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.d.ts.map +1 -0
  169. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +20 -0
  170. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -0
  171. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js +2 -0
  172. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -0
  173. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.d.ts +3 -0
  174. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.d.ts.map +1 -0
  175. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +11 -0
  176. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js.map +1 -0
  177. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js +2 -0
  178. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -0
  179. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.d.ts +20 -0
  180. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.d.ts.map +1 -0
  181. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +1291 -0
  182. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -0
  183. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js +2 -0
  184. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -0
  185. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.d.ts +45 -0
  186. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.d.ts.map +1 -0
  187. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +211 -0
  188. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -0
  189. package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js +2 -0
  190. package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -0
  191. package/dist/components/profile-heading/editor/sections/shared/rowState.d.ts +21 -0
  192. package/dist/components/profile-heading/editor/sections/shared/rowState.d.ts.map +1 -0
  193. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +18 -0
  194. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -0
  195. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js +2 -0
  196. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -0
  197. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.d.ts +5 -0
  198. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.d.ts.map +1 -0
  199. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +18 -0
  200. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js.map +1 -0
  201. package/dist/components/profile-heading/editor/sections/shared/types.d.ts +31 -0
  202. package/dist/components/profile-heading/editor/sections/shared/types.d.ts.map +1 -0
  203. package/dist/components/profile-heading/editor/textUtils.cjs.js +2 -0
  204. package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -0
  205. package/dist/components/profile-heading/editor/textUtils.d.ts +6 -0
  206. package/dist/components/profile-heading/editor/textUtils.d.ts.map +1 -0
  207. package/dist/components/profile-heading/editor/textUtils.esm.js +26 -0
  208. package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -0
  209. package/dist/components/profile-heading/editor/texts/buttonTexts.d.ts +9 -0
  210. package/dist/components/profile-heading/editor/texts/buttonTexts.d.ts.map +1 -0
  211. package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js +2 -0
  212. package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -0
  213. package/dist/components/profile-heading/editor/texts/dialogTexts.d.ts +14 -0
  214. package/dist/components/profile-heading/editor/texts/dialogTexts.d.ts.map +1 -0
  215. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +6 -0
  216. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -0
  217. package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js +2 -0
  218. package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -0
  219. package/dist/components/profile-heading/editor/texts/messageTexts.d.ts +42 -0
  220. package/dist/components/profile-heading/editor/texts/messageTexts.d.ts.map +1 -0
  221. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +6 -0
  222. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -0
  223. package/dist/components/profile-heading/editor/texts/profileTexts.d.ts +14 -0
  224. package/dist/components/profile-heading/editor/texts/profileTexts.d.ts.map +1 -0
  225. package/dist/components/profile-heading/editor/texts/qrCodeTexts.d.ts +2 -0
  226. package/dist/components/profile-heading/editor/texts/qrCodeTexts.d.ts.map +1 -0
  227. package/dist/components/profile-heading/editor/texts.d.ts +6 -0
  228. package/dist/components/profile-heading/editor/texts.d.ts.map +1 -0
  229. package/dist/components/profile-heading/editor/ui/dialog.d.ts +41 -0
  230. package/dist/components/profile-heading/editor/ui/dialog.d.ts.map +1 -0
  231. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +17 -0
  232. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -0
  233. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +263 -0
  234. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -0
  235. package/dist/components/profile-heading/editor/ui/spinner.cjs.js +5 -0
  236. package/dist/components/profile-heading/editor/ui/spinner.cjs.js.map +1 -0
  237. package/dist/components/profile-heading/editor/ui/spinner.d.ts +3 -0
  238. package/dist/components/profile-heading/editor/ui/spinner.d.ts.map +1 -0
  239. package/dist/components/profile-heading/editor/ui/spinner.esm.js +12 -0
  240. package/dist/components/profile-heading/editor/ui/spinner.esm.js.map +1 -0
  241. package/dist/components/profile-heading/editor/utils/errorDisplay.cjs.js +2 -0
  242. package/dist/components/profile-heading/editor/utils/errorDisplay.cjs.js.map +1 -0
  243. package/dist/components/profile-heading/editor/utils/errorDisplay.d.ts +2 -0
  244. package/dist/components/profile-heading/editor/utils/errorDisplay.d.ts.map +1 -0
  245. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +18 -0
  246. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js.map +1 -0
  247. package/dist/components/profile-heading/friendActions.cjs.js +2 -0
  248. package/dist/components/profile-heading/friendActions.cjs.js.map +1 -0
  249. package/dist/components/profile-heading/friendActions.d.ts +11 -0
  250. package/dist/components/profile-heading/friendActions.d.ts.map +1 -0
  251. package/dist/components/profile-heading/friendActions.esm.js +32 -0
  252. package/dist/components/profile-heading/friendActions.esm.js.map +1 -0
  253. package/dist/components/profile-heading/index.cjs.js +1 -0
  254. package/dist/components/profile-heading/index.d.ts +5 -0
  255. package/dist/components/profile-heading/index.d.ts.map +1 -0
  256. package/dist/components/profile-heading/index.esm.js +1 -0
  257. package/dist/components/profile-heading/profileHeadingData.cjs.js +2 -0
  258. package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -0
  259. package/dist/components/profile-heading/profileHeadingData.d.ts +6 -0
  260. package/dist/components/profile-heading/profileHeadingData.d.ts.map +1 -0
  261. package/dist/components/profile-heading/profileHeadingData.esm.js +81 -0
  262. package/dist/components/profile-heading/profileHeadingData.esm.js.map +1 -0
  263. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +1 -1
  264. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
  265. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +2 -2
  266. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
  267. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -1
  268. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -1
  269. package/dist/dashboard/basicPreferences.cjs.js.map +1 -1
  270. package/dist/dashboard/basicPreferences.esm.js.map +1 -1
  271. package/dist/dashboard/dashboardPane.cjs.js.map +1 -1
  272. package/dist/dashboard/dashboardPane.esm.js.map +1 -1
  273. package/dist/dashboard/homepage.cjs.js.map +1 -1
  274. package/dist/dashboard/homepage.esm.js.map +1 -1
  275. package/dist/dashboard/ontologyData.cjs.js.map +1 -1
  276. package/dist/dashboard/ontologyData.esm.js.map +1 -1
  277. package/dist/dashboard/preferencesFormText.cjs.js.map +1 -1
  278. package/dist/dashboard/preferencesFormText.esm.js.map +1 -1
  279. package/dist/dataContentPane2.cjs.js.map +1 -1
  280. package/dist/dataContentPane2.esm.js.map +1 -1
  281. package/dist/defaultPane2.cjs.js.map +1 -1
  282. package/dist/defaultPane2.esm.js.map +1 -1
  283. package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
  284. package/dist/dokieli/dokieliPane.esm.js.map +1 -1
  285. package/dist/dokieli/new.cjs.js.map +1 -1
  286. package/dist/dokieli/new.esm.js.map +1 -1
  287. package/dist/form/pane.cjs.js.map +1 -1
  288. package/dist/form/pane.esm.js.map +1 -1
  289. package/dist/home/homePane.cjs.js.map +1 -1
  290. package/dist/home/homePane.esm.js.map +1 -1
  291. package/dist/humanReadablePane2.cjs.js.map +1 -1
  292. package/dist/humanReadablePane2.esm.js.map +1 -1
  293. package/dist/icons/folder.cjs.js.map +1 -1
  294. package/dist/icons/folder.esm.js.map +1 -1
  295. package/dist/icons/friends.cjs.js.map +1 -1
  296. package/dist/icons/friends.esm.js.map +1 -1
  297. package/dist/icons/person.cjs.js.map +1 -1
  298. package/dist/icons/person.esm.js.map +1 -1
  299. package/dist/imagePane2.cjs.js.map +1 -1
  300. package/dist/imagePane2.esm.js.map +1 -1
  301. package/dist/index.cjs.js +1 -1
  302. package/dist/index.cjs.js.map +1 -1
  303. package/dist/index.d.ts +2 -1
  304. package/dist/index.d.ts.map +1 -1
  305. package/dist/index.esm.js +15 -14
  306. package/dist/index.esm.js.map +1 -1
  307. package/dist/internal/internalPane2.cjs.js +1 -1
  308. package/dist/internal/internalPane2.cjs.js.map +1 -1
  309. package/dist/internal/internalPane2.esm.js +2 -5
  310. package/dist/internal/internalPane2.esm.js.map +1 -1
  311. package/dist/mainPage/header.cjs.js +1 -1
  312. package/dist/mainPage/header.cjs.js.map +1 -1
  313. package/dist/mainPage/header.d.ts +2 -2
  314. package/dist/mainPage/header.d.ts.map +1 -1
  315. package/dist/mainPage/header.esm.js +48 -44
  316. package/dist/mainPage/header.esm.js.map +1 -1
  317. package/dist/mainPage/index.cjs.js +1 -1
  318. package/dist/mainPage/index.cjs.js.map +1 -1
  319. package/dist/mainPage/index.d.ts.map +1 -1
  320. package/dist/mainPage/index.esm.js +27 -21
  321. package/dist/mainPage/index.esm.js.map +1 -1
  322. package/dist/mainPage/navbar.cjs.js +1 -1
  323. package/dist/mainPage/navbar.cjs.js.map +1 -1
  324. package/dist/mainPage/navbar.d.ts +3 -2
  325. package/dist/mainPage/navbar.d.ts.map +1 -1
  326. package/dist/mainPage/navbar.esm.js +77 -42
  327. package/dist/mainPage/navbar.esm.js.map +1 -1
  328. package/dist/mainPage/navigation.cjs.js +2 -0
  329. package/dist/mainPage/navigation.cjs.js.map +1 -0
  330. package/dist/mainPage/navigation.d.ts +6 -0
  331. package/dist/mainPage/navigation.d.ts.map +1 -0
  332. package/dist/mainPage/navigation.esm.js +22 -0
  333. package/dist/mainPage/navigation.esm.js.map +1 -0
  334. package/dist/mainPage/profileHeading.d.ts +5 -0
  335. package/dist/mainPage/profileHeading.d.ts.map +1 -0
  336. package/dist/mainPage/profileHeading2.cjs.js +2 -0
  337. package/dist/mainPage/profileHeading2.cjs.js.map +1 -0
  338. package/dist/mainPage/profileHeading2.esm.js +158 -0
  339. package/dist/mainPage/profileHeading2.esm.js.map +1 -0
  340. package/dist/n3Pane2.cjs.js.map +1 -1
  341. package/dist/n3Pane2.esm.js.map +1 -1
  342. package/dist/navigation/browserEvents.cjs.js +2 -0
  343. package/dist/navigation/browserEvents.cjs.js.map +1 -0
  344. package/dist/navigation/browserEvents.d.ts +15 -0
  345. package/dist/navigation/browserEvents.d.ts.map +1 -0
  346. package/dist/navigation/browserEvents.esm.js +32 -0
  347. package/dist/navigation/browserEvents.esm.js.map +1 -0
  348. package/dist/navigation/chrome.cjs.js +2 -0
  349. package/dist/navigation/chrome.cjs.js.map +1 -0
  350. package/dist/navigation/chrome.d.ts +69 -0
  351. package/dist/navigation/chrome.d.ts.map +1 -0
  352. package/dist/navigation/chrome.esm.js +43 -0
  353. package/dist/navigation/chrome.esm.js.map +1 -0
  354. package/dist/navigation/controller.cjs.js +2 -0
  355. package/dist/navigation/controller.cjs.js.map +1 -0
  356. package/dist/navigation/controller.d.ts +51 -0
  357. package/dist/navigation/controller.d.ts.map +1 -0
  358. package/dist/navigation/controller.esm.js +45 -0
  359. package/dist/navigation/controller.esm.js.map +1 -0
  360. package/dist/navigation/events.cjs.js +2 -0
  361. package/dist/navigation/events.cjs.js.map +1 -0
  362. package/dist/navigation/events.d.ts +17 -0
  363. package/dist/navigation/events.d.ts.map +1 -0
  364. package/dist/navigation/events.esm.js +18 -0
  365. package/dist/navigation/events.esm.js.map +1 -0
  366. package/dist/navigation/navbarVisibility.cjs.js +2 -0
  367. package/dist/navigation/navbarVisibility.cjs.js.map +1 -0
  368. package/dist/navigation/navbarVisibility.d.ts +5 -0
  369. package/dist/navigation/navbarVisibility.d.ts.map +1 -0
  370. package/dist/navigation/navbarVisibility.esm.js +26 -0
  371. package/dist/navigation/navbarVisibility.esm.js.map +1 -0
  372. package/dist/navigation/options.cjs.js +2 -0
  373. package/dist/navigation/options.cjs.js.map +1 -0
  374. package/dist/navigation/options.d.ts +16 -0
  375. package/dist/navigation/options.d.ts.map +1 -0
  376. package/dist/navigation/options.esm.js +8 -0
  377. package/dist/navigation/options.esm.js.map +1 -0
  378. package/dist/navigation/podContext.cjs.js +2 -0
  379. package/dist/navigation/podContext.cjs.js.map +1 -0
  380. package/dist/navigation/podContext.d.ts +21 -0
  381. package/dist/navigation/podContext.d.ts.map +1 -0
  382. package/dist/navigation/podContext.esm.js +62 -0
  383. package/dist/navigation/podContext.esm.js.map +1 -0
  384. package/dist/navigation/state.cjs.js +2 -0
  385. package/dist/navigation/state.cjs.js.map +1 -0
  386. package/dist/navigation/state.d.ts +40 -0
  387. package/dist/navigation/state.d.ts.map +1 -0
  388. package/dist/navigation/state.esm.js +41 -0
  389. package/dist/navigation/state.esm.js.map +1 -0
  390. package/dist/outline/context.cjs.js.map +1 -1
  391. package/dist/outline/context.esm.js.map +1 -1
  392. package/dist/outline/manager2.cjs.js +1 -1
  393. package/dist/outline/manager2.cjs.js.map +1 -1
  394. package/dist/outline/manager2.esm.js +388 -354
  395. package/dist/outline/manager2.esm.js.map +1 -1
  396. package/dist/outline/outlineIcons.cjs.js.map +1 -1
  397. package/dist/outline/outlineIcons.esm.js.map +1 -1
  398. package/dist/outline/propertyViews.cjs.js.map +1 -1
  399. package/dist/outline/propertyViews.esm.js.map +1 -1
  400. package/dist/outline/queryByExample.cjs.js.map +1 -1
  401. package/dist/outline/queryByExample.esm.js.map +1 -1
  402. package/dist/outline/userInput.cjs.js +1 -1
  403. package/dist/outline/userInput.cjs.js.map +1 -1
  404. package/dist/outline/userInput.esm.js +12 -13
  405. package/dist/outline/userInput.esm.js.map +1 -1
  406. package/dist/outline/viewAsImage.cjs.js.map +1 -1
  407. package/dist/outline/viewAsImage.esm.js.map +1 -1
  408. package/dist/outline/viewAsMbox.cjs.js.map +1 -1
  409. package/dist/outline/viewAsMbox.esm.js.map +1 -1
  410. package/dist/pad/padPane2.cjs.js +1 -1
  411. package/dist/pad/padPane2.cjs.js.map +1 -1
  412. package/dist/pad/padPane2.esm.js +2 -6
  413. package/dist/pad/padPane2.esm.js.map +1 -1
  414. package/dist/playlist/playlistPane.cjs.js.map +1 -1
  415. package/dist/playlist/playlistPane.esm.js.map +1 -1
  416. package/dist/registerPanes.cjs.js.map +1 -1
  417. package/dist/registerPanes.esm.js.map +1 -1
  418. package/dist/schedule/formsForSchedule.cjs.js.map +1 -1
  419. package/dist/schedule/formsForSchedule.esm.js.map +1 -1
  420. package/dist/schedule/schedulePane2.cjs.js +1 -1
  421. package/dist/schedule/schedulePane2.cjs.js.map +1 -1
  422. package/dist/schedule/schedulePane2.esm.js +1 -5
  423. package/dist/schedule/schedulePane2.esm.js.map +1 -1
  424. package/dist/sharing/sharingPane.cjs.js.map +1 -1
  425. package/dist/sharing/sharingPane.esm.js.map +1 -1
  426. package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
  427. package/dist/slideshow/slideshowPane.esm.js.map +1 -1
  428. package/dist/social/editProfileDetails.cjs.js +1 -1
  429. package/dist/social/editProfileDetails.cjs.js.map +1 -1
  430. package/dist/social/editProfileDetails.esm.js +0 -2
  431. package/dist/social/editProfileDetails.esm.js.map +1 -1
  432. package/dist/social/icons.cjs.js +4 -4
  433. package/dist/social/icons.cjs.js.map +1 -1
  434. package/dist/social/icons.esm.js +5 -5
  435. package/dist/social/icons.esm.js.map +1 -1
  436. package/dist/social/socialPane.d.ts +0 -1
  437. package/dist/social/socialPane.d.ts.map +1 -1
  438. package/dist/social/socialPane2.cjs.js +3 -3
  439. package/dist/social/socialPane2.cjs.js.map +1 -1
  440. package/dist/social/socialPane2.esm.js +97 -154
  441. package/dist/social/socialPane2.esm.js.map +1 -1
  442. package/dist/social/socialSections.cjs.js +1 -1
  443. package/dist/social/socialSections.cjs.js.map +1 -1
  444. package/dist/social/socialSections.d.ts +2 -1
  445. package/dist/social/socialSections.d.ts.map +1 -1
  446. package/dist/social/socialSections.esm.js +54 -129
  447. package/dist/social/socialSections.esm.js.map +1 -1
  448. package/dist/social/triage.cjs.js.map +1 -1
  449. package/dist/social/triage.esm.js.map +1 -1
  450. package/dist/tabbed/tabbedPane.cjs.js.map +1 -1
  451. package/dist/tabbed/tabbedPane.esm.js.map +1 -1
  452. package/dist/tableViewPane.cjs.js.map +1 -1
  453. package/dist/tableViewPane.esm.js.map +1 -1
  454. package/dist/transaction/pane.cjs.js.map +1 -1
  455. package/dist/transaction/pane.esm.js +1 -1
  456. package/dist/transaction/pane.esm.js.map +1 -1
  457. package/dist/transaction/period.cjs.js.map +1 -1
  458. package/dist/transaction/period.esm.js.map +1 -1
  459. package/dist/trip/tripPane.cjs.js.map +1 -1
  460. package/dist/trip/tripPane.esm.js.map +1 -1
  461. package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
  462. package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -1
  463. package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
  464. package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -1
  465. package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -1
  466. package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -1
  467. package/dist/types.d.ts +3 -0
  468. package/dist/types.d.ts.map +1 -0
  469. package/dist/ui/pane.cjs.js +1 -1
  470. package/dist/ui/pane.cjs.js.map +1 -1
  471. package/dist/ui/pane.esm.js +2 -5
  472. package/dist/ui/pane.esm.js.map +1 -1
  473. package/dist/utils/paneUtils.cjs.js +1 -1
  474. package/dist/utils/paneUtils.cjs.js.map +1 -1
  475. package/dist/utils/paneUtils.esm.js +4 -4
  476. package/dist/utils/paneUtils.esm.js.map +1 -1
  477. package/dist/utils/podUtils.cjs.js.map +1 -1
  478. package/dist/utils/podUtils.esm.js.map +1 -1
  479. package/dist/utils/viewerUtils.cjs.js +2 -0
  480. package/dist/utils/viewerUtils.cjs.js.map +1 -0
  481. package/dist/utils/viewerUtils.d.ts +5 -0
  482. package/dist/utils/viewerUtils.d.ts.map +1 -0
  483. package/dist/utils/viewerUtils.esm.js +13 -0
  484. package/dist/utils/viewerUtils.esm.js.map +1 -0
  485. package/dist/utils/webIdUtils.cjs.js +1 -1
  486. package/dist/utils/webIdUtils.cjs.js.map +1 -1
  487. package/dist/utils/webIdUtils.d.ts +1 -0
  488. package/dist/utils/webIdUtils.d.ts.map +1 -1
  489. package/dist/utils/webIdUtils.esm.js +23 -19
  490. package/dist/utils/webIdUtils.esm.js.map +1 -1
  491. package/dist/versionInfo.cjs.js +1 -1
  492. package/dist/versionInfo.cjs.js.map +1 -1
  493. package/dist/versionInfo.esm.js +11 -11
  494. package/dist/versionInfo.esm.js.map +1 -1
  495. package/dist/video/videoPane.cjs.js.map +1 -1
  496. package/dist/video/videoPane.esm.js.map +1 -1
  497. package/package.json +15 -14
@@ -1,66 +1,101 @@
1
- import { isWebIdUri as e, loadProfileFromURI as t } from "../utils/webIdUtils.esm.js";
1
+ import { isWebIdUri as e } from "../utils/webIdUtils.esm.js";
2
+ import { deriveNavbarSelection as t, isNavbarItemSelected as n, pickNavbarItem as r } from "../navigation/chrome.esm.js";
3
+ import { getPodContext as i, isSamePod as a } from "../navigation/podContext.esm.js";
4
+ import { readNavigationState as o } from "../navigation/state.esm.js";
5
+ import { onNavigated as s } from "../navigation/events.esm.js";
6
+ import { refreshNavbarVisibility as c } from "../navigation/navbarVisibility.esm.js";
2
7
  import "../_virtual/~icons/lucide/user.esm.js";
3
8
  import "../_virtual/~icons/lucide/users.esm.js";
4
9
  import "../_virtual/~icons/lucide/folder-open.esm.js";
5
- import { getFolderPanesFromURI as n, getProfilePaneFromURI as r, getSocialPaneFromURI as i } from "../utils/paneUtils.esm.js";
6
10
  import "../components/navbar/index.esm.js";
7
- import { store as a } from "solid-logic";
8
- import { html as o, render as s } from "lit-html";
11
+ import { store as l } from "solid-logic";
12
+ import { html as u, render as d } from "lit-html";
9
13
  //#region src/mainPage/navbar.ts
10
- function c() {
11
- let e = document.querySelector("solid-panes-navbar");
12
- e && e.classList.remove("navbar--hidden");
14
+ function f() {
15
+ return c(window.location.href, o().viaAccountMenu);
13
16
  }
14
- function l(e, t, n = !1) {
17
+ var p;
18
+ function m(e, t) {
19
+ p?.(e, t);
20
+ }
21
+ function h(e, t, n, r, i = !1) {
15
22
  return {
16
23
  label: e,
17
- onSelected() {
18
- return c(), t();
24
+ paneName: t,
25
+ paneUri: n,
26
+ async onSelected() {
27
+ return await f(), r();
19
28
  },
20
- selected: n
29
+ selected: i
21
30
  };
22
31
  }
23
- async function u(a, o, s, c, u) {
24
- let d = await t(o), f = c || (e(o) ? "profile" : void 0), p = [];
25
- d && p.push(l("Profile", async () => {
26
- let e = await r(d);
27
- a.GotoSubject(o, !0, e, !0, void 0, s);
28
- }, f === "profile"), l("Friends", async () => {
29
- let e = await i(d);
30
- a.GotoSubject(o, !0, e, !0, void 0, s);
31
- }, f === "social"));
32
- let m = await n(o);
33
- return m.forEach((e) => {
34
- p.push(l(e.label(), async () => {
35
- a.GotoSubject(o, !0, e, !0, void 0, s);
36
- }, f === e.paneName && (u ? u === e.subject.value : m.length === 1)));
37
- }), p;
32
+ function g(r, i, a) {
33
+ let o = t(a, e(l.sym(window.location.href))), s = [];
34
+ if (r.owner) {
35
+ let e = r.owner;
36
+ s.push(h("Profile", "profile", e, () => i.show({
37
+ kind: "profile",
38
+ subject: e
39
+ }), n({ paneName: "profile" }, o, 0)), h("Friends", "social", e, () => i.show({
40
+ kind: "friends",
41
+ subject: e
42
+ }), n({ paneName: "social" }, o, 0)));
43
+ }
44
+ return r.storagePanes.forEach((e) => {
45
+ s.push(h(e.label(), e.paneName, e.subject.value, () => i.show({
46
+ kind: "storage",
47
+ pane: e
48
+ }), n({
49
+ paneName: e.paneName,
50
+ paneUri: e.subject.value
51
+ }, o, r.storagePanes.length)));
52
+ }), s;
38
53
  }
39
- async function d(e) {
40
- let t = document.querySelector("solid-panes-navbar");
41
- if (t) return t.classList.remove("navbar--hidden"), t;
42
- let n = document.getElementById("OutlineView"), r = document.getElementById("MainContent"), i = document.createElement("div"), c = window.location.href, l = typeof c == "string" ? a.sym(c) : c, d = window.history.state?.paneName, f = window.history.state?.paneUri, p = await u(e, l, n, d, f).catch((e) => (console.error("Failed to build navbar menu items:", e), []));
43
- function m(e) {
44
- p = p.map((t) => ({
54
+ async function _(m) {
55
+ let h = document.querySelector("solid-panes-navbar");
56
+ if (h) return await f(), h;
57
+ let _ = document.getElementById("MainContent"), v = document.createElement("div"), y = await i(window.location.href), b = g(y, m, o().view);
58
+ function x(e) {
59
+ b = b.map((t) => ({
45
60
  ...t,
46
61
  selected: t === e
47
62
  }));
48
63
  }
49
- function h(e) {
64
+ function S(e) {
50
65
  let { detail: t } = e;
51
- m(t), Promise.resolve(t.onSelected?.()).catch((e) => {
66
+ x(t), Promise.resolve(t.onSelected?.()).catch((e) => {
52
67
  console.error("Navbar menu item selection failed:", e);
53
- }), g();
68
+ }), C();
54
69
  }
55
- function g() {
56
- s(o`<solid-panes-navbar .navbarItems=${p} @solid-ui-select=${h}></solid-panes-navbar>`, i);
70
+ function C() {
71
+ d(u`<solid-panes-navbar .navbarItems=${b} @solid-ui-select=${S}></solid-panes-navbar>`, v);
57
72
  }
58
- g();
59
- let _ = i.firstElementChild;
60
- if (!_) throw Error("Failed to create nav bar");
61
- return r ? r.insertBefore(_, r.firstChild) : document.body.prepend(_), _;
73
+ C(), p = (e, t) => {
74
+ let n = r(b, e, t);
75
+ n && (x(n), C());
76
+ };
77
+ let w = v.firstElementChild;
78
+ if (!w) throw Error("Failed to create nav bar");
79
+ _ ? _.insertBefore(w, _.firstChild) : document.body.prepend(w), await f();
80
+ let T = 0, E = s(({ url: r, state: o }) => {
81
+ if (!w.isConnected) return E();
82
+ c(r, o.viaAccountMenu).catch((e) => console.error("Failed to update navbar visibility:", e));
83
+ let s = ++T;
84
+ i(r).then((i) => {
85
+ if (s === T) {
86
+ if (a(y, i)) {
87
+ let i = t(o.view, e(l.sym(r))), a = b.map((e) => ({
88
+ ...e,
89
+ selected: n(e, i, y.storagePanes.length)
90
+ }));
91
+ a.some((e, t) => e.selected !== b[t].selected) && (b = a, C());
92
+ } else y = i, b = g(i, m, o.view), C();
93
+ }
94
+ }).catch((e) => console.error("Failed to rebuild the navbar for the new pod:", e));
95
+ });
96
+ return w;
62
97
  }
63
98
  //#endregion
64
- export { d as createNavbar };
99
+ export { _ as createNavbar, m as selectNavbarPane };
65
100
 
66
101
  //# sourceMappingURL=navbar.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.esm.js","names":[],"sources":["../../src/mainPage/navbar.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { NamedNode } from 'rdflib'\nimport { getSocialPaneFromURI, getProfilePaneFromURI, getFolderPanesFromURI } from '../utils/paneUtils'\nimport { html, render } from 'lit-html'\nimport type { OutlineManager } from '../outline/manager'\nimport { isWebIdUri, loadProfileFromURI } from '../utils/webIdUtils'\n\nimport '~icons/lucide/user'\nimport '~icons/lucide/users'\nimport '~icons/lucide/folder-open'\nimport '../components/navbar'\n\nimport type { NavbarMenuItem } from '../components/navbar/Navbar'\n\nfunction showNavbar () {\n const navbar = document.querySelector<HTMLElement>('solid-panes-navbar')\n if (navbar) {\n navbar.classList.remove('navbar--hidden')\n }\n}\n\nfunction createNavItem (\n label: string,\n onSelected: () => void,\n selected = false\n): NavbarMenuItem {\n return {\n label,\n onSelected () {\n showNavbar()\n return onSelected()\n },\n selected\n }\n}\n\nasync function createNavbarMenuItems (\n outliner: OutlineManager,\n subject: NamedNode,\n outlineView: HTMLElement | null,\n selectedPaneName?: string,\n selectedPaneUri?: string\n): Promise<NavbarMenuItem[]> {\n const webId = await loadProfileFromURI(subject)\n const selectedPane = selectedPaneName || (isWebIdUri(subject) ? 'profile' : undefined)\n\n const menuItems: NavbarMenuItem[] = []\n\n if (webId) {\n menuItems.push(\n createNavItem('Profile', async () => {\n const profilePane = await getProfilePaneFromURI(webId)\n outliner.GotoSubject(subject, true, profilePane, true, undefined, outlineView)\n }, selectedPane === 'profile'),\n createNavItem('Friends', async () => {\n const socialPane = await getSocialPaneFromURI(webId)\n outliner.GotoSubject(subject, true, socialPane, true, undefined, outlineView)\n }, selectedPane === 'social')\n )\n }\n\n const storagePanes = await getFolderPanesFromURI(subject)\n storagePanes.forEach(pane => {\n menuItems.push(\n createNavItem(\n pane.label(),\n async () => {\n outliner.GotoSubject(subject, true, pane, true, undefined, outlineView)\n },\n selectedPane === pane.paneName &&\n (selectedPaneUri ? selectedPaneUri === pane.subject.value : storagePanes.length === 1)\n )\n )\n })\n\n return menuItems\n}\n\nexport async function createNavbar (outliner: OutlineManager) {\n const existingNavbar = document.querySelector<HTMLElement>('solid-panes-navbar')\n\n if (existingNavbar) {\n existingNavbar.classList.remove('navbar--hidden')\n return existingNavbar\n }\n\n const OutlineView = document.getElementById('OutlineView')\n const mainContent = document.getElementById('MainContent')\n const tmpContainer = document.createElement('div')\n const uri = window.location.href\n const subject: NamedNode = typeof uri === 'string' ? store.sym(uri) : uri\n const selectedPaneName = window.history.state?.paneName\n const selectedPaneUri = window.history.state?.paneUri\n let menuItems = await createNavbarMenuItems(outliner, subject, OutlineView, selectedPaneName, selectedPaneUri).catch((err) => {\n console.error('Failed to build navbar menu items:', err)\n return []\n })\n\n function setSelectedItem (selectedItem: NavbarMenuItem) {\n menuItems = menuItems.map((menuItem) => ({\n ...menuItem,\n selected: menuItem === selectedItem\n }))\n }\n\n function handleSelectionChanged (event: Event) {\n const { detail: selectedItem } = event as CustomEvent<NavbarMenuItem>\n setSelectedItem(selectedItem)\n\n Promise.resolve(selectedItem.onSelected?.()).catch((error) => {\n console.error('Navbar menu item selection failed:', error)\n })\n\n renderNavbar()\n }\n\n function renderNavbar () {\n render(\n html`<solid-panes-navbar .navbarItems=${menuItems} @solid-ui-select=${handleSelectionChanged}></solid-panes-navbar>`,\n tmpContainer\n )\n }\n\n renderNavbar()\n\n const navbar = tmpContainer.firstElementChild as HTMLElement | null\n\n if (!navbar) {\n throw new Error('Failed to create nav bar')\n }\n\n if (mainContent) {\n mainContent.insertBefore(navbar, mainContent.firstChild)\n } else {\n document.body.prepend(navbar)\n }\n\n return navbar\n}\n"],"mappings":";;;;;;;;;AAcA,SAAS,IAAc;CACrB,IAAM,IAAS,SAAS,cAA2B,oBAAoB;CACvE,AAAI,KACF,EAAO,UAAU,OAAO,gBAAgB;AAE5C;AAEA,SAAS,EACP,GACA,GACA,IAAW,IACK;CAChB,OAAO;EACL;EACA,aAAc;GAEZ,OADA,EAAW,GACJ,EAAW;EACpB;EACA;CACF;AACF;AAEA,eAAe,EACb,GACA,GACA,GACA,GACA,GAC2B;CAC3B,IAAM,IAAQ,MAAM,EAAmB,CAAO,GACxC,IAAe,MAAqB,EAAW,CAAO,IAAI,YAAY,KAAA,IAEtE,IAA8B,CAAC;CAErC,AAAI,KACF,EAAU,KACR,EAAc,WAAW,YAAY;EACnC,IAAM,IAAc,MAAM,EAAsB,CAAK;EACrD,EAAS,YAAY,GAAS,IAAM,GAAa,IAAM,KAAA,GAAW,CAAW;CAC/E,GAAG,MAAiB,SAAS,GAC7B,EAAc,WAAW,YAAY;EACnC,IAAM,IAAa,MAAM,EAAqB,CAAK;EACnD,EAAS,YAAY,GAAS,IAAM,GAAY,IAAM,KAAA,GAAW,CAAW;CAC9E,GAAG,MAAiB,QAAQ,CAC9B;CAGF,IAAM,IAAe,MAAM,EAAsB,CAAO;CAcxD,OAbA,EAAa,SAAQ,MAAQ;EAC3B,EAAU,KACR,EACE,EAAK,MAAM,GACX,YAAY;GACV,EAAS,YAAY,GAAS,IAAM,GAAM,IAAM,KAAA,GAAW,CAAW;EACxE,GACA,MAAiB,EAAK,aACnB,IAAkB,MAAoB,EAAK,QAAQ,QAAQ,EAAa,WAAW,EACxF,CACF;CACF,CAAC,GAEM;AACT;AAEA,eAAsB,EAAc,GAA0B;CAC5D,IAAM,IAAiB,SAAS,cAA2B,oBAAoB;CAE/E,IAAI,GAEF,OADA,EAAe,UAAU,OAAO,gBAAgB,GACzC;CAGT,IAAM,IAAc,SAAS,eAAe,aAAa,GACnD,IAAc,SAAS,eAAe,aAAa,GACnD,IAAe,SAAS,cAAc,KAAK,GAC3C,IAAM,OAAO,SAAS,MACtB,IAAqB,OAAO,KAAQ,WAAW,EAAM,IAAI,CAAG,IAAI,GAChE,IAAmB,OAAO,QAAQ,OAAO,UACzC,IAAkB,OAAO,QAAQ,OAAO,SAC1C,IAAY,MAAM,EAAsB,GAAU,GAAS,GAAa,GAAkB,CAAe,CAAC,CAAC,OAAO,OACpH,QAAQ,MAAM,sCAAsC,CAAG,GAChD,CAAC,EACT;CAED,SAAS,EAAiB,GAA8B;EACtD,IAAY,EAAU,KAAK,OAAc;GACvC,GAAG;GACH,UAAU,MAAa;EACzB,EAAE;CACJ;CAEA,SAAS,EAAwB,GAAc;EAC7C,IAAM,EAAE,QAAQ,MAAiB;EAOjC,AANA,EAAgB,CAAY,GAE5B,QAAQ,QAAQ,EAAa,aAAa,CAAC,CAAC,CAAC,OAAO,MAAU;GAC5D,QAAQ,MAAM,sCAAsC,CAAK;EAC3D,CAAC,GAED,EAAa;CACf;CAEA,SAAS,IAAgB;EACvB,EACE,CAAI,oCAAoC,EAAU,oBAAoB,EAAuB,yBAC7F,CACF;CACF;CAEA,EAAa;CAEb,IAAM,IAAS,EAAa;CAE5B,IAAI,CAAC,GACH,MAAU,MAAM,0BAA0B;CAS5C,OANI,IACF,EAAY,aAAa,GAAQ,EAAY,UAAU,IAEvD,SAAS,KAAK,QAAQ,CAAM,GAGvB;AACT"}
1
+ {"version":3,"file":"navbar.esm.js","names":["showNavbar","refreshNavbarVisibility","readNavigationState","selectPaneInNavbar","selectNavbarPane","paneName","paneUri","createNavItem","onSelected","createNavbarMenuItems","selection","deriveNavbarSelection","view","isWebIdUri","store","menuItems","context","owner","navigation","isNavbarItemSelected","pane","createNavbar","existingNavbar","mainContent","tmpContainer","podContext","getPodContext","setSelectedItem","menuItem","selectedItem","handleSelectionChanged","event","error","renderNavbar","item","pickNavbarItem","navbar","rebuildRequest","stopListening","onNavigated","url","state","request","isSamePod","next","selectedItems","index"],"sources":["../../src/mainPage/navbar.ts"],"sourcesContent":["import { store } from 'solid-logic'\nimport { html, render } from 'lit-html'\nimport type { NavigationController } from '../navigation/controller'\nimport { isWebIdUri } from '../utils/webIdUtils'\nimport { deriveNavbarSelection, isNavbarItemSelected, pickNavbarItem } from '../navigation/chrome'\nimport { onNavigated } from '../navigation/events'\nimport { readNavigationState, type NavigationView } from '../navigation/state'\nimport { getPodContext, isSamePod, type PodContext } from '../navigation/podContext'\nimport { refreshNavbarVisibility } from '../navigation/navbarVisibility'\n\nimport '~icons/lucide/user'\nimport '~icons/lucide/users'\nimport '~icons/lucide/folder-open'\nimport '../components/navbar'\n\nimport type { NavbarMenuItem } from '../components/navbar/Navbar'\n\nfunction showNavbar () {\n return refreshNavbarVisibility(window.location.href, readNavigationState().viaAccountMenu)\n}\n\nlet selectPaneInNavbar: ((paneName: string, paneUri?: string) => void) | undefined\n\nexport function selectNavbarPane (paneName: string, paneUri?: string): void {\n selectPaneInNavbar?.(paneName, paneUri)\n}\n\nfunction createNavItem (\n label: string,\n paneName: string,\n paneUri: string,\n onSelected: () => void,\n selected = false\n): NavbarMenuItem {\n return {\n label,\n paneName,\n paneUri,\n async onSelected () {\n await showNavbar()\n return onSelected()\n },\n selected\n }\n}\n\n// The items offered for the pod the page is in. Choosing one displays that pane while the\n// page URL stays as it is.\nfunction createNavbarMenuItems (\n context: PodContext,\n navigation: NavigationController,\n view: NavigationView\n): NavbarMenuItem[] {\n const selection = deriveNavbarSelection(view, isWebIdUri(store.sym(window.location.href)))\n\n const menuItems: NavbarMenuItem[] = []\n\n if (context.owner) {\n const owner = context.owner\n menuItems.push(\n createNavItem('Profile', 'profile', owner, () => navigation.show({ kind: 'profile', subject: owner }),\n isNavbarItemSelected({ paneName: 'profile' }, selection, 0)),\n createNavItem('Friends', 'social', owner, () => navigation.show({ kind: 'friends', subject: owner }),\n isNavbarItemSelected({ paneName: 'social' }, selection, 0))\n )\n }\n\n context.storagePanes.forEach(pane => {\n menuItems.push(\n createNavItem(\n pane.label(),\n pane.paneName,\n pane.subject.value,\n () => navigation.show({ kind: 'storage', pane }),\n isNavbarItemSelected(\n { paneName: pane.paneName, paneUri: pane.subject.value },\n selection,\n context.storagePanes.length\n )\n )\n )\n })\n\n return menuItems\n}\n\nexport async function createNavbar (navigation: NavigationController) {\n const existingNavbar = document.querySelector<HTMLElement>('solid-panes-navbar')\n\n if (existingNavbar) {\n await showNavbar()\n return existingNavbar\n }\n\n const mainContent = document.getElementById('MainContent')\n const tmpContainer = document.createElement('div')\n let podContext = await getPodContext(window.location.href)\n let menuItems = createNavbarMenuItems(podContext, navigation, readNavigationState().view)\n\n function setSelectedItem (selectedItem: NavbarMenuItem) {\n menuItems = menuItems.map((menuItem) => ({\n ...menuItem,\n selected: menuItem === selectedItem\n }))\n }\n\n function handleSelectionChanged (event: Event) {\n const { detail: selectedItem } = event as CustomEvent<NavbarMenuItem>\n setSelectedItem(selectedItem)\n\n Promise.resolve(selectedItem.onSelected?.()).catch((error) => {\n console.error('Navbar menu item selection failed:', error)\n })\n\n renderNavbar()\n }\n\n function renderNavbar () {\n render(\n html`<solid-panes-navbar .navbarItems=${menuItems} @solid-ui-select=${handleSelectionChanged}></solid-panes-navbar>`,\n tmpContainer\n )\n }\n\n renderNavbar()\n\n selectPaneInNavbar = (paneName, paneUri) => {\n const item = pickNavbarItem(menuItems, paneName, paneUri)\n if (!item) return\n setSelectedItem(item)\n renderNavbar()\n }\n\n const navbar = tmpContainer.firstElementChild as HTMLElement | null\n\n if (!navbar) {\n throw new Error('Failed to create nav bar')\n }\n\n if (mainContent) {\n mainContent.insertBefore(navbar, mainContent.firstChild)\n } else {\n document.body.prepend(navbar)\n }\n\n await showNavbar()\n\n // The items belong to one pod. When a navigation (a link, back or forward) lands in another\n // pod, they would offer the wrong profile and storages, so build them again.\n let rebuildRequest = 0\n const stopListening = onNavigated(({ url, state }) => {\n if (!navbar.isConnected) return stopListening()\n\n refreshNavbarVisibility(url, state.viaAccountMenu)\n .catch(error => console.error('Failed to update navbar visibility:', error))\n\n const request = ++rebuildRequest\n getPodContext(url).then(next => {\n if (request !== rebuildRequest) return\n if (isSamePod(podContext, next)) {\n const selection = deriveNavbarSelection(state.view, isWebIdUri(store.sym(url)))\n const selectedItems = menuItems.map(menuItem => ({\n ...menuItem,\n selected: isNavbarItemSelected(menuItem, selection, podContext.storagePanes.length)\n }))\n if (selectedItems.some((item, index) => item.selected !== menuItems[index].selected)) {\n menuItems = selectedItems\n renderNavbar()\n }\n return\n }\n podContext = next\n menuItems = createNavbarMenuItems(next, navigation, state.view)\n renderNavbar()\n }).catch(error => console.error('Failed to rebuild the navbar for the new pod:', error))\n })\n\n return navbar\n}\n"],"mappings":";;;;;;;;;;;;;AAiBA,SAASA,IAAc;CACrB,OAAOC,EAAwB,OAAO,SAAS,MAAMC,EAAoB,CAAC,CAAC,cAAc;AAC3F;AAEA,IAAIC;AAEJ,SAAgBC,EAAkB,GAAkB,GAAwB;CAC1E,IAAqBC,GAAUC,CAAO;AACxC;AAEA,SAASC,EACP,GACA,GACA,GACA,GACA,IAAW,IACK;CAChB,OAAO;EACL;EACA;EACA;EACA,MAAM,aAAc;GAElB,OADA,MAAMP,EAAW,GACVQ,EAAW;EACpB;EACA;CACF;AACF;AAIA,SAASC,EACP,GACA,GACA,GACkB;CAClB,IAAMC,IAAYC,EAAsBC,GAAMC,EAAWC,EAAM,IAAI,OAAO,SAAS,IAAI,CAAC,CAAC,GAEnFC,IAA8B,CAAC;CAErC,IAAIC,EAAQ,OAAO;EACjB,IAAMC,IAAQD,EAAQ;EACtB,EAAU,KACRT,EAAc,WAAW,WAAWU,SAAaC,EAAW,KAAK;GAAE,MAAM;GAAW,SAASD;EAAM,CAAC,GAClGE,EAAqB,EAAE,UAAU,UAAU,GAAGT,GAAW,CAAC,CAAC,GAC7DH,EAAc,WAA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ACxD,AAAK4B,MACLP,EAAgBO,CAAI,GACpBD,EAAa;CACf;CAEA,IAAMG,IAASZ,EAAa;CAE5B,IAAI,CAACY,GACH,MAAU,MAAM,0BAA0B;CAS5C,AANIb,IACFA,EAAY,aAAaa,GAAQb,EAAY,UAAU,IAEvD,SAAS,KAAK,QAAQa,CAAM,GAG9B,MAAMpC,EAAW;CAIjB,IAAIqC,IAAiB,GACfC,IAAgBC,GAAa,EAAE,QAAK,eAAY;EACpD,IAAI,CAACH,EAAO,aAAa,OAAOE,EAAc;EAE9C,EAAwBE,GAAKC,EAAM,cAAc,CAAC,CAC/C,OAAM,MAAS,QAAQ,MAAM,uCAAuCT,CAAK,CAAC;EAE7E,IAAMU,IAAU,EAAEL;EAClB,EAAcG,CAAG,CAAC,CAAC,MAAK,MAAQ;GAC9B,IAAIE,MAAYL,GAChB;QAAIM,EAAUlB,GAAYmB,CAAI,GAAG;KAC/B,IAAMlC,IAAYC,EAAsB8B,EAAM,MAAM5B,EAAWC,EAAM,IAAI0B,CAAG,CAAC,CAAC,GACxEK,IAAgB9B,EAAU,KAAI,OAAa;MAC/C,GAAGa;MACH,UAAUT,EAAqBS,GAAUlB,GAAWe,EAAW,aAAa,MAAM;KACpF,EAAE;KACF,AAAIoB,EAAc,MAAM,GAAM,MAAUX,EAAK,aAAanB,EAAU+B,EAAM,CAAC,QAAQ,MACjF,IAAYD,GACZZ,EAAa;IAGjB,OAGA,AAFA,IAAaW,GACb,IAAYnC,EAAsBmC,GAAM1B,GAAYuB,EAAM,IAAI,GAC9DR,EAAa;GAHb;EAIF,CAAC,CAAC,CAAC,OAAM,MAAS,QAAQ,MAAM,iDAAiDD,CAAK,CAAC;CACzF,CAAC;CAED,OAAOI;AACT"}
@@ -0,0 +1,2 @@
1
+ const e=require("../_virtual/_rolldown/runtime.cjs.js"),t=require("./navbar.cjs.js"),n=require("../navigation/controller.cjs.js"),r=require("./profileHeading2.cjs.js");let i=require("pane-registry");i=e.__toESM(i);var a=new WeakMap;function o(e,o){let s=a.get(e);return s||(s=n.createNavigationController({store:o,outliner:e,byName:i.byName,effects:{selectNavbarPane:t.selectNavbarPane,refreshHeading:r.refreshProfileHeading}}),a.set(e,s)),s}exports.navigationFor=o;
2
+ //# sourceMappingURL=navigation.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.cjs.js","names":["createNavigationController","paneRegistry","refreshProfileHeading","require_runtime","require_navbar","require_controller","require_profileHeading","pane_registry","controllers","navigationFor","controller","outliner"],"sources":["../../src/mainPage/navigation.ts"],"sourcesContent":["import type { LiveStore } from 'rdflib'\nimport * as paneRegistry from 'pane-registry'\nimport type { OutlineManager } from '../outline/manager'\nimport { createNavigationController, type NavigationController } from '../navigation/controller'\nimport { selectNavbarPane } from './navbar'\nimport { refreshProfileHeading } from './profileHeading'\n\nconst controllers = new WeakMap<OutlineManager, NavigationController>()\n\n/** The page's navigation controller for an outliner, created on first use. */\nexport function navigationFor (outliner: OutlineManager, store: LiveStore): NavigationController {\n let controller = controllers.get(outliner)\n if (!controller) {\n controller = createNavigationController({\n store,\n outliner,\n byName: paneRegistry.byName,\n effects: { selectNavbarPane, refreshHeading: refreshProfileHeading }\n })\n controllers.set(outliner, controller)\n }\n return controller\n}\n"],"mappings":"A,sNAOA,IAAMQ,EAAc,IAAI,QAGxB,SAAgBC,EAAe,EAA0B,EAAwC,CAC/F,IAAIC,EAAaF,EAAY,IAAIG,CAAQ,EAUzC,OATKD,IACH,EAAaV,EAAAA,2BAA2B,CACtC,QACA,WACA,OAAQC,EAAa,OACrB,QAAS,CAAE,iBAAAG,EAAA,iBAAkB,eAAgBF,EAAAA,qBAAsB,CACrE,CAAC,EACDM,EAAY,IAAIG,EAAUD,CAAU,GAE/BA,CACT,C"}
@@ -0,0 +1,6 @@
1
+ import { LiveStore } from '../../node_modules/rdflib';
2
+ import { OutlineManager } from '../outline/manager';
3
+ import { NavigationController } from '../navigation/controller';
4
+ /** The page's navigation controller for an outliner, created on first use. */
5
+ export declare function navigationFor(outliner: OutlineManager, store: LiveStore): NavigationController;
6
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/mainPage/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAA8B,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAMhG,8EAA8E;AAC9E,wBAAgB,aAAa,CAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,GAAG,oBAAoB,CAY/F"}
@@ -0,0 +1,22 @@
1
+ import { selectNavbarPane as e } from "./navbar.esm.js";
2
+ import { createNavigationController as t } from "../navigation/controller.esm.js";
3
+ import { refreshProfileHeading as n } from "./profileHeading2.esm.js";
4
+ import * as r from "pane-registry";
5
+ //#region src/mainPage/navigation.ts
6
+ var i = /* @__PURE__ */ new WeakMap();
7
+ function a(a, o) {
8
+ let s = i.get(a);
9
+ return s || (s = t({
10
+ store: o,
11
+ outliner: a,
12
+ byName: r.byName,
13
+ effects: {
14
+ selectNavbarPane: e,
15
+ refreshHeading: n
16
+ }
17
+ }), i.set(a, s)), s;
18
+ }
19
+ //#endregion
20
+ export { a as navigationFor };
21
+
22
+ //# sourceMappingURL=navigation.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.esm.js","names":["paneRegistry","controllers","navigationFor","controller","outliner","createNavigationController","refreshProfileHeading"],"sources":["../../src/mainPage/navigation.ts"],"sourcesContent":["import type { LiveStore } from 'rdflib'\nimport * as paneRegistry from 'pane-registry'\nimport type { OutlineManager } from '../outline/manager'\nimport { createNavigationController, type NavigationController } from '../navigation/controller'\nimport { selectNavbarPane } from './navbar'\nimport { refreshProfileHeading } from './profileHeading'\n\nconst controllers = new WeakMap<OutlineManager, NavigationController>()\n\n/** The page's navigation controller for an outliner, created on first use. */\nexport function navigationFor (outliner: OutlineManager, store: LiveStore): NavigationController {\n let controller = controllers.get(outliner)\n if (!controller) {\n controller = createNavigationController({\n store,\n outliner,\n byName: paneRegistry.byName,\n effects: { selectNavbarPane, refreshHeading: refreshProfileHeading }\n })\n controllers.set(outliner, controller)\n }\n return controller\n}\n"],"mappings":";;;;;AAOA,IAAMC,oBAAc,IAAI,QAA8C;AAGtE,SAAgBC,EAAe,GAA0B,GAAwC;CAC/F,IAAIC,IAAaF,EAAY,IAAIG,CAAQ;CAUzC,OATKD,MACH,IAAaE,EAA2B;EACtC;EACA;EACA,QAAQL,EAAa;EACrB,SAAS;GAAE;GAAkB,gBAAgBM;EAAsB;CACrE,CAAC,GACDL,EAAY,IAAIG,GAAUD,CAAU,IAE/BA;AACT"}
@@ -0,0 +1,5 @@
1
+ export declare function refreshProfileHeading(force?: boolean): Promise<void>;
2
+ /** Put the heading where it belongs, above the navbar, after the navbar has been added. */
3
+ export declare function placeProfileHeading(): void;
4
+ export declare function initializeProfileHeading(): void;
5
+ //# sourceMappingURL=profileHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileHeading.d.ts","sourceRoot":"","sources":["../../src/mainPage/profileHeading.ts"],"names":[],"mappings":"AAOA,OAAO,+BAA+B,CAAA;AACtC,OAAO,sBAAsB,CAAA;AA6I7B,wBAAsB,qBAAqB,CAAE,KAAK,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAyFzE;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,IAAK,IAAI,CAE3C;AAED,wBAAgB,wBAAwB,IAAK,IAAI,CAqDhD"}
@@ -0,0 +1,2 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`#profile-heading-mount{margin-top:18px;margin-bottom:20px}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../utils/webIdUtils.cjs.js"),t=require("../navigation/chrome.cjs.js"),n=require("../navigation/podContext.cjs.js"),r=require("../navigation/state.cjs.js"),i=require("../navigation/events.cjs.js"),a=require("../components/profile-heading/profileHeadingData.cjs.js");require("../components/profile-heading/index.cjs.js");let o=require("solid-logic");var s=`solid-panes-profile-heading`,c=`profile-heading-mount`,l=0,u=!1,d=!1,f=!1,p,m=``,h=``,g=``,_=new WeakMap,v=new WeakMap;function y(e){if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||typeof e.animate!=`function`)return;let t=getComputedStyle(e),n=t.marginTop||`18px`,r=t.marginBottom||`20px`,i=e.animate([{height:`0px`,opacity:0,marginTop:`0px`,marginBottom:`0px`,overflow:`hidden`},{height:`${e.getBoundingClientRect().height}px`,opacity:1,marginTop:n,marginBottom:r,overflow:`hidden`}],{duration:300,easing:`ease`,fill:`both`});v.set(e,i);let a=()=>{v.get(e)===i&&(v.delete(e),i.cancel())};i.finished.then(a,t=>{v.get(e)===i&&(console.error(`Failed to animate profile heading appearance.`,t),a())})}function b(e){let t=_.get(e);_.delete(e),t?.cancel(),e.inert=!1,e.removeAttribute(`aria-hidden`)}function x(e){if(_.has(e))return;let t=getComputedStyle(e),n=e.getBoundingClientRect().height,r=t.opacity,i=t.marginTop,a=t.marginBottom,o=v.get(e);v.delete(e),o?.cancel();let s=()=>{e.hidden=!0,e.replaceChildren()};if(e.inert=!0,e.setAttribute(`aria-hidden`,`true`),e.hidden||!e.firstElementChild||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||typeof e.animate!=`function`){s();return}let c=e.animate([{height:`${n}px`,opacity:r,marginTop:i,marginBottom:a,overflow:`hidden`},{height:`0px`,opacity:0,marginTop:`0px`,marginBottom:`0px`,overflow:`hidden`}],{duration:300,easing:`ease`,fill:`forwards`});_.set(e,c),c.finished.then(()=>{_.get(e)===c&&(s(),_.delete(e),c.cancel())},t=>{_.get(e)===c&&(console.error(`Failed to animate profile heading disappearance.`,t),s(),_.delete(e),c.cancel())})}function S(){w(!0).catch(e=>{console.error(`Failed to refresh profile heading after an authentication change.`,e)})}function C(){let e=document.getElementById(`MainContent`);if(!e)return null;let t=document.getElementById(c);t||(t=document.createElement(`div`),t.id=c,t.setAttribute(`aria-label`,`Profile heading`));let n=document.querySelector(`solid-panes-navbar`),r=document.getElementById(`OutlineView`),i=n?.parentNode===e?n:r?.parentNode===e?r:null;return i&&t.nextSibling!==i?e.insertBefore(t,i):!i&&t.parentNode!==e&&e.appendChild(t),t}async function w(i=!1){await p;let c=await n.getPodContext(window.location.href),u=C();if(!u)return;i&&(l++,m=``,g=``);let{view:d,viaAccountMenu:f}=r.readNavigationState(),v=t.deriveHeading({view:d,viaAccountMenu:f,viewer:o.authn.currentUser()?.value,pageUrl:window.location.href,owner:c.owner,storageUris:c.storagePanes.map(e=>e.subject.value)});if(v.mode===`none`){l++,g=``,m=``,h=``,x(u);return}let{subjectUri:S}=v,T=v.mode===`full`;b(u);let E=`${v.paneName}:${S}`;if(E===m||E===g)return;let D=++l;g=E;let O,k,A,j;try{O=await e.loadProfileFromURI(o.store.sym(S)),k=a.presentProfile(O,o.store),j=T?await a.getViewerMode(O):`anonymous`,A=j===`owner`}catch(e){throw D===l&&(g=``),e}if(D!==l)return;let M=u.querySelector(s)||document.createElement(s);M.profileData=k;let N=o.authn.currentUser();M.friendSubject=T&&N&&!N.sameTerm(O)?O:void 0,M.editContext=A?{subject:O,profileData:k,viewerMode:j,onSaved:()=>w(!0)}:void 0,M.compact=!T;let P=u.hidden||!u.firstElementChild;u.hidden=!1,M.parentNode!==u&&u.replaceChildren(M),m=E,h=O.value,g=``,P&&(await M.updateComplete,D===l&&u.isConnected&&!u.hidden&&!_.has(u)&&y(u))}function T(){C()}function E(){C(),f||=(document.addEventListener(`profile-pane-saved`,e=>{if(!(e instanceof CustomEvent)||e.detail?.subjectUri!==h)return;let t=document.querySelector(`#${c} ${s}`);t&&e.detail.profileData?(l++,g=``,t.profileData=e.detail.profileData,t.editContext&&={...t.editContext,profileData:e.detail.profileData}):w(!0).catch(e=>{console.error(`Failed to refresh profile heading after saving profile information.`,e)})}),!0);let e=p??o.authn.checkUser().then(()=>void 0);p=e,d||=(o.authSession.events.on(`login`,S),o.authSession.events.on(`sessionRestore`,S),o.authSession.events.on(`logout`,S),o.authSession.events.on(`sessionChange`,S),o.authSession.events.on(`identityReplaced`,S),!0),u||=(i.onNavigated(()=>{w().catch(e=>{console.error(`Failed to refresh profile heading.`,e)})}),!0),e.then(()=>w(!0)).catch(e=>{console.error(`Failed to refresh profile heading.`,e)})}exports.initializeProfileHeading=E,exports.placeProfileHeading=T,exports.refreshProfileHeading=w;
2
+ //# sourceMappingURL=profileHeading2.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileHeading2.cjs.js","names":["getPodContext","readNavigationState","deriveHeading","authn","loadProfileFromURI","store","presentProfile","getViewerMode","require_webIdUtils","require_chrome","require_podContext","require_state","require_events","require_profileHeadingData","solid_logic","PROFILE_HEADING_TAG","PROFILE_HEADING_MOUNT_ID","refreshRequest","navigatedListenerRegistered","authListenersRegistered","profileSavedListenerRegistered","authReady","displayedPaneKey","displayedSubjectUri","loadingPaneKey","hideAnimations","showAnimations","showHeading","mount","style","marginTop","marginBottom","animation","finish","error","cancelHeadingHide","hideHeading","height","opacity","showing","refreshAfterAuthChange","refreshProfileHeading","ensureMountPoint","mainContent","navbar","outlineView","insertionPoint","pod","force","decision","pane","isProfilePane","paneKey","subjectUri","request","subject","profileData","canEdit","viewerMode","heading","viewer","appearing","placeProfileHeading","initializeProfileHeading","event","readiness"],"sources":["../../src/mainPage/profileHeading.ts"],"sourcesContent":["import { authn, authSession, store } from 'solid-logic'\nimport { NamedNode } from 'rdflib'\nimport type { ProfileDetails } from '../components/profile-heading/editor/sections/heading/types'\nimport type { ProfileHeadingEditContext } from '../components/profile-heading/ProfileHeading'\nimport { getViewerMode, presentProfile } from '../components/profile-heading/profileHeadingData'\nimport type { ViewerMode } from '../types'\nimport { loadProfileFromURI } from '../utils/webIdUtils'\nimport '../components/profile-heading'\nimport './profileHeading.css'\nimport { deriveHeading } from '../navigation/chrome'\nimport { getPodContext } from '../navigation/podContext'\nimport { onNavigated } from '../navigation/events'\nimport { readNavigationState } from '../navigation/state'\n\nconst PROFILE_HEADING_TAG = 'solid-panes-profile-heading'\nconst PROFILE_HEADING_MOUNT_ID = 'profile-heading-mount'\n\nlet refreshRequest = 0\nlet navigatedListenerRegistered = false\nlet authListenersRegistered = false\nlet profileSavedListenerRegistered = false\nlet authReady: Promise<void> | undefined\nlet displayedPaneKey = ''\nlet displayedSubjectUri = ''\nlet loadingPaneKey = ''\nconst hideAnimations = new WeakMap<HTMLElement, Animation>()\nconst showAnimations = new WeakMap<HTMLElement, Animation>()\n\nfunction showHeading (mount: HTMLElement): void {\n if (window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ||\n typeof mount.animate !== 'function') return\n\n const style = getComputedStyle(mount)\n const marginTop = style.marginTop || '18px'\n const marginBottom = style.marginBottom || '20px'\n const animation = mount.animate([\n { height: '0px', opacity: 0, marginTop: '0px', marginBottom: '0px', overflow: 'hidden' },\n {\n height: `${mount.getBoundingClientRect().height}px`,\n opacity: 1,\n marginTop,\n marginBottom,\n overflow: 'hidden'\n }\n ], { duration: 300, easing: 'ease', fill: 'both' })\n showAnimations.set(mount, animation)\n const finish = () => {\n if (showAnimations.get(mount) !== animation) return\n showAnimations.delete(mount)\n animation.cancel()\n }\n animation.finished.then(finish, (error: unknown) => {\n if (showAnimations.get(mount) !== animation) return\n console.error('Failed to animate profile heading appearance.', error)\n finish()\n })\n}\n\nfunction cancelHeadingHide (mount: HTMLElement): void {\n const animation = hideAnimations.get(mount)\n hideAnimations.delete(mount)\n animation?.cancel()\n mount.inert = false\n mount.removeAttribute('aria-hidden')\n}\n\nfunction hideHeading (mount: HTMLElement): void {\n if (hideAnimations.has(mount)) return\n\n const style = getComputedStyle(mount)\n const height = mount.getBoundingClientRect().height\n const opacity = style.opacity\n const marginTop = style.marginTop\n const marginBottom = style.marginBottom\n const showing = showAnimations.get(mount)\n showAnimations.delete(mount)\n showing?.cancel()\n\n const finish = () => {\n mount.hidden = true\n mount.replaceChildren()\n }\n mount.inert = true\n mount.setAttribute('aria-hidden', 'true')\n\n if (mount.hidden || !mount.firstElementChild ||\n window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ||\n typeof mount.animate !== 'function') {\n finish()\n return\n }\n\n const animation = mount.animate([\n {\n height: `${height}px`,\n opacity,\n marginTop,\n marginBottom,\n overflow: 'hidden'\n },\n { height: '0px', opacity: 0, marginTop: '0px', marginBottom: '0px', overflow: 'hidden' }\n ], { duration: 300, easing: 'ease', fill: 'forwards' })\n hideAnimations.set(mount, animation)\n animation.finished.then(() => {\n if (hideAnimations.get(mount) !== animation) return\n finish()\n hideAnimations.delete(mount)\n animation.cancel()\n }, (error: unknown) => {\n if (hideAnimations.get(mount) !== animation) return\n console.error('Failed to animate profile heading disappearance.', error)\n finish()\n hideAnimations.delete(mount)\n animation.cancel()\n })\n}\n\nfunction refreshAfterAuthChange (): void {\n refreshProfileHeading(true).catch((error: unknown) => {\n console.error('Failed to refresh profile heading after an authentication change.', error)\n })\n}\n\nfunction ensureMountPoint (): HTMLElement | null {\n const mainContent = document.getElementById('MainContent')\n if (!mainContent) return null\n\n let mount = document.getElementById(PROFILE_HEADING_MOUNT_ID)\n if (!mount) {\n mount = document.createElement('div')\n mount.id = PROFILE_HEADING_MOUNT_ID\n mount.setAttribute('aria-label', 'Profile heading')\n }\n\n const navbar = document.querySelector('solid-panes-navbar')\n const outlineView = document.getElementById('OutlineView')\n const insertionPoint = navbar?.parentNode === mainContent\n ? navbar\n : outlineView?.parentNode === mainContent\n ? outlineView\n : null\n if (insertionPoint && mount.nextSibling !== insertionPoint) {\n mainContent.insertBefore(mount, insertionPoint)\n } else if (!insertionPoint && mount.parentNode !== mainContent) {\n mainContent.appendChild(mount)\n }\n return mount\n}\n\nexport async function refreshProfileHeading (force = false): Promise<void> {\n await authReady\n\n const pod = await getPodContext(window.location.href)\n const mount = ensureMountPoint()\n if (!mount) return\n\n if (force) {\n refreshRequest++\n displayedPaneKey = ''\n loadingPaneKey = ''\n }\n\n const { view, viaAccountMenu } = readNavigationState()\n const decision = deriveHeading({\n view,\n viaAccountMenu,\n viewer: authn.currentUser()?.value,\n pageUrl: window.location.href,\n owner: pod.owner,\n storageUris: pod.storagePanes.map(pane => pane.subject.value)\n })\n\n if (decision.mode === 'none') {\n refreshRequest++\n loadingPaneKey = ''\n displayedPaneKey = ''\n displayedSubjectUri = ''\n hideHeading(mount)\n return\n }\n\n const { subjectUri } = decision\n const isProfilePane = decision.mode === 'full'\n cancelHeadingHide(mount)\n const paneKey = `${decision.paneName}:${subjectUri}`\n if (paneKey === displayedPaneKey || paneKey === loadingPaneKey) return\n\n const request = ++refreshRequest\n loadingPaneKey = paneKey\n let subject: NamedNode\n let profileData: ProfileDetails\n let canEdit: boolean\n let viewerMode: ViewerMode\n try {\n subject = await loadProfileFromURI(store.sym(subjectUri))\n profileData = presentProfile(subject, store)\n viewerMode = isProfilePane ? await getViewerMode(subject) : 'anonymous'\n canEdit = viewerMode === 'owner'\n } catch (error) {\n if (request === refreshRequest) loadingPaneKey = ''\n throw error\n }\n if (request !== refreshRequest) return\n\n const heading = (mount.querySelector(PROFILE_HEADING_TAG) ||\n document.createElement(PROFILE_HEADING_TAG)) as HTMLElement & {\n profileData?: ProfileDetails\n editContext?: ProfileHeadingEditContext\n friendSubject?: NamedNode\n compact?: boolean\n updateComplete?: Promise<unknown>\n }\n heading.profileData = profileData\n const viewer = authn.currentUser()\n heading.friendSubject = isProfilePane && viewer && !viewer.sameTerm(subject)\n ? subject\n : undefined\n heading.editContext = canEdit\n ? {\n subject,\n profileData,\n viewerMode,\n onSaved: () => refreshProfileHeading(true)\n }\n : undefined\n heading.compact = !isProfilePane\n const appearing = mount.hidden || !mount.firstElementChild\n mount.hidden = false\n if (heading.parentNode !== mount) mount.replaceChildren(heading)\n displayedPaneKey = paneKey\n displayedSubjectUri = subject.value\n loadingPaneKey = ''\n if (appearing) {\n await heading.updateComplete\n if (request === refreshRequest && mount.isConnected && !mount.hidden && !hideAnimations.has(mount)) {\n showHeading(mount)\n }\n }\n}\n\n/** Put the heading where it belongs, above the navbar, after the navbar has been added. */\nexport function placeProfileHeading (): void {\n ensureMountPoint()\n}\n\nexport function initializeProfileHeading (): void {\n ensureMountPoint()\n\n if (!profileSavedListenerRegistered) {\n document.addEventListener('profile-pane-saved', (event) => {\n if (!(event instanceof CustomEvent) || event.detail?.subjectUri !== displayedSubjectUri) return\n\n const heading = document.querySelector<HTMLElement & {\n profileData?: ProfileDetails\n editContext?: ProfileHeadingEditContext\n }>(`#${PROFILE_HEADING_MOUNT_ID} ${PROFILE_HEADING_TAG}`)\n if (heading && event.detail.profileData) {\n refreshRequest++\n loadingPaneKey = ''\n heading.profileData = event.detail.profileData\n if (heading.editContext) {\n heading.editContext = { ...heading.editContext, profileData: event.detail.profileData }\n }\n return\n }\n\n refreshProfileHeading(true).catch((error: unknown) => {\n console.error('Failed to refresh profile heading after saving profile information.', error)\n })\n })\n profileSavedListenerRegistered = true\n }\n\n const readiness = authReady ?? authn.checkUser().then(() => undefined)\n authReady = readiness\n\n if (!authListenersRegistered) {\n authSession.events.on('login', refreshAfterAuthChange)\n authSession.events.on('sessionRestore', refreshAfterAuthChange)\n authSession.events.on('logout', refreshAfterAuthChange)\n authSession.events.on('sessionChange', refreshAfterAuthChange)\n authSession.events.on('identityReplaced', refreshAfterAuthChange)\n authListenersRegistered = true\n }\n\n // Navigations the page's own navigation does not make, such as links and buttons in solid-ui\n if (!navigatedListenerRegistered) {\n onNavigated(() => {\n refreshProfileHeading().catch((error: unknown) => {\n console.error('Failed to refresh profile heading.', error)\n })\n })\n navigatedListenerRegistered = true\n }\n\n readiness.then(() => refreshProfileHeading(true)).catch((error: unknown) => {\n console.error('Failed to refresh profile heading.', error)\n })\n}\n"],"mappings":"A,gZAcA,IAAMe,EAAsB,8BACtBC,EA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AY,GAK1FvB,EAAsB,EAAI,CAAC,CAAC,MAAO,GAAmB,CACpD,QAAQ,MAAM,sEAAuEP,CAAK,CAC5F,CAAC,CACH,CAAC,EACgC,IAGnC,IAAM+B,EAAY5C,GAAalB,EAAAA,MAAM,UAAU,CAAC,CAAC,SAAW,IAAA,EAAS,EACrE,EAAY8D,EAEZ,AAME9C,KALAL,EAAA,YAAY,OAAO,GAAG,QAAS0B,CAAsB,EACrD1B,EAAA,YAAY,OAAO,GAAG,iBAAkB0B,CAAsB,EAC9D1B,EAAA,YAAY,OAAO,GAAG,SAAU0B,CAAsB,EACtD1B,EAAA,YAAY,OAAO,GAAG,gBAAiB0B,CAAsB,EAC7D1B,EAAA,YAAY,OAAO,GAAG,mBAAoB0B,CAAsB,EACtC,IAI5B,AAMEtB,KALAN,EAAA,gBAAkB,CAChB6B,EAAsB,CAAC,CAAC,MAAO,GAAmB,CAChD,QAAQ,MAAM,qCAAsCP,CAAK,CAC3D,CAAC,CACH,CAAC,EAC6B,IAGhC+B,EAAU,SAAWxB,EAAsB,EAAI,CAAC,CAAC,CAAC,MAAO,GAAmB,CAC1E,QAAQ,MAAM,qCAAsCP,CAAK,CAC3D,CAAC,CACH,C"}
@@ -0,0 +1,158 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`#profile-heading-mount{margin-top:18px;margin-bottom:20px}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { loadProfileFromURI as e } from "../utils/webIdUtils.esm.js";
2
+ import { deriveHeading as t } from "../navigation/chrome.esm.js";
3
+ import { getPodContext as n } from "../navigation/podContext.esm.js";
4
+ import { readNavigationState as r } from "../navigation/state.esm.js";
5
+ import { onNavigated as i } from "../navigation/events.esm.js";
6
+ import { getViewerMode as a, presentProfile as o } from "../components/profile-heading/profileHeadingData.esm.js";
7
+ import "../components/profile-heading/index.esm.js";
8
+
9
+ import { authSession as s, authn as c, store as l } from "solid-logic";
10
+ //#region src/mainPage/profileHeading.ts
11
+ var u = "solid-panes-profile-heading", d = "profile-heading-mount", f = 0, p = !1, m = !1, h = !1, g, _ = "", v = "", y = "", b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap();
12
+ function S(e) {
13
+ if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches || typeof e.animate != "function") return;
14
+ let t = getComputedStyle(e), n = t.marginTop || "18px", r = t.marginBottom || "20px", i = e.animate([{
15
+ height: "0px",
16
+ opacity: 0,
17
+ marginTop: "0px",
18
+ marginBottom: "0px",
19
+ overflow: "hidden"
20
+ }, {
21
+ height: `${e.getBoundingClientRect().height}px`,
22
+ opacity: 1,
23
+ marginTop: n,
24
+ marginBottom: r,
25
+ overflow: "hidden"
26
+ }], {
27
+ duration: 300,
28
+ easing: "ease",
29
+ fill: "both"
30
+ });
31
+ x.set(e, i);
32
+ let a = () => {
33
+ x.get(e) === i && (x.delete(e), i.cancel());
34
+ };
35
+ i.finished.then(a, (t) => {
36
+ x.get(e) === i && (console.error("Failed to animate profile heading appearance.", t), a());
37
+ });
38
+ }
39
+ function C(e) {
40
+ let t = b.get(e);
41
+ b.delete(e), t?.cancel(), e.inert = !1, e.removeAttribute("aria-hidden");
42
+ }
43
+ function w(e) {
44
+ if (b.has(e)) return;
45
+ let t = getComputedStyle(e), n = e.getBoundingClientRect().height, r = t.opacity, i = t.marginTop, a = t.marginBottom, o = x.get(e);
46
+ x.delete(e), o?.cancel();
47
+ let s = () => {
48
+ e.hidden = !0, e.replaceChildren();
49
+ };
50
+ if (e.inert = !0, e.setAttribute("aria-hidden", "true"), e.hidden || !e.firstElementChild || window.matchMedia?.("(prefers-reduced-motion: reduce)").matches || typeof e.animate != "function") {
51
+ s();
52
+ return;
53
+ }
54
+ let c = e.animate([{
55
+ height: `${n}px`,
56
+ opacity: r,
57
+ marginTop: i,
58
+ marginBottom: a,
59
+ overflow: "hidden"
60
+ }, {
61
+ height: "0px",
62
+ opacity: 0,
63
+ marginTop: "0px",
64
+ marginBottom: "0px",
65
+ overflow: "hidden"
66
+ }], {
67
+ duration: 300,
68
+ easing: "ease",
69
+ fill: "forwards"
70
+ });
71
+ b.set(e, c), c.finished.then(() => {
72
+ b.get(e) === c && (s(), b.delete(e), c.cancel());
73
+ }, (t) => {
74
+ b.get(e) === c && (console.error("Failed to animate profile heading disappearance.", t), s(), b.delete(e), c.cancel());
75
+ });
76
+ }
77
+ function T() {
78
+ D(!0).catch((e) => {
79
+ console.error("Failed to refresh profile heading after an authentication change.", e);
80
+ });
81
+ }
82
+ function E() {
83
+ let e = document.getElementById("MainContent");
84
+ if (!e) return null;
85
+ let t = document.getElementById(d);
86
+ t || (t = document.createElement("div"), t.id = d, t.setAttribute("aria-label", "Profile heading"));
87
+ let n = document.querySelector("solid-panes-navbar"), r = document.getElementById("OutlineView"), i = n?.parentNode === e ? n : r?.parentNode === e ? r : null;
88
+ return i && t.nextSibling !== i ? e.insertBefore(t, i) : !i && t.parentNode !== e && e.appendChild(t), t;
89
+ }
90
+ async function D(i = !1) {
91
+ await g;
92
+ let s = await n(window.location.href), d = E();
93
+ if (!d) return;
94
+ i && (f++, _ = "", y = "");
95
+ let { view: p, viaAccountMenu: m } = r(), h = t({
96
+ view: p,
97
+ viaAccountMenu: m,
98
+ viewer: c.currentUser()?.value,
99
+ pageUrl: window.location.href,
100
+ owner: s.owner,
101
+ storageUris: s.storagePanes.map((e) => e.subject.value)
102
+ });
103
+ if (h.mode === "none") {
104
+ f++, y = "", _ = "", v = "", w(d);
105
+ return;
106
+ }
107
+ let { subjectUri: x } = h, T = h.mode === "full";
108
+ C(d);
109
+ let O = `${h.paneName}:${x}`;
110
+ if (O === _ || O === y) return;
111
+ let k = ++f;
112
+ y = O;
113
+ let A, j, M, N;
114
+ try {
115
+ A = await e(l.sym(x)), j = o(A, l), N = T ? await a(A) : "anonymous", M = N === "owner";
116
+ } catch (e) {
117
+ throw k === f && (y = ""), e;
118
+ }
119
+ if (k !== f) return;
120
+ let P = d.querySelector(u) || document.createElement(u);
121
+ P.profileData = j;
122
+ let F = c.currentUser();
123
+ P.friendSubject = T && F && !F.sameTerm(A) ? A : void 0, P.editContext = M ? {
124
+ subject: A,
125
+ profileData: j,
126
+ viewerMode: N,
127
+ onSaved: () => D(!0)
128
+ } : void 0, P.compact = !T;
129
+ let I = d.hidden || !d.firstElementChild;
130
+ d.hidden = !1, P.parentNode !== d && d.replaceChildren(P), _ = O, v = A.value, y = "", I && (await P.updateComplete, k === f && d.isConnected && !d.hidden && !b.has(d) && S(d));
131
+ }
132
+ function O() {
133
+ E();
134
+ }
135
+ function k() {
136
+ E(), h ||= (document.addEventListener("profile-pane-saved", (e) => {
137
+ if (!(e instanceof CustomEvent) || e.detail?.subjectUri !== v) return;
138
+ let t = document.querySelector(`#${d} ${u}`);
139
+ t && e.detail.profileData ? (f++, y = "", t.profileData = e.detail.profileData, t.editContext &&= {
140
+ ...t.editContext,
141
+ profileData: e.detail.profileData
142
+ }) : D(!0).catch((e) => {
143
+ console.error("Failed to refresh profile heading after saving profile information.", e);
144
+ });
145
+ }), !0);
146
+ let e = g ?? c.checkUser().then(() => void 0);
147
+ g = e, m ||= (s.events.on("login", T), s.events.on("sessionRestore", T), s.events.on("logout", T), s.events.on("sessionChange", T), s.events.on("identityReplaced", T), !0), p ||= (i(() => {
148
+ D().catch((e) => {
149
+ console.error("Failed to refresh profile heading.", e);
150
+ });
151
+ }), !0), e.then(() => D(!0)).catch((e) => {
152
+ console.error("Failed to refresh profile heading.", e);
153
+ });
154
+ }
155
+ //#endregion
156
+ export { k as initializeProfileHeading, O as placeProfileHeading, D as refreshProfileHeading };
157
+
158
+ //# sourceMappingURL=profileHeading2.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileHeading2.esm.js","names":["PROFILE_HEADING_TAG","PROFILE_HEADING_MOUNT_ID","refreshRequest","navigatedListenerRegistered","authListenersRegistered","profileSavedListenerRegistered","authReady","displayedPaneKey","displayedSubjectUri","loadingPaneKey","hideAnimations","showAnimations","showHeading","mount","style","marginTop","marginBottom","animation","finish","error","cancelHeadingHide","hideHeading","height","opacity","showing","refreshAfterAuthChange","ensureMountPoint","mainContent","navbar","outlineView","insertionPoint","refreshProfileHeading","pod","getPodContext","force","readNavigationState","decision","deriveHeading","authn","pane","isProfilePane","paneKey","subjectUri","request","subject","profileData","canEdit","viewerMode","loadProfileFromURI","store","presentProfile","getViewerMode","heading","viewer","appearing","placeProfileHeading","initializeProfileHeading","event","readiness","authSession","onNavigated"],"sources":["../../src/mainPage/profileHeading.ts"],"sourcesContent":["import { authn, authSession, store } from 'solid-logic'\nimport { NamedNode } from 'rdflib'\nimport type { ProfileDetails } from '../components/profile-heading/editor/sections/heading/types'\nimport type { ProfileHeadingEditContext } from '../components/profile-heading/ProfileHeading'\nimport { getViewerMode, presentProfile } from '../components/profile-heading/profileHeadingData'\nimport type { ViewerMode } from '../types'\nimport { loadProfileFromURI } from '../utils/webIdUtils'\nimport '../components/profile-heading'\nimport './profileHeading.css'\nimport { deriveHeading } from '../navigation/chrome'\nimport { getPodContext } from '../navigation/podContext'\nimport { onNavigated } from '../navigation/events'\nimport { readNavigationState } from '../navigation/state'\n\nconst PROFILE_HEADING_TAG = 'solid-panes-profile-heading'\nconst PROFILE_HEADING_MOUNT_ID = 'profile-heading-mount'\n\nlet refreshRequest = 0\nlet navigatedListenerRegistered = false\nlet authListenersRegistered = false\nlet profileSavedListenerRegistered = false\nlet authReady: Promise<void> | undefined\nlet displayedPaneKey = ''\nlet displayedSubjectUri = ''\nlet loadingPaneKey = ''\nconst hideAnimations = new WeakMap<HTMLElement, Animation>()\nconst showAnimations = new WeakMap<HTMLElement, Animation>()\n\nfunction showHeading (mount: HTMLElement): void {\n if (window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ||\n typeof mount.animate !== 'function') return\n\n const style = getComputedStyle(mount)\n const marginTop = style.marginTop || '18px'\n const marginBottom = style.marginBottom || '20px'\n const animation = mount.animate([\n { height: '0px', opacity: 0, marginTop: '0px', marginBottom: '0px', overflow: 'hidden' },\n {\n height: `${mount.getBoundingClientRect().height}px`,\n opacity: 1,\n marginTop,\n marginBottom,\n overflow: 'hidden'\n }\n ], { duration: 300, easing: 'ease', fill: 'both' })\n showAnimations.set(mount, animation)\n const finish = () => {\n if (showAnimations.get(mount) !== animation) return\n showAnimations.delete(mount)\n animation.cancel()\n }\n animation.finished.then(finish, (error: unknown) => {\n if (showAnimations.get(mount) !== animation) return\n console.error('Failed to animate profile heading appearance.', error)\n finish()\n })\n}\n\nfunction cancelHeadingHide (mount: HTMLElement): void {\n const animation = hideAnimations.get(mount)\n hideAnimations.delete(mount)\n animation?.cancel()\n mount.inert = false\n mount.removeAttribute('aria-hidden')\n}\n\nfunction hideHeading (mount: HTMLElement): void {\n if (hideAnimations.has(mount)) return\n\n const style = getComputedStyle(mount)\n const height = mount.getBoundingClientRect().height\n const opacity = style.opacity\n const marginTop = style.marginTop\n const marginBottom = style.marginBottom\n const showing = showAnimations.get(mount)\n showAnimations.delete(mount)\n showing?.cancel()\n\n const finish = () => {\n mount.hidden = true\n mount.replaceChildren()\n }\n mount.inert = true\n mount.setAttribute('aria-hidden', 'true')\n\n if (mount.hidden || !mount.firstElementChild ||\n window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ||\n typeof mount.animate !== 'function') {\n finish()\n return\n }\n\n const animation = mount.animate([\n {\n height: `${height}px`,\n opacity,\n marginTop,\n marginBottom,\n overflow: 'hidden'\n },\n { height: '0px', opacity: 0, marginTop: '0px', marginBottom: '0px', overflow: 'hidden' }\n ], { duration: 300, easing: 'ease', fill: 'forwards' })\n hideAnimations.set(mount, animation)\n animation.finished.then(() => {\n if (hideAnimations.get(mount) !== animation) return\n finish()\n hideAnimations.delete(mount)\n animation.cancel()\n }, (error: unknown) => {\n if (hideAnimations.get(mount) !== animation) return\n console.error('Failed to animate profile heading disappearance.', error)\n finish()\n hideAnimations.delete(mount)\n animation.cancel()\n })\n}\n\nfunction refreshAfterAuthChange (): void {\n refreshProfileHeading(true).catch((error: unknown) => {\n console.error('Failed to refresh profile heading after an authentication change.', error)\n })\n}\n\nfunction ensureMountPoint (): HTMLElement | null {\n const mainContent = document.getElementById('MainContent')\n if (!mainContent) return null\n\n let mount = document.getElementById(PROFILE_HEADING_MOUNT_ID)\n if (!mount) {\n mount = document.createElement('div')\n mount.id = PROFILE_HEADING_MOUNT_ID\n mount.setAttribute('aria-label', 'Profile heading')\n }\n\n const navbar = document.querySelector('solid-panes-navbar')\n const outlineView = document.getElementById('OutlineView')\n const insertionPoint = navbar?.parentNode === mainContent\n ? navbar\n : outlineView?.parentNode === mainContent\n ? outlineView\n : null\n if (insertionPoint && mount.nextSibling !== insertionPoint) {\n mainContent.insertBefore(mount, insertionPoint)\n } else if (!insertionPoint && mount.parentNode !== mainContent) {\n mainContent.appendChild(mount)\n }\n return mount\n}\n\nexport async function refreshProfileHeading (force = false): Promise<void> {\n await authReady\n\n const pod = await getPodContext(window.location.href)\n const mount = ensureMountPoint()\n if (!mount) return\n\n if (force) {\n refreshRequest++\n displayedPaneKey = ''\n loadingPaneKey = ''\n }\n\n const { view, viaAccountMenu } = readNavigationState()\n const decision = deriveHeading({\n view,\n viaAccountMenu,\n viewer: authn.currentUser()?.value,\n pageUrl: window.location.href,\n owner: pod.owner,\n storageUris: pod.storagePanes.map(pane => pane.subject.value)\n })\n\n if (decision.mode === 'none') {\n refreshRequest++\n loadingPaneKey = ''\n displayedPaneKey = ''\n displayedSubjectUri = ''\n hideHeading(mount)\n return\n }\n\n const { subjectUri } = decision\n const isProfilePane = decision.mode === 'full'\n cancelHeadingHide(mount)\n const paneKey = `${decision.paneName}:${subjectUri}`\n if (paneKey === displayedPaneKey || paneKey === loadingPaneKey) return\n\n const request = ++refreshRequest\n loadingPaneKey = paneKey\n let subject: NamedNode\n let profileData: ProfileDetails\n let canEdit: boolean\n let viewerMode: ViewerMode\n try {\n subject = await loadProfileFromURI(store.sym(subjectUri))\n profileData = presentProfile(subject, store)\n viewerMode = isProfilePane ? await getViewerMode(subject) : 'anonymous'\n canEdit = viewerMode === 'owner'\n } catch (error) {\n if (request === refreshRequest) loadingPaneKey = ''\n throw error\n }\n if (request !== refreshRequest) return\n\n const heading = (mount.querySelector(PROFILE_HEADING_TAG) ||\n document.createElement(PROFILE_HEADING_TAG)) as HTMLElement & {\n profileData?: ProfileDetails\n editContext?: ProfileHeadingEditContext\n friendSubject?: NamedNode\n compact?: boolean\n updateComplete?: Promise<unknown>\n }\n heading.profileData = profileData\n const viewer = authn.currentUser()\n heading.friendSubject = isProfilePane && viewer && !viewer.sameTerm(subject)\n ? subject\n : undefined\n heading.editContext = canEdit\n ? {\n subject,\n profileData,\n viewerMode,\n onSaved: () => refreshProfileHeading(true)\n }\n : undefined\n heading.compact = !isProfilePane\n const appearing = mount.hidden || !mount.firstElementChild\n mount.hidden = false\n if (heading.parentNode !== mount) mount.replaceChildren(heading)\n displayedPaneKey = paneKey\n displayedSubjectUri = subject.value\n loadingPaneKey = ''\n if (appearing) {\n await heading.updateComplete\n if (request === refreshRequest && mount.isConnected && !mount.hidden && !hideAnimations.has(mount)) {\n showHeading(mount)\n }\n }\n}\n\n/** Put the heading where it belongs, above the navbar, after the navbar has been added. */\nexport function placeProfileHeading (): void {\n ensureMountPoint()\n}\n\nexport function initializeProfileHeading (): void {\n ensureMountPoint()\n\n if (!profileSavedListenerRegistered) {\n document.addEventListener('profile-pane-saved', (event) => {\n if (!(event instanceof CustomEvent) || event.detail?.subjectUri !== displayedSubjectUri) return\n\n const heading = document.querySelector<HTMLElement & {\n profileData?: ProfileDetails\n editContext?: ProfileHeadingEditContext\n }>(`#${PROFILE_HEADING_MOUNT_ID} ${PROFILE_HEADING_TAG}`)\n if (heading && event.detail.profileData) {\n refreshRequest++\n loadingPaneKey = ''\n heading.profileData = event.detail.profileData\n if (heading.editContext) {\n heading.editContext = { ...heading.editContext, profileData: event.detail.profileData }\n }\n return\n }\n\n refreshProfileHeading(true).catch((error: unknown) => {\n console.error('Failed to refresh profile heading after saving profile information.', error)\n })\n })\n profileSavedListenerRegistered = true\n }\n\n const readiness = authReady ?? authn.checkUser().then(() => undefined)\n authReady = readiness\n\n if (!authListenersRegistered) {\n authSession.events.on('login', refreshAfterAuthChange)\n authSession.events.on('sessionRestore', refreshAfterAuthChange)\n authSession.events.on('logout', refreshAfterAuthChange)\n authSession.events.on('sessionChange', refreshAfterAuthChange)\n authSession.events.on('identityReplaced', refreshAfterAuthChange)\n authListenersRegistered = true\n }\n\n // Navigations the page's own navigation does not make, such as links and buttons in solid-ui\n if (!navigatedListenerRegistered) {\n onNavigated(() => {\n refreshProfileHeading().catch((error: unknown) => {\n console.error('Failed to refresh profile heading.', error)\n })\n })\n navigatedListenerRegistered = true\n }\n\n readiness.then(() => refreshProfileHeading(true)).catch((error: unknown) => {\n console.error('Failed to refresh profile heading.', error)\n })\n}\n"],"mappings":";;;;;;;;;;AAcA,IAAMA,IAAsB,+BACtBC,IAA2B,yBAE7BC,IAAiB,GACjBC,IAA8B,IAC9BC,IAA0B,IAC1BC,IAAiC,IACjCC,GACAC,IAAmB,IACnBC,IAAsB,IACtBC,IAAiB,IACfC,oBAAiB,IAAI,QAAgC,GACrDC,oBAAiB,IAAI,QAAgC;AAE3D,SAASC,EAAa,GAA0B;CAC9C,IAAI,OAAO,aAAa,kCAAkC,CAAC,CAAC,WACxD,OAAOC,EAAM,WAAY,YAAY;CAEzC,IAAMC,IAAQ,iBAAiBD,CAAK,GAC9BE,IAAYD,EAAM,aAAa,QAC/BE,IAAeF,EAAM,gBAAgB,QACrCG,IAAYJ,EAAM,QAAQ,CAC9B;EAAE,QAAQ;EAAO,SAAS;EAAG,WAAW;EAAO,cAAc;EAAO,UAAU;CAAS,GACvF;EACE,QAAQ,GAAGA,EAAM,sBAAsB,CAAC,CAAC,OAAO;EAChD,SAAS;EACT;EACA;EACA,UAAU;CACZ,CACF,GAAG;EAAE,UAAU;EAAK,QAAQ;EAAQ,MAAM;CAAO,CAAC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W3B,EAAsB,EAAI,CAAC,CAAC,CAAC,OAAO,MAAmB;EAC1E,QAAQ,MAAM,sCAAsCZ,CAAK;CAC3D,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"n3Pane2.cjs.js","names":[],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './n3Pane.css'\nimport './components/editor-card'\n\nconst ns = UI.ns\n\ntype N3PaneLike = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const n3Pane: N3PaneLike = {\n icon: UI.icons.originalIconBase + 'w3c/n3_smaller.png',\n\n name: 'n3',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'Data (' + n + ') as N3'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'n3-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[] // @@ slow with current store!\n\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToN3(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'text/n3'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":"mNAaA,IAAM,EAAK,EAAG,GAUD,EAAqB,CAChC,KAAM,EAAG,MAAM,iBAAmB,qBAElC,KAAM,KAEN,SAAU,CAAC,EAAG,MAAM,WAAW,CAAC,EAEhC,MAAO,SAAU,EAAoB,EAA4C,CAC/E,IAAM,EAAQ,EAAQ,QAAQ,MAC9B,GACE,kDACA,EAAM,aAAa,CAAO,EAE1B,OAAO,KAET,IAAM,EAAI,EAAM,mBAAmB,IAAA,GAAW,IAAA,GAAW,IAAA,GAAW,CAAO,CAAC,CACzE,OAEH,OADI,IAAM,EAAU,KACb,SAAW,EAAI,SACxB,EAEA,OAAQ,SACN,EACA,EACgB,CAChB,IAAM,EAAa,EAAQ,IACrB,EAAK,EAAQ,QAAQ,MAErB,EAAM,EAAW,cAAc,KAAK,EAC1C,EAAI,aAAa,QAAS,SAAS,EAInC,IAAM,EAAa,EAAG,mBACpB,IAAA,GACA,IAAA,GACA,IAAA,GACA,CACF,EAEM,EAAK,EAAK,WAAW,CAAE,EAC7B,EAAG,kBAAkB,EAAG,UAAU,EAClC,EAAG,QAAQ,EAAQ,GAAG,EACtB,IAAM,EAAoB,EAAG,eAAe,CAAU,EAChD,EAAS,EAAW,cAAc,yBAAyB,EAQjE,MAJA,GAAO,YAAc,UACrB,EAAO,QAAU,EAEjB,EAAI,YAAY,CAAM,EACf,CACT,CACF"}
1
+ {"version":3,"file":"n3Pane2.cjs.js","names":["UI","$rdf","require_runtime","solid_ui","rdflib","ns","n3Pane","store","context","subject","n","myDocument","kb","div","statements","sz","serializedContent","source"],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './n3Pane.css'\nimport './components/editor-card'\n\nconst ns = UI.ns\n\ntype N3PaneLike = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const n3Pane: N3PaneLike = {\n icon: UI.icons.originalIconBase + 'w3c/n3_smaller.png',\n\n name: 'n3',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'Data (' + n + ') as N3'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'n3-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[] // @@ slow with current store!\n\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToN3(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'text/n3'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":"A,mNAaA,IAAMK,EAAKL,EAAG,GAUDM,EAAqB,CAChC,KAAMN,EAAG,MAAM,iBAAmB,qBAElC,KAAM,KAEN,SAAU,CAACK,EAAG,MAAM,WAAW,CAAC,EAEhC,MAAO,SAAU,EAAoB,EAA4C,CAC/E,IAAME,EAAQC,EAAQ,QAAQ,MAC9B,GACE,kDACAD,EAAM,aAAaE,CAAO,EAE1B,OAAO,KAET,IAAMC,EAAIH,EAAM,mBAAmB,IAAA,GAAW,IAAA,GAAW,IAAA,GAAWE,CAAO,CAAC,CACzE,OAEH,OADIC,IAAM,EAAU,KACb,SAAWA,EAAI,SACxB,EAEA,OAAQ,SACN,EACA,EACgB,CAChB,IAAMC,EAAaH,EAAQ,IACrBI,EAAKJ,EAAQ,QAAQ,MAErBK,EAAMF,EAAW,cAAc,KAAK,EAC1CE,EAAI,aAAa,QAAS,SAAS,EAInC,IAAMC,EAAaF,EAAG,mBACpB,IAAA,GACA,IAAA,GACA,IAAA,GACAH,CACF,EAEMM,EAAKd,EAAK,WAAWW,CAAE,EAC7BG,EAAG,kBAAkBH,EAAG,UAAU,EAClCG,EAAG,QAAQN,EAAQ,GAAG,EACtB,IAAMO,EAAoBD,EAAG,eAAeD,CAAU,EAChDG,EAASN,EAAW,cAAc,yBAAyB,EAQjE,MAJA,GAAO,YAAc,UACrB,EAAO,QAAUK,EAEjBH,EAAI,YAAYI,CAAM,EACfJ,CACT,CACF,E"}
@@ -1 +1 @@
1
- {"version":3,"file":"n3Pane2.esm.js","names":[],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './n3Pane.css'\nimport './components/editor-card'\n\nconst ns = UI.ns\n\ntype N3PaneLike = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const n3Pane: N3PaneLike = {\n icon: UI.icons.originalIconBase + 'w3c/n3_smaller.png',\n\n name: 'n3',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'Data (' + n + ') as N3'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'n3-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[] // @@ slow with current store!\n\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToN3(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'text/n3'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":";;;;;AAaA,IAAM,IAAK,EAAG,IAUD,IAAqB;CAChC,MAAM,EAAG,MAAM,mBAAmB;CAElC,MAAM;CAEN,UAAU,CAAC,EAAG,MAAM,WAAW,CAAC;CAEhC,OAAO,SAAU,GAAoB,GAA4C;EAC/E,IAAM,IAAQ,EAAQ,QAAQ;EAC9B,IACE,mDACA,EAAM,aAAa,CAAO,GAE1B,OAAO;EAET,IAAM,IAAI,EAAM,mBAAmB,KAAA,GAAW,KAAA,GAAW,KAAA,GAAW,CAAO,CAAC,CACzE;EAEH,OADI,MAAM,IAAU,OACb,WAAW,IAAI;CACxB;CAEA,QAAQ,SACN,GACA,GACgB;EAChB,IAAM,IAAa,EAAQ,KACrB,IAAK,EAAQ,QAAQ,OAErB,IAAM,EAAW,cAAc,KAAK;EAC1C,EAAI,aAAa,SAAS,SAAS;EAInC,IAAM,IAAa,EAAG,mBACpB,KAAA,GACA,KAAA,GACA,KAAA,GACA,CACF,GAEM,IAAK,EAAK,WAAW,CAAE;EAE7B,AADA,EAAG,kBAAkB,EAAG,UAAU,GAClC,EAAG,QAAQ,EAAQ,GAAG;EACtB,IAAM,IAAoB,EAAG,eAAe,CAAU,GAChD,IAAS,EAAW,cAAc,yBAAyB;EAQjE,OAJA,EAAO,cAAc,WACrB,EAAO,UAAU,GAEjB,EAAI,YAAY,CAAM,GACf;CACT;AACF"}
1
+ {"version":3,"file":"n3Pane2.esm.js","names":["ns","UI","$rdf","ns$1","n3Pane","store","context","subject","n","myDocument","kb","div","statements","sz","serializedContent","source"],"sources":["../src/n3Pane.ts"],"sourcesContent":["/* Notation3 content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './n3Pane.css'\nimport './components/editor-card'\n\nconst ns = UI.ns\n\ntype N3PaneLike = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const n3Pane: N3PaneLike = {\n icon: UI.icons.originalIconBase + 'w3c/n3_smaller.png',\n\n name: 'n3',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'Data (' + n + ') as N3'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'n3-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[] // @@ slow with current store!\n\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToN3(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'text/n3'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":";;;;;AAaA,IAAMA,IAAKC,EAAG,IAUDG,IAAqB;CAChC,MAAMH,EAAG,MAAM,mBAAmB;CAElC,MAAM;CAEN,UAAU,CAACD,EAAG,MAAM,WAAW,CAAC;CAEhC,OAAO,SAAU,GAAoB,GAA4C;EAC/E,IAAMK,IAAQC,EAAQ,QAAQ;EAC9B,IACE,mDACAD,EAAM,aAAaE,CAAO,GAE1B,OAAO;EAET,IAAMC,IAAIH,EAAM,mBAAmB,KAAA,GAAW,KAAA,GAAW,KAAA,GAAWE,CAAO,CAAC,CACzE;EAEH,OADIC,MAAM,IAAU,OACb,WAAWA,IAAI;CACxB;CAEA,QAAQ,SACN,GACA,GACgB;EAChB,IAAMC,IAAaH,EAAQ,KACrBI,IAAKJ,EAAQ,QAAQ,OAErBK,IAAMF,EAAW,cAAc,KAAK;EAC1C,EAAI,aAAa,SAAS,SAAS;EAInC,IAAMG,IAAaF,EAAG,mBACpB,KAAA,GACA,KAAA,GACA,KAAA,GACAH,CACF,GAEMM,IAAKX,EAAK,WAAWQ,CAAE;EAE7B,AADAG,EAAG,kBAAkBH,EAAG,UAAU,GAClCG,EAAG,QAAQN,EAAQ,GAAG;EACtB,IAAMO,IAAoBD,EAAG,eAAeD,CAAU,GAChDG,IAASN,EAAW,cAAc,yBAAyB;EAQjE,OAJA,EAAO,cAAc,WACrB,EAAO,UAAUK,GAEjBH,EAAI,YAAYI,CAAM,GACfJ;CACT;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./state.cjs.js");var t,n=!1;function r(){return n}function i(e){console.error(`Failed to show the page after browser navigation.`,e)}function a(r){if(t=r,n)return;n=!0;let a=()=>(e.clearPaneState(),(t?.show({kind:`restore`,forceHeading:!0})??Promise.resolve()).catch(i)),o=window.navigation;o?(o.addEventListener(`navigate`,e=>{e.canIntercept&&e.userInitiated&&e.navigationType===`replace`&&e.destination.url===window.location.href&&e.intercept({scroll:`manual`,focusReset:`manual`,handler:a})}),o.addEventListener(`currententrychange`,e=>{e.navigationType===`traverse`&&a()})):window.addEventListener(`popstate`,()=>{a()})}exports.isHandlingBrowserNavigation=r,exports.registerBrowserNavigation=a;
2
+ //# sourceMappingURL=browserEvents.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browserEvents.cjs.js","names":["require_state","navigation","listenersRegistered","isHandlingBrowserNavigation","reportError","error","registerBrowserNavigation","controller","showUrl","navigationApi","event"],"sources":["../../src/navigation/browserEvents.ts"],"sourcesContent":["/*\n * What the page does when the browser changes the URL or the history entry without reloading.\n *\n * Like a reload, both cases show what the URL is, not what the entry last displayed through the\n * navbar or the account menu:\n * - Enter on the current URL (typically one ending in #me)\n * - back and forward\n */\n\nimport type { NavigationController } from './controller'\nimport { clearPaneState } from './state'\n\ninterface NavigationEvent extends Event {\n canIntercept: boolean\n userInitiated: boolean\n navigationType: string\n destination: { url: string }\n intercept: (options: { handler: () => Promise<void>, scroll: 'manual', focusReset: 'manual' }) => void\n}\n\ninterface NavigationApi {\n addEventListener: (type: 'navigate' | 'currententrychange', listener: (event: NavigationEvent) => void) => void\n}\n\nlet navigation: NavigationController | undefined\nlet listenersRegistered = false\n\n/**\n * Whether the main page handles back and forward itself. Packages that used to re-render on\n * `popstate` (mashlib) ask this and leave it to the main page.\n */\nexport function isHandlingBrowserNavigation (): boolean {\n return listenersRegistered\n}\n\nfunction reportError (error: unknown) {\n console.error('Failed to show the page after browser navigation.', error)\n}\n\n/**\n * Starts handling Enter, back and forward for a controller. The listeners are added once;\n * calling this again only changes which controller they use.\n *\n * The Navigation API is used where the browser has it; the places that fall back to an older\n * mechanism are marked NAVIGATION API FALLBACK. See \"Browser support\" in docs/navigation-design.md.\n */\nexport function registerBrowserNavigation (controller: NavigationController): void {\n navigation = controller\n if (listenersRegistered) return\n listenersRegistered = true\n\n const showUrl = () => {\n clearPaneState()\n return (navigation?.show({ kind: 'restore', forceHeading: true }) ?? Promise.resolve()).catch(reportError)\n }\n\n const navigationApi = (window as unknown as { navigation?: NavigationApi }).navigation\n if (!navigationApi) {\n // NAVIGATION API FALLBACK (Firefox before 147, Safari before 26.2, older Chromium).\n // Back and forward use `popstate`, which cannot tell them from in-page `#` links, so a\n // fragment link also re-renders the page. Enter on the current URL is not handled at all\n // here: without a fragment the browser reloads the page, and `initMainPage` shows the URL.\n window.addEventListener('popstate', () => { showUrl() })\n return\n }\n\n // NAVIGATION API: Enter on the current URL (typically one ending in #me) is a same-URL\n // \"replace\" navigation; intercepting it shows the URL without reloading. Without the API\n // there is no equivalent, see the fallback above.\n navigationApi.addEventListener('navigate', event => {\n if (!event.canIntercept || !event.userInitiated || event.navigationType !== 'replace' ||\n event.destination.url !== window.location.href) return\n\n event.intercept({\n scroll: 'manual',\n focusReset: 'manual',\n handler: showUrl\n })\n })\n\n // NAVIGATION API: unlike the `popstate` fallback above, this does not fire for in-page\n // fragment links.\n navigationApi.addEventListener('currententrychange', event => {\n if (event.navigationType === 'traverse') showUrl()\n })\n}\n"],"mappings":"A,kCAwBA,IAAIC,EACAC,EAAsB,GAM1B,SAAgBC,GAAwC,CACtD,OAAOD,CACT,CAEA,SAASE,EAAa,EAAgB,CACpC,QAAQ,MAAM,oDAAqDC,CAAK,CAC1E,CASA,SAAgBC,EAA2B,EAAwC,CAEjF,GADA,EAAaC,EACTL,EAAqB,OACzB,EAAsB,GAEtB,IAAMM,OACJR,EAAA,eAAe,GACPC,GAAY,KAAK,CAAE,KAAM,UAAW,aAAc,EAAK,CAAC,GAAK,QAAQ,QAAQ,EAAA,CAAG,MAAMG,CAAW,GAGrGK,EAAiB,OAAqD,WACvEA,GAYLA,EAAc,iBAAiB,WAAY,GAAS,CAC7CC,EAAM,cAAiBA,EAAM,eAAiBA,EAAM,iBAAmB,WACxEA,EAAM,YAAY,MAAQ,OAAO,SAAS,MAE9CA,EAAM,UAAU,CACd,OAAQ,SACR,WAAY,SACZ,QAASF,CACX,CAAC,CACH,CAAC,EAIDC,EAAc,iBAAiB,qBAAsB,GAAS,CACxDC,EAAM,iBAAmB,YAAYF,EAAQ,CACnD,CAAC,GAtBC,OAAO,iBAAiB,eAAkB,CAAEA,EAAQ,CAAE,CAAC,CAuB3D,C"}
@@ -0,0 +1,15 @@
1
+ import { NavigationController } from './controller';
2
+ /**
3
+ * Whether the main page handles back and forward itself. Packages that used to re-render on
4
+ * `popstate` (mashlib) ask this and leave it to the main page.
5
+ */
6
+ export declare function isHandlingBrowserNavigation(): boolean;
7
+ /**
8
+ * Starts handling Enter, back and forward for a controller. The listeners are added once;
9
+ * calling this again only changes which controller they use.
10
+ *
11
+ * The Navigation API is used where the browser has it; the places that fall back to an older
12
+ * mechanism are marked NAVIGATION API FALLBACK. See "Browser support" in docs/navigation-design.md.
13
+ */
14
+ export declare function registerBrowserNavigation(controller: NavigationController): void;
15
+ //# sourceMappingURL=browserEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browserEvents.d.ts","sourceRoot":"","sources":["../../src/navigation/browserEvents.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAkBxD;;;GAGG;AACH,wBAAgB,2BAA2B,IAAK,OAAO,CAEtD;AAMD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAE,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAuCjF"}