solid-panes 3.6.2 → 3.6.3-7e7222f2
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/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 +1 -1
- package/eslint.config.mjs +34 -0
- package/lib/RDFXMLPane.js +1 -2
- package/lib/RDFXMLPane.js.map +1 -1
- package/lib/argument/argumentPane.js +1 -2
- package/lib/argument/argumentPane.js.map +1 -1
- package/lib/attach/attachPane.js +1 -2
- package/lib/attach/attachPane.js.map +1 -1
- package/lib/audio/audioPane.js +1 -2
- package/lib/audio/audioPane.js.map +1 -1
- package/lib/classInstancePane.js +1 -2
- package/lib/classInstancePane.js.map +1 -1
- package/lib/dashboard/basicPreferences.js +47 -55
- package/lib/dashboard/basicPreferences.js.map +1 -1
- package/lib/dashboard/homepage.js +15 -21
- package/lib/dashboard/homepage.js.map +1 -1
- package/lib/dataContentPane.js +1 -2
- package/lib/dataContentPane.js.map +1 -1
- package/lib/defaultPane.js +1 -2
- package/lib/defaultPane.js.map +1 -1
- package/lib/dokieli/dokieliPane.js +35 -22
- package/lib/dokieli/dokieliPane.js.map +1 -1
- package/lib/form/pane.js +1 -2
- package/lib/form/pane.js.map +1 -1
- package/lib/home/homePane.js +10 -11
- package/lib/home/homePane.js.map +1 -1
- package/lib/humanReadablePane.js +34 -19
- package/lib/humanReadablePane.js.map +1 -1
- package/lib/imagePane.js +1 -2
- package/lib/imagePane.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/mainPage/header.js +36 -43
- package/lib/mainPage/header.js.map +1 -1
- package/lib/mainPage/index.js +9 -12
- package/lib/mainPage/index.js.map +1 -1
- package/lib/microblogPane/microblogPane.js +1 -2
- package/lib/microblogPane/microblogPane.js.map +1 -1
- package/lib/n3Pane.js +1 -2
- package/lib/n3Pane.js.map +1 -1
- package/lib/outline/manager.js +161 -189
- package/lib/outline/manager.js.map +1 -1
- package/lib/outline/manager.test.js +10 -11
- package/lib/outline/manager.test.js.map +1 -1
- package/lib/outline/outlineIcons.js +1 -2
- package/lib/outline/outlineIcons.js.map +1 -1
- package/lib/outline/queryByExample.js +1 -2
- package/lib/outline/queryByExample.js.map +1 -1
- package/lib/outline/userInput.js +1 -2
- package/lib/outline/userInput.js.map +1 -1
- package/lib/outline/viewAsImage.d.ts.map +1 -1
- package/lib/outline/viewAsImage.js +1 -2
- package/lib/outline/viewAsImage.js.map +1 -1
- package/lib/outline/viewAsMbox.d.ts.map +1 -1
- package/lib/playlist/playlistPane.js +1 -2
- package/lib/playlist/playlistPane.js.map +1 -1
- package/lib/schedule/schedulePane.js +1 -2
- package/lib/schedule/schedulePane.js.map +1 -1
- package/lib/slideshow/slideshowPane.js +1 -2
- package/lib/slideshow/slideshowPane.js.map +1 -1
- package/lib/socialPane.js +1 -2
- package/lib/socialPane.js.map +1 -1
- package/lib/tabbed/tabbedPane.js +11 -12
- package/lib/tabbed/tabbedPane.js.map +1 -1
- package/lib/tableViewPane.js +1 -2
- package/lib/tableViewPane.js.map +1 -1
- package/lib/transaction/pane.js +1 -2
- package/lib/transaction/pane.js.map +1 -1
- package/lib/transaction/period.js +1 -2
- package/lib/transaction/period.js.map +1 -1
- package/lib/trip/tripPane.js +1 -2
- package/lib/trip/tripPane.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.test.js +1 -2
- package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
- package/lib/trustedApplications/trustedApplications.view.js +15 -16
- package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
- package/lib/ui/pane.js +1 -2
- package/lib/ui/pane.js.map +1 -1
- package/lib/versionInfo.d.ts +16 -10
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +26 -20
- package/lib/versionInfo.js.map +1 -1
- package/lib/video/videoPane.js +1 -2
- package/lib/video/videoPane.js.map +1 -1
- package/package.json +5 -4
- package/src/dokieli/dokieliPane.js +32 -24
- package/src/humanReadablePane.js +36 -27
- package/src/versionInfo.ts +26 -20
package/src/humanReadablePane.js
CHANGED
|
@@ -45,7 +45,7 @@ const humanReadablePane = {
|
|
|
45
45
|
|
|
46
46
|
// This data could come from a fetch OR from ldp container
|
|
47
47
|
const hasContentTypeIn2 = function (kb, x, displayables) {
|
|
48
|
-
const t = kb.findTypeURIs(
|
|
48
|
+
const t = kb.findTypeURIs(x)
|
|
49
49
|
for (let k = 0; k < displayables.length; k++) {
|
|
50
50
|
if (Util.mediaTypeClass(displayables[k]).uri in t) {
|
|
51
51
|
return true
|
|
@@ -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)
|
package/src/versionInfo.ts
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
buildTime: "2025-
|
|
3
|
-
commit: "
|
|
2
|
+
buildTime: "2025-07-30T13:07:15Z",
|
|
3
|
+
commit: "7e7222f2d67b6e2a963aaea2bd099f4766618e83",
|
|
4
4
|
npmInfo:
|
|
5
5
|
{
|
|
6
|
-
'solid-panes': '3.6.
|
|
6
|
+
'solid-panes': '3.6.3',
|
|
7
7
|
npm: '8.19.4',
|
|
8
|
-
node: '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
brotli: '1.0
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
node: '20.19.4',
|
|
9
|
+
acorn: '8.14.0',
|
|
10
|
+
ada: '2.9.2',
|
|
11
|
+
ares: '1.34.5',
|
|
12
|
+
brotli: '1.1.0',
|
|
13
|
+
cjs_module_lexer: '1.4.1',
|
|
14
|
+
cldr: '47.0',
|
|
15
|
+
icu: '77.1',
|
|
16
|
+
llhttp: '9.2.1',
|
|
17
|
+
modules: '115',
|
|
18
|
+
napi: '9',
|
|
19
|
+
nghttp2: '1.61.0',
|
|
20
|
+
nghttp3: '0.7.0',
|
|
21
|
+
ngtcp2: '1.1.0',
|
|
22
|
+
openssl: '3.0.15+quic',
|
|
23
|
+
simdutf: '6.4.2',
|
|
24
|
+
tz: '2025b',
|
|
25
|
+
undici: '6.21.2',
|
|
26
|
+
unicode: '16.0',
|
|
27
|
+
uv: '1.46.0',
|
|
28
|
+
uvwasi: '0.0.21',
|
|
29
|
+
v8: '11.3.244.8-node.29',
|
|
30
|
+
zlib: '1.3.0.1-motley-82a5fec'
|
|
25
31
|
}
|
|
26
32
|
};
|