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
@@ -0,0 +1,85 @@
1
+ import * as e from "solid-ui";
2
+ import * as t from "rdflib";
3
+ //#region src/trip/tripPane.js
4
+ var n = e.ns, r = {
5
+ icon: e.icons.iconBase + "noun_62007.svg",
6
+ name: "travel expenses",
7
+ audience: [n.solid("PowerUser")],
8
+ label: function(t, n) {
9
+ let r = n.session.store, i = r.findTypeURIs(t);
10
+ return e.ns.qu("Transaction") in r.findSuperClassesNT(t) ? "by Trip" : i["http://www.w3.org/ns/pim/trip#Trip"] ? "Trip $" : null;
11
+ },
12
+ render: function(n, r) {
13
+ let i = r.dom, a = r.store, o = e.ns, s = t.Namespace("http://www.w3.org/2002/12/cal/ical#"), c = t.Namespace("http://www.w3.org/ns/pim/trip#"), l = i.createElement("div");
14
+ l.setAttribute("class", "transactionPane"), l.innerHTML = "<h2>Trip transactions</h2>";
15
+ let u = function(e, t) {
16
+ t === void 0 && (t = "color: grey");
17
+ let n = i.createElement("pre");
18
+ n.setAttribute("style", t), l.appendChild(n), n.appendChild(i.createTextNode(e));
19
+ }, d = a.findTypeURIs(n), f = function(n, r) {
20
+ let s = new t.Query(e.utils.label(n)), l = [
21
+ "date",
22
+ "transaction",
23
+ "comment",
24
+ "type",
25
+ "in_USD"
26
+ ], d = {};
27
+ l.forEach(function(e) {
28
+ s.vars.push(d[e] = t.variable(e));
29
+ }), s.pat.add(d.transaction, c("trip"), n);
30
+ let f = a.formula();
31
+ f.add(d.transaction, o.rdf("type"), d.type), s.pat.optional.push(f), s.pat.add(d.transaction, e.ns.qu("date"), d.date), f.add(d.transaction, o.rdfs("comment"), d.comment), s.pat.optional.push(f), s.pat.add(d.transaction, e.ns.qu("in_USD"), d.in_USD);
32
+ let p = e.table(i, {
33
+ query: s,
34
+ onDone: function() {
35
+ let t = {}, r = a.each(void 0, c("trip"), n);
36
+ r.forEach(function(n) {
37
+ let r = a.the(n, o.rdf("type"));
38
+ if (r ||= e.ns.qu("ErrorNoType"), r && r.uri) {
39
+ let i = r.uri;
40
+ t[i] || (t[i] = 0);
41
+ let o = a.any(n, e.ns.qu("in_USD"));
42
+ o || u(" @@ No amount in USD: " + o + " for " + n), o && (t[i] = t[i] + parseFloat(o.value));
43
+ }
44
+ });
45
+ let i = "", s = 0, l = 0;
46
+ for (let n in t) i += e.utils.label(a.sym(n)) + ": " + t[n] + "; ", s++, l += t[n];
47
+ u("Totals of " + r.length + " transactions: " + i, ""), s > 1 && u("Overall net: " + l, "text-treatment: bold;");
48
+ }
49
+ });
50
+ r.appendChild(p);
51
+ };
52
+ if (e.ns.qu("Transaction") in a.findSuperClassesNT(n)) {
53
+ let t = a.each(void 0, o.rdf("type"), n), r = [], i = [];
54
+ for (let n = 0; n < t.length; n++) {
55
+ let o = t[n], s = a.any(o, c("trip"));
56
+ if (!s) r.push(o);
57
+ else {
58
+ o in i || (i[s] = {
59
+ total: 0,
60
+ transactions: []
61
+ });
62
+ let t = a.any(o, e.ns.qu("in_USD"));
63
+ t && (i[s].total += t);
64
+ let n = a.any(o, e.ns.qu("date"));
65
+ i[s.toNT()].transactions.push([n, o]);
66
+ }
67
+ }
68
+ let u = [];
69
+ for (let e in i) {
70
+ let t = a.fromNT(e);
71
+ u.push([a.any(t, s("dtstart")), t]);
72
+ }
73
+ u.sort();
74
+ for (let e = 0; e < u.length; e++) {
75
+ let t = u[e][1];
76
+ f(t, l);
77
+ }
78
+ } else d["http://www.w3.org/ns/pim/trip#Trip"] && f(n, l);
79
+ return l;
80
+ }
81
+ };
82
+ //#endregion
83
+ export { r as default };
84
+
85
+ //# sourceMappingURL=tripPane.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tripPane.esm.js","names":["ns"],"sources":["../../src/trip/tripPane.js"],"sourcesContent":["/* Trip Pane\n **\n ** This pane deals with trips themselves and also\n ** will look at transactions organized by trip.\n **\n ** This outline pane allows a user to interact with a transaction\n ** downloaded from a bank statement, annotting it with classes and comments,\n ** trips, etc\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_62007.svg',\n\n name: 'travel expenses',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject, context) {\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n\n // if (t['http://www.w3.org/2000/10/swap/pim/qif#Transaction']) return \"$$\";\n // if(kb.any(subject, UI.ns.qu('amount'))) return \"$$$\"; // In case schema not picked up\n\n if (UI.ns.qu('Transaction') in kb.findSuperClassesNT(subject)) {\n return 'by Trip'\n }\n if (t['http://www.w3.org/ns/pim/trip#Trip']) return 'Trip $'\n\n return null // No under other circumstances (while testing at least!)\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const kb = context.store\n const ns = UI.ns\n const CAL = $rdf.Namespace('http://www.w3.org/2002/12/cal/ical#')\n const TRIP = $rdf.Namespace('http://www.w3.org/ns/pim/trip#')\n\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'transactionPane')\n div.innerHTML = '<h2>Trip transactions</h2>'\n\n const complain = function complain (message, style) {\n if (style === undefined) style = 'color: grey'\n const pre = myDocument.createElement('pre')\n pre.setAttribute('style', style)\n div.appendChild(pre)\n pre.appendChild(myDocument.createTextNode(message))\n }\n\n // //////////////////////////////////////////////////////////////////////////////\n //\n // Body of trip pane\n\n const t = kb.findTypeURIs(subject)\n\n // var me = authn.currentUser()\n\n // Function: Render a single trip\n\n const renderTrip = function renderTrip (subject, thisDiv) {\n const query = new $rdf.Query(UI.utils.label(subject))\n const vars = ['date', 'transaction', 'comment', 'type', 'in_USD']\n const v = {}\n vars.forEach(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n }) // Only used by UI\n query.pat.add(v.transaction, TRIP('trip'), subject)\n\n const opt = kb.formula()\n opt.add(v.transaction, ns.rdf('type'), v.type) // Issue: this will get stored supertypes too\n query.pat.optional.push(opt)\n\n query.pat.add(v.transaction, UI.ns.qu('date'), v.date)\n\n opt.add(v.transaction, ns.rdfs('comment'), v.comment)\n query.pat.optional.push(opt)\n\n // opt = kb.formula();\n query.pat.add(v.transaction, UI.ns.qu('in_USD'), v.in_USD)\n // query.pat.optional.push(opt);\n\n const calculations = function () {\n const total = {}\n const trans = kb.each(undefined, TRIP('trip'), subject)\n // complain(\"@@ Number of transactions in this trip: \" + trans.length);\n trans.forEach(function (t) {\n let ty = kb.the(t, ns.rdf('type'))\n // complain(\" -- one trans: \"+t.uri + ' -> '+kb.any(t, UI.ns.qu('in_USD')));\n if (!ty) ty = UI.ns.qu('ErrorNoType')\n if (ty && ty.uri) {\n const tyuri = ty.uri\n if (!total[tyuri]) total[tyuri] = 0.0\n const lit = kb.any(t, UI.ns.qu('in_USD'))\n if (!lit) {\n complain(' @@ No amount in USD: ' + lit + ' for ' + t)\n }\n if (lit) {\n total[tyuri] = total[tyuri] + parseFloat(lit.value)\n // complain(' Trans type ='+ty+'; in_USD \"' + lit\n // +'; total[tyuri] = '+total[tyuri]+';')\n }\n }\n })\n let str = ''\n let types = 0\n let grandTotal = 0.0\n for (const uri in total) {\n str += UI.utils.label(kb.sym(uri)) + ': ' + total[uri] + '; '\n types++\n grandTotal += total[uri]\n }\n complain('Totals of ' + trans.length + ' transactions: ' + str, '') // @@@@@ yucky -- need 2 col table\n if (types > 1) {\n complain('Overall net: ' + grandTotal, 'text-treatment: bold;')\n }\n }\n const tableDiv = UI.table(myDocument, {\n query,\n onDone: calculations\n })\n thisDiv.appendChild(tableDiv)\n }\n\n // Render the set of trips which have transactions in this class\n\n if (UI.ns.qu('Transaction') in kb.findSuperClassesNT(subject)) {\n const ts = kb.each(undefined, ns.rdf('type'), subject)\n const triples = []\n const index = []\n for (let i = 0; i < ts.length; i++) {\n const trans = ts[i]\n const trip = kb.any(trans, TRIP('trip'))\n if (!trip) {\n triples.push(trans)\n } else {\n if (!(trans in index)) index[trip] = { total: 0, transactions: [] }\n const usd = kb.any(trans, UI.ns.qu('in_USD'))\n if (usd) index[trip].total += usd\n const date = kb.any(trans, UI.ns.qu('date'))\n index[trip.toNT()].transactions.push([date, trans])\n }\n }\n /* var byDate = function(a,b) {\n return new Date(kb.any(a, CAL('dtstart'))) -\n new Date(kb.any(b, CAL('dtstart')));\n }\n */\n const list = []\n for (const h1 in index) {\n const t1 = kb.fromNT(h1)\n list.push([kb.any(t1, CAL('dtstart')), t1])\n }\n list.sort()\n for (let j = 0; j < list.length; j++) {\n const t2 = list[j][1]\n renderTrip(t2, div)\n }\n\n // Render a single trip\n } else if (t['http://www.w3.org/ns/pim/trip#Trip']) {\n renderTrip(subject, div)\n }\n\n // if (!me) complain(\"You do not have your Web Id set. Set your Web ID to make changes.\");\n\n return div\n }\n}\n// ends\n"],"mappings":";;;AAYA,IAAMA,IAAK,EAAG,IAEd,IAAe;CACb,MAAM,EAAG,MAAM,WAAW;CAE1B,MAAM;CAEN,UAAU,CAACA,EAAG,MAAM,WAAW,CAAC;CAGhC,OAAO,SAAU,GAAS,GAAS;EACjC,IAAM,IAAK,EAAQ,QAAQ,OACrB,IAAI,EAAG,aAAa,CAAO;EAUjC,OALI,EAAG,GAAG,GAAG,aAAa,KAAK,EAAG,mBAAmB,CAAO,IACnD,YAEL,EAAE,wCAA8C,WAE7C;CACT;CAEA,QAAQ,SAAU,GAAS,GAAS;EAClC,IAAM,IAAa,EAAQ,KACrB,IAAK,EAAQ,OACb,IAAK,EAAG,IACR,IAAM,EAAK,UAAU,qCAAqC,GAC1D,IAAO,EAAK,UAAU,gCAAgC,GAEtD,IAAM,EAAW,cAAc,K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K,EAAM,EAAK,CAAC,SAAS;KAC9B,IAAM,IAAO,EAAG,IAAI,GAAO,EAAG,GAAG,GAAG,MAAM,CAAC;KAC3C,EAAM,EAAK,KAAK,EAAE,CAAC,aAAa,KAAK,CAAC,GAAM,CAAK,CAAC;IACpD;GACF;GAMA,IAAM,IAAO,CAAC;GACd,KAAK,IAAM,KAAM,GAAO;IACtB,IAAM,IAAK,EAAG,OAAO,CAAE;IACvB,EAAK,KAAK,CAAC,EAAG,IAAI,GAAI,EAAI,SAAS,CAAC,GAAG,CAAE,CAAC;GAC5C;GACA,EAAK,KAAK;GACV,KAAK,IAAI,IAAI,GAAG,IAAI,EAAK,QAAQ,KAAK;IACpC,IAAM,IAAK,EAAK,EAAE,CAAC;IACnB,EAAW,GAAI,CAAG;GACpB;EAGF,OAAO,AAAI,EAAE,yCACX,EAAW,GAAS,CAAG;EAKzB,OAAO;CACT;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./trustedApplications.utils.cjs.js");let t=require("solid-ui"),n=require("solid-logic"),r=require("rdflib");function i(e){let r=o(`table`,{class:`results`}),l=s(`tr`,[c(`th`,`Application URL`),c(`th`,`Access modes`),c(`th`,`Actions`)]);return r.appendChild(l),n.store.each(e,t.ns.acl(`trustedApp`),void 0,void 0).flatMap(e=>n.store.each(e,t.ns.acl(`origin`),void 0,void 0).map(r=>({appModes:n.store.each(e,t.ns.acl(`mode`),void 0,void 0),origin:r}))).sort((e,t)=>e.origin.value<t.origin.value?-1:1).forEach(({appModes:t,origin:n})=>r.appendChild(a(e,n,t,u))),r.appendChild(a(e,null,[t.ns.acl(`Read`)],u)),r;function u(){r.parentElement.replaceChild(i(e),r)}}function a(i,a,u,d){let f={origin:a,appModes:u,formElements:{modes:[],origin:void 0}};return s(`tr`,[s(`td`,[s(`form`,[o(`input`,{class:`textinput`,placeholder:`Write new URL here`,value:a?a.value:``},{},e=>{f.formElements.origin=e})],{},{submit:p})]),s(`td`,[s(`form`,l(f),{},{submit:p})]),s(`td`,[s(`form`,a?[c(`button`,`Update`,{class:`controlButton`,style:`background: LightGreen;`}),c(`button`,`Delete`,{class:`controlButton`,style:`background: LightCoral;`},{click:m})]:[c(`button`,`Add`,{class:`controlButton`,style:`background: LightGreen;`})],{},{submit:p})])]);function p(a){a.preventDefault();let o;try{o=(0,r.sym)(f.formElements.origin.value)}catch{return alert(`Please provide an application URL you want to trust`)}let s=f.formElements.modes.filter(e=>e.checked).map(e=>e.value),c=e.getStatementsToDelete(f.origin||o,i,n.store,t.ns),l=e.getStatementsToAdd(o,e.generateRandomString(),s,i,t.ns);if(!n.store.updater)throw Error(`Store has no updater`);n.store.updater.update(c,l,h)}function m(a){a.preventDefault();let o;try{o=(0,r.sym)(f.formElements.origin.value)}catch{return alert(`Please provide an application URL you want to remove trust from`)}let s=e.getStatementsToDelete(o,i,n.store,t.ns);if(!n.store.updater)throw Error(`Store has no updater`);n.store.updater.update(s,[],h)}function h(e,t,n){if(t)return d()}}function o(e,t={},n={},r=null){let i=document.createElement(e);return r&&r(i),Object.keys(t).forEach(e=>{i.setAttribute(e,t[e])}),Object.keys(n).forEach(e=>{i.addEventListener(e,n[e])}),i}function s(e,t,n={},r={},i=null){let a=o(e,n,r,i);return t.forEach(e=>a.appendChild(e)),a}function c(e,t,n={},r={},i=null){let a=o(e,n,r,i);return a.textContent=t,a}function l({appModes:e,formElements:n}){return[`Read`,`Write`,`Append`,`Control`].map(r=>s(`label`,[o(`input`,{type:`checkbox`,...e.some(e=>e.value===t.ns.acl(r).value)?{checked:``}:{},value:t.ns.acl(r).uri},{},e=>n.modes.push(e)),c(`span`,r)]))}exports.createApplicationTable=i,exports.createContainer=s,exports.createText=c;
2
+ //# sourceMappingURL=trustedApplications.dom.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedApplications.dom.cjs.js","names":[],"sources":["../../src/trustedApplications/trustedApplications.dom.ts"],"sourcesContent":["import { NamedNode, Statement, sym } from 'rdflib'\nimport { ns } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { generateRandomString, getStatementsToAdd, getStatementsToDelete } from './trustedApplications.utils'\n\ninterface FormElements {\n modes: HTMLInputElement[]\n // This appears to be used to store either a node from the store,\n // or a reference to the input (checkbox) element for a particular mode.\n // These typings were created post-hoc, so I'm not sure if that was intentional.\n // Thus, this union type should be considered as descriptive rather than prescriptive.\n origin: undefined | NamedNode | HTMLInputElement\n}\n\nexport function createApplicationTable (subject: NamedNode) {\n const applicationsTable = createElement('table', {\n class: 'results'\n })\n\n // creating headers\n const header = createContainer('tr', [\n createText('th', 'Application URL'),\n createText('th', 'Access modes'),\n createText('th', 'Actions')\n ])\n applicationsTable.appendChild(header);\n\n // creating rows\n (store.each(subject, ns.acl('trustedApp'), undefined, undefined) as unknown as Statement[])\n .flatMap(app => store\n .each(app as any, ns.acl('origin'), undefined, undefined)\n .map(origin => ({\n appModes: store.each(app as any, ns.acl('mode'), undefined, undefined) as NamedNode[],\n origin: origin as NamedNode\n })))\n .sort((a: any, b: any) => (a.origin.value < b.origin.value ? -1 : 1))\n .forEach(\n ({ appModes, origin }: { appModes: NamedNode[]; origin: NamedNode }) =>\n applicationsTable.appendChild(\n createApplicationEntry(subject, origin, appModes, updateTable)\n )\n )\n\n // adding a row for new applications\n applicationsTable.appendChild(\n createApplicationEntry(subject, null, [ns.acl('Read')], updateTable)\n )\n\n return applicationsTable\n\n function updateTable () {\n applicationsTable.parentElement!.replaceChild(\n createApplicationTable(subject),\n applicationsTable\n )\n }\n}\n\nfunction createApplicationEntry (\n subject: NamedNode,\n origin: NamedNode | null,\n appModes: NamedNode[],\n updateTable: () => void\n): HTMLTableRowElement {\n const trustedApplicationState = {\n origin,\n appModes,\n formElements: {\n modes: [],\n origin: undefined\n } as FormElements\n }\n return createContainer('tr', [\n createContainer('td', [\n createContainer(\n 'form',\n [\n createElement(\n 'input',\n {\n class: 'textinput',\n placeholder: 'Write new URL here',\n value: origin ? origin.value : ''\n },\n {},\n element => {\n trustedApplicationState.formElements.origin = element\n }\n )\n ],\n {},\n {\n submit: addOrEditApplication\n }\n )\n ]),\n createContainer('td', [\n createContainer(\n 'form',\n createModesInput(trustedApplicationState),\n {},\n {\n submit: addOrEditApplication\n }\n )\n ]),\n createContainer('td', [\n createContainer(\n 'form',\n origin\n ? [\n createText('button', 'Update', {\n class: 'controlButton',\n style: 'background: LightGreen;'\n }),\n createText(\n 'button',\n 'Delete',\n {\n class: 'controlButton',\n style: 'background: LightCoral;'\n },\n {\n click: removeApplication\n }\n )\n ]\n : [\n createText('button', 'Add', {\n class: 'controlButton',\n style: 'background: LightGreen;'\n })\n ],\n {},\n {\n submit: addOrEditApplication\n }\n )\n ])\n ])\n\n function addOrEditApplication (event: Event) {\n event.preventDefault()\n let origin\n try {\n origin = sym(trustedApplicationState.formElements.origin!.value)\n } catch (err) {\n return alert('Please provide an application URL you want to trust')\n }\n\n const modes = trustedApplicationState.formElements.modes\n .filter(checkbox => checkbox.checked)\n .map(checkbox => checkbox.value)\n\n const deletions = getStatementsToDelete(\n trustedApplicationState.origin || origin,\n subject,\n store,\n ns\n )\n const additions = getStatementsToAdd(\n origin,\n generateRandomString(),\n modes,\n subject,\n ns\n )\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n store.updater.update(deletions, additions, handleUpdateResponse)\n }\n\n function removeApplication (event: Event) {\n event.preventDefault()\n let origin\n try {\n origin = sym(trustedApplicationState.formElements.origin!.value)\n } catch (err) {\n return alert(\n 'Please provide an application URL you want to remove trust from'\n )\n }\n\n const deletions = getStatementsToDelete(origin, subject, store, ns)\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n store.updater.update(deletions, [], handleUpdateResponse)\n }\n\n function handleUpdateResponse (uri: any, success: boolean, errorBody: any) {\n if (success) {\n return updateTable()\n }\n // console.error(uri, errorBody)\n }\n}\n\nfunction createElement<K extends keyof globalThis.HTMLElementTagNameMap> (\n elementName: K,\n attributes: { [name: string]: string } = {},\n eventListeners: { [eventName: string]: globalThis.EventListener } = {},\n\n onCreated: null | ((createdElement: globalThis.HTMLElementTagNameMap[K]) => void) = null\n) {\n const element = document.createElement(elementName)\n if (onCreated) {\n onCreated(element)\n }\n Object.keys(attributes).forEach(attName => {\n element.setAttribute(attName, attributes[attName])\n })\n Object.keys(eventListeners).forEach(eventName => {\n element.addEventListener(eventName, eventListeners[eventName])\n })\n return element\n}\n\nexport function createContainer<K extends keyof globalThis.HTMLElementTagNameMap> (\n elementName: K,\n children: HTMLElement[],\n attributes = {},\n eventListeners = {},\n onCreated = null\n) {\n const element = createElement(\n elementName,\n attributes,\n eventListeners,\n onCreated\n )\n children.forEach(child => element.appendChild(child))\n return element\n}\n\nexport function createText<K extends keyof globalThis.HTMLElementTagNameMap> (\n elementName: K,\n textContent: string | null,\n attributes = {},\n eventListeners = {},\n onCreated = null\n) {\n const element = createElement(\n elementName,\n attributes,\n eventListeners,\n onCreated\n )\n element.textContent = textContent\n return element\n}\n\nfunction createModesInput ({ appModes, formElements }: {\n appModes: NamedNode[]\n formElements: FormElements\n}) {\n return ['Read', 'Write', 'Append', 'Control'].map(mode => {\n const isChecked = appModes.some(\n appMode => appMode.value === ns.acl(mode).value\n )\n return createContainer('label', [\n createElement(\n 'input',\n {\n type: 'checkbox',\n ...(isChecked ? { checked: '' } : {}),\n value: ns.acl(mode).uri\n },\n {},\n element => formElements.modes.push(element)\n ),\n createText('span', mode)\n ])\n })\n}\n"],"mappings":"6HAcA,SAAgB,EAAwB,EAAoB,CAC1D,IAAM,EAAoB,EAAc,QAAS,CAC/C,MAAO,SACT,CAAC,EAGK,EAAS,EAAgB,KAAM,CACnC,EAAW,KAAM,iBAAiB,EAClC,EAAW,KAAM,cAAc,EAC/B,EAAW,KAAM,SAAS,CAC5B,CAAC,EAwBD,OAvBA,EAAkB,YAAY,CAAM,EAGpC,EAAA,MAAO,KAAK,EAAS,EAAA,GAAG,IAAI,YAAY,EAAG,IAAA,GAAW,IAAA,EAAS,CAAC,CAC7D,QAAQ,GAAO,EAAA,MACb,KAAK,EAA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GAAW,CACzC,EAAQ,aAAa,EAAS,EAAW,EAAQ,CACnD,CAAC,EACD,OAAO,KAAK,CAAc,CAAC,CAAC,QAAQ,GAAa,CAC/C,EAAQ,iBAAiB,EAAW,EAAe,EAAU,CAC/D,CAAC,EACM,CACT,CAEA,SAAgB,EACd,EACA,EACA,EAAa,CAAC,EACd,EAAiB,CAAC,EAClB,EAAY,KACZ,CACA,IAAM,EAAU,EACd,EACA,EACA,EACA,CACF,EAEA,OADA,EAAS,QAAQ,GAAS,EAAQ,YAAY,CAAK,CAAC,EAC7C,CACT,CAEA,SAAgB,EACd,EACA,EACA,EAAa,CAAC,EACd,EAAiB,CAAC,EAClB,EAAY,KACZ,CACA,IAAM,EAAU,EACd,EACA,EACA,EACA,CACF,EAEA,MADA,GAAQ,YAAc,EACf,CACT,CAEA,SAAS,EAAkB,CAAE,WAAU,gBAGpC,CACD,MAAO,CAAC,OAAQ,QAAS,SAAU,SAAS,CAAC,CAAC,IAAI,GAIzC,EAAgB,QAAS,CAC9B,EACE,QACA,CACE,KAAM,WACN,GARY,EAAS,KACzB,GAAW,EAAQ,QAAU,EAAA,GAAG,IAAI,CAAI,CAAC,CAAC,KAOlC,EAAY,CAAE,QAAS,EAAG,EAAI,CAAC,EACnC,MAAO,EAAA,GAAG,IAAI,CAAI,CAAC,CAAC,GACtB,EACA,CAAC,EACD,GAAW,EAAa,MAAM,KAAK,CAAO,CAC5C,EACA,EAAW,OAAQ,CAAI,CACzB,CAAC,CACF,CACH"}
@@ -1,4 +1,4 @@
1
- import { NamedNode } from 'rdflib';
1
+ import { NamedNode } from '../../node_modules/rdflib';
2
2
  export declare function createApplicationTable(subject: NamedNode): HTMLTableElement;
3
3
  export declare function createContainer<K extends keyof globalThis.HTMLElementTagNameMap>(elementName: K, children: HTMLElement[], attributes?: {}, eventListeners?: {}, onCreated?: null): HTMLElementTagNameMap[K];
4
4
  export declare function createText<K extends keyof globalThis.HTMLElementTagNameMap>(elementName: K, textContent: string | null, attributes?: {}, eventListeners?: {}, onCreated?: null): HTMLElementTagNameMap[K];
@@ -0,0 +1,108 @@
1
+ import { generateRandomString as e, getStatementsToAdd as t, getStatementsToDelete as n } from "./trustedApplications.utils.esm.js";
2
+ import { ns as r } from "solid-ui";
3
+ import { store as i } from "solid-logic";
4
+ import { sym as a } from "rdflib";
5
+ //#region src/trustedApplications/trustedApplications.dom.ts
6
+ function o(e) {
7
+ let t = c("table", { class: "results" }), n = l("tr", [
8
+ u("th", "Application URL"),
9
+ u("th", "Access modes"),
10
+ u("th", "Actions")
11
+ ]);
12
+ return t.appendChild(n), i.each(e, r.acl("trustedApp"), void 0, void 0).flatMap((e) => i.each(e, r.acl("origin"), void 0, void 0).map((t) => ({
13
+ appModes: i.each(e, r.acl("mode"), void 0, void 0),
14
+ origin: t
15
+ }))).sort((e, t) => e.origin.value < t.origin.value ? -1 : 1).forEach(({ appModes: n, origin: r }) => t.appendChild(s(e, r, n, a))), t.appendChild(s(e, null, [r.acl("Read")], a)), t;
16
+ function a() {
17
+ t.parentElement.replaceChild(o(e), t);
18
+ }
19
+ }
20
+ function s(o, s, f, p) {
21
+ let m = {
22
+ origin: s,
23
+ appModes: f,
24
+ formElements: {
25
+ modes: [],
26
+ origin: void 0
27
+ }
28
+ };
29
+ return l("tr", [
30
+ l("td", [l("form", [c("input", {
31
+ class: "textinput",
32
+ placeholder: "Write new URL here",
33
+ value: s ? s.value : ""
34
+ }, {}, (e) => {
35
+ m.formElements.origin = e;
36
+ })], {}, { submit: h })]),
37
+ l("td", [l("form", d(m), {}, { submit: h })]),
38
+ l("td", [l("form", s ? [u("button", "Update", {
39
+ class: "controlButton",
40
+ style: "background: LightGreen;"
41
+ }), u("button", "Delete", {
42
+ class: "controlButton",
43
+ style: "background: LightCoral;"
44
+ }, { click: g })] : [u("button", "Add", {
45
+ class: "controlButton",
46
+ style: "background: LightGreen;"
47
+ })], {}, { submit: h })])
48
+ ]);
49
+ function h(s) {
50
+ s.preventDefault();
51
+ let c;
52
+ try {
53
+ c = a(m.formElements.origin.value);
54
+ } catch {
55
+ return alert("Please provide an application URL you want to trust");
56
+ }
57
+ let l = m.formElements.modes.filter((e) => e.checked).map((e) => e.value), u = n(m.origin || c, o, i, r), d = t(c, e(), l, o, r);
58
+ if (!i.updater) throw Error("Store has no updater");
59
+ i.updater.update(u, d, _);
60
+ }
61
+ function g(e) {
62
+ e.preventDefault();
63
+ let t;
64
+ try {
65
+ t = a(m.formElements.origin.value);
66
+ } catch {
67
+ return alert("Please provide an application URL you want to remove trust from");
68
+ }
69
+ let s = n(t, o, i, r);
70
+ if (!i.updater) throw Error("Store has no updater");
71
+ i.updater.update(s, [], _);
72
+ }
73
+ function _(e, t, n) {
74
+ if (t) return p();
75
+ }
76
+ }
77
+ function c(e, t = {}, n = {}, r = null) {
78
+ let i = document.createElement(e);
79
+ return r && r(i), Object.keys(t).forEach((e) => {
80
+ i.setAttribute(e, t[e]);
81
+ }), Object.keys(n).forEach((e) => {
82
+ i.addEventListener(e, n[e]);
83
+ }), i;
84
+ }
85
+ function l(e, t, n = {}, r = {}, i = null) {
86
+ let a = c(e, n, r, i);
87
+ return t.forEach((e) => a.appendChild(e)), a;
88
+ }
89
+ function u(e, t, n = {}, r = {}, i = null) {
90
+ let a = c(e, n, r, i);
91
+ return a.textContent = t, a;
92
+ }
93
+ function d({ appModes: e, formElements: t }) {
94
+ return [
95
+ "Read",
96
+ "Write",
97
+ "Append",
98
+ "Control"
99
+ ].map((n) => l("label", [c("input", {
100
+ type: "checkbox",
101
+ ...e.some((e) => e.value === r.acl(n).value) ? { checked: "" } : {},
102
+ value: r.acl(n).uri
103
+ }, {}, (e) => t.modes.push(e)), u("span", n)]));
104
+ }
105
+ //#endregion
106
+ export { o as createApplicationTable, l as createContainer, u as createText };
107
+
108
+ //# sourceMappingURL=trustedApplications.dom.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedApplications.dom.esm.js","names":[],"sources":["../../src/trustedApplications/trustedApplications.dom.ts"],"sourcesContent":["import { NamedNode, Statement, sym } from 'rdflib'\nimport { ns } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { generateRandomString, getStatementsToAdd, getStatementsToDelete } from './trustedApplications.utils'\n\ninterface FormElements {\n modes: HTMLInputElement[]\n // This appears to be used to store either a node from the store,\n // or a reference to the input (checkbox) element for a particular mode.\n // These typings were created post-hoc, so I'm not sure if that was intentional.\n // Thus, this union type should be considered as descriptive rather than prescriptive.\n origin: undefined | NamedNode | HTMLInputElement\n}\n\nexport function createApplicationTable (subject: NamedNode) {\n const applicationsTable = createElement('table', {\n class: 'results'\n })\n\n // creating headers\n const header = createContainer('tr', [\n createText('th', 'Application URL'),\n createText('th', 'Access modes'),\n createText('th', 'Actions')\n ])\n applicationsTable.appendChild(header);\n\n // creating rows\n (store.each(subject, ns.acl('trustedApp'), undefined, undefined) as unknown as Statement[])\n .flatMap(app => store\n .each(app as any, ns.acl('origin'), undefined, undefined)\n .map(origin => ({\n appModes: store.each(app as any, ns.acl('mode'), undefined, undefined) as NamedNode[],\n origin: origin as NamedNode\n })))\n .sort((a: any, b: any) => (a.origin.value < b.origin.value ? -1 : 1))\n .forEach(\n ({ appModes, origin }: { appModes: NamedNode[]; origin: NamedNode }) =>\n applicationsTable.appendChild(\n createApplicationEntry(subject, origin, appModes, updateTable)\n )\n )\n\n // adding a row for new applications\n applicationsTable.appendChild(\n createApplicationEntry(subject, null, [ns.acl('Read')], updateTable)\n )\n\n return applicationsTable\n\n function updateTable () {\n applicationsTable.parentElement!.replaceChild(\n createApplicationTable(subject),\n applicationsTable\n )\n }\n}\n\nfunction createApplicationEntry (\n subject: NamedNode,\n origin: NamedNode | null,\n appModes: NamedNode[],\n updateTable: () => void\n): HTMLTableRowElement {\n const trustedApplicationState = {\n origin,\n appModes,\n formElements: {\n modes: [],\n origin: undefined\n } as FormElements\n }\n return createContainer('tr', [\n createContainer('td', [\n createContainer(\n 'form',\n [\n createElement(\n 'input',\n {\n class: 'textinput',\n placeholder: 'Write new URL here',\n value: origin ? origin.value : ''\n },\n {},\n element => {\n trustedApplicationState.formElements.origin = element\n }\n )\n ],\n {},\n {\n submit: addOrEditApplication\n }\n )\n ]),\n createContainer('td', [\n createContainer(\n 'form',\n createModesInput(trustedApplicationState),\n {},\n {\n submit: addOrEditApplication\n }\n )\n ]),\n createContainer('td', [\n createContainer(\n 'form',\n origin\n ? [\n createText('button', 'Update', {\n class: 'controlButton',\n style: 'background: LightGreen;'\n }),\n createText(\n 'button',\n 'Delete',\n {\n class: 'controlButton',\n style: 'background: LightCoral;'\n },\n {\n click: removeApplication\n }\n )\n ]\n : [\n createText('button', 'Add', {\n class: 'controlButton',\n style: 'background: LightGreen;'\n })\n ],\n {},\n {\n submit: addOrEditApplication\n }\n )\n ])\n ])\n\n function addOrEditApplication (event: Event) {\n event.preventDefault()\n let origin\n try {\n origin = sym(trustedApplicationState.formElements.origin!.value)\n } catch (err) {\n return alert('Please provide an application URL you want to trust')\n }\n\n const modes = trustedApplicationState.formElements.modes\n .filter(checkbox => checkbox.checked)\n .map(checkbox => checkbox.value)\n\n const deletions = getStatementsToDelete(\n trustedApplicationState.origin || origin,\n subject,\n store,\n ns\n )\n const additions = getStatementsToAdd(\n origin,\n generateRandomString(),\n modes,\n subject,\n ns\n )\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n store.updater.update(deletions, additions, handleUpdateResponse)\n }\n\n function removeApplication (event: Event) {\n event.preventDefault()\n let origin\n try {\n origin = sym(trustedApplicationState.formElements.origin!.value)\n } catch (err) {\n return alert(\n 'Please provide an application URL you want to remove trust from'\n )\n }\n\n const deletions = getStatementsToDelete(origin, subject, store, ns)\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n store.updater.update(deletions, [], handleUpdateResponse)\n }\n\n function handleUpdateResponse (uri: any, success: boolean, errorBody: any) {\n if (success) {\n return updateTable()\n }\n // console.error(uri, errorBody)\n }\n}\n\nfunction createElement<K extends keyof globalThis.HTMLElementTagNameMap> (\n elementName: K,\n attributes: { [name: string]: string } = {},\n eventListeners: { [eventName: string]: globalThis.EventListener } = {},\n\n onCreated: null | ((createdElement: globalThis.HTMLElementTagNameMap[K]) => void) = null\n) {\n const element = document.createElement(elementName)\n if (onCreated) {\n onCreated(element)\n }\n Object.keys(attributes).forEach(attName => {\n element.setAttribute(attName, attributes[attName])\n })\n Object.keys(eventListeners).forEach(eventName => {\n element.addEventListener(eventName, eventListeners[eventName])\n })\n return element\n}\n\nexport function createContainer<K extends keyof globalThis.HTMLElementTagNameMap> (\n elementName: K,\n children: HTMLElement[],\n attributes = {},\n eventListeners = {},\n onCreated = null\n) {\n const element = createElement(\n elementName,\n attributes,\n eventListeners,\n onCreated\n )\n children.forEach(child => element.appendChild(child))\n return element\n}\n\nexport function createText<K extends keyof globalThis.HTMLElementTagNameMap> (\n elementName: K,\n textContent: string | null,\n attributes = {},\n eventListeners = {},\n onCreated = null\n) {\n const element = createElement(\n elementName,\n attributes,\n eventListeners,\n onCreated\n )\n element.textContent = textContent\n return element\n}\n\nfunction createModesInput ({ appModes, formElements }: {\n appModes: NamedNode[]\n formElements: FormElements\n}) {\n return ['Read', 'Write', 'Append', 'Control'].map(mode => {\n const isChecked = appModes.some(\n appMode => appMode.value === ns.acl(mode).value\n )\n return createContainer('label', [\n createElement(\n 'input',\n {\n type: 'checkbox',\n ...(isChecked ? { checked: '' } : {}),\n value: ns.acl(mode).uri\n },\n {},\n element => formElements.modes.push(element)\n ),\n createText('span', mode)\n ])\n })\n}\n"],"mappings":";;;;;AAcA,SAAgB,EAAwB,GAAoB;CAC1D,IAAM,IAAoB,EAAc,SAAS,EAC/C,OAAO,UACT,CAAC,GAGK,IAAS,EAAgB,MAAM;EACnC,EAAW,MAAM,iBAAiB;EAClC,EAAW,MAAM,cAAc;EAC/B,EAAW,MAAM,SAAS;CAC5B,CAAC;CAwBD,OAvBA,EAAkB,YAAY,CAAM,GAGpC,EAAO,KAAK,GAAS,EAAG,IAAI,YAAY,GAAG,KAAA,GAAW,KAAA,CA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AC/C,EAAQ,iBAAiB,GAAW,EAAe,EAAU;CAC/D,CAAC,GACM;AACT;AAEA,SAAgB,EACd,GACA,GACA,IAAa,CAAC,GACd,IAAiB,CAAC,GAClB,IAAY,MACZ;CACA,IAAM,IAAU,EACd,GACA,GACA,GACA,CACF;CAEA,OADA,EAAS,SAAQ,MAAS,EAAQ,YAAY,CAAK,CAAC,GAC7C;AACT;AAEA,SAAgB,EACd,GACA,GACA,IAAa,CAAC,GACd,IAAiB,CAAC,GAClB,IAAY,MACZ;CACA,IAAM,IAAU,EACd,GACA,GACA,GACA,CACF;CAEA,OADA,EAAQ,cAAc,GACf;AACT;AAEA,SAAS,EAAkB,EAAE,aAAU,mBAGpC;CACD,OAAO;EAAC;EAAQ;EAAS;EAAU;CAAS,CAAC,CAAC,KAAI,MAIzC,EAAgB,SAAS,CAC9B,EACE,SACA;EACE,MAAM;EACN,GARY,EAAS,MACzB,MAAW,EAAQ,UAAU,EAAG,IAAI,CAAI,CAAC,CAAC,KAOlC,IAAY,EAAE,SAAS,GAAG,IAAI,CAAC;EACnC,OAAO,EAAG,IAAI,CAAI,CAAC,CAAC;CACtB,GACA,CAAC,IACD,MAAW,EAAa,MAAM,KAAK,CAAO,CAC5C,GACA,EAAW,QAAQ,CAAI,CACzB,CAAC,CACF;AACH"}
@@ -0,0 +1,2 @@
1
+ let e=require("rdflib");function t(e,t,n,r){return n.statementsMatching(null,r.acl(`origin`),e).reduce((e,i)=>e.concat(n.statementsMatching(t,r.acl(`trustedApp`),i.subject)).concat(n.statementsMatching(i.subject)),[])}function n(t,n,r,i,a){let o=new e.BlankNode(`bn_${n}`);return[(0,e.st)(i,a.acl(`trustedApp`),o,i.doc()),(0,e.st)(o,a.acl(`origin`),t,i.doc()),...r.map(t=>(0,e.sym)(t)).map(t=>(0,e.st)(o,a.acl(`mode`),t,i.doc()))]}function r(){return Math.random().toString(36).substr(2,5)}exports.generateRandomString=r,exports.getStatementsToAdd=n,exports.getStatementsToDelete=t;
2
+ //# sourceMappingURL=trustedApplications.utils.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedApplications.utils.cjs.js","names":[],"sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"sourcesContent":["import { BlankNode, IndexedFormula, NamedNode, st, Literal, sym, Statement } from 'rdflib'\nimport { Namespaces } from 'solid-namespace'\n\nexport function getStatementsToDelete (\n origin: NamedNode | Literal,\n person: NamedNode,\n kb: IndexedFormula,\n ns: Namespaces\n): any {\n const applicationStatements = kb.statementsMatching(\n null,\n ns.acl('origin'),\n origin\n )\n const statementsToDelete = applicationStatements.reduce(\n (memo, st) => {\n return memo\n .concat(\n kb.statementsMatching(\n person,\n ns.acl('trustedApp'),\n st.subject as NamedNode\n )\n )\n .concat(kb.statementsMatching(st.subject))\n },\n [] as Array<Statement>\n )\n return statementsToDelete\n}\n\nexport function getStatementsToAdd (\n origin: NamedNode,\n nodeName: string,\n modes: string[],\n person: NamedNode,\n ns: Namespaces\n): any {\n const application = new BlankNode(`bn_${nodeName}`) // NamedNode(`${person.doc().uri}#${nodeName}`)\n return [\n st(person, ns.acl('trustedApp'), application, person.doc()),\n st(application, ns.acl('origin'), origin, person.doc()),\n ...modes\n .map(mode => sym(mode))\n .map(mode => st(application, ns.acl('mode'), mode, person.doc()))\n ]\n}\n\nexport function generateRandomString () {\n return Math.random().toString(36).substr(2, 5)\n}\n"],"mappings":"wBAGA,SAAgB,EACd,EACA,EACA,EACA,EACK,CAoBL,OAnB8B,EAAG,mBAC/B,KACA,EAAG,IAAI,QAAQ,EACf,CAEyB,CAAA,CAAsB,QAC9C,EAAM,IACE,EACJ,OACC,EAAG,mBACD,EACA,EAAG,IAAI,YAAY,EACnB,EAAG,OACL,CACF,CAAC,CACA,OAAO,EAAG,mBAAmB,EAAG,OAAO,CAAC,EAE7C,CAAC,CAEI,CACT,CAEA,SAAgB,EACd,EACA,EACA,EACA,EACA,EACK,CACL,IAAM,EAAc,IAAI,EAAA,UAAU,MAAM,GAAU,EAClD,MAAO,UACF,EAAQ,EAAG,IAAI,YAAY,EAAG,EAAa,EAAO,IAAI,CAAC,WACvD,EAAa,EAAG,IAAI,QAAQ,EAAG,EAAQ,EAAO,IAAI,CAAC,EACtD,GAAG,EACA,IAAI,IAAA,EAAA,EAAA,IAAA,CAAY,CAAI,CAAC,CAAC,CACtB,IAAI,IAAA,EAAA,EAAA,GAAA,CAAW,EAAa,EAAG,IAAI,MAAM,EAAG,EAAM,EAAO,IAAI,CAAC,CAAC,CACpE,CACF,CAEA,SAAgB,GAAwB,CACtC,OAAO,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAG,CAAC,CAC/C"}
@@ -1,4 +1,4 @@
1
- import { IndexedFormula, NamedNode, Literal } from 'rdflib';
1
+ import { IndexedFormula, NamedNode, Literal } from '../../node_modules/rdflib';
2
2
  import { Namespaces } from 'solid-namespace';
3
3
  export declare function getStatementsToDelete(origin: NamedNode | Literal, person: NamedNode, kb: IndexedFormula, ns: Namespaces): any;
4
4
  export declare function getStatementsToAdd(origin: NamedNode, nodeName: string, modes: string[], person: NamedNode, ns: Namespaces): any;
@@ -0,0 +1,20 @@
1
+ import { BlankNode as e, st as t, sym as n } from "rdflib";
2
+ //#region src/trustedApplications/trustedApplications.utils.ts
3
+ function r(e, t, n, r) {
4
+ return n.statementsMatching(null, r.acl("origin"), e).reduce((e, i) => e.concat(n.statementsMatching(t, r.acl("trustedApp"), i.subject)).concat(n.statementsMatching(i.subject)), []);
5
+ }
6
+ function i(r, i, a, o, s) {
7
+ let c = new e(`bn_${i}`);
8
+ return [
9
+ t(o, s.acl("trustedApp"), c, o.doc()),
10
+ t(c, s.acl("origin"), r, o.doc()),
11
+ ...a.map((e) => n(e)).map((e) => t(c, s.acl("mode"), e, o.doc()))
12
+ ];
13
+ }
14
+ function a() {
15
+ return Math.random().toString(36).substr(2, 5);
16
+ }
17
+ //#endregion
18
+ export { a as generateRandomString, i as getStatementsToAdd, r as getStatementsToDelete };
19
+
20
+ //# sourceMappingURL=trustedApplications.utils.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedApplications.utils.esm.js","names":[],"sources":["../../src/trustedApplications/trustedApplications.utils.ts"],"sourcesContent":["import { BlankNode, IndexedFormula, NamedNode, st, Literal, sym, Statement } from 'rdflib'\nimport { Namespaces } from 'solid-namespace'\n\nexport function getStatementsToDelete (\n origin: NamedNode | Literal,\n person: NamedNode,\n kb: IndexedFormula,\n ns: Namespaces\n): any {\n const applicationStatements = kb.statementsMatching(\n null,\n ns.acl('origin'),\n origin\n )\n const statementsToDelete = applicationStatements.reduce(\n (memo, st) => {\n return memo\n .concat(\n kb.statementsMatching(\n person,\n ns.acl('trustedApp'),\n st.subject as NamedNode\n )\n )\n .concat(kb.statementsMatching(st.subject))\n },\n [] as Array<Statement>\n )\n return statementsToDelete\n}\n\nexport function getStatementsToAdd (\n origin: NamedNode,\n nodeName: string,\n modes: string[],\n person: NamedNode,\n ns: Namespaces\n): any {\n const application = new BlankNode(`bn_${nodeName}`) // NamedNode(`${person.doc().uri}#${nodeName}`)\n return [\n st(person, ns.acl('trustedApp'), application, person.doc()),\n st(application, ns.acl('origin'), origin, person.doc()),\n ...modes\n .map(mode => sym(mode))\n .map(mode => st(application, ns.acl('mode'), mode, person.doc()))\n ]\n}\n\nexport function generateRandomString () {\n return Math.random().toString(36).substr(2, 5)\n}\n"],"mappings":";;AAGA,SAAgB,EACd,GACA,GACA,GACA,GACK;CAoBL,OAnB8B,EAAG,mBAC/B,MACA,EAAG,IAAI,QAAQ,GACf,CAEyB,CAAA,CAAsB,QAC9C,GAAM,MACE,EACJ,OACC,EAAG,mBACD,GACA,EAAG,IAAI,YAAY,GACnB,EAAG,OACL,CACF,CAAC,CACA,OAAO,EAAG,mBAAmB,EAAG,OAAO,CAAC,GAE7C,CAAC,CAEI;AACT;AAEA,SAAgB,EACd,GACA,GACA,GACA,GACA,GACK;CACL,IAAM,IAAc,IAAI,EAAU,MAAM,GAAU;CAClD,OAAO;EACL,EAAG,GAAQ,EAAG,IAAI,YAAY,GAAG,GAAa,EAAO,IAAI,CAAC;EAC1D,EAAG,GAAa,EAAG,IAAI,QAAQ,GAAG,GAAQ,EAAO,IAAI,CAAC;EACtD,GAAG,EACA,KAAI,MAAQ,EAAI,CAAI,CAAC,CAAC,CACtB,KAAI,MAAQ,EAAG,GAAa,EAAG,IAAI,MAAM,GAAG,GAAM,EAAO,IAAI,CAAC,CAAC;CACpE;AACF;AAEA,SAAgB,IAAwB;CACtC,OAAO,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC;AAC/C"}
@@ -0,0 +1,2 @@
1
+ const e=require("./trustedApplications.dom.cjs.js");let t=require("solid-ui"),n=require("solid-logic");var r={global:!0,icon:`${t.icons.iconBase}noun_15177.svg`,name:`trustedApplications`,label:()=>null,render:(e,n)=>{let r=n.dom,a=r.createElement(`div`);a.classList.add(`trusted-applications-pane`),a.setAttribute(`style`,`border: 0.3em solid #418d99; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;`);let o=a.appendChild(r.createElement(`table`)),s=o.appendChild(r.createElement(`tr`)),c=o.appendChild(r.createElement(`tr`)).appendChild(r.createElement(`div`));return c.setAttribute(`style`,`padding: 0.7em;`),i(r,s,c).catch(e=>c.appendChild(t.widgets.errorMessageBlock(r,e))),a}};async function i(r,i,a){let o=(await t.login.ensureLoadedProfile({dom:r,div:i,statusArea:a,me:null})).me,s=o.doc();if(!n.store.updater)throw Error(`Store has no updater`);let c=n.store.updater.editable(s.uri,n.store);if(i.appendChild(e.createText(`h3`,`Manage your trusted applications`)),!c){i.appendChild(t.widgets.errorMessageBlock(r,`Your profile ${o.doc().uri} is not editable, so we cannot do much here.`));return}i.appendChild(e.createText(`p`,`Here you can manage the applications you trust.`));let l=e.createApplicationTable(o);i.appendChild(l),i.appendChild(e.createText(`h4`,`Notes`)),i.appendChild(e.createContainer(`ol`,[i.appendChild(e.createText(`li`,`Trusted applications will get access to all resources that you have access to.`)),i.appendChild(e.createText(`li`,`You can limit which modes they have by default.`)),i.appendChild(e.createText(`li`,`They will not gain more access than you have.`))])),i.appendChild(e.createText(`p`,`Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.`))}exports.default=r;
2
+ //# sourceMappingURL=trustedApplications.view.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedApplications.view.cjs.js","names":[],"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { icons, login, widgets } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { createApplicationTable, createContainer, createText } from './trustedApplications.dom'\n\nconst thisColor = '#418d99'\n\nconst trustedApplicationView: PaneDefinition = {\n global: true,\n icon: `${icons.iconBase}noun_15177.svg`,\n name: 'trustedApplications',\n label: () => null,\n render: (subject, context) => {\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('trusted-applications-pane')\n div.setAttribute(\n 'style',\n 'border: 0.3em solid ' +\n thisColor +\n '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;'\n )\n const table = div.appendChild(dom.createElement('table'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n render(dom, main, statusArea).catch(err => statusArea.appendChild(widgets.errorMessageBlock(dom, err)))\n return div\n }\n}\n\nasync function render (dom, main, statusArea): Promise<void> {\n const authContext = await login.ensureLoadedProfile({ dom, div: main, statusArea, me: null })\n const subject = authContext.me as NamedNode\n\n const profile = subject.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n const editable = store.updater.editable(profile.uri, store)\n\n main.appendChild(createText('h3', 'Manage your trusted applications'))\n\n if (!editable) {\n main.appendChild(\n widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`)\n )\n return\n }\n\n main.appendChild(createText('p', 'Here you can manage the applications you trust.'))\n\n const applicationsTable = createApplicationTable(subject)\n main.appendChild(applicationsTable)\n\n main.appendChild(createText('h4', 'Notes'))\n main.appendChild(\n createContainer('ol', [\n main.appendChild(\n createText(\n 'li',\n 'Trusted applications will get access to all resources that you have access to.'\n )\n ),\n main.appendChild(\n createText('li', 'You can limit which modes they have by default.')\n ),\n main.appendChild(\n createText('li', 'They will not gain more access than you have.')\n )\n ])\n )\n main.appendChild(\n createText('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.')\n )\n}\n\nexport default trustedApplicationView\n"],"mappings":"uGAQA,IAAM,EAAyC,CAC7C,OAAQ,GACR,KAAM,GAAG,EAAA,MAAM,SAAS,gBACxB,KAAM,sBACN,UAAa,KACb,QAAS,EAAS,IAAY,CAC5B,IAAM,EAAM,EAAQ,IACd,EAAM,EAAI,cAAc,KAAK,EACnC,EAAI,UAAU,IAAI,2BAA2B,EAC7C,EAAI,aACF,QACA,sFAGF,EACA,IAAM,EAAQ,EAAI,YAAY,EAAI,cAAc,OAAO,CAAC,EAClD,EAAO,EAAM,YAAY,EAAI,cAAc,IAAI,CAAC,EAEhD,EADS,EAAM,YAAY,EAAI,cAAc,IAAI,CACpC,CAAA,CAAO,YAAY,EAAI,cAAc,KAAK,CAAC,EAG9D,OAFA,EAAW,aAAa,QAAS,iBAAiB,EAClD,EAAO,EAAK,EAAM,CAAU,CAAC,CAAC,MAAM,GAAO,EAAW,YAAY,EAAA,QAAQ,kBAAkB,EAAK,CAAG,CAAC,CAAC,EAC/F,CACT,CACF,EAEA,eAAe,EAAQ,EAAK,EAAM,EAA2B,CAE3D,IAAM,GAAU,MADU,EAAA,MAAM,oBAAoB,CAAE,MAAK,IAAK,EAAM,aAAY,GAAI,IAAK,CAAC,EAAA,CAChE,GAEtB,EAAU,EAAQ,IAAI,EAC5B,GAAI,CAAC,EAAA,MAAM,QACT,MAAU,MAAM,sBAAsB,EAExC,IAAM,EAAW,EAAA,MAAM,QAAQ,SAAS,EAAQ,IAAK,EAAA,KAAK,EAI1D,GAFA,EAAK,YAAY,EAAA,WAAW,KAAM,kCAAkC,CAAC,EAEjE,CAAC,EAAU,CACb,EAAK,YACH,EAAA,QAAQ,kBAAkB,EAAK,gBAAgB,EAAQ,IAAI,CAAC,CAAC,IAAI,6CAA6C,CAChH,EACA,MACF,CAEA,EAAK,YAAY,EAAA,WAAW,IAAK,iDAAiD,CAAC,EAEnF,IAAM,EAAoB,EAAA,uBAAuB,CAAO,EACxD,EAAK,YAAY,CAAiB,EAElC,EAAK,YAAY,EAAA,WAAW,KAAM,OAAO,CAAC,EAC1C,EAAK,YACH,EAAA,gBAAgB,KAAM,CACpB,EAAK,YACH,EAAA,WACE,KACA,gFACF,CACF,EACA,EAAK,YACH,EAAA,WAAW,KAAM,iDAAiD,CACpE,EACA,EAAK,YACH,EAAA,WAAW,KAAM,+CAA+C,CAClE,CACF,CAAC,CACH,EACA,EAAK,YACH,EAAA,WAAW,IAAK,2HAA2H,CAC7I,CACF"}
@@ -1,4 +1,4 @@
1
- import { PaneDefinition } from 'pane-registry';
1
+ import { PaneDefinition } from '../../node_modules/pane-registry';
2
2
  declare const trustedApplicationView: PaneDefinition;
3
3
  export default trustedApplicationView;
4
4
  //# sourceMappingURL=trustedApplications.view.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { createApplicationTable as e, createContainer as t, createText as n } from "./trustedApplications.dom.esm.js";
2
+ import { icons as r, login as i, widgets as a } from "solid-ui";
3
+ import { store as o } from "solid-logic";
4
+ //#region src/trustedApplications/trustedApplications.view.ts
5
+ var s = {
6
+ global: !0,
7
+ icon: `${r.iconBase}noun_15177.svg`,
8
+ name: "trustedApplications",
9
+ label: () => null,
10
+ render: (e, t) => {
11
+ let n = t.dom, r = n.createElement("div");
12
+ r.classList.add("trusted-applications-pane"), r.setAttribute("style", "border: 0.3em solid #418d99; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;");
13
+ let i = r.appendChild(n.createElement("table")), o = i.appendChild(n.createElement("tr")), s = i.appendChild(n.createElement("tr")).appendChild(n.createElement("div"));
14
+ return s.setAttribute("style", "padding: 0.7em;"), c(n, o, s).catch((e) => s.appendChild(a.errorMessageBlock(n, e))), r;
15
+ }
16
+ };
17
+ async function c(r, s, c) {
18
+ let l = (await i.ensureLoadedProfile({
19
+ dom: r,
20
+ div: s,
21
+ statusArea: c,
22
+ me: null
23
+ })).me, u = l.doc();
24
+ if (!o.updater) throw Error("Store has no updater");
25
+ let d = o.updater.editable(u.uri, o);
26
+ if (s.appendChild(n("h3", "Manage your trusted applications")), !d) {
27
+ s.appendChild(a.errorMessageBlock(r, `Your profile ${l.doc().uri} is not editable, so we cannot do much here.`));
28
+ return;
29
+ }
30
+ s.appendChild(n("p", "Here you can manage the applications you trust."));
31
+ let f = e(l);
32
+ s.appendChild(f), s.appendChild(n("h4", "Notes")), s.appendChild(t("ol", [
33
+ s.appendChild(n("li", "Trusted applications will get access to all resources that you have access to.")),
34
+ s.appendChild(n("li", "You can limit which modes they have by default.")),
35
+ s.appendChild(n("li", "They will not gain more access than you have."))
36
+ ])), s.appendChild(n("p", "Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app."));
37
+ }
38
+ //#endregion
39
+ export { s as default };
40
+
41
+ //# sourceMappingURL=trustedApplications.view.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trustedApplications.view.esm.js","names":[],"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { icons, login, widgets } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { createApplicationTable, createContainer, createText } from './trustedApplications.dom'\n\nconst thisColor = '#418d99'\n\nconst trustedApplicationView: PaneDefinition = {\n global: true,\n icon: `${icons.iconBase}noun_15177.svg`,\n name: 'trustedApplications',\n label: () => null,\n render: (subject, context) => {\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('trusted-applications-pane')\n div.setAttribute(\n 'style',\n 'border: 0.3em solid ' +\n thisColor +\n '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;'\n )\n const table = div.appendChild(dom.createElement('table'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n render(dom, main, statusArea).catch(err => statusArea.appendChild(widgets.errorMessageBlock(dom, err)))\n return div\n }\n}\n\nasync function render (dom, main, statusArea): Promise<void> {\n const authContext = await login.ensureLoadedProfile({ dom, div: main, statusArea, me: null })\n const subject = authContext.me as NamedNode\n\n const profile = subject.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n const editable = store.updater.editable(profile.uri, store)\n\n main.appendChild(createText('h3', 'Manage your trusted applications'))\n\n if (!editable) {\n main.appendChild(\n widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`)\n )\n return\n }\n\n main.appendChild(createText('p', 'Here you can manage the applications you trust.'))\n\n const applicationsTable = createApplicationTable(subject)\n main.appendChild(applicationsTable)\n\n main.appendChild(createText('h4', 'Notes'))\n main.appendChild(\n createContainer('ol', [\n main.appendChild(\n createText(\n 'li',\n 'Trusted applications will get access to all resources that you have access to.'\n )\n ),\n main.appendChild(\n createText('li', 'You can limit which modes they have by default.')\n ),\n main.appendChild(\n createText('li', 'They will not gain more access than you have.')\n )\n ])\n )\n main.appendChild(\n createText('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.')\n )\n}\n\nexport default trustedApplicationView\n"],"mappings":";;;;AAQA,IAAM,IAAyC;CAC7C,QAAQ;CACR,MAAM,GAAG,EAAM,SAAS;CACxB,MAAM;CACN,aAAa;CACb,SAAS,GAAS,MAAY;EAC5B,IAAM,IAAM,EAAQ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YACH,EAAW,KAAK,2HAA2H,CAC7I;AACF"}
@@ -0,0 +1,4 @@
1
+ const e=require("../_virtual/_rolldown/runtime.cjs.js");let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r=t.ns,i={icon:t.icons.iconBase+`noun_170702.svg`,name:`ui`,audience:[r.solid(`PowerUser`)],label:function(e,n){let r=t.ns,i=n.session.store.findTypeURIs(e);return i[r.rdfs(`Class`).uri]?`creation forms`:i[r.ui(`Form`).uri]?`edit form`:null},render:function(e,r){let i=r.dom,a=r.session.store,o=t.ns,s=i.createElement(`div`);s.setAttribute(`class`,`formPane`);let c=t.utils.label(e),l=function(e,t){let n=i.createElement(`p`);return n.setAttribute(`style`,t||`color: grey; background-color: white`),s.appendChild(n).textContent=e,n},u=function(e,t){l(e,`style`,t||`color: grey; background-color: #fdd`)},d=function(e,t){e||u(`Sorry, failed to save your change:
2
+ `+t)},f=a.findTypeURIs(e),p=null,m;e.uri&&(m=n.Util.uri.docpart(e.uri),e.uri!==m&&a.updater.editable(m)&&(p=a.sym(n.Util.uri.docpart(e.uri)))),p||=a.any(a.sym(m),o.link(`annotationStore`)),p||=t.widgets.defaultAnnotationStore(e),p||=a.sym(`https://formsregistry.solid.community/public/formRegistry/`);let h;f[o.rdfs(`Class`).uri];let g=l(`(Loading data from: `+p+`)`);return a.fetcher.nowOrWhenFetched(p.uri,e,function(n,m){if(!n){u(`Cannot load store `+p+` :`+m);return}if(s.removeChild(g),f[o.rdfs(`Class`).uri]){let n=function(n,f){let m=a.statementsMatching(e,n),h=r.getOutliner(i);if(m.length){for(let n=0;n<m.length;n++){h.appendPropertyTRs(s,[m[n]]);let r=m[n].object,c=i.createElement(`td`);s.lastChild.appendChild(c),f&&c.appendChild(t.widgets.newButton(i,a,null,null,e,r,p,function(e,t){e||u(`Sorry, failed to save your change:
3
+ `+t)}));let l=a.statementsMatching(r,o.rdf(`type`));l.length||(l=a.statementsMatching(r)),l.length?t.widgets.editFormButton(i,s,r,l[0].why,d):u(`No data about form`)}s.appendChild(i.createElement(`hr`))}else l(`There are currently no known forms to make a `+c+`.`)};h=o.ui(`creationForm`),s.appendChild(i.createElement(`h2`)).textContent=t.utils.label(h),l(`Creation forms allow you to add information about a new thing, in this case a new `+c+`.`),n(h,!0),s.appendChild(i.createElement(`hr`)),l(`You can make a new creation form:`),s.appendChild(t.widgets.newButton(i,a,e,h,o.ui(`Form`),null,p,d)),s.appendChild(i.createElement(`hr`)),h=o.ui(`annotationForm`),s.appendChild(i.createElement(`h2`)).textContent=t.utils.label(h),l(`Annotaion forms allow you to add extra information about a ,`+c+` we already know about.`),n(h,!1),s.appendChild(i.createElement(`hr`)),l(`You can make a new annotation form:`),s.appendChild(t.widgets.newButton(i,a,e,h,o.ui(`Form`),null,p,d)),l(`(Storing new forms in: `+p+`)`)}else f[o.ui(`Form`).uri]?t.widgets.appendForm(i,s,a,e,o.ui(`FormForm`),p,d):u(`ui/pane internal error -- Eh?`)}),s}};exports.default=i;
4
+ //# sourceMappingURL=pane.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pane.cjs.js","names":["UI","$rdf"],"sources":["../../src/ui/pane.js"],"sourcesContent":["/* Form building/editing Pane\n **\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n // noun_170702.svg' builder noun_122196.svg form\n icon: UI.icons.iconBase + 'noun_170702.svg',\n\n name: 'ui',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject, context) {\n const ns = UI.ns\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t[ns.rdfs('Class').uri]) return 'creation forms'\n // if (t[ns.rdf('Property').uri]) return \"user interface\";\n if (t[ns.ui('Form').uri]) return 'edit form'\n\n return null // No under other circumstances (while testing at least!)\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane') // Share styles\n const label = UI.utils.label(subject)\n\n const mention = function complain (message, style) {\n const pre = dom.createElement('p')\n pre.setAttribute('style', style || 'color: grey; background-color: white')\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function complain (message, style) {\n mention(message, 'style', style || 'color: grey; background-color: #fdd')\n }\n\n const complainIfBad = function (ok, body) {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // //////////////////////////////////////////////////////////////////////////////\n\n const t = kb.findTypeURIs(subject)\n\n let store = null\n let docuri\n if (subject.uri) {\n docuri = $rdf.Util.uri.docpart(subject.uri)\n if (subject.uri !== docuri && kb.updater.editable(docuri)) {\n store = kb.sym($rdf.Util.uri.docpart(subject.uri))\n } // an editable ontology with hash\n }\n if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!store) store = UI.widgets.defaultAnnotationStore(subject)\n\n if (!store) {\n store = kb.sym(\n 'https://formsregistry.solid.community/public/formRegistry/'\n ) // fallback\n }\n // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback\n\n // A fallback which gives a different store page for each ontology would be good @@\n\n let pred\n if (t[ns.rdfs('Class').uri]) {\n // Stuff we can do before we load the store\n }\n\n const wait = mention('(Loading data from: ' + store + ')')\n\n kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {\n if (!ok) {\n complain('Cannot load store ' + store + ' :' + body)\n return\n }\n box.removeChild(wait)\n\n // Render a Class -- the forms associated with it\n\n if (t[ns.rdfs('Class').uri]) {\n // For each creation form, allow one to create a new object with it, and also to edit the form.\n const displayFormsForRelation = function displayFormsForRelation (\n pred,\n allowCreation\n ) {\n const sts = kb.statementsMatching(subject, pred)\n const outliner = context.getOutliner(dom)\n if (sts.length) {\n for (let i = 0; i < sts.length; i++) {\n outliner.appendPropertyTRs(box, [sts[i]])\n const form = sts[i].object\n const cell = dom.createElement('td')\n box.lastChild.appendChild(cell)\n if (allowCreation) {\n cell.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n null,\n null,\n subject,\n form,\n store,\n function (ok, body) {\n if (ok) {\n // dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);\n // rerender(box); // Deleted forms at the moment\n } else {\n complain('Sorry, failed to save your change:\\n' + body)\n }\n }\n )\n )\n }\n let formdef = kb.statementsMatching(form, ns.rdf('type'))\n if (!formdef.length) formdef = kb.statementsMatching(form)\n if (!formdef.length) complain('No data about form')\n else {\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formdef[0].why,\n complainIfBad\n )\n }\n }\n box.appendChild(dom.createElement('hr'))\n } else {\n mention(\n 'There are currently no known forms to make a ' + label + '.'\n )\n }\n }\n\n pred = ns.ui('creationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Creation forms allow you to add information about a new thing,' +\n ' in this case a new ' +\n label +\n '.'\n )\n displayFormsForRelation(pred, true)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new creation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n box.appendChild(dom.createElement('hr'))\n\n pred = ns.ui('annotationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Annotaion forms allow you to add extra information about a ,' +\n label +\n ' we already know about.'\n )\n displayFormsForRelation(pred, false)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new annotation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n mention('(Storing new forms in: ' + store + ')')\n\n // Render a Form\n } else if (t[ns.ui('Form').uri]) {\n UI.widgets.appendForm(\n dom,\n box,\n kb,\n subject,\n ns.ui('FormForm'),\n store,\n complainIfBad\n )\n } else {\n complain('ui/pane internal error --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AI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,YAAcA,EAAG,MAAM,MAC9D,CACF,EACA,EACE,qFAEE,EACA,GACJ,EACA,EAAwB,EAAM,EAAI,EAClC,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,EACvC,EAAQ,mCAAmC,EAC3C,EAAI,YACFA,EAAG,QAAQ,UACT,EACA,EACA,EACA,EACA,EAAG,GAAG,MAAM,EACZ,KACA,EACA,CACF,CACF,EAEA,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,EAEvC,EAAO,EAAG,GAAG,gBAAgB,EAC7B,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,YAAcA,EAAG,MAAM,MAC9D,CACF,EACA,EACE,+DACE,EACA,yBACJ,EACA,EAAwB,EAAM,EAAK,EACnC,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,EACvC,EAAQ,qCAAqC,EAC7C,EAAI,YACFA,EAAG,QAAQ,UACT,EACA,EACA,EACA,EACA,EAAG,GAAG,MAAM,EACZ,KACA,EACA,CACF,CACF,EAEA,EAAQ,0BAA4B,EAAQ,GAAG,CAGjD,MAAW,EAAE,EAAG,GAAG,MAAM,CAAC,CAAC,KACzB,EAAG,QAAQ,WACT,EACA,EACA,EACA,EACA,EAAG,GAAG,UAAU,EAChB,EACA,CACF,EAEA,EAAS,+BAA+B,CAE5C,CAAC,EAEM,CACT,CACF"}
@@ -0,0 +1,56 @@
1
+ import * as e from "solid-ui";
2
+ import * as t from "rdflib";
3
+ //#region src/ui/pane.js
4
+ var n = e.ns, r = {
5
+ icon: e.icons.iconBase + "noun_170702.svg",
6
+ name: "ui",
7
+ audience: [n.solid("PowerUser")],
8
+ label: function(t, n) {
9
+ let r = e.ns, i = n.session.store.findTypeURIs(t);
10
+ return i[r.rdfs("Class").uri] ? "creation forms" : i[r.ui("Form").uri] ? "edit form" : null;
11
+ },
12
+ render: function(n, r) {
13
+ let i = r.dom, a = r.session.store, o = e.ns, s = i.createElement("div");
14
+ s.setAttribute("class", "formPane");
15
+ let c = e.utils.label(n), l = function(e, t) {
16
+ let n = i.createElement("p");
17
+ return n.setAttribute("style", t || "color: grey; background-color: white"), s.appendChild(n).textContent = e, n;
18
+ }, u = function(e, t) {
19
+ l(e, "style", t || "color: grey; background-color: #fdd");
20
+ }, d = function(e, t) {
21
+ e || u("Sorry, failed to save your change:\n" + t);
22
+ }, f = a.findTypeURIs(n), p = null, m;
23
+ n.uri && (m = t.Util.uri.docpart(n.uri), n.uri !== m && a.updater.editable(m) && (p = a.sym(t.Util.uri.docpart(n.uri)))), p ||= a.any(a.sym(m), o.link("annotationStore")), p ||= e.widgets.defaultAnnotationStore(n), p ||= a.sym("https://formsregistry.solid.community/public/formRegistry/");
24
+ let h;
25
+ f[o.rdfs("Class").uri];
26
+ let g = l("(Loading data from: " + p + ")");
27
+ return a.fetcher.nowOrWhenFetched(p.uri, n, function(t, m) {
28
+ if (!t) {
29
+ u("Cannot load store " + p + " :" + m);
30
+ return;
31
+ }
32
+ if (s.removeChild(g), f[o.rdfs("Class").uri]) {
33
+ let t = function(t, f) {
34
+ let m = a.statementsMatching(n, t), h = r.getOutliner(i);
35
+ if (m.length) {
36
+ for (let t = 0; t < m.length; t++) {
37
+ h.appendPropertyTRs(s, [m[t]]);
38
+ let r = m[t].object, c = i.createElement("td");
39
+ s.lastChild.appendChild(c), f && c.appendChild(e.widgets.newButton(i, a, null, null, n, r, p, function(e, t) {
40
+ e || u("Sorry, failed to save your change:\n" + t);
41
+ }));
42
+ let l = a.statementsMatching(r, o.rdf("type"));
43
+ l.length || (l = a.statementsMatching(r)), l.length ? e.widgets.editFormButton(i, s, r, l[0].why, d) : u("No data about form");
44
+ }
45
+ s.appendChild(i.createElement("hr"));
46
+ } else l("There are currently no known forms to make a " + c + ".");
47
+ };
48
+ h = o.ui("creationForm"), s.appendChild(i.createElement("h2")).textContent = e.utils.label(h), l("Creation forms allow you to add information about a new thing, in this case a new " + c + "."), t(h, !0), s.appendChild(i.createElement("hr")), l("You can make a new creation form:"), s.appendChild(e.widgets.newButton(i, a, n, h, o.ui("Form"), null, p, d)), s.appendChild(i.createElement("hr")), h = o.ui("annotationForm"), s.appendChild(i.createElement("h2")).textContent = e.utils.label(h), l("Annotaion forms allow you to add extra information about a ," + c + " we already know about."), t(h, !1), s.appendChild(i.createElement("hr")), l("You can make a new annotation form:"), s.appendChild(e.widgets.newButton(i, a, n, h, o.ui("Form"), null, p, d)), l("(Storing new forms in: " + p + ")");
49
+ } else f[o.ui("Form").uri] ? e.widgets.appendForm(i, s, a, n, o.ui("FormForm"), p, d) : u("ui/pane internal error -- Eh?");
50
+ }), s;
51
+ }
52
+ };
53
+ //#endregion
54
+ export { r as default };
55
+
56
+ //# sourceMappingURL=pane.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pane.esm.js","names":["ns"],"sources":["../../src/ui/pane.js"],"sourcesContent":["/* Form building/editing Pane\n **\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n // noun_170702.svg' builder noun_122196.svg form\n icon: UI.icons.iconBase + 'noun_170702.svg',\n\n name: 'ui',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject, context) {\n const ns = UI.ns\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t[ns.rdfs('Class').uri]) return 'creation forms'\n // if (t[ns.rdf('Property').uri]) return \"user interface\";\n if (t[ns.ui('Form').uri]) return 'edit form'\n\n return null // No under other circumstances (while testing at least!)\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane') // Share styles\n const label = UI.utils.label(subject)\n\n const mention = function complain (message, style) {\n const pre = dom.createElement('p')\n pre.setAttribute('style', style || 'color: grey; background-color: white')\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function complain (message, style) {\n mention(message, 'style', style || 'color: grey; background-color: #fdd')\n }\n\n const complainIfBad = function (ok, body) {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // //////////////////////////////////////////////////////////////////////////////\n\n const t = kb.findTypeURIs(subject)\n\n let store = null\n let docuri\n if (subject.uri) {\n docuri = $rdf.Util.uri.docpart(subject.uri)\n if (subject.uri !== docuri && kb.updater.editable(docuri)) {\n store = kb.sym($rdf.Util.uri.docpart(subject.uri))\n } // an editable ontology with hash\n }\n if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!store) store = UI.widgets.defaultAnnotationStore(subject)\n\n if (!store) {\n store = kb.sym(\n 'https://formsregistry.solid.community/public/formRegistry/'\n ) // fallback\n }\n // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback\n\n // A fallback which gives a different store page for each ontology would be good @@\n\n let pred\n if (t[ns.rdfs('Class').uri]) {\n // Stuff we can do before we load the store\n }\n\n const wait = mention('(Loading data from: ' + store + ')')\n\n kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {\n if (!ok) {\n complain('Cannot load store ' + store + ' :' + body)\n return\n }\n box.removeChild(wait)\n\n // Render a Class -- the forms associated with it\n\n if (t[ns.rdfs('Class').uri]) {\n // For each creation form, allow one to create a new object with it, and also to edit the form.\n const displayFormsForRelation = function displayFormsForRelation (\n pred,\n allowCreation\n ) {\n const sts = kb.statementsMatching(subject, pred)\n const outliner = context.getOutliner(dom)\n if (sts.length) {\n for (let i = 0; i < sts.length; i++) {\n outliner.appendPropertyTRs(box, [sts[i]])\n const form = sts[i].object\n const cell = dom.createElement('td')\n box.lastChild.appendChild(cell)\n if (allowCreation) {\n cell.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n null,\n null,\n subject,\n form,\n store,\n function (ok, body) {\n if (ok) {\n // dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);\n // rerender(box); // Deleted forms at the moment\n } else {\n complain('Sorry, failed to save your change:\\n' + body)\n }\n }\n )\n )\n }\n let formdef = kb.statementsMatching(form, ns.rdf('type'))\n if (!formdef.length) formdef = kb.statementsMatching(form)\n if (!formdef.length) complain('No data about form')\n else {\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formdef[0].why,\n complainIfBad\n )\n }\n }\n box.appendChild(dom.createElement('hr'))\n } else {\n mention(\n 'There are currently no known forms to make a ' + label + '.'\n )\n }\n }\n\n pred = ns.ui('creationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Creation forms allow you to add information about a new thing,' +\n ' in this case a new ' +\n label +\n '.'\n )\n displayFormsForRelation(pred, true)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new creation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n box.appendChild(dom.createElement('hr'))\n\n pred = ns.ui('annotationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Annotaion forms allow you to add extra information about a ,' +\n label +\n ' we already know about.'\n )\n displayFormsForRelation(pred, false)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new annotation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n mention('(Storing new forms in: ' + store + ')')\n\n // Render a Form\n } else if (t[ns.ui('Form').uri]) {\n UI.widgets.appendForm(\n dom,\n box,\n kb,\n subject,\n ns.ui('FormForm'),\n store,\n complainIfBad\n )\n } else {\n complain('ui/pane internal error -- Eh?')\n }\n }) // end: when store loded\n\n return box\n }\n}\n// ends\n"],"mappings":";;;AAMA,IAAMA,IAAK,EAAG,IAEd,IAAe;CAEb,MAAM,EAAG,MAAM,WAAW;CAE1B,MAAM;CAEN,UAAU,CAACA,EAAG,MAAM,W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,GAClC,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,GACvC,EAAQ,mCAAmC,GAC3C,EAAI,YACF,EAAG,QAAQ,UACT,GACA,GACA,GACA,GACA,EAAG,GAAG,MAAM,GACZ,MACA,GACA,CACF,CACF,GAEA,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,GAEvC,IAAO,EAAG,GAAG,gBAAgB,GAC7B,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,cAAc,EAAG,MAAM,MAC9D,CACF,GACA,EACE,iEACE,IACA,yBACJ,GACA,EAAwB,GAAM,EAAK,GACnC,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,GACvC,EAAQ,qCAAqC,GAC7C,EAAI,YACF,EAAG,QAAQ,UACT,GACA,GACA,GACA,GACA,EAAG,GAAG,MAAM,GACZ,MACA,GACA,CACF,CACF,GAEA,EAAQ,4BAA4B,IAAQ,GAAG;GAGjD,OAAO,AAAI,EAAE,EAAG,GAAG,MAAM,CAAC,CAAC,OACzB,EAAG,QAAQ,WACT,GACA,GACA,GACA,GACA,EAAG,GAAG,UAAU,GAChB,GACA,CACF,IAEA,EAAS,+BAA+B;EAE5C,CAAC,GAEM;CACT;AACF"}
@@ -0,0 +1,2 @@
1
+ var e={buildTime:`2026-07-02T15:11:20Z`,commit:`68fe2e5993d71398cd8672b1aca03e4eda05a153`,npmInfo:{"solid-panes":`4.4.2-3`,npm:`10.9.8`,node:`22.23.1`,acorn:`8.16.0`,ada:`2.9.2`,amaro:`1.1.8`,ares:`1.34.6`,brotli:`1.1.0`,cjs_module_lexer:`2.2.0`,cldr:`48.0`,icu:`78.2`,llhttp:`9.4.2`,modules:`127`,napi:`10`,nbytes:`0.1.3`,ncrypto:`0.0.1`,nghttp2:`1.69.0`,openssl:`3.5.7`,simdjson:`4.5.0`,simdutf:`6.4.2`,sqlite:`3.51.3`,tz:`2026a`,undici:`6.27.0`,unicode:`17.0`,uv:`1.51.0`,uvwasi:`0.0.23`,v8:`12.4.254.21-node.56`,zlib:`1.3.1-e00f703`,zstd:`1.5.7`}};exports.default=e;
2
+ //# sourceMappingURL=versionInfo.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versionInfo.cjs.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-07-02T15:11:20Z',\n commit: '68fe2e5993d71398cd8672b1aca03e4eda05a153',\n npmInfo: {\n 'solid-panes': '4.4.2-3',\n npm: '10.9.8',\n node: '22.23.1',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.6',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.2',\n llhttp: '9.4.2',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.7',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026a',\n undici: '6.27.0',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.56',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":"AAAA,IAAA,EAAe,CACb,UAAW,uBACX,OAAQ,2CACR,QAAS,CACP,cAAe,UACf,IAAK,SACL,KAAM,UACN,MAAO,SACP,IAAK,QACL,MAAO,QACP,KAAM,SACN,OAAQ,QACR,iBAAkB,QAClB,KAAM,OACN,IAAK,OACL,OAAQ,QACR,QAAS,MACT,KAAM,KACN,OAAQ,QACR,QAAS,QACT,QAAS,SACT,QAAS,QACT,SAAU,QACV,QAAS,QACT,OAAQ,SACR,GAAI,QACJ,OAAQ,SACR,QAAS,OACT,GAAI,SACJ,OAAQ,SACR,GAAI,sBACJ,KAAM,gBACN,KAAM,OACR,CACF"}
@@ -0,0 +1,40 @@
1
+ //#region src/versionInfo.ts
2
+ var e = {
3
+ buildTime: "2026-07-02T15:11:20Z",
4
+ commit: "68fe2e5993d71398cd8672b1aca03e4eda05a153",
5
+ npmInfo: {
6
+ "solid-panes": "4.4.2-3",
7
+ npm: "10.9.8",
8
+ node: "22.23.1",
9
+ acorn: "8.16.0",
10
+ ada: "2.9.2",
11
+ amaro: "1.1.8",
12
+ ares: "1.34.6",
13
+ brotli: "1.1.0",
14
+ cjs_module_lexer: "2.2.0",
15
+ cldr: "48.0",
16
+ icu: "78.2",
17
+ llhttp: "9.4.2",
18
+ modules: "127",
19
+ napi: "10",
20
+ nbytes: "0.1.3",
21
+ ncrypto: "0.0.1",
22
+ nghttp2: "1.69.0",
23
+ openssl: "3.5.7",
24
+ simdjson: "4.5.0",
25
+ simdutf: "6.4.2",
26
+ sqlite: "3.51.3",
27
+ tz: "2026a",
28
+ undici: "6.27.0",
29
+ unicode: "17.0",
30
+ uv: "1.51.0",
31
+ uvwasi: "0.0.23",
32
+ v8: "12.4.254.21-node.56",
33
+ zlib: "1.3.1-e00f703",
34
+ zstd: "1.5.7"
35
+ }
36
+ };
37
+ //#endregion
38
+ export { e as default };
39
+
40
+ //# sourceMappingURL=versionInfo.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versionInfo.esm.js","names":[],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2026-07-02T15:11:20Z',\n commit: '68fe2e5993d71398cd8672b1aca03e4eda05a153',\n npmInfo: {\n 'solid-panes': '4.4.2-3',\n npm: '10.9.8',\n node: '22.23.1',\n acorn: '8.16.0',\n ada: '2.9.2',\n amaro: '1.1.8',\n ares: '1.34.6',\n brotli: '1.1.0',\n cjs_module_lexer: '2.2.0',\n cldr: '48.0',\n icu: '78.2',\n llhttp: '9.4.2',\n modules: '127',\n napi: '10',\n nbytes: '0.1.3',\n ncrypto: '0.0.1',\n nghttp2: '1.69.0',\n openssl: '3.5.7',\n simdjson: '4.5.0',\n simdutf: '6.4.2',\n sqlite: '3.51.3',\n tz: '2026a',\n undici: '6.27.0',\n unicode: '17.0',\n uv: '1.51.0',\n uvwasi: '0.0.23',\n v8: '12.4.254.21-node.56',\n zlib: '1.3.1-e00f703',\n zstd: '1.5.7',\n }\n}\n"],"mappings":";AAAA,IAAA,IAAe;CACb,WAAW;CACX,QAAQ;CACR,SAAS;EACP,eAAe;EACf,KAAK;EACL,MAAM;EACN,OAAO;EACP,KAAK;EACL,OAAO;EACP,MAAM;EACN,QAAQ;EACR,kBAAkB;EAClB,MAAM;EACN,KAAK;EACL,QAAQ;EACR,SAAS;EACT,MAAM;EACN,QAAQ;EACR,SAAS;EACT,SAAS;EACT,SAAS;EACT,UAAU;EACV,SAAS;EACT,QAAQ;EACR,IAAI;EACJ,QAAQ;EACR,SAAS;EACT,IAAI;EACJ,QAAQ;EACR,IAAI;EACJ,MAAM;EACN,MAAM;CACR;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("../_virtual/_rolldown/runtime.cjs.js");let t=require("solid-ui");t=e.__toESM(t);let n=require("rdflib");n=e.__toESM(n);var r={icon:t.icons.iconBase+`noun_1619.svg`,name:`video`,label:function(e,t){let r=t.session.store.findTypeURIs(e),i=n.Util.mediaTypeClass(`video/*`).uri.split(`*`)[0];for(let e in r)if(e.startsWith(i))return`Play video`;return null},render:function(e,t){let n=t.session.store,r=t.dom,i=r.createElement(`div`),a=i.appendChild(r.createElement(`video`));return a.setAttribute(`controls`,`yes`),n.fetcher._fetch(e.uri).then(function(e){return e.blob()}).then(function(e){let t=URL.createObjectURL(e);a.setAttribute(`src`,t)}),a.setAttribute(`width`,`100%`),i}};exports.default=r;
2
+ //# sourceMappingURL=videoPane.cjs.js.map