solid-panes 3.5.24 → 3.5.25-11058ce8

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 (309) hide show
  1. package/.babelrc +0 -0
  2. package/.eslintignore +0 -0
  3. package/.eslintrc +0 -0
  4. package/.github/workflows/ci.yml +0 -0
  5. package/.nvmrc +0 -0
  6. package/Documentation/VisualLanguage.html +0 -0
  7. package/Documentation/conventions.md +0 -0
  8. package/LICENSE.md +0 -0
  9. package/README.md +2 -3
  10. package/dev/index.html +0 -0
  11. package/dev/loader.ts +0 -0
  12. package/dev/pane/index.ts +0 -0
  13. package/doc/images/panes-for-classes.epgz +0 -0
  14. package/doc/images/panes-for-classes.svg +0 -0
  15. package/jest.config.js +0 -0
  16. package/jest.setup.ts +0 -0
  17. package/lib/RDFXMLPane.js +0 -0
  18. package/lib/RDFXMLPane.js.map +0 -0
  19. package/lib/argument/argumentPane.js +0 -0
  20. package/lib/argument/argumentPane.js.map +0 -0
  21. package/lib/attach/attachPane.js +0 -0
  22. package/lib/attach/attachPane.js.map +0 -0
  23. package/lib/audio/audioPane.js +0 -0
  24. package/lib/audio/audioPane.js.map +0 -0
  25. package/lib/classInstancePane.js +0 -0
  26. package/lib/classInstancePane.js.map +0 -0
  27. package/lib/dashboard/basicPreferences.d.ts +0 -0
  28. package/lib/dashboard/basicPreferences.d.ts.map +0 -0
  29. package/lib/dashboard/basicPreferences.js +0 -0
  30. package/lib/dashboard/basicPreferences.js.map +0 -0
  31. package/lib/dashboard/dashboardPane.d.ts +0 -0
  32. package/lib/dashboard/dashboardPane.d.ts.map +0 -0
  33. package/lib/dashboard/dashboardPane.js +0 -0
  34. package/lib/dashboard/dashboardPane.js.map +0 -0
  35. package/lib/dashboard/homepage.d.ts +0 -0
  36. package/lib/dashboard/homepage.d.ts.map +0 -0
  37. package/lib/dashboard/homepage.js +0 -0
  38. package/lib/dashboard/homepage.js.map +0 -0
  39. package/lib/dataContentPane.js +0 -0
  40. package/lib/dataContentPane.js.map +0 -0
  41. package/lib/defaultPane.js +0 -0
  42. package/lib/defaultPane.js.map +0 -0
  43. package/lib/dokieli/dokieliPane.js +0 -0
  44. package/lib/dokieli/dokieliPane.js.map +0 -0
  45. package/lib/dokieli/new.js +0 -0
  46. package/lib/dokieli/new.js.map +0 -0
  47. package/lib/form/pane.js +0 -0
  48. package/lib/form/pane.js.map +0 -0
  49. package/lib/global.d.js +0 -0
  50. package/lib/global.d.js.map +0 -0
  51. package/lib/home/homePane.d.ts +0 -0
  52. package/lib/home/homePane.d.ts.map +0 -0
  53. package/lib/home/homePane.js +0 -0
  54. package/lib/home/homePane.js.map +0 -0
  55. package/lib/humanReadablePane.js +14 -6
  56. package/lib/humanReadablePane.js.map +1 -1
  57. package/lib/imagePane.js +0 -0
  58. package/lib/imagePane.js.map +0 -0
  59. package/lib/index.d.ts +0 -0
  60. package/lib/index.d.ts.map +0 -0
  61. package/lib/index.js +0 -0
  62. package/lib/index.js.map +0 -0
  63. package/lib/internal/internalPane.d.ts +0 -0
  64. package/lib/internal/internalPane.d.ts.map +0 -0
  65. package/lib/internal/internalPane.js +0 -0
  66. package/lib/internal/internalPane.js.map +0 -0
  67. package/lib/mainPage/footer.d.ts +0 -0
  68. package/lib/mainPage/footer.d.ts.map +0 -0
  69. package/lib/mainPage/footer.js +0 -0
  70. package/lib/mainPage/footer.js.map +0 -0
  71. package/lib/mainPage/header.d.ts +0 -0
  72. package/lib/mainPage/header.d.ts.map +0 -0
  73. package/lib/mainPage/header.js +0 -0
  74. package/lib/mainPage/header.js.map +0 -0
  75. package/lib/mainPage/index.d.ts +0 -0
  76. package/lib/mainPage/index.d.ts.map +0 -0
  77. package/lib/mainPage/index.js +0 -0
  78. package/lib/mainPage/index.js.map +0 -0
  79. package/lib/microblogPane/microblogPane.js +0 -0
  80. package/lib/microblogPane/microblogPane.js.map +0 -0
  81. package/lib/n3Pane.js +0 -0
  82. package/lib/n3Pane.js.map +0 -0
  83. package/lib/outline/context.d.ts +0 -0
  84. package/lib/outline/context.d.ts.map +0 -0
  85. package/lib/outline/context.js +0 -0
  86. package/lib/outline/context.js.map +0 -0
  87. package/lib/outline/licenseOptions.js +0 -0
  88. package/lib/outline/licenseOptions.js.map +0 -0
  89. package/lib/outline/manager.js +4 -5
  90. package/lib/outline/manager.js.map +1 -1
  91. package/lib/outline/manager.test.js +0 -0
  92. package/lib/outline/manager.test.js.map +0 -0
  93. package/lib/outline/outlineIcons.js +0 -0
  94. package/lib/outline/outlineIcons.js.map +0 -0
  95. package/lib/outline/propertyViews.d.ts +0 -0
  96. package/lib/outline/propertyViews.d.ts.map +0 -0
  97. package/lib/outline/propertyViews.js +0 -0
  98. package/lib/outline/propertyViews.js.map +0 -0
  99. package/lib/outline/propertyViews.test.js +0 -0
  100. package/lib/outline/propertyViews.test.js.map +0 -0
  101. package/lib/outline/queryByExample.js +0 -0
  102. package/lib/outline/queryByExample.js.map +0 -0
  103. package/lib/outline/userInput.js +0 -0
  104. package/lib/outline/userInput.js.map +0 -0
  105. package/lib/outline/viewAsImage.d.ts +0 -0
  106. package/lib/outline/viewAsImage.d.ts.map +0 -0
  107. package/lib/outline/viewAsImage.js +0 -0
  108. package/lib/outline/viewAsImage.js.map +0 -0
  109. package/lib/outline/viewAsMbox.d.ts +0 -0
  110. package/lib/outline/viewAsMbox.d.ts.map +0 -0
  111. package/lib/outline/viewAsMbox.js +0 -0
  112. package/lib/outline/viewAsMbox.js.map +0 -0
  113. package/lib/pad/padPane.d.ts +0 -0
  114. package/lib/pad/padPane.d.ts.map +0 -0
  115. package/lib/pad/padPane.js +0 -0
  116. package/lib/pad/padPane.js.map +0 -0
  117. package/lib/playlist/playlistPane.js +0 -0
  118. package/lib/playlist/playlistPane.js.map +0 -0
  119. package/lib/profile/editProfile.view.d.ts +0 -0
  120. package/lib/profile/editProfile.view.d.ts.map +0 -0
  121. package/lib/profile/editProfile.view.js +2 -2
  122. package/lib/profile/editProfile.view.js.map +1 -1
  123. package/lib/profile/profile.dom.d.ts +0 -0
  124. package/lib/profile/profile.dom.d.ts.map +0 -0
  125. package/lib/profile/profile.dom.js +0 -0
  126. package/lib/profile/profile.dom.js.map +0 -0
  127. package/lib/registerPanes.js +0 -0
  128. package/lib/registerPanes.js.map +0 -0
  129. package/lib/schedule/formsForSchedule.js +0 -0
  130. package/lib/schedule/formsForSchedule.js.map +0 -0
  131. package/lib/schedule/schedulePane.js +4 -3
  132. package/lib/schedule/schedulePane.js.map +1 -1
  133. package/lib/sharing/sharingPane.d.ts +0 -0
  134. package/lib/sharing/sharingPane.d.ts.map +0 -0
  135. package/lib/sharing/sharingPane.js +0 -0
  136. package/lib/sharing/sharingPane.js.map +0 -0
  137. package/lib/slideshow/slideshowPane.js +0 -0
  138. package/lib/slideshow/slideshowPane.js.map +0 -0
  139. package/lib/socialPane.js +0 -0
  140. package/lib/socialPane.js.map +0 -0
  141. package/lib/tabbed/tabbedPane.d.ts +0 -0
  142. package/lib/tabbed/tabbedPane.d.ts.map +0 -0
  143. package/lib/tabbed/tabbedPane.js +0 -0
  144. package/lib/tabbed/tabbedPane.js.map +0 -0
  145. package/lib/tableViewPane.js +0 -0
  146. package/lib/tableViewPane.js.map +0 -0
  147. package/lib/test-import-export/common.js +0 -0
  148. package/lib/test-import-export/common.js.map +0 -0
  149. package/lib/test-import-export/edit-importer.js +0 -0
  150. package/lib/test-import-export/edit-importer.js.map +0 -0
  151. package/lib/test-import-export/testImportExport.js +0 -0
  152. package/lib/test-import-export/testImportExport.js.map +0 -0
  153. package/lib/transaction/pane.js +0 -0
  154. package/lib/transaction/pane.js.map +0 -0
  155. package/lib/transaction/period.js +0 -0
  156. package/lib/transaction/period.js.map +0 -0
  157. package/lib/trip/tripPane.js +0 -0
  158. package/lib/trip/tripPane.js.map +0 -0
  159. package/lib/trustedApplications/trustedApplications.dom.d.ts +0 -0
  160. package/lib/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
  161. package/lib/trustedApplications/trustedApplications.dom.js +0 -0
  162. package/lib/trustedApplications/trustedApplications.dom.js.map +0 -0
  163. package/lib/trustedApplications/trustedApplications.test.js +0 -0
  164. package/lib/trustedApplications/trustedApplications.test.js.map +0 -0
  165. package/lib/trustedApplications/trustedApplications.utils.d.ts +0 -0
  166. package/lib/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
  167. package/lib/trustedApplications/trustedApplications.utils.js +0 -0
  168. package/lib/trustedApplications/trustedApplications.utils.js.map +0 -0
  169. package/lib/trustedApplications/trustedApplications.view.d.ts +0 -0
  170. package/lib/trustedApplications/trustedApplications.view.d.ts.map +0 -0
  171. package/lib/trustedApplications/trustedApplications.view.js +0 -0
  172. package/lib/trustedApplications/trustedApplications.view.js.map +0 -0
  173. package/lib/types.d.ts +0 -0
  174. package/lib/types.d.ts.map +0 -0
  175. package/lib/types.js +0 -0
  176. package/lib/types.js.map +0 -0
  177. package/lib/ui/pane.js +0 -0
  178. package/lib/ui/pane.js.map +0 -0
  179. package/lib/versionInfo.d.ts +9 -11
  180. package/lib/versionInfo.d.ts.map +1 -1
  181. package/lib/versionInfo.js +14 -16
  182. package/lib/versionInfo.js.map +1 -1
  183. package/lib/video/videoPane.js +0 -0
  184. package/lib/video/videoPane.js.map +0 -0
  185. package/package.json +13 -12
  186. package/src/RDFXMLPane.js +0 -0
  187. package/src/argument/argumentPane.js +0 -0
  188. package/src/argument/argument_icon_v04.jpg +0 -0
  189. package/src/argument/icon_argument.png +0 -0
  190. package/src/argument/transparentyingyang.png +0 -0
  191. package/src/attach/attachPane.js +0 -0
  192. package/src/attach/tbl-paperclip-128.png +0 -0
  193. package/src/attach/tbl-paperclip-22.png +0 -0
  194. package/src/attach/tbl-paperclip-22a.png +0 -0
  195. package/src/audio/audioPane.js +0 -0
  196. package/src/chatPreferencesForm.ttl +0 -0
  197. package/src/classInstancePane.js +0 -0
  198. package/src/dashboard/basicPreferences.ts +0 -0
  199. package/src/dashboard/dashboardPane.ts +0 -0
  200. package/src/dashboard/homepage.ts +0 -0
  201. package/src/dashboard/languages/codes.html +0 -0
  202. package/src/dashboard/languages/codes.xml +0 -0
  203. package/src/dashboard/languages/codes2.txt +0 -0
  204. package/src/dashboard/languages/foo +0 -0
  205. package/src/dashboard/languages/foo.ttl +0 -0
  206. package/src/dashboard/languages/get-language-names.sh +0 -0
  207. package/src/dashboard/ontologyData.ttl +0 -0
  208. package/src/dashboard/preferencesFormText.ttl +0 -0
  209. package/src/dataContentPane.js +0 -0
  210. package/src/defaultPane.js +0 -0
  211. package/src/dokieli/Makefile +0 -0
  212. package/src/dokieli/dokieliPane.js +0 -0
  213. package/src/dokieli/new.html +0 -0
  214. package/src/dokieli/new.js +0 -0
  215. package/src/form/form-22.png +0 -0
  216. package/src/form/form-b-22.png +0 -0
  217. package/src/form/form.graffle +0 -0
  218. package/src/form/form.png +0 -0
  219. package/src/form/pane.js +0 -0
  220. package/src/form/psuedocode-notes.txt +0 -0
  221. package/src/global.d.ts +0 -0
  222. package/src/home/homePane.ts +0 -0
  223. package/src/humanReadablePane.js +13 -5
  224. package/src/imagePane.js +0 -0
  225. package/src/index.ts +0 -0
  226. package/src/internal/internalPane.ts +0 -0
  227. package/src/mainPage/footer.ts +0 -0
  228. package/src/mainPage/header.ts +0 -0
  229. package/src/mainPage/index.ts +0 -0
  230. package/src/meeting/Makefile +0 -0
  231. package/src/meeting/test/meeting1/Actions/actions.ttl +0 -0
  232. package/src/meeting/test/meeting1/Actions/config.ttl +0 -0
  233. package/src/meeting/test/meeting1/Actions/state.ttl +0 -0
  234. package/src/meeting/test/meeting1/Schedule/details.ttl +0 -0
  235. package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -0
  236. package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -0
  237. package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -0
  238. package/src/meeting/test/meeting1/Schedule/index.html +0 -0
  239. package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -0
  240. package/src/meeting/test/meeting1/Schedule/results.ttl +0 -0
  241. package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -0
  242. package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -0
  243. package/src/meeting/test/meeting1/chat/chat.ttl +0 -0
  244. package/src/meeting/test/meeting1/details.ttl +0 -0
  245. package/src/meeting/test/meeting1/pad/pad.ttl +0 -0
  246. package/src/microblogPane/mbStyle.css +0 -0
  247. package/src/microblogPane/microblogPane.js +0 -0
  248. package/src/n3Pane.js +0 -0
  249. package/src/outline/context.ts +0 -0
  250. package/src/outline/licenseOptions.js +0 -0
  251. package/src/outline/manager.js +4 -9
  252. package/src/outline/manager.test.ts +0 -0
  253. package/src/outline/outlineIcons.js +0 -0
  254. package/src/outline/propertyViews.test.ts +0 -0
  255. package/src/outline/propertyViews.ts +0 -0
  256. package/src/outline/queryByExample.js +0 -0
  257. package/src/outline/userInput.js +0 -0
  258. package/src/outline/viewAsImage.ts +0 -0
  259. package/src/outline/viewAsMbox.ts +0 -0
  260. package/src/pad/images/ColourOff.ai +0 -0
  261. package/src/pad/images/ColourOff.png +0 -0
  262. package/src/pad/images/ColourOn.ai +0 -0
  263. package/src/pad/images/ColourOn.png +0 -0
  264. package/src/pad/padPane.ts +0 -0
  265. package/src/playlist/playlistPane.js +0 -0
  266. package/src/profile/editProfile.view.ts +2 -2
  267. package/src/profile/profile.dom.ts +0 -0
  268. package/src/profile/profileFormText.ttl +0 -0
  269. package/src/registerPanes.js +0 -0
  270. package/src/schedule/Makefile +0 -0
  271. package/src/schedule/formsForSchedule.js +0 -0
  272. package/src/schedule/formsForSchedule.ttl +0 -0
  273. package/src/schedule/schedulePane.js +3 -3
  274. package/src/sharing/sharingPane.ts +0 -0
  275. package/src/slideshow/slideshowPane.js +0 -0
  276. package/src/socialPane.js +0 -0
  277. package/src/style/tabbedtab.css +0 -0
  278. package/src/tabbed/tabbedPane.ts +0 -0
  279. package/src/tableViewPane.js +0 -0
  280. package/src/test-import-export/common.js +0 -0
  281. package/src/test-import-export/edit-importer.js +0 -0
  282. package/src/test-import-export/testImportExport.js +0 -0
  283. package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
  284. package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
  285. package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
  286. package/src/transaction/pane.js +0 -0
  287. package/src/transaction/period.js +0 -0
  288. package/src/transaction/thumbs_075987-3d-transparent-glass-icon-business-creditcard2.png +0 -0
  289. package/src/transaction/thumbs_075989-3d-transparent-glass-icon-business-currency-cent-sc35.png +0 -0
  290. package/src/trip/tripPane.js +0 -0
  291. package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -0
  292. package/src/trustedApplications/trustedApplications.dom.ts +0 -0
  293. package/src/trustedApplications/trustedApplications.test.ts +0 -0
  294. package/src/trustedApplications/trustedApplications.utils.ts +0 -0
  295. package/src/trustedApplications/trustedApplications.view.ts +0 -0
  296. package/src/types.ts +0 -0
  297. package/src/ui/22-builder.png +0 -0
  298. package/src/ui/builder.graffle +0 -0
  299. package/src/ui/builder.png +0 -0
  300. package/src/ui/builder2.png +0 -0
  301. package/src/ui/pane.js +0 -0
  302. package/src/versionInfo.ts +14 -16
  303. package/src/video/videoPane.js +0 -0
  304. package/timestamp.sh +0 -0
  305. package/travis/bumpversion.js +0 -0
  306. package/tsconfig.json +0 -0
  307. package/typings/raw-loader.d.ts +0 -0
  308. package/typings/solid-namespace/index.d.ts +0 -0
  309. package/webpack.config.js +0 -0
package/.babelrc CHANGED
File without changes
package/.eslintignore CHANGED
File without changes
package/.eslintrc CHANGED
File without changes
File without changes
package/.nvmrc CHANGED
File without changes
File without changes
File without changes
package/LICENSE.md CHANGED
File without changes
package/README.md CHANGED
@@ -60,10 +60,9 @@ through https://github.com/nvm-sh/nvm), and:
60
60
  git clone https://github.com/solidos/solid-panes
61
61
  cd solid-panes
62
62
  npm install
63
- npm run build-version
64
- npx webpack serve
63
+ npm run start
65
64
  ```
66
- 2. open your browser at http://localhost:9000
65
+ 2. a browser window should automatically open at http://localhost:9000, if for some reason it doesn't go ahead and manually navigate there.
67
66
  3. edit `dev/pane/index.ts` and change the color string constant at the end of line 61.
68
67
  4. wait about 5 seconds
69
68
  5. you'll see the color of the box and heading change in your browser
package/dev/index.html CHANGED
File without changes
package/dev/loader.ts CHANGED
File without changes
package/dev/pane/index.ts CHANGED
File without changes
File without changes
File without changes
package/jest.config.js CHANGED
File without changes
package/jest.setup.ts CHANGED
File without changes
package/lib/RDFXMLPane.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/form/pane.js CHANGED
File without changes
File without changes
package/lib/global.d.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -80,17 +80,14 @@ var humanReadablePane = {
80
80
 
81
81
  div.setAttribute('class', 'docView');
82
82
  var element = ct === 'text/markdown' ? 'DIV' : 'IFRAME';
83
- var frame = myDocument.createElement(element); // let dataUri
84
- // render markdown to html
83
+ var frame = myDocument.createElement(element); // render markdown to html
85
84
 
86
85
  var markdownHtml = function markdownHtml() {
87
86
  kb.fetcher.webOperation('GET', subject.uri).then(function (response) {
88
87
  var markdownText = response.responseText;
89
88
  var lines = Math.min(30, markdownText.split(/\n/).length + 5);
90
89
 
91
- var res = _marked.marked.parse(markdownText); // dataUri = 'data:text/html;charset=utf-8,' + encodeURIComponent(res)
92
- // iframe.setAttribute('src', dataUri)
93
-
90
+ var res = _marked.marked.parse(markdownText);
94
91
 
95
92
  frame.innerHTML = res;
96
93
  frame.setAttribute('class', 'doc');
@@ -100,6 +97,17 @@ var humanReadablePane = {
100
97
 
101
98
  if (ct === 'text/markdown') {
102
99
  markdownHtml();
100
+ } else if (ct !== 'text/html') {
101
+ // get with authenticated fetch
102
+ kb.fetcher._fetch(subject.uri).then(function (response) {
103
+ return response.blob();
104
+ }).then(function (blob) {
105
+ var objectURL = URL.createObjectURL(blob);
106
+ frame.setAttribute('src', objectURL); // w640 h480 //
107
+
108
+ frame.setAttribute('class', 'doc');
109
+ frame.setAttribute('style', "border: 1px solid; padding: 1em; height:120em; width:80em; resize: both; overflow: auto;");
110
+ });
103
111
  } else {
104
112
  frame.setAttribute('src', subject.uri); // allow-same-origin
105
113
 
@@ -107,7 +115,7 @@ var humanReadablePane = {
107
115
  frame.setAttribute('style', 'resize = both; height:120em; width:80em;');
108
116
  } // @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
109
117
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
110
- // You can;'t have any sandbox and allow plugins.
118
+ // You can't have any sandbox and allow plugins.
111
119
  // We could sandbox only HTML files I suppose.
112
120
  // HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html
113
121
  // iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/humanReadablePane.js"],"names":["humanReadablePane","icon","icons","originalIconBase","name","label","subject","context","kb","session","store","allowed","hasContentTypeIn","x","displayables","cts","fetcher","getHeader","j","length","k","indexOf","hasContentTypeIn2","t","findTypeURIs","Util","mediaTypeClass","uri","ns","link","render","myDocument","dom","div","createElement","doc","ct","console","log","setAttribute","element","frame","markdownHtml","webOperation","then","response","markdownText","responseText","lines","Math","min","split","res","marked","parse","innerHTML","tr","appendChild"],"mappings":";;;;;;;AAKA;;AACA;;AACA;;AAPA;AACA;AACA;AACA;AACA;AAKA,IAAMA,iBAAiB,GAAG;AACxBC,EAAAA,IAAI,EAAEC,eAAMC,gBAAN,GAAyB,6BADP;AAGxBC,EAAAA,IAAI,EAAE,eAHkB;AAKxBC,EAAAA,KAAK,EAAE,eAAUC,OAAV,EAA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AA1B;eAuHejC,iB,EACf","sourcesContent":["/* Human-readable Pane\n **\n ** This outline pane contains the document contents for an HTML document\n ** This is for peeking at a page, because the user might not want to leave the data browser.\n */\nimport { icons, ns } from 'solid-ui'\nimport { Util } from 'rdflib'\nimport { marked } from 'marked'\n\nconst humanReadablePane = {\n icon: icons.originalIconBase + 'tango/22-text-x-generic.png',\n\n name: 'humanReadable',\n\n label: function (subject, context) {\n const kb = context.session.store\n\n // See also the source pane, which has lower precedence.\n\n const allowed = [\n 'text/plain',\n 'text/html',\n 'text/markdown',\n 'application/xhtml+xml',\n 'image/png',\n 'image/jpeg',\n 'application/pdf',\n 'video/mp4'\n ]\n\n const hasContentTypeIn = function (kb, x, displayables) {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < displayables.length; k++) {\n if (cts[j].indexOf(displayables[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n // This data could come from a fetch OR from ldp container\n const hasContentTypeIn2 = function (kb, x, displayables) {\n const t = kb.findTypeURIs(subject)\n for (let k = 0; k < displayables.length; k++) {\n if (Util.mediaTypeClass(displayables[k]).uri in t) {\n return true\n }\n }\n return false\n }\n\n if (!subject.uri) return null // no bnodes\n\n const t = kb.findTypeURIs(subject)\n if (t[ns.link('WebPage').uri]) return 'view'\n\n if (\n hasContentTypeIn(kb, subject, allowed) ||\n hasContentTypeIn2(kb, subject, allowed)\n ) {\n return 'View'\n }\n\n return null\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n const kb = context.session.store\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0] : null\n if (ct) {\n console.log('humanReadablePane: c-t:' + ct)\n } else {\n console.log('humanReadablePane: unknown content-type?')\n }\n\n // @@ When we can, use CSP to turn off scripts within the iframe\n div.setAttribute('class', 'docView')\n const element = ct === 'text/markdown' ? 'DIV' : 'IFRAME'\n const frame = myDocument.createElement(element)\n // let dataUri\n\n // render markdown to html\n const markdownHtml = function () {\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const markdownText = response.responseText\n const lines = Math.min(30, markdownText.split(/\\n/).length + 5)\n const res = marked.parse(markdownText)\n // dataUri = 'data:text/html;charset=utf-8,' + encodeURIComponent(res)\n // iframe.setAttribute('src', dataUri)\n frame.innerHTML = res\n frame.setAttribute('class', 'doc')\n frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`)\n })\n }\n\n if (ct === 'text/markdown') {\n markdownHtml()\n } else {\n frame.setAttribute('src', subject.uri) // allow-same-origin\n frame.setAttribute('class', 'doc')\n frame.setAttribute('style', 'resize = both; height:120em; width:80em;')\n }\n\n // @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\n // You can;'t have any sandbox and allow plugins.\n // We could sandbox only HTML files I suppose.\n // HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html\n\n // iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static\n\n // iframe.setAttribute('height', '480')\n // iframe.setAttribute('width', '640')\n const tr = myDocument.createElement('TR')\n tr.appendChild(frame)\n div.appendChild(tr)\n return div\n }\n}\n\nexport default humanReadablePane\n// ends\n"],"file":"humanReadablePane.js"}
1
+ {"version":3,"sources":["../src/humanReadablePane.js"],"names":["humanReadablePane","icon","icons","originalIconBase","name","label","subject","context","kb","session","store","allowed","hasContentTypeIn","x","displayables","cts","fetcher","getHeader","j","length","k","indexOf","hasContentTypeIn2","t","findTypeURIs","Util","mediaTypeClass","uri","ns","link","render","myDocument","dom","div","createElement","doc","ct","console","log","setAttribute","element","frame","markdownHtml","webOperation","then","response","markdownText","responseText","lines","Math","min","split","res","marked","parse","innerHTML","_fetch","blob","objectURL","URL","createObjectURL","tr","appendChild"],"mappings":";;;;;;;AAK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,CAAoBH,IAApB,CAAlB;AACAhB,QAAAA,KAAK,CAACF,YAAN,CAAmB,KAAnB,EAA0BmB,SAA1B,EAFmB,CAEkB;;AACrCjB,QAAAA,KAAK,CAACF,YAAN,CAAmB,OAAnB,EAA4B,KAA5B;AACAE,QAAAA,KAAK,CAACF,YAAN,CAAmB,OAAnB;AACD,OATH;AAUD,KAZM,MAYA;AACLE,MAAAA,KAAK,CAACF,YAAN,CAAmB,KAAnB,EAA0BjC,OAAO,CAACqB,GAAlC,EADK,CACkC;;AACvCc,MAAAA,KAAK,CAACF,YAAN,CAAmB,OAAnB,EAA4B,KAA5B;AACAE,MAAAA,KAAK,CAACF,YAAN,CAAmB,OAAnB,EAA4B,0CAA5B;AACD,KAhDiC,CAiDlC;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;;;AACA,QAAMsB,EAAE,GAAG9B,UAAU,CAACG,aAAX,CAAyB,IAAzB,CAAX;AACA2B,IAAAA,EAAE,CAACC,WAAH,CAAerB,KAAf;AACAR,IAAAA,GAAG,CAAC6B,WAAJ,CAAgBD,EAAhB;AACA,WAAO5B,GAAP;AACD;AA5HuB,CAA1B;eA+HejC,iB,EACf","sourcesContent":["/* Human-readable Pane\n **\n ** This outline pane contains the document contents for an HTML document\n ** This is for peeking at a page, because the user might not want to leave the data browser.\n */\nimport { icons, ns } from 'solid-ui'\nimport { Util } from 'rdflib'\nimport { marked } from 'marked'\n\nconst humanReadablePane = {\n icon: icons.originalIconBase + 'tango/22-text-x-generic.png',\n\n name: 'humanReadable',\n\n label: function (subject, context) {\n const kb = context.session.store\n\n // See also the source pane, which has lower precedence.\n\n const allowed = [\n 'text/plain',\n 'text/html',\n 'text/markdown',\n 'application/xhtml+xml',\n 'image/png',\n 'image/jpeg',\n 'application/pdf',\n 'video/mp4'\n ]\n\n const hasContentTypeIn = function (kb, x, displayables) {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < displayables.length; k++) {\n if (cts[j].indexOf(displayables[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n // This data could come from a fetch OR from ldp container\n const hasContentTypeIn2 = function (kb, x, displayables) {\n const t = kb.findTypeURIs(subject)\n for (let k = 0; k < displayables.length; k++) {\n if (Util.mediaTypeClass(displayables[k]).uri in t) {\n return true\n }\n }\n return false\n }\n\n if (!subject.uri) return null // no bnodes\n\n const t = kb.findTypeURIs(subject)\n if (t[ns.link('WebPage').uri]) return 'view'\n\n if (\n hasContentTypeIn(kb, subject, allowed) ||\n hasContentTypeIn2(kb, subject, allowed)\n ) {\n return 'View'\n }\n\n return null\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n const kb = context.session.store\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0] : null\n if (ct) {\n console.log('humanReadablePane: c-t:' + ct)\n } else {\n console.log('humanReadablePane: unknown content-type?')\n }\n\n // @@ When we can, use CSP to turn off scripts within the iframe\n div.setAttribute('class', 'docView')\n const element = ct === 'text/markdown' ? 'DIV' : 'IFRAME'\n const frame = myDocument.createElement(element)\n\n // render markdown to html\n const markdownHtml = function () {\n kb.fetcher.webOperation('GET', subject.uri).then(response => {\n const markdownText = response.responseText\n const lines = Math.min(30, markdownText.split(/\\n/).length + 5)\n const res = marked.parse(markdownText)\n frame.innerHTML = res\n frame.setAttribute('class', 'doc')\n frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`)\n })\n }\n\n if (ct === 'text/markdown') {\n markdownHtml()\n } else if (ct !== 'text/html') {\n // get with authenticated fetch\n kb.fetcher._fetch(subject.uri)\n .then(function(response) {\n return response.blob()\n })\n .then(function(blob) {\n const objectURL = URL.createObjectURL(blob)\n frame.setAttribute('src', objectURL) // w640 h480 //\n frame.setAttribute('class', 'doc')\n frame.setAttribute('style', `border: 1px solid; padding: 1em; height:120em; width:80em; resize: both; overflow: auto;`)\n })\n } else {\n frame.setAttribute('src', subject.uri) // allow-same-origin\n frame.setAttribute('class', 'doc')\n frame.setAttribute('style', 'resize = both; height:120em; width:80em;')\n }\n // @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\n // You can't have any sandbox and allow plugins.\n // We could sandbox only HTML files I suppose.\n // HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html\n\n // iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static\n\n // iframe.setAttribute('height', '480')\n // iframe.setAttribute('width', '640')\n const tr = myDocument.createElement('TR')\n tr.appendChild(frame)\n div.appendChild(tr)\n return div\n }\n}\n\nexport default humanReadablePane\n// ends\n"],"file":"humanReadablePane.js"}
package/lib/imagePane.js CHANGED
File without changes
File without changes
package/lib/index.d.ts CHANGED
File without changes
File without changes
package/lib/index.js CHANGED
File without changes
package/lib/index.js.map CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/n3Pane.js CHANGED
File without changes
package/lib/n3Pane.js.map CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1729,7 +1729,7 @@ function _default(context) {
1729
1729
  thisOutline.showURI(about);
1730
1730
  var st = node.AJAR_statement; // show blue cross when the why of that triple is editable
1731
1731
 
1732
- if (typeof st === 'undefined') st = node.parentNode.AJAR_statement; // if (typeof st === 'undefined') return; // @@ Kludge? Click in the middle of nowhere
1732
+ if (typeof st === 'undefined' && node.parentNode) st = node.parentNode.AJAR_statement; // if (typeof st === 'undefined') return; // @@ Kludge? Click in the middle of nowhere
1733
1733
 
1734
1734
  if (st) {
1735
1735
  // don't do these for headers or base nodes
@@ -2249,7 +2249,8 @@ function _default(context) {
2249
2249
  // go to UserInput
2250
2250
 
2251
2251
 
2252
- var st = node.parentNode.AJAR_statement;
2252
+ var st;
2253
+ if (node.parentNode) st = node.parentNode.AJAR_statement;
2253
2254
  if (!st) return; // For example in the title TD of an expanded pane
2254
2255
 
2255
2256
  var _target = st.why;
@@ -2451,9 +2452,7 @@ function _default(context) {
2451
2452
  }
2452
2453
  }
2453
2454
 
2454
- if (subject.uri && !immediate && !UI.widgets.isAudio(subject) && !UI.widgets.isVideo(subject) && // Never parse videos as data
2455
- !kb.holds(subject, UI.ns.rdf('type'), $rdf.Util.mediaTypeClass('application/pdf'))) {
2456
- // or PDF
2455
+ if (subject.uri && !immediate && !UI.widgets.isAudio(subject) && !UI.widgets.isVideo(subject)) {
2457
2456
  // Wait till at least the main URI is loaded before expanding:
2458
2457
  sf.nowOrWhenFetched(subject.doc(), undefined, function (ok, body) {
2459
2458
  if (ok) {