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.
- package/README.md +17 -0
- package/dist/RDFXMLPane2.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
- package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
- package/dist/audio/audioPane.esm.js +1 -2
- package/dist/classInstancePane.esm.js +1 -2
- package/dist/components/editor-card/EditorCard.cjs.js +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.esm.js +6 -7
- package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js +7 -8
- package/dist/components/header/Header.styles.esm.js +1 -2
- package/dist/components/navbar/Navbar.cjs.js +2 -2
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js +8 -9
- package/dist/components/navbar/Navbar.styles.esm.js +1 -2
- package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
- package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
- package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
- package/dist/components/profile-heading/friendActions.esm.js +1 -2
- package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
- package/dist/dashboard/basicPreferences.esm.js +1 -2
- package/dist/dashboard/dashboardPane.esm.js +0 -1
- package/dist/dashboard/homepage.esm.js +1 -2
- package/dist/dashboard/ontologyData.esm.js +1 -2
- package/dist/dashboard/preferencesFormText.esm.js +1 -2
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.esm.js +2 -3
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.esm.js +2 -3
- package/dist/dokieli/dokieliPane.cjs.js +1 -1
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
- package/dist/dokieli/dokieliPane.esm.js +7 -12
- package/dist/dokieli/dokieliPane.esm.js.map +1 -1
- package/dist/dokieli/new.esm.js +1 -2
- package/dist/form/pane.esm.js +1 -2
- package/dist/home/homePane.esm.js +1 -2
- package/dist/humanReadablePane.d.ts +3 -0
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +276 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +428 -31
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/icons/folder.esm.js +1 -2
- package/dist/icons/friends.esm.js +1 -2
- package/dist/icons/person.esm.js +1 -2
- package/dist/imagePane.d.ts.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +2 -3
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.esm.js +1 -2
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.esm.js +2 -3
- package/dist/mainPage/header.esm.js +1 -2
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts +1 -1
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +6 -2
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.esm.js +1 -2
- package/dist/mainPage/navigation.cjs.js +1 -1
- package/dist/mainPage/navigation.cjs.js.map +1 -1
- package/dist/mainPage/navigation.d.ts.map +1 -1
- package/dist/mainPage/navigation.esm.js +14 -11
- package/dist/mainPage/navigation.esm.js.map +1 -1
- package/dist/mainPage/profileHeading2.esm.js +1 -2
- package/dist/n3Pane2.esm.js +1 -2
- package/dist/navigation/browserEvents.esm.js +1 -2
- package/dist/navigation/chrome.esm.js +1 -2
- package/dist/navigation/controller.cjs.js +1 -1
- package/dist/navigation/controller.cjs.js.map +1 -1
- package/dist/navigation/controller.esm.js +6 -7
- package/dist/navigation/controller.esm.js.map +1 -1
- package/dist/navigation/events.esm.js +1 -2
- package/dist/navigation/navbarVisibility.esm.js +1 -2
- package/dist/navigation/options.esm.js +1 -2
- package/dist/navigation/podContext.esm.js +1 -2
- package/dist/navigation/state.esm.js +1 -2
- package/dist/outline/context.esm.js +1 -2
- package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
- package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
- package/dist/outline/fileExplorerHelpers.d.ts +13 -0
- package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
- package/dist/outline/fileExplorerHelpers.esm.js +24 -0
- package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +422 -433
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/outlineDomHelpers.cjs.js +2 -0
- package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
- package/dist/outline/outlineDomHelpers.d.ts +30 -0
- package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
- package/dist/outline/outlineDomHelpers.esm.js +79 -0
- package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
- package/dist/outline/outlineIcons.esm.js +1 -2
- package/dist/outline/propertyViews.esm.js +1 -2
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +1 -2
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +9 -9
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +50 -40
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/outline/viewAsImage.esm.js +1 -2
- package/dist/outline/viewAsMbox.esm.js +1 -2
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.esm.js +2 -3
- package/dist/playlist/playlistPane.esm.js +1 -2
- package/dist/registerPanes.esm.js +1 -2
- package/dist/schedule/formsForSchedule.esm.js +1 -2
- package/dist/schedule/schedulePane.d.ts.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js +60 -59
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -2
- package/dist/slideshow/slideshowPane.esm.js +1 -2
- package/dist/social/editProfileDetails.cjs.js +1 -1
- package/dist/social/editProfileDetails.esm.js +1 -2
- package/dist/social/icons.esm.js +1 -2
- package/dist/social/socialPane2.cjs.js +1 -1
- package/dist/social/socialPane2.esm.js +2 -3
- package/dist/social/socialSections.cjs.js +1 -1
- package/dist/social/socialSections.cjs.js.map +1 -1
- package/dist/social/socialSections.d.ts +0 -1
- package/dist/social/socialSections.d.ts.map +1 -1
- package/dist/social/socialSections.esm.js +15 -18
- package/dist/social/socialSections.esm.js.map +1 -1
- package/dist/social/triage.esm.js +1 -2
- package/dist/tabbed/tabbedPane.esm.js +1 -2
- package/dist/tableViewPane.esm.js +1 -2
- package/dist/transaction/pane.esm.js +1 -2
- package/dist/transaction/period.esm.js +1 -2
- package/dist/trip/tripPane.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
- package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
- package/dist/ui/pane.esm.js +1 -2
- package/dist/utils/paneUtils.cjs.js +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.d.ts +5 -3
- package/dist/utils/paneUtils.d.ts.map +1 -1
- package/dist/utils/paneUtils.esm.js +36 -29
- package/dist/utils/paneUtils.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/podUtils.d.ts +9 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +22 -95
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/utils/viewerUtils.esm.js +1 -2
- package/dist/utils/webIdUtils.esm.js +1 -2
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +4 -5
- package/dist/versionInfo.esm.js.map +1 -1
- package/dist/video/videoPane.esm.js +1 -2
- package/package.json +7 -6
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
- package/dist/components/file-explorer-header/index.cjs.js +0 -1
- package/dist/components/file-explorer-header/index.d.ts +0 -3
- package/dist/components/file-explorer-header/index.d.ts.map +0 -1
- package/dist/components/file-explorer-header/index.esm.js +0 -2
- package/dist/components/file-explorer-header/types.d.ts +0 -10
- package/dist/components/file-explorer-header/types.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
- package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +0 -1
|
@@ -1,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:
|
|
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
|
-
|
|
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, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
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,
|
|
73
|
-
function
|
|
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
|
|
78
|
-
|
|
79
|
-
let
|
|
80
|
-
|
|
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
|
-
},
|
|
87
|
-
|
|
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 (
|
|
465
|
+
if (b) {
|
|
97
466
|
let e = n.createElement("div");
|
|
98
|
-
|
|
467
|
+
C(e);
|
|
99
468
|
let t = n.createElement("div");
|
|
100
|
-
t.classList.add("human-readable-pane__container"), t.appendChild(e),
|
|
101
|
-
} else if (
|
|
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
|
-
|
|
472
|
+
w(e);
|
|
104
473
|
let t = n.createElement("div");
|
|
105
|
-
t.classList.add("human-readable-pane__container"), t.appendChild(e),
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
510
|
+
console.error("Error fetching content:", e), b("Error loading content");
|
|
113
511
|
});
|
|
114
|
-
let
|
|
115
|
-
|
|
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
|
|
515
|
+
return h;
|
|
118
516
|
}
|
|
119
517
|
};
|
|
120
|
-
|
|
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
|