solid-panes 4.4.2-2 → 4.4.2-3

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 (386) hide show
  1. package/README.md +10 -10
  2. package/dist/RDFXMLPane.d.ts +2 -3
  3. package/dist/RDFXMLPane2.cjs.js +3 -0
  4. package/dist/RDFXMLPane2.cjs.js.map +1 -0
  5. package/dist/RDFXMLPane2.esm.js +55 -0
  6. package/dist/RDFXMLPane2.esm.js.map +1 -0
  7. package/dist/_virtual/_rolldown/runtime.cjs.js +1 -0
  8. package/dist/_virtual/~icons/lucide/user.cjs.js +2 -0
  9. package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -0
  10. package/dist/_virtual/~icons/lucide/user.esm.js +11 -0
  11. package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -0
  12. package/dist/audio/audioPane.cjs.js +2 -0
  13. package/dist/audio/audioPane.cjs.js.map +1 -0
  14. package/dist/audio/audioPane.esm.js +96 -0
  15. package/dist/audio/audioPane.esm.js.map +1 -0
  16. package/dist/classInstancePane.cjs.js +2 -0
  17. package/dist/classInstancePane.cjs.js.map +1 -0
  18. package/dist/classInstancePane.esm.js +50 -0
  19. package/dist/classInstancePane.esm.js.map +1 -0
  20. package/dist/components/header/Header.d.ts +8 -0
  21. package/dist/components/header/Header.d.ts.map +1 -0
  22. package/dist/components/header/index.d.ts +4 -0
  23. package/dist/components/header/index.d.ts.map +1 -0
  24. package/dist/dashboard/basicPreferences.cjs.js +2 -0
  25. package/dist/dashboard/basicPreferences.cjs.js.map +1 -0
  26. package/dist/dashboard/basicPreferences.d.ts +1 -1
  27. package/dist/dashboard/basicPreferences.esm.js +70 -0
  28. package/dist/dashboard/basicPreferences.esm.js.map +1 -0
  29. package/dist/dashboard/dashboardPane.d.ts +1 -1
  30. package/dist/dashboard/homepage.d.ts +1 -1
  31. package/dist/dashboard/ontologyData.cjs.js +37 -0
  32. package/dist/dashboard/ontologyData.cjs.js.map +1 -0
  33. package/dist/dashboard/ontologyData.esm.js +6 -0
  34. package/dist/dashboard/ontologyData.esm.js.map +1 -0
  35. package/dist/dashboard/preferencesFormText.cjs.js +20 -0
  36. package/dist/dashboard/preferencesFormText.cjs.js.map +1 -0
  37. package/dist/dashboard/preferencesFormText.esm.js +6 -0
  38. package/dist/dashboard/preferencesFormText.esm.js.map +1 -0
  39. package/dist/dataContentPane.d.ts +2 -3
  40. package/dist/dataContentPane2.cjs.js +2 -0
  41. package/dist/dataContentPane2.cjs.js.map +1 -0
  42. package/dist/dataContentPane2.esm.js +109 -0
  43. package/dist/dataContentPane2.esm.js.map +1 -0
  44. package/dist/defaultPane.d.ts +2 -3
  45. package/dist/defaultPane2.cjs.js +2 -0
  46. package/dist/defaultPane2.cjs.js.map +1 -0
  47. package/dist/defaultPane2.esm.js +41 -0
  48. package/dist/defaultPane2.esm.js.map +1 -0
  49. package/dist/dev.d.ts +10 -0
  50. package/dist/dev.d.ts.map +1 -0
  51. package/dist/dokieli/dokieliPane.cjs.js +2 -0
  52. package/dist/dokieli/dokieliPane.cjs.js.map +1 -0
  53. package/dist/dokieli/dokieliPane.esm.js +39 -0
  54. package/dist/dokieli/dokieliPane.esm.js.map +1 -0
  55. package/dist/dokieli/{new.js → new.cjs.js} +4 -10
  56. package/dist/dokieli/new.cjs.js.map +1 -0
  57. package/dist/dokieli/new.esm.js +6 -0
  58. package/dist/dokieli/new.esm.js.map +1 -0
  59. package/dist/form/pane.cjs.js +4 -0
  60. package/dist/form/pane.cjs.js.map +1 -0
  61. package/dist/form/pane.d.ts +1 -2
  62. package/dist/form/pane.esm.js +121 -0
  63. package/dist/form/pane.esm.js.map +1 -0
  64. package/dist/home/homePane.cjs.js +2 -0
  65. package/dist/home/homePane.cjs.js.map +1 -0
  66. package/dist/home/homePane.d.ts +1 -1
  67. package/dist/home/homePane.esm.js +35 -0
  68. package/dist/home/homePane.esm.js.map +1 -0
  69. package/dist/humanReadablePane.d.ts +2 -3
  70. package/dist/humanReadablePane2.cjs.js +2 -0
  71. package/dist/humanReadablePane2.cjs.js.map +1 -0
  72. package/dist/humanReadablePane2.esm.js +123 -0
  73. package/dist/humanReadablePane2.esm.js.map +1 -0
  74. package/dist/icons/dashboard.cjs.js +2 -0
  75. package/dist/icons/dashboard.cjs.js.map +1 -0
  76. package/dist/icons/dashboard.esm.js +6 -0
  77. package/dist/icons/dashboard.esm.js.map +1 -0
  78. package/dist/icons/folder.cjs.js +2 -0
  79. package/dist/icons/folder.cjs.js.map +1 -0
  80. package/dist/icons/folder.esm.js +6 -0
  81. package/dist/icons/folder.esm.js.map +1 -0
  82. package/dist/icons/friends.cjs.js +2 -0
  83. package/dist/icons/friends.cjs.js.map +1 -0
  84. package/dist/icons/friends.esm.js +6 -0
  85. package/dist/icons/friends.esm.js.map +1 -0
  86. package/dist/icons/iconHelper.cjs.js +2 -0
  87. package/dist/icons/iconHelper.cjs.js.map +1 -0
  88. package/dist/icons/iconHelper.esm.js +17 -0
  89. package/dist/icons/iconHelper.esm.js.map +1 -0
  90. package/dist/icons/{menu.svg → menu.cjs.js} +3 -2
  91. package/dist/icons/menu.cjs.js.map +1 -0
  92. package/dist/icons/menu.esm.js +6 -0
  93. package/dist/icons/menu.esm.js.map +1 -0
  94. package/dist/icons/person.cjs.js +2 -0
  95. package/dist/icons/person.cjs.js.map +1 -0
  96. package/dist/icons/person.esm.js +6 -0
  97. package/dist/icons/person.esm.js.map +1 -0
  98. package/dist/imagePane.d.ts +2 -3
  99. package/dist/imagePane2.cjs.js +2 -0
  100. package/dist/imagePane2.cjs.js.map +1 -0
  101. package/dist/imagePane2.esm.js +32 -0
  102. package/dist/imagePane2.esm.js.map +1 -0
  103. package/dist/index.cjs.js +2 -0
  104. package/dist/index.cjs.js.map +1 -0
  105. package/dist/index.d.ts +4 -4
  106. package/dist/index.esm.js +26 -0
  107. package/dist/index.esm.js.map +1 -0
  108. package/dist/internal/internalPane.d.ts +1 -2
  109. package/dist/internal/internalPane2.cjs.js +2 -0
  110. package/dist/internal/internalPane2.cjs.js.map +1 -0
  111. package/dist/internal/internalPane2.esm.js +104 -0
  112. package/dist/internal/internalPane2.esm.js.map +1 -0
  113. package/dist/mainPage/footer.cjs.js +2 -0
  114. package/dist/mainPage/footer.cjs.js.map +1 -0
  115. package/dist/mainPage/footer.d.ts +1 -3
  116. package/dist/mainPage/footer.esm.js +18 -0
  117. package/dist/mainPage/footer.esm.js.map +1 -0
  118. package/dist/mainPage/header.cjs.js +2 -0
  119. package/dist/mainPage/header.cjs.js.map +1 -0
  120. package/dist/mainPage/header.d.ts +1 -15
  121. package/dist/mainPage/header.d.ts.map +1 -1
  122. package/dist/mainPage/header.esm.js +24 -0
  123. package/dist/mainPage/header.esm.js.map +1 -0
  124. package/dist/mainPage/index.cjs.js +2 -0
  125. package/dist/mainPage/index.cjs.js.map +1 -0
  126. package/dist/mainPage/index.d.ts +3 -7
  127. package/dist/mainPage/index.d.ts.map +1 -1
  128. package/dist/mainPage/index.esm.js +38 -0
  129. package/dist/mainPage/index.esm.js.map +1 -0
  130. package/dist/mainPage/menu.d.ts +1 -2
  131. package/dist/mainPage/menu2.cjs.js +2 -0
  132. package/dist/mainPage/menu2.cjs.js.map +1 -0
  133. package/dist/mainPage/menu2.esm.js +184 -0
  134. package/dist/mainPage/menu2.esm.js.map +1 -0
  135. package/dist/n3Pane.d.ts +2 -3
  136. package/dist/n3Pane2.cjs.js +3 -0
  137. package/dist/n3Pane2.cjs.js.map +1 -0
  138. package/dist/n3Pane2.esm.js +52 -0
  139. package/dist/n3Pane2.esm.js.map +1 -0
  140. package/dist/outline/context.cjs.js +2 -0
  141. package/dist/outline/context.cjs.js.map +1 -0
  142. package/dist/outline/context.d.ts +3 -3
  143. package/dist/outline/context.esm.js +18 -0
  144. package/dist/outline/context.esm.js.map +1 -0
  145. package/dist/outline/manager2.cjs.js +3 -0
  146. package/dist/outline/manager2.cjs.js.map +1 -0
  147. package/dist/outline/manager2.esm.js +875 -0
  148. package/dist/outline/manager2.esm.js.map +1 -0
  149. package/dist/outline/outlineIcons.cjs.js +2 -0
  150. package/dist/outline/outlineIcons.cjs.js.map +1 -0
  151. package/dist/outline/outlineIcons.esm.js +10 -0
  152. package/dist/outline/outlineIcons.esm.js.map +1 -0
  153. package/dist/outline/propertyViews.cjs.js +2 -0
  154. package/dist/outline/propertyViews.cjs.js.map +1 -0
  155. package/dist/outline/propertyViews.esm.js +19 -0
  156. package/dist/outline/propertyViews.esm.js.map +1 -0
  157. package/dist/outline/queryByExample.cjs.js +2 -0
  158. package/dist/outline/queryByExample.cjs.js.map +1 -0
  159. package/dist/outline/queryByExample.esm.js +25 -0
  160. package/dist/outline/queryByExample.esm.js.map +1 -0
  161. package/dist/outline/userInput.cjs.js +61 -0
  162. package/dist/outline/userInput.cjs.js.map +1 -0
  163. package/dist/outline/userInput.esm.js +784 -0
  164. package/dist/outline/userInput.esm.js.map +1 -0
  165. package/dist/outline/viewAsImage.cjs.js +2 -0
  166. package/dist/outline/viewAsImage.cjs.js.map +1 -0
  167. package/dist/outline/viewAsImage.esm.js +10 -0
  168. package/dist/outline/viewAsImage.esm.js.map +1 -0
  169. package/dist/outline/viewAsMbox.cjs.js +2 -0
  170. package/dist/outline/viewAsMbox.cjs.js.map +1 -0
  171. package/dist/outline/viewAsMbox.esm.js +9 -0
  172. package/dist/outline/viewAsMbox.esm.js.map +1 -0
  173. package/dist/pad/padPane.d.ts +1 -2
  174. package/dist/pad/padPane2.cjs.js +2 -0
  175. package/dist/pad/padPane2.cjs.js.map +1 -0
  176. package/dist/pad/padPane2.esm.js +172 -0
  177. package/dist/pad/padPane2.esm.js.map +1 -0
  178. package/dist/playlist/playlistPane.cjs.js +2 -0
  179. package/dist/playlist/playlistPane.cjs.js.map +1 -0
  180. package/dist/playlist/playlistPane.esm.js +49 -0
  181. package/dist/playlist/playlistPane.esm.js.map +1 -0
  182. package/dist/profileUtils/ownerProfile.cjs.js +2 -0
  183. package/dist/profileUtils/ownerProfile.cjs.js.map +1 -0
  184. package/dist/profileUtils/ownerProfile.d.ts +1 -1
  185. package/dist/profileUtils/ownerProfile.esm.js +50 -0
  186. package/dist/profileUtils/ownerProfile.esm.js.map +1 -0
  187. package/dist/registerPanes.cjs.js +2 -0
  188. package/dist/registerPanes.cjs.js.map +1 -0
  189. package/dist/registerPanes.esm.js +45 -0
  190. package/dist/registerPanes.esm.js.map +1 -0
  191. package/dist/schedule/formsForSchedule.cjs.js +117 -0
  192. package/dist/schedule/formsForSchedule.cjs.js.map +1 -0
  193. package/dist/schedule/formsForSchedule.esm.js +6 -0
  194. package/dist/schedule/formsForSchedule.esm.js.map +1 -0
  195. package/dist/schedule/schedulePane.d.ts +2 -4
  196. package/dist/schedule/schedulePane2.cjs.js +8 -0
  197. package/dist/schedule/schedulePane2.cjs.js.map +1 -0
  198. package/dist/schedule/schedulePane2.esm.js +384 -0
  199. package/dist/schedule/schedulePane2.esm.js.map +1 -0
  200. package/dist/sharing/sharingPane.cjs.js +2 -0
  201. package/dist/sharing/sharingPane.cjs.js.map +1 -0
  202. package/dist/sharing/sharingPane.esm.js +22 -0
  203. package/dist/sharing/sharingPane.esm.js.map +1 -0
  204. package/dist/slideshow/slideshowPane.cjs.js +2 -0
  205. package/dist/slideshow/slideshowPane.cjs.js.map +1 -0
  206. package/dist/slideshow/slideshowPane.esm.js +46 -0
  207. package/dist/slideshow/slideshowPane.esm.js.map +1 -0
  208. package/dist/social/editProfileDetails.cjs.js +2 -0
  209. package/dist/social/editProfileDetails.cjs.js.map +1 -0
  210. package/dist/social/editProfileDetails.d.ts +1 -2
  211. package/dist/social/editProfileDetails.esm.js +10 -0
  212. package/dist/social/editProfileDetails.esm.js.map +1 -0
  213. package/dist/social/icons.cjs.js +82 -0
  214. package/dist/social/icons.cjs.js.map +1 -0
  215. package/dist/social/{icons.js → icons.esm.js} +12 -18
  216. package/dist/social/icons.esm.js.map +1 -0
  217. package/dist/social/socialPane.d.ts +2 -3
  218. package/dist/social/socialPane2.cjs.js +6 -0
  219. package/dist/social/socialPane2.cjs.js.map +1 -0
  220. package/dist/social/socialPane2.esm.js +326 -0
  221. package/dist/social/socialPane2.esm.js.map +1 -0
  222. package/dist/social/socialSections.cjs.js +2 -0
  223. package/dist/social/socialSections.cjs.js.map +1 -0
  224. package/dist/social/socialSections.d.ts +2 -2
  225. package/dist/social/socialSections.esm.js +221 -0
  226. package/dist/social/socialSections.esm.js.map +1 -0
  227. package/dist/social/triage.cjs.js +2 -0
  228. package/dist/social/triage.cjs.js.map +1 -0
  229. package/dist/social/triage.d.ts +2 -2
  230. package/dist/social/triage.esm.js +44 -0
  231. package/dist/social/triage.esm.js.map +1 -0
  232. package/dist/tabbed/tabbedPane.cjs.js +2 -0
  233. package/dist/tabbed/tabbedPane.cjs.js.map +1 -0
  234. package/dist/tabbed/tabbedPane.d.ts +1 -1
  235. package/dist/tabbed/tabbedPane.esm.js +38 -0
  236. package/dist/tabbed/tabbedPane.esm.js.map +1 -0
  237. package/dist/tableViewPane.cjs.js +2 -0
  238. package/dist/tableViewPane.cjs.js.map +1 -0
  239. package/dist/tableViewPane.esm.js +20 -0
  240. package/dist/tableViewPane.esm.js.map +1 -0
  241. package/dist/transaction/pane.cjs.js +8 -0
  242. package/dist/transaction/pane.cjs.js.map +1 -0
  243. package/dist/transaction/pane.esm.js +212 -0
  244. package/dist/transaction/pane.esm.js.map +1 -0
  245. package/dist/transaction/period.cjs.js +4 -0
  246. package/dist/transaction/period.cjs.js.map +1 -0
  247. package/dist/transaction/period.esm.js +126 -0
  248. package/dist/transaction/period.esm.js.map +1 -0
  249. package/dist/trip/tripPane.cjs.js +2 -0
  250. package/dist/trip/tripPane.cjs.js.map +1 -0
  251. package/dist/trip/tripPane.esm.js +85 -0
  252. package/dist/trip/tripPane.esm.js.map +1 -0
  253. package/dist/trustedApplications/trustedApplications.dom.cjs.js +2 -0
  254. package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -0
  255. package/dist/trustedApplications/trustedApplications.dom.d.ts +1 -1
  256. package/dist/trustedApplications/trustedApplications.dom.esm.js +108 -0
  257. package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -0
  258. package/dist/trustedApplications/trustedApplications.utils.cjs.js +2 -0
  259. package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -0
  260. package/dist/trustedApplications/trustedApplications.utils.d.ts +1 -1
  261. package/dist/trustedApplications/trustedApplications.utils.esm.js +20 -0
  262. package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -0
  263. package/dist/trustedApplications/trustedApplications.view.cjs.js +2 -0
  264. package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -0
  265. package/dist/trustedApplications/trustedApplications.view.d.ts +1 -1
  266. package/dist/trustedApplications/trustedApplications.view.esm.js +41 -0
  267. package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -0
  268. package/dist/ui/pane.cjs.js +4 -0
  269. package/dist/ui/pane.cjs.js.map +1 -0
  270. package/dist/ui/pane.esm.js +56 -0
  271. package/dist/ui/pane.esm.js.map +1 -0
  272. package/dist/versionInfo.cjs.js +2 -0
  273. package/dist/versionInfo.cjs.js.map +1 -0
  274. package/dist/versionInfo.esm.js +40 -0
  275. package/dist/versionInfo.esm.js.map +1 -0
  276. package/dist/video/videoPane.cjs.js +2 -0
  277. package/dist/video/videoPane.cjs.js.map +1 -0
  278. package/dist/video/videoPane.esm.js +25 -0
  279. package/dist/video/videoPane.esm.js.map +1 -0
  280. package/package.json +35 -59
  281. package/dist/0314353e28ce6e5539af.svg +0 -9
  282. package/dist/04567ff683933c35c465.png +0 -0
  283. package/dist/10163fd9b5a0e00d63a0.png +0 -0
  284. package/dist/1234dcb2eec2e45f252b.png +0 -0
  285. package/dist/20899934157df4db56cb.png +0 -0
  286. package/dist/33760bf79f097f449da5.png +0 -0
  287. package/dist/4cceba29ab33b1ddd9bb.svg +0 -6
  288. package/dist/578d2b6ed32e7624164e.png +0 -0
  289. package/dist/5f62a5b2b7e99b9640c7.png +0 -0
  290. package/dist/6525766ecd288ec60129.png +0 -0
  291. package/dist/7800be6f6c4b5b0f4f20.png +0 -0
  292. package/dist/7b7538c6f6b317968009.svg +0 -9
  293. package/dist/92d03142abe6efc0b42d.svg +0 -6
  294. package/dist/976473cf5fe24d657d4b.png +0 -0
  295. package/dist/RDFXMLPane.css +0 -70
  296. package/dist/RDFXMLPane.js +0 -100
  297. package/dist/argument/argumentPane.js +0 -60
  298. package/dist/attach/attachPane.js +0 -393
  299. package/dist/audio/audioPane.js +0 -181
  300. package/dist/bda84f59e7216675a208.png +0 -0
  301. package/dist/cd68e8f3990ba8b2139e.png +0 -0
  302. package/dist/classInstancePane.js +0 -91
  303. package/dist/dashboard/basicPreferences.js +0 -147
  304. package/dist/dashboard/dashboardPane.js +0 -73
  305. package/dist/dashboard/homepage.js +0 -42
  306. package/dist/dataContentPane.css +0 -271
  307. package/dist/dataContentPane.js +0 -226
  308. package/dist/defaultPane.css +0 -97
  309. package/dist/defaultPane.js +0 -81
  310. package/dist/dokieli/dokieliPane.js +0 -74
  311. package/dist/e7074a7e2cb69e51cfd3.png +0 -0
  312. package/dist/f3772696fb7ee53c23d8.png +0 -0
  313. package/dist/form/formPane.css +0 -120
  314. package/dist/form/pane.js +0 -250
  315. package/dist/home/homePane.js +0 -74
  316. package/dist/humanReadablePane.css +0 -129
  317. package/dist/humanReadablePane.js +0 -243
  318. package/dist/icons/clock.svg +0 -7
  319. package/dist/icons/comment.svg +0 -6
  320. package/dist/icons/dashboard.svg +0 -9
  321. package/dist/icons/downArrow.svg +0 -6
  322. package/dist/icons/folder.svg +0 -6
  323. package/dist/icons/friends.svg +0 -9
  324. package/dist/icons/help.svg +0 -8
  325. package/dist/icons/iconHelper.js +0 -23
  326. package/dist/icons/person.svg +0 -6
  327. package/dist/icons/personInCircle.svg +0 -8
  328. package/dist/icons/sharing.svg +0 -10
  329. package/dist/icons/signOut.svg +0 -8
  330. package/dist/icons/signUp.svg +0 -9
  331. package/dist/icons/star.svg +0 -3
  332. package/dist/imagePane.css +0 -4
  333. package/dist/imagePane.js +0 -67
  334. package/dist/index.js +0 -123
  335. package/dist/internal/internalPane.css +0 -14
  336. package/dist/internal/internalPane.js +0 -183
  337. package/dist/mainPage/footer.js +0 -29
  338. package/dist/mainPage/header.js +0 -203
  339. package/dist/mainPage/index.js +0 -78
  340. package/dist/mainPage/menu.css +0 -243
  341. package/dist/mainPage/menu.js +0 -449
  342. package/dist/microblogPane/mbStyle.css +0 -267
  343. package/dist/microblogPane/microblogPane.js +0 -1031
  344. package/dist/n3Pane.css +0 -49
  345. package/dist/n3Pane.js +0 -88
  346. package/dist/outline/context.js +0 -21
  347. package/dist/outline/manager.css +0 -78
  348. package/dist/outline/manager.js +0 -2115
  349. package/dist/outline/outlineIcons.js +0 -126
  350. package/dist/outline/propertyViews.js +0 -43
  351. package/dist/outline/queryByExample.js +0 -285
  352. package/dist/outline/userInput.js +0 -1821
  353. package/dist/outline/viewAsImage.js +0 -14
  354. package/dist/outline/viewAsMbox.js +0 -21
  355. package/dist/pad/padPane.css +0 -40
  356. package/dist/pad/padPane.js +0 -421
  357. package/dist/playlist/playlistPane.js +0 -119
  358. package/dist/profileUtils/ownerProfile.js +0 -84
  359. package/dist/registerPanes.js +0 -145
  360. package/dist/schedule/schedulePane.css +0 -294
  361. package/dist/schedule/schedulePane.js +0 -1022
  362. package/dist/sharing/sharingPane.js +0 -48
  363. package/dist/slideshow/slideshowPane.js +0 -79
  364. package/dist/social/editProfileDetails.js +0 -362
  365. package/dist/social/socialPane.css +0 -1464
  366. package/dist/social/socialPane.js +0 -651
  367. package/dist/social/socialSections.js +0 -393
  368. package/dist/social/spinner.js +0 -13
  369. package/dist/social/triage.js +0 -79
  370. package/dist/solid-panes.js +0 -87502
  371. package/dist/solid-panes.js.map +0 -1
  372. package/dist/solid-panes.min.js +0 -3811
  373. package/dist/solid-panes.min.js.map +0 -1
  374. package/dist/styles/tabbedtab.css +0 -1066
  375. package/dist/styles/utilities.css +0 -5
  376. package/dist/tabbed/tabbedPane.js +0 -59
  377. package/dist/tableViewPane.js +0 -56
  378. package/dist/transaction/pane.js +0 -477
  379. package/dist/transaction/period.js +0 -323
  380. package/dist/trip/tripPane.js +0 -174
  381. package/dist/trustedApplications/trustedApplications.dom.js +0 -145
  382. package/dist/trustedApplications/trustedApplications.utils.js +0 -23
  383. package/dist/trustedApplications/trustedApplications.view.js +0 -55
  384. package/dist/ui/pane.js +0 -146
  385. package/dist/versionInfo.js +0 -41
  386. package/dist/video/videoPane.js +0 -42
package/dist/form/pane.js DELETED
@@ -1,250 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.formPane = void 0;
7
- var UI = _interopRequireWildcard(require("solid-ui"));
8
- var _solidLogic = require("solid-logic");
9
- var $rdf = _interopRequireWildcard(require("rdflib"));
10
- require("./formPane.css");
11
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
- /*
13
- ** Pane for running existing forms for any object
14
- **
15
- */
16
-
17
- const ns = UI.ns;
18
- function isNamedNode(term) {
19
- return term?.termType === 'NamedNode';
20
- }
21
-
22
- /* The following helper was generated by AI GPT-5.4 Model */
23
- /* Prompt: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing. */
24
- function normalizeAmbiguousFieldTypes(store, form) {
25
- const formDoc = form.doc ? form.doc() : undefined;
26
- const types = store.each(form, ns.rdf('type'), undefined, formDoc).filter(isNamedNode);
27
- const hasGroupType = types.some(type => type.sameTerm(ns.ui('Group')));
28
- const hasOtherFieldType = types.some(type => !type.sameTerm(ns.ui('Group')) && !type.sameTerm(ns.ui('Form')));
29
- const hasProperty = !!store.any(form, ns.ui('property'), undefined, formDoc);
30
- const partsList = store.any(form, ns.ui('parts'), undefined, formDoc);
31
- const hasParts = !!partsList?.elements?.length || store.each(form, ns.ui('part'), undefined, formDoc).length > 0;
32
-
33
- // Some legacy forms mark a leaf field as both ui:Group and a concrete input type.
34
- // solid-ui may then choose the Group renderer and produce an empty nested box.
35
- if (hasGroupType && hasOtherFieldType && hasProperty && !hasParts) {
36
- store.removeMany(form, ns.rdf('type'), ns.ui('Group'), formDoc);
37
- }
38
- const listParts = partsList?.elements ?? [];
39
- for (const part of listParts) {
40
- if (isNamedNode(part)) {
41
- normalizeAmbiguousFieldTypes(store, part);
42
- }
43
- }
44
- const unorderedParts = store.each(form, ns.ui('part'), undefined, formDoc);
45
- for (const part of unorderedParts) {
46
- if (isNamedNode(part)) {
47
- normalizeAmbiguousFieldTypes(store, part);
48
- }
49
- }
50
- }
51
- function tagMobileTextareaRows(renderedForm) {
52
- const textareas = Array.from(renderedForm.querySelectorAll('textarea'));
53
- for (const textarea of textareas) {
54
- let row = textarea.parentElement;
55
- while (row) {
56
- const firstChild = row.firstElementChild;
57
- const hasLabelColumn = !!firstChild && (firstChild.classList.contains('formFieldName') || firstChild.querySelector('a') !== null);
58
- if (hasLabelColumn && row.children.length >= 2) {
59
- row.classList.add('formPane__mobileTextareaRow');
60
- firstChild.classList.add('formPane__mobileTextareaLabel');
61
- const valueColumn = row.children[1];
62
- valueColumn.classList.add('formPane__mobileTextareaValue');
63
- break;
64
- }
65
- row = row.parentElement;
66
- }
67
- }
68
- }
69
- const formPane = exports.formPane = {
70
- icon: UI.icons.iconBase + 'noun_122196.svg',
71
- name: 'form',
72
- audience: [ns.solid('PowerUser')],
73
- // Does the subject deserve this pane?
74
- label: function (subject, _context) {
75
- const n = UI.widgets.formsFor(subject).length;
76
- UI.log.debug('Form pane: forms for ' + subject + ': ' + n);
77
- if (!n) return null;
78
- return '' + n + ' forms';
79
- },
80
- render: function (subject, context) {
81
- const kb = context.session.store;
82
- const dom = context.dom;
83
- const box = dom.createElement('div');
84
- box.setAttribute('class', 'formPane');
85
- function applyEnvironmentAttributes(element) {
86
- const environment = context.environment ?? {};
87
- element.dataset.layout = environment.layout ?? 'desktop';
88
- }
89
- applyEnvironmentAttributes(box);
90
- const mention = function (message, modifier = 'info') {
91
- const pre = dom.createElement('p');
92
- pre.className = `formPane__message formPane__message--${modifier}`;
93
- box.appendChild(pre).textContent = message;
94
- return pre;
95
- };
96
- const complain = function (message) {
97
- return mention(message, 'error');
98
- };
99
- const complainIfBad = function (ok, body) {
100
- if (ok) {
101
- // setModifiedDate(store, kb, store);
102
- // rerender(box); // Deleted forms at the moment
103
- } else complain('Sorry, failed to save your change:\n' + body);
104
- };
105
-
106
- // The question of where to store this data about subject
107
- // This in general needs a whole lot more thought
108
- // and it connects to the discoverbility through links
109
-
110
- // const t = kb.findTypeURIs(subject)
111
-
112
- const me = _solidLogic.authn.currentUser();
113
- if (!me) {
114
- mention('You are not logged in. If you log in and have ' + 'workspaces then you would be able to select workspace in which ' + 'to put this new information');
115
- } else {
116
- const ws = kb.each(me, ns.ui('workspace'));
117
- if (ws.length === 0) {
118
- mention('You don\'t seem to have any workspaces defined. ' + 'A workspace is a place on the web (http://..) or in ' + 'the file system (file:///) to store application data.\n');
119
- } else {
120
- // @@
121
- }
122
- }
123
-
124
- // Render forms using a given store
125
-
126
- const renderFormsFor = function (storeNode, targetSubject) {
127
- kb.fetcher.nowOrWhenFetched(storeNode.uri, targetSubject, function (ok, body) {
128
- if (!ok) return complain('Cannot load store ' + storeNode.uri + ': ' + body);
129
-
130
- // Render the forms
131
-
132
- const forms = UI.widgets.formsFor(targetSubject);
133
-
134
- // complain('Form for editing this form:');
135
- for (const form of forms) {
136
- normalizeAmbiguousFieldTypes(kb, form);
137
- const heading = dom.createElement('h4');
138
- heading.classList.add('formPane__heading');
139
- box.appendChild(heading);
140
- /* The edit Form is not working in the local environment. it does not find
141
- the ui FormForm ontology. Need to research further and check in production. */
142
- if (form.uri) {
143
- const formStore = $rdf.Util.uri.document(form.uri);
144
- if (formStore.uri !== form.uri) {
145
- const editButton = box.appendChild(UI.widgets.editFormButton(dom, box, form, formStore, complainIfBad));
146
- editButton.classList.add('formPane__editButton');
147
- }
148
- }
149
- const anchor = dom.createElement('a');
150
- anchor.classList.add('formPane__headingLink');
151
- anchor.setAttribute('href', form.uri);
152
- heading.insertBefore(anchor, heading.firstChild);
153
- anchor.textContent = UI.utils.label(form, true);
154
-
155
- /* Keep tis as a reminder to let a New one have its URI given by user
156
- mention("Where will this information be stored?")
157
- const ele = dom.createElement('input');
158
- box.appendChild(ele);
159
- ele.setAttribute('type', 'text');
160
- ele.setAttribute('size', '72');
161
- ele.setAttribute('maxlength', '1024');
162
- ele.setAttribute('style', 'font-size: 80%; color:#222;');
163
- ele.value = store.uri
164
- */
165
-
166
- UI.widgets.appendForm(dom, box, {}, targetSubject, form, storeNode, complainIfBad);
167
- tagMobileTextareaRows(box);
168
- }
169
- }); // end: when store loded
170
- }; // renderFormsFor
171
-
172
- // Figure out what store
173
-
174
- // Which places are editable and have stuff about the subject?
175
-
176
- let targetStore = null;
177
-
178
- // 1. The document URI of the subject itself
179
- const docuri = $rdf.Util.uri.docpart(subject.uri);
180
- if (kb.updater.editable(docuri, kb)) {
181
- targetStore = subject.doc();
182
- } // an editable data file with hash
183
-
184
- const annotationStore = kb.any(kb.sym(docuri), ns.link('annotationStore'));
185
- if (!targetStore && isNamedNode(annotationStore)) {
186
- targetStore = annotationStore;
187
- }
188
-
189
- // 2. where stuff is already stored
190
- if (!targetStore) {
191
- const docs = new Map();
192
- kb.statementsMatching(subject).forEach(function (st) {
193
- if (st.why.value) {
194
- docs.set(st.why.value, 1);
195
- }
196
- });
197
- kb.statementsMatching(undefined, undefined, subject).forEach(function (st) {
198
- if (st.why.value) {
199
- docs.set(st.why.value, 2);
200
- }
201
- });
202
- const docList = Array.from(docs.entries()).sort(function ([uriA, scoreA], [uriB, scoreB]) {
203
- return scoreA - scoreB || uriA.localeCompare(uriB);
204
- });
205
- for (const [uri] of docList) {
206
- if (uri && kb.updater.editable(uri, kb)) {
207
- targetStore = kb.sym(uri);
208
- break;
209
- }
210
- }
211
- }
212
-
213
- // 3. In a workspace store
214
- const date = '2014'; // @@@@@@@@@@@@ pass as parameter
215
-
216
- if (targetStore) {
217
- // mention("@@ Ok, we have a store <" + store.uri + ">.");
218
- renderFormsFor(targetStore, subject);
219
- } else {
220
- complain('No suitable store is known, to edit <' + subject.uri + '>.');
221
- const workspaceDetails = {
222
- noun: 'form',
223
- appPathSegment: 'form'
224
- };
225
- const foobarbaz = UI.login.selectWorkspace(dom, workspaceDetails, function (workspaceUri) {
226
- const workspace = workspaceUri ? kb.sym(workspaceUri) : null;
227
- if (!workspace) {
228
- complain('Workspace selection was cancelled.');
229
- return;
230
- }
231
- mention('Workspace selected OK: ' + workspace.uri);
232
- const activities = kb.each(undefined, ns.space('workspace'), workspace).filter(isNamedNode);
233
- for (let j = 0; j < activities.length; j++) {
234
- const act = activities[j];
235
- const subjectDoc2 = kb.any(act, ns.space('store'));
236
- const start = kb.any(act, ns.cal('dtstart'))?.value;
237
- const end = kb.any(act, ns.cal('dtend'))?.value;
238
- if (isNamedNode(subjectDoc2) && start && end && start <= date && end > date) {
239
- renderFormsFor(subjectDoc2, subject);
240
- break;
241
- } else {
242
- complain('Note no suitable annotation store in activity: ' + act);
243
- }
244
- }
245
- });
246
- box.appendChild(foobarbaz);
247
- }
248
- return box;
249
- }
250
- };
@@ -1,74 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _solidLogic = require("solid-logic");
8
- var _solidUi = require("solid-ui");
9
- /* Home Pane
10
- **
11
- ** The home pane is avaiable everywhere and allows a user
12
- ** to
13
- ** - keep track of their stuff
14
- ** - make new things, and possibly
15
- ** - keep track of accounts and workspaces etc
16
- **
17
- */
18
-
19
- const HomePaneSource = {
20
- icon: _solidUi.icons.iconBase + 'noun_547570.svg',
21
- // noun_25830
22
-
23
- global: true,
24
- name: 'home',
25
- // Does the subject deserve an home pane?
26
- //
27
- // yes, always!
28
- //
29
- label: function () {
30
- return 'home';
31
- },
32
- audience: [_solidUi.ns.solid('PowerUser')],
33
- render: function (subject, context) {
34
- const dom = context.dom;
35
- const showContent = async function () {
36
- const homePaneContext = {
37
- div,
38
- dom,
39
- statusArea: div,
40
- me
41
- };
42
- /*
43
- div.appendChild(dom.createElement('h4')).textContent = 'Login status'
44
- var loginStatusDiv = div.appendChild(context.dom.createElement('div'))
45
- // TODO: Find out what the actual type is:
46
- type UriType = unknown;
47
- loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {
48
- // Here we know new log in status
49
- }))
50
- */
51
- div.appendChild(dom.createElement('h4')).textContent = 'Create new thing somewhere';
52
- const creationDiv = div.appendChild(dom.createElement('div'));
53
- const creationContext = {
54
- div: creationDiv,
55
- dom,
56
- statusArea: div,
57
- me
58
- };
59
- const relevantPanes = await _solidUi.login.filterAvailablePanes(context.session.paneRegistry.list);
60
- // @ts-ignore
61
- _solidUi.create.newThingUI(creationContext, context, relevantPanes); // newUI Have to pass panes down
62
-
63
- _solidUi.login.registrationList(homePaneContext, {}).then(function () {});
64
- };
65
- const div = dom.createElement('div');
66
- const me = _solidLogic.authn.currentUser(); // this will be incorrect if not logged in
67
-
68
- showContent();
69
- return div;
70
- }
71
- }; // pane object
72
-
73
- // ends
74
- var _default = exports.default = HomePaneSource;
@@ -1,129 +0,0 @@
1
- .human-readable-pane {
2
- display: block;
3
- min-width: 0;
4
- width: 100%;
5
- max-width: 100%;
6
- box-sizing: border-box;
7
- }
8
-
9
- .human-readable-pane__container {
10
- display: block;
11
- min-width: 0;
12
- width: 100%;
13
- max-width: 100%;
14
- box-sizing: border-box;
15
- overflow-x: hidden;
16
- }
17
-
18
- .human-readable-pane__frame {
19
- display: block;
20
- border: 1px solid;
21
- padding: 1rem;
22
- height: var(--human-readable-pane-height, 30rem);
23
- min-width: 0;
24
- max-width: 100%;
25
- width: 100%;
26
- box-sizing: border-box;
27
- resize: both;
28
- overflow: auto;
29
- }
30
-
31
- .human-readable-pane__frame--iframe {
32
- padding: 0;
33
- overflow: hidden;
34
- width: 100%;
35
- max-width: 100%;
36
- min-height: 18rem;
37
- background: var(--color-background, white);
38
- }
39
-
40
- .human-readable-pane__frame--markdown {
41
- overflow-wrap: anywhere;
42
- word-break: break-word;
43
- }
44
-
45
- .human-readable-pane__frame--plain-text {
46
- font-family: monospace;
47
- white-space: pre-wrap;
48
- overflow-wrap: anywhere;
49
- word-break: break-word;
50
- }
51
-
52
- .human-readable-pane__frame--markdown > * {
53
- max-width: 100%;
54
- box-sizing: border-box;
55
- }
56
-
57
- .human-readable-pane__frame--markdown img,
58
- .human-readable-pane__frame--markdown video,
59
- .human-readable-pane__frame--markdown canvas,
60
- .human-readable-pane__frame--markdown iframe {
61
- max-width: 100%;
62
- height: auto;
63
- }
64
-
65
- .human-readable-pane__frame--markdown pre,
66
- .human-readable-pane__frame--markdown code {
67
- max-width: 100%;
68
- overflow-wrap: anywhere;
69
- word-break: break-word;
70
- }
71
-
72
- .human-readable-pane__frame--markdown pre {
73
- white-space: pre-wrap;
74
- }
75
-
76
- .human-readable-pane__frame--markdown table {
77
- display: block;
78
- width: 100%;
79
- max-width: 100%;
80
- overflow-x: auto;
81
- box-sizing: border-box;
82
- }
83
-
84
- .human-readable-pane__frame--markdown th,
85
- .human-readable-pane__frame--markdown td {
86
- white-space: normal;
87
- overflow-wrap: anywhere;
88
- word-break: break-word;
89
- }
90
-
91
- .human-readable-pane[data-layout='mobile'] .human-readable-pane__frame {
92
- padding: 0.75rem;
93
- resize: none;
94
- min-width: 0;
95
- }
96
-
97
- .human-readable-pane[data-layout='mobile'] .human-readable-pane__frame--markdown,
98
- .human-readable-pane[data-layout='mobile'] .human-readable-pane__frame--plain-text {
99
- overflow-wrap: anywhere;
100
- word-break: break-word;
101
- }
102
-
103
- .human-readable-pane[data-layout='mobile'] .human-readable-pane__frame--iframe {
104
- width: 100%;
105
- max-width: 100%;
106
- min-height: 16rem;
107
- height: min(var(--human-readable-pane-height, 30rem), 75vh);
108
- }
109
-
110
- @media (max-width: 576px) {
111
- .human-readable-pane__frame {
112
- padding: 0.75rem;
113
- resize: none;
114
- min-width: 0;
115
- }
116
-
117
- .human-readable-pane__frame--markdown,
118
- .human-readable-pane__frame--plain-text {
119
- overflow-wrap: anywhere;
120
- word-break: break-word;
121
- }
122
-
123
- .human-readable-pane__frame--iframe {
124
- width: 100%;
125
- max-width: 100%;
126
- min-height: 16rem;
127
- height: min(var(--human-readable-pane-height, 30rem), 75vh);
128
- }
129
- }
@@ -1,243 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _solidUi = require("solid-ui");
8
- var _rdflib = require("rdflib");
9
- var _marked = require("marked");
10
- var _dompurify = _interopRequireDefault(require("dompurify"));
11
- require("./humanReadablePane.css");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- /* Human-readable Pane
14
- **
15
- ** This outline pane contains the document contents for an HTML document
16
- ** This is for peeking at a page, because the user might not want to leave the data browser.
17
- */
18
-
19
- // Helper function to check if a URI has a markdown file extension
20
-
21
- const isMarkdownFile = uri => {
22
- if (!uri) return false;
23
- const path = uri.split('?')[0].split('#')[0]; // Remove query string and fragment
24
- return /\.(md|markdown|mdown|mkd|mkdn)$/i.test(path);
25
- };
26
-
27
- // Cache for dokieli detection results (keyed by subject URI)
28
- const dokieliCache = new Map();
29
- function applyFrameClasses(frame, modifier, lines) {
30
- frame.className = '';
31
- frame.classList.add('human-readable-pane__frame');
32
- frame.classList.add(`human-readable-pane__frame--${modifier}`);
33
- frame.style.setProperty('--human-readable-pane-height', `${lines}em`);
34
- }
35
- const humanReadablePane = {
36
- icon: function (subject, context) {
37
- // Markdown files detected by extension
38
- if (subject && isMarkdownFile(subject.uri)) {
39
- return _solidUi.icons.iconBase + 'markdown.svg';
40
- }
41
-
42
- // Dokieli files detected by content check
43
- if (subject) {
44
- const kb = context.session.store;
45
-
46
- // Check cache from previous detection
47
- const cachedResult = dokieliCache.get(subject.uri);
48
- if (cachedResult === 'dokieli') {
49
- return _solidUi.icons.iconBase + 'dokieli-logo.png';
50
- } else if (cachedResult === 'html') {
51
- return _solidUi.icons.originalIconBase + 'tango/22-text-x-generic.png';
52
- }
53
-
54
- // Check if content already fetched (synchronous)
55
- const responseText = kb.fetcher.getHeader(subject.doc(), 'content');
56
- if (responseText && responseText.length > 0) {
57
- const text = responseText[0];
58
- const isDokieli = text.includes('<script src="https://dokie.li/scripts/dokieli.js">') || text.includes('dokieli.css');
59
- dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html');
60
- return isDokieli ? _solidUi.icons.iconBase + 'dokieli-logo.png' : _solidUi.icons.originalIconBase + 'tango/22-text-x-generic.png';
61
- }
62
-
63
- // Content not yet fetched - return a promise (async detection)
64
- const cts = kb.fetcher.getHeader(subject.doc(), 'content-type');
65
- const ct = cts ? cts[0].split(';', 1)[0].trim() : null;
66
- if (ct === 'text/html') {
67
- return kb.fetcher._fetch(subject.uri).then(response => response.text()).then(text => {
68
- const isDokieli = text.includes('<script src="https://dokie.li/scripts/dokieli.js">') || text.includes('dokieli.css');
69
- dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html');
70
- return isDokieli ? _solidUi.icons.iconBase + 'dokieli-logo.png' : _solidUi.icons.originalIconBase + 'tango/22-text-x-generic.png';
71
- }).catch(() => {
72
- dokieliCache.set(subject.uri, 'html');
73
- return _solidUi.icons.originalIconBase + 'tango/22-text-x-generic.png';
74
- });
75
- }
76
- }
77
-
78
- // Default for all other human-readable content
79
- return _solidUi.icons.originalIconBase + 'tango/22-text-x-generic.png';
80
- },
81
- name: 'humanReadable',
82
- label: function (subject, context) {
83
- const kb = context.session.store;
84
-
85
- // See also the source pane, which has lower precedence.
86
-
87
- const allowed = ['text/plain', 'text/html', 'text/markdown', 'application/xhtml+xml', 'image/png', 'image/jpeg', 'application/pdf', 'video/mp4'];
88
- const hasContentTypeIn = function (kb, x, displayables) {
89
- const cts = kb.fetcher.getHeader(x, 'content-type');
90
- if (cts) {
91
- for (let j = 0; j < cts.length; j++) {
92
- for (let k = 0; k < displayables.length; k++) {
93
- if (cts[j].indexOf(displayables[k]) >= 0) {
94
- return true;
95
- }
96
- }
97
- }
98
- }
99
- return false;
100
- };
101
-
102
- // This data could come from a fetch OR from ldp container
103
- const hasContentTypeIn2 = function (kb, x, displayables) {
104
- const t = kb.findTypeURIs(x);
105
- for (let k = 0; k < displayables.length; k++) {
106
- if (_rdflib.Util.mediaTypeClass(displayables[k]).uri in t) {
107
- return true;
108
- }
109
- }
110
- return false;
111
- };
112
- if (!subject.uri) return null; // no bnodes
113
-
114
- const t = kb.findTypeURIs(subject);
115
- if (t[_solidUi.ns.link('WebPage').uri]) return 'view';
116
-
117
- // Check file extension for markdown files
118
- if (isMarkdownFile(subject.uri)) {
119
- return 'View';
120
- }
121
- if (hasContentTypeIn(kb, subject, allowed) || hasContentTypeIn2(kb, subject, allowed)) {
122
- // For HTML files, check if it's dokieli (async check, store result for later)
123
- const cts = kb.fetcher.getHeader(subject.doc(), 'content-type');
124
- const ct = cts ? cts[0].split(';', 1)[0].trim() : null;
125
- if (ct === 'text/html' && !dokieliCache.has(subject.uri)) {
126
- // Async check for dokieli, don't wait for result
127
- kb.fetcher._fetch(subject.uri).then(response => response.text()).then(text => {
128
- const isDokieli = text.includes('<script src="https://dokie.li/scripts/dokieli.js">') || text.includes('dokieli.css');
129
- dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html');
130
- }).catch(() => {
131
- dokieliCache.set(subject.uri, 'html');
132
- });
133
- }
134
- return 'View';
135
- }
136
- return null;
137
- },
138
- render: function (subject, context) {
139
- const myDocument = context.dom;
140
- const div = myDocument.createElement('div');
141
- const kb = context.session.store;
142
- function applyEnvironmentAttributes(element) {
143
- const environment = context.environment ?? {};
144
- element.dataset.layout = environment.layout ?? 'desktop';
145
- }
146
- const cts = kb.fetcher.getHeader(subject.doc(), 'content-type');
147
- const ct = cts ? cts[0].split(';', 1)[0].trim() : null; // remove content-type parameters
148
-
149
- // Fallback: detect markdown by file extension if content-type is not text/markdown
150
- const isMarkdown = ct === 'text/markdown' || isMarkdownFile(subject.uri);
151
- const isPlainText = ct === 'text/plain';
152
- if (ct) {
153
- // console.log('humanReadablePane: c-t:' + ct)
154
- } else {
155
- console.log('humanReadablePane: unknown content-type?');
156
- }
157
-
158
- // @@ When we can, use CSP to turn off scripts within the iframe
159
- div.classList.add('human-readable-pane');
160
- applyEnvironmentAttributes(div);
161
-
162
- // render markdown to html in a DIV element
163
- const renderMarkdownContent = function (frame) {
164
- kb.fetcher.webOperation('GET', subject.uri).then(response => {
165
- const markdownText = response.responseText ?? '';
166
- const lines = Math.min(30, markdownText.split(/\n/).length + 5);
167
- const res = _marked.marked.parse(markdownText, {
168
- async: false
169
- });
170
- const clean = _dompurify.default.sanitize(res);
171
- frame.innerHTML = clean;
172
- applyFrameClasses(frame, 'markdown', lines);
173
- }).catch(error => {
174
- console.error('Error fetching markdown content:', error);
175
- frame.innerHTML = '<p>Error loading content</p>';
176
- });
177
- };
178
-
179
- // render plain text in a PRE element
180
- const renderPlainTextContent = function (frame) {
181
- kb.fetcher.webOperation('GET', subject.uri).then(response => {
182
- const plainText = response.responseText ?? '';
183
- const lines = Math.min(30, plainText.split(/\n/).length + 5);
184
- frame.textContent = plainText;
185
- applyFrameClasses(frame, 'plain-text', lines);
186
- }).catch(error => {
187
- console.error('Error fetching plain text content:', error);
188
- frame.textContent = 'Error loading content';
189
- });
190
- };
191
- const setIframeAttributes = (frame, lines) => {
192
- frame.setAttribute('src', subject.uri);
193
- applyFrameClasses(frame, 'iframe', lines);
194
- };
195
- if (isMarkdown) {
196
- // For markdown, use a DIV element and render the content
197
- const frame = myDocument.createElement('div');
198
- renderMarkdownContent(frame);
199
- const frameContainer = myDocument.createElement('div');
200
- frameContainer.classList.add('human-readable-pane__container');
201
- frameContainer.appendChild(frame);
202
- div.appendChild(frameContainer);
203
- } else if (isPlainText) {
204
- // For plain text, use a PRE element and render the content
205
- const frame = myDocument.createElement('pre');
206
- renderPlainTextContent(frame);
207
- const frameContainer = myDocument.createElement('div');
208
- frameContainer.classList.add('human-readable-pane__container');
209
- frameContainer.appendChild(frame);
210
- div.appendChild(frameContainer);
211
- } else {
212
- // For other content types, use IFRAME
213
- const frame = myDocument.createElement('iframe');
214
-
215
- // Apply sandbox for HTML/XHTML
216
- if (ct === 'text/html' || ct === 'application/xhtml+xml') {
217
- frame.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms');
218
- }
219
-
220
- // Fetch content to calculate lines dynamically
221
- kb.fetcher.webOperation('GET', subject.uri).then(response => {
222
- const blobText = response.responseText ?? '';
223
- const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5;
224
- const lines = Math.min(30, blobText.split(/\n/).length + newLines);
225
-
226
- // Cache dokieli detection result
227
- const isDokieli = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') || blobText.includes('dokieli.css');
228
- dokieliCache.set(subject.uri, isDokieli ? 'dokieli' : 'html');
229
- setIframeAttributes(frame, lines);
230
- }).catch(error => {
231
- console.error('Error fetching content for line calculation:', error);
232
- // Fallback to default height
233
- setIframeAttributes(frame, 30);
234
- });
235
- const frameContainer = myDocument.createElement('div');
236
- frameContainer.classList.add('human-readable-pane__container');
237
- frameContainer.appendChild(frame);
238
- div.appendChild(frameContainer);
239
- }
240
- return div;
241
- }
242
- };
243
- var _default = exports.default = humanReadablePane; // ends