solid-panes 5.1.0-0 → 5.1.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/README.md +17 -0
  2. package/dist/RDFXMLPane2.esm.js +1 -2
  3. package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
  4. package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
  5. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
  6. package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
  7. package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
  8. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
  9. package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
  10. package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
  11. package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
  12. package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
  13. package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
  14. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
  15. package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
  16. package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
  17. package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
  18. package/dist/audio/audioPane.esm.js +1 -2
  19. package/dist/classInstancePane.esm.js +1 -2
  20. package/dist/components/editor-card/EditorCard.cjs.js +1 -1
  21. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  22. package/dist/components/editor-card/EditorCard.esm.js +6 -7
  23. package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
  24. package/dist/components/header/Header.cjs.js +1 -1
  25. package/dist/components/header/Header.cjs.js.map +1 -1
  26. package/dist/components/header/Header.esm.js +7 -8
  27. package/dist/components/header/Header.styles.esm.js +1 -2
  28. package/dist/components/navbar/Navbar.cjs.js +2 -2
  29. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  30. package/dist/components/navbar/Navbar.esm.js +8 -9
  31. package/dist/components/navbar/Navbar.styles.esm.js +1 -2
  32. package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
  33. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
  34. package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
  35. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -2
  36. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
  37. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
  38. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
  39. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
  40. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
  41. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
  42. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
  43. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
  44. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
  45. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
  46. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
  47. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
  48. package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
  49. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
  50. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
  51. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
  52. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
  53. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
  54. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
  55. package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
  56. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
  57. package/dist/components/profile-heading/friendActions.esm.js +1 -2
  58. package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
  59. package/dist/dashboard/basicPreferences.esm.js +1 -2
  60. package/dist/dashboard/dashboardPane.esm.js +0 -1
  61. package/dist/dashboard/homepage.esm.js +1 -2
  62. package/dist/dashboard/ontologyData.esm.js +1 -2
  63. package/dist/dashboard/preferencesFormText.esm.js +1 -2
  64. package/dist/dataContentPane2.cjs.js +1 -1
  65. package/dist/dataContentPane2.esm.js +2 -3
  66. package/dist/defaultPane2.cjs.js +1 -1
  67. package/dist/defaultPane2.esm.js +2 -3
  68. package/dist/dokieli/dokieliPane.cjs.js +1 -1
  69. package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
  70. package/dist/dokieli/dokieliPane.esm.js +7 -12
  71. package/dist/dokieli/dokieliPane.esm.js.map +1 -1
  72. package/dist/dokieli/new.esm.js +1 -2
  73. package/dist/form/pane.esm.js +1 -2
  74. package/dist/home/homePane.esm.js +1 -2
  75. package/dist/humanReadablePane.d.ts +3 -0
  76. package/dist/humanReadablePane.d.ts.map +1 -1
  77. package/dist/humanReadablePane2.cjs.js +276 -1
  78. package/dist/humanReadablePane2.cjs.js.map +1 -1
  79. package/dist/humanReadablePane2.esm.js +428 -31
  80. package/dist/humanReadablePane2.esm.js.map +1 -1
  81. package/dist/icons/folder.esm.js +1 -2
  82. package/dist/icons/friends.esm.js +1 -2
  83. package/dist/icons/person.esm.js +1 -2
  84. package/dist/imagePane.d.ts.map +1 -1
  85. package/dist/imagePane2.cjs.js +1 -1
  86. package/dist/imagePane2.cjs.js.map +1 -1
  87. package/dist/imagePane2.esm.js +2 -3
  88. package/dist/imagePane2.esm.js.map +1 -1
  89. package/dist/index.esm.js +1 -2
  90. package/dist/internal/internalPane2.cjs.js +1 -1
  91. package/dist/internal/internalPane2.esm.js +2 -3
  92. package/dist/mainPage/header.esm.js +1 -2
  93. package/dist/mainPage/index.cjs.js +1 -1
  94. package/dist/mainPage/index.cjs.js.map +1 -1
  95. package/dist/mainPage/index.d.ts +1 -1
  96. package/dist/mainPage/index.d.ts.map +1 -1
  97. package/dist/mainPage/index.esm.js +6 -2
  98. package/dist/mainPage/index.esm.js.map +1 -1
  99. package/dist/mainPage/navbar.esm.js +1 -2
  100. package/dist/mainPage/navigation.cjs.js +1 -1
  101. package/dist/mainPage/navigation.cjs.js.map +1 -1
  102. package/dist/mainPage/navigation.d.ts.map +1 -1
  103. package/dist/mainPage/navigation.esm.js +14 -11
  104. package/dist/mainPage/navigation.esm.js.map +1 -1
  105. package/dist/mainPage/profileHeading2.esm.js +1 -2
  106. package/dist/n3Pane2.esm.js +1 -2
  107. package/dist/navigation/browserEvents.esm.js +1 -2
  108. package/dist/navigation/chrome.esm.js +1 -2
  109. package/dist/navigation/controller.cjs.js +1 -1
  110. package/dist/navigation/controller.cjs.js.map +1 -1
  111. package/dist/navigation/controller.esm.js +6 -7
  112. package/dist/navigation/controller.esm.js.map +1 -1
  113. package/dist/navigation/events.esm.js +1 -2
  114. package/dist/navigation/navbarVisibility.esm.js +1 -2
  115. package/dist/navigation/options.esm.js +1 -2
  116. package/dist/navigation/podContext.esm.js +1 -2
  117. package/dist/navigation/state.esm.js +1 -2
  118. package/dist/outline/context.esm.js +1 -2
  119. package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
  120. package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
  121. package/dist/outline/fileExplorerHelpers.d.ts +13 -0
  122. package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
  123. package/dist/outline/fileExplorerHelpers.esm.js +24 -0
  124. package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
  125. package/dist/outline/manager2.cjs.js +1 -1
  126. package/dist/outline/manager2.cjs.js.map +1 -1
  127. package/dist/outline/manager2.esm.js +422 -433
  128. package/dist/outline/manager2.esm.js.map +1 -1
  129. package/dist/outline/outlineDomHelpers.cjs.js +2 -0
  130. package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
  131. package/dist/outline/outlineDomHelpers.d.ts +30 -0
  132. package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
  133. package/dist/outline/outlineDomHelpers.esm.js +79 -0
  134. package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
  135. package/dist/outline/outlineIcons.esm.js +1 -2
  136. package/dist/outline/propertyViews.esm.js +1 -2
  137. package/dist/outline/queryByExample.cjs.js.map +1 -1
  138. package/dist/outline/queryByExample.esm.js +1 -2
  139. package/dist/outline/queryByExample.esm.js.map +1 -1
  140. package/dist/outline/userInput.cjs.js +9 -9
  141. package/dist/outline/userInput.cjs.js.map +1 -1
  142. package/dist/outline/userInput.esm.js +50 -40
  143. package/dist/outline/userInput.esm.js.map +1 -1
  144. package/dist/outline/viewAsImage.esm.js +1 -2
  145. package/dist/outline/viewAsMbox.esm.js +1 -2
  146. package/dist/pad/padPane2.cjs.js +1 -1
  147. package/dist/pad/padPane2.esm.js +2 -3
  148. package/dist/playlist/playlistPane.esm.js +1 -2
  149. package/dist/registerPanes.esm.js +1 -2
  150. package/dist/schedule/formsForSchedule.esm.js +1 -2
  151. package/dist/schedule/schedulePane.d.ts.map +1 -1
  152. package/dist/schedule/schedulePane2.cjs.js +1 -1
  153. package/dist/schedule/schedulePane2.cjs.js.map +1 -1
  154. package/dist/schedule/schedulePane2.esm.js +60 -59
  155. package/dist/schedule/schedulePane2.esm.js.map +1 -1
  156. package/dist/sharing/sharingPane.esm.js +1 -2
  157. package/dist/slideshow/slideshowPane.esm.js +1 -2
  158. package/dist/social/editProfileDetails.cjs.js +1 -1
  159. package/dist/social/editProfileDetails.esm.js +1 -2
  160. package/dist/social/icons.esm.js +1 -2
  161. package/dist/social/socialPane2.cjs.js +1 -1
  162. package/dist/social/socialPane2.esm.js +2 -3
  163. package/dist/social/socialSections.cjs.js +1 -1
  164. package/dist/social/socialSections.cjs.js.map +1 -1
  165. package/dist/social/socialSections.d.ts +0 -1
  166. package/dist/social/socialSections.d.ts.map +1 -1
  167. package/dist/social/socialSections.esm.js +15 -18
  168. package/dist/social/socialSections.esm.js.map +1 -1
  169. package/dist/social/triage.esm.js +1 -2
  170. package/dist/tabbed/tabbedPane.esm.js +1 -2
  171. package/dist/tableViewPane.esm.js +1 -2
  172. package/dist/transaction/pane.esm.js +1 -2
  173. package/dist/transaction/period.esm.js +1 -2
  174. package/dist/trip/tripPane.esm.js +1 -2
  175. package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
  176. package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
  177. package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
  178. package/dist/ui/pane.esm.js +1 -2
  179. package/dist/utils/paneUtils.cjs.js +1 -1
  180. package/dist/utils/paneUtils.cjs.js.map +1 -1
  181. package/dist/utils/paneUtils.d.ts +5 -3
  182. package/dist/utils/paneUtils.d.ts.map +1 -1
  183. package/dist/utils/paneUtils.esm.js +36 -29
  184. package/dist/utils/paneUtils.esm.js.map +1 -1
  185. package/dist/utils/podUtils.cjs.js +1 -1
  186. package/dist/utils/podUtils.cjs.js.map +1 -1
  187. package/dist/utils/podUtils.d.ts +9 -1
  188. package/dist/utils/podUtils.d.ts.map +1 -1
  189. package/dist/utils/podUtils.esm.js +22 -95
  190. package/dist/utils/podUtils.esm.js.map +1 -1
  191. package/dist/utils/viewerUtils.esm.js +1 -2
  192. package/dist/utils/webIdUtils.esm.js +1 -2
  193. package/dist/versionInfo.cjs.js +1 -1
  194. package/dist/versionInfo.cjs.js.map +1 -1
  195. package/dist/versionInfo.esm.js +4 -5
  196. package/dist/versionInfo.esm.js.map +1 -1
  197. package/dist/video/videoPane.esm.js +1 -2
  198. package/package.json +7 -6
  199. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
  200. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
  201. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
  202. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
  203. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
  204. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
  205. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
  206. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
  207. package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
  208. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
  209. package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
  210. package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
  211. package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
  212. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
  213. package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
  214. package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
  215. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
  216. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
  217. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
  218. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
  219. package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
  220. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
  221. package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
  222. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
  223. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
  224. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
  225. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
  226. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
  227. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
  228. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
  229. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
  230. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
  231. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
  232. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
  233. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
  234. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
  235. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
  236. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
  237. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
  238. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
  239. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
  240. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
  241. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
  242. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
  243. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
  244. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
  245. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
  246. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
  247. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
  248. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
  249. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
  250. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
  251. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
  252. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
  253. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
  254. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
  255. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
  256. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
  257. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
  258. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
  259. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
  260. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
  261. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
  262. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
  263. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
  264. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
  265. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
  266. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
  267. package/dist/components/file-explorer-header/index.cjs.js +0 -1
  268. package/dist/components/file-explorer-header/index.d.ts +0 -3
  269. package/dist/components/file-explorer-header/index.d.ts.map +0 -1
  270. package/dist/components/file-explorer-header/index.esm.js +0 -2
  271. package/dist/components/file-explorer-header/types.d.ts +0 -10
  272. package/dist/components/file-explorer-header/types.d.ts.map +0 -1
  273. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
  274. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
  275. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
  276. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
  277. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
  278. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
  279. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
  280. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
  281. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
  282. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
  283. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
  284. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +0 -1
@@ -1,18 +1,391 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.human-readable-pane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block}.human-readable-pane__container{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.human-readable-pane__frame{border:1px solid var(--solid-ui-color-gray-200,#cbd5e1);height:var(--human-readable-pane-height,30rem);box-sizing:border-box;resize:both;width:100%;min-width:0;max-width:100%;padding:1rem;display:block;overflow:auto}.human-readable-pane__frame--iframe{background:var(--color-background,white);width:100%;max-width:100%;min-height:18rem;padding:0;overflow:hidden}.human-readable-pane__frame--markdown{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane__frame--plain-text{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;margin:0;font-family:monospace}.human-readable-pane__frame--markdown>*{box-sizing:border-box;max-width:100%}.human-readable-pane__frame--markdown img,.human-readable-pane__frame--markdown video,.human-readable-pane__frame--markdown canvas,.human-readable-pane__frame--markdown iframe{max-width:100%;height:auto}.human-readable-pane__frame--markdown pre,.human-readable-pane__frame--markdown code{overflow-wrap:anywhere;word-break:break-word;max-width:100%}.human-readable-pane__frame--markdown pre{white-space:pre-wrap}.human-readable-pane__frame--markdown table{box-sizing:border-box;width:100%;max-width:100%;display:block;overflow-x:auto}.human-readable-pane__frame--markdown th,.human-readable-pane__frame--markdown td{white-space:normal;overflow-wrap:anywhere;word-break:break-word}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame{resize:none;min-width:0;padding:.75rem}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--markdown,.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--plain-text{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--iframe{width:100%;max-width:100%;min-height:16rem;height:min(var(--human-readable-pane-height,30rem), 75vh)}@media (width<=576px){.human-readable-pane__frame{resize:none;min-width:0;padding:.75rem}.human-readable-pane__frame--markdown,.human-readable-pane__frame--plain-text{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane__frame--iframe{width:100%;max-width:100%;min-height:16rem;height:min(var(--human-readable-pane-height,30rem), 75vh)}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.human-readable-pane{box-sizing:border-box;flex-direction:column;width:100%;min-width:0;max-width:100%;margin:0;padding:0 40px;display:flex;overflow:hidden}.human-readable-pane__container{box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin:0;padding:0;display:block;overflow-x:hidden}.human-readable-pane__frame{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);height:var(--human-readable-pane-height,30rem);box-sizing:border-box;resize:both;width:100%;min-width:0;max-width:100%;padding:1rem;display:block;overflow:auto}.human-readable-pane__frame--iframe{box-sizing:border-box;background:var(--color-background,white);width:100%;max-width:100%;min-height:18rem;padding:0;display:block;overflow:auto}.human-readable-pane--iframe,solid-ui-file-explorer-provider>.paneDiv.human-readable-pane--iframe{flex:1;height:100%;min-height:0;display:flex;overflow:hidden}.human-readable-pane__container--iframe{flex-direction:column;flex:auto;min-height:0;display:flex}.human-readable-pane__container--iframe>.human-readable-pane__frame--iframe{resize:none;flex:1;height:auto;min-height:0}.human-readable-pane__frame--markdown{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane__frame--plain-text{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;margin:0;font-family:monospace}.human-readable-pane__frame--markdown>*{box-sizing:border-box;max-width:100%}.human-readable-pane__frame--markdown img,.human-readable-pane__frame--markdown video,.human-readable-pane__frame--markdown canvas,.human-readable-pane__frame--markdown iframe{max-width:100%;height:auto}.human-readable-pane__frame--markdown pre,.human-readable-pane__frame--markdown code{overflow-wrap:anywhere;word-break:break-word;max-width:100%}.human-readable-pane__frame--markdown pre{white-space:pre-wrap}.human-readable-pane__frame--markdown table{box-sizing:border-box;width:100%;max-width:100%;display:block;overflow-x:auto}.human-readable-pane__frame--markdown th,.human-readable-pane__frame--markdown td{white-space:normal;overflow-wrap:anywhere;word-break:break-word}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame{resize:none;min-width:0;padding:.75rem}.human-readable-pane[data-layout=mobile]{padding:0}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--markdown,.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--plain-text{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--iframe{width:100%;max-width:100%;min-height:0;height:max(16rem, min(var(--human-readable-pane-height,30rem), 75vh))}@media (width<=576px){.human-readable-pane{padding:0}.human-readable-pane__frame{resize:none;min-width:0;padding:.75rem}.human-readable-pane__frame--markdown,.human-readable-pane__frame--plain-text{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane__frame--iframe{width:100%;max-width:100%;min-height:0;height:max(16rem, min(var(--human-readable-pane-height,30rem), 75vh))}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  import { icons as e, ns as t } from "solid-ui";
3
3
  import { Util as n } from "rdflib";
4
4
  import { marked as r } from "marked";
5
5
  import i from "dompurify";
6
- //#region src/humanReadablePane.ts
6
+ // src/humanReadablePane.ts
7
7
  var a = (e) => {
8
8
  if (!e) return !1;
9
9
  let t = e.split("?")[0].split("#")[0];
10
10
  return /\.(md|markdown|mdown|mkd|mkdn)$/i.test(t);
11
11
  }, o = /* @__PURE__ */ new Map();
12
12
  function s(e, t, n) {
13
- e.className = "", e.classList.add("human-readable-pane__frame"), e.classList.add(`human-readable-pane__frame--${t}`), e.style.setProperty("--human-readable-pane-height", `${n}em`);
13
+ e.className = "", e.classList.add("human-readable-pane__frame"), e.classList.add(`human-readable-pane__frame--${t}`), n !== void 0 && e.style.setProperty("--human-readable-pane-height", `${n}em`);
14
14
  }
15
- var c = {
15
+ var c = "solidos-human-readable-preview", l = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals", u = (e) => e.includes("<script src=\"https://dokie.li/scripts/dokieli.js\">") || e.includes("dokieli.css");
16
+ function d(e) {
17
+ return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
18
+ }
19
+ function f(e, t) {
20
+ let n = e.match(/<base(\s[^>]*)?>/i);
21
+ if (n && n.index !== void 0) {
22
+ let r = n[0].match(/\bhref\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i), i = r?.[1] ?? r?.[2] ?? r?.[3];
23
+ if (!r || i === void 0 || /^[a-z][a-z\d+.-]*:/i.test(i) || i.startsWith("//")) return e;
24
+ let a;
25
+ try {
26
+ a = new URL(i, t).href;
27
+ } catch {
28
+ return e;
29
+ }
30
+ let o = n[0].replace(r[0], `href="${d(a)}"`);
31
+ return e.slice(0, n.index) + o + e.slice(n.index + n[0].length);
32
+ }
33
+ let r = `<base href="${d(t)}">`, i = e.match(/<head(\s[^>]*)?>/i);
34
+ if (i && i.index !== void 0) {
35
+ let t = i.index + i[0].length;
36
+ return e.slice(0, t) + r + e.slice(t);
37
+ }
38
+ return r + e;
39
+ }
40
+ function p(e) {
41
+ let t = e.split("/").pop() || e;
42
+ try {
43
+ return decodeURIComponent(t);
44
+ } catch {
45
+ return t;
46
+ }
47
+ }
48
+ function m(e, t) {
49
+ let n = p(t);
50
+ try {
51
+ return new DOMParser().parseFromString(e, "text/html").querySelector("title")?.textContent?.trim() || n;
52
+ } catch {
53
+ return n;
54
+ }
55
+ }
56
+ var h = "solidos-preview-request", g = "solidos-preview-response", _ = /* @__PURE__ */ new Set([
57
+ "GET",
58
+ "PUT",
59
+ "PATCH",
60
+ "DELETE"
61
+ ]);
62
+ function v(e) {
63
+ return e === "about:srcdoc" || /^file:\/\/srcdoc\/?(?:[?#].*)?$/i.test(e);
64
+ }
65
+ function y(e, t) {
66
+ let n = new URL(e, t).href;
67
+ return v(n) ? t : n;
68
+ }
69
+ function b(e, t, n) {
70
+ let r = `<script>
71
+ (() => {
72
+ const documentUri = ${JSON.stringify(t)}
73
+ const nonce = ${JSON.stringify(n)}
74
+ const pending = new Map()
75
+ let requestId = 0
76
+ try {
77
+ history.replaceState(null, '', documentUri)
78
+ } catch {
79
+ // Sandboxed documents may reject cross-origin history URLs.
80
+ }
81
+ // Opaque sandbox origins cannot use IndexedDB. Dokieli uses it for local
82
+ // preferences and history, so provide an in-memory implementation without
83
+ // granting the preview a persistent storage capability.
84
+ try {
85
+ window.indexedDB.open('__solidos_probe__')
86
+ } catch {
87
+ const databases = new Map()
88
+ const request = (result) => ({ result, error: null, onsuccess: null, onerror: null, onupgradeneeded: null })
89
+ const isolatedIndexedDB = {
90
+ open (name) {
91
+ const stores = databases.get(name) || new Map()
92
+ databases.set(name, stores)
93
+ const database = {
94
+ objectStoreNames: { contains: storeName => stores.has(storeName) },
95
+ createObjectStore (storeName) {
96
+ if (!stores.has(storeName)) stores.set(storeName, new Map())
97
+ return database.transaction(storeName, 'readwrite').objectStore(storeName)
98
+ },
99
+ transaction (storeName, mode = 'readonly') {
100
+ const store = stores.get(storeName) || new Map()
101
+ stores.set(storeName, store)
102
+ let pending = 0
103
+ let completed = false
104
+ const transaction = {
105
+ oncomplete: null,
106
+ onerror: null,
107
+ onabort: null,
108
+ objectStore: () => {
109
+ const run = (result, change) => {
110
+ const operation = request(result)
111
+ pending++
112
+ queueMicrotask(() => {
113
+ try {
114
+ change?.()
115
+ operation.onsuccess?.({ target: operation })
116
+ } catch (error) {
117
+ operation.error = error
118
+ operation.onerror?.({ target: operation })
119
+ } finally {
120
+ pending--
121
+ if (!pending && !completed) {
122
+ completed = true
123
+ transaction.oncomplete?.({ target: transaction })
124
+ }
125
+ }
126
+ })
127
+ return operation
128
+ }
129
+ return {
130
+ get: key => run(store.get(key)),
131
+ getAll: () => run(Array.from(store.values())),
132
+ getAllKeys: () => run(Array.from(store.keys())),
133
+ count: () => run(store.size),
134
+ openKeyCursor () {
135
+ const keys = Array.from(store.keys())
136
+ const operation = request(null)
137
+ pending++
138
+ let index = 0
139
+ const emit = () => {
140
+ operation.result = index < keys.length
141
+ ? { key: keys[index], continue: () => { index++; queueMicrotask(emit) } }
142
+ : null
143
+ operation.onsuccess?.({ target: operation })
144
+ if (!operation.result) {
145
+ pending--
146
+ if (!pending && !completed) {
147
+ completed = true
148
+ transaction.oncomplete?.({ target: transaction })
149
+ }
150
+ }
151
+ }
152
+ queueMicrotask(emit)
153
+ return operation
154
+ },
155
+ put: (value, key) => run(undefined, () => store.set(key, value)),
156
+ add: (value, key) => run(undefined, () => store.set(key, value)),
157
+ delete: key => run(undefined, () => store.delete(key)),
158
+ clear: () => run(undefined, () => store.clear())
159
+ }
160
+ }
161
+ }
162
+ return transaction
163
+ },
164
+ close () {}
165
+ }
166
+ const operation = request(database)
167
+ queueMicrotask(() => {
168
+ operation.onupgradeneeded?.({ target: operation })
169
+ operation.onsuccess?.({ target: operation })
170
+ })
171
+ return operation
172
+ },
173
+ deleteDatabase (name) {
174
+ databases.delete(name)
175
+ const operation = request(undefined)
176
+ queueMicrotask(() => operation.onsuccess?.({ target: operation }))
177
+ return operation
178
+ }
179
+ }
180
+ Object.defineProperty(window, 'indexedDB', { configurable: true, value: isolatedIndexedDB })
181
+ }
182
+ const nativeFetch = window.fetch.bind(window)
183
+
184
+ function isSrcdocUrl (url) {
185
+ return url === 'about:srcdoc' || /^file:\\/\\/srcdoc\\/?(?:[?#].*)?$/i.test(url)
186
+ }
187
+
188
+ function documentRequestUrl (url) {
189
+ const resolvedUrl = new URL(url, documentUri).href
190
+ // srcdoc keeps this URL even when history.replaceState is unavailable in
191
+ // an opaque sandbox. Dokieli saves via document.location.href.
192
+ return isSrcdocUrl(resolvedUrl) ? documentUri : resolvedUrl
193
+ }
194
+
195
+ function requestParent (url, init) {
196
+ const id = String(++requestId)
197
+ return new Promise((resolve, reject) => {
198
+ pending.set(id, { resolve, reject })
199
+ window.parent.postMessage({
200
+ type: ${JSON.stringify(h)},
201
+ nonce,
202
+ id,
203
+ url,
204
+ method: init.method,
205
+ headers: init.headers,
206
+ body: init.body
207
+ }, '*')
208
+ })
209
+ }
210
+
211
+ window.addEventListener('message', event => {
212
+ const message = event.data
213
+ if (!message || message.type !== ${JSON.stringify(g)} || message.nonce !== nonce) return
214
+ const entry = pending.get(message.id)
215
+ if (!entry) return
216
+ pending.delete(message.id)
217
+ if (!message.ok) {
218
+ entry.reject(new Error(message.error || 'Preview request failed'))
219
+ return
220
+ }
221
+ const responseBody = [204, 205, 304].includes(message.status) ? null : message.body
222
+ entry.resolve(new Response(responseBody, {
223
+ status: message.status,
224
+ headers: message.headers
225
+ }))
226
+ })
227
+
228
+ window.fetch = async (input, init = {}) => {
229
+ const request = input instanceof Request ? input : null
230
+ const url = documentRequestUrl(request ? request.url : input)
231
+ const method = (init.method || (request && request.method) || 'GET').toUpperCase()
232
+ if (url !== documentUri || !${JSON.stringify(Array.from(_))}.includes(method)) {
233
+ return nativeFetch(input, init)
234
+ }
235
+ const headers = new Headers(request ? request.headers : undefined)
236
+ for (const [key, value] of new Headers(init.headers || {}).entries()) headers.set(key, value)
237
+ const body = method === 'GET' || method === 'HEAD'
238
+ ? undefined
239
+ : (init.body || (request ? await request.clone().text() : undefined))
240
+ return requestParent(url, {
241
+ method,
242
+ headers: Object.fromEntries(headers.entries()),
243
+ body
244
+ })
245
+ }
246
+
247
+ const NativeXMLHttpRequest = window.XMLHttpRequest
248
+ window.XMLHttpRequest = class PreviewXMLHttpRequest {
249
+ constructor () {
250
+ this._native = new NativeXMLHttpRequest()
251
+ this._headers = {}
252
+ this._listeners = {}
253
+ this._intercepted = false
254
+ this.readyState = 0
255
+ this.status = 0
256
+ this.statusText = ''
257
+ this.response = null
258
+ this.responseText = ''
259
+ }
260
+
261
+ addEventListener (type, listener) {
262
+ this._listeners[type] = this._listeners[type] || []
263
+ this._listeners[type].push(listener)
264
+ }
265
+
266
+ _emit (type) {
267
+ const event = { target: this, currentTarget: this, type }
268
+ if (typeof this['on' + type] === 'function') this['on' + type](event)
269
+ for (const listener of this._listeners[type] || []) listener.call(this, event)
270
+ }
271
+
272
+ open (method, url, async = true, user, password) {
273
+ const resolvedUrl = documentRequestUrl(url)
274
+ this._method = String(method || 'GET').toUpperCase()
275
+ this._url = resolvedUrl
276
+ this._intercepted = resolvedUrl === documentUri &&
277
+ ${JSON.stringify(Array.from(_))}.includes(this._method)
278
+ if (!this._intercepted) {
279
+ this._native.open(method, url, async, user, password)
280
+ for (const type of ['abort', 'error', 'load', 'loadend', 'progress', 'readystatechange', 'timeout']) {
281
+ this._native.addEventListener(type, event => this._emitNative(type, event))
282
+ }
283
+ }
284
+ this.readyState = 1
285
+ this._emit('readystatechange')
286
+ }
287
+
288
+ _emitNative (type, event) {
289
+ this.readyState = this._native.readyState
290
+ this.status = this._native.status
291
+ this.statusText = this._native.statusText
292
+ this.response = this._native.response
293
+ this.responseText = this._native.responseText
294
+ this._emit(type)
295
+ }
296
+
297
+ setRequestHeader (name, value) {
298
+ if (this._intercepted) this._headers[name] = value
299
+ else this._native.setRequestHeader(name, value)
300
+ }
301
+
302
+ send (body) {
303
+ if (!this._intercepted) {
304
+ this._native.send(body)
305
+ return
306
+ }
307
+ requestParent(this._url, {
308
+ method: this._method,
309
+ headers: this._headers,
310
+ body: this._method === 'GET' || this._method === 'HEAD' ? undefined : body
311
+ }).then(async response => {
312
+ this.status = response.status
313
+ this.statusText = response.statusText
314
+ this._responseHeaders = response.headers
315
+ this.responseText = await response.text()
316
+ this.response = this.responseText
317
+ this.readyState = 4
318
+ this._emit('readystatechange')
319
+ this._emit(response.ok ? 'load' : 'error')
320
+ this._emit('loadend')
321
+ }).catch(() => {
322
+ this.readyState = 4
323
+ this._emit('readystatechange')
324
+ this._emit('error')
325
+ this._emit('loadend')
326
+ })
327
+ }
328
+
329
+ abort () {
330
+ if (!this._intercepted) this._native.abort()
331
+ this._emit('abort')
332
+ }
333
+
334
+ getResponseHeader (name) {
335
+ return this._responseHeaders?.get(name) || null
336
+ }
337
+
338
+ getAllResponseHeaders () {
339
+ return this._responseHeaders
340
+ ? Array.from(this._responseHeaders.entries()).map(([key, value]) => key + ': ' + value).join('\\r\\n')
341
+ : ''
342
+ }
343
+ }
344
+ })()
345
+ <\/script>`;
346
+ return f(e, t).replace(/<head(\s[^>]*)?>/i, (e) => `${e}${r}`);
347
+ }
348
+ function x(e, t, n, r) {
349
+ let i = e.ownerDocument.defaultView;
350
+ if (!i) return;
351
+ let a = /* @__PURE__ */ new Uint32Array(4);
352
+ i.crypto.getRandomValues(a);
353
+ let o = Array.from(a, (e) => e.toString(16)).join("-"), s = new URL(t).href;
354
+ i.addEventListener("message", (t) => {
355
+ let n = t.data;
356
+ if (t.source !== e.contentWindow || !n || n.type !== h || n.nonce !== o || y(n.url, s) !== s || !_.has(n.method)) return;
357
+ let i = (t) => {
358
+ e.contentWindow?.postMessage(t, "*");
359
+ };
360
+ r(s, {
361
+ method: n.method,
362
+ headers: n.headers,
363
+ body: n.method === "GET" ? void 0 : n.body
364
+ }).then(async (e) => {
365
+ i({
366
+ type: g,
367
+ nonce: o,
368
+ id: n.id,
369
+ ok: e.ok,
370
+ status: e.status,
371
+ headers: Array.from(e.headers.entries()),
372
+ body: await e.text()
373
+ });
374
+ }).catch((e) => {
375
+ i({
376
+ type: g,
377
+ nonce: o,
378
+ id: n.id,
379
+ ok: !1,
380
+ status: 0,
381
+ headers: [],
382
+ body: "",
383
+ error: e instanceof Error ? e.message : String(e)
384
+ });
385
+ });
386
+ }), e.setAttribute("sandbox", l), e.srcdoc = b(n, s, o);
387
+ }
388
+ var S = {
16
389
  icon: function(t, n) {
17
390
  if (t && a(t.uri)) return e.iconBase + "markdown.svg";
18
391
  if (t) {
@@ -39,8 +412,6 @@ var c = {
39
412
  "text/html",
40
413
  "text/markdown",
41
414
  "application/xhtml+xml",
42
- "image/png",
43
- "image/jpeg",
44
415
  "application/pdf",
45
416
  "video/mp4"
46
417
  ], c = function(e, t, n) {
@@ -69,55 +440,81 @@ var c = {
69
440
  return null;
70
441
  },
71
442
  render: function(e, t) {
72
- let n = t.dom, c = n.createElement("div"), l = t.session.store;
73
- function u(e) {
443
+ let n = t.dom, h = n.createElement("div"), g = t.session.store;
444
+ function _(e) {
74
445
  let n = t.environment ?? {};
75
446
  e.dataset.layout = n.layout ?? "desktop";
76
447
  }
77
- let d = l.fetcher.getHeader(e.doc(), "content-type"), f = d ? d[0].split(";", 1)[0].trim() : null, p = f === "text/markdown" || a(e.uri), m = f === "text/plain";
78
- f || console.log("humanReadablePane: unknown content-type?"), c.classList.add("human-readable-pane"), u(c);
79
- let h = function(t) {
80
- l.fetcher.webOperation("GET", e.uri).then((e) => {
448
+ let v = g.fetcher.getHeader(e.doc(), "content-type"), y = v ? v[0].split(";", 1)[0].trim() : null, b = y === "text/markdown" || a(e.uri), S = y === "text/plain";
449
+ y || console.log("humanReadablePane: unknown content-type?"), h.classList.add("human-readable-pane"), _(h);
450
+ let C = function(t) {
451
+ g.fetcher.webOperation("GET", e.uri).then((e) => {
81
452
  let n = e.responseText ?? "", a = Math.min(30, n.split(/\n/).length + 5), o = r.parse(n, { async: !1 });
82
453
  t.innerHTML = i.sanitize(o), s(t, "markdown", a);
83
454
  }).catch((e) => {
84
455
  console.error("Error fetching markdown content:", e), t.innerHTML = "<p>Error loading content</p>";
85
456
  });
86
- }, g = function(t) {
87
- l.fetcher.webOperation("GET", e.uri).then((e) => {
457
+ }, w = function(t) {
458
+ g.fetcher.webOperation("GET", e.uri).then((e) => {
88
459
  let n = e.responseText ?? "", r = Math.min(30, n.split(/\n/).length + 5);
89
460
  t.textContent = n, s(t, "plain-text", r);
90
461
  }).catch((e) => {
91
462
  console.error("Error fetching plain text content:", e), t.textContent = "Error loading content";
92
463
  });
93
- }, _ = (t, n) => {
94
- t.setAttribute("src", e.uri), s(t, "iframe", n);
95
464
  };
96
- if (p) {
465
+ if (b) {
97
466
  let e = n.createElement("div");
98
- h(e);
467
+ C(e);
99
468
  let t = n.createElement("div");
100
- t.classList.add("human-readable-pane__container"), t.appendChild(e), c.appendChild(t);
101
- } else if (m) {
469
+ t.classList.add("human-readable-pane__container"), t.appendChild(e), h.appendChild(t);
470
+ } else if (S) {
102
471
  let e = n.createElement("pre");
103
- g(e);
472
+ w(e);
104
473
  let t = n.createElement("div");
105
- t.classList.add("human-readable-pane__container"), t.appendChild(e), c.appendChild(t);
474
+ t.classList.add("human-readable-pane__container"), t.appendChild(e), h.appendChild(t);
106
475
  } else {
107
476
  let t = n.createElement("iframe");
108
- (f === "text/html" || f === "application/xhtml+xml") && t.setAttribute("sandbox", "allow-scripts allow-same-origin allow-forms"), l.fetcher.webOperation("GET", e.uri).then((n) => {
109
- let r = n.responseText ?? "", i = r.includes("<script src=\"https://dokie.li/scripts/dokieli.js\">") ? -10 : 5, a = Math.min(30, r.split(/\n/).length + i), s = r.includes("<script src=\"https://dokie.li/scripts/dokieli.js\">") || r.includes("dokieli.css");
110
- o.set(e.uri, s ? "dokieli" : "html"), _(t, a);
477
+ t.name = c, t.title = p(e.uri), s(t, "iframe");
478
+ let r = y === "text/html" || y === "application/xhtml+xml", i = null, a = !1, _ = !1, v = typeof MutationObserver > "u" ? null : new MutationObserver((e) => {
479
+ let t = e.some((e) => Array.from(e.addedNodes).some((e) => e === h || e.nodeType === Node.ELEMENT_NODE && e.contains(h)));
480
+ h.isConnected ? _ = !0 : (_ || t) && (a = !0, i &&= (URL.revokeObjectURL(i), null), v?.disconnect());
481
+ });
482
+ v?.observe(n, {
483
+ childList: !0,
484
+ subtree: !0
485
+ });
486
+ let b = (e) => {
487
+ t.removeAttribute("src"), t.setAttribute("sandbox", ""), t.srcdoc = `<p style="font-family: sans-serif">${d(e)}</p>`;
488
+ };
489
+ r ? g.fetcher.webOperation("GET", e.uri).then((n) => {
490
+ let r = n.responseText ?? "";
491
+ t.title = m(r, e.uri);
492
+ let i = u(r);
493
+ o.set(e.uri, i ? "dokieli" : "html"), i ? x(t, e.uri, r, (e, t) => g.fetcher._fetch(e, t)) : (t.setAttribute("sandbox", l), t.srcdoc = f(r, e.uri));
494
+ }).catch((e) => {
495
+ console.error("Error fetching HTML content:", e), b("Error loading content");
496
+ }) : g.fetcher._fetch(e.uri).then(async (n) => {
497
+ if (!n.ok) throw Error(`HTTP ${n.status}`);
498
+ let r = n.headers.get("content-type")?.split(";", 1)[0].trim().toLowerCase();
499
+ if (r === "text/html" || r === "application/xhtml+xml") {
500
+ let r = await n.text();
501
+ t.title = m(r, e.uri);
502
+ let i = u(r);
503
+ o.set(e.uri, i ? "dokieli" : "html"), i ? x(t, e.uri, r, (e, t) => g.fetcher._fetch(e, t)) : (t.setAttribute("sandbox", l), t.srcdoc = f(r, e.uri));
504
+ return;
505
+ }
506
+ t.setAttribute("sandbox", l);
507
+ let s = URL.createObjectURL(await n.blob());
508
+ a ? URL.revokeObjectURL(s) : (i = s, t.src = s);
111
509
  }).catch((e) => {
112
- console.error("Error fetching content for line calculation:", e), _(t, 30);
510
+ console.error("Error fetching content:", e), b("Error loading content");
113
511
  });
114
- let r = n.createElement("div");
115
- r.classList.add("human-readable-pane__container"), r.appendChild(t), c.appendChild(r);
512
+ let S = n.createElement("div");
513
+ S.classList.add("human-readable-pane__container"), S.classList.add("human-readable-pane__container--iframe"), S.appendChild(t), h.appendChild(S), h.classList.add("human-readable-pane--iframe");
116
514
  }
117
- return c;
515
+ return h;
118
516
  }
119
517
  };
120
- //#endregion
121
- export { c as default };
518
+ export { c as HUMAN_READABLE_PREVIEW_FRAME_NAME, S as default, y as previewRequestUrl, f as withBaseHref };
122
519
 
123
520
  //# sourceMappingURL=humanReadablePane2.esm.js.map