solid-panes 3.6.1-f8ff071d → 3.6.2-352b1a3d
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/coverage/clover.xml +2 -2
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/outline/index.html +1 -1
- package/coverage/lcov-report/outline/outlineIcons.js.html +1 -1
- package/coverage/lcov-report/outline/propertyViews.ts.html +1 -1
- package/coverage/lcov-report/outline/viewAsImage.ts.html +1 -1
- package/coverage/lcov-report/outline/viewAsMbox.ts.html +1 -1
- package/coverage/lcov-report/trustedApplications/index.html +1 -1
- package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +2 -2
- package/coverage/lcov.info +2 -2
- package/eslint.config.mjs +34 -0
- package/lib/dokieli/dokieliPane.js +37 -22
- package/lib/dokieli/dokieliPane.js.map +1 -1
- package/lib/dokieli/new.js +1 -1
- package/lib/dokieli/new.js.map +1 -1
- package/lib/humanReadablePane.js +33 -18
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js +1 -1
- package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/lib/versionInfo.d.ts +17 -10
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +27 -20
- package/lib/versionInfo.js.map +1 -1
- package/package.json +32 -31
- package/src/dokieli/dokieliPane.js +33 -25
- package/src/dokieli/new.html +17 -6
- package/src/dokieli/new.js +1 -1
- package/src/humanReadablePane.js +35 -26
- package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +24 -16
- package/src/trustedApplications/trustedApplications.utils.ts +1 -1
- package/src/versionInfo.ts +27 -20
|
@@ -21,7 +21,7 @@ function getStatementsToDelete(origin, person, kb, ns) {
|
|
|
21
21
|
return statementsToDelete;
|
|
22
22
|
}
|
|
23
23
|
function getStatementsToAdd(origin, nodeName, modes, person, ns) {
|
|
24
|
-
var application = new _rdflib.
|
|
24
|
+
var application = new _rdflib.BlankNode("bn_".concat(nodeName)); // NamedNode(`${person.doc().uri}#${nodeName}`)
|
|
25
25
|
return [(0, _rdflib.st)(person, ns.acl('trustedApp'), application, person.doc()), (0, _rdflib.st)(application, ns.acl('origin'), origin, person.doc())].concat(_toConsumableArray(modes.map(function (mode) {
|
|
26
26
|
return (0, _rdflib.sym)(mode);
|
|
27
27
|
}).map(function (mode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustedApplications.utils.js","names":["_rdflib","require","_toConsumableArray","r","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","a","_arrayLikeToArray","t","toString","call","slice","constructor","name","Array","from","test","Symbol","iterator","isArray","length","e","n","getStatementsToDelete","origin","person","kb","ns","applicationStatements","statementsMatching","acl","statementsToDelete","reduce","memo","st","concat","subject","getStatementsToAdd","nodeName","modes","application","
|
|
1
|
+
{"version":3,"file":"trustedApplications.utils.js","names":["_rdflib","require","_toConsumableArray","r","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","a","_arrayLikeToArray","t","toString","call","slice","constructor","name","Array","from","test","Symbol","iterator","isArray","length","e","n","getStatementsToDelete","origin","person","kb","ns","applicationStatements","statementsMatching","acl","statementsToDelete","reduce","memo","st","concat","subject","getStatementsToAdd","nodeName","modes","application","BlankNode","doc","map","mode","sym","generateRandomString","Math","random","substr"],"sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"sourcesContent":["import { BlankNode, IndexedFormula, NamedNode, st, Literal, sym, Statement } from 'rdflib'\nimport { Namespaces } from 'solid-namespace'\n\nexport function getStatementsToDelete (\n origin: NamedNode | Literal,\n person: NamedNode,\n kb: IndexedFormula,\n ns: Namespaces\n): any {\n const applicationStatements = kb.statementsMatching(\n null,\n ns.acl('origin'),\n origin\n )\n const statementsToDelete = applicationStatements.reduce(\n (memo, st) => {\n return memo\n .concat(\n kb.statementsMatching(\n person,\n ns.acl('trustedApp'),\n st.subject as NamedNode\n )\n )\n .concat(kb.statementsMatching(st.subject))\n },\n [] as Array<Statement>\n )\n return statementsToDelete\n}\n\nexport function getStatementsToAdd (\n origin: NamedNode,\n nodeName: string,\n modes: string[],\n person: NamedNode,\n ns: Namespaces\n): any {\n const application = new BlankNode(`bn_${nodeName}`) // NamedNode(`${person.doc().uri}#${nodeName}`)\n return [\n st(person, ns.acl('trustedApp'), application, person.doc()),\n st(application, ns.acl('origin'), origin, person.doc()),\n ...modes\n .map(mode => sym(mode))\n .map(mode => st(application, ns.acl('mode'), mode, person.doc()))\n ]\n}\n\nexport function generateRandomString () {\n return Math.random().toString(36).substr(2, 5)\n}\n"],"mappings":"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","ignoreList":[]}
|
package/lib/versionInfo.d.ts
CHANGED
|
@@ -5,22 +5,29 @@ declare const _default: {
|
|
|
5
5
|
'solid-panes': string;
|
|
6
6
|
npm: string;
|
|
7
7
|
node: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
zlib: string;
|
|
11
|
-
brotli: string;
|
|
8
|
+
acorn: string;
|
|
9
|
+
ada: string;
|
|
12
10
|
ares: string;
|
|
11
|
+
base64: string;
|
|
12
|
+
brotli: string;
|
|
13
|
+
cjs_module_lexer: string;
|
|
14
|
+
cldr: string;
|
|
15
|
+
icu: string;
|
|
16
|
+
llhttp: string;
|
|
13
17
|
modules: string;
|
|
14
|
-
nghttp2: string;
|
|
15
18
|
napi: string;
|
|
16
|
-
|
|
19
|
+
nghttp2: string;
|
|
20
|
+
nghttp3: string;
|
|
21
|
+
ngtcp2: string;
|
|
17
22
|
openssl: string;
|
|
18
|
-
|
|
19
|
-
icu: string;
|
|
23
|
+
simdutf: string;
|
|
20
24
|
tz: string;
|
|
25
|
+
undici: string;
|
|
21
26
|
unicode: string;
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
uv: string;
|
|
28
|
+
uvwasi: string;
|
|
29
|
+
v8: string;
|
|
30
|
+
zlib: string;
|
|
24
31
|
};
|
|
25
32
|
};
|
|
26
33
|
export default _default;
|
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,wBAgCE"}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,28 +5,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = exports["default"] = {
|
|
8
|
-
buildTime: "2025-02-
|
|
9
|
-
commit: "
|
|
8
|
+
buildTime: "2025-02-13T18:56:08Z",
|
|
9
|
+
commit: "352b1a3d67ab7f41752a2e2508bdde2ef7f8705e",
|
|
10
10
|
npmInfo: {
|
|
11
|
-
'solid-panes': '3.6.
|
|
11
|
+
'solid-panes': '3.6.2',
|
|
12
12
|
npm: '8.19.4',
|
|
13
|
-
node: '
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
llhttp: '6.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
node: '18.20.6',
|
|
14
|
+
acorn: '8.13.0',
|
|
15
|
+
ada: '2.8.0',
|
|
16
|
+
ares: '1.29.0',
|
|
17
|
+
base64: '0.5.2',
|
|
18
|
+
brotli: '1.1.0',
|
|
19
|
+
cjs_module_lexer: '1.2.2',
|
|
20
|
+
cldr: '44.1',
|
|
21
|
+
icu: '74.2',
|
|
22
|
+
llhttp: '6.1.1',
|
|
23
|
+
modules: '108',
|
|
24
|
+
napi: '9',
|
|
25
|
+
nghttp2: '1.61.0',
|
|
26
|
+
nghttp3: '0.7.0',
|
|
27
|
+
ngtcp2: '1.3.0',
|
|
28
|
+
openssl: '3.0.15+quic',
|
|
29
|
+
simdutf: '5.6.0',
|
|
30
|
+
tz: '2024a',
|
|
31
|
+
undici: '5.28.5',
|
|
32
|
+
unicode: '15.1',
|
|
33
|
+
uv: '1.44.2',
|
|
34
|
+
uvwasi: '0.0.19',
|
|
35
|
+
v8: '10.2.154.26-node.37',
|
|
36
|
+
zlib: '1.3.0.1-motley'
|
|
30
37
|
}
|
|
31
38
|
};
|
|
32
39
|
//# sourceMappingURL=versionInfo.js.map
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","acorn","ada","ares","base64","brotli","cjs_module_lexer","cldr","icu","llhttp","modules","napi","nghttp2","nghttp3","ngtcp2","openssl","simdutf","tz","undici","unicode","uv","uvwasi","v8","zlib"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\nbuildTime: \"2025-02-13T18:56:08Z\",\ncommit: \"352b1a3d67ab7f41752a2e2508bdde2ef7f8705e\",\nnpmInfo:\n{\n 'solid-panes': '3.6.2',\n npm: '8.19.4',\n node: '18.20.6',\n acorn: '8.13.0',\n ada: '2.8.0',\n ares: '1.29.0',\n base64: '0.5.2',\n brotli: '1.1.0',\n cjs_module_lexer: '1.2.2',\n cldr: '44.1',\n icu: '74.2',\n llhttp: '6.1.1',\n modules: '108',\n napi: '9',\n nghttp2: '1.61.0',\n nghttp3: '0.7.0',\n ngtcp2: '1.3.0',\n openssl: '3.0.15+quic',\n simdutf: '5.6.0',\n tz: '2024a',\n undici: '5.28.5',\n unicode: '15.1',\n uv: '1.44.2',\n uvwasi: '0.0.19',\n v8: '10.2.154.26-node.37',\n zlib: '1.3.0.1-motley'\n}\n};\n"],"mappings":";;;;;;oCAAe;EACfA,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACP;IACE,aAAa,EAAE,OAAO;IACtBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,KAAK,EAAE,QAAQ;IACfC,GAAG,EAAE,OAAO;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,MAAM,EAAE,OAAO;IACfC,gBAAgB,EAAE,OAAO;IACzBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE,KAAK;IACdC,IAAI,EAAE,GAAG;IACTC,OAAO,EAAE,QAAQ;IACjBC,OAAO,EAAE,OAAO;IAChBC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE,aAAa;IACtBC,OAAO,EAAE,OAAO;IAChBC,EAAE,EAAE,OAAO;IACXC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,MAAM;IACfC,EAAE,EAAE,QAAQ;IACZC,MAAM,EAAE,QAAQ;IAChBC,EAAE,EAAE,qBAAqB;IACzBC,IAAI,EAAE;EACR;AACA,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2-352b1a3d",
|
|
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",
|
|
@@ -46,49 +46,50 @@
|
|
|
46
46
|
"homepage": "https://github.com/solidos/solid-panes",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@solid/better-simple-slideshow": "^0.1.0",
|
|
49
|
-
"@types/jest": "^29.5.
|
|
50
|
-
"activitystreams-pane": "^0.6.
|
|
51
|
-
"chat-pane": "^2.4.
|
|
52
|
-
"contacts-pane": "^2.6.
|
|
53
|
-
"dompurify": "^3.
|
|
54
|
-
"
|
|
55
|
-
"
|
|
49
|
+
"@types/jest": "^29.5.14",
|
|
50
|
+
"activitystreams-pane": "^0.6.14",
|
|
51
|
+
"chat-pane": "^2.4.27",
|
|
52
|
+
"contacts-pane": "^2.6.13",
|
|
53
|
+
"dompurify": "^3.2.4",
|
|
54
|
+
"eslint": "^9.20.1",
|
|
55
|
+
"folder-pane": "^2.4.28",
|
|
56
|
+
"issue-pane": "^2.4.20",
|
|
56
57
|
"marked": "^11.2.0",
|
|
57
|
-
"meeting-pane": "^2.4.
|
|
58
|
+
"meeting-pane": "^2.4.20",
|
|
58
59
|
"mime-types": "^2.1.35",
|
|
59
|
-
"profile-pane": "^1.1.
|
|
60
|
-
"rdflib": "^2.2.
|
|
61
|
-
"solid-namespace": "^0.5.
|
|
62
|
-
"solid-ui": "^2.5.
|
|
63
|
-
"source-pane": "^2.2.
|
|
60
|
+
"profile-pane": "^1.1.2",
|
|
61
|
+
"rdflib": "^2.2.36",
|
|
62
|
+
"solid-namespace": "^0.5.4",
|
|
63
|
+
"solid-ui": "^2.5.1",
|
|
64
|
+
"source-pane": "^2.2.28"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
|
-
"@babel/cli": "^7.
|
|
67
|
-
"@babel/core": "^7.
|
|
68
|
-
"@babel/preset-env": "^7.
|
|
69
|
-
"@babel/preset-typescript": "^7.
|
|
67
|
+
"@babel/cli": "^7.26.4",
|
|
68
|
+
"@babel/core": "^7.26.7",
|
|
69
|
+
"@babel/preset-env": "^7.26.7",
|
|
70
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
70
71
|
"@testing-library/dom": "^9.3.4",
|
|
71
|
-
"@testing-library/jest-dom": "^6.
|
|
72
|
-
"@types/webpack-env": "^1.18.
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
74
|
-
"@typescript-eslint/parser": "^
|
|
75
|
-
"babel-loader": "^9.1
|
|
72
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
73
|
+
"@types/webpack-env": "^1.18.8",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.24.0",
|
|
75
|
+
"@typescript-eslint/parser": "^8.24.0",
|
|
76
|
+
"babel-loader": "^9.2.1",
|
|
76
77
|
"babel-plugin-inline-import": "^3.0.0",
|
|
77
78
|
"buffer": "^6.0.3",
|
|
78
|
-
"
|
|
79
|
-
"html-webpack-plugin": "^5.6.
|
|
79
|
+
"globals": "^15.15.0",
|
|
80
|
+
"html-webpack-plugin": "^5.6.3",
|
|
80
81
|
"husky": "^8.0.3",
|
|
81
82
|
"jest": "^29.7.0",
|
|
82
83
|
"jest-environment-jsdom": "^29.7.0",
|
|
83
84
|
"jest-fetch-mock": "^3.0.3",
|
|
84
|
-
"lint-staged": "^15.
|
|
85
|
+
"lint-staged": "^15.4.3",
|
|
85
86
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
|
86
87
|
"path-browserify": "^1.0.1",
|
|
87
|
-
"react": "^18.
|
|
88
|
-
"react-dom": "^18.
|
|
89
|
-
"ts-jest": "^29.
|
|
90
|
-
"typescript": "^5.
|
|
91
|
-
"webpack": "^5.
|
|
88
|
+
"react": "^18.3.1",
|
|
89
|
+
"react-dom": "^18.3.1",
|
|
90
|
+
"ts-jest": "^29.2.5",
|
|
91
|
+
"typescript": "^5.7.3",
|
|
92
|
+
"webpack": "^5.97.1",
|
|
92
93
|
"webpack-cli": "^5.1.4",
|
|
93
94
|
"webpack-dev-server": "^4.15.2"
|
|
94
95
|
},
|
|
@@ -11,7 +11,7 @@ import * as mime from 'mime-types'
|
|
|
11
11
|
|
|
12
12
|
// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import DOKIELI_TEMPLATE from './new.js' // Distributed with this library
|
|
15
15
|
|
|
16
16
|
export default {
|
|
17
17
|
icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?
|
|
@@ -47,7 +47,7 @@ export default {
|
|
|
47
47
|
|
|
48
48
|
// This data coul d come from a fetch OR from ldp comtaimner
|
|
49
49
|
const hasContentTypeIn2 = function (kb, x, displayables) {
|
|
50
|
-
const t = kb.findTypeURIs(
|
|
50
|
+
const t = kb.findTypeURIs(x)
|
|
51
51
|
for (let k = 0; k < displayables.length; k++) {
|
|
52
52
|
if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) {
|
|
53
53
|
return true
|
|
@@ -138,41 +138,49 @@ export default {
|
|
|
138
138
|
div.setAttribute('class', 'docView')
|
|
139
139
|
const iframe = myDocument.createElement('IFRAME')
|
|
140
140
|
|
|
141
|
-
//
|
|
141
|
+
// Function to set iframe attributes
|
|
142
|
+
const setIframeAttributes = (iframe, blob, lines) => {
|
|
143
|
+
const objectURL = URL.createObjectURL(blob)
|
|
144
|
+
iframe.setAttribute('src', objectURL)
|
|
145
|
+
iframe.setAttribute('type', blob.type)
|
|
146
|
+
iframe.setAttribute('class', 'doc')
|
|
147
|
+
iframe.setAttribute('style', `border: 1px solid; padding: 1em; height:${lines}em; width:800px; resize: both; overflow: auto;`)
|
|
148
|
+
|
|
149
|
+
// Apply sandbox attribute only for HTML files
|
|
150
|
+
// @@ NOte beflow - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
|
|
151
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
152
|
+
// You can;'t have any sandbox and allow plugins.
|
|
153
|
+
// We could sandbox only HTML files I suppose.
|
|
154
|
+
// HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html
|
|
155
|
+
if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') {
|
|
156
|
+
iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin')
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Fetch and process the blob
|
|
142
161
|
kb.fetcher._fetch(subject.uri)
|
|
143
|
-
.then(
|
|
144
|
-
|
|
162
|
+
.then(response => response.blob())
|
|
163
|
+
.then(blob => {
|
|
164
|
+
const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve('')
|
|
165
|
+
return blobTextPromise.then(blobText => ({ blob, blobText }))
|
|
145
166
|
})
|
|
146
|
-
.then(
|
|
147
|
-
const objectURL = URL.createObjectURL(blob)
|
|
148
|
-
iframe.setAttribute('src', objectURL) // w640 h480 //
|
|
149
|
-
iframe.setAttribute('type', blob.type)
|
|
150
|
-
iframe.setAttribute('class', 'doc')
|
|
151
|
-
return blob.text()
|
|
152
|
-
})
|
|
153
|
-
.then(function(blobText) {
|
|
167
|
+
.then(({ blob, blobText }) => {
|
|
154
168
|
const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5
|
|
155
169
|
const lines = Math.min(30, blobText.split(/\n/).length + newLines)
|
|
156
|
-
iframe
|
|
157
|
-
|
|
158
|
-
.catch(err => {
|
|
170
|
+
setIframeAttributes(iframe, blob, lines)
|
|
171
|
+
})
|
|
172
|
+
.catch(err => {
|
|
173
|
+
console.log('Error fetching or processing blob:', err)
|
|
174
|
+
})
|
|
159
175
|
|
|
160
176
|
const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')
|
|
161
|
-
const ct = cts ? cts[0] : null
|
|
177
|
+
const ct = cts ? cts[0].split(';', 1)[0].trim() : null
|
|
162
178
|
if (ct) {
|
|
163
179
|
console.log('dokieliPane: c-t:' + ct)
|
|
164
180
|
} else {
|
|
165
181
|
console.log('dokieliPane: unknown content-type?')
|
|
166
182
|
}
|
|
167
183
|
|
|
168
|
-
// @@ NOte beflow - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
|
|
169
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
170
|
-
// You can;'t have any sandbox and allow plugins.
|
|
171
|
-
// We could sandbox only HTML files I suppose.
|
|
172
|
-
// HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html
|
|
173
|
-
|
|
174
|
-
// iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static
|
|
175
|
-
|
|
176
184
|
const tr = myDocument.createElement('tr')
|
|
177
185
|
tr.appendChild(iframe)
|
|
178
186
|
div.appendChild(tr)
|
package/src/dokieli/new.html
CHANGED
|
@@ -4,16 +4,27 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<title></title>
|
|
6
6
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
7
|
-
<link
|
|
8
|
-
|
|
7
|
+
<link
|
|
8
|
+
href="https://dokie.li/media/css/basic.css"
|
|
9
|
+
media="all"
|
|
10
|
+
rel="stylesheet"
|
|
11
|
+
title="Basic"
|
|
12
|
+
/>
|
|
13
|
+
<link
|
|
14
|
+
href="https://dokie.li/media/css/dokieli.css"
|
|
15
|
+
media="all"
|
|
16
|
+
rel="stylesheet"
|
|
17
|
+
/>
|
|
9
18
|
<script src="https://dokie.li/scripts/dokieli.js"></script>
|
|
10
19
|
</head>
|
|
11
20
|
|
|
12
|
-
<body
|
|
21
|
+
<body
|
|
22
|
+
about=""
|
|
23
|
+
prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# cc: https://creativecommons.org/ns# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#"
|
|
24
|
+
typeof="schema:CreativeWork sioc:Post prov:Entity"
|
|
25
|
+
>
|
|
13
26
|
<main>
|
|
14
|
-
<article about="" typeof="schema:Article">
|
|
15
|
-
|
|
16
|
-
</article>
|
|
27
|
+
<article about="" typeof="schema:Article"></article>
|
|
17
28
|
</main>
|
|
18
29
|
</body>
|
|
19
30
|
</html>
|
package/src/dokieli/new.js
CHANGED
package/src/humanReadablePane.js
CHANGED
|
@@ -75,7 +75,7 @@ const humanReadablePane = {
|
|
|
75
75
|
const kb = context.session.store
|
|
76
76
|
|
|
77
77
|
const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')
|
|
78
|
-
const ct = cts ? cts[0] : null
|
|
78
|
+
const ct = cts ? cts[0].split(';', 1)[0].trim() : null // remove content-type parameters
|
|
79
79
|
if (ct) {
|
|
80
80
|
// console.log('humanReadablePane: c-t:' + ct)
|
|
81
81
|
} else {
|
|
@@ -87,6 +87,22 @@ const humanReadablePane = {
|
|
|
87
87
|
const element = ct === 'text/markdown' ? 'DIV' : 'IFRAME'
|
|
88
88
|
const frame = myDocument.createElement(element)
|
|
89
89
|
|
|
90
|
+
const setIframeAttributes = (frame, blob, lines) => {
|
|
91
|
+
frame.setAttribute('src', URL.createObjectURL(blob));
|
|
92
|
+
frame.setAttribute('type', blob.type);
|
|
93
|
+
frame.setAttribute('class', 'doc');
|
|
94
|
+
frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`);
|
|
95
|
+
|
|
96
|
+
// Apply sandbox attribute only for HTML files
|
|
97
|
+
// @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
|
|
98
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
99
|
+
// You can't have any sandbox and allow plugins.
|
|
100
|
+
// We could sandbox only HTML files I suppose.
|
|
101
|
+
if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') {
|
|
102
|
+
frame.setAttribute('sandbox', 'allow-scripts allow-same-origin');
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
90
106
|
// render markdown to html
|
|
91
107
|
const markdownHtml = function () {
|
|
92
108
|
kb.fetcher.webOperation('GET', subject.uri).then(response => {
|
|
@@ -97,39 +113,32 @@ const humanReadablePane = {
|
|
|
97
113
|
frame.innerHTML = clean
|
|
98
114
|
frame.setAttribute('class', 'doc')
|
|
99
115
|
frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`)
|
|
116
|
+
}).catch(error => {
|
|
117
|
+
console.error('Error fetching markdown content:', error)
|
|
118
|
+
frame.innerHTML = '<p>Error loading content</p>'
|
|
100
119
|
})
|
|
101
120
|
}
|
|
102
121
|
|
|
103
122
|
if (ct === 'text/markdown') {
|
|
104
123
|
markdownHtml()
|
|
105
124
|
} else {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
.then(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
frame.setAttribute('style', `border: 1px solid; padding: 1em; height:${lines}em; width:800px; resize: both; overflow: auto;`)
|
|
122
|
-
})
|
|
125
|
+
// Fetch and process the blob
|
|
126
|
+
kb.fetcher._fetch(subject.uri)
|
|
127
|
+
.then(response => response.blob())
|
|
128
|
+
.then(blob => {
|
|
129
|
+
const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve('')
|
|
130
|
+
return blobTextPromise.then(blobText => ({ blob, blobText }))
|
|
131
|
+
})
|
|
132
|
+
.then(({ blob, blobText }) => {
|
|
133
|
+
const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5
|
|
134
|
+
const lines = Math.min(30, blobText.split(/\n/).length + newLines)
|
|
135
|
+
setIframeAttributes(frame, blob, lines)
|
|
136
|
+
})
|
|
137
|
+
.catch(err => {
|
|
138
|
+
console.log('Error fetching or processing blob:', err)
|
|
139
|
+
})
|
|
123
140
|
}
|
|
124
141
|
|
|
125
|
-
// @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
|
|
126
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
|
|
127
|
-
// You can't have any sandbox and allow plugins.
|
|
128
|
-
// We could sandbox only HTML files I suppose.
|
|
129
|
-
// HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html
|
|
130
|
-
|
|
131
|
-
// iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static
|
|
132
|
-
|
|
133
142
|
const tr = myDocument.createElement('TR')
|
|
134
143
|
tr.appendChild(frame)
|
|
135
144
|
div.appendChild(tr)
|
|
@@ -8,10 +8,12 @@ exports[`getStatementsToAdd should return all required statements to add the giv
|
|
|
8
8
|
"termType": "NamedNode",
|
|
9
9
|
"value": "https://profile.example",
|
|
10
10
|
},
|
|
11
|
-
"object":
|
|
12
|
-
"classOrder":
|
|
13
|
-
"
|
|
14
|
-
"
|
|
11
|
+
"object": BlankNode {
|
|
12
|
+
"classOrder": 6,
|
|
13
|
+
"isBlank": 1,
|
|
14
|
+
"isVar": 1,
|
|
15
|
+
"termType": "BlankNode",
|
|
16
|
+
"value": "bn_mock_app_id",
|
|
15
17
|
},
|
|
16
18
|
"predicate": NamedNode {
|
|
17
19
|
"classOrder": 5,
|
|
@@ -40,10 +42,12 @@ exports[`getStatementsToAdd should return all required statements to add the giv
|
|
|
40
42
|
"termType": "NamedNode",
|
|
41
43
|
"value": "http://www.w3.org/ns/auth/acl#origin",
|
|
42
44
|
},
|
|
43
|
-
"subject":
|
|
44
|
-
"classOrder":
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"subject": BlankNode {
|
|
46
|
+
"classOrder": 6,
|
|
47
|
+
"isBlank": 1,
|
|
48
|
+
"isVar": 1,
|
|
49
|
+
"termType": "BlankNode",
|
|
50
|
+
"value": "bn_mock_app_id",
|
|
47
51
|
},
|
|
48
52
|
},
|
|
49
53
|
Statement {
|
|
@@ -62,10 +66,12 @@ exports[`getStatementsToAdd should return all required statements to add the giv
|
|
|
62
66
|
"termType": "NamedNode",
|
|
63
67
|
"value": "http://www.w3.org/ns/auth/acl#mode",
|
|
64
68
|
},
|
|
65
|
-
"subject":
|
|
66
|
-
"classOrder":
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
+
"subject": BlankNode {
|
|
70
|
+
"classOrder": 6,
|
|
71
|
+
"isBlank": 1,
|
|
72
|
+
"isVar": 1,
|
|
73
|
+
"termType": "BlankNode",
|
|
74
|
+
"value": "bn_mock_app_id",
|
|
69
75
|
},
|
|
70
76
|
},
|
|
71
77
|
Statement {
|
|
@@ -84,10 +90,12 @@ exports[`getStatementsToAdd should return all required statements to add the giv
|
|
|
84
90
|
"termType": "NamedNode",
|
|
85
91
|
"value": "http://www.w3.org/ns/auth/acl#mode",
|
|
86
92
|
},
|
|
87
|
-
"subject":
|
|
88
|
-
"classOrder":
|
|
89
|
-
"
|
|
90
|
-
"
|
|
93
|
+
"subject": BlankNode {
|
|
94
|
+
"classOrder": 6,
|
|
95
|
+
"isBlank": 1,
|
|
96
|
+
"isVar": 1,
|
|
97
|
+
"termType": "BlankNode",
|
|
98
|
+
"value": "bn_mock_app_id",
|
|
91
99
|
},
|
|
92
100
|
},
|
|
93
101
|
]
|
|
@@ -36,7 +36,7 @@ export function getStatementsToAdd (
|
|
|
36
36
|
person: NamedNode,
|
|
37
37
|
ns: Namespaces
|
|
38
38
|
): any {
|
|
39
|
-
const application = new NamedNode(`${person.doc().uri}#${nodeName}`)
|
|
39
|
+
const application = new BlankNode(`bn_${nodeName}`) // NamedNode(`${person.doc().uri}#${nodeName}`)
|
|
40
40
|
return [
|
|
41
41
|
st(person, ns.acl('trustedApp'), application, person.doc()),
|
|
42
42
|
st(application, ns.acl('origin'), origin, person.doc()),
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: "2025-02-
|
|
3
|
-
commit: "
|
|
2
|
+
buildTime: "2025-02-13T18:56:08Z",
|
|
3
|
+
commit: "352b1a3d67ab7f41752a2e2508bdde2ef7f8705e",
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.6.
|
|
6
|
+
'solid-panes': '3.6.2',
|
|
7
7
|
npm: '8.19.4',
|
|
8
|
-
node: '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
llhttp: '6.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
node: '18.20.6',
|
|
9
|
+
acorn: '8.13.0',
|
|
10
|
+
ada: '2.8.0',
|
|
11
|
+
ares: '1.29.0',
|
|
12
|
+
base64: '0.5.2',
|
|
13
|
+
brotli: '1.1.0',
|
|
14
|
+
cjs_module_lexer: '1.2.2',
|
|
15
|
+
cldr: '44.1',
|
|
16
|
+
icu: '74.2',
|
|
17
|
+
llhttp: '6.1.1',
|
|
18
|
+
modules: '108',
|
|
19
|
+
napi: '9',
|
|
20
|
+
nghttp2: '1.61.0',
|
|
21
|
+
nghttp3: '0.7.0',
|
|
22
|
+
ngtcp2: '1.3.0',
|
|
23
|
+
openssl: '3.0.15+quic',
|
|
24
|
+
simdutf: '5.6.0',
|
|
25
|
+
tz: '2024a',
|
|
26
|
+
undici: '5.28.5',
|
|
27
|
+
unicode: '15.1',
|
|
28
|
+
uv: '1.44.2',
|
|
29
|
+
uvwasi: '0.0.19',
|
|
30
|
+
v8: '10.2.154.26-node.37',
|
|
31
|
+
zlib: '1.3.0.1-motley'
|
|
25
32
|
}
|
|
26
33
|
};
|