solid-panes 4.4.2-2 → 4.4.2-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/RDFXMLPane.d.ts +2 -3
- package/dist/RDFXMLPane2.cjs.js +3 -0
- package/dist/RDFXMLPane2.cjs.js.map +1 -0
- package/dist/RDFXMLPane2.esm.js +55 -0
- package/dist/RDFXMLPane2.esm.js.map +1 -0
- package/dist/_virtual/_rolldown/runtime.cjs.js +1 -0
- package/dist/_virtual/~icons/lucide/user.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -0
- package/dist/audio/audioPane.cjs.js +2 -0
- package/dist/audio/audioPane.cjs.js.map +1 -0
- package/dist/audio/audioPane.esm.js +96 -0
- package/dist/audio/audioPane.esm.js.map +1 -0
- package/dist/classInstancePane.cjs.js +2 -0
- package/dist/classInstancePane.cjs.js.map +1 -0
- package/dist/classInstancePane.esm.js +50 -0
- package/dist/classInstancePane.esm.js.map +1 -0
- package/dist/components/header/Header.d.ts +8 -0
- package/dist/components/header/Header.d.ts.map +1 -0
- package/dist/components/header/index.d.ts +4 -0
- package/dist/components/header/index.d.ts.map +1 -0
- package/dist/dashboard/basicPreferences.cjs.js +2 -0
- package/dist/dashboard/basicPreferences.cjs.js.map +1 -0
- package/dist/dashboard/basicPreferences.d.ts +1 -1
- package/dist/dashboard/basicPreferences.esm.js +70 -0
- package/dist/dashboard/basicPreferences.esm.js.map +1 -0
- package/dist/dashboard/dashboardPane.d.ts +1 -1
- package/dist/dashboard/homepage.d.ts +1 -1
- package/dist/dashboard/ontologyData.cjs.js +37 -0
- package/dist/dashboard/ontologyData.cjs.js.map +1 -0
- package/dist/dashboard/ontologyData.esm.js +6 -0
- package/dist/dashboard/ontologyData.esm.js.map +1 -0
- package/dist/dashboard/preferencesFormText.cjs.js +20 -0
- package/dist/dashboard/preferencesFormText.cjs.js.map +1 -0
- package/dist/dashboard/preferencesFormText.esm.js +6 -0
- package/dist/dashboard/preferencesFormText.esm.js.map +1 -0
- package/dist/dataContentPane.d.ts +2 -3
- package/dist/dataContentPane2.cjs.js +2 -0
- package/dist/dataContentPane2.cjs.js.map +1 -0
- package/dist/dataContentPane2.esm.js +109 -0
- package/dist/dataContentPane2.esm.js.map +1 -0
- package/dist/defaultPane.d.ts +2 -3
- package/dist/defaultPane2.cjs.js +2 -0
- package/dist/defaultPane2.cjs.js.map +1 -0
- package/dist/defaultPane2.esm.js +41 -0
- package/dist/defaultPane2.esm.js.map +1 -0
- package/dist/dev.d.ts +10 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dokieli/dokieliPane.cjs.js +2 -0
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -0
- package/dist/dokieli/dokieliPane.esm.js +39 -0
- package/dist/dokieli/dokieliPane.esm.js.map +1 -0
- package/dist/dokieli/{new.js → new.cjs.js} +4 -10
- package/dist/dokieli/new.cjs.js.map +1 -0
- package/dist/dokieli/new.esm.js +6 -0
- package/dist/dokieli/new.esm.js.map +1 -0
- package/dist/form/pane.cjs.js +4 -0
- package/dist/form/pane.cjs.js.map +1 -0
- package/dist/form/pane.d.ts +1 -2
- package/dist/form/pane.esm.js +121 -0
- package/dist/form/pane.esm.js.map +1 -0
- package/dist/home/homePane.cjs.js +2 -0
- package/dist/home/homePane.cjs.js.map +1 -0
- package/dist/home/homePane.d.ts +1 -1
- package/dist/home/homePane.esm.js +35 -0
- package/dist/home/homePane.esm.js.map +1 -0
- package/dist/humanReadablePane.d.ts +2 -3
- package/dist/humanReadablePane2.cjs.js +2 -0
- package/dist/humanReadablePane2.cjs.js.map +1 -0
- package/dist/humanReadablePane2.esm.js +123 -0
- package/dist/humanReadablePane2.esm.js.map +1 -0
- package/dist/icons/dashboard.cjs.js +2 -0
- package/dist/icons/dashboard.cjs.js.map +1 -0
- package/dist/icons/dashboard.esm.js +6 -0
- package/dist/icons/dashboard.esm.js.map +1 -0
- package/dist/icons/folder.cjs.js +2 -0
- package/dist/icons/folder.cjs.js.map +1 -0
- package/dist/icons/folder.esm.js +6 -0
- package/dist/icons/folder.esm.js.map +1 -0
- package/dist/icons/friends.cjs.js +2 -0
- package/dist/icons/friends.cjs.js.map +1 -0
- package/dist/icons/friends.esm.js +6 -0
- package/dist/icons/friends.esm.js.map +1 -0
- package/dist/icons/iconHelper.cjs.js +2 -0
- package/dist/icons/iconHelper.cjs.js.map +1 -0
- package/dist/icons/iconHelper.esm.js +17 -0
- package/dist/icons/iconHelper.esm.js.map +1 -0
- package/dist/icons/{menu.svg → menu.cjs.js} +3 -2
- package/dist/icons/menu.cjs.js.map +1 -0
- package/dist/icons/menu.esm.js +6 -0
- package/dist/icons/menu.esm.js.map +1 -0
- package/dist/icons/person.cjs.js +2 -0
- package/dist/icons/person.cjs.js.map +1 -0
- package/dist/icons/person.esm.js +6 -0
- package/dist/icons/person.esm.js.map +1 -0
- package/dist/imagePane.d.ts +2 -3
- package/dist/imagePane2.cjs.js +2 -0
- package/dist/imagePane2.cjs.js.map +1 -0
- package/dist/imagePane2.esm.js +32 -0
- package/dist/imagePane2.esm.js.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +26 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/internal/internalPane.d.ts +1 -2
- package/dist/internal/internalPane2.cjs.js +2 -0
- package/dist/internal/internalPane2.cjs.js.map +1 -0
- package/dist/internal/internalPane2.esm.js +104 -0
- package/dist/internal/internalPane2.esm.js.map +1 -0
- package/dist/mainPage/footer.cjs.js +2 -0
- package/dist/mainPage/footer.cjs.js.map +1 -0
- package/dist/mainPage/footer.d.ts +1 -3
- package/dist/mainPage/footer.esm.js +18 -0
- package/dist/mainPage/footer.esm.js.map +1 -0
- package/dist/mainPage/header.cjs.js +2 -0
- package/dist/mainPage/header.cjs.js.map +1 -0
- package/dist/mainPage/header.d.ts +1 -15
- package/dist/mainPage/header.d.ts.map +1 -1
- package/dist/mainPage/header.esm.js +24 -0
- package/dist/mainPage/header.esm.js.map +1 -0
- package/dist/mainPage/index.cjs.js +2 -0
- package/dist/mainPage/index.cjs.js.map +1 -0
- package/dist/mainPage/index.d.ts +3 -7
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +38 -0
- package/dist/mainPage/index.esm.js.map +1 -0
- package/dist/mainPage/menu.d.ts +1 -2
- package/dist/mainPage/menu2.cjs.js +2 -0
- package/dist/mainPage/menu2.cjs.js.map +1 -0
- package/dist/mainPage/menu2.esm.js +184 -0
- package/dist/mainPage/menu2.esm.js.map +1 -0
- package/dist/n3Pane.d.ts +2 -3
- package/dist/n3Pane2.cjs.js +3 -0
- package/dist/n3Pane2.cjs.js.map +1 -0
- package/dist/n3Pane2.esm.js +52 -0
- package/dist/n3Pane2.esm.js.map +1 -0
- package/dist/outline/context.cjs.js +2 -0
- package/dist/outline/context.cjs.js.map +1 -0
- package/dist/outline/context.d.ts +3 -3
- package/dist/outline/context.esm.js +18 -0
- package/dist/outline/context.esm.js.map +1 -0
- package/dist/outline/manager2.cjs.js +3 -0
- package/dist/outline/manager2.cjs.js.map +1 -0
- package/dist/outline/manager2.esm.js +875 -0
- package/dist/outline/manager2.esm.js.map +1 -0
- package/dist/outline/outlineIcons.cjs.js +2 -0
- package/dist/outline/outlineIcons.cjs.js.map +1 -0
- package/dist/outline/outlineIcons.esm.js +10 -0
- package/dist/outline/outlineIcons.esm.js.map +1 -0
- package/dist/outline/propertyViews.cjs.js +2 -0
- package/dist/outline/propertyViews.cjs.js.map +1 -0
- package/dist/outline/propertyViews.esm.js +19 -0
- package/dist/outline/propertyViews.esm.js.map +1 -0
- package/dist/outline/queryByExample.cjs.js +2 -0
- package/dist/outline/queryByExample.cjs.js.map +1 -0
- package/dist/outline/queryByExample.esm.js +25 -0
- package/dist/outline/queryByExample.esm.js.map +1 -0
- package/dist/outline/userInput.cjs.js +61 -0
- package/dist/outline/userInput.cjs.js.map +1 -0
- package/dist/outline/userInput.esm.js +784 -0
- package/dist/outline/userInput.esm.js.map +1 -0
- package/dist/outline/viewAsImage.cjs.js +2 -0
- package/dist/outline/viewAsImage.cjs.js.map +1 -0
- package/dist/outline/viewAsImage.esm.js +10 -0
- package/dist/outline/viewAsImage.esm.js.map +1 -0
- package/dist/outline/viewAsMbox.cjs.js +2 -0
- package/dist/outline/viewAsMbox.cjs.js.map +1 -0
- package/dist/outline/viewAsMbox.esm.js +9 -0
- package/dist/outline/viewAsMbox.esm.js.map +1 -0
- package/dist/pad/padPane.d.ts +1 -2
- package/dist/pad/padPane2.cjs.js +2 -0
- package/dist/pad/padPane2.cjs.js.map +1 -0
- package/dist/pad/padPane2.esm.js +172 -0
- package/dist/pad/padPane2.esm.js.map +1 -0
- package/dist/playlist/playlistPane.cjs.js +2 -0
- package/dist/playlist/playlistPane.cjs.js.map +1 -0
- package/dist/playlist/playlistPane.esm.js +49 -0
- package/dist/playlist/playlistPane.esm.js.map +1 -0
- package/dist/profileUtils/ownerProfile.cjs.js +2 -0
- package/dist/profileUtils/ownerProfile.cjs.js.map +1 -0
- package/dist/profileUtils/ownerProfile.d.ts +1 -1
- package/dist/profileUtils/ownerProfile.esm.js +50 -0
- package/dist/profileUtils/ownerProfile.esm.js.map +1 -0
- package/dist/registerPanes.cjs.js +2 -0
- package/dist/registerPanes.cjs.js.map +1 -0
- package/dist/registerPanes.esm.js +45 -0
- package/dist/registerPanes.esm.js.map +1 -0
- package/dist/schedule/formsForSchedule.cjs.js +117 -0
- package/dist/schedule/formsForSchedule.cjs.js.map +1 -0
- package/dist/schedule/formsForSchedule.esm.js +6 -0
- package/dist/schedule/formsForSchedule.esm.js.map +1 -0
- package/dist/schedule/schedulePane.d.ts +2 -4
- package/dist/schedule/schedulePane2.cjs.js +8 -0
- package/dist/schedule/schedulePane2.cjs.js.map +1 -0
- package/dist/schedule/schedulePane2.esm.js +384 -0
- package/dist/schedule/schedulePane2.esm.js.map +1 -0
- package/dist/sharing/sharingPane.cjs.js +2 -0
- package/dist/sharing/sharingPane.cjs.js.map +1 -0
- package/dist/sharing/sharingPane.esm.js +22 -0
- package/dist/sharing/sharingPane.esm.js.map +1 -0
- package/dist/slideshow/slideshowPane.cjs.js +2 -0
- package/dist/slideshow/slideshowPane.cjs.js.map +1 -0
- package/dist/slideshow/slideshowPane.esm.js +46 -0
- package/dist/slideshow/slideshowPane.esm.js.map +1 -0
- package/dist/social/editProfileDetails.cjs.js +2 -0
- package/dist/social/editProfileDetails.cjs.js.map +1 -0
- package/dist/social/editProfileDetails.d.ts +1 -2
- package/dist/social/editProfileDetails.esm.js +10 -0
- package/dist/social/editProfileDetails.esm.js.map +1 -0
- package/dist/social/icons.cjs.js +82 -0
- package/dist/social/icons.cjs.js.map +1 -0
- package/dist/social/{icons.js → icons.esm.js} +12 -18
- package/dist/social/icons.esm.js.map +1 -0
- package/dist/social/socialPane.d.ts +2 -3
- package/dist/social/socialPane2.cjs.js +6 -0
- package/dist/social/socialPane2.cjs.js.map +1 -0
- package/dist/social/socialPane2.esm.js +326 -0
- package/dist/social/socialPane2.esm.js.map +1 -0
- package/dist/social/socialSections.cjs.js +2 -0
- package/dist/social/socialSections.cjs.js.map +1 -0
- package/dist/social/socialSections.d.ts +2 -2
- package/dist/social/socialSections.esm.js +221 -0
- package/dist/social/socialSections.esm.js.map +1 -0
- package/dist/social/triage.cjs.js +2 -0
- package/dist/social/triage.cjs.js.map +1 -0
- package/dist/social/triage.d.ts +2 -2
- package/dist/social/triage.esm.js +44 -0
- package/dist/social/triage.esm.js.map +1 -0
- package/dist/tabbed/tabbedPane.cjs.js +2 -0
- package/dist/tabbed/tabbedPane.cjs.js.map +1 -0
- package/dist/tabbed/tabbedPane.d.ts +1 -1
- package/dist/tabbed/tabbedPane.esm.js +38 -0
- package/dist/tabbed/tabbedPane.esm.js.map +1 -0
- package/dist/tableViewPane.cjs.js +2 -0
- package/dist/tableViewPane.cjs.js.map +1 -0
- package/dist/tableViewPane.esm.js +20 -0
- package/dist/tableViewPane.esm.js.map +1 -0
- package/dist/transaction/pane.cjs.js +8 -0
- package/dist/transaction/pane.cjs.js.map +1 -0
- package/dist/transaction/pane.esm.js +212 -0
- package/dist/transaction/pane.esm.js.map +1 -0
- package/dist/transaction/period.cjs.js +4 -0
- package/dist/transaction/period.cjs.js.map +1 -0
- package/dist/transaction/period.esm.js +126 -0
- package/dist/transaction/period.esm.js.map +1 -0
- package/dist/trip/tripPane.cjs.js +2 -0
- package/dist/trip/tripPane.cjs.js.map +1 -0
- package/dist/trip/tripPane.esm.js +85 -0
- package/dist/trip/tripPane.esm.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.dom.cjs.js +2 -0
- package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.dom.d.ts +1 -1
- package/dist/trustedApplications/trustedApplications.dom.esm.js +108 -0
- package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.utils.cjs.js +2 -0
- package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.utils.d.ts +1 -1
- package/dist/trustedApplications/trustedApplications.utils.esm.js +20 -0
- package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.view.cjs.js +2 -0
- package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.view.d.ts +1 -1
- package/dist/trustedApplications/trustedApplications.view.esm.js +41 -0
- package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -0
- package/dist/ui/pane.cjs.js +4 -0
- package/dist/ui/pane.cjs.js.map +1 -0
- package/dist/ui/pane.esm.js +56 -0
- package/dist/ui/pane.esm.js.map +1 -0
- package/dist/versionInfo.cjs.js +2 -0
- package/dist/versionInfo.cjs.js.map +1 -0
- package/dist/versionInfo.esm.js +40 -0
- package/dist/versionInfo.esm.js.map +1 -0
- package/dist/video/videoPane.cjs.js +2 -0
- package/dist/video/videoPane.cjs.js.map +1 -0
- package/dist/video/videoPane.esm.js +25 -0
- package/dist/video/videoPane.esm.js.map +1 -0
- package/package.json +35 -59
- package/dist/0314353e28ce6e5539af.svg +0 -9
- package/dist/04567ff683933c35c465.png +0 -0
- package/dist/10163fd9b5a0e00d63a0.png +0 -0
- package/dist/1234dcb2eec2e45f252b.png +0 -0
- package/dist/20899934157df4db56cb.png +0 -0
- package/dist/33760bf79f097f449da5.png +0 -0
- package/dist/4cceba29ab33b1ddd9bb.svg +0 -6
- package/dist/578d2b6ed32e7624164e.png +0 -0
- package/dist/5f62a5b2b7e99b9640c7.png +0 -0
- package/dist/6525766ecd288ec60129.png +0 -0
- package/dist/7800be6f6c4b5b0f4f20.png +0 -0
- package/dist/7b7538c6f6b317968009.svg +0 -9
- package/dist/92d03142abe6efc0b42d.svg +0 -6
- package/dist/976473cf5fe24d657d4b.png +0 -0
- package/dist/RDFXMLPane.css +0 -70
- package/dist/RDFXMLPane.js +0 -100
- package/dist/argument/argumentPane.js +0 -60
- package/dist/attach/attachPane.js +0 -393
- package/dist/audio/audioPane.js +0 -181
- package/dist/bda84f59e7216675a208.png +0 -0
- package/dist/cd68e8f3990ba8b2139e.png +0 -0
- package/dist/classInstancePane.js +0 -91
- package/dist/dashboard/basicPreferences.js +0 -147
- package/dist/dashboard/dashboardPane.js +0 -73
- package/dist/dashboard/homepage.js +0 -42
- package/dist/dataContentPane.css +0 -271
- package/dist/dataContentPane.js +0 -226
- package/dist/defaultPane.css +0 -97
- package/dist/defaultPane.js +0 -81
- package/dist/dokieli/dokieliPane.js +0 -74
- package/dist/e7074a7e2cb69e51cfd3.png +0 -0
- package/dist/f3772696fb7ee53c23d8.png +0 -0
- package/dist/form/formPane.css +0 -120
- package/dist/form/pane.js +0 -250
- package/dist/home/homePane.js +0 -74
- package/dist/humanReadablePane.css +0 -129
- package/dist/humanReadablePane.js +0 -243
- package/dist/icons/clock.svg +0 -7
- package/dist/icons/comment.svg +0 -6
- package/dist/icons/dashboard.svg +0 -9
- package/dist/icons/downArrow.svg +0 -6
- package/dist/icons/folder.svg +0 -6
- package/dist/icons/friends.svg +0 -9
- package/dist/icons/help.svg +0 -8
- package/dist/icons/iconHelper.js +0 -23
- package/dist/icons/person.svg +0 -6
- package/dist/icons/personInCircle.svg +0 -8
- package/dist/icons/sharing.svg +0 -10
- package/dist/icons/signOut.svg +0 -8
- package/dist/icons/signUp.svg +0 -9
- package/dist/icons/star.svg +0 -3
- package/dist/imagePane.css +0 -4
- package/dist/imagePane.js +0 -67
- package/dist/index.js +0 -123
- package/dist/internal/internalPane.css +0 -14
- package/dist/internal/internalPane.js +0 -183
- package/dist/mainPage/footer.js +0 -29
- package/dist/mainPage/header.js +0 -203
- package/dist/mainPage/index.js +0 -78
- package/dist/mainPage/menu.css +0 -243
- package/dist/mainPage/menu.js +0 -449
- package/dist/microblogPane/mbStyle.css +0 -267
- package/dist/microblogPane/microblogPane.js +0 -1031
- package/dist/n3Pane.css +0 -49
- package/dist/n3Pane.js +0 -88
- package/dist/outline/context.js +0 -21
- package/dist/outline/manager.css +0 -78
- package/dist/outline/manager.js +0 -2115
- package/dist/outline/outlineIcons.js +0 -126
- package/dist/outline/propertyViews.js +0 -43
- package/dist/outline/queryByExample.js +0 -285
- package/dist/outline/userInput.js +0 -1821
- package/dist/outline/viewAsImage.js +0 -14
- package/dist/outline/viewAsMbox.js +0 -21
- package/dist/pad/padPane.css +0 -40
- package/dist/pad/padPane.js +0 -421
- package/dist/playlist/playlistPane.js +0 -119
- package/dist/profileUtils/ownerProfile.js +0 -84
- package/dist/registerPanes.js +0 -145
- package/dist/schedule/schedulePane.css +0 -294
- package/dist/schedule/schedulePane.js +0 -1022
- package/dist/sharing/sharingPane.js +0 -48
- package/dist/slideshow/slideshowPane.js +0 -79
- package/dist/social/editProfileDetails.js +0 -362
- package/dist/social/socialPane.css +0 -1464
- package/dist/social/socialPane.js +0 -651
- package/dist/social/socialSections.js +0 -393
- package/dist/social/spinner.js +0 -13
- package/dist/social/triage.js +0 -79
- package/dist/solid-panes.js +0 -87502
- package/dist/solid-panes.js.map +0 -1
- package/dist/solid-panes.min.js +0 -3811
- package/dist/solid-panes.min.js.map +0 -1
- package/dist/styles/tabbedtab.css +0 -1066
- package/dist/styles/utilities.css +0 -5
- package/dist/tabbed/tabbedPane.js +0 -59
- package/dist/tableViewPane.js +0 -56
- package/dist/transaction/pane.js +0 -477
- package/dist/transaction/period.js +0 -323
- package/dist/trip/tripPane.js +0 -174
- package/dist/trustedApplications/trustedApplications.dom.js +0 -145
- package/dist/trustedApplications/trustedApplications.utils.js +0 -23
- package/dist/trustedApplications/trustedApplications.view.js +0 -55
- package/dist/ui/pane.js +0 -146
- package/dist/versionInfo.js +0 -41
- package/dist/video/videoPane.js +0 -42
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new.esm.js","names":[],"sources":["../../src/dokieli/new.js"],"sourcesContent":["const DOKIELI_TEMPLATE = `<!DOCTYPE html>\n<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\" />\n <title></title>\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <link href=\"https://dokie.li/media/css/basic.css\" media=\"all\" rel=\"stylesheet\" title=\"Basic\" />\n <link href=\"https://dokie.li/media/css/dokieli.css\" media=\"all\" rel=\"stylesheet\" />\n <script src=\"https://dokie.li/scripts/dokieli.js\"></script>\n </head>\n\n <body about=\"\" prefix=\"rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#\" typeof=\"schema:CreativeWork prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>\n`\n\nexport default DOKIELI_TEMPLATE\n"],"mappings":";AAAA,IAAM,IAAmB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.formPane a,.formPane a:link{color:var(--color-text-link,#3b5998);text-decoration:none}.formPane a:visited{color:var(--color-text-link-visited,#3b5998);text-decoration:none}.formPane a:hover{color:var(--color-text-link-hover,#3b5998);font-weight:700}.formPane a:active{color:var(--color-text-link-active,#888);text-decoration:none}.formPane__message,.formPaneMessage{color:#666;margin:var(--spacing-xs,.5em) 0;padding:var(--spacing-xs,.35em) var(--spacing-xs,.5em)}.formPane__message--info{background-color:var(--color-main-block-bg,#eee)}.formPane__message--error{background-color:var(--color-log-error-bg,#fee)}.formPane__editButton{padding:var(--spacing-xs,.5rem);float:none;border:.5rem solid #fff;align-self:center;margin-left:auto;font-size:100%}.formPane .formPane__mobileTextareaValue>div{min-width:0;display:block;position:relative}.formPane .formPane__mobileTextareaValue>div>textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.formPane .formPane__mobileTextareaValue>div>button[type=button]{position:absolute;top:0;right:0;float:none!important}.formPane[data-layout=mobile] .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane[data-layout=mobile] .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane[data-layout=mobile] .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane[data-layout=mobile] .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}@media (width<=960px){.formPane .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-ui");t=e.__toESM(t);let n=require("solid-logic"),r=require("rdflib");r=e.__toESM(r);var i=t.ns;function a(e){return e?.termType===`NamedNode`}function o(e,t){let n=t.doc?t.doc():void 0,r=e.each(t,i.rdf(`type`),void 0,n).filter(a),s=r.some(e=>e.sameTerm(i.ui(`Group`))),c=r.some(e=>!e.sameTerm(i.ui(`Group`))&&!e.sameTerm(i.ui(`Form`))),l=!!e.any(t,i.ui(`property`),void 0,n),u=e.any(t,i.ui(`parts`),void 0,n),d=!!u?.elements?.length||e.each(t,i.ui(`part`),void 0,n).length>0;s&&c&&l&&!d&&e.removeMany(t,i.rdf(`type`),i.ui(`Group`),n);let f=u?.elements??[];for(let t of f)a(t)&&o(e,t);let p=e.each(t,i.ui(`part`),void 0,n);for(let t of p)a(t)&&o(e,t)}function s(e){let t=Array.from(e.querySelectorAll(`textarea`));for(let e of t){let t=e.parentElement;for(;t;){let e=t.firstElementChild;if(e&&(e.classList.contains(`formFieldName`)||e.querySelector(`a`)!==null)&&t.children.length>=2){t.classList.add(`formPane__mobileTextareaRow`),e.classList.add(`formPane__mobileTextareaLabel`),t.children[1].classList.add(`formPane__mobileTextareaValue`);break}t=t.parentElement}}}var c={icon:t.icons.iconBase+`noun_122196.svg`,name:`form`,audience:[i.solid(`PowerUser`)],label:function(e,n){let r=t.widgets.formsFor(e).length;return t.log.debug(`Form pane: forms for `+e+`: `+r),r?``+r+` forms`:null},render:function(e,c){let l=c.session.store,u=c.dom,d=u.createElement(`div`);d.setAttribute(`class`,`formPane`);function f(e){let t=c.environment??{};e.dataset.layout=t.layout??`desktop`}f(d);let p=function(e,t=`info`){let n=u.createElement(`p`);return n.className=`formPane__message formPane__message--${t}`,d.appendChild(n).textContent=e,n},m=function(e){return p(e,`error`)},h=function(e,t){e||m(`Sorry, failed to save your change:
|
|
2
|
+
`+t)},g=n.authn.currentUser();g?l.each(g,i.ui(`workspace`)).length===0&&p(`You don't seem to have any workspaces defined. A workspace is a place on the web (http://..) or in the file system (file:///) to store application data.
|
|
3
|
+
`):p(`You are not logged in. If you log in and have workspaces then you would be able to select workspace in which to put this new information`);let _=function(e,n){l.fetcher.nowOrWhenFetched(e.uri,n,function(i,a){if(!i)return m(`Cannot load store `+e.uri+`: `+a);let c=t.widgets.formsFor(n);for(let i of c){o(l,i);let a=u.createElement(`h4`);if(a.classList.add(`formPane__heading`),d.appendChild(a),i.uri){let e=r.Util.uri.document(i.uri);e.uri!==i.uri&&d.appendChild(t.widgets.editFormButton(u,d,i,e,h)).classList.add(`formPane__editButton`)}let c=u.createElement(`a`);c.classList.add(`formPane__headingLink`),c.setAttribute(`href`,i.uri),a.insertBefore(c,a.firstChild),c.textContent=t.utils.label(i,!0),t.widgets.appendForm(u,d,{},n,i,e,h),s(d)}})},v=null,y=r.Util.uri.docpart(e.uri);l.updater.editable(y,l)&&(v=e.doc());let b=l.any(l.sym(y),i.link(`annotationStore`));if(!v&&a(b)&&(v=b),!v){let t=new Map;l.statementsMatching(e).forEach(function(e){e.why.value&&t.set(e.why.value,1)}),l.statementsMatching(void 0,void 0,e).forEach(function(e){e.why.value&&t.set(e.why.value,2)});let n=Array.from(t.entries()).sort(function([e,t],[n,r]){return t-r||e.localeCompare(n)});for(let[e]of n)if(e&&l.updater.editable(e,l)){v=l.sym(e);break}}let x=`2014`;if(v)_(v,e);else{m(`No suitable store is known, to edit <`+e.uri+`>.`);let n=t.login.selectWorkspace(u,{noun:`form`,appPathSegment:`form`},function(t){let n=t?l.sym(t):null;if(!n){m(`Workspace selection was cancelled.`);return}p(`Workspace selected OK: `+n.uri);let r=l.each(void 0,i.space(`workspace`),n).filter(a);for(let t=0;t<r.length;t++){let n=r[t],o=l.any(n,i.space(`store`)),s=l.any(n,i.cal(`dtstart`))?.value,c=l.any(n,i.cal(`dtend`))?.value;if(a(o)&&s&&c&&s<=x&&c>x){_(o,e);break}else m(`Note no suitable annotation store in activity: `+n)}});d.appendChild(n)}return d}};exports.formPane=c;
|
|
4
|
+
//# sourceMappingURL=pane.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane.cjs.js","names":[],"sources":["../../src/form/pane.ts"],"sourcesContent":["/*\n ** Pane for running existing forms for any object\n **\n */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport type { RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './formPane.css'\nconst ns = UI.ns\n\ntype WorkspaceSelectionDetails = {\n noun: string\n appPathSegment: string\n}\n\nfunction isNamedNode (term: { termType?: string } | null | undefined): term is NamedNode {\n return term?.termType === 'NamedNode'\n}\n\n/* The following helper was generated by AI GPT-5.4 Model */\n/* Prompt: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing. */\nfunction normalizeAmbiguousFieldTypes (store: typeof $rdf.graph extends () => infer T ? T : never, form: NamedNode): void {\n const formDoc = form.doc ? form.doc() : undefined\n const types = store.each(form, ns.rdf('type'), undefined, formDoc).filter(isNamedNode)\n const hasGroupType = types.some(type => type.sameTerm(ns.ui('Group')))\n const hasOtherFieldType = types.some(type => !type.sameTerm(ns.ui('Group')) && !type.sameTerm(ns.ui('Form')))\n const hasProperty = !!store.any(form, ns.ui('property'), undefined, formDoc)\n const partsList = store.any(form, ns.ui('parts'), undefined, formDoc) as { elements?: unknown[] } | null\n const hasParts = !!partsList?.elements?.length || store.each(form, ns.ui('part'), undefined, formDoc).length > 0\n\n // Some legacy forms mark a leaf field as both ui:Group and a concrete input type.\n // solid-ui may then choose the Group renderer and produce an empty nested box.\n if (hasGroupType && hasOtherFieldType && hasProperty && !hasParts) {\n store.removeMany(form, ns.rdf('type'), ns.ui('Group'), formDoc)\n }\n\n const listParts = partsList?.elements ?? []\n for (const part of listParts) {\n if (isNamedNode(part as { termType?: string })) {\n normalizeAmbiguousFieldTypes(store, part as NamedNode)\n }\n }\n\n const unorderedParts = store.each(form, ns.ui('part'), undefined, formDoc)\n for (const part of unorderedParts) {\n if (isNamedNode(part)) {\n normalizeAmbiguousFieldTypes(store, part)\n }\n }\n}\n\nfunction tagMobileTextareaRows (renderedForm: HTMLElement): void {\n const textareas = Array.from(renderedForm.querySelectorAll('textarea'))\n\n for (const textarea of textareas) {\n let row: HTMLDivElement | null = textarea.parentElement as HTMLDivElement | null\n\n while (row) {\n const firstChild = row.firstElementChild as HTMLElement | null\n const hasLabelColumn = !!firstChild && (\n firstChild.classList.contains('formFieldName') ||\n firstChild.querySelector('a') !== null\n )\n\n if (hasLabelColumn && row.children.length >= 2) {\n row.classList.add('formPane__mobileTextareaRow')\n firstChild.classList.add('formPane__mobileTextareaLabel')\n const valueColumn = row.children[1] as HTMLElement\n valueColumn.classList.add('formPane__mobileTextareaValue')\n break\n }\n\n row = row.parentElement as HTMLDivElement | null\n }\n }\n}\n\nexport const formPane: PaneDefinition = {\n icon: UI.icons.iconBase + 'noun_122196.svg',\n\n name: 'form',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject: NamedNode, _context: DataBrowserContext): string | null {\n const n = UI.widgets.formsFor(subject).length\n UI.log.debug('Form pane: forms for ' + subject + ': ' + n)\n if (!n) return null\n return '' + n + ' forms'\n },\n\n render: function (subject: NamedNode, context: DataBrowserContext): HTMLDivElement {\n const kb = context.session.store\n const dom = context.dom\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane')\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n applyEnvironmentAttributes(box)\n\n const mention = function (\n message: string,\n modifier: 'info' | 'error' = 'info'\n ): HTMLParagraphElement {\n const pre = dom.createElement('p')\n pre.className = `formPane__message formPane__message--${modifier}`\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function (message: string): HTMLParagraphElement {\n return mention(message, 'error')\n }\n\n const complainIfBad = function (ok: boolean, body: string): void {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // The question of where to store this data about subject\n // This in general needs a whole lot more thought\n // and it connects to the discoverbility through links\n\n // const t = kb.findTypeURIs(subject)\n\n const me = authn.currentUser()\n\n if (!me) {\n mention(\n 'You are not logged in. If you log in and have ' +\n 'workspaces then you would be able to select workspace in which ' +\n 'to put this new information'\n )\n } else {\n const ws = kb.each(me, ns.ui('workspace'))\n if (ws.length === 0) {\n mention(\n 'You don\\'t seem to have any workspaces defined. ' +\n 'A workspace is a place on the web (http://..) or in ' +\n 'the file system (file:///) to store application data.\\n'\n )\n } else {\n // @@\n }\n }\n\n // Render forms using a given store\n\n const renderFormsFor = function (storeNode: NamedNode, targetSubject: NamedNode): void {\n kb.fetcher.nowOrWhenFetched(\n storeNode.uri,\n targetSubject as unknown as Parameters<typeof kb.fetcher.nowOrWhenFetched>[1],\n function (ok, body) {\n if (!ok) return complain('Cannot load store ' + storeNode.uri + ': ' + body)\n\n // Render the forms\n\n const forms = UI.widgets.formsFor(targetSubject) as NamedNode[]\n\n // complain('Form for editing this form:');\n for (const form of forms) {\n normalizeAmbiguousFieldTypes(kb as never, form)\n\n const heading = dom.createElement('h4')\n heading.classList.add('formPane__heading')\n box.appendChild(heading)\n /* The edit Form is not working in the local environment. it does not find\n the ui FormForm ontology. Need to research further and check in production. */\n if (form.uri) {\n const formStore = $rdf.Util.uri.document(form.uri)\n if (formStore.uri !== form.uri) {\n const editButton = box.appendChild(\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formStore,\n complainIfBad\n )\n )\n editButton.classList.add('formPane__editButton')\n }\n }\n\n const anchor = dom.createElement('a')\n anchor.classList.add('formPane__headingLink')\n anchor.setAttribute('href', form.uri)\n heading.insertBefore(anchor, heading.firstChild)\n anchor.textContent = UI.utils.label(form, true)\n\n /* Keep tis as a reminder to let a New one have its URI given by user\n mention(\"Where will this information be stored?\")\n const ele = dom.createElement('input');\n box.appendChild(ele);\n ele.setAttribute('type', 'text');\n ele.setAttribute('size', '72');\n ele.setAttribute('maxlength', '1024');\n ele.setAttribute('style', 'font-size: 80%; color:#222;');\n ele.value = store.uri\n */\n\n UI.widgets.appendForm(\n dom,\n box,\n {},\n targetSubject,\n form,\n storeNode,\n complainIfBad\n )\n tagMobileTextareaRows(box)\n }\n }\n ) // end: when store loded\n } // renderFormsFor\n\n // Figure out what store\n\n // Which places are editable and have stuff about the subject?\n\n let targetStore: NamedNode | null = null\n\n // 1. The document URI of the subject itself\n const docuri = $rdf.Util.uri.docpart(subject.uri)\n if (kb.updater.editable(docuri, kb)) {\n targetStore = subject.doc()\n } // an editable data file with hash\n\n const annotationStore = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!targetStore && isNamedNode(annotationStore)) {\n targetStore = annotationStore\n }\n\n // 2. where stuff is already stored\n if (!targetStore) {\n const docs = new Map<string, number>()\n kb.statementsMatching(subject).forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 1)\n }\n })\n kb\n .statementsMatching(undefined, undefined, subject)\n .forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 2)\n }\n })\n const docList = Array.from(docs.entries()).sort(function ([uriA, scoreA], [uriB, scoreB]) {\n return scoreA - scoreB || uriA.localeCompare(uriB)\n })\n for (const [uri] of docList) {\n if (uri && kb.updater.editable(uri, kb)) {\n targetStore = kb.sym(uri)\n break\n }\n }\n }\n\n // 3. In a workspace store\n const date = '2014' // @@@@@@@@@@@@ pass as parameter\n\n if (targetStore) {\n // mention(\"@@ Ok, we have a store <\" + store.uri + \">.\");\n renderFormsFor(targetStore, subject)\n } else {\n complain('No suitable store is known, to edit <' + subject.uri + '>.')\n const workspaceDetails: WorkspaceSelectionDetails = {\n noun: 'form',\n appPathSegment: 'form'\n }\n const foobarbaz = UI.login.selectWorkspace(dom, workspaceDetails, function (workspaceUri: string | null) {\n const workspace = workspaceUri ? kb.sym(workspaceUri) : null\n if (!workspace) {\n complain('Workspace selection was cancelled.')\n return\n }\n mention('Workspace selected OK: ' + workspace.uri)\n\n const activities = kb.each(undefined, ns.space('workspace'), workspace).filter(isNamedNode)\n for (let j = 0; j < activities.length; j++) {\n const act = activities[j]\n\n const subjectDoc2 = kb.any(act, ns.space('store'))\n const start = kb.any(act, ns.cal('dtstart'))?.value\n const end = kb.any(act, ns.cal('dtend'))?.value\n if (isNamedNode(subjectDoc2) && start && end && start <= date && end > date) {\n renderFormsFor(subjectDoc2, subject)\n break\n } else {\n complain('Note no suitable annotation store in activity: ' + act)\n }\n }\n })\n box.appendChild(foobarbaz)\n }\n\n return box\n }\n}\n"],"mappings":"8LAYA,IAAM,EAAK,EAAG,GAOd,SAAS,EAAa,EAAmE,CACvF,OAAO,GAAM,WAAa,WAC5B,CAIA,SAAS,EAA8B,EAA4D,EAAuB,CACxH,IAAM,EAAU,EAAK,IAAM,EAAK,IAAI,EAAI,IAAA,GAClC,EAAQ,EAAM,KAAK,EAAM,EAAG,IAAI,MAAM,EAAG,IAAA,GAAW,CAAO,CAAC,CAAC,OAAO,CAAW,EAC/E,EAAe,EAAM,KAAK,GAAQ,EAAK,SAAS,EAAG,GAAG,OAAO,CAAC,CAAC,EAC/D,EAAoB,EAAM,KAAK,GAAQ,CAAC,EAAK,SAAS,EAAG,GAAG,OAAO,CAAC,GAAK,CAAC,EAAK,SAAS,EAAG,GAAG,MAAM,CAAC,CAAC,EACtG,EAAc,CAAC,CAAC,EAAM,IAAI,EAAM,EAAG,GAAG,UAAU,EAAG,IAAA,GAAW,CAAO,EACrE,EAAY,EAAM,IAAI,EAAM,EAAG,GAAG,OAAO,EAAG,IAAA,GAAW,CAAO,EAC9D,EAAW,CAAC,CAAC,GAAW,UAAU,QAAU,EAAM,KAAK,EAAM,EAAG,GAAG,MAAM,EAAG,IAAA,GAAW,CAAO,CAAC,CAAC,OAAS,EAI3G,GAAgB,GAAqB,GAAe,CAAC,GACvD,EAAM,WAAW,EAAM,EAAG,IAAI,MAAM,EAAG,EAAG,GAAG,OAAO,EAAG,CAAO,EAGhE,IAAM,EAAY,GAAW,UAAY,CAAC,EAC1C,IAAK,IAAM,KAAQ,EACb,EAAY,CAA6B,GAC3C,EAA6B,EAAO,CAAiB,EAIzD,IAAM,EAAiB,EAAM,KAAK,EAAM,EAAG,GAAG,MAAM,EAAG,IAAA,GAAW,CAAO,EACzE,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AAC,CAAC,OAAO,CAAW,EAC1F,IAAK,IAAI,EAAI,EAAG,EAAI,EAAW,OAAQ,IAAK,CAC1C,IAAM,EAAM,EAAW,GAEjB,EAAc,EAAG,IAAI,EAAK,EAAG,MAAM,OAAO,CAAC,EAC3C,EAAQ,EAAG,IAAI,EAAK,EAAG,IAAI,SAAS,CAAC,CAAC,EAAE,MACxC,EAAM,EAAG,IAAI,EAAK,EAAG,IAAI,OAAO,CAAC,CAAC,EAAE,MAC1C,GAAI,EAAY,CAAW,GAAK,GAAS,GAAO,GAAS,GAAQ,EAAM,EAAM,CAC3E,EAAe,EAAa,CAAO,EACnC,KACF,MACE,EAAS,kDAAoD,CAAG,CAEpE,CACF,CAAC,EACD,EAAI,YAAY,CAAS,CAC3B,CAEA,OAAO,CACT,CACF"}
|
package/dist/form/pane.d.ts
CHANGED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.formPane a,.formPane a:link{color:var(--color-text-link,#3b5998);text-decoration:none}.formPane a:visited{color:var(--color-text-link-visited,#3b5998);text-decoration:none}.formPane a:hover{color:var(--color-text-link-hover,#3b5998);font-weight:700}.formPane a:active{color:var(--color-text-link-active,#888);text-decoration:none}.formPane__message,.formPaneMessage{color:#666;margin:var(--spacing-xs,.5em) 0;padding:var(--spacing-xs,.35em) var(--spacing-xs,.5em)}.formPane__message--info{background-color:var(--color-main-block-bg,#eee)}.formPane__message--error{background-color:var(--color-log-error-bg,#fee)}.formPane__editButton{padding:var(--spacing-xs,.5rem);float:none;border:.5rem solid #fff;align-self:center;margin-left:auto;font-size:100%}.formPane .formPane__mobileTextareaValue>div{min-width:0;display:block;position:relative}.formPane .formPane__mobileTextareaValue>div>textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.formPane .formPane__mobileTextareaValue>div>button[type=button]{position:absolute;top:0;right:0;float:none!important}.formPane[data-layout=mobile] .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane[data-layout=mobile] .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane[data-layout=mobile] .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane[data-layout=mobile] .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}@media (width<=960px){.formPane .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
import * as e from "solid-ui";
|
|
3
|
+
import { authn as t } from "solid-logic";
|
|
4
|
+
import * as n from "rdflib";
|
|
5
|
+
//#region src/form/pane.ts
|
|
6
|
+
var r = e.ns;
|
|
7
|
+
function i(e) {
|
|
8
|
+
return e?.termType === "NamedNode";
|
|
9
|
+
}
|
|
10
|
+
function a(e, t) {
|
|
11
|
+
let n = t.doc ? t.doc() : void 0, o = e.each(t, r.rdf("type"), void 0, n).filter(i), s = o.some((e) => e.sameTerm(r.ui("Group"))), c = o.some((e) => !e.sameTerm(r.ui("Group")) && !e.sameTerm(r.ui("Form"))), l = !!e.any(t, r.ui("property"), void 0, n), u = e.any(t, r.ui("parts"), void 0, n), d = !!u?.elements?.length || e.each(t, r.ui("part"), void 0, n).length > 0;
|
|
12
|
+
s && c && l && !d && e.removeMany(t, r.rdf("type"), r.ui("Group"), n);
|
|
13
|
+
let f = u?.elements ?? [];
|
|
14
|
+
for (let t of f) i(t) && a(e, t);
|
|
15
|
+
let p = e.each(t, r.ui("part"), void 0, n);
|
|
16
|
+
for (let t of p) i(t) && a(e, t);
|
|
17
|
+
}
|
|
18
|
+
function o(e) {
|
|
19
|
+
let t = Array.from(e.querySelectorAll("textarea"));
|
|
20
|
+
for (let e of t) {
|
|
21
|
+
let t = e.parentElement;
|
|
22
|
+
for (; t;) {
|
|
23
|
+
let e = t.firstElementChild;
|
|
24
|
+
if (e && (e.classList.contains("formFieldName") || e.querySelector("a") !== null) && t.children.length >= 2) {
|
|
25
|
+
t.classList.add("formPane__mobileTextareaRow"), e.classList.add("formPane__mobileTextareaLabel"), t.children[1].classList.add("formPane__mobileTextareaValue");
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
t = t.parentElement;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
var s = {
|
|
33
|
+
icon: e.icons.iconBase + "noun_122196.svg",
|
|
34
|
+
name: "form",
|
|
35
|
+
audience: [r.solid("PowerUser")],
|
|
36
|
+
label: function(t, n) {
|
|
37
|
+
let r = e.widgets.formsFor(t).length;
|
|
38
|
+
return e.log.debug("Form pane: forms for " + t + ": " + r), r ? "" + r + " forms" : null;
|
|
39
|
+
},
|
|
40
|
+
render: function(s, c) {
|
|
41
|
+
let l = c.session.store, u = c.dom, d = u.createElement("div");
|
|
42
|
+
d.setAttribute("class", "formPane");
|
|
43
|
+
function f(e) {
|
|
44
|
+
let t = c.environment ?? {};
|
|
45
|
+
e.dataset.layout = t.layout ?? "desktop";
|
|
46
|
+
}
|
|
47
|
+
f(d);
|
|
48
|
+
let p = function(e, t = "info") {
|
|
49
|
+
let n = u.createElement("p");
|
|
50
|
+
return n.className = `formPane__message formPane__message--${t}`, d.appendChild(n).textContent = e, n;
|
|
51
|
+
}, m = function(e) {
|
|
52
|
+
return p(e, "error");
|
|
53
|
+
}, h = function(e, t) {
|
|
54
|
+
e || m("Sorry, failed to save your change:\n" + t);
|
|
55
|
+
}, g = t.currentUser();
|
|
56
|
+
g ? l.each(g, r.ui("workspace")).length === 0 && p("You don't seem to have any workspaces defined. A workspace is a place on the web (http://..) or in the file system (file:///) to store application data.\n") : p("You are not logged in. If you log in and have workspaces then you would be able to select workspace in which to put this new information");
|
|
57
|
+
let _ = function(t, r) {
|
|
58
|
+
l.fetcher.nowOrWhenFetched(t.uri, r, function(i, s) {
|
|
59
|
+
if (!i) return m("Cannot load store " + t.uri + ": " + s);
|
|
60
|
+
let c = e.widgets.formsFor(r);
|
|
61
|
+
for (let i of c) {
|
|
62
|
+
a(l, i);
|
|
63
|
+
let s = u.createElement("h4");
|
|
64
|
+
if (s.classList.add("formPane__heading"), d.appendChild(s), i.uri) {
|
|
65
|
+
let t = n.Util.uri.document(i.uri);
|
|
66
|
+
t.uri !== i.uri && d.appendChild(e.widgets.editFormButton(u, d, i, t, h)).classList.add("formPane__editButton");
|
|
67
|
+
}
|
|
68
|
+
let c = u.createElement("a");
|
|
69
|
+
c.classList.add("formPane__headingLink"), c.setAttribute("href", i.uri), s.insertBefore(c, s.firstChild), c.textContent = e.utils.label(i, !0), e.widgets.appendForm(u, d, {}, r, i, t, h), o(d);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}, v = null, y = n.Util.uri.docpart(s.uri);
|
|
73
|
+
l.updater.editable(y, l) && (v = s.doc());
|
|
74
|
+
let b = l.any(l.sym(y), r.link("annotationStore"));
|
|
75
|
+
if (!v && i(b) && (v = b), !v) {
|
|
76
|
+
let e = /* @__PURE__ */ new Map();
|
|
77
|
+
l.statementsMatching(s).forEach(function(t) {
|
|
78
|
+
t.why.value && e.set(t.why.value, 1);
|
|
79
|
+
}), l.statementsMatching(void 0, void 0, s).forEach(function(t) {
|
|
80
|
+
t.why.value && e.set(t.why.value, 2);
|
|
81
|
+
});
|
|
82
|
+
let t = Array.from(e.entries()).sort(function([e, t], [n, r]) {
|
|
83
|
+
return t - r || e.localeCompare(n);
|
|
84
|
+
});
|
|
85
|
+
for (let [e] of t) if (e && l.updater.editable(e, l)) {
|
|
86
|
+
v = l.sym(e);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
let x = "2014";
|
|
91
|
+
if (v) _(v, s);
|
|
92
|
+
else {
|
|
93
|
+
m("No suitable store is known, to edit <" + s.uri + ">.");
|
|
94
|
+
let t = e.login.selectWorkspace(u, {
|
|
95
|
+
noun: "form",
|
|
96
|
+
appPathSegment: "form"
|
|
97
|
+
}, function(e) {
|
|
98
|
+
let t = e ? l.sym(e) : null;
|
|
99
|
+
if (!t) {
|
|
100
|
+
m("Workspace selection was cancelled.");
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
p("Workspace selected OK: " + t.uri);
|
|
104
|
+
let n = l.each(void 0, r.space("workspace"), t).filter(i);
|
|
105
|
+
for (let e = 0; e < n.length; e++) {
|
|
106
|
+
let t = n[e], a = l.any(t, r.space("store")), o = l.any(t, r.cal("dtstart"))?.value, c = l.any(t, r.cal("dtend"))?.value;
|
|
107
|
+
if (i(a) && o && c && o <= x && c > x) {
|
|
108
|
+
_(a, s);
|
|
109
|
+
break;
|
|
110
|
+
} else m("Note no suitable annotation store in activity: " + t);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
d.appendChild(t);
|
|
114
|
+
}
|
|
115
|
+
return d;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
//#endregion
|
|
119
|
+
export { s as formPane };
|
|
120
|
+
|
|
121
|
+
//# sourceMappingURL=pane.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane.esm.js","names":[],"sources":["../../src/form/pane.ts"],"sourcesContent":["/*\n ** Pane for running existing forms for any object\n **\n */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport type { RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './formPane.css'\nconst ns = UI.ns\n\ntype WorkspaceSelectionDetails = {\n noun: string\n appPathSegment: string\n}\n\nfunction isNamedNode (term: { termType?: string } | null | undefined): term is NamedNode {\n return term?.termType === 'NamedNode'\n}\n\n/* The following helper was generated by AI GPT-5.4 Model */\n/* Prompt: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing. */\nfunction normalizeAmbiguousFieldTypes (store: typeof $rdf.graph extends () => infer T ? T : never, form: NamedNode): void {\n const formDoc = form.doc ? form.doc() : undefined\n const types = store.each(form, ns.rdf('type'), undefined, formDoc).filter(isNamedNode)\n const hasGroupType = types.some(type => type.sameTerm(ns.ui('Group')))\n const hasOtherFieldType = types.some(type => !type.sameTerm(ns.ui('Group')) && !type.sameTerm(ns.ui('Form')))\n const hasProperty = !!store.any(form, ns.ui('property'), undefined, formDoc)\n const partsList = store.any(form, ns.ui('parts'), undefined, formDoc) as { elements?: unknown[] } | null\n const hasParts = !!partsList?.elements?.length || store.each(form, ns.ui('part'), undefined, formDoc).length > 0\n\n // Some legacy forms mark a leaf field as both ui:Group and a concrete input type.\n // solid-ui may then choose the Group renderer and produce an empty nested box.\n if (hasGroupType && hasOtherFieldType && hasProperty && !hasParts) {\n store.removeMany(form, ns.rdf('type'), ns.ui('Group'), formDoc)\n }\n\n const listParts = partsList?.elements ?? []\n for (const part of listParts) {\n if (isNamedNode(part as { termType?: string })) {\n normalizeAmbiguousFieldTypes(store, part as NamedNode)\n }\n }\n\n const unorderedParts = store.each(form, ns.ui('part'), undefined, formDoc)\n for (const part of unorderedParts) {\n if (isNamedNode(part)) {\n normalizeAmbiguousFieldTypes(store, part)\n }\n }\n}\n\nfunction tagMobileTextareaRows (renderedForm: HTMLElement): void {\n const textareas = Array.from(renderedForm.querySelectorAll('textarea'))\n\n for (const textarea of textareas) {\n let row: HTMLDivElement | null = textarea.parentElement as HTMLDivElement | null\n\n while (row) {\n const firstChild = row.firstElementChild as HTMLElement | null\n const hasLabelColumn = !!firstChild && (\n firstChild.classList.contains('formFieldName') ||\n firstChild.querySelector('a') !== null\n )\n\n if (hasLabelColumn && row.children.length >= 2) {\n row.classList.add('formPane__mobileTextareaRow')\n firstChild.classList.add('formPane__mobileTextareaLabel')\n const valueColumn = row.children[1] as HTMLElement\n valueColumn.classList.add('formPane__mobileTextareaValue')\n break\n }\n\n row = row.parentElement as HTMLDivElement | null\n }\n }\n}\n\nexport const formPane: PaneDefinition = {\n icon: UI.icons.iconBase + 'noun_122196.svg',\n\n name: 'form',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject: NamedNode, _context: DataBrowserContext): string | null {\n const n = UI.widgets.formsFor(subject).length\n UI.log.debug('Form pane: forms for ' + subject + ': ' + n)\n if (!n) return null\n return '' + n + ' forms'\n },\n\n render: function (subject: NamedNode, context: DataBrowserContext): HTMLDivElement {\n const kb = context.session.store\n const dom = context.dom\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane')\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n applyEnvironmentAttributes(box)\n\n const mention = function (\n message: string,\n modifier: 'info' | 'error' = 'info'\n ): HTMLParagraphElement {\n const pre = dom.createElement('p')\n pre.className = `formPane__message formPane__message--${modifier}`\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function (message: string): HTMLParagraphElement {\n return mention(message, 'error')\n }\n\n const complainIfBad = function (ok: boolean, body: string): void {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // The question of where to store this data about subject\n // This in general needs a whole lot more thought\n // and it connects to the discoverbility through links\n\n // const t = kb.findTypeURIs(subject)\n\n const me = authn.currentUser()\n\n if (!me) {\n mention(\n 'You are not logged in. If you log in and have ' +\n 'workspaces then you would be able to select workspace in which ' +\n 'to put this new information'\n )\n } else {\n const ws = kb.each(me, ns.ui('workspace'))\n if (ws.length === 0) {\n mention(\n 'You don\\'t seem to have any workspaces defined. ' +\n 'A workspace is a place on the web (http://..) or in ' +\n 'the file system (file:///) to store application data.\\n'\n )\n } else {\n // @@\n }\n }\n\n // Render forms using a given store\n\n const renderFormsFor = function (storeNode: NamedNode, targetSubject: NamedNode): void {\n kb.fetcher.nowOrWhenFetched(\n storeNode.uri,\n targetSubject as unknown as Parameters<typeof kb.fetcher.nowOrWhenFetched>[1],\n function (ok, body) {\n if (!ok) return complain('Cannot load store ' + storeNode.uri + ': ' + body)\n\n // Render the forms\n\n const forms = UI.widgets.formsFor(targetSubject) as NamedNode[]\n\n // complain('Form for editing this form:');\n for (const form of forms) {\n normalizeAmbiguousFieldTypes(kb as never, form)\n\n const heading = dom.createElement('h4')\n heading.classList.add('formPane__heading')\n box.appendChild(heading)\n /* The edit Form is not working in the local environment. it does not find\n the ui FormForm ontology. Need to research further and check in production. */\n if (form.uri) {\n const formStore = $rdf.Util.uri.document(form.uri)\n if (formStore.uri !== form.uri) {\n const editButton = box.appendChild(\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formStore,\n complainIfBad\n )\n )\n editButton.classList.add('formPane__editButton')\n }\n }\n\n const anchor = dom.createElement('a')\n anchor.classList.add('formPane__headingLink')\n anchor.setAttribute('href', form.uri)\n heading.insertBefore(anchor, heading.firstChild)\n anchor.textContent = UI.utils.label(form, true)\n\n /* Keep tis as a reminder to let a New one have its URI given by user\n mention(\"Where will this information be stored?\")\n const ele = dom.createElement('input');\n box.appendChild(ele);\n ele.setAttribute('type', 'text');\n ele.setAttribute('size', '72');\n ele.setAttribute('maxlength', '1024');\n ele.setAttribute('style', 'font-size: 80%; color:#222;');\n ele.value = store.uri\n */\n\n UI.widgets.appendForm(\n dom,\n box,\n {},\n targetSubject,\n form,\n storeNode,\n complainIfBad\n )\n tagMobileTextareaRows(box)\n }\n }\n ) // end: when store loded\n } // renderFormsFor\n\n // Figure out what store\n\n // Which places are editable and have stuff about the subject?\n\n let targetStore: NamedNode | null = null\n\n // 1. The document URI of the subject itself\n const docuri = $rdf.Util.uri.docpart(subject.uri)\n if (kb.updater.editable(docuri, kb)) {\n targetStore = subject.doc()\n } // an editable data file with hash\n\n const annotationStore = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!targetStore && isNamedNode(annotationStore)) {\n targetStore = annotationStore\n }\n\n // 2. where stuff is already stored\n if (!targetStore) {\n const docs = new Map<string, number>()\n kb.statementsMatching(subject).forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 1)\n }\n })\n kb\n .statementsMatching(undefined, undefined, subject)\n .forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 2)\n }\n })\n const docList = Array.from(docs.entries()).sort(function ([uriA, scoreA], [uriB, scoreB]) {\n return scoreA - scoreB || uriA.localeCompare(uriB)\n })\n for (const [uri] of docList) {\n if (uri && kb.updater.editable(uri, kb)) {\n targetStore = kb.sym(uri)\n break\n }\n }\n }\n\n // 3. In a workspace store\n const date = '2014' // @@@@@@@@@@@@ pass as parameter\n\n if (targetStore) {\n // mention(\"@@ Ok, we have a store <\" + store.uri + \">.\");\n renderFormsFor(targetStore, subject)\n } else {\n complain('No suitable store is known, to edit <' + subject.uri + '>.')\n const workspaceDetails: WorkspaceSelectionDetails = {\n noun: 'form',\n appPathSegment: 'form'\n }\n const foobarbaz = UI.login.selectWorkspace(dom, workspaceDetails, function (workspaceUri: string | null) {\n const workspace = workspaceUri ? kb.sym(workspaceUri) : null\n if (!workspace) {\n complain('Workspace selection was cancelled.')\n return\n }\n mention('Workspace selected OK: ' + workspace.uri)\n\n const activities = kb.each(undefined, ns.space('workspace'), workspace).filter(isNamedNode)\n for (let j = 0; j < activities.length; j++) {\n const act = activities[j]\n\n const subjectDoc2 = kb.any(act, ns.space('store'))\n const start = kb.any(act, ns.cal('dtstart'))?.value\n const end = kb.any(act, ns.cal('dtend'))?.value\n if (isNamedNode(subjectDoc2) && start && end && start <= date && end > date) {\n renderFormsFor(subjectDoc2, subject)\n break\n } else {\n complain('Note no suitable annotation store in activity: ' + act)\n }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,IAAI,IAAI,GAAG,IAAI,EAAW,QAAQ,KAAK;KAC1C,IAAM,IAAM,EAAW,IAEjB,IAAc,EAAG,IAAI,GAAK,EAAG,MAAM,OAAO,CAAC,GAC3C,IAAQ,EAAG,IAAI,GAAK,EAAG,IAAI,SAAS,CAAC,CAAC,EAAE,OACxC,IAAM,EAAG,IAAI,GAAK,EAAG,IAAI,OAAO,CAAC,CAAC,EAAE;KAC1C,IAAI,EAAY,CAAW,KAAK,KAAS,KAAO,KAAS,KAAQ,IAAM,GAAM;MAC3E,EAAe,GAAa,CAAO;MACnC;KACF,OACE,EAAS,oDAAoD,CAAG;IAEpE;GACF,CAAC;GACD,EAAI,YAAY,CAAS;EAC3B;EAEA,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e=require("solid-ui"),t=require("solid-logic");var n={icon:e.icons.iconBase+`noun_547570.svg`,global:!0,name:`home`,label:function(){return`home`},audience:[e.ns.solid(`PowerUser`)],render:function(n,r){let i=r.dom,a=async function(){let t={div:o,dom:i,statusArea:o,me:s};o.appendChild(i.createElement(`h4`)).textContent=`Create new thing somewhere`;let n={div:o.appendChild(i.createElement(`div`)),dom:i,statusArea:o,me:s},a=await e.login.filterAvailablePanes(r.session.paneRegistry.list);e.create.newThingUI(n,r,a),e.login.registrationList(t,{}).then(function(){})},o=i.createElement(`div`),s=t.authn.currentUser();return a(),o}};exports.default=n;
|
|
2
|
+
//# sourceMappingURL=homePane.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"homePane.cjs.js","names":[],"sources":["../../src/home/homePane.ts"],"sourcesContent":["/* Home Pane\n **\n ** The home pane is avaiable everywhere and allows a user\n ** to\n ** - keep track of their stuff\n ** - make new things, and possibly\n ** - keep track of accounts and workspaces etc\n **\n */\n\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { authn } from 'solid-logic'\nimport { create, icons, login, ns } from 'solid-ui'\nimport type { CreateContext } from 'solid-ui'\n\nconst HomePaneSource: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg', // noun_25830\n\n global: true,\n\n name: 'home',\n\n // Does the subject deserve an home pane?\n //\n // yes, always!\n //\n label: function () {\n return 'home'\n },\n\n audience: [ns.solid('PowerUser')],\n\n render: function (subject, context: DataBrowserContext) {\n const dom = context.dom\n const showContent = async function () {\n const homePaneContext = { div, dom, statusArea: div, me }\n /*\n div.appendChild(dom.createElement('h4')).textContent = 'Login status'\n var loginStatusDiv = div.appendChild(context.dom.createElement('div'))\n // TODO: Find out what the actual type is:\n type UriType = unknown;\n loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {\n // Here we know new log in status\n }))\n */\n div.appendChild(dom.createElement('h4')).textContent =\n 'Create new thing somewhere'\n const creationDiv = div.appendChild(dom.createElement('div'))\n const creationContext: CreateContext = {\n div: creationDiv,\n dom,\n statusArea: div,\n me\n }\n const relevantPanes = await login.filterAvailablePanes(\n context.session.paneRegistry.list\n )\n // @ts-ignore\n create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down\n\n login.registrationList(homePaneContext, {}).then(function () {})\n }\n\n const div = dom.createElement('div')\n const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in\n\n showContent()\n\n return div\n }\n} // pane object\n\n// ends\nexport default HomePaneSource\n"],"mappings":"mDAgBA,IAAM,EAAiC,CACrC,KAAM,EAAA,MAAM,SAAW,kBAEvB,OAAQ,GAER,KAAM,OAMN,MAAO,UAAY,CACjB,MAAO,MACT,EAEA,SAAU,CAAC,EAAA,GAAG,MAAM,WAAW,CAAC,EAEhC,OAAQ,SAAU,EAAS,EAA6B,CACtD,IAAM,EAAM,EAAQ,IACd,EAAc,gBAAkB,CACpC,IAAM,EAAkB,CAAE,MAAK,MAAK,WAAY,EAAK,IAAG,EAUxD,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,YACvC,6BAEF,IAAM,EAAiC,CACrC,IAFkB,EAAI,YAAY,EAAI,cAAc,KAAK,CAEpD,EACL,MACA,WAAY,EACZ,IACF,EACM,EAAgB,MAAM,EAAA,MAAM,qBAChC,EAAQ,QAAQ,aAAa,IAC/B,EAEA,EAAA,OAAO,WAAW,EAAiB,EAAS,CAAa,EAEzD,EAAA,MAAM,iBAAiB,EAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,UAAY,CAAC,CAAC,CACjE,EAEM,EAAM,EAAI,cAAc,KAAK,EAC7B,EAAgB,EAAA,MAAM,YAAY,EAIxC,OAFA,EAAY,EAEL,CACT,CACF"}
|
package/dist/home/homePane.d.ts
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { create as e, icons as t, login as n, ns as r } from "solid-ui";
|
|
2
|
+
import { authn as i } from "solid-logic";
|
|
3
|
+
//#region src/home/homePane.ts
|
|
4
|
+
var a = {
|
|
5
|
+
icon: t.iconBase + "noun_547570.svg",
|
|
6
|
+
global: !0,
|
|
7
|
+
name: "home",
|
|
8
|
+
label: function() {
|
|
9
|
+
return "home";
|
|
10
|
+
},
|
|
11
|
+
audience: [r.solid("PowerUser")],
|
|
12
|
+
render: function(t, r) {
|
|
13
|
+
let a = r.dom, o = async function() {
|
|
14
|
+
let t = {
|
|
15
|
+
div: s,
|
|
16
|
+
dom: a,
|
|
17
|
+
statusArea: s,
|
|
18
|
+
me: c
|
|
19
|
+
};
|
|
20
|
+
s.appendChild(a.createElement("h4")).textContent = "Create new thing somewhere";
|
|
21
|
+
let i = {
|
|
22
|
+
div: s.appendChild(a.createElement("div")),
|
|
23
|
+
dom: a,
|
|
24
|
+
statusArea: s,
|
|
25
|
+
me: c
|
|
26
|
+
}, o = await n.filterAvailablePanes(r.session.paneRegistry.list);
|
|
27
|
+
e.newThingUI(i, r, o), n.registrationList(t, {}).then(function() {});
|
|
28
|
+
}, s = a.createElement("div"), c = i.currentUser();
|
|
29
|
+
return o(), s;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { a as default };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=homePane.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"homePane.esm.js","names":[],"sources":["../../src/home/homePane.ts"],"sourcesContent":["/* Home Pane\n **\n ** The home pane is avaiable everywhere and allows a user\n ** to\n ** - keep track of their stuff\n ** - make new things, and possibly\n ** - keep track of accounts and workspaces etc\n **\n */\n\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { authn } from 'solid-logic'\nimport { create, icons, login, ns } from 'solid-ui'\nimport type { CreateContext } from 'solid-ui'\n\nconst HomePaneSource: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg', // noun_25830\n\n global: true,\n\n name: 'home',\n\n // Does the subject deserve an home pane?\n //\n // yes, always!\n //\n label: function () {\n return 'home'\n },\n\n audience: [ns.solid('PowerUser')],\n\n render: function (subject, context: DataBrowserContext) {\n const dom = context.dom\n const showContent = async function () {\n const homePaneContext = { div, dom, statusArea: div, me }\n /*\n div.appendChild(dom.createElement('h4')).textContent = 'Login status'\n var loginStatusDiv = div.appendChild(context.dom.createElement('div'))\n // TODO: Find out what the actual type is:\n type UriType = unknown;\n loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {\n // Here we know new log in status\n }))\n */\n div.appendChild(dom.createElement('h4')).textContent =\n 'Create new thing somewhere'\n const creationDiv = div.appendChild(dom.createElement('div'))\n const creationContext: CreateContext = {\n div: creationDiv,\n dom,\n statusArea: div,\n me\n }\n const relevantPanes = await login.filterAvailablePanes(\n context.session.paneRegistry.list\n )\n // @ts-ignore\n create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down\n\n login.registrationList(homePaneContext, {}).then(function () {})\n }\n\n const div = dom.createElement('div')\n const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in\n\n showContent()\n\n return div\n }\n} // pane object\n\n// ends\nexport default HomePaneSource\n"],"mappings":";;;AAgBA,IAAM,IAAiC;CACrC,MAAM,EAAM,WAAW;CAEvB,QAAQ;CAER,MAAM;CAMN,OAAO,WAAY;EACjB,OAAO;CACT;CAEA,UAAU,CAAC,EAAG,MAAM,WAAW,CAAC;CAEhC,QAAQ,SAAU,GAAS,GAA6B;EACtD,IAAM,IAAM,EAAQ,KACd,IAAc,iBAAkB;GACpC,IAAM,IAAkB;IAAE;IAAK;IAAK,YAAY;IAAK;GAAG;GAUxD,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,cACvC;GAEF,IAAM,IAAiC;IACrC,KAFkB,EAAI,YAAY,EAAI,cAAc,KAAK,CAEpD;IACL;IACA,YAAY;IACZ;GACF,GACM,IAAgB,MAAM,EAAM,qBAChC,EAAQ,QAAQ,aAAa,IAC/B;GAIA,AAFA,EAAO,WAAW,GAAiB,GAAS,CAAa,GAEzD,EAAM,iBAAiB,GAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,WAAY,CAAC,CAAC;EACjE,GAEM,IAAM,EAAI,cAAc,KAAK,GAC7B,IAAgB,EAAM,YAAY;EAIxC,OAFA,EAAY,GAEL;CACT;AACF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import './humanReadablePane.css';
|
|
1
|
+
import { DataBrowserContext } from '../node_modules/pane-registry';
|
|
2
|
+
import { NamedNode } from '../node_modules/rdflib';
|
|
4
3
|
type HumanReadableIcon = string | Promise<string>;
|
|
5
4
|
type HumanReadablePaneDefinition = {
|
|
6
5
|
icon: (subject: NamedNode, context: DataBrowserContext) => HumanReadableIcon;
|
|
@@ -0,0 +1,2 @@
|
|
|
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{height:var(--human-readable-pane-height,30rem);box-sizing:border-box;resize:both;border:1px solid;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;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)}})();const e=require("./_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-ui"),n=require("rdflib"),r=require("marked"),i=require("dompurify");i=e.__toESM(i);var a=e=>{if(!e)return!1;let t=e.split(`?`)[0].split(`#`)[0];return/\.(md|markdown|mdown|mkd|mkdn)$/i.test(t)},o=new Map;function s(e,t,n){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`)}var c={icon:function(e,n){if(e&&a(e.uri))return t.icons.iconBase+`markdown.svg`;if(e){let r=n.session.store,i=o.get(e.uri);if(i===`dokieli`)return t.icons.iconBase+`dokieli-logo.png`;if(i===`html`)return t.icons.originalIconBase+`tango/22-text-x-generic.png`;let a=r.fetcher.getHeader(e.doc(),`content`);if(a&&a.length>0){let n=a[0],r=n.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||n.includes(`dokieli.css`);return o.set(e.uri,r?`dokieli`:`html`),r?t.icons.iconBase+`dokieli-logo.png`:t.icons.originalIconBase+`tango/22-text-x-generic.png`}let s=r.fetcher.getHeader(e.doc(),`content-type`);if((s?s[0].split(`;`,1)[0].trim():null)===`text/html`)return r.fetcher._fetch(e.uri).then(e=>e.text()).then(n=>{let r=n.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||n.includes(`dokieli.css`);return o.set(e.uri,r?`dokieli`:`html`),r?t.icons.iconBase+`dokieli-logo.png`:t.icons.originalIconBase+`tango/22-text-x-generic.png`}).catch(()=>(o.set(e.uri,`html`),t.icons.originalIconBase+`tango/22-text-x-generic.png`))}return t.icons.originalIconBase+`tango/22-text-x-generic.png`},name:`humanReadable`,label:function(e,r){let i=r.session.store,s=[`text/plain`,`text/html`,`text/markdown`,`application/xhtml+xml`,`image/png`,`image/jpeg`,`application/pdf`,`video/mp4`],c=function(e,t,n){let r=e.fetcher.getHeader(t,`content-type`);if(r){for(let e=0;e<r.length;e++)for(let t=0;t<n.length;t++)if(r[e].indexOf(n[t])>=0)return!0}return!1},l=function(e,t,r){let i=e.findTypeURIs(t);for(let e=0;e<r.length;e++)if(n.Util.mediaTypeClass(r[e]).uri in i)return!0;return!1};if(!e.uri)return null;if(i.findTypeURIs(e)[t.ns.link(`WebPage`).uri])return`view`;if(a(e.uri))return`View`;if(c(i,e,s)||l(i,e,s)){let t=i.fetcher.getHeader(e.doc(),`content-type`);return(t?t[0].split(`;`,1)[0].trim():null)===`text/html`&&!o.has(e.uri)&&i.fetcher._fetch(e.uri).then(e=>e.text()).then(t=>{let n=t.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||t.includes(`dokieli.css`);o.set(e.uri,n?`dokieli`:`html`)}).catch(()=>{o.set(e.uri,`html`)}),`View`}return null},render:function(e,t){let n=t.dom,c=n.createElement(`div`),l=t.session.store;function u(e){let n=t.environment??{};e.dataset.layout=n.layout??`desktop`}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`;f||console.log(`humanReadablePane: unknown content-type?`),c.classList.add(`human-readable-pane`),u(c);let h=function(t){l.fetcher.webOperation(`GET`,e.uri).then(e=>{let n=e.responseText??``,a=Math.min(30,n.split(/\n/).length+5),o=r.marked.parse(n,{async:!1});t.innerHTML=i.default.sanitize(o),s(t,`markdown`,a)}).catch(e=>{console.error(`Error fetching markdown content:`,e),t.innerHTML=`<p>Error loading content</p>`})},g=function(t){l.fetcher.webOperation(`GET`,e.uri).then(e=>{let n=e.responseText??``,r=Math.min(30,n.split(/\n/).length+5);t.textContent=n,s(t,`plain-text`,r)}).catch(e=>{console.error(`Error fetching plain text content:`,e),t.textContent=`Error loading content`})},_=(t,n)=>{t.setAttribute(`src`,e.uri),s(t,`iframe`,n)};if(p){let e=n.createElement(`div`);h(e);let t=n.createElement(`div`);t.classList.add(`human-readable-pane__container`),t.appendChild(e),c.appendChild(t)}else if(m){let e=n.createElement(`pre`);g(e);let t=n.createElement(`div`);t.classList.add(`human-readable-pane__container`),t.appendChild(e),c.appendChild(t)}else{let t=n.createElement(`iframe`);(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=>{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`);o.set(e.uri,s?`dokieli`:`html`),_(t,a)}).catch(e=>{console.error(`Error fetching content for line calculation:`,e),_(t,30)});let r=n.createElement(`div`);r.classList.add(`human-readable-pane__container`),r.appendChild(t),c.appendChild(r)}return c}};exports.default=c;
|
|
2
|
+
//# sourceMappingURL=humanReadablePane2.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanReadablePane2.cjs.js","names":[],"sources":["../src/humanReadablePane.ts"],"sourcesContent":["/* Human-readable Pane\n **\n ** This outline pane contains the document contents for an HTML document\n ** This is for peeking at a page, because the user might not want to leave the data browser.\n */\nimport { icons, ns } from 'solid-ui'\nimport { Util } from 'rdflib'\nimport { marked } from 'marked'\nimport DOMPurify from 'dompurify'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { NamedNode } from 'rdflib'\nimport './humanReadablePane.css'\n\n// Helper function to check if a URI has a markdown file extension\ntype DokieliCacheValue = 'dokieli' | 'html'\n\ntype HumanReadableIcon = string | Promise<string>\n\ntype HumanReadablePaneDefinition = {\n icon: (subject: NamedNode, context: DataBrowserContext) => HumanReadableIcon\n name: string\n label: (subject: NamedNode, context: DataBrowserContext) => 'view' | 'View' | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nconst isMarkdownFile = (uri?: string | null): boolean => {\n if (!uri) return false\n const path = uri.split('?')[0].split('#')[0] // Remove query string and fragment\n return /\\.(md|markdown|mdown|mkd|mkdn)$/i.test(path)\n}\n\n// Cache for dokieli detection results (keyed by subject URI)\nconst dokieliCache = new Map<string, DokieliCacheValue>()\n\nfunction applyFrameClasses (\n frame: HTMLElement,\n modifier: 'markdown' | 'plain-text' | 'iframe',\n lines: number\n): void {\n frame.className = ''\n frame.classList.add('human-readable-pane__frame')\n frame.classList.add(`human-readable-pane__frame--${modifier}`)\n frame.style.setProperty('--human-readable-pane-height', `${lines}em`)\n}\n\nconst humanReadablePane: HumanReadablePaneDefinition = {\n icon: function (subject: NamedNode, context: DataBrowserContext): HumanReadableIcon {\n // Markdown files detected by extension\n if (subject && isMarkdownFile(subject.uri)) {\n return icons.iconBase + 'markdown.svg'\n }\n\n // Dokieli files detected by content check\n if (subject) {\n const kb = context.session.store\n\n // Check cache from previous detection\n const cachedResult = dokieliCache.get(subject.uri)\n if (cachedResult === 'dokieli') {\n return icons.iconBase + 'dokieli-logo.png'\n } else if (cachedResult === 'html') {\n return icons.originalIconBase + 'tango/22-text-x-generic.png'\n }\n\n // Check if content already fetched (synchronous)\n const responseText = kb.fetcher.getHeader(subject.doc(), 'content')\n if (responseText && responseText.length > 0) {\n const text = responseText[0]\n const isDokieli = text.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n text.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n return isDokieli\n ? icons.iconBase + 'dokieli-logo.png'\n : icons.originalIconBase + 'tango/22-text-x-generic.png'\n }\n\n // Content not yet fetched - return a promise (async detection)\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null\n\n if (ct === 'text/html') {\n return kb.fetcher._fetch(subject.uri)\n .then(response => response.text())\n .then(text => {\n const isDokieli = text.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n text.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n return isDokieli\n ? icons.iconBase + 'dokieli-logo.png'\n : icons.originalIconBase + 'tango/22-text-x-generic.png'\n })\n .catch(() => {\n dokieliCache.set(subject.uri, 'html')\n return icons.originalIconBase + 'tango/22-text-x-generic.png'\n })\n }\n }\n\n // Default for all other human-readable content\n return icons.originalIconBase + 'tango/22-text-x-generic.png'\n },\n\n name: 'humanReadable',\n\n label: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): 'view' | 'View' | null {\n const kb = context.session.store\n\n // See also the source pane, which has lower precedence.\n\n const allowed = [\n 'text/plain',\n 'text/html',\n 'text/markdown',\n 'application/xhtml+xml',\n 'image/png',\n 'image/jpeg',\n 'application/pdf',\n 'video/mp4'\n ]\n\n const hasContentTypeIn = function (\n kb: typeof context.session.store,\n x: NamedNode,\n displayables: string[]\n ): boolean {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < displayables.length; k++) {\n if (cts[j].indexOf(displayables[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n // This data could come from a fetch OR from ldp container\n const hasContentTypeIn2 = function (\n kb: typeof context.session.store,\n x: NamedNode,\n displayables: string[]\n ): boolean {\n const t = kb.findTypeURIs(x)\n for (let k = 0; k < displayables.length; k++) {\n if (Util.mediaTypeClass(displayables[k]).uri in t) {\n return true\n }\n }\n return false\n }\n\n if (!subject.uri) return null // no bnodes\n\n const t = kb.findTypeURIs(subject)\n if (t[ns.link('WebPage').uri]) return 'view'\n\n // Check file extension for markdown files\n if (isMarkdownFile(subject.uri)) {\n return 'View'\n }\n\n if (\n hasContentTypeIn(kb, subject, allowed) ||\n hasContentTypeIn2(kb, subject, allowed)\n ) {\n // For HTML files, check if it's dokieli (async check, store result for later)\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null\n\n if (ct === 'text/html' && !dokieliCache.has(subject.uri)) {\n // Async check for dokieli, don't wait for result\n kb.fetcher._fetch(subject.uri)\n .then(response => response.text())\n .then(text => {\n const isDokieli = text.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n text.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n })\n .catch(() => {\n dokieliCache.set(subject.uri, 'html')\n })\n }\n\n return 'View'\n }\n\n return null\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n const kb = context.session.store\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null // remove content-type parameters\n\n // Fallback: detect markdown by file extension if content-type is not text/markdown\n const isMarkdown = ct === 'text/markdown' || isMarkdownFile(subject.uri)\n const isPlainText = ct === 'text/plain'\n\n if (ct) {\n // console.log('humanReadablePane: c-t:' + ct)\n } else {\n console.log('humanReadablePane: unknown content-type?')\n }\n\n // @@ When we can, use CSP to turn off scripts within the iframe\n div.classList.add('human-readable-pane')\n applyEnvironmentAttributes(div)\n\n // render markdown to html in a DIV element\n const renderMarkdownContent = function (frame: HTMLDivElement) {\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const markdownText = response.responseText ?? ''\n const lines = Math.min(30, markdownText.split(/\\n/).length + 5)\n const res = marked.parse(markdownText, { async: false })\n const clean = DOMPurify.sanitize(res)\n frame.innerHTML = clean\n applyFrameClasses(frame, 'markdown', lines)\n }).catch(error => {\n console.error('Error fetching markdown content:', error)\n frame.innerHTML = '<p>Error loading content</p>'\n })\n }\n\n // render plain text in a PRE element\n const renderPlainTextContent = function (frame: HTMLPreElement) {\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const plainText = response.responseText ?? ''\n const lines = Math.min(30, plainText.split(/\\n/).length + 5)\n frame.textContent = plainText\n applyFrameClasses(frame, 'plain-text', lines)\n }).catch(error => {\n console.error('Error fetching plain text content:', error)\n frame.textContent = 'Error loading content'\n })\n }\n\n const setIframeAttributes = (frame: HTMLIFrameElement, lines: number) => {\n frame.setAttribute('src', subject.uri)\n applyFrameClasses(frame, 'iframe', lines)\n }\n\n if (isMarkdown) {\n // For markdown, use a DIV element and render the content\n const frame = myDocument.createElement('div')\n renderMarkdownContent(frame)\n const frameContainer = myDocument.createElement('div')\n frameContainer.classList.add('human-readable-pane__container')\n frameContainer.appendChild(frame)\n div.appendChild(frameContainer)\n } else if (isPlainText) {\n // For plain text, use a PRE element and render the content\n const frame = myDocument.createElement('pre')\n renderPlainTextContent(frame)\n const frameContainer = myDocument.createElement('div')\n frameContainer.classList.add('human-readable-pane__container')\n frameContainer.appendChild(frame)\n div.appendChild(frameContainer)\n } else {\n // For other content types, use IFRAME\n const frame = myDocument.createElement('iframe')\n\n // Apply sandbox for HTML/XHTML\n if (ct === 'text/html' || ct === 'application/xhtml+xml') {\n frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms')\n }\n\n // Fetch content to calculate lines dynamically\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const blobText = response.responseText ?? ''\n const newLines = blobText.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ? -10 : 5\n const lines = Math.min(30, blobText.split(/\\n/).length + newLines)\n\n // Cache dokieli detection result\n const isDokieli = blobText.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n blobText.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n\n setIframeAttributes(frame, lines)\n }).catch(error => {\n console.error('Error fetching content for line calculation:', error)\n // Fallback to default height\n setIframeAttributes(frame, 30)\n })\n\n const frameContainer = myDocument.createElement('div')\n frameContainer.classList.add('human-readable-pane__container')\n frameContainer.appendChild(frame)\n div.appendChild(frameContainer)\n }\n\n return div\n }\n}\n\nexport default humanReadablePane\n// ends\n"],"mappings":"qMAyBA,IAAM,EAAkB,GAAiC,CACvD,GAAI,CAAC,EAAK,MAAO,GAC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,GAAY,CAC3D,IAAM,EAAW,EAAS,cAAgB,GACpC,EAAW,EAAS,SAAS,oDAAoD,EAAI,IAAM,EAC3F,EAAQ,KAAK,IAAI,GAAI,EAAS,MAAM,IAAI,CAAC,CAAC,OAAS,CAAQ,EAG3D,EAAY,EAAS,SAAS,oDAAoD,GACvE,EAAS,SAAS,aAAa,EAChD,EAAa,IAAI,EAAQ,IAAK,EAAY,UAAY,MAAM,EAE5D,EAAoB,EAAO,CAAK,CAClC,CAAC,CAAC,CAAC,MAAM,GAAS,CAChB,QAAQ,MAAM,+CAAgD,CAAK,EAEnE,EAAoB,EAAO,EAAE,CAC/B,CAAC,EAED,IAAM,EAAiB,EAAW,cAAc,KAAK,EACrD,EAAe,UAAU,IAAI,gCAAgC,EAC7D,EAAe,YAAY,CAAK,EAChC,EAAI,YAAY,CAAc,CAChC,CAEA,OAAO,CACT,CACF"}
|
|
@@ -0,0 +1,123 @@
|
|
|
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{height:var(--human-readable-pane-height,30rem);box-sizing:border-box;resize:both;border:1px solid;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;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)}})();
|
|
2
|
+
import { icons as e, ns as t } from "solid-ui";
|
|
3
|
+
import { Util as n } from "rdflib";
|
|
4
|
+
import { marked as r } from "marked";
|
|
5
|
+
import i from "dompurify";
|
|
6
|
+
//#region src/humanReadablePane.ts
|
|
7
|
+
var a = (e) => {
|
|
8
|
+
if (!e) return !1;
|
|
9
|
+
let t = e.split("?")[0].split("#")[0];
|
|
10
|
+
return /\.(md|markdown|mdown|mkd|mkdn)$/i.test(t);
|
|
11
|
+
}, o = /* @__PURE__ */ new Map();
|
|
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`);
|
|
14
|
+
}
|
|
15
|
+
var c = {
|
|
16
|
+
icon: function(t, n) {
|
|
17
|
+
if (t && a(t.uri)) return e.iconBase + "markdown.svg";
|
|
18
|
+
if (t) {
|
|
19
|
+
let r = n.session.store, i = o.get(t.uri);
|
|
20
|
+
if (i === "dokieli") return e.iconBase + "dokieli-logo.png";
|
|
21
|
+
if (i === "html") return e.originalIconBase + "tango/22-text-x-generic.png";
|
|
22
|
+
let a = r.fetcher.getHeader(t.doc(), "content");
|
|
23
|
+
if (a && a.length > 0) {
|
|
24
|
+
let n = a[0], r = n.includes("<script src=\"https://dokie.li/scripts/dokieli.js\">") || n.includes("dokieli.css");
|
|
25
|
+
return o.set(t.uri, r ? "dokieli" : "html"), r ? e.iconBase + "dokieli-logo.png" : e.originalIconBase + "tango/22-text-x-generic.png";
|
|
26
|
+
}
|
|
27
|
+
let s = r.fetcher.getHeader(t.doc(), "content-type");
|
|
28
|
+
if ((s ? s[0].split(";", 1)[0].trim() : null) === "text/html") return r.fetcher._fetch(t.uri).then((e) => e.text()).then((n) => {
|
|
29
|
+
let r = n.includes("<script src=\"https://dokie.li/scripts/dokieli.js\">") || n.includes("dokieli.css");
|
|
30
|
+
return o.set(t.uri, r ? "dokieli" : "html"), r ? e.iconBase + "dokieli-logo.png" : e.originalIconBase + "tango/22-text-x-generic.png";
|
|
31
|
+
}).catch(() => (o.set(t.uri, "html"), e.originalIconBase + "tango/22-text-x-generic.png"));
|
|
32
|
+
}
|
|
33
|
+
return e.originalIconBase + "tango/22-text-x-generic.png";
|
|
34
|
+
},
|
|
35
|
+
name: "humanReadable",
|
|
36
|
+
label: function(e, r) {
|
|
37
|
+
let i = r.session.store, s = [
|
|
38
|
+
"text/plain",
|
|
39
|
+
"text/html",
|
|
40
|
+
"text/markdown",
|
|
41
|
+
"application/xhtml+xml",
|
|
42
|
+
"image/png",
|
|
43
|
+
"image/jpeg",
|
|
44
|
+
"application/pdf",
|
|
45
|
+
"video/mp4"
|
|
46
|
+
], c = function(e, t, n) {
|
|
47
|
+
let r = e.fetcher.getHeader(t, "content-type");
|
|
48
|
+
if (r) {
|
|
49
|
+
for (let e = 0; e < r.length; e++) for (let t = 0; t < n.length; t++) if (r[e].indexOf(n[t]) >= 0) return !0;
|
|
50
|
+
}
|
|
51
|
+
return !1;
|
|
52
|
+
}, l = function(e, t, r) {
|
|
53
|
+
let i = e.findTypeURIs(t);
|
|
54
|
+
for (let e = 0; e < r.length; e++) if (n.mediaTypeClass(r[e]).uri in i) return !0;
|
|
55
|
+
return !1;
|
|
56
|
+
};
|
|
57
|
+
if (!e.uri) return null;
|
|
58
|
+
if (i.findTypeURIs(e)[t.link("WebPage").uri]) return "view";
|
|
59
|
+
if (a(e.uri)) return "View";
|
|
60
|
+
if (c(i, e, s) || l(i, e, s)) {
|
|
61
|
+
let t = i.fetcher.getHeader(e.doc(), "content-type");
|
|
62
|
+
return (t ? t[0].split(";", 1)[0].trim() : null) === "text/html" && !o.has(e.uri) && i.fetcher._fetch(e.uri).then((e) => e.text()).then((t) => {
|
|
63
|
+
let n = t.includes("<script src=\"https://dokie.li/scripts/dokieli.js\">") || t.includes("dokieli.css");
|
|
64
|
+
o.set(e.uri, n ? "dokieli" : "html");
|
|
65
|
+
}).catch(() => {
|
|
66
|
+
o.set(e.uri, "html");
|
|
67
|
+
}), "View";
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
},
|
|
71
|
+
render: function(e, t) {
|
|
72
|
+
let n = t.dom, c = n.createElement("div"), l = t.session.store;
|
|
73
|
+
function u(e) {
|
|
74
|
+
let n = t.environment ?? {};
|
|
75
|
+
e.dataset.layout = n.layout ?? "desktop";
|
|
76
|
+
}
|
|
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) => {
|
|
81
|
+
let n = e.responseText ?? "", a = Math.min(30, n.split(/\n/).length + 5), o = r.parse(n, { async: !1 });
|
|
82
|
+
t.innerHTML = i.sanitize(o), s(t, "markdown", a);
|
|
83
|
+
}).catch((e) => {
|
|
84
|
+
console.error("Error fetching markdown content:", e), t.innerHTML = "<p>Error loading content</p>";
|
|
85
|
+
});
|
|
86
|
+
}, g = function(t) {
|
|
87
|
+
l.fetcher.webOperation("GET", e.uri).then((e) => {
|
|
88
|
+
let n = e.responseText ?? "", r = Math.min(30, n.split(/\n/).length + 5);
|
|
89
|
+
t.textContent = n, s(t, "plain-text", r);
|
|
90
|
+
}).catch((e) => {
|
|
91
|
+
console.error("Error fetching plain text content:", e), t.textContent = "Error loading content";
|
|
92
|
+
});
|
|
93
|
+
}, _ = (t, n) => {
|
|
94
|
+
t.setAttribute("src", e.uri), s(t, "iframe", n);
|
|
95
|
+
};
|
|
96
|
+
if (p) {
|
|
97
|
+
let e = n.createElement("div");
|
|
98
|
+
h(e);
|
|
99
|
+
let t = n.createElement("div");
|
|
100
|
+
t.classList.add("human-readable-pane__container"), t.appendChild(e), c.appendChild(t);
|
|
101
|
+
} else if (m) {
|
|
102
|
+
let e = n.createElement("pre");
|
|
103
|
+
g(e);
|
|
104
|
+
let t = n.createElement("div");
|
|
105
|
+
t.classList.add("human-readable-pane__container"), t.appendChild(e), c.appendChild(t);
|
|
106
|
+
} else {
|
|
107
|
+
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);
|
|
111
|
+
}).catch((e) => {
|
|
112
|
+
console.error("Error fetching content for line calculation:", e), _(t, 30);
|
|
113
|
+
});
|
|
114
|
+
let r = n.createElement("div");
|
|
115
|
+
r.classList.add("human-readable-pane__container"), r.appendChild(t), c.appendChild(r);
|
|
116
|
+
}
|
|
117
|
+
return c;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
121
|
+
export { c as default };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=humanReadablePane2.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanReadablePane2.esm.js","names":[],"sources":["../src/humanReadablePane.ts"],"sourcesContent":["/* Human-readable Pane\n **\n ** This outline pane contains the document contents for an HTML document\n ** This is for peeking at a page, because the user might not want to leave the data browser.\n */\nimport { icons, ns } from 'solid-ui'\nimport { Util } from 'rdflib'\nimport { marked } from 'marked'\nimport DOMPurify from 'dompurify'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { NamedNode } from 'rdflib'\nimport './humanReadablePane.css'\n\n// Helper function to check if a URI has a markdown file extension\ntype DokieliCacheValue = 'dokieli' | 'html'\n\ntype HumanReadableIcon = string | Promise<string>\n\ntype HumanReadablePaneDefinition = {\n icon: (subject: NamedNode, context: DataBrowserContext) => HumanReadableIcon\n name: string\n label: (subject: NamedNode, context: DataBrowserContext) => 'view' | 'View' | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nconst isMarkdownFile = (uri?: string | null): boolean => {\n if (!uri) return false\n const path = uri.split('?')[0].split('#')[0] // Remove query string and fragment\n return /\\.(md|markdown|mdown|mkd|mkdn)$/i.test(path)\n}\n\n// Cache for dokieli detection results (keyed by subject URI)\nconst dokieliCache = new Map<string, DokieliCacheValue>()\n\nfunction applyFrameClasses (\n frame: HTMLElement,\n modifier: 'markdown' | 'plain-text' | 'iframe',\n lines: number\n): void {\n frame.className = ''\n frame.classList.add('human-readable-pane__frame')\n frame.classList.add(`human-readable-pane__frame--${modifier}`)\n frame.style.setProperty('--human-readable-pane-height', `${lines}em`)\n}\n\nconst humanReadablePane: HumanReadablePaneDefinition = {\n icon: function (subject: NamedNode, context: DataBrowserContext): HumanReadableIcon {\n // Markdown files detected by extension\n if (subject && isMarkdownFile(subject.uri)) {\n return icons.iconBase + 'markdown.svg'\n }\n\n // Dokieli files detected by content check\n if (subject) {\n const kb = context.session.store\n\n // Check cache from previous detection\n const cachedResult = dokieliCache.get(subject.uri)\n if (cachedResult === 'dokieli') {\n return icons.iconBase + 'dokieli-logo.png'\n } else if (cachedResult === 'html') {\n return icons.originalIconBase + 'tango/22-text-x-generic.png'\n }\n\n // Check if content already fetched (synchronous)\n const responseText = kb.fetcher.getHeader(subject.doc(), 'content')\n if (responseText && responseText.length > 0) {\n const text = responseText[0]\n const isDokieli = text.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n text.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n return isDokieli\n ? icons.iconBase + 'dokieli-logo.png'\n : icons.originalIconBase + 'tango/22-text-x-generic.png'\n }\n\n // Content not yet fetched - return a promise (async detection)\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null\n\n if (ct === 'text/html') {\n return kb.fetcher._fetch(subject.uri)\n .then(response => response.text())\n .then(text => {\n const isDokieli = text.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n text.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n return isDokieli\n ? icons.iconBase + 'dokieli-logo.png'\n : icons.originalIconBase + 'tango/22-text-x-generic.png'\n })\n .catch(() => {\n dokieliCache.set(subject.uri, 'html')\n return icons.originalIconBase + 'tango/22-text-x-generic.png'\n })\n }\n }\n\n // Default for all other human-readable content\n return icons.originalIconBase + 'tango/22-text-x-generic.png'\n },\n\n name: 'humanReadable',\n\n label: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): 'view' | 'View' | null {\n const kb = context.session.store\n\n // See also the source pane, which has lower precedence.\n\n const allowed = [\n 'text/plain',\n 'text/html',\n 'text/markdown',\n 'application/xhtml+xml',\n 'image/png',\n 'image/jpeg',\n 'application/pdf',\n 'video/mp4'\n ]\n\n const hasContentTypeIn = function (\n kb: typeof context.session.store,\n x: NamedNode,\n displayables: string[]\n ): boolean {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < displayables.length; k++) {\n if (cts[j].indexOf(displayables[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n // This data could come from a fetch OR from ldp container\n const hasContentTypeIn2 = function (\n kb: typeof context.session.store,\n x: NamedNode,\n displayables: string[]\n ): boolean {\n const t = kb.findTypeURIs(x)\n for (let k = 0; k < displayables.length; k++) {\n if (Util.mediaTypeClass(displayables[k]).uri in t) {\n return true\n }\n }\n return false\n }\n\n if (!subject.uri) return null // no bnodes\n\n const t = kb.findTypeURIs(subject)\n if (t[ns.link('WebPage').uri]) return 'view'\n\n // Check file extension for markdown files\n if (isMarkdownFile(subject.uri)) {\n return 'View'\n }\n\n if (\n hasContentTypeIn(kb, subject, allowed) ||\n hasContentTypeIn2(kb, subject, allowed)\n ) {\n // For HTML files, check if it's dokieli (async check, store result for later)\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null\n\n if (ct === 'text/html' && !dokieliCache.has(subject.uri)) {\n // Async check for dokieli, don't wait for result\n kb.fetcher._fetch(subject.uri)\n .then(response => response.text())\n .then(text => {\n const isDokieli = text.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n text.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n })\n .catch(() => {\n dokieliCache.set(subject.uri, 'html')\n })\n }\n\n return 'View'\n }\n\n return null\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n const kb = context.session.store\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null // remove content-type parameters\n\n // Fallback: detect markdown by file extension if content-type is not text/markdown\n const isMarkdown = ct === 'text/markdown' || isMarkdownFile(subject.uri)\n const isPlainText = ct === 'text/plain'\n\n if (ct) {\n // console.log('humanReadablePane: c-t:' + ct)\n } else {\n console.log('humanReadablePane: unknown content-type?')\n }\n\n // @@ When we can, use CSP to turn off scripts within the iframe\n div.classList.add('human-readable-pane')\n applyEnvironmentAttributes(div)\n\n // render markdown to html in a DIV element\n const renderMarkdownContent = function (frame: HTMLDivElement) {\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const markdownText = response.responseText ?? ''\n const lines = Math.min(30, markdownText.split(/\\n/).length + 5)\n const res = marked.parse(markdownText, { async: false })\n const clean = DOMPurify.sanitize(res)\n frame.innerHTML = clean\n applyFrameClasses(frame, 'markdown', lines)\n }).catch(error => {\n console.error('Error fetching markdown content:', error)\n frame.innerHTML = '<p>Error loading content</p>'\n })\n }\n\n // render plain text in a PRE element\n const renderPlainTextContent = function (frame: HTMLPreElement) {\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const plainText = response.responseText ?? ''\n const lines = Math.min(30, plainText.split(/\\n/).length + 5)\n frame.textContent = plainText\n applyFrameClasses(frame, 'plain-text', lines)\n }).catch(error => {\n console.error('Error fetching plain text content:', error)\n frame.textContent = 'Error loading content'\n })\n }\n\n const setIframeAttributes = (frame: HTMLIFrameElement, lines: number) => {\n frame.setAttribute('src', subject.uri)\n applyFrameClasses(frame, 'iframe', lines)\n }\n\n if (isMarkdown) {\n // For markdown, use a DIV element and render the content\n const frame = myDocument.createElement('div')\n renderMarkdownContent(frame)\n const frameContainer = myDocument.createElement('div')\n frameContainer.classList.add('human-readable-pane__container')\n frameContainer.appendChild(frame)\n div.appendChild(frameContainer)\n } else if (isPlainText) {\n // For plain text, use a PRE element and render the content\n const frame = myDocument.createElement('pre')\n renderPlainTextContent(frame)\n const frameContainer = myDocument.createElement('div')\n frameContainer.classList.add('human-readable-pane__container')\n frameContainer.appendChild(frame)\n div.appendChild(frameContainer)\n } else {\n // For other content types, use IFRAME\n const frame = myDocument.createElement('iframe')\n\n // Apply sandbox for HTML/XHTML\n if (ct === 'text/html' || ct === 'application/xhtml+xml') {\n frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms')\n }\n\n // Fetch content to calculate lines dynamically\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const blobText = response.responseText ?? ''\n const newLines = blobText.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ? -10 : 5\n const lines = Math.min(30, blobText.split(/\\n/).length + newLines)\n\n // Cache dokieli detection result\n const isDokieli = blobText.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ||\n blobText.includes('dokieli.css')\n dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html')\n\n setIframeAttributes(frame, lines)\n }).catch(error => {\n console.error('Error fetching content for line calculation:', error)\n // Fallback to default height\n setIframeAttributes(frame, 30)\n })\n\n const frameContainer = myDocument.createElement('div')\n frameContainer.classList.add('human-readable-pane__container')\n frameContainer.appendChild(frame)\n div.appendChild(frameContainer)\n }\n\n return div\n }\n}\n\nexport default humanReadablePane\n// ends\n"],"mappings":";;;;;;AAyBA,IAAM,KAAkB,MAAiC;CACvD,IAAI,CAAC,GAAK,OAAO;CACjB,IAAM,IAAO,EAAI,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;CAC1C,OAAO,mCAAmC,KAAK,CAAI;AACrD,GAGM,oBAAe,IAAI,IAA+B;AAExD,SAAS,EACP,GACA,GACA,G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vE,EAAS,SAAS,aAAa;IAGhD,AAFA,EAAa,IAAI,EAAQ,KAAK,IAAY,YAAY,MAAM,GAE5D,EAAoB,GAAO,CAAK;GAClC,CAAC,CAAC,CAAC,OAAM,MAAS;IAGhB,AAFA,QAAQ,MAAM,gDAAgD,CAAK,GAEnE,EAAoB,GAAO,EAAE;GAC/B,CAAC;GAED,IAAM,IAAiB,EAAW,cAAc,KAAK;GAGrD,AAFA,EAAe,UAAU,IAAI,gCAAgC,GAC7D,EAAe,YAAY,CAAK,GAChC,EAAI,YAAY,CAAc;EAChC;EAEA,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='none'%20%3e%3cpath%20d='M7.5%202.5H3.33333C2.8731%202.5%202.5%202.8731%202.5%203.33333V9.16667C2.5%209.6269%202.8731%2010%203.33333%2010H7.5C7.96024%2010%208.33333%209.6269%208.33333%209.16667V3.33333C8.33333%202.8731%207.96024%202.5%207.5%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%202.5H12.4993C12.0391%202.5%2011.666%202.8731%2011.666%203.33333V5.83333C11.666%206.29357%2012.0391%206.66667%2012.4993%206.66667H16.666C17.1263%206.66667%2017.4993%206.29357%2017.4993%205.83333V3.33333C17.4993%202.8731%2017.1263%202.5%2016.666%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%2010H12.4993C12.0391%2010%2011.666%2010.3731%2011.666%2010.8333V16.6667C11.666%2017.1269%2012.0391%2017.5%2012.4993%2017.5H16.666C17.1263%2017.5%2017.4993%2017.1269%2017.4993%2016.6667V10.8333C17.4993%2010.3731%2017.1263%2010%2016.666%2010Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5%2013.3333H3.33333C2.8731%2013.3333%202.5%2013.7063%202.5%2014.1666V16.6666C2.5%2017.1268%202.8731%2017.4999%203.33333%2017.4999H7.5C7.96024%2017.4999%208.33333%2017.1268%208.33333%2016.6666V14.1666C8.33333%2013.7063%207.96024%2013.3333%207.5%2013.3333Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`;exports.default=e;
|
|
2
|
+
//# sourceMappingURL=dashboard.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.cjs.js","names":[],"sources":["../../src/icons/dashboard.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='none'%20%3e%3cpath%20d='M7.5%202.5H3.33333C2.8731%202.5%202.5%202.8731%202.5%203.33333V9.16667C2.5%209.6269%202.8731%2010%203.33333%2010H7.5C7.96024%2010%208.33333%209.6269%208.33333%209.16667V3.33333C8.33333%202.8731%207.96024%202.5%207.5%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%202.5H12.4993C12.0391%202.5%2011.666%202.8731%2011.666%203.33333V5.83333C11.666%206.29357%2012.0391%206.66667%2012.4993%206.66667H16.666C17.1263%206.66667%2017.4993%206.29357%2017.4993%205.83333V3.33333C17.4993%202.8731%2017.1263%202.5%2016.666%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%2010H12.4993C12.0391%2010%2011.666%2010.3731%2011.666%2010.8333V16.6667C11.666%2017.1269%2012.0391%2017.5%2012.4993%2017.5H16.666C17.1263%2017.5%2017.4993%2017.1269%2017.4993%2016.6667V10.8333C17.4993%2010.3731%2017.1263%2010%2016.666%2010Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5%2013.3333H3.33333C2.8731%2013.3333%202.5%2013.7063%202.5%2014.1666V16.6666C2.5%2017.1268%202.8731%2017.4999%203.33333%2017.4999H7.5C7.96024%2017.4999%208.33333%2017.1268%208.33333%2016.6666V14.1666C8.33333%2013.7063%207.96024%2013.3333%207.5%2013.3333Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"mappings":"AAAA,IAAA,EAAe"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/icons/dashboard.svg
|
|
2
|
+
var e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='none'%20%3e%3cpath%20d='M7.5%202.5H3.33333C2.8731%202.5%202.5%202.8731%202.5%203.33333V9.16667C2.5%209.6269%202.8731%2010%203.33333%2010H7.5C7.96024%2010%208.33333%209.6269%208.33333%209.16667V3.33333C8.33333%202.8731%207.96024%202.5%207.5%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%202.5H12.4993C12.0391%202.5%2011.666%202.8731%2011.666%203.33333V5.83333C11.666%206.29357%2012.0391%206.66667%2012.4993%206.66667H16.666C17.1263%206.66667%2017.4993%206.29357%2017.4993%205.83333V3.33333C17.4993%202.8731%2017.1263%202.5%2016.666%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%2010H12.4993C12.0391%2010%2011.666%2010.3731%2011.666%2010.8333V16.6667C11.666%2017.1269%2012.0391%2017.5%2012.4993%2017.5H16.666C17.1263%2017.5%2017.4993%2017.1269%2017.4993%2016.6667V10.8333C17.4993%2010.3731%2017.1263%2010%2016.666%2010Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5%2013.3333H3.33333C2.8731%2013.3333%202.5%2013.7063%202.5%2014.1666V16.6666C2.5%2017.1268%202.8731%2017.4999%203.33333%2017.4999H7.5C7.96024%2017.4999%208.33333%2017.1268%208.33333%2016.6666V14.1666C8.33333%2013.7063%207.96024%2013.3333%207.5%2013.3333Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as default };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=dashboard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.esm.js","names":[],"sources":["../../src/icons/dashboard.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%20fill='none'%20%3e%3cpath%20d='M7.5%202.5H3.33333C2.8731%202.5%202.5%202.8731%202.5%203.33333V9.16667C2.5%209.6269%202.8731%2010%203.33333%2010H7.5C7.96024%2010%208.33333%209.6269%208.33333%209.16667V3.33333C8.33333%202.8731%207.96024%202.5%207.5%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%202.5H12.4993C12.0391%202.5%2011.666%202.8731%2011.666%203.33333V5.83333C11.666%206.29357%2012.0391%206.66667%2012.4993%206.66667H16.666C17.1263%206.66667%2017.4993%206.29357%2017.4993%205.83333V3.33333C17.4993%202.8731%2017.1263%202.5%2016.666%202.5Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.666%2010H12.4993C12.0391%2010%2011.666%2010.3731%2011.666%2010.8333V16.6667C11.666%2017.1269%2012.0391%2017.5%2012.4993%2017.5H16.666C17.1263%2017.5%2017.4993%2017.1269%2017.4993%2016.6667V10.8333C17.4993%2010.3731%2017.1263%2010%2016.666%2010Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.5%2013.3333H3.33333C2.8731%2013.3333%202.5%2013.7063%202.5%2014.1666V16.6666C2.5%2017.1268%202.8731%2017.4999%203.33333%2017.4999H7.5C7.96024%2017.4999%208.33333%2017.1268%208.33333%2016.6666V14.1666C8.33333%2013.7063%207.96024%2013.3333%207.5%2013.3333Z'%20stroke='currentColor'%20stroke-width='1.66667'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"mappings":";AAAA,IAAA,IAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='none'%20%3e%3cpath%20d='M13.334%2013.3333C13.6876%2013.3333%2014.0267%2013.1929%2014.2768%2012.9428C14.5268%2012.6928%2014.6673%2012.3536%2014.6673%2012V5.33333C14.6673%204.97971%2014.5268%204.64057%2014.2768%204.39052C14.0267%204.14048%2013.6876%204%2013.334%204H8.06732C7.84433%204.00219%207.62435%203.94841%207.42752%203.84359C7.23069%203.73877%207.06329%203.58625%206.94065%203.4L6.40065%202.6C6.27924%202.41565%206.11397%202.26432%205.91965%202.1596C5.72533%202.05488%205.50806%202.00004%205.28732%202H2.66732C2.3137%202%201.97456%202.14048%201.72451%202.39052C1.47446%202.64057%201.33398%202.97971%201.33398%203.33333V12C1.33398%2012.3536%201.47446%2012.6928%201.72451%2012.9428C1.97456%2013.1929%202.3137%2013.3333%202.66732%2013.3333H13.334Z'%20stroke='currentColor'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`;exports.default=e;
|
|
2
|
+
//# sourceMappingURL=folder.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder.cjs.js","names":[],"sources":["../../src/icons/folder.svg"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='none'%20%3e%3cpath%20d='M13.334%2013.3333C13.6876%2013.3333%2014.0267%2013.1929%2014.2768%2012.9428C14.5268%2012.6928%2014.6673%2012.3536%2014.6673%2012V5.33333C14.6673%204.97971%2014.5268%204.64057%2014.2768%204.39052C14.0267%204.14048%2013.6876%204%2013.334%204H8.06732C7.84433%204.00219%207.62435%203.94841%207.42752%203.84359C7.23069%203.73877%207.06329%203.58625%206.94065%203.4L6.40065%202.6C6.27924%202.41565%206.11397%202.26432%205.91965%202.1596C5.72533%202.05488%205.50806%202.00004%205.28732%202H2.66732C2.3137%202%201.97456%202.14048%201.72451%202.39052C1.47446%202.64057%201.33398%202.97971%201.33398%203.33333V12C1.33398%2012.3536%201.47446%2012.6928%201.72451%2012.9428C1.97456%2013.1929%202.3137%2013.3333%202.66732%2013.3333H13.334Z'%20stroke='currentColor'%20stroke-width='1.33333'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"mappings":"AAAA,IAAA,EAAe"}
|