solid-panes 3.5.12 → 3.5.13
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/.github/workflows/ci.yml +1 -1
- package/README.md +4 -0
- package/lib/dashboard/dashboardPane.d.ts.map +1 -1
- package/lib/dashboard/dashboardPane.js +6 -2
- package/lib/dashboard/dashboardPane.js.map +1 -1
- package/lib/form/pane.js +1 -1
- package/lib/form/pane.js.map +1 -1
- package/lib/humanReadablePane.js +55 -23
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/outline/manager.js +28 -17
- package/lib/outline/manager.js.map +1 -1
- package/lib/registerPanes.js +1 -1
- package/lib/registerPanes.js.map +1 -1
- package/lib/versionInfo.d.ts +0 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +18 -19
- package/lib/versionInfo.js.map +1 -1
- package/package.json +21 -20
- package/src/dashboard/dashboardPane.ts +4 -2
- package/src/form/pane.js +1 -1
- package/src/humanReadablePane.js +38 -14
- package/src/outline/manager.js +10 -1
- package/src/registerPanes.js +2 -2
- package/src/versionInfo.ts +18 -19
- package/webpack.config.js +1 -1
package/lib/registerPanes.js
CHANGED
|
@@ -17,7 +17,6 @@ module.exports = function registerPanes(register) {
|
|
|
17
17
|
register(require('issue-pane'));
|
|
18
18
|
register(require('contacts-pane'));
|
|
19
19
|
register(require('activitystreams-pane'));
|
|
20
|
-
register(require('markdown-pane').Pane);
|
|
21
20
|
register(require('./pad/padPane')); // register(require('./argument/argumentPane.js')) // A position in an argument tree
|
|
22
21
|
|
|
23
22
|
register(require('./transaction/pane.js'));
|
|
@@ -60,6 +59,7 @@ module.exports = function registerPanes(register) {
|
|
|
60
59
|
register(require('./socialPane.js'));
|
|
61
60
|
register(require('./humanReadablePane.js')); // A web page as a web page -- how to escape to tabr?
|
|
62
61
|
|
|
62
|
+
register(require('markdown-pane').Pane);
|
|
63
63
|
register(require('./dataContentPane.js')); // Preferred for a data file
|
|
64
64
|
|
|
65
65
|
register(require('source-pane')); // edit source
|
package/lib/registerPanes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/registerPanes.js"],"names":["module","exports","registerPanes","register","require","
|
|
1
|
+
{"version":3,"sources":["../src/registerPanes.js"],"names":["module","exports","registerPanes","register","require","chatPanes","longChatPane","shortChatPane","Pane"],"mappings":"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","sourcesContent":["module.exports = function registerPanes (register) {\n /* Note that the earliest panes have priority. So the most specific ones are first.\n **\n */\n // Developer designed:\n\n register(require('profile-pane')) // View someone's public profile - dominates all other panes.\n\n register(require('./profile/editProfile.view')) // Edit my profile. App. 201900802\n register(require('./trustedApplications/trustedApplications.view')) // must be registered before basicPreferences\n register(require('./dashboard/dashboardPane'))\n register(require('./dashboard/basicPreferences')) // 20190702\n register(require('issue-pane'))\n register(require('contacts-pane'))\n register(require('activitystreams-pane'))\n\n register(require('./pad/padPane'))\n // register(require('./argument/argumentPane.js')) // A position in an argument tree\n\n register(require('./transaction/pane.js'))\n register(require('./transaction/period.js'))\n\n const chatPanes = require('chat-pane')\n // FIXME: https://github.com/solid/chat-pane/issues/40\n if (chatPanes.longChatPane) {\n register(chatPanes.longChatPane) // Long pane must have prio in case short pane tries to do a long pane\n register(chatPanes.shortChatPane) // was './chat/chatPane.js'\n } else {\n register(chatPanes)\n }\n // register(require('./publication/publicationPane.js'))\n register(require('meeting-pane'))\n register(require('./tabbed/tabbedPane'))\n register(require('./schedule/schedulePane.js'))\n\n register(require('./trip/tripPane.js'))\n // register(require('./airPane.js'))\n\n // Content views\n\n register(require('./imagePane.js')) // Basic image view\n register(require('./playlist/playlistPane.js')) // Basic playlist view\n\n register(require('./video/videoPane.js')) // Video clip player\n register(require('./audio/audioPane.js')) // Audio clip player\n\n register(require('./dokieli/dokieliPane.js')) // Should be above dataContentPane\n register(require('folder-pane')) // Should be above dataContentPane\n register(require('./classInstancePane.js')) // Should be above dataContentPane\n // register(require('./dynamic/dynamicPanes.js')) // warp etc warp broken 2017/8\n register(require('./slideshow/slideshowPane.js'))\n\n register(require('./socialPane.js'))\n\n register(require('./humanReadablePane.js')) // A web page as a web page -- how to escape to tabr?\n register(require('markdown-pane').Pane)\n\n register(require('./dataContentPane.js')) // Preferred for a data file\n register(require('source-pane')) // edit source\n register(require('./n3Pane.js'))\n register(require('./RDFXMLPane.js'))\n\n // User configured - data driven\n register(require('./form/pane.js'))\n\n // Generic:\n\n register(require('./tableViewPane.js'))\n\n // Fallback totally generic:\n register(require('./defaultPane.js'))\n\n register(require('./ui/pane.js'))\n\n // register(require(\"categoryPane.js\")) // Not useful enough\n // register(require(\"pubsPane.js\")) // not finished\n\n // @@ jambo commented these things out to pare things down temporarily.\n // Note must use // not /* to comment out to make sure expander sees it\n // register(require(\"lawPane.js\"))\n\n // register(require('./microblogPane/microblogPane.js'))\n\n // register(require(\"./social/pane.js\")) // competitor to other social\n // register(require(\"./airPane.js\"))\n // register(require(\"./lawPane.js\"))\n // register(require(\"pushbackPane.js\"))\n // register(require(\"CVPane.js\"))\n // register(require(\"photoPane.js\"))\n // register(require(\"tagPane.js\"))\n // register(require(\"photoImportPane.js\"))\n\n // The sharing pane is fairly generic and administrative 201\n register(require('./sharing/sharingPane'))\n\n // The internals pane is always (almost?) the last as it is the least user-friendly\n register(require('./internal/internalPane'))\n\n register(require('./home/homePane'))\n\n // ENDS\n}\n"],"file":"registerPanes.js"}
|
package/lib/versionInfo.d.ts
CHANGED
package/lib/versionInfo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.d.ts","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versionInfo.d.ts","sourceRoot":"","sources":["../src/versionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAuBC"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,26 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
buildTime: '2021-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2021-12-22T16:03:19Z',
|
|
9
|
+
commit: 'f9aeaef823bbf98714208cdce56371653618e0be',
|
|
10
10
|
npmInfo: {
|
|
11
|
-
'solid-panes': '3.5.
|
|
12
|
-
npm: '6.
|
|
13
|
-
ares: '1.
|
|
14
|
-
brotli: '1.0.
|
|
15
|
-
cldr: '
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
v8: '7.5.288.22-node.16',
|
|
11
|
+
'solid-panes': '3.5.12',
|
|
12
|
+
npm: '6.14.13',
|
|
13
|
+
ares: '1.17.1',
|
|
14
|
+
brotli: '1.0.9',
|
|
15
|
+
cldr: '39.0',
|
|
16
|
+
icu: '69.1',
|
|
17
|
+
llhttp: '2.1.3',
|
|
18
|
+
modules: '83',
|
|
19
|
+
napi: '8',
|
|
20
|
+
nghttp2: '1.42.0',
|
|
21
|
+
node: '14.17.3',
|
|
22
|
+
openssl: '1.1.1k',
|
|
23
|
+
tz: '2021a',
|
|
24
|
+
unicode: '13.0',
|
|
25
|
+
uv: '1.41.0',
|
|
26
|
+
v8: '8.4.371.23-node.67',
|
|
28
27
|
zlib: '1.2.11'
|
|
29
28
|
}
|
|
30
29
|
};
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","
|
|
1
|
+
{"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACbA,EAAAA,SAAS,EAAE,sBADE;AAEbC,EAAAA,MAAM,EAAE,0CAFK;AAGbC,EAAAA,OAAO,EACT;AACE,mBAAe,QADjB;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,OAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\n buildTime: '2021-12-22T16:03:19Z',\n commit: 'f9aeaef823bbf98714208cdce56371653618e0be',\n npmInfo:\n{\n 'solid-panes': '3.5.12',\n npm: '6.14.13',\n ares: '1.17.1',\n brotli: '1.0.9',\n cldr: '39.0',\n icu: '69.1',\n llhttp: '2.1.3',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.17.3',\n openssl: '1.1.1k',\n tz: '2021a',\n unicode: '13.0',\n uv: '1.41.0',\n v8: '8.4.371.23-node.67',\n zlib: '1.2.11'\n}\n}\n"],"file":"versionInfo.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.13",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"homepage": "https://github.com/solid/solid-panes",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@babel/polyfill": "^7.12.1",
|
|
48
|
-
"@inrupt/solid-client-authn-browser": "^1.11.
|
|
48
|
+
"@inrupt/solid-client-authn-browser": "^1.11.3",
|
|
49
49
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
50
50
|
"activitystreams-pane": "^0.6.2",
|
|
51
51
|
"babel-preset-env": "^1.7.0",
|
|
@@ -55,46 +55,47 @@
|
|
|
55
55
|
"folder-pane": "^2.4.10",
|
|
56
56
|
"issue-pane": "^2.4.8",
|
|
57
57
|
"markdown-pane": "^0.2.1",
|
|
58
|
+
"marked": "^4.0.8",
|
|
58
59
|
"meeting-pane": "^2.3.7",
|
|
59
60
|
"mime-types": "^2.1.34",
|
|
60
|
-
"pane-registry": "^2.4.
|
|
61
|
+
"pane-registry": "^2.4.5",
|
|
61
62
|
"path-browserify": "^1.0.1",
|
|
62
63
|
"profile-pane": "^1.0.4",
|
|
63
|
-
"rdflib": "^2.2.
|
|
64
|
+
"rdflib": "^2.2.15",
|
|
64
65
|
"react": "^17.0.2",
|
|
65
66
|
"react-dom": "^17.0.2",
|
|
66
67
|
"solid-namespace": "^0.5.2",
|
|
67
|
-
"solid-ui": "^2.4.
|
|
68
|
+
"solid-ui": "^2.4.14",
|
|
68
69
|
"source-pane": "^2.2.13"
|
|
69
70
|
},
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"@babel/cli": "^7.16.0",
|
|
72
|
-
"@babel/core": "^7.16.
|
|
73
|
-
"@babel/preset-env": "^7.16.
|
|
74
|
-
"@babel/preset-typescript": "^7.16.
|
|
75
|
-
"@testing-library/dom": "^8.11.
|
|
76
|
-
"@testing-library/jest-dom": "^5.
|
|
77
|
-
"@types/jest": "^27.0.
|
|
73
|
+
"@babel/core": "^7.16.5",
|
|
74
|
+
"@babel/preset-env": "^7.16.5",
|
|
75
|
+
"@babel/preset-typescript": "^7.16.5",
|
|
76
|
+
"@testing-library/dom": "^8.11.1",
|
|
77
|
+
"@testing-library/jest-dom": "^5.16.1",
|
|
78
|
+
"@types/jest": "^27.0.3",
|
|
78
79
|
"@types/webpack-env": "^1.16.3",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
80
|
-
"@typescript-eslint/parser": "^5.
|
|
80
|
+
"@typescript-eslint/eslint-plugin": "^5.8.0",
|
|
81
|
+
"@typescript-eslint/parser": "^5.8.0",
|
|
81
82
|
"babel-loader": "^8.2.3",
|
|
82
83
|
"babel-plugin-inline-import": "^3.0.0",
|
|
83
84
|
"eslint": "^7.32.0",
|
|
84
|
-
"fork-ts-checker-webpack-plugin": "^6.
|
|
85
|
+
"fork-ts-checker-webpack-plugin": "^6.5.0",
|
|
85
86
|
"html-webpack-plugin": "^5.5.0",
|
|
86
87
|
"husky": "^7.0.4",
|
|
87
|
-
"jest": "^27.
|
|
88
|
+
"jest": "^27.4.5",
|
|
88
89
|
"jest-fetch-mock": "^3.0.3",
|
|
89
|
-
"lint-staged": "^
|
|
90
|
+
"lint-staged": "^12.1.4",
|
|
90
91
|
"raw-loader": "^4.0.2",
|
|
91
92
|
"standard": "^16.0.4",
|
|
92
|
-
"ts-jest": "^27.
|
|
93
|
+
"ts-jest": "^27.1.2",
|
|
93
94
|
"ts-loader": "^9.2.6",
|
|
94
|
-
"typescript": "^4.
|
|
95
|
-
"webpack": "^5.
|
|
95
|
+
"typescript": "^4.5.4",
|
|
96
|
+
"webpack": "^5.65.0",
|
|
96
97
|
"webpack-cli": "^4.9.1",
|
|
97
|
-
"webpack-dev-server": "^4.
|
|
98
|
+
"webpack-dev-server": "^4.7.1"
|
|
98
99
|
},
|
|
99
100
|
"husky": {
|
|
100
101
|
"hooks": {
|
|
@@ -7,6 +7,7 @@ export const dashboardPane: PaneDefinition = {
|
|
|
7
7
|
icon: icons.iconBase + 'noun_547570.svg',
|
|
8
8
|
name: 'dashboard',
|
|
9
9
|
label: subject => {
|
|
10
|
+
console.log()
|
|
10
11
|
if (subject.uri === subject.site().uri) {
|
|
11
12
|
return 'Dashboard'
|
|
12
13
|
}
|
|
@@ -47,8 +48,9 @@ function buildPage (
|
|
|
47
48
|
context: DataBrowserContext,
|
|
48
49
|
subject: NamedNode
|
|
49
50
|
) {
|
|
50
|
-
//
|
|
51
|
-
|
|
51
|
+
// if uri then SolidOS is a browse.html web app
|
|
52
|
+
const uri = (new URL(window.location.href)).searchParams.get('uri')
|
|
53
|
+
if (webId && (uri || webId.site().uri === subject.site().uri)) {
|
|
52
54
|
return buildDashboard(container, context)
|
|
53
55
|
}
|
|
54
56
|
return buildHomePage(container, subject)
|
package/src/form/pane.js
CHANGED
|
@@ -90,7 +90,7 @@ module.exports = {
|
|
|
90
90
|
const heading = dom.createElement('h4')
|
|
91
91
|
box.appendChild(heading)
|
|
92
92
|
if (form.uri) {
|
|
93
|
-
const formStore = $rdf.Util.uri.document(form)
|
|
93
|
+
const formStore = $rdf.Util.uri.document(form.uri)
|
|
94
94
|
if (formStore.uri !== form.uri) {
|
|
95
95
|
// The form is a hash-type URI
|
|
96
96
|
const e = box.appendChild(
|
package/src/humanReadablePane.js
CHANGED
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
** This outline pane contains the document contents for an HTML document
|
|
4
4
|
** This is for peeking at a page, because the user might not want to leave the data browser.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { icons, ns } from 'solid-ui'
|
|
7
|
+
import { Util } from 'rdflib'
|
|
8
|
+
import { marked } from 'marked'
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
icon:
|
|
10
|
+
const humanReadablePane = {
|
|
11
|
+
icon: icons.originalIconBase + 'tango/22-text-x-generic.png',
|
|
11
12
|
|
|
12
13
|
name: 'humanReadable',
|
|
13
14
|
|
|
14
15
|
label: function (subject, context) {
|
|
15
16
|
const kb = context.session.store
|
|
16
|
-
const ns = UI.ns
|
|
17
17
|
|
|
18
18
|
// See also the source pane, which has lower precedence.
|
|
19
19
|
|
|
20
20
|
const allowed = [
|
|
21
21
|
'text/plain',
|
|
22
22
|
'text/html',
|
|
23
|
+
'text/markdown',
|
|
23
24
|
'application/xhtml+xml',
|
|
24
25
|
'image/png',
|
|
25
26
|
'image/jpeg',
|
|
@@ -45,7 +46,7 @@ module.exports = {
|
|
|
45
46
|
const hasContentTypeIn2 = function (kb, x, displayables) {
|
|
46
47
|
const t = kb.findTypeURIs(subject)
|
|
47
48
|
for (let k = 0; k < displayables.length; k++) {
|
|
48
|
-
if (
|
|
49
|
+
if (Util.mediaTypeClass(displayables[k]).uri in t) {
|
|
49
50
|
return true
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -72,12 +73,6 @@ module.exports = {
|
|
|
72
73
|
const div = myDocument.createElement('div')
|
|
73
74
|
const kb = context.session.store
|
|
74
75
|
|
|
75
|
-
// @@ When we can, use CSP to turn off scripts within the iframe
|
|
76
|
-
div.setAttribute('class', 'docView')
|
|
77
|
-
const iframe = myDocument.createElement('IFRAME')
|
|
78
|
-
iframe.setAttribute('src', subject.uri) // allow-same-origin
|
|
79
|
-
iframe.setAttribute('class', 'doc')
|
|
80
|
-
|
|
81
76
|
const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')
|
|
82
77
|
const ct = cts ? cts[0] : null
|
|
83
78
|
if (ct) {
|
|
@@ -86,6 +81,34 @@ module.exports = {
|
|
|
86
81
|
console.log('humanReadablePane: unknown content-type?')
|
|
87
82
|
}
|
|
88
83
|
|
|
84
|
+
// @@ When we can, use CSP to turn off scripts within the iframe
|
|
85
|
+
div.setAttribute('class', 'docView')
|
|
86
|
+
const element = ct === 'text/markdown' ? 'DIV' : 'IFRAME'
|
|
87
|
+
const frame = myDocument.createElement(element)
|
|
88
|
+
// let dataUri
|
|
89
|
+
|
|
90
|
+
// render markdown to html
|
|
91
|
+
const markdownHtml = function () {
|
|
92
|
+
kb.fetcher.webOperation('GET', subject.uri).then(response => {
|
|
93
|
+
const markdownText = response.responseText
|
|
94
|
+
const lines = Math.min(30, markdownText.split(/\n/).length + 5)
|
|
95
|
+
const res = marked.parse(markdownText)
|
|
96
|
+
// dataUri = 'data:text/html;charset=utf-8,' + encodeURIComponent(res)
|
|
97
|
+
// iframe.setAttribute('src', dataUri)
|
|
98
|
+
frame.innerHTML = res
|
|
99
|
+
frame.setAttribute('class', 'doc')
|
|
100
|
+
frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`)
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (ct === 'text/markdown') {
|
|
105
|
+
markdownHtml()
|
|
106
|
+
} else {
|
|
107
|
+
frame.setAttribute('src', subject.uri) // allow-same-origin
|
|
108
|
+
frame.setAttribute('class', 'doc')
|
|
109
|
+
frame.setAttribute('style', 'resize = both; height:120em; width:80em;')
|
|
110
|
+
}
|
|
111
|
+
|
|
89
112
|
// @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
|
|
90
113
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
91
114
|
// You can;'t have any sandbox and allow plugins.
|
|
@@ -94,13 +117,14 @@ module.exports = {
|
|
|
94
117
|
|
|
95
118
|
// iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static
|
|
96
119
|
|
|
97
|
-
iframe.setAttribute('style', 'resize = both; height: 120em; width:80em;')
|
|
98
120
|
// iframe.setAttribute('height', '480')
|
|
99
121
|
// iframe.setAttribute('width', '640')
|
|
100
122
|
const tr = myDocument.createElement('TR')
|
|
101
|
-
tr.appendChild(
|
|
123
|
+
tr.appendChild(frame)
|
|
102
124
|
div.appendChild(tr)
|
|
103
125
|
return div
|
|
104
126
|
}
|
|
105
127
|
}
|
|
128
|
+
|
|
129
|
+
export default humanReadablePane
|
|
106
130
|
// ends
|
package/src/outline/manager.js
CHANGED
|
@@ -444,7 +444,10 @@ export default function (context) {
|
|
|
444
444
|
const pods = kb.each(me, ns.space('storage'), null, me.doc())
|
|
445
445
|
|
|
446
446
|
try {
|
|
447
|
-
|
|
447
|
+
// if uri then SolidOS is a browse.html web app
|
|
448
|
+
const uri = (new URL(window.location.href)).searchParams.get('uri')
|
|
449
|
+
const podUrl = uri || window.location.href
|
|
450
|
+
await addPodRootFromUrl(podUrl.substring(0, podUrl.lastIndexOf('/') + 1))
|
|
448
451
|
} catch (err) {
|
|
449
452
|
console.error('cannot load container', err)
|
|
450
453
|
}
|
|
@@ -521,6 +524,12 @@ export default function (context) {
|
|
|
521
524
|
// finally - switch to showing dashboard
|
|
522
525
|
outlineContainer.style.display = 'none'
|
|
523
526
|
dashboardContainer.appendChild(dashboard)
|
|
527
|
+
const tab = dashboardContainer.querySelector(
|
|
528
|
+
`[data-global-pane-name="${options.pane}"]`
|
|
529
|
+
)
|
|
530
|
+
if (tab) {
|
|
531
|
+
tab.click()
|
|
532
|
+
}
|
|
524
533
|
|
|
525
534
|
function closeDashboard () {
|
|
526
535
|
dashboardContainer.style.display = 'none'
|
package/src/registerPanes.js
CHANGED
|
@@ -13,7 +13,6 @@ module.exports = function registerPanes (register) {
|
|
|
13
13
|
register(require('issue-pane'))
|
|
14
14
|
register(require('contacts-pane'))
|
|
15
15
|
register(require('activitystreams-pane'))
|
|
16
|
-
register(require('markdown-pane').Pane)
|
|
17
16
|
|
|
18
17
|
register(require('./pad/padPane'))
|
|
19
18
|
// register(require('./argument/argumentPane.js')) // A position in an argument tree
|
|
@@ -54,8 +53,9 @@ module.exports = function registerPanes (register) {
|
|
|
54
53
|
register(require('./socialPane.js'))
|
|
55
54
|
|
|
56
55
|
register(require('./humanReadablePane.js')) // A web page as a web page -- how to escape to tabr?
|
|
57
|
-
register(require('
|
|
56
|
+
// register(require('markdown-pane').Pane) // replaced by markdown in humanReadablePane
|
|
58
57
|
|
|
58
|
+
register(require('./dataContentPane.js')) // Preferred for a data file
|
|
59
59
|
register(require('source-pane')) // edit source
|
|
60
60
|
register(require('./n3Pane.js'))
|
|
61
61
|
register(require('./RDFXMLPane.js'))
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: '2021-
|
|
3
|
-
commit: '
|
|
2
|
+
buildTime: '2021-12-22T16:03:19Z',
|
|
3
|
+
commit: 'f9aeaef823bbf98714208cdce56371653618e0be',
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.5.
|
|
7
|
-
npm: '6.
|
|
8
|
-
ares: '1.
|
|
9
|
-
brotli: '1.0.
|
|
10
|
-
cldr: '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
v8: '7.5.288.22-node.16',
|
|
6
|
+
'solid-panes': '3.5.12',
|
|
7
|
+
npm: '6.14.13',
|
|
8
|
+
ares: '1.17.1',
|
|
9
|
+
brotli: '1.0.9',
|
|
10
|
+
cldr: '39.0',
|
|
11
|
+
icu: '69.1',
|
|
12
|
+
llhttp: '2.1.3',
|
|
13
|
+
modules: '83',
|
|
14
|
+
napi: '8',
|
|
15
|
+
nghttp2: '1.42.0',
|
|
16
|
+
node: '14.17.3',
|
|
17
|
+
openssl: '1.1.1k',
|
|
18
|
+
tz: '2021a',
|
|
19
|
+
unicode: '13.0',
|
|
20
|
+
uv: '1.41.0',
|
|
21
|
+
v8: '8.4.371.23-node.67',
|
|
23
22
|
zlib: '1.2.11'
|
|
24
23
|
}
|
|
25
24
|
}
|