solid-panes 5.0.0-0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RDFXMLPane.d.ts.map +1 -1
- package/dist/RDFXMLPane2.cjs.js +1 -2
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/RDFXMLPane2.esm.js +15 -42
- package/dist/RDFXMLPane2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/folder.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/folder.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/{trash-2.esm.js → folder.esm.js} +4 -4
- package/dist/_virtual/~icons/lucide/folder.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/help-circle.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/help-circle.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/settings-2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +2 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +11 -0
- package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +1 -0
- package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -1
- package/dist/_virtual/~icons/lucide/users.cjs.js.map +1 -1
- package/dist/_virtual/~icons/lucide/users.esm.js.map +1 -1
- package/dist/audio/audioPane.cjs.js.map +1 -1
- package/dist/audio/audioPane.esm.js.map +1 -1
- package/dist/classInstancePane.cjs.js.map +1 -1
- package/dist/classInstancePane.esm.js.map +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js +6 -0
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.d.ts +16 -0
- package/dist/components/editor-card/EditorCard.d.ts.map +1 -0
- package/dist/components/editor-card/EditorCard.esm.js +268 -0
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js +2 -0
- package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js +7 -0
- package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -0
- package/dist/components/editor-card/index.cjs.js +1 -0
- package/dist/components/editor-card/index.d.ts +4 -0
- package/dist/components/editor-card/index.d.ts.map +1 -0
- package/dist/components/editor-card/index.esm.js +1 -0
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +2 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +1 -2
- package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +16 -16
- package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +24 -14
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +7 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +94 -66
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +22 -7
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +3 -2
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +90 -65
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +1 -1
- package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +4 -4
- package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +17 -16
- package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -1
- package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -1
- package/dist/components/file-explorer-header/index.cjs.js +1 -0
- package/dist/components/file-explorer-header/index.d.ts +3 -0
- package/dist/components/file-explorer-header/index.d.ts.map +1 -0
- package/dist/components/file-explorer-header/index.esm.js +2 -0
- package/dist/components/file-explorer-header/types.d.ts +8 -0
- package/dist/components/file-explorer-header/types.d.ts.map +1 -1
- package/dist/components/header/Header.cjs.js +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js +4 -4
- package/dist/components/header/Header.esm.js.map +1 -1
- package/dist/components/header/Header.styles.cjs.js +1 -1
- package/dist/components/header/Header.styles.cjs.js.map +1 -1
- package/dist/components/header/Header.styles.esm.js +1 -1
- package/dist/components/header/Header.styles.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.cjs.js +2 -2
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js +5 -5
- package/dist/components/navbar/Navbar.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +23 -9
- package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +7 -4
- package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +146 -84
- package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -1
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +2 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +1 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +7 -0
- package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +1 -0
- package/dist/dashboard/basicPreferences.cjs.js.map +1 -1
- package/dist/dashboard/basicPreferences.esm.js.map +1 -1
- package/dist/dashboard/dashboardPane.cjs.js.map +1 -1
- package/dist/dashboard/dashboardPane.esm.js.map +1 -1
- package/dist/dashboard/homepage.cjs.js.map +1 -1
- package/dist/dashboard/homepage.esm.js.map +1 -1
- package/dist/dashboard/ontologyData.cjs.js.map +1 -1
- package/dist/dashboard/ontologyData.esm.js.map +1 -1
- package/dist/dashboard/preferencesFormText.cjs.js.map +1 -1
- package/dist/dashboard/preferencesFormText.esm.js.map +1 -1
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.cjs.js.map +1 -1
- package/dist/dataContentPane2.esm.js +1 -1
- package/dist/dataContentPane2.esm.js.map +1 -1
- package/dist/defaultPane2.cjs.js +1 -1
- package/dist/defaultPane2.cjs.js.map +1 -1
- package/dist/defaultPane2.esm.js +2 -2
- package/dist/defaultPane2.esm.js.map +1 -1
- package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
- package/dist/dokieli/dokieliPane.esm.js.map +1 -1
- package/dist/dokieli/new.cjs.js.map +1 -1
- package/dist/dokieli/new.esm.js.map +1 -1
- package/dist/form/pane.cjs.js.map +1 -1
- package/dist/form/pane.esm.js.map +1 -1
- package/dist/home/homePane.cjs.js +1 -1
- package/dist/home/homePane.cjs.js.map +1 -1
- package/dist/home/homePane.esm.js +1 -1
- package/dist/home/homePane.esm.js.map +1 -1
- package/dist/humanReadablePane.d.ts +1 -1
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +1 -1
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +2 -2
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/icons/folder.cjs.js.map +1 -1
- package/dist/icons/folder.esm.js.map +1 -1
- package/dist/icons/friends.cjs.js.map +1 -1
- package/dist/icons/friends.esm.js.map +1 -1
- package/dist/icons/person.cjs.js.map +1 -1
- package/dist/icons/person.esm.js.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +1 -1
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/internal/internalPane2.esm.js +2 -2
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/mainPage/header.cjs.js.map +1 -1
- package/dist/mainPage/header.esm.js.map +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.cjs.js.map +1 -1
- package/dist/mainPage/navbar.esm.js.map +1 -1
- package/dist/n3Pane.d.ts.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -2
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/n3Pane2.esm.js +10 -34
- package/dist/n3Pane2.esm.js.map +1 -1
- package/dist/outline/context.cjs.js.map +1 -1
- package/dist/outline/context.esm.js.map +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +9 -12
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/outline/outlineIcons.cjs.js.map +1 -1
- package/dist/outline/outlineIcons.esm.js.map +1 -1
- package/dist/outline/propertyViews.cjs.js.map +1 -1
- package/dist/outline/propertyViews.esm.js.map +1 -1
- package/dist/outline/queryByExample.cjs.js +1 -1
- package/dist/outline/queryByExample.cjs.js.map +1 -1
- package/dist/outline/queryByExample.esm.js +4 -4
- package/dist/outline/queryByExample.esm.js.map +1 -1
- package/dist/outline/userInput.cjs.js +1 -1
- package/dist/outline/userInput.cjs.js.map +1 -1
- package/dist/outline/userInput.esm.js +2 -2
- package/dist/outline/userInput.esm.js.map +1 -1
- package/dist/outline/viewAsImage.cjs.js.map +1 -1
- package/dist/outline/viewAsImage.esm.js.map +1 -1
- package/dist/outline/viewAsMbox.cjs.js.map +1 -1
- package/dist/outline/viewAsMbox.esm.js.map +1 -1
- package/dist/pad/padPane2.cjs.js +1 -1
- package/dist/pad/padPane2.cjs.js.map +1 -1
- package/dist/pad/padPane2.esm.js +3 -3
- package/dist/pad/padPane2.esm.js.map +1 -1
- package/dist/playlist/playlistPane.cjs.js +1 -1
- package/dist/playlist/playlistPane.cjs.js.map +1 -1
- package/dist/playlist/playlistPane.esm.js +1 -1
- package/dist/playlist/playlistPane.esm.js.map +1 -1
- package/dist/registerPanes.cjs.js.map +1 -1
- package/dist/registerPanes.esm.js.map +1 -1
- package/dist/schedule/formsForSchedule.cjs.js.map +1 -1
- package/dist/schedule/formsForSchedule.esm.js.map +1 -1
- package/dist/schedule/schedulePane2.cjs.js.map +1 -1
- package/dist/schedule/schedulePane2.esm.js.map +1 -1
- package/dist/sharing/sharingPane.cjs.js +1 -1
- package/dist/sharing/sharingPane.cjs.js.map +1 -1
- package/dist/sharing/sharingPane.esm.js +1 -1
- package/dist/sharing/sharingPane.esm.js.map +1 -1
- package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
- package/dist/slideshow/slideshowPane.esm.js.map +1 -1
- package/dist/social/editProfileDetails.cjs.js.map +1 -1
- package/dist/social/editProfileDetails.esm.js.map +1 -1
- package/dist/social/icons.cjs.js.map +1 -1
- package/dist/social/icons.esm.js.map +1 -1
- package/dist/social/socialPane2.cjs.js +2 -2
- package/dist/social/socialPane2.cjs.js.map +1 -1
- package/dist/social/socialPane2.esm.js +3 -3
- package/dist/social/socialPane2.esm.js.map +1 -1
- package/dist/social/socialSections.cjs.js.map +1 -1
- package/dist/social/socialSections.esm.js.map +1 -1
- package/dist/social/triage.cjs.js +1 -1
- package/dist/social/triage.cjs.js.map +1 -1
- package/dist/social/triage.esm.js +1 -1
- package/dist/social/triage.esm.js.map +1 -1
- package/dist/tabbed/tabbedPane.cjs.js.map +1 -1
- package/dist/tabbed/tabbedPane.esm.js.map +1 -1
- package/dist/tableViewPane.cjs.js.map +1 -1
- package/dist/tableViewPane.esm.js.map +1 -1
- package/dist/transaction/pane.cjs.js.map +1 -1
- package/dist/transaction/pane.esm.js.map +1 -1
- package/dist/transaction/period.cjs.js +1 -1
- package/dist/transaction/period.cjs.js.map +1 -1
- package/dist/transaction/period.esm.js +1 -1
- package/dist/transaction/period.esm.js.map +1 -1
- package/dist/trip/tripPane.cjs.js.map +1 -1
- package/dist/trip/tripPane.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -1
- package/dist/ui/pane.cjs.js.map +1 -1
- package/dist/ui/pane.esm.js.map +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.esm.js.map +1 -1
- package/dist/utils/podUtils.cjs.js +1 -1
- package/dist/utils/podUtils.cjs.js.map +1 -1
- package/dist/utils/podUtils.d.ts +6 -1
- package/dist/utils/podUtils.d.ts.map +1 -1
- package/dist/utils/podUtils.esm.js +93 -22
- package/dist/utils/podUtils.esm.js.map +1 -1
- package/dist/utils/webIdUtils.cjs.js.map +1 -1
- package/dist/utils/webIdUtils.esm.js.map +1 -1
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +3 -3
- package/dist/versionInfo.esm.js.map +1 -1
- package/dist/video/videoPane.cjs.js.map +1 -1
- package/dist/video/videoPane.esm.js.map +1 -1
- package/package.json +13 -13
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js +0 -2
- package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +0 -1
- package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +0 -1
- package/dist/components/file-explorer-header/helper.cjs.js +0 -2
- package/dist/components/file-explorer-header/helper.cjs.js.map +0 -1
- package/dist/components/file-explorer-header/helper.d.ts +0 -15
- package/dist/components/file-explorer-header/helper.d.ts.map +0 -1
- package/dist/components/file-explorer-header/helper.esm.js +0 -64
- package/dist/components/file-explorer-header/helper.esm.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +0 -16
- package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +0 -1
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +0 -215
- package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +0 -1
package/dist/RDFXMLPane.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDFXMLPane.d.ts","sourceRoot":"","sources":["../src/RDFXMLPane.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RDFXMLPane.d.ts","sourceRoot":"","sources":["../src/RDFXMLPane.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAc,KAAK,SAAS,EAAkB,MAAM,QAAQ,CAAA;AACnE,OAAO,kBAAkB,CAAA;AACzB,OAAO,0BAA0B,CAAA;AAEjC,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,MAAM,GAAG,IAAI,CAAA;IACzE,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,cAAc,CAAA;CAC5E,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,oBAuDxB,CAAA"}
|
package/dist/RDFXMLPane2.cjs.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border
|
|
2
|
-
`).forEach(e=>{let t=r.createElement(`div`),n=r.createElement(`span`),o=r.createElement(`span`),s=i(e);t.classList.add(`rdfxml-pane__line`),t.style.setProperty(`--rdfxml-indent`,`${s}ch`),n.classList.add(`rdfxml-pane__line-indent`),n.setAttribute(`aria-hidden`,`true`),o.classList.add(`rdfxml-pane__line-content`),o.textContent=e.length>0?a(e):` `,t.appendChild(n),t.appendChild(o),f.appendChild(t)}),c.appendChild(f),c}};exports.RDFXMLPane=o;
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);box-sizing:border-box;width:100%;min-width:0}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();require("./components/editor-card/index.cjs.js");let e=require("solid-ui"),t=require("rdflib");var n={icon:e.icons.originalIconBase+`22-text-xml4.png`,name:`RDFXML`,audience:[e.ns.solid(`Developer`)],label:function(e,t){let n=t.session.store;if(`http://www.w3.org/2007/ont/link#ProtocolEvent`in n.findTypeURIs(e))return null;let r=n.statementsMatching(void 0,void 0,void 0,e).length;return r===0?null:`As RDF/XML (`+r+`)`},render:function(e,n){let r=n.dom,i=n.session.store,a=r.createElement(`div`);a.setAttribute(`class`,`rdfxml-pane`);let o=i.statementsMatching(void 0,void 0,void 0,e),s=(0,t.Serializer)(i);s.suggestNamespaces(i.namespaces),s.setBase(e.uri);let c=s.statementsToXML(o),l=r.createElement(`solid-panes-editor-card`);return l.contentType=`application/rdf+xml`,l.content=c,a.appendChild(l),a}};exports.RDFXMLPane=n;
|
|
3
2
|
//# sourceMappingURL=RDFXMLPane2.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDFXMLPane2.cjs.js","names":[],"sources":["../src/RDFXMLPane.ts"],"sourcesContent":["/* RDF/XML content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"RDFXMLPane2.cjs.js","names":["icons","ns","Serializer","solid_ui","rdflib","RDFXMLPane","store","context","subject","n","myDocument","kb","div","statements","sz","serializedContent","source"],"sources":["../src/RDFXMLPane.ts"],"sourcesContent":["/* RDF/XML content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\n\nimport { ns, icons } from 'solid-ui'\nimport type { DataBrowserContext } from 'pane-registry'\nimport { Serializer, type NamedNode, type Statement } from 'rdflib'\nimport './RDFXMLPane.css'\nimport './components/editor-card'\n\ntype RDFXMLPaneDefinition = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const RDFXMLPane: RDFXMLPaneDefinition = {\n icon: icons.originalIconBase + '22-text-xml4.png',\n\n name: 'RDFXML',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'As RDF/XML (' + n + ')'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'rdfxml-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[]\n\n const sz = Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToXML(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'application/rdf+xml'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":"8HAqBA,IAAaK,EAAmC,CAC9C,KAAML,EAAAA,MAAM,iBAAmB,mBAE/B,KAAM,SAEN,SAAU,CAACC,EAAAA,GAAG,MAAM,WAAW,CAAC,EAEhC,MAAO,SAAU,EAAoB,EAA4C,CAC/E,IAAMK,EAAQC,EAAQ,QAAQ,MAC9B,GACE,kDACAD,EAAM,aAAaE,CAAO,EAE1B,OAAO,KAGT,IAAMC,EAAIH,EAAM,mBAAmB,IAAA,GAAW,IAAA,GAAW,IAAA,GAAWE,CAAO,CAAC,CACzE,OAEH,OADIC,IAAM,EAAU,KACb,eAAiBA,EAAI,GAC9B,EAEA,OAAQ,SACN,EACA,EACgB,CAChB,IAAMC,EAAaH,EAAQ,IACrBI,EAAKJ,EAAQ,QAAQ,MAErBK,EAAMF,EAAW,cAAc,KAAK,EAC1CE,EAAI,aAAa,QAAS,aAAa,EAIvC,IAAMC,EAAaF,EAAG,mBACpB,IAAA,GACA,IAAA,GACA,IAAA,GACAH,CACF,EAEMM,GAAA,EAAKZ,EAAAA,WAAAA,CAAWS,CAAE,EACxBG,EAAG,kBAAkBH,EAAG,UAAU,EAClCG,EAAG,QAAQN,EAAQ,GAAG,EACtB,IAAMO,EAAoBD,EAAG,gBAAgBD,CAAU,EACjDG,EAASN,EAAW,cAAc,yBAAyB,EAQjE,MAJA,GAAO,YAAc,sBACrB,EAAO,QAAUK,EAEjBH,EAAI,YAAYI,CAAM,EACfJ,CACT,CACF"}
|
package/dist/RDFXMLPane2.esm.js
CHANGED
|
@@ -1,55 +1,28 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border
|
|
2
|
-
|
|
3
|
-
import
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.rdfxml-pane{border:1px solid var(--solid-ui-color-slate-200,#e2e8f0);box-sizing:border-box;width:100%;min-width:0}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import "./components/editor-card/index.esm.js";
|
|
2
|
+
|
|
3
|
+
import { icons as e, ns as t } from "solid-ui";
|
|
4
|
+
import { Serializer as n } from "rdflib";
|
|
4
5
|
//#region src/RDFXMLPane.ts
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
if (e.trim().length === 0) return 0;
|
|
8
|
-
let t = 0;
|
|
9
|
-
for (let n of e) {
|
|
10
|
-
if (n === " ") {
|
|
11
|
-
t += 1;
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
if (n === " ") {
|
|
15
|
-
t += 2;
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
return Math.max(t, 2);
|
|
21
|
-
}
|
|
22
|
-
function i(e) {
|
|
23
|
-
return e.replace(/^[ \t]+/, "");
|
|
24
|
-
}
|
|
25
|
-
var a = {
|
|
26
|
-
icon: e.icons.originalIconBase + "22-text-xml4.png",
|
|
6
|
+
var r = {
|
|
7
|
+
icon: e.originalIconBase + "22-text-xml4.png",
|
|
27
8
|
name: "RDFXML",
|
|
28
|
-
audience: [
|
|
9
|
+
audience: [t.solid("Developer")],
|
|
29
10
|
label: function(e, t) {
|
|
30
11
|
let n = t.session.store;
|
|
31
12
|
if ("http://www.w3.org/2007/ont/link#ProtocolEvent" in n.findTypeURIs(e)) return null;
|
|
32
13
|
let r = n.statementsMatching(void 0, void 0, void 0, e).length;
|
|
33
14
|
return r === 0 ? null : "As RDF/XML (" + r + ")";
|
|
34
15
|
},
|
|
35
|
-
render: function(e,
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
c.setAttribute("class", "rdfxml-pane"), s(c);
|
|
43
|
-
let l = o.statementsMatching(void 0, void 0, void 0, e), u = t.Serializer(o);
|
|
44
|
-
u.suggestNamespaces(o.namespaces), u.setBase(e.uri);
|
|
45
|
-
let d = u.statementsToXML(l), f = a.createElement("div");
|
|
46
|
-
return f.classList.add("rdfxml-pane__source"), d.split("\n").forEach((e) => {
|
|
47
|
-
let t = a.createElement("div"), n = a.createElement("span"), o = a.createElement("span"), s = r(e);
|
|
48
|
-
t.classList.add("rdfxml-pane__line"), t.style.setProperty("--rdfxml-indent", `${s}ch`), n.classList.add("rdfxml-pane__line-indent"), n.setAttribute("aria-hidden", "true"), o.classList.add("rdfxml-pane__line-content"), o.textContent = e.length > 0 ? i(e) : " ", t.appendChild(n), t.appendChild(o), f.appendChild(t);
|
|
49
|
-
}), c.appendChild(f), c;
|
|
16
|
+
render: function(e, t) {
|
|
17
|
+
let r = t.dom, i = t.session.store, a = r.createElement("div");
|
|
18
|
+
a.setAttribute("class", "rdfxml-pane");
|
|
19
|
+
let o = i.statementsMatching(void 0, void 0, void 0, e), s = n(i);
|
|
20
|
+
s.suggestNamespaces(i.namespaces), s.setBase(e.uri);
|
|
21
|
+
let c = s.statementsToXML(o), l = r.createElement("solid-panes-editor-card");
|
|
22
|
+
return l.contentType = "application/rdf+xml", l.content = c, a.appendChild(l), a;
|
|
50
23
|
}
|
|
51
24
|
};
|
|
52
25
|
//#endregion
|
|
53
|
-
export {
|
|
26
|
+
export { r as RDFXMLPane };
|
|
54
27
|
|
|
55
28
|
//# sourceMappingURL=RDFXMLPane2.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RDFXMLPane2.esm.js","names":[],"sources":["../src/RDFXMLPane.ts"],"sourcesContent":["/* RDF/XML content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\n\nimport
|
|
1
|
+
{"version":3,"file":"RDFXMLPane2.esm.js","names":["RDFXMLPane","icons","ns","store","context","subject","n","myDocument","kb","div","statements","sz","Serializer","serializedContent","source"],"sources":["../src/RDFXMLPane.ts"],"sourcesContent":["/* RDF/XML content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource,\n ** in generated N3 syntax.\n */\n\nimport { ns, icons } from 'solid-ui'\nimport type { DataBrowserContext } from 'pane-registry'\nimport { Serializer, type NamedNode, type Statement } from 'rdflib'\nimport './RDFXMLPane.css'\nimport './components/editor-card'\n\ntype RDFXMLPaneDefinition = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: NamedNode, context: DataBrowserContext) => string | null\n render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement\n}\n\nexport const RDFXMLPane: RDFXMLPaneDefinition = {\n icon: icons.originalIconBase + '22-text-xml4.png',\n\n name: 'RDFXML',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject: NamedNode, context: DataBrowserContext): string | null {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'As RDF/XML (' + n + ')'\n },\n\n render: function (\n subject: NamedNode,\n context: DataBrowserContext\n ): HTMLDivElement {\n const myDocument = context.dom\n const kb = context.session.store\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'rdfxml-pane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const statements = kb.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ) as Statement[]\n\n const sz = Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const serializedContent = sz.statementsToXML(statements)\n const source = myDocument.createElement('solid-panes-editor-card') as HTMLElement & {\n contentType?: string\n content?: string\n }\n source.contentType = 'application/rdf+xml'\n source.content = serializedContent\n\n div.appendChild(source)\n return div\n }\n}\n"],"mappings":";;;;;AAqBA,IAAaA,IAAmC;CAC9C,MAAMC,EAAM,mBAAmB;CAE/B,MAAM;CAEN,UAAU,CAACC,EAAG,MAAM,WAAW,CAAC;CAEhC,OAAO,SAAU,GAAoB,GAA4C;EAC/E,IAAMC,IAAQC,EAAQ,QAAQ;EAC9B,IACE,mDACAD,EAAM,aAAaE,CAAO,GAE1B,OAAO;EAGT,IAAMC,IAAIH,EAAM,mBAAmB,KAAA,GAAW,KAAA,GAAW,KAAA,GAAWE,CAAO,CAAC,CACzE;EAEH,OADIC,MAAM,IAAU,OACb,iBAAiBA,IAAI;CAC9B;CAEA,QAAQ,SACN,GACA,GACgB;EAChB,IAAMC,IAAaH,EAAQ,KACrBI,IAAKJ,EAAQ,QAAQ,OAErBK,IAAMF,EAAW,cAAc,KAAK;EAC1C,EAAI,aAAa,SAAS,aAAa;EAIvC,IAAMG,IAAaF,EAAG,mBACpB,KAAA,GACA,KAAA,GACA,KAAA,GACAH,CACF,GAEMM,IAAKC,EAAWJ,CAAE;EAExB,AADAG,EAAG,kBAAkBH,EAAG,UAAU,GAClCG,EAAG,QAAQN,EAAQ,GAAG;EACtB,IAAMQ,IAAoBF,EAAG,gBAAgBD,CAAU,GACjDI,IAASP,EAAW,cAAc,yBAAyB;EAQjE,OAJA,EAAO,cAAc,uBACrB,EAAO,UAAUM,GAEjBJ,EAAI,YAAYK,CAAM,GACfL;CACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-left.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"arrow-left.cjs.js","names":["iconlucidearrowleft"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-left.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"arrow-left.esm.js","names":["iconlucidearrowleft"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis-vertical.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ellipsis-vertical.cjs.js","names":["iconlucideellipsisvertical"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis-vertical.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ellipsis-vertical.esm.js","names":["iconlucideellipsisvertical"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-open.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"folder-open.cjs.js","names":["iconlucidefolderopen"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folder-open.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"folder-open.esm.js","names":["iconlucidefolderopen"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg>`}};customElements.get(`icon-lucide-folder`)||customElements.define(`icon-lucide-folder`,e),exports.default=e;
|
|
2
|
+
//# sourceMappingURL=folder.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder.cjs.js","names":["iconlucidefolder"],"sources":[],"mappings":""}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
//#region ~icons/lucide/
|
|
1
|
+
//#region ~icons/lucide/folder
|
|
2
2
|
var e = class extends HTMLElement {
|
|
3
3
|
constructor() {
|
|
4
|
-
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"
|
|
4
|
+
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"/></svg>";
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
|
-
customElements.get("icon-lucide-
|
|
7
|
+
customElements.get("icon-lucide-folder") || customElements.define("icon-lucide-folder", e);
|
|
8
8
|
//#endregion
|
|
9
9
|
export { e as default };
|
|
10
10
|
|
|
11
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=folder.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder.esm.js","names":["iconlucidefolder"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globe.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"globe.cjs.js","names":["iconlucideglobe"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globe.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"globe.esm.js","names":["iconlucideglobe"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-circle.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"help-circle.cjs.js","names":["iconlucidehelpcircle"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help-circle.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"help-circle.esm.js","names":["iconlucidehelpcircle"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-dashboard.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"layout-dashboard.cjs.js","names":["iconlucidelayoutdashboard"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-dashboard.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"layout-dashboard.esm.js","names":["iconlucidelayoutdashboard"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock-keyhole.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"lock-keyhole.cjs.js","names":["iconlucidelockkeyhole"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock-keyhole.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"lock-keyhole.esm.js","names":["iconlucidelockkeyhole"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pencil.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"pencil.cjs.js","names":["iconlucidepencil"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pencil.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"pencil.esm.js","names":["iconlucidepencil"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-2.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"settings-2.cjs.js","names":["iconlucidesettings2"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-2.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"settings-2.esm.js","names":["iconlucidesettings2"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-2.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"share-2.cjs.js","names":["iconlucideshare2"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-2.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"share-2.esm.js","names":["iconlucideshare2"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:`open`}).innerHTML=`<style>:host { display: inline-flex; }</style><svg viewBox="0 0 24 24" width="100%" height="100%" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m14.305 19.53l.923-.382m0-2.296l-.923-.383m2.547-1.241l-.383-.923m.383 6.467l-.383.924m2.679-6.468l.383-.923m-.001 7.391l-.382-.924M2 21a8 8 0 0 1 10.434-7.62m8.338 3.472l.924-.383m-.924 2.679l.924.383"/><circle cx="10" cy="8" r="5"/><circle cx="18" cy="18" r="3"/></g></svg>`}};customElements.get(`icon-lucide-user-round-cog`)||customElements.define(`icon-lucide-user-round-cog`,e),exports.default=e;
|
|
2
|
+
//# sourceMappingURL=user-round-cog.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-round-cog.cjs.js","names":["iconlucideuserroundcog"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ~icons/lucide/user-round-cog
|
|
2
|
+
var e = class extends HTMLElement {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(), this.attachShadow({ mode: "open" }).innerHTML = "<style>:host { display: inline-flex; }</style><svg viewBox=\"0 0 24 24\" width=\"100%\" height=\"100%\" ><g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m14.305 19.53l.923-.382m0-2.296l-.923-.383m2.547-1.241l-.383-.923m.383 6.467l-.383.924m2.679-6.468l.383-.923m-.001 7.391l-.382-.924M2 21a8 8 0 0 1 10.434-7.62m8.338 3.472l.924-.383m-.924 2.679l.924.383\"/><circle cx=\"10\" cy=\"8\" r=\"5\"/><circle cx=\"18\" cy=\"18\" r=\"3\"/></g></svg>";
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
customElements.get("icon-lucide-user-round-cog") || customElements.define("icon-lucide-user-round-cog", e);
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as default };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=user-round-cog.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-round-cog.esm.js","names":["iconlucideuserroundcog"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"user.cjs.js","names":["iconlucideuser"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"user.esm.js","names":["iconlucideuser"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.cjs.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"users.cjs.js","names":["iconlucideusers"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.esm.js","names":[],"sources":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"users.esm.js","names":["iconlucideusers"],"sources":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioPane.cjs.js","names":["UI","$rdf"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":"wIAKA,IAAM,EAAKA,EAAG,GAEd,EAA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I,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAU,EACzB,IAAM,EAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAU,EACzB,IAAM,EAAa,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAQ5D,OAPA,EAAW,CAAO,EAClB,EAAW,YAAY,EAAa,EAAS,EAAQ,QAAQ,CAAC,EAE1D,CAAC,EAAG,MAAM,IAAA,GAAW,EAAG,IAAI,UAAU,EAAG,CAAO,GAAK,EAAQ,IAAI,GACnE,EAAG,QAAQ,KAAK,EAAQ,IAAI,CAAC,EAGxB,CACT,CACF"}
|
|
1
|
+
{"version":3,"file":"audioPane.cjs.js","names":["UI","$rdf","require_runtime","solid_ui","rdflib","ns","audioPane_default","typeURIs","context","subject","prefix","t","kb","dom","options","removeExtension","dot","str","looksRedundant","folder","x","contents","thisName","k","otherName","guessNames","a","decode","moveOn","resolve","current","j","i","level","folder2","endedListener","event","tryNext","cur","next","controlRow","audioControl","audio","song","response","objectURL","myBlob","autoplay","div","table","labelStyle","artistRow","albumRow","trackRow"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":"wIAKA,IAAMK,EAAKL,EAAG,GAEdM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AMnC,EAAI,cAAc,KAAK,EAC7BoC,EAAQD,EAAI,YAAYnC,EAAI,cAAc,OAAO,CAAC,EAClDqC,EAAa,wDACbC,EAAYF,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC,EAC3D,EAAU,MAAM,QAAUqC,EAC1B,IAAME,EAAWH,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAUqC,EACzB,IAAMG,EAAWJ,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC,EAC1D,EAAS,MAAM,QAAUqC,EACzB,IAAMV,EAAaS,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC,EAQ5D,OAPAY,EAAWhB,CAAO,EAClB+B,EAAW,YAAYC,EAAahC,EAASK,EAAQ,QAAQ,CAAC,EAE1D,CAACF,EAAG,MAAM,IAAA,GAAWP,EAAG,IAAI,UAAU,EAAGI,CAAO,GAAKA,EAAQ,IAAI,GACnEG,EAAG,QAAQ,KAAKH,EAAQ,IAAI,CAAC,EAGxBuC,CACT,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audioPane.esm.js","names":["ns"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":";;;AAK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AU,MAAM,UAAU;EAC1B,IAAM,IAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAU;EACzB,IAAM,IAAW,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAU;EACzB,IAAM,IAAa,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC;EAQ5D,OAPA,EAAW,CAAO,GAClB,EAAW,YAAY,EAAa,GAAS,EAAQ,QAAQ,CAAC,GAE1D,CAAC,EAAG,MAAM,KAAA,GAAWA,EAAG,IAAI,UAAU,GAAG,CAAO,KAAK,EAAQ,IAAI,KACnE,EAAG,QAAQ,KAAK,EAAQ,IAAI,CAAC,GAGxB;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"audioPane.esm.js","names":["ns","UI","$rdf","ns$1","audioPane_default","typeURIs","context","subject","prefix","t","kb","dom","options","removeExtension","dot","str","looksRedundant","folder","x","contents","thisName","k","otherName","guessNames","a","decode","moveOn","resolve","current","j","i","level","folder2","endedListener","event","tryNext","cur","next","controlRow","audioControl","audio","song","response","objectURL","myBlob","autoplay","div","table","labelStyle","artistRow","albumRow","trackRow"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings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AAiB,SAASP,GAAe,EAAK,GAC7CO;EACT,GAEMM,IAAMnC,EAAI,cAAc,KAAK,GAC7BoC,IAAQD,EAAI,YAAYnC,EAAI,cAAc,OAAO,CAAC,GAClDqC,IAAa,yDACbC,IAAYF,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC;EAC3D,EAAU,MAAM,UAAUqC;EAC1B,IAAME,IAAWH,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAUqC;EACzB,IAAMG,IAAWJ,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC;EAC1D,EAAS,MAAM,UAAUqC;EACzB,IAAMV,IAAaS,EAAM,YAAYpC,EAAI,cAAc,IAAI,CAAC;EAQ5D,OAPAY,EAAWhB,CAAO,GAClB+B,EAAW,YAAYC,EAAahC,GAASK,EAAQ,QAAQ,CAAC,GAE1D,CAACF,EAAG,MAAM,KAAA,GAAWV,EAAG,IAAI,UAAU,GAAGO,CAAO,KAAKA,EAAQ,IAAI,KACnEG,EAAG,QAAQ,KAAKH,EAAQ,IAAI,CAAC,GAGxBuC;CACT;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classInstancePane.cjs.js","names":["UI","$rdf"],"sources":["../src/classInstancePane.js"],"sourcesContent":["/* Class member Pane\n **\n ** This outline pane lists the members of a class\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const classInstancePane = {\n icon: UI.icons.originalIconBase + 'tango/22-folder-open.png',\n\n name: 'classInstance',\n\n // Create a new folder in a Solid system,\n\n audience: [ns.solid('PowerUser')],\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(undefined, ns.rdf('type'), subject).length\n if (n > 0) return 'List (' + n + ')' // Show how many in hover text\n return null // Suppress pane otherwise\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n const complain = function complain (message, color) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n const div = dom.createElement('div')\n div.setAttribute('class', 'instancePane')\n div.setAttribute(\n 'style',\n ' border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em '\n )\n\n // If this is a class, look for all both explicit and implicit\n const sts = kb.statementsMatching(undefined, ns.rdf('type'), subject)\n if (sts.length > 0) {\n const already = {}\n const more = []\n sts.forEach(st => {\n already[st.subject.toNT()] = st\n })\n for (const nt in kb.findMembersNT(subject)) {\n if (!already[nt]) {\n more.push($rdf.st(kb.fromNT(nt), ns.rdf('type'), subject)) // @@ no provenance\n }\n }\n if (more.length) {\n complain(\n 'There are ' +\n sts.length +\n ' explicit and ' +\n more.length +\n ' implicit members of ' +\n UI.utils.label(subject)\n )\n }\n if (subject.sameTerm(ns.rdf('Property'))) {\n // / Do not find all properties used as properties .. unless look at kb index\n } else if (subject.sameTerm(ns.rdfs('Class'))) {\n const uses = kb.statementsMatching(undefined, ns.rdf('type'), undefined)\n const usedTypes = {}\n uses.forEach(function (st) {\n usedTypes[st.object] = st\n }) // Get unique\n const used = []\n for (const i in usedTypes) {\n used.push($rdf.st($rdf.sym(i), ns.rdf('type'), ns.rdfs('Class')))\n }\n complain(\n 'Total of ' +\n uses.length +\n ' type statements and ' +\n used.length +\n ' unique types.'\n )\n }\n\n if (sts.length > 10) {\n const tr = dom.createElement('TR')\n tr.appendChild(dom.createTextNode('' + sts.length))\n // tr.AJAR_statement=sts[i]\n div.appendChild(tr)\n }\n\n outliner.appendPropertyTRs(div, sts, true, function (_pred) {\n return true\n })\n\n if (more.length) {\n complain('Implicit:')\n outliner.appendPropertyTRs(div, more, true, function (_pred) {\n return true\n })\n }\n }\n\n return div\n }\n}\n// ends\n"],"mappings":"uIAQA,
|
|
1
|
+
{"version":3,"file":"classInstancePane.cjs.js","names":["UI","$rdf","require_runtime","solid_ui","rdflib","ns","classInstancePane","context","subject","dom","outliner","kb","complain","pre","color","div","message","sts","already","more","st","nt","uses","usedTypes","used","i","tr"],"sources":["../src/classInstancePane.js"],"sourcesContent":["/* Class member Pane\n **\n ** This outline pane lists the members of a class\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const classInstancePane = {\n icon: UI.icons.originalIconBase + 'tango/22-folder-open.png',\n\n name: 'classInstance',\n\n // Create a new folder in a Solid system,\n\n audience: [ns.solid('PowerUser')],\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(undefined, ns.rdf('type'), subject).length\n if (n > 0) return 'List (' + n + ')' // Show how many in hover text\n return null // Suppress pane otherwise\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n const complain = function complain (message, color) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n const div = dom.createElement('div')\n div.setAttribute('class', 'instancePane')\n div.setAttribute(\n 'style',\n ' border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em '\n )\n\n // If this is a class, look for all both explicit and implicit\n const sts = kb.statementsMatching(undefined, ns.rdf('type'), subject)\n if (sts.length > 0) {\n const already = {}\n const more = []\n sts.forEach(st => {\n already[st.subject.toNT()] = st\n })\n for (const nt in kb.findMembersNT(subject)) {\n if (!already[nt]) {\n more.push($rdf.st(kb.fromNT(nt), ns.rdf('type'), subject)) // @@ no provenance\n }\n }\n if (more.length) {\n complain(\n 'There are ' +\n sts.length +\n ' explicit and ' +\n more.length +\n ' implicit members of ' +\n UI.utils.label(subject)\n )\n }\n if (subject.sameTerm(ns.rdf('Property'))) {\n // / Do not find all properties used as properties .. unless look at kb index\n } else if (subject.sameTerm(ns.rdfs('Class'))) {\n const uses = kb.statementsMatching(undefined, ns.rdf('type'), undefined)\n const usedTypes = {}\n uses.forEach(function (st) {\n usedTypes[st.object] = st\n }) // Get unique\n const used = []\n for (const i in usedTypes) {\n used.push($rdf.st($rdf.sym(i), ns.rdf('type'), ns.rdfs('Class')))\n }\n complain(\n 'Total of ' +\n uses.length +\n ' type statements and ' +\n used.length +\n ' unique types.'\n )\n }\n\n if (sts.length > 10) {\n const tr = dom.createElement('TR')\n tr.appendChild(dom.createTextNode('' + sts.length))\n // tr.AJAR_statement=sts[i]\n div.appendChild(tr)\n }\n\n outliner.appendPropertyTRs(div, sts, true, function (_pred) {\n return true\n })\n\n if (more.length) {\n complain('Implicit:')\n outliner.appendPropertyTRs(div, more, true, function (_pred) {\n return true\n })\n }\n }\n\n return div\n }\n}\n// ends\n"],"mappings":"uIAQA,IAAMK,EAAKL,EAAG,GAEDM,EAAoB,CAC/B,KAAMN,EAAG,MAAM,iBAAmB,2BAElC,KAAM,gBAIN,SAAU,CAACK,EAAG,MAAM,WAAW,CAAC,EAEhC,MAAO,SAAU,EAAS,EAAS,CAEjC,IAAM,EADKE,EAAQ,QAAQ,MACd,KAAK,IAAA,GAAWF,EAAG,IAAI,MAAM,EAAGG,CAAO,CAAC,CAAC,OAEtD,OADI,EAAI,EAAU,SAAW,EAAI,IAC1B,IACT,EAEA,OAAQ,SAAU,EAAS,EAAS,CAClC,IAAMC,EAAMF,EAAQ,IACdG,EAAWH,EAAQ,YAAYE,CAAG,EAClCE,EAAKJ,EAAQ,QAAQ,MACrBK,EAAW,SAAmB,EAAS,EAAO,CAClD,IAAMC,EAAMJ,EAAI,cAAc,KAAK,EACnCI,EAAI,aAAa,QAAS,qBAAuBC,GAAS,OAAY,EACtEC,EAAI,YAAYF,CAAG,EACnBA,EAAI,YAAYJ,EAAI,eAAeO,CAAO,CAAC,CAC7C,EACMD,EAAMN,EAAI,cAAc,KAAK,EACnCM,EAAI,aAAa,QAAS,cAAc,EACxCA,EAAI,aACF,QACA,uGACF,EAGA,IAAME,EAAMN,EAAG,mB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,EAAS,WAAW,EACpBF,EAAS,kBAAkBK,EAAKI,EAAM,GAAM,SAAU,EAAO,CAC3D,MAAO,EACT,CAAC,EAEL,CAEA,OAAOJ,CACT,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classInstancePane.esm.js","names":["ns"],"sources":["../src/classInstancePane.js"],"sourcesContent":["/* Class member Pane\n **\n ** This outline pane lists the members of a class\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const classInstancePane = {\n icon: UI.icons.originalIconBase + 'tango/22-folder-open.png',\n\n name: 'classInstance',\n\n // Create a new folder in a Solid system,\n\n audience: [ns.solid('PowerUser')],\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(undefined, ns.rdf('type'), subject).length\n if (n > 0) return 'List (' + n + ')' // Show how many in hover text\n return null // Suppress pane otherwise\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n const complain = function complain (message, color) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n const div = dom.createElement('div')\n div.setAttribute('class', 'instancePane')\n div.setAttribute(\n 'style',\n ' border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em '\n )\n\n // If this is a class, look for all both explicit and implicit\n const sts = kb.statementsMatching(undefined, ns.rdf('type'), subject)\n if (sts.length > 0) {\n const already = {}\n const more = []\n sts.forEach(st => {\n already[st.subject.toNT()] = st\n })\n for (const nt in kb.findMembersNT(subject)) {\n if (!already[nt]) {\n more.push($rdf.st(kb.fromNT(nt), ns.rdf('type'), subject)) // @@ no provenance\n }\n }\n if (more.length) {\n complain(\n 'There are ' +\n sts.length +\n ' explicit and ' +\n more.length +\n ' implicit members of ' +\n UI.utils.label(subject)\n )\n }\n if (subject.sameTerm(ns.rdf('Property'))) {\n // / Do not find all properties used as properties .. unless look at kb index\n } else if (subject.sameTerm(ns.rdfs('Class'))) {\n const uses = kb.statementsMatching(undefined, ns.rdf('type'), undefined)\n const usedTypes = {}\n uses.forEach(function (st) {\n usedTypes[st.object] = st\n }) // Get unique\n const used = []\n for (const i in usedTypes) {\n used.push($rdf.st($rdf.sym(i), ns.rdf('type'), ns.rdfs('Class')))\n }\n complain(\n 'Total of ' +\n uses.length +\n ' type statements and ' +\n used.length +\n ' unique types.'\n )\n }\n\n if (sts.length > 10) {\n const tr = dom.createElement('TR')\n tr.appendChild(dom.createTextNode('' + sts.length))\n // tr.AJAR_statement=sts[i]\n div.appendChild(tr)\n }\n\n outliner.appendPropertyTRs(div, sts, true, function (_pred) {\n return true\n })\n\n if (more.length) {\n complain('Implicit:')\n outliner.appendPropertyTRs(div, more, true, function (_pred) {\n return true\n })\n }\n }\n\n return div\n }\n}\n// ends\n"],"mappings":";;;AAQA,IAAMA,
|
|
1
|
+
{"version":3,"file":"classInstancePane.esm.js","names":["ns","UI","$rdf","ns$1","classInstancePane","n","context","subject","dom","outliner","kb","complain","pre","color","div","message","sts","already","more","st","nt","uses","usedTypes","used","i","tr"],"sources":["../src/classInstancePane.js"],"sourcesContent":["/* Class member Pane\n **\n ** This outline pane lists the members of a class\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const classInstancePane = {\n icon: UI.icons.originalIconBase + 'tango/22-folder-open.png',\n\n name: 'classInstance',\n\n // Create a new folder in a Solid system,\n\n audience: [ns.solid('PowerUser')],\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(undefined, ns.rdf('type'), subject).length\n if (n > 0) return 'List (' + n + ')' // Show how many in hover text\n return null // Suppress pane otherwise\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n const complain = function complain (message, color) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n const div = dom.createElement('div')\n div.setAttribute('class', 'instancePane')\n div.setAttribute(\n 'style',\n ' border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em '\n )\n\n // If this is a class, look for all both explicit and implicit\n const sts = kb.statementsMatching(undefined, ns.rdf('type'), subject)\n if (sts.length > 0) {\n const already = {}\n const more = []\n sts.forEach(st => {\n already[st.subject.toNT()] = st\n })\n for (const nt in kb.findMembersNT(subject)) {\n if (!already[nt]) {\n more.push($rdf.st(kb.fromNT(nt), ns.rdf('type'), subject)) // @@ no provenance\n }\n }\n if (more.length) {\n complain(\n 'There are ' +\n sts.length +\n ' explicit and ' +\n more.length +\n ' implicit members of ' +\n UI.utils.label(subject)\n )\n }\n if (subject.sameTerm(ns.rdf('Property'))) {\n // / Do not find all properties used as properties .. unless look at kb index\n } else if (subject.sameTerm(ns.rdfs('Class'))) {\n const uses = kb.statementsMatching(undefined, ns.rdf('type'), undefined)\n const usedTypes = {}\n uses.forEach(function (st) {\n usedTypes[st.object] = st\n }) // Get unique\n const used = []\n for (const i in usedTypes) {\n used.push($rdf.st($rdf.sym(i), ns.rdf('type'), ns.rdfs('Class')))\n }\n complain(\n 'Total of ' +\n uses.length +\n ' type statements and ' +\n used.length +\n ' unique types.'\n )\n }\n\n if (sts.length > 10) {\n const tr = dom.createElement('TR')\n tr.appendChild(dom.createTextNode('' + sts.length))\n // tr.AJAR_statement=sts[i]\n div.appendChild(tr)\n }\n\n outliner.appendPropertyTRs(div, sts, true, function (_pred) {\n return true\n })\n\n if (more.length) {\n complain('Implicit:')\n outliner.appendPropertyTRs(div, more, true, function (_pred) {\n return true\n })\n }\n }\n\n return div\n }\n}\n// ends\n"],"mappings":";;;AAQA,IAAMA,IAAKC,EAAG,IAEDG,IAAoB;CAC/B,MAAMH,EAAG,MAAM,mBAAmB;CAElC,MAAM;CAIN,UAAU,CAACD,EA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AC7C,IAAMqB,IAAOX,EAAG,mBAAmB,KAAA,GAAWV,EAAG,IAAI,MAAM,GAAG,KAAA,CAAS,GACjEsB,IAAY,CAAC;IACnB,EAAK,QAAQ,SAAU,GAAI;KACzB,EAAUH,EAAG,UAAUA;IACzB,CAAC;IACD,IAAMI,IAAO,CAAC;IACd,KAAK,IAAMC,KAAKF,GACd,EAAK,KAAKpB,EAAK,GAAGA,EAAK,IAAIsB,CAAC,GAAGxB,EAAG,IAAI,MAAM,GAAGA,EAAG,KAAK,OAAO,CAAC,CAAC;IAElE,EACE,cACEqB,EAAK,SACL,0BACAE,EAAK,SACL,gBACJ;GACF;GAEA,IAAIP,EAAI,SAAS,IAAI;IACnB,IAAMS,IAAKjB,EAAI,cAAc,IAAI;IAGjC,AAFAiB,EAAG,YAAYjB,EAAI,eAAe,KAAKQ,EAAI,MAAM,CAAC,GAElDF,EAAI,YAAYW,CAAE;GACpB;GAMA,AAJAhB,EAAS,kBAAkBK,GAAKE,GAAK,IAAM,SAAU,GAAO;IAC1D,OAAO;GACT,CAAC,GAEGE,EAAK,WACPP,EAAS,WAAW,GACpBF,EAAS,kBAAkBK,GAAKI,GAAM,IAAM,SAAU,GAAO;IAC3D,OAAO;GACT,CAAC;EAEL;EAEA,OAAOJ;CACT;AACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const e=require("./EditorCard.styles.cjs.js");let t=require("solid-ui"),n=require("lit/decorators.js"),r=require("lit");var i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y;function b(e,t,n){x(e,t),t.set(e,n)}function x(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function S(e,t,n){return e.set(w(e,t),n),n}function C(e,t){return e.get(w(e,t))}function w(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function T(e,t,n){return(t=D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:k(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||k(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var A,j;O.static=u,O.private=d,d?i===2?A=function(e){return h(e),b.value}:(i<4&&(A=o(b,`get`,h)),i!==3&&(j=o(b,`set`,h))):(A=function(e){return e[r]},(i<2||i===4)&&(j=function(e,t){e[r]=t}));var M=O.access={has:d?m.bind():function(e){return r in e}};if(A&&(M.get=A),j&&(M.set=j),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return A(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:D(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function D(e){var t=O(e,`string`);return typeof t==`symbol`?t:t+``}function O(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function k(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function A(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function j(e){return e}d=[(0,n.customElement)(`solid-panes-editor-card`)];var M;new(v=(o=new WeakMap,s=new WeakMap,c=new WeakMap,y=(f=(0,n.query)(`.editor`),m=(0,n.property)(),g=(0,n.property)(),`_editor`),a=class extends t.WebComponent{constructor(...e){super(...e),T(this,y,void l(this)),T(this,`_initializing`,!1),b(this,o,p(this,null)),b(this,s,h(this)),b(this,c,_(this))}get _editorMount(){return C(o,this)}set _editorMount(e){S(o,this,e)}get contentType(){return C(s,this)}set contentType(e){S(s,this,e)}get content(){return C(c,this)}set content(e){S(c,this,e)}getEditor(){return this._editor}setReadOnly(e){this._editor?.setReadOnly(e)}async _initializeEditor(){if(this._editor||this._initializing)return;this._initializing=!0;let e=this._editorMount;if(!e){this._initializing=!1;return}try{let{CodeEditor:t}=await import(`solid-ui`);this._editor=new t;try{await this._editor.initialize(e,this.content??``,this.contentType??``,`dark`)}catch(e){throw Error(`Error initializing code editor: ${e instanceof Error?e.message:String(e)}`)}this._editor?.setReadOnly(!0)}catch(e){console.log(`Error loading CodeEditor module:`,e)}finally{this._initializing=!1}}async firstUpdated(){await this._initializeEditor()}disconnectedCallback(){super.disconnectedCallback(),this._editor&&=(this._editor.destroy(),void 0),this._initializing=!1}render(){return r.html`
|
|
2
|
+
<section class="editor-card">
|
|
3
|
+
<div class="editor"></div>
|
|
4
|
+
</section>
|
|
5
|
+
`}},{e:[p,h,_,l],c:[M,u]}=E(a,[[f,1,`_editorMount`],[m,1,`contentType`],[g,1,`content`]],d,0,void 0,t.WebComponent),a),i=class extends j{constructor(){super(M),T(this,`styles`,e.default),u()}},T(i,v,void 0),i),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return M}});
|
|
6
|
+
//# sourceMappingURL=EditorCard.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorCard.cjs.js","names":["html","customElement","property","query","WebComponent","styles","_classDecs","_EditorCard","_EditorCard2","_A","WeakMap","_B","_C","_ref","_editorMountDecs","_contentTypeDecs","_contentDecs","_EditorCard3","EditorCard","constructor","args","_defineProperty","_initProto","_classPrivateFieldInitSpec","_init__editorMount","_init_contentType","_init_content","_editorMount","_classPrivateFieldGet","v","_classPrivateFieldSet","contentType","content","getEditor","_editor","setReadOnly","readOnly","_initializeEditor","_initializing","editorDiv","CodeEditor","initialize","err","Error","message","String","console","log","firstUpdated","disconnectedCallback","destroy","undefined","render","e","c","_initClass","_applyDecs","_Class","_identity","default","customElement","query","property","WebComponent","styles","require_EditorCard_styles","solid_ui","lit_decorators_js","lit","_Class","_EditorCard3","_A","_B","_C","_initProto","_initClass","_classDecs","_editorMountDecs","_init__editorMount","_contentTypeDecs","_init_contentType","_contentDecs","_init_content","_EditorCard2","_ref","_classPrivateFieldInitSpec","_checkPrivateRedeclaration","a","_classPrivateFieldSet","s","_assertClassBrand","r","_classPrivateFieldGet","_defineProperty","_toPropertyKey","t","_applyDecs","i","n","o","c","applyDec","m","h","y","v","g","b","u","w","S","A","d","f","p","_setFunctionName","P","j","D","I","k","F","l","N","_checkInRHS","_toPrimitive","e","_identity","_EditorCard","args","readOnly","editorDiv","CodeEditor","err"],"sources":["../../../src/components/editor-card/EditorCard.ts"],"sourcesContent":["import { html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { WebComponent, type CodeEditor } from 'solid-ui'\nimport styles from './EditorCard.styles.css'\n\n@customElement('solid-panes-editor-card')\nexport default class EditorCard extends WebComponent {\n static styles = styles\n\n private _editor?: CodeEditor\n private _initializing = false\n\n @query('.editor')\n accessor _editorMount: HTMLDivElement | null = null\n\n @property()\n accessor contentType: string | undefined\n\n @property()\n accessor content: string | undefined\n\n getEditor () {\n return this._editor\n }\n\n setReadOnly (readOnly: boolean) {\n this._editor?.setReadOnly(readOnly)\n }\n\n private async _initializeEditor () {\n if (this._editor || this._initializing) return\n this._initializing = true\n const editorDiv = this._editorMount\n\n if (!editorDiv) {\n this._initializing = false\n return\n }\n\n try {\n const { CodeEditor } = await import('solid-ui')\n this._editor = new CodeEditor()\n try {\n await this._editor.initialize(editorDiv, this.content ?? '', this.contentType ?? '', 'dark')\n } catch (err) {\n throw new Error(`Error initializing code editor: ${err instanceof Error ? err.message : String(err)}`)\n }\n this._editor?.setReadOnly(true)\n } catch (err) {\n // TODO: Bring in error handling and debug\n console.log('Error loading CodeEditor module:', err)\n } finally {\n this._initializing = false\n }\n }\n\n async firstUpdated () {\n await this._initializeEditor()\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n if (this._editor) {\n this._editor.destroy()\n this._editor = undefined\n }\n\n this._initializing = false\n }\n\n render () {\n return html`\n <section class=\"editor-card\">\n <div class=\"editor\"></div>\n </section>\n `\n }\n}\n"],"mappings":"gtIAG4CM,EAAA,EAAA,EAE3CL,EAAAA,cAAAA,CAAc,yBAAyB,CAAC,EAAA,IAAAM,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,GAAAC,GAAAA,EAOtCX,EAAAA,MAAAA,CAAM,SAAS,EAACY,GAAAA,EAGhBb,EAAAA,SAAAA,CAAS,EAACc,GAAAA,EAGVd,EAAAA,SAAAA,CAAS,EAAC,WAAAe,EAbb,cACwCb,EAAAA,YAAa,CAAAe,YAAA,GAAAC,EAAA,CAAA,MAAA,GAAAA,CAAA,EAAAC,EAAA,KAAAR,EAAA,KAAAS,EAAA,IAAA,CAAA,EAAAD,EAAA,KAAA,gBAI3B,EAAK,EAAAE,EAAA,KAAAd,EAAAe,EAAA,KAGkB,IAAI,CAAA,EAAAD,EAAA,KAAAZ,EAAAc,EAAA,IAAA,CAAA,EAAAF,EAAA,KAAAX,EAAAc,EAAA,IAAA,CAAA,CAAA,CAAA,IAA1CC,cAAY,CAAA,OAAAC,EAAAnB,EAAA,IAAA,CAAA,CAAA,IAAZkB,aAAYE,EAAA,CAAAC,EAAArB,EAAA,KAAAoB,CAAA,CAAA,CAAA,IAGZE,aAAW,CAAA,OAAAH,EAAAjB,EAAA,IAAA,CAAA,CAAA,IAAXoB,YAAWF,EAAA,CAAAC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EAAA,CAAAC,EAAA,EAAA,SAAA,CAAA,EAAAV,EAAA,EAAA,IAAA,GAvEuCF,EAAAA,YAAY,EAAAa,GAAAwC,EAAA,cAAAC,CAAA,CAAAvC,aAAA,CAAA,MAAAZ,CAAA,EAAAc,EAAA,KAAA,SAClChB,EAAAA,OAAM,EAAAkD,EAAA,CAAA,CAAA,EAAAlC,EAAAoC,EAAAjD,EAAA,IAAA,EAAA,EAAAiD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WebComponent, CodeEditor } from 'solid-ui';
|
|
2
|
+
export default class EditorCard extends WebComponent {
|
|
3
|
+
static styles: any;
|
|
4
|
+
private _editor?;
|
|
5
|
+
private _initializing;
|
|
6
|
+
accessor _editorMount: HTMLDivElement | null;
|
|
7
|
+
accessor contentType: string | undefined;
|
|
8
|
+
accessor content: string | undefined;
|
|
9
|
+
getEditor(): CodeEditor | undefined;
|
|
10
|
+
setReadOnly(readOnly: boolean): void;
|
|
11
|
+
private _initializeEditor;
|
|
12
|
+
firstUpdated(): Promise<void>;
|
|
13
|
+
disconnectedCallback(): void;
|
|
14
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=EditorCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorCard.d.ts","sourceRoot":"","sources":["../../../src/components/editor-card/EditorCard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAIxD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,MAAM,CAAC,MAAM,MAAS;IAEtB,OAAO,CAAC,OAAO,CAAC,CAAY;IAC5B,OAAO,CAAC,aAAa,CAAQ;IAG7B,QAAQ,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAO;IAGnD,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAGxC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAEpC,SAAS;IAIT,WAAW,CAAE,QAAQ,EAAE,OAAO;YAIhB,iBAAiB;IA2BzB,YAAY;IAIlB,oBAAoB;IAUpB,MAAM;CAOP"}
|