solid-panes 3.6.2 → 3.6.3-2722fc84

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.
Files changed (106) hide show
  1. package/coverage/clover.xml +2 -2
  2. package/coverage/lcov-report/index.html +1 -1
  3. package/coverage/lcov-report/outline/index.html +1 -1
  4. package/coverage/lcov-report/outline/outlineIcons.js.html +1 -1
  5. package/coverage/lcov-report/outline/propertyViews.ts.html +1 -1
  6. package/coverage/lcov-report/outline/viewAsImage.ts.html +1 -1
  7. package/coverage/lcov-report/outline/viewAsMbox.ts.html +1 -1
  8. package/coverage/lcov-report/trustedApplications/index.html +1 -1
  9. package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +1 -1
  10. package/eslint.config.mjs +34 -0
  11. package/lib/RDFXMLPane.js +1 -2
  12. package/lib/RDFXMLPane.js.map +1 -1
  13. package/lib/argument/argumentPane.js +1 -2
  14. package/lib/argument/argumentPane.js.map +1 -1
  15. package/lib/attach/attachPane.js +2 -3
  16. package/lib/attach/attachPane.js.map +1 -1
  17. package/lib/audio/audioPane.js +1 -2
  18. package/lib/audio/audioPane.js.map +1 -1
  19. package/lib/classInstancePane.js +1 -2
  20. package/lib/classInstancePane.js.map +1 -1
  21. package/lib/dashboard/basicPreferences.js +47 -55
  22. package/lib/dashboard/basicPreferences.js.map +1 -1
  23. package/lib/dashboard/homepage.js +15 -21
  24. package/lib/dashboard/homepage.js.map +1 -1
  25. package/lib/dataContentPane.js +1 -2
  26. package/lib/dataContentPane.js.map +1 -1
  27. package/lib/defaultPane.js +1 -2
  28. package/lib/defaultPane.js.map +1 -1
  29. package/lib/dokieli/dokieliPane.js +35 -22
  30. package/lib/dokieli/dokieliPane.js.map +1 -1
  31. package/lib/form/pane.js +1 -2
  32. package/lib/form/pane.js.map +1 -1
  33. package/lib/home/homePane.js +10 -11
  34. package/lib/home/homePane.js.map +1 -1
  35. package/lib/humanReadablePane.js +34 -19
  36. package/lib/humanReadablePane.js.map +1 -1
  37. package/lib/imagePane.js +1 -2
  38. package/lib/imagePane.js.map +1 -1
  39. package/lib/index.js +1 -2
  40. package/lib/index.js.map +1 -1
  41. package/lib/mainPage/header.js +36 -43
  42. package/lib/mainPage/header.js.map +1 -1
  43. package/lib/mainPage/index.js +9 -12
  44. package/lib/mainPage/index.js.map +1 -1
  45. package/lib/microblogPane/microblogPane.js +1 -2
  46. package/lib/microblogPane/microblogPane.js.map +1 -1
  47. package/lib/n3Pane.js +1 -2
  48. package/lib/n3Pane.js.map +1 -1
  49. package/lib/outline/manager.js +162 -190
  50. package/lib/outline/manager.js.map +1 -1
  51. package/lib/outline/manager.test.js +10 -11
  52. package/lib/outline/manager.test.js.map +1 -1
  53. package/lib/outline/outlineIcons.js +1 -2
  54. package/lib/outline/outlineIcons.js.map +1 -1
  55. package/lib/outline/queryByExample.js +1 -2
  56. package/lib/outline/queryByExample.js.map +1 -1
  57. package/lib/outline/userInput.js +4 -8
  58. package/lib/outline/userInput.js.map +1 -1
  59. package/lib/outline/viewAsImage.d.ts.map +1 -1
  60. package/lib/outline/viewAsImage.js +1 -2
  61. package/lib/outline/viewAsImage.js.map +1 -1
  62. package/lib/outline/viewAsMbox.d.ts.map +1 -1
  63. package/lib/playlist/playlistPane.js +1 -2
  64. package/lib/playlist/playlistPane.js.map +1 -1
  65. package/lib/schedule/schedulePane.js +1 -2
  66. package/lib/schedule/schedulePane.js.map +1 -1
  67. package/lib/slideshow/slideshowPane.js +1 -2
  68. package/lib/slideshow/slideshowPane.js.map +1 -1
  69. package/lib/socialPane.js +1 -2
  70. package/lib/socialPane.js.map +1 -1
  71. package/lib/tabbed/tabbedPane.js +11 -12
  72. package/lib/tabbed/tabbedPane.js.map +1 -1
  73. package/lib/tableViewPane.js +1 -2
  74. package/lib/tableViewPane.js.map +1 -1
  75. package/lib/test-import-export/edit-importer.js +0 -1
  76. package/lib/test-import-export/edit-importer.js.map +1 -1
  77. package/lib/transaction/pane.js +3 -4
  78. package/lib/transaction/pane.js.map +1 -1
  79. package/lib/transaction/period.js +3 -4
  80. package/lib/transaction/period.js.map +1 -1
  81. package/lib/trip/tripPane.js +1 -2
  82. package/lib/trip/tripPane.js.map +1 -1
  83. package/lib/trustedApplications/trustedApplications.test.js +1 -2
  84. package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
  85. package/lib/trustedApplications/trustedApplications.view.js +15 -16
  86. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  87. package/lib/types.js.map +1 -1
  88. package/lib/ui/pane.js +1 -2
  89. package/lib/ui/pane.js.map +1 -1
  90. package/lib/versionInfo.d.ts +16 -10
  91. package/lib/versionInfo.d.ts.map +1 -1
  92. package/lib/versionInfo.js +26 -20
  93. package/lib/versionInfo.js.map +1 -1
  94. package/lib/video/videoPane.js +1 -2
  95. package/lib/video/videoPane.js.map +1 -1
  96. package/package.json +8 -7
  97. package/src/attach/attachPane.js +1 -1
  98. package/src/dokieli/dokieliPane.js +32 -24
  99. package/src/humanReadablePane.js +36 -27
  100. package/src/outline/manager.js +1 -1
  101. package/src/outline/userInput.js +6 -6
  102. package/src/test-import-export/edit-importer.js +1 -1
  103. package/src/transaction/pane.js +2 -2
  104. package/src/transaction/period.js +2 -2
  105. package/src/types.ts +4 -4
  106. package/src/versionInfo.ts +26 -20
@@ -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(subject)
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
- // get with authenticated fetch
107
- kb.fetcher._fetch(subject.uri)
108
- .then(function(response) {
109
- return response.blob()
110
- })
111
- .then(function(blob) {
112
- const objectURL = URL.createObjectURL(blob)
113
- frame.setAttribute('src', objectURL)
114
- frame.setAttribute('type', blob.type)
115
- frame.setAttribute('class', 'doc')
116
- return blob.type.startsWith('text') ? blob.text() : ''
117
- })
118
- .then(function(blobText) {
119
- const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5
120
- const lines = Math.min(30, blobText.split(/\n/).length + newLines)
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)
@@ -1627,7 +1627,7 @@ export default function (context) {
1627
1627
  }
1628
1628
  case 39: // right
1629
1629
  // @@ TODO: Write away the need for exception on next line
1630
- // eslint-disable-next-line no-case-declarations
1630
+
1631
1631
  const obj = UI.utils.getAbout(kb, selectedTd)
1632
1632
  if (obj) {
1633
1633
  walk = this.walk
@@ -763,7 +763,7 @@ export function UserInput (outline) {
763
763
 
764
764
  UI.log.debug('removed')
765
765
  outline.walk('up')
766
- // eslint-disable-next-line prefer-const
766
+
767
767
  removedTr = selectedTd.parentNode
768
768
  // afterTr = removedTr.nextSibling
769
769
  function removefromview () {
@@ -1986,14 +1986,14 @@ export function UserInput (outline) {
1986
1986
  inputText = extraInformation.inputText
1987
1987
  /* The labeller functionality code ahs been lost or dropped -- reinstate this? */
1988
1988
  // @@ TODO: Write away the need for exception on next line
1989
- // eslint-disable-next-line no-case-declarations
1989
+
1990
1990
  const predicates = outline.labeller.searchAdv(
1991
1991
  inputText,
1992
1992
  undefined,
1993
1993
  'predicate'
1994
1994
  )
1995
1995
  // @@ TODO: Write away the need for exception on next line
1996
- // eslint-disable-next-line no-case-declarations
1996
+
1997
1997
  let results = [] // @@ fixme
1998
1998
  for (let i = 0; i < predicates.length; i++) {
1999
1999
  const tempQuery = {}
@@ -2009,7 +2009,7 @@ export function UserInput (outline) {
2009
2009
  }
2010
2010
 
2011
2011
  // @@ TODO: Write away the need for exception on next line
2012
- // eslint-disable-next-line no-case-declarations
2012
+
2013
2013
  let entries = results[0]
2014
2014
  if (entries.length === 0) {
2015
2015
  console.log('cm length 0\n') // hq
@@ -2176,9 +2176,9 @@ export function UserInput (outline) {
2176
2176
  const tr = selectedTd.parentNode
2177
2177
  let stat
2178
2178
  let isInverse
2179
- // eslint-disable-next-line prefer-const
2179
+
2180
2180
  stat = tr.AJAR_statement
2181
- // eslint-disable-next-line prefer-const
2181
+
2182
2182
  isInverse = tr.AJAR_inverse
2183
2183
 
2184
2184
  const reqTerm = type === 'object' ? stat.object : stat.predicate
@@ -13,7 +13,7 @@
13
13
  // import UI from 'solid-ui'
14
14
  // import solidUi, { SolidUi } from 'solid-ui'
15
15
  // @@ TODO: Write away the need for exception on next line
16
- // eslint-disable-next-line camelcase
16
+
17
17
 
18
18
  const thisPane = { foo: 'bar' }
19
19
  export default thisPane
@@ -541,7 +541,7 @@ export default {
541
541
 
542
542
  for (const y in yearCategoryTotal) {
543
543
  // @@ TODO: Write away the need for exception on next line
544
- // eslint-disable-next-line no-prototype-builtins
544
+
545
545
  if (yearCategoryTotal.hasOwnProperty(y)) {
546
546
  years.push(y)
547
547
  }
@@ -567,7 +567,7 @@ export default {
567
567
 
568
568
  for (const uri in total) {
569
569
  // @@ TODO: Write away the need for exception on next line
570
- // eslint-disable-next-line no-prototype-builtins
570
+
571
571
  if (total.hasOwnProperty(uri)) {
572
572
  types.push(uri)
573
573
  grandTotal += total[uri]
@@ -251,7 +251,7 @@ export default {
251
251
  for (const y in xURIs) {
252
252
  // For each thing which can be inferred to be a transaction
253
253
  // @@ TODO: Write away the need for exception on next line
254
- // eslint-disable-next-line no-prototype-builtins
254
+
255
255
  if (xURIs.hasOwnProperty(y)) {
256
256
  z = kb.sym(y)
257
257
  const tt = kb.each(z, ns.rdf('type')) // What EXPLICIT definitions
@@ -301,7 +301,7 @@ export default {
301
301
  const cats = kb.findSubClassesNT(ns.qu('Transaction'))
302
302
  for (const cat in cats) {
303
303
  // @@ TODO: Write away the need for exception on next line
304
- // eslint-disable-next-line no-prototype-builtins
304
+
305
305
  if (cats.hasOwnProperty(cat)) {
306
306
  if (cat.slice(1, -1).split('#')[1] === catTail) {
307
307
  return kb.sym(cat.slice(1, -1))
package/src/types.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  interface SolidAuthorization {
2
- // eslint-disable-next-line camelcase
2
+
3
3
  access_token: string
4
- // eslint-disable-next-line camelcase
4
+
5
5
  client_id: string
6
- // eslint-disable-next-line camelcase
6
+
7
7
  id_token: string
8
8
  }
9
9
 
10
10
  interface SolidClaim {
11
- // eslint-disable-next-line camelcase
11
+
12
12
  at_hash: string
13
13
  aud: string
14
14
  azp: string
@@ -1,26 +1,32 @@
1
1
  export default {
2
- buildTime: "2025-02-05T10:12:21Z",
3
- commit: "65d80a4a704e8b79647cd2bc4b9985e9659a326e",
2
+ buildTime: "2025-08-11T15:04:02Z",
3
+ commit: "2722fc8417481ab9eb5800a3393e9919bdfcb97a",
4
4
  npmInfo:
5
5
  {
6
- 'solid-panes': '3.6.2',
6
+ 'solid-panes': '3.6.3',
7
7
  npm: '8.19.4',
8
- node: '16.20.2',
9
- v8: '9.4.146.26-node.26',
10
- uv: '1.43.0',
11
- zlib: '1.2.11',
12
- brotli: '1.0.9',
13
- ares: '1.19.1',
14
- modules: '93',
15
- nghttp2: '1.47.0',
16
- napi: '8',
17
- llhttp: '6.0.11',
18
- openssl: '1.1.1v+quic',
19
- cldr: '41.0',
20
- icu: '71.1',
21
- tz: '2022f',
22
- unicode: '14.0',
23
- ngtcp2: '0.8.1',
24
- nghttp3: '0.7.0'
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
  };