solid-panes 3.7.2-f743b265 → 3.7.3-125af630

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 (354) hide show
  1. package/dist/dashboard/basicPreferences.js +155 -0
  2. package/dist/dashboard/basicPreferences.js.map +1 -0
  3. package/dist/dashboard/dashboardPane.js +63 -0
  4. package/dist/dashboard/dashboardPane.js.map +1 -0
  5. package/dist/dashboard/homepage.js +63 -0
  6. package/dist/dashboard/homepage.js.map +1 -0
  7. package/dist/home/homePane.js +68 -0
  8. package/dist/home/homePane.js.map +1 -0
  9. package/dist/index.js +48 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/internal/internalPane.js +195 -0
  12. package/dist/internal/internalPane.js.map +1 -0
  13. package/dist/mainPage/footer.js +16 -0
  14. package/dist/mainPage/footer.js.map +1 -0
  15. package/dist/mainPage/header.js +84 -0
  16. package/dist/mainPage/header.js.map +1 -0
  17. package/{lib → dist}/mainPage/index.d.ts.map +1 -1
  18. package/dist/mainPage/index.js +30 -0
  19. package/dist/mainPage/index.js.map +1 -0
  20. package/dist/outline/context.js +13 -0
  21. package/dist/outline/context.js.map +1 -0
  22. package/dist/outline/propertyViews.js +33 -0
  23. package/dist/outline/propertyViews.js.map +1 -0
  24. package/dist/outline/viewAsImage.js +7 -0
  25. package/dist/outline/viewAsImage.js.map +1 -0
  26. package/{lib → dist}/outline/viewAsMbox.js +4 -14
  27. package/dist/outline/viewAsMbox.js.map +1 -0
  28. package/dist/pad/padPane.js +420 -0
  29. package/dist/pad/padPane.js.map +1 -0
  30. package/dist/sharing/sharingPane.js +45 -0
  31. package/dist/sharing/sharingPane.js.map +1 -0
  32. package/dist/tabbed/tabbedPane.js +55 -0
  33. package/dist/tabbed/tabbedPane.js.map +1 -0
  34. package/dist/trustedApplications/trustedApplications.dom.js +158 -0
  35. package/dist/trustedApplications/trustedApplications.dom.js.map +1 -0
  36. package/dist/trustedApplications/trustedApplications.utils.js +24 -0
  37. package/dist/trustedApplications/trustedApplications.utils.js.map +1 -0
  38. package/dist/trustedApplications/trustedApplications.view.js +62 -0
  39. package/dist/trustedApplications/trustedApplications.view.js.map +1 -0
  40. package/dist/types.js +2 -0
  41. package/dist/types.js.map +1 -0
  42. package/dist/versionInfo.js +31 -0
  43. package/dist/versionInfo.js.map +1 -0
  44. package/package.json +34 -22
  45. package/Documentation/VisualLanguage.html +0 -538
  46. package/Documentation/conventions.md +0 -333
  47. package/coverage/clover.xml +0 -152
  48. package/coverage/coverage-final.json +0 -6
  49. package/coverage/lcov-report/base.css +0 -224
  50. package/coverage/lcov-report/block-navigation.js +0 -87
  51. package/coverage/lcov-report/favicon.png +0 -0
  52. package/coverage/lcov-report/index.html +0 -131
  53. package/coverage/lcov-report/outline/index.html +0 -161
  54. package/coverage/lcov-report/outline/outlineIcons.js.html +0 -565
  55. package/coverage/lcov-report/outline/propertyViews.ts.html +0 -196
  56. package/coverage/lcov-report/outline/viewAsImage.ts.html +0 -121
  57. package/coverage/lcov-report/outline/viewAsMbox.ts.html +0 -127
  58. package/coverage/lcov-report/prettify.css +0 -1
  59. package/coverage/lcov-report/prettify.js +0 -2
  60. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  61. package/coverage/lcov-report/sorter.js +0 -210
  62. package/coverage/lcov-report/trustedApplications/index.html +0 -116
  63. package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +0 -238
  64. package/coverage/lcov.info +0 -204
  65. package/dev/index.html +0 -28
  66. package/dev/loader.ts +0 -91
  67. package/dev/pane/index.ts +0 -10
  68. package/doc/images/panes-for-classes.epgz +0 -0
  69. package/doc/images/panes-for-classes.svg +0 -609
  70. package/eslint.config.mjs +0 -34
  71. package/jest.config.js +0 -27
  72. package/jest.setup.ts +0 -4
  73. package/lib/RDFXMLPane.js +0 -59
  74. package/lib/RDFXMLPane.js.map +0 -1
  75. package/lib/argument/argumentPane.js +0 -62
  76. package/lib/argument/argumentPane.js.map +0 -1
  77. package/lib/attach/attachPane.js +0 -404
  78. package/lib/attach/attachPane.js.map +0 -1
  79. package/lib/audio/audioPane.js +0 -183
  80. package/lib/audio/audioPane.js.map +0 -1
  81. package/lib/classInstancePane.js +0 -93
  82. package/lib/classInstancePane.js.map +0 -1
  83. package/lib/dashboard/basicPreferences.js +0 -229
  84. package/lib/dashboard/basicPreferences.js.map +0 -1
  85. package/lib/dashboard/dashboardPane.js +0 -73
  86. package/lib/dashboard/dashboardPane.js.map +0 -1
  87. package/lib/dashboard/homepage.js +0 -86
  88. package/lib/dashboard/homepage.js.map +0 -1
  89. package/lib/dataContentPane.js +0 -259
  90. package/lib/dataContentPane.js.map +0 -1
  91. package/lib/defaultPane.js +0 -76
  92. package/lib/defaultPane.js.map +0 -1
  93. package/lib/dokieli/dokieliPane.js +0 -173
  94. package/lib/dokieli/dokieliPane.js.map +0 -1
  95. package/lib/dokieli/new.js +0 -9
  96. package/lib/dokieli/new.js.map +0 -1
  97. package/lib/form/pane.js +0 -186
  98. package/lib/form/pane.js.map +0 -1
  99. package/lib/global.d.js +0 -2
  100. package/lib/global.d.js.map +0 -1
  101. package/lib/home/homePane.js +0 -91
  102. package/lib/home/homePane.js.map +0 -1
  103. package/lib/humanReadablePane.js +0 -138
  104. package/lib/humanReadablePane.js.map +0 -1
  105. package/lib/imagePane.js +0 -71
  106. package/lib/imagePane.js.map +0 -1
  107. package/lib/index.js +0 -112
  108. package/lib/index.js.map +0 -1
  109. package/lib/internal/internalPane.js +0 -184
  110. package/lib/internal/internalPane.js.map +0 -1
  111. package/lib/mainPage/footer.js +0 -22
  112. package/lib/mainPage/footer.js.map +0 -1
  113. package/lib/mainPage/header.js +0 -152
  114. package/lib/mainPage/header.js.map +0 -1
  115. package/lib/mainPage/index.js +0 -42
  116. package/lib/mainPage/index.js.map +0 -1
  117. package/lib/microblogPane/microblogPane.js +0 -1032
  118. package/lib/microblogPane/microblogPane.js.map +0 -1
  119. package/lib/n3Pane.js +0 -57
  120. package/lib/n3Pane.js.map +0 -1
  121. package/lib/outline/context.js +0 -19
  122. package/lib/outline/context.js.map +0 -1
  123. package/lib/outline/manager.js +0 -2264
  124. package/lib/outline/manager.js.map +0 -1
  125. package/lib/outline/manager.test.d.ts +0 -2
  126. package/lib/outline/manager.test.d.ts.map +0 -1
  127. package/lib/outline/manager.test.js +0 -210
  128. package/lib/outline/manager.test.js.map +0 -1
  129. package/lib/outline/outlineIcons.js +0 -128
  130. package/lib/outline/outlineIcons.js.map +0 -1
  131. package/lib/outline/propertyViews.js +0 -44
  132. package/lib/outline/propertyViews.js.map +0 -1
  133. package/lib/outline/propertyViews.test.d.ts +0 -2
  134. package/lib/outline/propertyViews.test.d.ts.map +0 -1
  135. package/lib/outline/propertyViews.test.js +0 -27
  136. package/lib/outline/propertyViews.test.js.map +0 -1
  137. package/lib/outline/queryByExample.js +0 -286
  138. package/lib/outline/queryByExample.js.map +0 -1
  139. package/lib/outline/userInput.js +0 -1817
  140. package/lib/outline/userInput.js.map +0 -1
  141. package/lib/outline/viewAsImage.js +0 -17
  142. package/lib/outline/viewAsImage.js.map +0 -1
  143. package/lib/outline/viewAsMbox.js.map +0 -1
  144. package/lib/pad/padPane.js +0 -417
  145. package/lib/pad/padPane.js.map +0 -1
  146. package/lib/playlist/playlistPane.js +0 -125
  147. package/lib/playlist/playlistPane.js.map +0 -1
  148. package/lib/registerPanes.js +0 -146
  149. package/lib/registerPanes.js.map +0 -1
  150. package/lib/schedule/formsForSchedule.js +0 -8
  151. package/lib/schedule/formsForSchedule.js.map +0 -1
  152. package/lib/schedule/schedulePane.js +0 -895
  153. package/lib/schedule/schedulePane.js.map +0 -1
  154. package/lib/sharing/sharingPane.js +0 -49
  155. package/lib/sharing/sharingPane.js.map +0 -1
  156. package/lib/slideshow/slideshowPane.js +0 -84
  157. package/lib/slideshow/slideshowPane.js.map +0 -1
  158. package/lib/socialPane.js +0 -431
  159. package/lib/socialPane.js.map +0 -1
  160. package/lib/tabbed/tabbedPane.js +0 -72
  161. package/lib/tabbed/tabbedPane.js.map +0 -1
  162. package/lib/tableViewPane.js +0 -58
  163. package/lib/tableViewPane.js.map +0 -1
  164. package/lib/test-import-export/common.js +0 -12
  165. package/lib/test-import-export/common.js.map +0 -1
  166. package/lib/test-import-export/edit-importer.js +0 -25
  167. package/lib/test-import-export/edit-importer.js.map +0 -1
  168. package/lib/test-import-export/testImportExport.js +0 -2
  169. package/lib/test-import-export/testImportExport.js.map +0 -1
  170. package/lib/transaction/pane.js +0 -479
  171. package/lib/transaction/pane.js.map +0 -1
  172. package/lib/transaction/period.js +0 -325
  173. package/lib/transaction/period.js.map +0 -1
  174. package/lib/trip/tripPane.js +0 -176
  175. package/lib/trip/tripPane.js.map +0 -1
  176. package/lib/trustedApplications/trustedApplications.dom.js +0 -177
  177. package/lib/trustedApplications/trustedApplications.dom.js.map +0 -1
  178. package/lib/trustedApplications/trustedApplications.test.d.ts +0 -2
  179. package/lib/trustedApplications/trustedApplications.test.d.ts.map +0 -1
  180. package/lib/trustedApplications/trustedApplications.test.js +0 -64
  181. package/lib/trustedApplications/trustedApplications.test.js.map +0 -1
  182. package/lib/trustedApplications/trustedApplications.utils.js +0 -34
  183. package/lib/trustedApplications/trustedApplications.utils.js.map +0 -1
  184. package/lib/trustedApplications/trustedApplications.view.js +0 -87
  185. package/lib/trustedApplications/trustedApplications.view.js.map +0 -1
  186. package/lib/types.js +0 -6
  187. package/lib/types.js.map +0 -1
  188. package/lib/ui/pane.js +0 -148
  189. package/lib/ui/pane.js.map +0 -1
  190. package/lib/versionInfo.d.ts +0 -34
  191. package/lib/versionInfo.d.ts.map +0 -1
  192. package/lib/versionInfo.js +0 -39
  193. package/lib/versionInfo.js.map +0 -1
  194. package/lib/video/videoPane.js +0 -44
  195. package/lib/video/videoPane.js.map +0 -1
  196. package/src/RDFXMLPane.js +0 -60
  197. package/src/argument/argumentPane.js +0 -65
  198. package/src/argument/argument_icon_v04.jpg +0 -0
  199. package/src/argument/icon_argument.png +0 -0
  200. package/src/argument/transparentyingyang.png +0 -0
  201. package/src/attach/attachPane.js +0 -508
  202. package/src/attach/tbl-paperclip-128.png +0 -0
  203. package/src/attach/tbl-paperclip-22.png +0 -0
  204. package/src/attach/tbl-paperclip-22a.png +0 -0
  205. package/src/audio/audioPane.js +0 -197
  206. package/src/chatPreferencesForm.ttl +0 -12
  207. package/src/classInstancePane.js +0 -110
  208. package/src/dashboard/basicPreferences.ts +0 -201
  209. package/src/dashboard/dashboardPane.ts +0 -83
  210. package/src/dashboard/homepage.ts +0 -72
  211. package/src/dashboard/languages/codes.html +0 -8611
  212. package/src/dashboard/languages/codes.xml +0 -3563
  213. package/src/dashboard/languages/codes2.txt +0 -170
  214. package/src/dashboard/languages/foo +0 -70
  215. package/src/dashboard/languages/foo.ttl +0 -0
  216. package/src/dashboard/languages/get-language-names.sh +0 -12
  217. package/src/dashboard/ontologyData.ttl +0 -35
  218. package/src/dashboard/preferencesFormText.ttl +0 -18
  219. package/src/dataContentPane.js +0 -290
  220. package/src/defaultPane.js +0 -102
  221. package/src/dokieli/Makefile +0 -6
  222. package/src/dokieli/dokieliPane.js +0 -190
  223. package/src/dokieli/new.html +0 -30
  224. package/src/dokieli/new.js +0 -22
  225. package/src/form/form-22.png +0 -0
  226. package/src/form/form-b-22.png +0 -0
  227. package/src/form/form.graffle +0 -0
  228. package/src/form/form.png +0 -0
  229. package/src/form/pane.js +0 -217
  230. package/src/form/psuedocode-notes.txt +0 -57
  231. package/src/global.d.ts +0 -4
  232. package/src/home/homePane.ts +0 -72
  233. package/src/humanReadablePane.js +0 -150
  234. package/src/imagePane.js +0 -75
  235. package/src/index.ts +0 -71
  236. package/src/internal/internalPane.ts +0 -263
  237. package/src/mainPage/footer.ts +0 -19
  238. package/src/mainPage/header.ts +0 -79
  239. package/src/mainPage/index.ts +0 -20
  240. package/src/meeting/Makefile +0 -3
  241. package/src/meeting/test/meeting1/Actions/actions.ttl +0 -14
  242. package/src/meeting/test/meeting1/Actions/config.ttl +0 -16
  243. package/src/meeting/test/meeting1/Actions/state.ttl +0 -30
  244. package/src/meeting/test/meeting1/Schedule/details.ttl +0 -34
  245. package/src/meeting/test/meeting1/Schedule/details.ttl.acl +0 -20
  246. package/src/meeting/test/meeting1/Schedule/forms.ttl +0 -75
  247. package/src/meeting/test/meeting1/Schedule/forms.ttl.acl +0 -20
  248. package/src/meeting/test/meeting1/Schedule/index.html +0 -72
  249. package/src/meeting/test/meeting1/Schedule/index.html.acl +0 -20
  250. package/src/meeting/test/meeting1/Schedule/results.ttl +0 -15
  251. package/src/meeting/test/meeting1/Schedule/results.ttl.acl +0 -20
  252. package/src/meeting/test/meeting1/SharedNotes/pad.ttl +0 -23
  253. package/src/meeting/test/meeting1/chat/chat.ttl +0 -1
  254. package/src/meeting/test/meeting1/details.ttl +0 -35
  255. package/src/meeting/test/meeting1/pad/pad.ttl +0 -16
  256. package/src/microblogPane/mbStyle.css +0 -267
  257. package/src/microblogPane/microblogPane.js +0 -1412
  258. package/src/n3Pane.js +0 -56
  259. package/src/outline/context.ts +0 -21
  260. package/src/outline/manager.js +0 -2384
  261. package/src/outline/manager.test.ts +0 -189
  262. package/src/outline/outlineIcons.js +0 -160
  263. package/src/outline/propertyViews.test.ts +0 -36
  264. package/src/outline/propertyViews.ts +0 -37
  265. package/src/outline/queryByExample.js +0 -296
  266. package/src/outline/userInput.js +0 -2373
  267. package/src/outline/viewAsImage.ts +0 -12
  268. package/src/outline/viewAsMbox.ts +0 -14
  269. package/src/pad/images/ColourOff.ai +2 -872
  270. package/src/pad/images/ColourOff.png +0 -0
  271. package/src/pad/images/ColourOn.ai +1 -935
  272. package/src/pad/images/ColourOn.png +0 -0
  273. package/src/pad/padPane.ts +0 -559
  274. package/src/playlist/playlistPane.js +0 -161
  275. package/src/registerPanes.js +0 -147
  276. package/src/schedule/Makefile +0 -6
  277. package/src/schedule/formsForSchedule.js +0 -117
  278. package/src/schedule/formsForSchedule.ttl +0 -115
  279. package/src/schedule/schedulePane.js +0 -1201
  280. package/src/sharing/sharingPane.ts +0 -49
  281. package/src/slideshow/slideshowPane.js +0 -80
  282. package/src/socialPane.js +0 -523
  283. package/src/style/tabbedtab.css +0 -1347
  284. package/src/tabbed/tabbedPane.ts +0 -60
  285. package/src/tableViewPane.js +0 -51
  286. package/src/test-import-export/common.js +0 -6
  287. package/src/test-import-export/edit-importer.js +0 -20
  288. package/src/test-import-export/testImportExport.js +0 -0
  289. package/src/transaction/068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
  290. package/src/transaction/075988-3d-transparent-glass-icon-business-currency-british-pound-sc35.png +0 -0
  291. package/src/transaction/22-pixel-068010-3d-transparent-glass-icon-alphanumeric-dollar-sign.png +0 -0
  292. package/src/transaction/pane.js +0 -629
  293. package/src/transaction/period.js +0 -374
  294. package/src/transaction/thumbs_075987-3d-transparent-glass-icon-business-creditcard2.png +0 -0
  295. package/src/transaction/thumbs_075989-3d-transparent-glass-icon-business-currency-cent-sc35.png +0 -0
  296. package/src/trip/tripPane.js +0 -176
  297. package/src/trustedApplications/__snapshots__/trustedApplications.test.ts.snap +0 -176
  298. package/src/trustedApplications/trustedApplications.dom.ts +0 -276
  299. package/src/trustedApplications/trustedApplications.test.ts +0 -82
  300. package/src/trustedApplications/trustedApplications.utils.ts +0 -51
  301. package/src/trustedApplications/trustedApplications.view.ts +0 -80
  302. package/src/types.ts +0 -34
  303. package/src/ui/22-builder.png +0 -0
  304. package/src/ui/builder.graffle +0 -0
  305. package/src/ui/builder.png +0 -0
  306. package/src/ui/builder2.png +0 -0
  307. package/src/ui/pane.js +0 -226
  308. package/src/versionInfo.ts +0 -32
  309. package/src/video/videoPane.js +0 -44
  310. package/timestamp.sh +0 -13
  311. package/travis/bumpversion.js +0 -29
  312. package/tsconfig.json +0 -78
  313. package/typings/raw-loader.d.ts +0 -4
  314. package/typings/solid-namespace/index.d.ts +0 -9
  315. package/webpack.config.js +0 -41
  316. /package/{lib → dist}/dashboard/basicPreferences.d.ts +0 -0
  317. /package/{lib → dist}/dashboard/basicPreferences.d.ts.map +0 -0
  318. /package/{lib → dist}/dashboard/dashboardPane.d.ts +0 -0
  319. /package/{lib → dist}/dashboard/dashboardPane.d.ts.map +0 -0
  320. /package/{lib → dist}/dashboard/homepage.d.ts +0 -0
  321. /package/{lib → dist}/dashboard/homepage.d.ts.map +0 -0
  322. /package/{lib → dist}/home/homePane.d.ts +0 -0
  323. /package/{lib → dist}/home/homePane.d.ts.map +0 -0
  324. /package/{lib → dist}/index.d.ts +0 -0
  325. /package/{lib → dist}/index.d.ts.map +0 -0
  326. /package/{lib → dist}/internal/internalPane.d.ts +0 -0
  327. /package/{lib → dist}/internal/internalPane.d.ts.map +0 -0
  328. /package/{lib → dist}/mainPage/footer.d.ts +0 -0
  329. /package/{lib → dist}/mainPage/footer.d.ts.map +0 -0
  330. /package/{lib → dist}/mainPage/header.d.ts +0 -0
  331. /package/{lib → dist}/mainPage/header.d.ts.map +0 -0
  332. /package/{lib → dist}/mainPage/index.d.ts +0 -0
  333. /package/{lib → dist}/outline/context.d.ts +0 -0
  334. /package/{lib → dist}/outline/context.d.ts.map +0 -0
  335. /package/{lib → dist}/outline/propertyViews.d.ts +0 -0
  336. /package/{lib → dist}/outline/propertyViews.d.ts.map +0 -0
  337. /package/{lib → dist}/outline/viewAsImage.d.ts +0 -0
  338. /package/{lib → dist}/outline/viewAsImage.d.ts.map +0 -0
  339. /package/{lib → dist}/outline/viewAsMbox.d.ts +0 -0
  340. /package/{lib → dist}/outline/viewAsMbox.d.ts.map +0 -0
  341. /package/{lib → dist}/pad/padPane.d.ts +0 -0
  342. /package/{lib → dist}/pad/padPane.d.ts.map +0 -0
  343. /package/{lib → dist}/sharing/sharingPane.d.ts +0 -0
  344. /package/{lib → dist}/sharing/sharingPane.d.ts.map +0 -0
  345. /package/{lib → dist}/tabbed/tabbedPane.d.ts +0 -0
  346. /package/{lib → dist}/tabbed/tabbedPane.d.ts.map +0 -0
  347. /package/{lib → dist}/trustedApplications/trustedApplications.dom.d.ts +0 -0
  348. /package/{lib → dist}/trustedApplications/trustedApplications.dom.d.ts.map +0 -0
  349. /package/{lib → dist}/trustedApplications/trustedApplications.utils.d.ts +0 -0
  350. /package/{lib → dist}/trustedApplications/trustedApplications.utils.d.ts.map +0 -0
  351. /package/{lib → dist}/trustedApplications/trustedApplications.view.d.ts +0 -0
  352. /package/{lib → dist}/trustedApplications/trustedApplications.view.d.ts.map +0 -0
  353. /package/{lib → dist}/types.d.ts +0 -0
  354. /package/{lib → dist}/types.d.ts.map +0 -0
@@ -1,72 +0,0 @@
1
- /* Home Pane
2
- **
3
- ** The home pane is avaiable everywhere and allows a user
4
- ** to
5
- ** - keep track of their stuff
6
- ** - make new things, and possibly
7
- ** - keep track of accounts and workspaces etc
8
- **
9
- */
10
-
11
- import { PaneDefinition } from 'pane-registry'
12
- import { NamedNode } from 'rdflib'
13
- import { authn } from 'solid-logic'
14
- import { create, icons, login } from 'solid-ui'
15
- import { CreateContext } from 'solid-ui/lib/create/types'
16
-
17
- const HomePaneSource: PaneDefinition = {
18
- icon: icons.iconBase + 'noun_547570.svg', // noun_25830
19
-
20
- global: true,
21
-
22
- name: 'home',
23
-
24
- // Does the subject deserve an home pane?
25
- //
26
- // yes, always!
27
- //
28
- label: function () {
29
- return 'home'
30
- },
31
-
32
- render: function (subject, context) {
33
- const dom = context.dom
34
- const showContent = async function () {
35
- const homePaneContext = { div: div, dom: dom, statusArea: div, me: me }
36
- /*
37
- div.appendChild(dom.createElement('h4')).textContent = 'Login status'
38
- var loginStatusDiv = div.appendChild(context.dom.createElement('div'))
39
- // TODO: Find out what the actual type is:
40
- type UriType = unknown;
41
- loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {
42
- // Here we know new log in status
43
- }))
44
- */
45
- div.appendChild(dom.createElement('h4')).textContent =
46
- 'Create new thing somewhere'
47
- const creationDiv = div.appendChild(dom.createElement('div'))
48
- const creationContext: CreateContext = {
49
- div: creationDiv,
50
- dom: dom,
51
- statusArea: div,
52
- me: me
53
- }
54
- const relevantPanes = await login.filterAvailablePanes(
55
- context.session.paneRegistry.list
56
- )
57
- create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down
58
-
59
- login.registrationList(homePaneContext, {}).then(function () {})
60
- }
61
-
62
- const div = dom.createElement('div')
63
- const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in
64
-
65
- showContent()
66
-
67
- return div
68
- }
69
- } // pane object
70
-
71
- // ends
72
- export default HomePaneSource
@@ -1,150 +0,0 @@
1
- /* Human-readable Pane
2
- **
3
- ** This outline pane contains the document contents for an HTML document
4
- ** This is for peeking at a page, because the user might not want to leave the data browser.
5
- */
6
- import { icons, ns } from 'solid-ui'
7
- import { Util } from 'rdflib'
8
- import { marked } from 'marked'
9
- import DOMPurify from 'dompurify';
10
-
11
- const humanReadablePane = {
12
- icon: icons.originalIconBase + 'tango/22-text-x-generic.png',
13
-
14
- name: 'humanReadable',
15
-
16
- label: function (subject, context) {
17
- const kb = context.session.store
18
-
19
- // See also the source pane, which has lower precedence.
20
-
21
- const allowed = [
22
- 'text/plain',
23
- 'text/html',
24
- 'text/markdown',
25
- 'application/xhtml+xml',
26
- 'image/png',
27
- 'image/jpeg',
28
- 'application/pdf',
29
- 'video/mp4'
30
- ]
31
-
32
- const hasContentTypeIn = function (kb, x, displayables) {
33
- const cts = kb.fetcher.getHeader(x, 'content-type')
34
- if (cts) {
35
- for (let j = 0; j < cts.length; j++) {
36
- for (let k = 0; k < displayables.length; k++) {
37
- if (cts[j].indexOf(displayables[k]) >= 0) {
38
- return true
39
- }
40
- }
41
- }
42
- }
43
- return false
44
- }
45
-
46
- // This data could come from a fetch OR from ldp container
47
- const hasContentTypeIn2 = function (kb, x, displayables) {
48
- const t = kb.findTypeURIs(x)
49
- for (let k = 0; k < displayables.length; k++) {
50
- if (Util.mediaTypeClass(displayables[k]).uri in t) {
51
- return true
52
- }
53
- }
54
- return false
55
- }
56
-
57
- if (!subject.uri) return null // no bnodes
58
-
59
- const t = kb.findTypeURIs(subject)
60
- if (t[ns.link('WebPage').uri]) return 'view'
61
-
62
- if (
63
- hasContentTypeIn(kb, subject, allowed) ||
64
- hasContentTypeIn2(kb, subject, allowed)
65
- ) {
66
- return 'View'
67
- }
68
-
69
- return null
70
- },
71
-
72
- render: function (subject, context) {
73
- const myDocument = context.dom
74
- const div = myDocument.createElement('div')
75
- const kb = context.session.store
76
-
77
- const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')
78
- const ct = cts ? cts[0].split(';', 1)[0].trim() : null // remove content-type parameters
79
- if (ct) {
80
- // console.log('humanReadablePane: c-t:' + ct)
81
- } else {
82
- console.log('humanReadablePane: unknown content-type?')
83
- }
84
-
85
- // @@ When we can, use CSP to turn off scripts within the iframe
86
- div.setAttribute('class', 'docView')
87
- const element = ct === 'text/markdown' ? 'DIV' : 'IFRAME'
88
- const frame = myDocument.createElement(element)
89
-
90
- const setIframeAttributes = (frame, blob, lines) => {
91
- frame.setAttribute('src', URL.createObjectURL(blob));
92
- frame.setAttribute('type', blob.type);
93
- frame.setAttribute('class', 'doc');
94
- frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`);
95
-
96
- // Apply sandbox attribute only for HTML files
97
- // @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.
98
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
99
- // You can't have any sandbox and allow plugins.
100
- // We could sandbox only HTML files I suppose.
101
- if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') {
102
- frame.setAttribute('sandbox', 'allow-scripts allow-same-origin');
103
- }
104
- };
105
-
106
- // render markdown to html
107
- const markdownHtml = function () {
108
- kb.fetcher.webOperation('GET', subject.uri).then(response => {
109
- const markdownText = response.responseText
110
- const lines = Math.min(30, markdownText.split(/\n/).length + 5)
111
- const res = marked.parse(markdownText)
112
- const clean = DOMPurify.sanitize(res)
113
- frame.innerHTML = clean
114
- frame.setAttribute('class', 'doc')
115
- frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`)
116
- }).catch(error => {
117
- console.error('Error fetching markdown content:', error)
118
- frame.innerHTML = '<p>Error loading content</p>'
119
- })
120
- }
121
-
122
- if (ct === 'text/markdown') {
123
- markdownHtml()
124
- } else {
125
- // Fetch and process the blob
126
- kb.fetcher._fetch(subject.uri)
127
- .then(response => response.blob())
128
- .then(blob => {
129
- const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve('')
130
- return blobTextPromise.then(blobText => ({ blob, blobText }))
131
- })
132
- .then(({ blob, blobText }) => {
133
- const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5
134
- const lines = Math.min(30, blobText.split(/\n/).length + newLines)
135
- setIframeAttributes(frame, blob, lines)
136
- })
137
- .catch(err => {
138
- console.log('Error fetching or processing blob:', err)
139
- })
140
- }
141
-
142
- const tr = myDocument.createElement('TR')
143
- tr.appendChild(frame)
144
- div.appendChild(tr)
145
- return div
146
- }
147
- }
148
-
149
- export default humanReadablePane
150
- // ends
package/src/imagePane.js DELETED
@@ -1,75 +0,0 @@
1
- /* Image Pane
2
- **
3
- ** This outline pane contains the document contents for an Image document
4
- */
5
- import * as UI from 'solid-ui'
6
-
7
- export const imagePane = {
8
- icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png',
9
-
10
- name: 'image',
11
-
12
- label: function (subject, context) {
13
- const store = context.session.store
14
- if (
15
- !store.anyStatementMatching(
16
- subject,
17
- UI.ns.rdf('type'),
18
- store.sym('http://purl.org/dc/terms/Image')
19
- )
20
- ) {
21
- // NB: Not dc: namespace!
22
- return null
23
- }
24
-
25
- // See also the source pane, which has lower precedence.
26
-
27
- const contentTypeMatch = function (store, x, contentTypes) {
28
- const cts = store.fetcher.getHeader(x, 'content-type')
29
- if (cts) {
30
- for (let j = 0; j < cts.length; j++) {
31
- for (let k = 0; k < contentTypes.length; k++) {
32
- if (cts[j].indexOf(contentTypes[k]) >= 0) {
33
- return true
34
- }
35
- }
36
- }
37
- }
38
- return false
39
- }
40
-
41
- const suppressed = ['application/pdf']
42
- if (contentTypeMatch(store, subject, suppressed)) {
43
- return null
44
- }
45
- return 'view'
46
- },
47
-
48
- render: function (subject, context) {
49
- const myDocument = context.dom
50
- const store = context.session.store
51
- const div = myDocument.createElement('div')
52
- div.setAttribute('class', 'imageView')
53
- const img = myDocument.createElement('IMG')
54
-
55
- // get image with authenticated fetch
56
- store.fetcher._fetch(subject.uri)
57
- .then(function(response) {
58
- return response.blob()
59
- })
60
- .then(function(myBlob) {
61
- const objectURL = URL.createObjectURL(myBlob)
62
- img.setAttribute('src', objectURL) // w640 h480 //
63
- })
64
-
65
- img.setAttribute('style', 'max-width: 100%; max-height: 100%;')
66
- // div.style['max-width'] = '640'
67
- // div.style['max-height'] = '480'
68
- const tr = myDocument.createElement('TR') // why need tr?
69
- tr.appendChild(img)
70
- div.appendChild(tr)
71
- return div
72
- }
73
- }
74
-
75
- // ends
package/src/index.ts DELETED
@@ -1,71 +0,0 @@
1
- /* SOLID PANES
2
- **
3
- ** Panes are regions of the outline view in which a particular subject is
4
- ** displayed in a particular way.
5
- ** Different panes about the same subject are typically stacked vertically.
6
- ** Panes may be used naked or with a pane selection header.
7
- **
8
- ** The label() method has two functions: it determines whether the pane is
9
- ** relevant to a given subject, returning null if not.
10
- ** If it is relevant, then it returns a suitable tooltip for a control which selects the pane
11
- */
12
-
13
- import versionInfo from './versionInfo'
14
- import * as UI from 'solid-ui'
15
- import { LiveStore } from 'rdflib'
16
- import { solidLogicSingleton, store } from 'solid-logic'
17
- import OutlineManager from './outline/manager.js'
18
- import { registerPanes } from './registerPanes.js'
19
- import {
20
- list,
21
- paneForIcon,
22
- paneForPredicate,
23
- register,
24
- byName
25
- } from 'pane-registry'
26
- import { createContext } from './outline/context'
27
- import initMainPage from './mainPage'
28
-
29
- function getOutliner (dom) {
30
- if (!dom.outlineManager) {
31
- const context = createContext(
32
- dom,
33
- { list, paneForIcon, paneForPredicate, register, byName },
34
- store as LiveStore,
35
- solidLogicSingleton
36
- )
37
- dom.outlineManager = new OutlineManager(context)
38
- }
39
- return dom.outlineManager
40
- }
41
-
42
- if (typeof window !== 'undefined') {
43
- getOutliner(window.document)
44
- }
45
-
46
- registerPanes((cjsOrEsModule: any) => register(cjsOrEsModule.default || cjsOrEsModule))
47
-
48
- // This has common outline mode functionality for the default and other other panes
49
- // A separate outline manager is required per DOM in cases like a browser extension
50
- // where there are many occurrences of window and of window.document
51
- // But each DOM should have just one outline manager.
52
-
53
- export {
54
- OutlineManager,
55
- getOutliner,
56
- UI,
57
- versionInfo,
58
- initMainPage,
59
- list, // from paneRegistry
60
- paneForIcon, // from paneRegistry
61
- paneForPredicate, // from paneRegistry
62
- register, // from paneRegistry
63
- byName // from paneRegistry
64
- }
65
-
66
- // export for simpler access by non-node scripts
67
- if (typeof window !== 'undefined') {
68
- ;(<any>window).panes = {
69
- getOutliner
70
- }
71
- }
@@ -1,263 +0,0 @@
1
- /* Internal Pane
2
- **
3
- ** This outline pane contains the properties which are
4
- ** internal to the user's interaction with the web, and are not normally displayed
5
- */
6
- /* global alert confirm */
7
-
8
- import { icons, ns, widgets } from 'solid-ui'
9
- import { BlankNode, IndexedFormula, literal, NamedNode, st, sym, Variable, Store } from 'rdflib'
10
- import { PaneDefinition } from 'pane-registry'
11
-
12
- const pane: PaneDefinition = {
13
- icon: icons.originalIconBase + 'tango/22-emblem-system.png',
14
-
15
- name: 'internal',
16
-
17
- label: function () {
18
- return 'under the hood' // There is often a URI even of no statements
19
- },
20
-
21
- render: function (subject, context) {
22
- const dom = context.dom
23
- const store = context.session.store as Store
24
- const canonizedSubject = store.canon(subject) as BlankNode | NamedNode | Variable
25
- const types = store.findTypeURIs(canonizedSubject)
26
-
27
- function filter (pred: NamedNode) {
28
- if (types['http://www.w3.org/2007/ont/link#ProtocolEvent']) return true // display everything for them
29
- const view = context.session.paneRegistry.byName('internal')
30
- return (
31
- view &&
32
- view.predicates &&
33
- !!(typeof view.predicates[pred.uri] !== 'undefined')
34
- )
35
- }
36
-
37
- const div = dom.createElement('div')
38
- div.setAttribute('class', 'internalPane')
39
- div.setAttribute(
40
- 'style',
41
- 'background-color: #ddddff; padding: 0.5em; border-radius: 1em;'
42
- )
43
-
44
- function deleteRecursive (kb: IndexedFormula, folder: NamedNode) {
45
- const fetcher = (kb as any).fetcher
46
- if (!fetcher) {
47
- console.error('No fetcher available')
48
- return
49
- }
50
- return new Promise(function (resolve, reject) {
51
- fetcher.load(folder).then(function () {
52
- const promises = kb.each(folder, ns.ldp('contains')).map(file => {
53
- if (kb.holds(file, ns.rdf('type'), ns.ldp('BasicContainer'))) {
54
- return deleteRecursive(kb, file as NamedNode)
55
- } else {
56
- console.log('deleteRecursive leaf file: ' + file)
57
- return fetcher.webOperation('DELETE', (file as NamedNode).uri)
58
- }
59
- })
60
- Promise.all(promises).then(
61
- () => {
62
- console.log('deleteRecursive empty folder: ' + folder)
63
- fetcher
64
- .webOperation('DELETE', folder.uri)
65
- .then(() => {
66
- console.log('Deleted Ok: ' + folder)
67
- resolve(undefined)
68
- })
69
- .catch((err: string) => {
70
- const str = 'Unable to delete ' + folder + ': ' + err
71
- console.log(str)
72
- reject(new Error(str))
73
- })
74
- resolve(undefined)
75
- },
76
- err => {
77
- alert(err)
78
- reject(err)
79
- }
80
- )
81
- })
82
- })
83
- }
84
-
85
- const isDocument = subject.uri && !subject.uri.includes('#')
86
- if (isDocument) {
87
- const controls = div.appendChild(dom.createElement('table'))
88
- controls.style.width = '100%'
89
- controls.style.margin = '1em'
90
- const controlRow = controls.appendChild(dom.createElement('tr'))
91
-
92
- const deleteCell = controlRow.appendChild(dom.createElement('td'))
93
- const isFolder =
94
- (subject.uri && subject.uri.endsWith('/')) ||
95
- store.holds(subject, ns.rdf('type'), ns.ldp('Container'))
96
- const noun = isFolder ? 'folder' : 'file'
97
- if (!isProtectedUri(subject)) {
98
- console.log(subject)
99
- const deleteButton = widgets.deleteButtonWithCheck(
100
- dom,
101
- deleteCell,
102
- noun,
103
- function () {
104
- if (
105
- !confirm(
106
- `Are you sure you want to delete ${subject}? This cannot be undone.`
107
- )
108
- ) {
109
- return
110
- }
111
- // @@ TODO Remove casing of store.fetcher
112
- if (!store.fetcher) {
113
- throw new Error('Store has no fetcher')
114
- }
115
- const promise = isFolder
116
- ? (deleteRecursive(store, subject) || Promise.resolve())
117
- : store.fetcher.webOperation('DELETE', subject.uri) || Promise.resolve()
118
- promise
119
- .then(() => {
120
- const str = 'Deleted: ' + subject
121
- console.log(str)
122
- })
123
- .catch((err: any) => {
124
- const str = 'Unable to delete ' + subject + ': ' + err
125
- console.log(str)
126
- alert(str)
127
- })
128
- }
129
- )
130
- deleteButton.style = 'height: 2em;'
131
- deleteButton.class = '' // Remove hover hide
132
- deleteCell.appendChild(deleteButton)
133
- }
134
-
135
- const refreshCell = controlRow.appendChild(dom.createElement('td'))
136
- const refreshButton = widgets.button(
137
- dom,
138
- icons.iconBase + 'noun_479395.svg',
139
- 'refresh'
140
- )
141
- refreshCell.appendChild(refreshButton)
142
- refreshButton.addEventListener('click', () => {
143
- if (!store.fetcher) {
144
- throw new Error('Store has no fetcher')
145
- }
146
- store.fetcher.refresh(subject, function (
147
- ok,
148
- errm
149
- ) {
150
- let str
151
- if (ok) {
152
- str = 'Refreshed OK: ' + subject
153
- } else {
154
- str = 'Error refreshing: ' + subject + ': ' + errm
155
- }
156
- console.log(str)
157
- alert(str)
158
- })
159
- })
160
- }
161
-
162
- let plist = store.statementsMatching(subject)
163
- let docURI = ''
164
- if (!store.fetcher) {
165
- throw new Error('Store has no fetcher')
166
- }
167
-
168
- if (subject.uri) {
169
- plist.push(
170
- st(
171
- subject,
172
- sym('http://www.w3.org/2007/ont/link#uri'),
173
- subject.uri as any, // @@ TODO Remove casting
174
- store.fetcher.appNode
175
- )
176
- )
177
- if (subject.uri.indexOf('#') >= 0) {
178
- docURI = subject.uri.split('#')[0]
179
- plist.push(
180
- st(
181
- subject,
182
- sym('http://www.w3.org/2007/ont/link#documentURI'),
183
- subject.uri.split('#')[0] as any, // @@ TODO Remove casting
184
- store.fetcher.appNode
185
- )
186
- )
187
- plist.push(
188
- st(
189
- subject,
190
- sym('http://www.w3.org/2007/ont/link#document'),
191
- sym(subject.uri.split('#')[0]),
192
- store.fetcher.appNode
193
- )
194
- )
195
- } else {
196
- docURI = subject.uri
197
- }
198
- }
199
- if (docURI) {
200
- if (!store.updater) {
201
- throw new Error('Store has no updater')
202
- }
203
-
204
- const ed = store.updater.editable(docURI)
205
- if (ed) {
206
- plist.push(
207
- st(
208
- subject,
209
- sym('http://www.w3.org/ns/rww#editable'),
210
- literal(ed.toString()),
211
- store.fetcher.appNode
212
- )
213
- )
214
- }
215
- }
216
- // @@ TODO get a proper type
217
- const outliner: any = context.getOutliner(dom)
218
- outliner.appendPropertyTRs(div, plist, false, filter)
219
- plist = store.statementsMatching(undefined, undefined, subject)
220
- outliner.appendPropertyTRs(div, plist, true, filter)
221
- return div
222
- },
223
-
224
- predicates: {
225
- // Predicates used for inner workings. Under the hood
226
- 'http://www.w3.org/2007/ont/link#request': 1,
227
- 'http://www.w3.org/2007/ont/link#requestedBy': 1,
228
- 'http://www.w3.org/2007/ont/link#source': 1,
229
- 'http://www.w3.org/2007/ont/link#session': 2, // 2= test neg but display
230
- 'http://www.w3.org/2007/ont/link#uri': 1,
231
- 'http://www.w3.org/2007/ont/link#documentURI': 1,
232
- 'http://www.w3.org/2007/ont/link#document': 1,
233
- 'http://www.w3.org/2007/ont/link#all': 1, // From userinput.js
234
- 'http://www.w3.org/2007/ont/link#Document': 1,
235
- 'http://www.w3.org/ns/rww#editable': 1,
236
- 'http://www.w3.org/2000/01/rdf-schema#seeAlso': 1,
237
- 'http://www.w3.org/2002/07/owl#': 1
238
- },
239
-
240
- classes: {
241
- // Things which are inherently already undercover
242
- 'http://www.w3.org/2007/ont/link#ProtocolEvent': 1
243
- }
244
- }
245
-
246
- function isProtectedUri (subject: NamedNode): boolean {
247
- // TODO: Could make the code below smarter by removing some of the redundancy by creating a recursive function, but did not bother now
248
- const siteUri = subject.site().uri
249
- return (
250
- subject.uri === siteUri ||
251
- subject.uri === siteUri + 'profile/' ||
252
- subject.uri === siteUri + 'profile/card' ||
253
- subject.uri === siteUri + 'settings/' ||
254
- subject.uri === siteUri + 'settings/prefs.ttl' ||
255
- subject.uri === siteUri + 'settings/privateTypeIndex.ttl' ||
256
- subject.uri === siteUri + 'settings/publicTypeIndex.ttl' ||
257
- subject.uri === siteUri + 'settings/serverSide.ttl'
258
- )
259
- }
260
-
261
- export default pane
262
-
263
- // ends
@@ -1,19 +0,0 @@
1
- import { LiveStore } from 'rdflib'
2
- import { initFooter } from 'solid-ui'
3
-
4
- /**
5
- * links in the footer
6
- */
7
- const SOLID_PROJECT_URL = 'https://solidproject.org'
8
- const SOLID_PROJECT_NAME = 'solidproject.org'
9
-
10
- export function createFooter (store: LiveStore) {
11
- initFooter(store, setFooterOptions())
12
- }
13
-
14
- function setFooterOptions () {
15
- return {
16
- solidProjectUrl: SOLID_PROJECT_URL,
17
- solidProjectName: SOLID_PROJECT_NAME
18
- }
19
- }