solid-panes 3.5.15 → 3.5.16-alpha
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/lib/outline/manager.js +193 -162
- package/lib/outline/manager.js.map +1 -1
- package/lib/versionInfo.js +3 -3
- package/lib/versionInfo.js.map +1 -1
- package/package.json +3 -3
- package/src/outline/manager.js +29 -13
- package/src/versionInfo.ts +3 -3
package/lib/versionInfo.js
CHANGED
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = {
|
|
8
|
-
buildTime: '2022-
|
|
9
|
-
commit: '
|
|
8
|
+
buildTime: '2022-02-06T14:39:07Z',
|
|
9
|
+
commit: '51887453dbcfa28d5485e9f2178193b6aea53fa0',
|
|
10
10
|
npmInfo: {
|
|
11
|
-
'solid-panes': '3.5.
|
|
11
|
+
'solid-panes': '3.5.16',
|
|
12
12
|
npm: '6.14.13',
|
|
13
13
|
ares: '1.17.1',
|
|
14
14
|
brotli: '1.0.9',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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: '2022-
|
|
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: '2022-02-06T14:39:07Z',\n commit: '51887453dbcfa28d5485e9f2178193b6aea53fa0',\n npmInfo:\n{\n 'solid-panes': '3.5.16',\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.16-alpha",
|
|
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",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"activitystreams-pane": "^0.6.3",
|
|
50
50
|
"babel-preset-env": "^1.7.0",
|
|
51
51
|
"babel-preset-metalab": "^1.0.0",
|
|
52
|
-
"chat-pane": "^2.4.
|
|
52
|
+
"chat-pane": "^2.4.15",
|
|
53
53
|
"contacts-pane": "^2.6.0",
|
|
54
54
|
"folder-pane": "^2.4.12",
|
|
55
55
|
"issue-pane": "^2.4.9",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"react-dom": "^17.0.2",
|
|
65
65
|
"solid-logic": "^1.3.13",
|
|
66
66
|
"solid-namespace": "^0.5.2",
|
|
67
|
-
"solid-ui": "^2.4.
|
|
67
|
+
"solid-ui": "^2.4.16",
|
|
68
68
|
"source-pane": "^2.2.14"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
package/src/outline/manager.js
CHANGED
|
@@ -416,23 +416,23 @@ export default function (context) {
|
|
|
416
416
|
.concat(pods)
|
|
417
417
|
|
|
418
418
|
async function getPods () {
|
|
419
|
-
async function
|
|
420
|
-
await
|
|
419
|
+
async function addPodStorage (pod) { // namedNode
|
|
420
|
+
await loadContainerRepresentation(pod)
|
|
421
421
|
if (kb.holds(pod, ns.rdf('type'), ns.space('Storage'), pod.doc())) {
|
|
422
422
|
pods.push(pod)
|
|
423
423
|
return true
|
|
424
424
|
}
|
|
425
425
|
return false
|
|
426
426
|
}
|
|
427
|
-
async function
|
|
427
|
+
async function addPodStorageFromUrl (url) {
|
|
428
428
|
const podStorage = new URL(url)
|
|
429
|
-
// check
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
429
|
+
// check for predicate pim:Storage in containers up the path tree
|
|
430
|
+
let pathStorage = podStorage.pathname
|
|
431
|
+
while (pathStorage.length) {
|
|
432
|
+
pathStorage = pathStorage.substring(0, pathStorage.lastIndexOf('/'))
|
|
433
|
+
if (await addPodStorage(kb.sym(`${podStorage.origin}${pathStorage}/`))) return
|
|
435
434
|
}
|
|
435
|
+
// TODO should url.origin be added to pods list when there are no pim:Storage ???
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
try {
|
|
@@ -442,16 +442,32 @@ export default function (context) {
|
|
|
442
442
|
console.error('Unable to load profile', err)
|
|
443
443
|
return []
|
|
444
444
|
}
|
|
445
|
-
|
|
445
|
+
// load pod's storages from profile
|
|
446
|
+
let pods = kb.each(me, ns.space('storage'), null, me.doc())
|
|
447
|
+
pods.map(async (pod) => {
|
|
448
|
+
// TODO use addPodStorageFromUrl(pod.uri) to check for pim:Storage ???
|
|
449
|
+
await loadContainerRepresentation(pod)
|
|
450
|
+
})
|
|
446
451
|
|
|
447
452
|
try {
|
|
448
453
|
// if uri then SolidOS is a browse.html web app
|
|
449
454
|
const uri = (new URL(window.location.href)).searchParams.get('uri')
|
|
450
455
|
const podUrl = uri || window.location.href
|
|
451
|
-
await
|
|
456
|
+
await addPodStorageFromUrl(podUrl)
|
|
452
457
|
} catch (err) {
|
|
453
458
|
console.error('cannot load container', err)
|
|
454
459
|
}
|
|
460
|
+
// remove namedNodes duplicates
|
|
461
|
+
function uniques (nodes) {
|
|
462
|
+
const uniqueNodes = []
|
|
463
|
+
nodes.forEach(node => {
|
|
464
|
+
if (!uniqueNodes.find(uniqueNode => uniqueNode.equals(node))) uniqueNodes.push(node)
|
|
465
|
+
})
|
|
466
|
+
return uniqueNodes
|
|
467
|
+
}
|
|
468
|
+
pods = uniques(pods)
|
|
469
|
+
console.log('return pods')
|
|
470
|
+
console.log(pods)
|
|
455
471
|
if (!pods.length) return []
|
|
456
472
|
return pods.map((pod, index) => {
|
|
457
473
|
function split (item) { return item.uri.split('//')[1].slice(0, -1) }
|
|
@@ -566,7 +582,7 @@ export default function (context) {
|
|
|
566
582
|
)
|
|
567
583
|
}
|
|
568
584
|
|
|
569
|
-
async function
|
|
585
|
+
async function loadContainerRepresentation (subject) {
|
|
570
586
|
// force reload for index.html with RDFa
|
|
571
587
|
if (!kb.any(subject, ns.ldp('contains'), undefined, subject.doc())) {
|
|
572
588
|
const response = await kb.fetcher.webOperation('GET', subject.uri, kb.fetcher.initFetchOptions(subject.uri, { headers: { accept: 'text/turtle' } }))
|
|
@@ -577,7 +593,7 @@ export default function (context) {
|
|
|
577
593
|
|
|
578
594
|
async function getRelevantPanes (subject, context) {
|
|
579
595
|
// make sure container representation is loaded (when server returns index.html)
|
|
580
|
-
if (subject.uri.endsWith('/')) { await
|
|
596
|
+
if (subject.uri.endsWith('/')) { await loadContainerRepresentation(subject) }
|
|
581
597
|
const panes = context.session.paneRegistry
|
|
582
598
|
const relevantPanes = panes.list.filter(
|
|
583
599
|
pane => pane.label(subject, context) && !pane.global
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: '2022-
|
|
3
|
-
commit: '
|
|
2
|
+
buildTime: '2022-02-06T14:39:07Z',
|
|
3
|
+
commit: '51887453dbcfa28d5485e9f2178193b6aea53fa0',
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.5.
|
|
6
|
+
'solid-panes': '3.5.16',
|
|
7
7
|
npm: '6.14.13',
|
|
8
8
|
ares: '1.17.1',
|
|
9
9
|
brotli: '1.0.9',
|