solid-panes 4.5.1 → 5.0.0-0

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 (534) hide show
  1. package/README.md +10 -40
  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/arrow-left.cjs.js +2 -0
  9. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +1 -0
  10. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +11 -0
  11. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +1 -0
  12. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +2 -0
  13. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +1 -0
  14. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +11 -0
  15. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +1 -0
  16. package/dist/_virtual/~icons/lucide/folder-open.cjs.js +2 -0
  17. package/dist/_virtual/~icons/lucide/folder-open.cjs.js.map +1 -0
  18. package/dist/_virtual/~icons/lucide/folder-open.esm.js +11 -0
  19. package/dist/_virtual/~icons/lucide/folder-open.esm.js.map +1 -0
  20. package/dist/_virtual/~icons/lucide/globe.cjs.js +2 -0
  21. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +1 -0
  22. package/dist/_virtual/~icons/lucide/globe.esm.js +11 -0
  23. package/dist/_virtual/~icons/lucide/globe.esm.js.map +1 -0
  24. package/dist/_virtual/~icons/lucide/help-circle.cjs.js +2 -0
  25. package/dist/_virtual/~icons/lucide/help-circle.cjs.js.map +1 -0
  26. package/dist/_virtual/~icons/lucide/help-circle.esm.js +11 -0
  27. package/dist/_virtual/~icons/lucide/help-circle.esm.js.map +1 -0
  28. package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js +2 -0
  29. package/dist/_virtual/~icons/lucide/layout-dashboard.cjs.js.map +1 -0
  30. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +11 -0
  31. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js.map +1 -0
  32. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +2 -0
  33. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +1 -0
  34. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +11 -0
  35. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +1 -0
  36. package/dist/_virtual/~icons/lucide/pencil.cjs.js +2 -0
  37. package/dist/_virtual/~icons/lucide/pencil.cjs.js.map +1 -0
  38. package/dist/_virtual/~icons/lucide/pencil.esm.js +11 -0
  39. package/dist/_virtual/~icons/lucide/pencil.esm.js.map +1 -0
  40. package/dist/_virtual/~icons/lucide/settings-2.cjs.js +2 -0
  41. package/dist/_virtual/~icons/lucide/settings-2.cjs.js.map +1 -0
  42. package/dist/_virtual/~icons/lucide/settings-2.esm.js +11 -0
  43. package/dist/_virtual/~icons/lucide/settings-2.esm.js.map +1 -0
  44. package/dist/_virtual/~icons/lucide/share-2.cjs.js +2 -0
  45. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +1 -0
  46. package/dist/_virtual/~icons/lucide/share-2.esm.js +11 -0
  47. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +1 -0
  48. package/dist/_virtual/~icons/lucide/trash-2.cjs.js +2 -0
  49. package/dist/_virtual/~icons/lucide/trash-2.cjs.js.map +1 -0
  50. package/dist/_virtual/~icons/lucide/trash-2.esm.js +11 -0
  51. package/dist/_virtual/~icons/lucide/trash-2.esm.js.map +1 -0
  52. package/dist/_virtual/~icons/lucide/user.cjs.js +2 -0
  53. package/dist/_virtual/~icons/lucide/user.cjs.js.map +1 -0
  54. package/dist/_virtual/~icons/lucide/user.esm.js +11 -0
  55. package/dist/_virtual/~icons/lucide/user.esm.js.map +1 -0
  56. package/dist/_virtual/~icons/lucide/users.cjs.js +2 -0
  57. package/dist/_virtual/~icons/lucide/users.cjs.js.map +1 -0
  58. package/dist/_virtual/~icons/lucide/users.esm.js +11 -0
  59. package/dist/_virtual/~icons/lucide/users.esm.js.map +1 -0
  60. package/dist/audio/audioPane.cjs.js +2 -0
  61. package/dist/audio/audioPane.cjs.js.map +1 -0
  62. package/dist/audio/audioPane.esm.js +99 -0
  63. package/dist/audio/audioPane.esm.js.map +1 -0
  64. package/dist/classInstancePane.cjs.js +2 -0
  65. package/dist/classInstancePane.cjs.js.map +1 -0
  66. package/dist/classInstancePane.esm.js +50 -0
  67. package/dist/classInstancePane.esm.js.map +1 -0
  68. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +14 -0
  69. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +1 -0
  70. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +19 -0
  71. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +1 -0
  72. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +292 -0
  73. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +1 -0
  74. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +2 -0
  75. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +1 -0
  76. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +7 -0
  77. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +1 -0
  78. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +22 -0
  79. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +1 -0
  80. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +15 -0
  81. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +1 -0
  82. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +266 -0
  83. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +1 -0
  84. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +2 -0
  85. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +1 -0
  86. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +7 -0
  87. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +1 -0
  88. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +19 -0
  89. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +1 -0
  90. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +19 -0
  91. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +1 -0
  92. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +321 -0
  93. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +1 -0
  94. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +2 -0
  95. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +1 -0
  96. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +7 -0
  97. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +1 -0
  98. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +13 -0
  99. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +1 -0
  100. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +36 -0
  101. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +1 -0
  102. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +468 -0
  103. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +1 -0
  104. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +2 -0
  105. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +1 -0
  106. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +7 -0
  107. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +1 -0
  108. package/dist/components/file-explorer-header/helper.cjs.js +2 -0
  109. package/dist/components/file-explorer-header/helper.cjs.js.map +1 -0
  110. package/dist/components/file-explorer-header/helper.d.ts +15 -0
  111. package/dist/components/file-explorer-header/helper.d.ts.map +1 -0
  112. package/dist/components/file-explorer-header/helper.esm.js +64 -0
  113. package/dist/components/file-explorer-header/helper.esm.js.map +1 -0
  114. package/dist/components/file-explorer-header/types.d.ts +2 -0
  115. package/dist/components/file-explorer-header/types.d.ts.map +1 -0
  116. package/dist/components/header/Header.cjs.js +19 -0
  117. package/dist/components/header/Header.cjs.js.map +1 -0
  118. package/dist/components/header/Header.d.ts +8 -0
  119. package/dist/components/header/Header.d.ts.map +1 -0
  120. package/dist/components/header/Header.esm.js +228 -0
  121. package/dist/components/header/Header.esm.js.map +1 -0
  122. package/dist/components/header/Header.styles.cjs.js +2 -0
  123. package/dist/components/header/Header.styles.cjs.js.map +1 -0
  124. package/dist/components/header/Header.styles.esm.js +7 -0
  125. package/dist/components/header/Header.styles.esm.js.map +1 -0
  126. package/dist/components/header/index.cjs.js +1 -0
  127. package/dist/components/header/index.d.ts +4 -0
  128. package/dist/components/header/index.d.ts.map +1 -0
  129. package/dist/components/header/index.esm.js +1 -0
  130. package/dist/components/navbar/Navbar.cjs.js +15 -0
  131. package/dist/components/navbar/Navbar.cjs.js.map +1 -0
  132. package/dist/components/navbar/Navbar.d.ts +14 -0
  133. package/dist/components/navbar/Navbar.d.ts.map +1 -0
  134. package/dist/components/navbar/Navbar.esm.js +232 -0
  135. package/dist/components/navbar/Navbar.esm.js.map +1 -0
  136. package/dist/components/navbar/Navbar.styles.cjs.js +2 -0
  137. package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -0
  138. package/dist/components/navbar/Navbar.styles.esm.js +7 -0
  139. package/dist/components/navbar/Navbar.styles.esm.js.map +1 -0
  140. package/dist/components/navbar/index.cjs.js +1 -0
  141. package/dist/components/navbar/index.d.ts +4 -0
  142. package/dist/components/navbar/index.d.ts.map +1 -0
  143. package/dist/components/navbar/index.esm.js +1 -0
  144. package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js +16 -0
  145. package/dist/components/resource-actions-menu/DeleteResourceDialog.cjs.js.map +1 -0
  146. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +8 -0
  147. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +1 -0
  148. package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js +215 -0
  149. package/dist/components/resource-actions-menu/DeleteResourceDialog.esm.js.map +1 -0
  150. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +18 -0
  151. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +1 -0
  152. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +16 -0
  153. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +1 -0
  154. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +260 -0
  155. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +1 -0
  156. package/dist/dashboard/basicPreferences.cjs.js +2 -0
  157. package/dist/dashboard/basicPreferences.cjs.js.map +1 -0
  158. package/dist/dashboard/basicPreferences.d.ts +1 -1
  159. package/dist/dashboard/basicPreferences.esm.js +70 -0
  160. package/dist/dashboard/basicPreferences.esm.js.map +1 -0
  161. package/dist/dashboard/dashboardPane.cjs.js +2 -0
  162. package/dist/dashboard/dashboardPane.cjs.js.map +1 -0
  163. package/dist/dashboard/dashboardPane.d.ts +1 -1
  164. package/dist/dashboard/dashboardPane.esm.js +7 -0
  165. package/dist/dashboard/dashboardPane.esm.js.map +1 -0
  166. package/dist/dashboard/homepage.cjs.js +2 -0
  167. package/dist/dashboard/homepage.cjs.js.map +1 -0
  168. package/dist/dashboard/homepage.d.ts +1 -1
  169. package/dist/dashboard/homepage.esm.js +26 -0
  170. package/dist/dashboard/homepage.esm.js.map +1 -0
  171. package/dist/dashboard/ontologyData.cjs.js +37 -0
  172. package/dist/dashboard/ontologyData.cjs.js.map +1 -0
  173. package/dist/dashboard/ontologyData.esm.js +6 -0
  174. package/dist/dashboard/ontologyData.esm.js.map +1 -0
  175. package/dist/dashboard/preferencesFormText.cjs.js +20 -0
  176. package/dist/dashboard/preferencesFormText.cjs.js.map +1 -0
  177. package/dist/dashboard/preferencesFormText.esm.js +6 -0
  178. package/dist/dashboard/preferencesFormText.esm.js.map +1 -0
  179. package/dist/dataContentPane.d.ts +2 -3
  180. package/dist/dataContentPane2.cjs.js +2 -0
  181. package/dist/dataContentPane2.cjs.js.map +1 -0
  182. package/dist/dataContentPane2.esm.js +109 -0
  183. package/dist/dataContentPane2.esm.js.map +1 -0
  184. package/dist/defaultPane.d.ts +2 -3
  185. package/dist/defaultPane2.cjs.js +2 -0
  186. package/dist/defaultPane2.cjs.js.map +1 -0
  187. package/dist/defaultPane2.esm.js +41 -0
  188. package/dist/defaultPane2.esm.js.map +1 -0
  189. package/dist/dev.d.ts +10 -0
  190. package/dist/dev.d.ts.map +1 -0
  191. package/dist/dokieli/dokieliPane.cjs.js +2 -0
  192. package/dist/dokieli/dokieliPane.cjs.js.map +1 -0
  193. package/dist/dokieli/dokieliPane.esm.js +39 -0
  194. package/dist/dokieli/dokieliPane.esm.js.map +1 -0
  195. package/dist/dokieli/{new.js → new.cjs.js} +4 -10
  196. package/dist/dokieli/new.cjs.js.map +1 -0
  197. package/dist/dokieli/new.esm.js +6 -0
  198. package/dist/dokieli/new.esm.js.map +1 -0
  199. package/dist/form/pane.cjs.js +4 -0
  200. package/dist/form/pane.cjs.js.map +1 -0
  201. package/dist/form/pane.d.ts +1 -2
  202. package/dist/form/pane.esm.js +122 -0
  203. package/dist/form/pane.esm.js.map +1 -0
  204. package/dist/home/homePane.cjs.js +2 -0
  205. package/dist/home/homePane.cjs.js.map +1 -0
  206. package/dist/home/homePane.d.ts +1 -1
  207. package/dist/home/homePane.esm.js +35 -0
  208. package/dist/home/homePane.esm.js.map +1 -0
  209. package/dist/humanReadablePane.d.ts +2 -3
  210. package/dist/humanReadablePane2.cjs.js +2 -0
  211. package/dist/humanReadablePane2.cjs.js.map +1 -0
  212. package/dist/humanReadablePane2.esm.js +123 -0
  213. package/dist/humanReadablePane2.esm.js.map +1 -0
  214. package/dist/icons/folder.cjs.js +2 -0
  215. package/dist/icons/folder.cjs.js.map +1 -0
  216. package/dist/icons/folder.esm.js +6 -0
  217. package/dist/icons/folder.esm.js.map +1 -0
  218. package/dist/icons/friends.cjs.js +2 -0
  219. package/dist/icons/friends.cjs.js.map +1 -0
  220. package/dist/icons/friends.esm.js +6 -0
  221. package/dist/icons/friends.esm.js.map +1 -0
  222. package/dist/icons/person.cjs.js +2 -0
  223. package/dist/icons/person.cjs.js.map +1 -0
  224. package/dist/icons/person.esm.js +6 -0
  225. package/dist/icons/person.esm.js.map +1 -0
  226. package/dist/imagePane.d.ts +2 -3
  227. package/dist/imagePane2.cjs.js +2 -0
  228. package/dist/imagePane2.cjs.js.map +1 -0
  229. package/dist/imagePane2.esm.js +32 -0
  230. package/dist/imagePane2.esm.js.map +1 -0
  231. package/dist/index.cjs.js +2 -0
  232. package/dist/index.cjs.js.map +1 -0
  233. package/dist/index.d.ts +4 -4
  234. package/dist/index.esm.js +31 -0
  235. package/dist/index.esm.js.map +1 -0
  236. package/dist/internal/internalPane.d.ts +1 -2
  237. package/dist/internal/internalPane2.cjs.js +2 -0
  238. package/dist/internal/internalPane2.cjs.js.map +1 -0
  239. package/dist/internal/internalPane2.esm.js +104 -0
  240. package/dist/internal/internalPane2.esm.js.map +1 -0
  241. package/dist/mainPage/header.cjs.js +2 -0
  242. package/dist/mainPage/header.cjs.js.map +1 -0
  243. package/dist/mainPage/header.d.ts +1 -15
  244. package/dist/mainPage/header.d.ts.map +1 -1
  245. package/dist/mainPage/header.esm.js +72 -0
  246. package/dist/mainPage/header.esm.js.map +1 -0
  247. package/dist/mainPage/index.cjs.js +2 -0
  248. package/dist/mainPage/index.cjs.js.map +1 -0
  249. package/dist/mainPage/index.d.ts +3 -15
  250. package/dist/mainPage/index.d.ts.map +1 -1
  251. package/dist/mainPage/index.esm.js +36 -0
  252. package/dist/mainPage/index.esm.js.map +1 -0
  253. package/dist/mainPage/navbar.cjs.js +2 -0
  254. package/dist/mainPage/navbar.cjs.js.map +1 -0
  255. package/dist/mainPage/navbar.d.ts +3 -0
  256. package/dist/mainPage/navbar.d.ts.map +1 -0
  257. package/dist/mainPage/navbar.esm.js +66 -0
  258. package/dist/mainPage/navbar.esm.js.map +1 -0
  259. package/dist/n3Pane.d.ts +2 -3
  260. package/dist/n3Pane2.cjs.js +3 -0
  261. package/dist/n3Pane2.cjs.js.map +1 -0
  262. package/dist/n3Pane2.esm.js +52 -0
  263. package/dist/n3Pane2.esm.js.map +1 -0
  264. package/dist/outline/context.cjs.js +2 -0
  265. package/dist/outline/context.cjs.js.map +1 -0
  266. package/dist/outline/context.d.ts +3 -3
  267. package/dist/outline/context.esm.js +18 -0
  268. package/dist/outline/context.esm.js.map +1 -0
  269. package/dist/outline/manager2.cjs.js +2 -0
  270. package/dist/outline/manager2.cjs.js.map +1 -0
  271. package/dist/outline/manager2.esm.js +711 -0
  272. package/dist/outline/manager2.esm.js.map +1 -0
  273. package/dist/outline/outlineIcons.cjs.js +2 -0
  274. package/dist/outline/outlineIcons.cjs.js.map +1 -0
  275. package/dist/outline/outlineIcons.esm.js +10 -0
  276. package/dist/outline/outlineIcons.esm.js.map +1 -0
  277. package/dist/outline/propertyViews.cjs.js +2 -0
  278. package/dist/outline/propertyViews.cjs.js.map +1 -0
  279. package/dist/outline/propertyViews.esm.js +19 -0
  280. package/dist/outline/propertyViews.esm.js.map +1 -0
  281. package/dist/outline/queryByExample.cjs.js +2 -0
  282. package/dist/outline/queryByExample.cjs.js.map +1 -0
  283. package/dist/outline/queryByExample.esm.js +26 -0
  284. package/dist/outline/queryByExample.esm.js.map +1 -0
  285. package/dist/outline/sourcePaneIcon.d.ts +2 -0
  286. package/dist/outline/sourcePaneIcon.d.ts.map +1 -0
  287. package/dist/outline/userInput.cjs.js +61 -0
  288. package/dist/outline/userInput.cjs.js.map +1 -0
  289. package/dist/outline/userInput.esm.js +784 -0
  290. package/dist/outline/userInput.esm.js.map +1 -0
  291. package/dist/outline/viewAsImage.cjs.js +2 -0
  292. package/dist/outline/viewAsImage.cjs.js.map +1 -0
  293. package/dist/outline/viewAsImage.esm.js +10 -0
  294. package/dist/outline/viewAsImage.esm.js.map +1 -0
  295. package/dist/outline/viewAsMbox.cjs.js +2 -0
  296. package/dist/outline/viewAsMbox.cjs.js.map +1 -0
  297. package/dist/outline/viewAsMbox.esm.js +9 -0
  298. package/dist/outline/viewAsMbox.esm.js.map +1 -0
  299. package/dist/pad/padPane.d.ts +1 -2
  300. package/dist/pad/padPane2.cjs.js +2 -0
  301. package/dist/pad/padPane2.cjs.js.map +1 -0
  302. package/dist/pad/padPane2.esm.js +173 -0
  303. package/dist/pad/padPane2.esm.js.map +1 -0
  304. package/dist/playlist/playlistPane.cjs.js +2 -0
  305. package/dist/playlist/playlistPane.cjs.js.map +1 -0
  306. package/dist/playlist/playlistPane.esm.js +49 -0
  307. package/dist/playlist/playlistPane.esm.js.map +1 -0
  308. package/dist/registerPanes.cjs.js +2 -0
  309. package/dist/registerPanes.cjs.js.map +1 -0
  310. package/dist/registerPanes.esm.js +46 -0
  311. package/dist/registerPanes.esm.js.map +1 -0
  312. package/dist/schedule/formsForSchedule.cjs.js +117 -0
  313. package/dist/schedule/formsForSchedule.cjs.js.map +1 -0
  314. package/dist/schedule/formsForSchedule.esm.js +6 -0
  315. package/dist/schedule/formsForSchedule.esm.js.map +1 -0
  316. package/dist/schedule/schedulePane.d.ts +2 -4
  317. package/dist/schedule/schedulePane2.cjs.js +8 -0
  318. package/dist/schedule/schedulePane2.cjs.js.map +1 -0
  319. package/dist/schedule/schedulePane2.esm.js +385 -0
  320. package/dist/schedule/schedulePane2.esm.js.map +1 -0
  321. package/dist/sharing/sharingPane.cjs.js +2 -0
  322. package/dist/sharing/sharingPane.cjs.js.map +1 -0
  323. package/dist/sharing/sharingPane.esm.js +22 -0
  324. package/dist/sharing/sharingPane.esm.js.map +1 -0
  325. package/dist/slideshow/slideshowPane.cjs.js +2 -0
  326. package/dist/slideshow/slideshowPane.cjs.js.map +1 -0
  327. package/dist/slideshow/slideshowPane.esm.js +46 -0
  328. package/dist/slideshow/slideshowPane.esm.js.map +1 -0
  329. package/dist/social/editProfileDetails.cjs.js +2 -0
  330. package/dist/social/editProfileDetails.cjs.js.map +1 -0
  331. package/dist/social/editProfileDetails.d.ts +1 -2
  332. package/dist/social/editProfileDetails.esm.js +12 -0
  333. package/dist/social/editProfileDetails.esm.js.map +1 -0
  334. package/dist/social/icons.cjs.js +82 -0
  335. package/dist/social/icons.cjs.js.map +1 -0
  336. package/dist/social/{icons.js → icons.esm.js} +12 -18
  337. package/dist/social/icons.esm.js.map +1 -0
  338. package/dist/social/socialPane.d.ts +2 -3
  339. package/dist/social/socialPane2.cjs.js +6 -0
  340. package/dist/social/socialPane2.cjs.js.map +1 -0
  341. package/dist/social/socialPane2.esm.js +326 -0
  342. package/dist/social/socialPane2.esm.js.map +1 -0
  343. package/dist/social/socialSections.cjs.js +2 -0
  344. package/dist/social/socialSections.cjs.js.map +1 -0
  345. package/dist/social/socialSections.d.ts +2 -2
  346. package/dist/social/socialSections.esm.js +222 -0
  347. package/dist/social/socialSections.esm.js.map +1 -0
  348. package/dist/social/spinner.cjs.js +1 -0
  349. package/dist/social/spinner.esm.js +1 -0
  350. package/dist/social/triage.cjs.js +2 -0
  351. package/dist/social/triage.cjs.js.map +1 -0
  352. package/dist/social/triage.d.ts +2 -2
  353. package/dist/social/triage.esm.js +44 -0
  354. package/dist/social/triage.esm.js.map +1 -0
  355. package/dist/tabbed/tabbedPane.cjs.js +2 -0
  356. package/dist/tabbed/tabbedPane.cjs.js.map +1 -0
  357. package/dist/tabbed/tabbedPane.d.ts +1 -1
  358. package/dist/tabbed/tabbedPane.esm.js +38 -0
  359. package/dist/tabbed/tabbedPane.esm.js.map +1 -0
  360. package/dist/tableViewPane.cjs.js +2 -0
  361. package/dist/tableViewPane.cjs.js.map +1 -0
  362. package/dist/tableViewPane.esm.js +20 -0
  363. package/dist/tableViewPane.esm.js.map +1 -0
  364. package/dist/transaction/pane.cjs.js +8 -0
  365. package/dist/transaction/pane.cjs.js.map +1 -0
  366. package/dist/transaction/pane.esm.js +212 -0
  367. package/dist/transaction/pane.esm.js.map +1 -0
  368. package/dist/transaction/period.cjs.js +4 -0
  369. package/dist/transaction/period.cjs.js.map +1 -0
  370. package/dist/transaction/period.esm.js +126 -0
  371. package/dist/transaction/period.esm.js.map +1 -0
  372. package/dist/trip/tripPane.cjs.js +2 -0
  373. package/dist/trip/tripPane.cjs.js.map +1 -0
  374. package/dist/trip/tripPane.esm.js +85 -0
  375. package/dist/trip/tripPane.esm.js.map +1 -0
  376. package/dist/trustedApplications/trustedApplications.dom.cjs.js +2 -0
  377. package/dist/trustedApplications/trustedApplications.dom.cjs.js.map +1 -0
  378. package/dist/trustedApplications/trustedApplications.dom.d.ts +1 -1
  379. package/dist/trustedApplications/trustedApplications.dom.esm.js +108 -0
  380. package/dist/trustedApplications/trustedApplications.dom.esm.js.map +1 -0
  381. package/dist/trustedApplications/trustedApplications.utils.cjs.js +2 -0
  382. package/dist/trustedApplications/trustedApplications.utils.cjs.js.map +1 -0
  383. package/dist/trustedApplications/trustedApplications.utils.d.ts +1 -1
  384. package/dist/trustedApplications/trustedApplications.utils.esm.js +20 -0
  385. package/dist/trustedApplications/trustedApplications.utils.esm.js.map +1 -0
  386. package/dist/trustedApplications/trustedApplications.view.cjs.js +2 -0
  387. package/dist/trustedApplications/trustedApplications.view.cjs.js.map +1 -0
  388. package/dist/trustedApplications/trustedApplications.view.d.ts +1 -1
  389. package/dist/trustedApplications/trustedApplications.view.esm.js +41 -0
  390. package/dist/trustedApplications/trustedApplications.view.esm.js.map +1 -0
  391. package/dist/ui/pane.cjs.js +4 -0
  392. package/dist/ui/pane.cjs.js.map +1 -0
  393. package/dist/ui/pane.esm.js +56 -0
  394. package/dist/ui/pane.esm.js.map +1 -0
  395. package/dist/utils/paneUtils.cjs.js +2 -0
  396. package/dist/utils/paneUtils.cjs.js.map +1 -0
  397. package/dist/utils/paneUtils.d.ts +19 -0
  398. package/dist/utils/paneUtils.d.ts.map +1 -0
  399. package/dist/utils/paneUtils.esm.js +52 -0
  400. package/dist/utils/paneUtils.esm.js.map +1 -0
  401. package/dist/utils/podUtils.cjs.js +2 -0
  402. package/dist/utils/podUtils.cjs.js.map +1 -0
  403. package/dist/utils/podUtils.d.ts +4 -0
  404. package/dist/utils/podUtils.d.ts.map +1 -0
  405. package/dist/utils/podUtils.esm.js +46 -0
  406. package/dist/utils/podUtils.esm.js.map +1 -0
  407. package/dist/utils/webIdUtils.cjs.js +2 -0
  408. package/dist/utils/webIdUtils.cjs.js.map +1 -0
  409. package/dist/utils/webIdUtils.d.ts +6 -0
  410. package/dist/utils/webIdUtils.d.ts.map +1 -0
  411. package/dist/utils/webIdUtils.esm.js +48 -0
  412. package/dist/utils/webIdUtils.esm.js.map +1 -0
  413. package/dist/versionInfo.cjs.js +2 -0
  414. package/dist/versionInfo.cjs.js.map +1 -0
  415. package/dist/versionInfo.esm.js +40 -0
  416. package/dist/versionInfo.esm.js.map +1 -0
  417. package/dist/video/videoPane.cjs.js +2 -0
  418. package/dist/video/videoPane.cjs.js.map +1 -0
  419. package/dist/video/videoPane.esm.js +25 -0
  420. package/dist/video/videoPane.esm.js.map +1 -0
  421. package/package.json +51 -66
  422. package/dist/0314353e28ce6e5539af.svg +0 -9
  423. package/dist/04567ff683933c35c465.png +0 -0
  424. package/dist/10163fd9b5a0e00d63a0.png +0 -0
  425. package/dist/1234dcb2eec2e45f252b.png +0 -0
  426. package/dist/20899934157df4db56cb.png +0 -0
  427. package/dist/33760bf79f097f449da5.png +0 -0
  428. package/dist/4cceba29ab33b1ddd9bb.svg +0 -6
  429. package/dist/578d2b6ed32e7624164e.png +0 -0
  430. package/dist/5f62a5b2b7e99b9640c7.png +0 -0
  431. package/dist/6525766ecd288ec60129.png +0 -0
  432. package/dist/7800be6f6c4b5b0f4f20.png +0 -0
  433. package/dist/7b7538c6f6b317968009.svg +0 -9
  434. package/dist/92d03142abe6efc0b42d.svg +0 -6
  435. package/dist/976473cf5fe24d657d4b.png +0 -0
  436. package/dist/RDFXMLPane.css +0 -70
  437. package/dist/RDFXMLPane.js +0 -100
  438. package/dist/argument/argumentPane.js +0 -60
  439. package/dist/attach/attachPane.js +0 -393
  440. package/dist/audio/audioPane.js +0 -181
  441. package/dist/bda84f59e7216675a208.png +0 -0
  442. package/dist/cd68e8f3990ba8b2139e.png +0 -0
  443. package/dist/classInstancePane.js +0 -91
  444. package/dist/dashboard/basicPreferences.js +0 -147
  445. package/dist/dashboard/dashboardPane.js +0 -73
  446. package/dist/dashboard/homepage.js +0 -42
  447. package/dist/dataContentPane.css +0 -271
  448. package/dist/dataContentPane.js +0 -226
  449. package/dist/defaultPane.css +0 -97
  450. package/dist/defaultPane.js +0 -81
  451. package/dist/dokieli/dokieliPane.js +0 -74
  452. package/dist/e7074a7e2cb69e51cfd3.png +0 -0
  453. package/dist/f3772696fb7ee53c23d8.png +0 -0
  454. package/dist/form/formPane.css +0 -120
  455. package/dist/form/pane.js +0 -250
  456. package/dist/home/homePane.js +0 -74
  457. package/dist/humanReadablePane.css +0 -129
  458. package/dist/humanReadablePane.js +0 -243
  459. package/dist/icons/clock.svg +0 -7
  460. package/dist/icons/comment.svg +0 -6
  461. package/dist/icons/dashboard.svg +0 -9
  462. package/dist/icons/downArrow.svg +0 -6
  463. package/dist/icons/folder.svg +0 -6
  464. package/dist/icons/friends.svg +0 -9
  465. package/dist/icons/help.svg +0 -8
  466. package/dist/icons/iconHelper.js +0 -23
  467. package/dist/icons/menu.svg +0 -8
  468. package/dist/icons/person.svg +0 -6
  469. package/dist/icons/personInCircle.svg +0 -8
  470. package/dist/icons/sharing.svg +0 -10
  471. package/dist/icons/signOut.svg +0 -8
  472. package/dist/icons/signUp.svg +0 -9
  473. package/dist/icons/star.svg +0 -3
  474. package/dist/imagePane.css +0 -4
  475. package/dist/imagePane.js +0 -67
  476. package/dist/index.js +0 -123
  477. package/dist/internal/internalPane.css +0 -14
  478. package/dist/internal/internalPane.js +0 -183
  479. package/dist/mainPage/footer.d.ts +0 -15
  480. package/dist/mainPage/footer.d.ts.map +0 -1
  481. package/dist/mainPage/footer.js +0 -29
  482. package/dist/mainPage/header.js +0 -203
  483. package/dist/mainPage/index.js +0 -78
  484. package/dist/mainPage/menu.css +0 -243
  485. package/dist/mainPage/menu.d.ts +0 -7
  486. package/dist/mainPage/menu.d.ts.map +0 -1
  487. package/dist/mainPage/menu.js +0 -436
  488. package/dist/microblogPane/mbStyle.css +0 -267
  489. package/dist/microblogPane/microblogPane.js +0 -1031
  490. package/dist/n3Pane.css +0 -49
  491. package/dist/n3Pane.js +0 -88
  492. package/dist/outline/context.js +0 -21
  493. package/dist/outline/manager.css +0 -78
  494. package/dist/outline/manager.js +0 -2115
  495. package/dist/outline/outlineIcons.js +0 -126
  496. package/dist/outline/propertyViews.js +0 -43
  497. package/dist/outline/queryByExample.js +0 -285
  498. package/dist/outline/userInput.js +0 -1821
  499. package/dist/outline/viewAsImage.js +0 -14
  500. package/dist/outline/viewAsMbox.js +0 -21
  501. package/dist/pad/padPane.css +0 -40
  502. package/dist/pad/padPane.js +0 -421
  503. package/dist/playlist/playlistPane.js +0 -119
  504. package/dist/profileUtils/ownerProfile.d.ts +0 -5
  505. package/dist/profileUtils/ownerProfile.d.ts.map +0 -1
  506. package/dist/profileUtils/ownerProfile.js +0 -84
  507. package/dist/registerPanes.js +0 -145
  508. package/dist/schedule/schedulePane.css +0 -294
  509. package/dist/schedule/schedulePane.js +0 -1022
  510. package/dist/sharing/sharingPane.js +0 -48
  511. package/dist/slideshow/slideshowPane.js +0 -79
  512. package/dist/social/editProfileDetails.js +0 -362
  513. package/dist/social/socialPane.css +0 -1464
  514. package/dist/social/socialPane.js +0 -651
  515. package/dist/social/socialSections.js +0 -393
  516. package/dist/social/spinner.js +0 -13
  517. package/dist/social/triage.js +0 -79
  518. package/dist/solid-panes.js +0 -85630
  519. package/dist/solid-panes.js.map +0 -1
  520. package/dist/solid-panes.min.js +0 -3933
  521. package/dist/solid-panes.min.js.map +0 -1
  522. package/dist/styles/tabbedtab.css +0 -1066
  523. package/dist/styles/utilities.css +0 -5
  524. package/dist/tabbed/tabbedPane.js +0 -59
  525. package/dist/tableViewPane.js +0 -56
  526. package/dist/transaction/pane.js +0 -477
  527. package/dist/transaction/period.js +0 -323
  528. package/dist/trip/tripPane.js +0 -174
  529. package/dist/trustedApplications/trustedApplications.dom.js +0 -145
  530. package/dist/trustedApplications/trustedApplications.utils.js +0 -23
  531. package/dist/trustedApplications/trustedApplications.view.js +0 -55
  532. package/dist/ui/pane.js +0 -146
  533. package/dist/versionInfo.js +0 -41
  534. package/dist/video/videoPane.js +0 -42
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultPane2.cjs.js","names":[],"sources":["../src/defaultPane.ts"],"sourcesContent":["/* Default Pane\n **\n ** This outline pane contains the properties which are\n ** normally displayed to the user. See also: internalPane\n ** This pane hides the ones considered too low-level for the normal user.\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { BlankNode, Literal, NamedNode, Statement } from 'rdflib'\nimport './defaultPane.css'\n\nconst ns = UI.ns\ntype DefaultPaneSubject = NamedNode | BlankNode | Literal\n\ntype DefaultPaneDefinition = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: DefaultPaneSubject) => string\n render: (subject: DefaultPaneSubject, context: DataBrowserContext) => HTMLDivElement\n}\n\ntype DefaultPaneOutliner = {\n appendPropertyTRs: (\n parent: HTMLElement,\n statements: Statement[],\n inverse: boolean,\n filter: (pred: NamedNode, inverse: boolean) => boolean\n ) => void\n UserInput: {\n addNewPredicateObject: (event: Event) => void\n }\n}\n\nexport const defaultPane: DefaultPaneDefinition = {\n icon: UI.icons.originalIconBase + 'about.png',\n\n name: 'default',\n\n audience: [ns.solid('Developer')],\n\n label: function (_subject: DefaultPaneSubject): string {\n return 'about '\n },\n\n render: function (\n subject: DefaultPaneSubject,\n context: DataBrowserContext\n ): HTMLDivElement {\n const dom = context.dom\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n const filter = function (pred: NamedNode, inverse: boolean): boolean {\n if (\n typeof context.session.paneRegistry.byName('internal').predicates[\n pred.uri\n ] !== 'undefined'\n ) {\n return false\n }\n if (\n inverse &&\n pred.uri === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'\n ) {\n return false\n }\n return true\n }\n\n const outliner = context.getOutliner(dom) as DefaultPaneOutliner\n const kb = context.session.store\n // var outline = outliner; // @@\n UI.log.info('@defaultPane.render, dom is now ' + dom.location)\n subject = kb.canon(subject) as DefaultPaneSubject\n const div = dom.createElement('div')\n div.setAttribute('class', 'defaultPane')\n applyEnvironmentAttributes(div)\n // appendRemoveIcon(div, subject, div)\n\n let plist = subject.termType === 'Literal' ? [] : kb.statementsMatching(subject)\n outliner.appendPropertyTRs(div, plist, false, filter)\n plist = kb.statementsMatching(undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, true, filter)\n const subjectStatement = subject.termType === 'BlankNode'\n ? kb.anyStatementMatching(subject)\n : undefined\n if (\n subject.termType === 'Literal' &&\n subject.value.slice(0, 7) === 'http://'\n ) {\n outliner.appendPropertyTRs(\n div,\n [$rdf.st(kb.sym(subject.value), UI.ns.link('uri'), subject)],\n true,\n filter\n )\n }\n if (\n (subject.termType === 'NamedNode' &&\n kb.updater.editable($rdf.Util.uri.docpart(subject.uri), kb)) ||\n (subject.termType === 'BlankNode' &&\n subjectStatement &&\n subjectStatement.why &&\n 'uri' in subjectStatement.why &&\n typeof subjectStatement.why.uri === 'string' &&\n kb.updater.editable(subjectStatement.why.uri))\n // check the document containing something about of the bnode @@ what about as object?\n /* ! && HCIoptions[\"bottom insert highlights\"].enabled */\n ) {\n const holdingTr = dom.createElement('tr') // these are to minimize required changes\n const holdingTd = dom.createElement('td') // in userinput.js\n holdingTd.setAttribute('colspan', '2')\n holdingTd.setAttribute('notSelectable', 'true')\n const img = dom.createElement('img')\n img.src = UI.icons.originalIconBase + 'tango/22-list-add-new.png'\n img.addEventListener('click', function addNewTripleIconMouseDownListener (\n e\n ) {\n outliner.UserInput.addNewPredicateObject(e)\n e.stopPropagation()\n e.preventDefault()\n })\n img.className = 'bottom-border-active'\n // img.addEventListener('click', thisOutline.UserInput.addNewPredicateObject,false)\n div\n .appendChild(holdingTr)\n .appendChild(holdingTd)\n .appendChild(img)\n }\n return div\n }\n}\n\n// ends\n"],"mappings":"uKAaA,IAAM,EAAK,EAAG,GAuBD,EAAqC,CAChD,KAAM,EAAG,MAAM,iBAAmB,YAElC,KAAM,UAEN,SAAU,CAAC,EAAG,MAAM,WAAW,CAAC,EAEhC,MAAO,SAAU,EAAsC,CACrD,MAAO,QACT,EAEA,OAAQ,SACN,EACA,EACgB,CAChB,IAAM,EAAM,EAAQ,IAEpB,SAAS,EAA4B,EAA+B,CAClE,IAAM,EAAe,EAAQ,aAAe,CAAC,EAC7C,EAAQ,QAAQ,OAAS,EAAY,QAAU,SACjD,CAEA,IAAM,EAAS,SAAU,EAAiB,EAA2B,CAcnE,MANA,EANS,EAAQ,QAAQ,aAAa,OAAO,UAAU,CAAC,CAAC,WACrD,EAAK,OACD,QAKN,GACA,EAAK,MAAQ,kDAKjB,EAEM,EAAW,EAAQ,YAAY,CAAG,EAClC,EAAK,EAAQ,QAAQ,MAE3B,EAAG,IAAI,KAAK,mCAAqC,EAAI,QAAQ,EAC7D,EAAU,EAAG,MAAM,CA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AY,CAAG,CACpB,CACA,OAAO,CACT,CACF"}
@@ -0,0 +1,41 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.defaultPane .bottom-border{border:.2rem solid #0000;width:100%}.defaultPane .bottom-border-active{cursor:copy;border:.2rem solid;border-color:var(--color-bottom-border-highlight,#ffa600)}.defaultPane{--default-pane-predicate-column:16rem;--default-pane-object-indent:1.75rem}.defaultPane>tr{grid-template-columns:minmax(0, var(--default-pane-predicate-column)) minmax(0, 1fr);align-items:flex-start;display:grid}.defaultPane>tr>td.pred{box-sizing:border-box;grid-column:1;align-items:flex-start;min-width:0;display:flex;padding-left:0!important}.defaultPane>tr>td.pred>.labelTD{flex:auto;min-width:0;margin:0;padding-top:0;padding-bottom:0}.defaultPane>tr>td.pred>.iconTD{flex:none;width:auto;margin:0}.defaultPane>tr>td.obj{box-sizing:border-box;grid-column:2;align-self:start;min-width:0}.defaultPane>tr>td[colspan="2"]{grid-column:1/-1}.defaultPane[data-layout=mobile]>tr{grid-template-columns:minmax(0,1fr)}.defaultPane[data-layout=mobile]>tr>td.pred,.defaultPane[data-layout=mobile]>tr>td.obj{box-sizing:border-box;grid-column:1;width:100%;display:block}.defaultPane[data-layout=mobile]>tr>td.pred{padding-bottom:var(--spacing-small,.1rem)}.defaultPane[data-layout=mobile]>tr>td.obj{padding-left:var(--default-pane-object-indent)!important}@media (width<=700px){.defaultPane>tr{grid-template-columns:minmax(0,1fr)}.defaultPane>tr>td.pred,.defaultPane>tr>td.obj{box-sizing:border-box;grid-column:1;width:100%;display:block}.defaultPane>tr>td.pred{padding-bottom:var(--spacing-small,.1rem)}.defaultPane>tr>td.obj{padding-left:var(--default-pane-object-indent)!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
+ import * as e from "solid-ui";
3
+ import * as t from "rdflib";
4
+ //#region src/defaultPane.ts
5
+ var n = e.ns, r = {
6
+ icon: e.icons.originalIconBase + "about.png",
7
+ name: "default",
8
+ audience: [n.solid("Developer")],
9
+ label: function(e) {
10
+ return "about ";
11
+ },
12
+ render: function(n, r) {
13
+ let i = r.dom;
14
+ function a(e) {
15
+ let t = r.environment ?? {};
16
+ e.dataset.layout = t.layout ?? "desktop";
17
+ }
18
+ let o = function(e, t) {
19
+ return !(r.session.paneRegistry.byName("internal").predicates[e.uri] !== void 0 || t && e.uri === "http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
20
+ }, s = r.getOutliner(i), c = r.session.store;
21
+ e.log.info("@defaultPane.render, dom is now " + i.location), n = c.canon(n);
22
+ let l = i.createElement("div");
23
+ l.setAttribute("class", "defaultPane"), a(l);
24
+ let u = n.termType === "Literal" ? [] : c.statementsMatching(n);
25
+ s.appendPropertyTRs(l, u, !1, o), u = c.statementsMatching(void 0, void 0, n), s.appendPropertyTRs(l, u, !0, o);
26
+ let d = n.termType === "BlankNode" ? c.anyStatementMatching(n) : void 0;
27
+ if (n.termType === "Literal" && n.value.slice(0, 7) === "http://" && s.appendPropertyTRs(l, [t.st(c.sym(n.value), e.ns.link("uri"), n)], !0, o), n.termType === "NamedNode" && c.updater.editable(t.Util.uri.docpart(n.uri), c) || n.termType === "BlankNode" && d && d.why && "uri" in d.why && typeof d.why.uri == "string" && c.updater.editable(d.why.uri)) {
28
+ let t = i.createElement("tr"), n = i.createElement("td");
29
+ n.setAttribute("colspan", "2"), n.setAttribute("notSelectable", "true");
30
+ let r = i.createElement("img");
31
+ r.src = e.icons.originalIconBase + "tango/22-list-add-new.png", r.addEventListener("click", function(e) {
32
+ s.UserInput.addNewPredicateObject(e), e.stopPropagation(), e.preventDefault();
33
+ }), r.className = "bottom-border-active", l.appendChild(t).appendChild(n).appendChild(r);
34
+ }
35
+ return l;
36
+ }
37
+ };
38
+ //#endregion
39
+ export { r as defaultPane };
40
+
41
+ //# sourceMappingURL=defaultPane2.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultPane2.esm.js","names":[],"sources":["../src/defaultPane.ts"],"sourcesContent":["/* Default Pane\n **\n ** This outline pane contains the properties which are\n ** normally displayed to the user. See also: internalPane\n ** This pane hides the ones considered too low-level for the normal user.\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, RenderEnvironment } from 'pane-registry'\nimport type { BlankNode, Literal, NamedNode, Statement } from 'rdflib'\nimport './defaultPane.css'\n\nconst ns = UI.ns\ntype DefaultPaneSubject = NamedNode | BlankNode | Literal\n\ntype DefaultPaneDefinition = {\n icon: string\n name: string\n audience: NamedNode[]\n label: (subject: DefaultPaneSubject) => string\n render: (subject: DefaultPaneSubject, context: DataBrowserContext) => HTMLDivElement\n}\n\ntype DefaultPaneOutliner = {\n appendPropertyTRs: (\n parent: HTMLElement,\n statements: Statement[],\n inverse: boolean,\n filter: (pred: NamedNode, inverse: boolean) => boolean\n ) => void\n UserInput: {\n addNewPredicateObject: (event: Event) => void\n }\n}\n\nexport const defaultPane: DefaultPaneDefinition = {\n icon: UI.icons.originalIconBase + 'about.png',\n\n name: 'default',\n\n audience: [ns.solid('Developer')],\n\n label: function (_subject: DefaultPaneSubject): string {\n return 'about '\n },\n\n render: function (\n subject: DefaultPaneSubject,\n context: DataBrowserContext\n ): HTMLDivElement {\n const dom = context.dom\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n const filter = function (pred: NamedNode, inverse: boolean): boolean {\n if (\n typeof context.session.paneRegistry.byName('internal').predicates[\n pred.uri\n ] !== 'undefined'\n ) {\n return false\n }\n if (\n inverse &&\n pred.uri === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'\n ) {\n return false\n }\n return true\n }\n\n const outliner = context.getOutliner(dom) as DefaultPaneOutliner\n const kb = context.session.store\n // var outline = outliner; // @@\n UI.log.info('@defaultPane.render, dom is now ' + dom.location)\n subject = kb.canon(subject) as DefaultPaneSubject\n const div = dom.createElement('div')\n div.setAttribute('class', 'defaultPane')\n applyEnvironmentAttributes(div)\n // appendRemoveIcon(div, subject, div)\n\n let plist = subject.termType === 'Literal' ? [] : kb.statementsMatching(subject)\n outliner.appendPropertyTRs(div, plist, false, filter)\n plist = kb.statementsMatching(undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, true, filter)\n const subjectStatement = subject.termType === 'BlankNode'\n ? kb.anyStatementMatching(subject)\n : undefined\n if (\n subject.termType === 'Literal' &&\n subject.value.slice(0, 7) === 'http://'\n ) {\n outliner.appendPropertyTRs(\n div,\n [$rdf.st(kb.sym(subject.value), UI.ns.link('uri'), subject)],\n true,\n filter\n )\n }\n if (\n (subject.termType === 'NamedNode' &&\n kb.updater.editable($rdf.Util.uri.docpart(subject.uri), kb)) ||\n (subject.termType === 'BlankNode' &&\n subjectStatement &&\n subjectStatement.why &&\n 'uri' in subjectStatement.why &&\n typeof subjectStatement.why.uri === 'string' &&\n kb.updater.editable(subjectStatement.why.uri))\n // check the document containing something about of the bnode @@ what about as object?\n /* ! && HCIoptions[\"bottom insert highlights\"].enabled */\n ) {\n const holdingTr = dom.createElement('tr') // these are to minimize required changes\n const holdingTd = dom.createElement('td') // in userinput.js\n holdingTd.setAttribute('colspan', '2')\n holdingTd.setAttribute('notSelectable', 'true')\n const img = dom.createElement('img')\n img.src = UI.icons.originalIconBase + 'tango/22-list-add-new.png'\n img.addEventListener('click', function addNewTripleIconMouseDownListener (\n e\n ) {\n outliner.UserInput.addNewPredicateObject(e)\n e.stopPropagation()\n e.preventDefault()\n })\n img.className = 'bottom-border-active'\n // img.addEventListener('click', thisOutline.UserInput.addNewPredicateObject,false)\n div\n .appendChild(holdingTr)\n .appendChild(holdingTd)\n .appendChild(img)\n }\n return div\n }\n}\n\n// ends\n"],"mappings":";;;;AAaA,IAAM,IAAK,EAAG,IAuBD,IAAqC;CAChD,MAAM,EAAG,MAAM,mBAAmB;CAElC,MAAM;CAEN,UAAU,CAA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a,eACpB,KACA,EAAiB,OACjB,SAAS,EAAiB,OAC1B,OAAO,EAAiB,IAAI,OAAQ,YACpC,EAAG,QAAQ,SAAS,EAAiB,IAAI,GAAG,GAG9C;GACA,IAAM,IAAY,EAAI,cAAc,IAAI,GAClC,IAAY,EAAI,cAAc,IAAI;GAExC,AADA,EAAU,aAAa,WAAW,GAAG,GACrC,EAAU,aAAa,iBAAiB,MAAM;GAC9C,IAAM,IAAM,EAAI,cAAc,KAAK;GAWnC,AAVA,EAAI,MAAM,EAAG,MAAM,mBAAmB,6BACtC,EAAI,iBAAiB,SAAS,SAC5B,GACA;IAGA,AAFA,EAAS,UAAU,sBAAsB,CAAC,GAC1C,EAAE,gBAAgB,GAClB,EAAE,eAAe;GACnB,CAAC,GACD,EAAI,YAAY,wBAEhB,EACG,YAAY,CAAS,CAAC,CACtB,YAAY,CAAS,CAAC,CACtB,YAAY,CAAG;EACpB;EACA,OAAO;CACT;AACF"}
package/dist/dev.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { NamedNode } from '../node_modules/rdflib';
2
+ import { DataBrowserContext } from '../node_modules/pane-registry';
3
+ declare const _default: {
4
+ icon: string;
5
+ name: string;
6
+ label: () => string;
7
+ render(subject: NamedNode, context: DataBrowserContext): HTMLDivElement;
8
+ };
9
+ export default _default;
10
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../src/dev.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAkB,MAAM,eAAe,CAAA;;;;;oBAMpD,SAAS,WAAW,kBAAkB;;AAJzD,wBAgB0B"}
@@ -0,0 +1,2 @@
1
+ const e=require("../_virtual/_rolldown/runtime.cjs.js"),t=require("./new.cjs.js");let n=require("solid-ui");n=e.__toESM(n);let r=require("rdflib");r=e.__toESM(r);let i=require("mime-types");i=e.__toESM(i);var a={icon:n.icons.iconBase+`dokieli-logo.png`,name:`Dokieli`,mintClass:n.ns.solid(`DokieliDocument`),label:function(e,t){return null},mintNew:function(e,n){let a=e.session.store,o=n.newInstance;if(!o){let e=n.newBase;e.endsWith(`/`)&&(e=e.slice(0,-1),n.newBase=e),o=a.sym(e)}let s=i.lookup(o.uri);(!s||!s.includes(`html`))&&(o=r.sym(o.uri+`.html`)),n.newInstance=o;let c=t.default,l=o.uri.split(`/`).slice(-1)[0];l=decodeURIComponent(l.split(`.`)[0]);let u=l.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);return c=c.replace(`<title>`,`<title>`+u),c=c.replace(`</article>`,`<h1>`+u+`</h1></article>`),new Promise(function(e){a.fetcher.webOperation(`PUT`,o.uri,{data:c,contentType:`text/html`}).then(function(){console.log(`new Dokieli document created at `+n.newInstance),e(n)}).catch(function(e){console.log(`Error creating dokieli doc at `+n.newInstance+`: `+e)})})}};exports.default=a;
2
+ //# sourceMappingURL=dokieliPane.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dokieliPane.cjs.js","names":["UI","mime","$rdf","DOKIELI_TEMPLATE"],"sources":["../../src/dokieli/dokieliPane.js"],"sourcesContent":["/* Human-readable editable \"Dokieli\" Pane\n **\n ** This outline pane contains the document contents for a Dokieli document\n ** The dokeili system allows the user to edit a document including anotations\n ** review. It does not use turtle, but RDF/a\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport * as mime from 'mime-types'\n\n// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok\n\nimport DOKIELI_TEMPLATE from './new.js' // Distributed with this library\n\nexport default {\n icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?\n\n name: 'Dokieli',\n\n mintClass: UI.ns.solid('DokieliDocument'), // @@ A better class?\n\n // Don't provide viewing - let humanReadablePane handle that with appropriate icon\n label: function (subject, context) {\n return null // Viewing now handled by humanReadablePane\n },\n\n // Create a new folder in a Solid system, with a dokieli editable document in it\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n let newInstance = newPaneOptions.newInstance\n if (!newInstance) {\n let uri = newPaneOptions.newBase\n if (uri.endsWith('/')) {\n uri = uri.slice(0, -1)\n newPaneOptions.newBase = uri\n }\n newInstance = kb.sym(uri)\n }\n\n const contentType = mime.lookup(newInstance.uri)\n if (!contentType || !contentType.includes('html')) {\n newInstance = $rdf.sym(newInstance.uri + '.html')\n }\n newPaneOptions.newInstance = newInstance // Save for creation system\n\n // console.log('New dokieli will make: ' + newInstance)\n\n let htmlContents = DOKIELI_TEMPLATE\n let filename = newInstance.uri.split('/').slice(-1)[0]\n filename = decodeURIComponent(filename.split('.')[0])\n const encodedTitle = filename\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n htmlContents = htmlContents.replace('<title>', '<title>' + encodedTitle)\n htmlContents = htmlContents.replace(\n '</article>',\n '<h1>' + encodedTitle + '</h1></article>'\n )\n // console.log('@@ New HTML for Dok:' + htmlContents)\n return new Promise(function (resolve) {\n kb.fetcher\n .webOperation('PUT', newInstance.uri, {\n data: htmlContents,\n contentType: 'text/html'\n })\n .then(function () {\n console.log(\n 'new Dokieli document created at ' + newPaneOptions.newInstance\n )\n resolve(newPaneOptions)\n })\n .catch(function (err) {\n console.log(\n 'Error creating dokieli doc at ' +\n newPaneOptions.newInstance +\n ': ' +\n err\n )\n })\n })\n }\n\n // render: removed - now handled by humanReadablePane with appropriate dokieli icon\n}\n// ends\n"],"mappings":"6MAeA,IAAA,EAAe,CACb,KAAMA,EAAG,MAAM,SAAW,mBAE1B,KAAM,UAEN,UAAWA,EAAG,GAAG,MAAM,iBAAiB,EAGxC,MAAO,SAAU,EAAS,EAAS,CACjC,OAAO,IACT,EAGA,QAAS,SAAU,EAAS,EAAgB,CAC1C,IAAM,EAAK,EAAQ,QAAQ,MACvB,EAAc,EAAe,YACjC,GAAI,CAAC,EAAa,CAChB,IAAI,EAAM,EAAe,QACrB,EAAI,SAAS,GAAG,IAClB,EAAM,EAAI,MAAM,EAAG,EAAE,EACrB,EAAe,QAAU,GAE3B,EAAc,EAAG,IAAI,CAAG,CAC1B,CAEA,IAAM,EAAcC,EAAK,OAAO,EAAY,GAAG,GAC3C,CAAC,GAAe,CAAC,EAAY,SAAS,MAAM,KAC9C,EAAcC,EAAK,IAAI,EAAY,IAAM,OAAO,GAElD,EAAe,YAAc,EAI7B,IAAI,EAAeC,EAAAA,QACf,EAAW,EAAY,IAAI,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GACpD,EAAW,mBAAmB,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE,EACpD,IAAM,EAAe,EAClB,QAAQ,KAAM,OAAO,CAAC,CACtB,QAAQ,KAAM,MAAM,CAAC,CACrB,QAAQ,KAAM,MAAM,EAOvB,MANA,GAAe,EAAa,QAAQ,UAAW,UAAY,CAAY,EACvE,EAAe,EAAa,QAC1B,aACA,OAAS,EAAe,iBAC1B,EAEO,IAAI,QAAQ,SAAU,EAAS,CACpC,EAAG,QACA,aAAa,MAAO,EAAY,IAAK,CACpC,KAAM,EACN,YAAa,WACf,CAAC,CAAC,CACD,KAAK,UAAY,CAChB,QAAQ,IACN,mCAAqC,EAAe,WACtD,EACA,EAAQ,CAAc,CACxB,CAAC,CAAC,CACD,MAAM,SAAU,EAAK,CACpB,QAAQ,IACN,iCACE,EAAe,YACf,KACA,CACJ,CACF,CAAC,CACL,CAAC,CACH,CAGF"}
@@ -0,0 +1,39 @@
1
+ import e from "./new.esm.js";
2
+ import * as t from "solid-ui";
3
+ import * as n from "rdflib";
4
+ import * as r from "mime-types";
5
+ //#region src/dokieli/dokieliPane.js
6
+ var i = {
7
+ icon: t.icons.iconBase + "dokieli-logo.png",
8
+ name: "Dokieli",
9
+ mintClass: t.ns.solid("DokieliDocument"),
10
+ label: function(e, t) {
11
+ return null;
12
+ },
13
+ mintNew: function(t, i) {
14
+ let a = t.session.store, o = i.newInstance;
15
+ if (!o) {
16
+ let e = i.newBase;
17
+ e.endsWith("/") && (e = e.slice(0, -1), i.newBase = e), o = a.sym(e);
18
+ }
19
+ let s = r.lookup(o.uri);
20
+ (!s || !s.includes("html")) && (o = n.sym(o.uri + ".html")), i.newInstance = o;
21
+ let c = e, l = o.uri.split("/").slice(-1)[0];
22
+ l = decodeURIComponent(l.split(".")[0]);
23
+ let u = l.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
24
+ return c = c.replace("<title>", "<title>" + u), c = c.replace("</article>", "<h1>" + u + "</h1></article>"), new Promise(function(e) {
25
+ a.fetcher.webOperation("PUT", o.uri, {
26
+ data: c,
27
+ contentType: "text/html"
28
+ }).then(function() {
29
+ console.log("new Dokieli document created at " + i.newInstance), e(i);
30
+ }).catch(function(e) {
31
+ console.log("Error creating dokieli doc at " + i.newInstance + ": " + e);
32
+ });
33
+ });
34
+ }
35
+ };
36
+ //#endregion
37
+ export { i as default };
38
+
39
+ //# sourceMappingURL=dokieliPane.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dokieliPane.esm.js","names":[],"sources":["../../src/dokieli/dokieliPane.js"],"sourcesContent":["/* Human-readable editable \"Dokieli\" Pane\n **\n ** This outline pane contains the document contents for a Dokieli document\n ** The dokeili system allows the user to edit a document including anotations\n ** review. It does not use turtle, but RDF/a\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport * as mime from 'mime-types'\n\n// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok\n\nimport DOKIELI_TEMPLATE from './new.js' // Distributed with this library\n\nexport default {\n icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?\n\n name: 'Dokieli',\n\n mintClass: UI.ns.solid('DokieliDocument'), // @@ A better class?\n\n // Don't provide viewing - let humanReadablePane handle that with appropriate icon\n label: function (subject, context) {\n return null // Viewing now handled by humanReadablePane\n },\n\n // Create a new folder in a Solid system, with a dokieli editable document in it\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n let newInstance = newPaneOptions.newInstance\n if (!newInstance) {\n let uri = newPaneOptions.newBase\n if (uri.endsWith('/')) {\n uri = uri.slice(0, -1)\n newPaneOptions.newBase = uri\n }\n newInstance = kb.sym(uri)\n }\n\n const contentType = mime.lookup(newInstance.uri)\n if (!contentType || !contentType.includes('html')) {\n newInstance = $rdf.sym(newInstance.uri + '.html')\n }\n newPaneOptions.newInstance = newInstance // Save for creation system\n\n // console.log('New dokieli will make: ' + newInstance)\n\n let htmlContents = DOKIELI_TEMPLATE\n let filename = newInstance.uri.split('/').slice(-1)[0]\n filename = decodeURIComponent(filename.split('.')[0])\n const encodedTitle = filename\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n htmlContents = htmlContents.replace('<title>', '<title>' + encodedTitle)\n htmlContents = htmlContents.replace(\n '</article>',\n '<h1>' + encodedTitle + '</h1></article>'\n )\n // console.log('@@ New HTML for Dok:' + htmlContents)\n return new Promise(function (resolve) {\n kb.fetcher\n .webOperation('PUT', newInstance.uri, {\n data: htmlContents,\n contentType: 'text/html'\n })\n .then(function () {\n console.log(\n 'new Dokieli document created at ' + newPaneOptions.newInstance\n )\n resolve(newPaneOptions)\n })\n .catch(function (err) {\n console.log(\n 'Error creating dokieli doc at ' +\n newPaneOptions.newInstance +\n ': ' +\n err\n )\n })\n })\n }\n\n // render: removed - now handled by humanReadablePane with appropriate dokieli icon\n}\n// ends\n"],"mappings":";;;;;AAeA,IAAA,IAAe;CACb,MAAM,EAAG,MAAM,WAAW;CAE1B,MAAM;CAEN,WAAW,EAAG,GAAG,MAAM,iBAAiB;CAGxC,OAAO,SAAU,GAAS,GAAS;EACjC,OAAO;CACT;CAGA,SAAS,SAAU,GAAS,GAAgB;EAC1C,IAAM,IAAK,EAAQ,QAAQ,OACvB,IAAc,EAAe;EACjC,IAAI,CAAC,GAAa;GAChB,IAAI,IAAM,EAAe;GAKzB,AAJI,EAAI,SAAS,GAAG,MAClB,IAAM,EAAI,MAAM,GAAG,EAAE,GACrB,EAAe,UAAU,IAE3B,IAAc,EAAG,IAAI,CAAG;EAC1B;EAEA,IAAM,IAAc,EAAK,OAAO,EAAY,GAAG;EAI/C,CAHI,CAAC,KAAe,CAAC,EAAY,SAAS,MAAM,OAC9C,IAAc,EAAK,IAAI,EAAY,MAAM,OAAO,IAElD,EAAe,cAAc;EAI7B,IAAI,IAAe,GACf,IAAW,EAAY,IAAI,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;EACpD,IAAW,mBAAmB,EAAS,MAAM,GAAG,CAAC,CAAC,EAAE;EACpD,IAAM,IAAe,EAClB,QAAQ,MAAM,OAAO,CAAC,CACtB,QAAQ,MAAM,MAAM,CAAC,CACrB,QAAQ,MAAM,MAAM;EAOvB,OANA,IAAe,EAAa,QAAQ,WAAW,YAAY,CAAY,GACvE,IAAe,EAAa,QAC1B,cACA,SAAS,IAAe,iBAC1B,GAEO,IAAI,QAAQ,SAAU,GAAS;GACpC,EAAG,QACA,aAAa,OAAO,EAAY,KAAK;IACpC,MAAM;IACN,aAAa;GACf,CAAC,CAAC,CACD,KAAK,WAAY;IAIhB,AAHA,QAAQ,IACN,qCAAqC,EAAe,WACtD,GACA,EAAQ,CAAc;GACxB,CAAC,CAAC,CACD,MAAM,SAAU,GAAK;IACpB,QAAQ,IACN,mCACE,EAAe,cACf,OACA,CACJ;GACF,CAAC;EACL,CAAC;CACH;AAGF"}
@@ -1,10 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- const DOKIELI_TEMPLATE = `<!DOCTYPE html>
1
+ var e=`<!DOCTYPE html>
8
2
  <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
9
3
  <head>
10
4
  <meta charset="utf-8" />
@@ -12,7 +6,7 @@ const DOKIELI_TEMPLATE = `<!DOCTYPE html>
12
6
  <meta content="width=device-width, initial-scale=1" name="viewport" />
13
7
  <link href="https://dokie.li/media/css/basic.css" media="all" rel="stylesheet" title="Basic" />
14
8
  <link href="https://dokie.li/media/css/dokieli.css" media="all" rel="stylesheet" />
15
- <script src="https://dokie.li/scripts/dokieli.js"></script>
9
+ <script src="https://dokie.li/scripts/dokieli.js"><\/script>
16
10
  </head>
17
11
 
18
12
  <body about="" prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#" typeof="schema:CreativeWork prov:Entity">
@@ -23,5 +17,5 @@ const DOKIELI_TEMPLATE = `<!DOCTYPE html>
23
17
  </main>
24
18
  </body>
25
19
  </html>
26
- `;
27
- var _default = exports.default = DOKIELI_TEMPLATE;
20
+ `;exports.default=e;
21
+ //# sourceMappingURL=new.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new.cjs.js","names":[],"sources":["../../src/dokieli/new.js"],"sourcesContent":["const DOKIELI_TEMPLATE = `<!DOCTYPE html>\n<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\" />\n <title></title>\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <link href=\"https://dokie.li/media/css/basic.css\" media=\"all\" rel=\"stylesheet\" title=\"Basic\" />\n <link href=\"https://dokie.li/media/css/dokieli.css\" media=\"all\" rel=\"stylesheet\" />\n <script src=\"https://dokie.li/scripts/dokieli.js\"></script>\n </head>\n\n <body about=\"\" prefix=\"rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#\" typeof=\"schema:CreativeWork prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>\n`\n\nexport default DOKIELI_TEMPLATE\n"],"mappings":"AAAA,IAAM,EAAmB"}
@@ -0,0 +1,6 @@
1
+ //#region src/dokieli/new.js
2
+ var e = "<!DOCTYPE html>\n<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\" />\n <title></title>\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <link href=\"https://dokie.li/media/css/basic.css\" media=\"all\" rel=\"stylesheet\" title=\"Basic\" />\n <link href=\"https://dokie.li/media/css/dokieli.css\" media=\"all\" rel=\"stylesheet\" />\n <script src=\"https://dokie.li/scripts/dokieli.js\"><\/script>\n </head>\n\n <body about=\"\" prefix=\"rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#\" typeof=\"schema:CreativeWork prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>\n";
3
+ //#endregion
4
+ export { e as default };
5
+
6
+ //# sourceMappingURL=new.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new.esm.js","names":[],"sources":["../../src/dokieli/new.js"],"sourcesContent":["const DOKIELI_TEMPLATE = `<!DOCTYPE html>\n<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\" />\n <title></title>\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <link href=\"https://dokie.li/media/css/basic.css\" media=\"all\" rel=\"stylesheet\" title=\"Basic\" />\n <link href=\"https://dokie.li/media/css/dokieli.css\" media=\"all\" rel=\"stylesheet\" />\n <script src=\"https://dokie.li/scripts/dokieli.js\"></script>\n </head>\n\n <body about=\"\" prefix=\"rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#\" typeof=\"schema:CreativeWork prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>\n`\n\nexport default DOKIELI_TEMPLATE\n"],"mappings":";AAAA,IAAM,IAAmB"}
@@ -0,0 +1,4 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.formPane a,.formPane a:link{color:var(--color-text-link,#3b5998);text-decoration:none}.formPane a:visited{color:var(--color-text-link-visited,#3b5998);text-decoration:none}.formPane a:hover{color:var(--color-text-link-hover,#3b5998);font-weight:700}.formPane a:active{color:var(--color-text-link-active,#888);text-decoration:none}.formPane__message,.formPaneMessage{color:#666;margin:var(--spacing-xs,.5em) 0;padding:var(--spacing-xs,.35em) var(--spacing-xs,.5em)}.formPane__message--info{background-color:var(--color-main-block-bg,#eee)}.formPane__message--error{background-color:var(--color-log-error-bg,#fee)}.formPane__editButton{padding:var(--spacing-xs,.5rem);float:none;border:.5rem solid #fff;align-self:center;margin-left:auto;font-size:100%}.formPane .formPane__mobileTextareaValue>div{min-width:0;display:block;position:relative}.formPane .formPane__mobileTextareaValue>div>textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.formPane .formPane__mobileTextareaValue>div>button[type=button]{position:absolute;top:0;right:0;float:none!important}.formPane[data-layout=mobile] .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane[data-layout=mobile] .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane[data-layout=mobile] .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane[data-layout=mobile] .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}@media (width<=960px){.formPane .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-ui");t=e.__toESM(t);let n=require("solid-logic"),r=require("rdflib");r=e.__toESM(r);var i=t.ns;function a(e){return e?.termType===`NamedNode`}function o(e,t){let n=t.doc?t.doc():void 0,r=e.each(t,i.rdf(`type`),void 0,n).filter(a),s=r.some(e=>e.sameTerm(i.ui(`Group`))),c=r.some(e=>!e.sameTerm(i.ui(`Group`))&&!e.sameTerm(i.ui(`Form`))),l=!!e.any(t,i.ui(`property`),void 0,n),u=e.any(t,i.ui(`parts`),void 0,n),d=!!u?.elements?.length||e.each(t,i.ui(`part`),void 0,n).length>0;s&&c&&l&&!d&&e.removeMany(t,i.rdf(`type`),i.ui(`Group`),n);let f=u?.elements??[];for(let t of f)a(t)&&o(e,t);let p=e.each(t,i.ui(`part`),void 0,n);for(let t of p)a(t)&&o(e,t)}function s(e){let t=Array.from(e.querySelectorAll(`textarea`));for(let e of t){let t=e.parentElement;for(;t;){let e=t.firstElementChild;if(e&&(e.classList.contains(`formFieldName`)||e.querySelector(`a`)!==null)&&t.children.length>=2){t.classList.add(`formPane__mobileTextareaRow`),e.classList.add(`formPane__mobileTextareaLabel`),t.children[1].classList.add(`formPane__mobileTextareaValue`);break}t=t.parentElement}}}var c={icon:t.icons.iconBase+`noun_122196.svg`,name:`form`,audience:[i.solid(`PowerUser`)],label:function(e,n){let r=t.widgets.formsFor(e).length;return t.log.debug(`Form pane: forms for `+e+`: `+r),r?``+r+` forms`:null},render:function(e,c){let l=c.session.store,u=c.dom,d=u.createElement(`div`);d.setAttribute(`class`,`formPane`);function f(e){let t=c.environment??{};e.dataset.layout=t.layout??`desktop`}f(d);let p=function(e,t=`info`){let n=u.createElement(`p`);return n.className=`formPane__message formPane__message--${t}`,d.appendChild(n).textContent=e,n},m=function(e){return p(e,`error`)},h=function(e,t){e||m(`Sorry, failed to save your change:
2
+ `+t)},g=n.authn.currentUser();g?l.each(g,i.ui(`workspace`)).length===0&&p(`You don't seem to have any workspaces defined. A workspace is a place on the web (http://..) or in the file system (file:///) to store application data.
3
+ `):p(`You are not logged in. If you log in and have workspaces then you would be able to select workspace in which to put this new information`);let _=function(e,n){l.fetcher.nowOrWhenFetched(e.uri,n,function(i,a){if(!i)return m(`Cannot load store `+e.uri+`: `+a);let c=t.widgets.formsFor(n);for(let i of c){o(l,i);let a=u.createElement(`h4`);if(a.classList.add(`formPane__heading`),d.appendChild(a),i.uri){let e=r.Util.uri.document(i.uri);e.uri!==i.uri&&d.appendChild(t.widgets.editFormButton(u,d,i,e,h)).classList.add(`formPane__editButton`)}let c=u.createElement(`a`);c.classList.add(`formPane__headingLink`),c.setAttribute(`href`,i.uri),a.insertBefore(c,a.firstChild),c.textContent=t.utils.label(i,!0),t.widgets.appendForm(u,d,{},n,i,e,h),s(d)}})},v=null,y=r.Util.uri.docpart(e.uri);l.updater.editable(y,l)&&(v=e.doc());let b=l.any(l.sym(y),i.link(`annotationStore`));if(!v&&a(b)&&(v=b),!v){let t=new Map;l.statementsMatching(e).forEach(function(e){e.why.value&&t.set(e.why.value,1)}),l.statementsMatching(void 0,void 0,e).forEach(function(e){e.why.value&&t.set(e.why.value,2)});let n=Array.from(t.entries()).sort(function([e,t],[n,r]){return t-r||e.localeCompare(n)});for(let[e]of n)if(e&&l.updater.editable(e,l)){v=l.sym(e);break}}let x=`2014`;if(v)_(v,e);else{m(`No suitable store is known, to edit <`+e.uri+`>.`);let n=t.login.selectWorkspace(u,{noun:`form`,appPathSegment:`form`},function(t){let n=t?l.sym(t):null;if(!n){m(`Workspace selection was cancelled.`);return}p(`Workspace selected OK: `+n.uri);let r=l.each(void 0,i.space(`workspace`),n).filter(a);for(let t=0;t<r.length;t++){let n=r[t],o=l.any(n,i.space(`store`)),s=l.any(n,i.cal(`dtstart`))?.value,c=l.any(n,i.cal(`dtend`))?.value;if(a(o)&&s&&c&&s<=x&&c>x){_(o,e);break}m(`Note no suitable annotation store in activity: `+n)}});d.appendChild(n)}return d}};exports.formPane=c;
4
+ //# sourceMappingURL=pane.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pane.cjs.js","names":[],"sources":["../../src/form/pane.ts"],"sourcesContent":["/*\n ** Pane for running existing forms for any object\n **\n */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport type { RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './formPane.css'\nconst ns = UI.ns\n\ntype WorkspaceSelectionDetails = {\n noun: string\n appPathSegment: string\n}\n\nfunction isNamedNode (term: { termType?: string } | null | undefined): term is NamedNode {\n return term?.termType === 'NamedNode'\n}\n\n/* The following helper was generated by AI GPT-5.4 Model */\n/* Prompt: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing. */\nfunction normalizeAmbiguousFieldTypes (store: typeof $rdf.graph extends () => infer T ? T : never, form: NamedNode): void {\n const formDoc = form.doc ? form.doc() : undefined\n const types = store.each(form, ns.rdf('type'), undefined, formDoc).filter(isNamedNode)\n const hasGroupType = types.some(type => type.sameTerm(ns.ui('Group')))\n const hasOtherFieldType = types.some(type => !type.sameTerm(ns.ui('Group')) && !type.sameTerm(ns.ui('Form')))\n const hasProperty = !!store.any(form, ns.ui('property'), undefined, formDoc)\n const partsList = store.any(form, ns.ui('parts'), undefined, formDoc) as { elements?: unknown[] } | null\n const hasParts = !!partsList?.elements?.length || store.each(form, ns.ui('part'), undefined, formDoc).length > 0\n\n // Some legacy forms mark a leaf field as both ui:Group and a concrete input type.\n // solid-ui may then choose the Group renderer and produce an empty nested box.\n if (hasGroupType && hasOtherFieldType && hasProperty && !hasParts) {\n store.removeMany(form, ns.rdf('type'), ns.ui('Group'), formDoc)\n }\n\n const listParts = partsList?.elements ?? []\n for (const part of listParts) {\n if (isNamedNode(part as { termType?: string })) {\n normalizeAmbiguousFieldTypes(store, part as NamedNode)\n }\n }\n\n const unorderedParts = store.each(form, ns.ui('part'), undefined, formDoc)\n for (const part of unorderedParts) {\n if (isNamedNode(part)) {\n normalizeAmbiguousFieldTypes(store, part)\n }\n }\n}\n\nfunction tagMobileTextareaRows (renderedForm: HTMLElement): void {\n const textareas = Array.from(renderedForm.querySelectorAll('textarea'))\n\n for (const textarea of textareas) {\n let row: HTMLDivElement | null = textarea.parentElement as HTMLDivElement | null\n\n while (row) {\n const firstChild = row.firstElementChild as HTMLElement | null\n const hasLabelColumn = !!firstChild && (\n firstChild.classList.contains('formFieldName') ||\n firstChild.querySelector('a') !== null\n )\n\n if (hasLabelColumn && row.children.length >= 2) {\n row.classList.add('formPane__mobileTextareaRow')\n firstChild.classList.add('formPane__mobileTextareaLabel')\n const valueColumn = row.children[1] as HTMLElement\n valueColumn.classList.add('formPane__mobileTextareaValue')\n break\n }\n\n row = row.parentElement as HTMLDivElement | null\n }\n }\n}\n\nexport const formPane: PaneDefinition = {\n icon: UI.icons.iconBase + 'noun_122196.svg',\n\n name: 'form',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject: NamedNode, _context: DataBrowserContext): string | null {\n const n = UI.widgets.formsFor(subject).length\n UI.log.debug('Form pane: forms for ' + subject + ': ' + n)\n if (!n) return null\n return '' + n + ' forms'\n },\n\n render: function (subject: NamedNode, context: DataBrowserContext): HTMLDivElement {\n const kb = context.session.store\n const dom = context.dom\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane')\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n applyEnvironmentAttributes(box)\n\n const mention = function (\n message: string,\n modifier: 'info' | 'error' = 'info'\n ): HTMLParagraphElement {\n const pre = dom.createElement('p')\n pre.className = `formPane__message formPane__message--${modifier}`\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function (message: string): HTMLParagraphElement {\n return mention(message, 'error')\n }\n\n const complainIfBad = function (ok: boolean, body: string): void {\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 // The question of where to store this data about subject\n // This in general needs a whole lot more thought\n // and it connects to the discoverbility through links\n\n // const t = kb.findTypeURIs(subject)\n\n const me = authn.currentUser()\n\n if (!me) {\n mention(\n 'You are not logged in. If you log in and have ' +\n 'workspaces then you would be able to select workspace in which ' +\n 'to put this new information'\n )\n } else {\n const ws = kb.each(me, ns.ui('workspace'))\n if (ws.length === 0) {\n mention(\n 'You don\\'t seem to have any workspaces defined. ' +\n 'A workspace is a place on the web (http://..) or in ' +\n 'the file system (file:///) to store application data.\\n'\n )\n } else {\n // @@\n }\n }\n\n // Render forms using a given store\n\n const renderFormsFor = function (storeNode: NamedNode, targetSubject: NamedNode): void {\n kb.fetcher.nowOrWhenFetched(\n storeNode.uri,\n targetSubject as unknown as Parameters<typeof kb.fetcher.nowOrWhenFetched>[1],\n function (ok, body) {\n if (!ok) return complain('Cannot load store ' + storeNode.uri + ': ' + body)\n\n // Render the forms\n\n const forms = UI.widgets.formsFor(targetSubject) as NamedNode[]\n\n // complain('Form for editing this form:');\n for (const form of forms) {\n normalizeAmbiguousFieldTypes(kb as never, form)\n\n const heading = dom.createElement('h4')\n heading.classList.add('formPane__heading')\n box.appendChild(heading)\n /* The edit Form is not working in the local environment. it does not find\n the ui FormForm ontology. Need to research further and check in production. */\n if (form.uri) {\n const formStore = $rdf.Util.uri.document(form.uri)\n if (formStore.uri !== form.uri) {\n const editButton = box.appendChild(\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formStore,\n complainIfBad\n )\n )\n editButton.classList.add('formPane__editButton')\n }\n }\n\n const anchor = dom.createElement('a')\n anchor.classList.add('formPane__headingLink')\n anchor.setAttribute('href', form.uri)\n heading.insertBefore(anchor, heading.firstChild)\n anchor.textContent = UI.utils.label(form, true)\n\n /* Keep tis as a reminder to let a New one have its URI given by user\n mention(\"Where will this information be stored?\")\n const ele = dom.createElement('input');\n box.appendChild(ele);\n ele.setAttribute('type', 'text');\n ele.setAttribute('size', '72');\n ele.setAttribute('maxlength', '1024');\n ele.setAttribute('style', 'font-size: 80%; color:#222;');\n ele.value = store.uri\n */\n\n UI.widgets.appendForm(\n dom,\n box,\n {},\n targetSubject,\n form,\n storeNode,\n complainIfBad\n )\n tagMobileTextareaRows(box)\n }\n }\n ) // end: when store loded\n } // renderFormsFor\n\n // Figure out what store\n\n // Which places are editable and have stuff about the subject?\n\n let targetStore: NamedNode | null = null\n\n // 1. The document URI of the subject itself\n const docuri = $rdf.Util.uri.docpart(subject.uri)\n if (kb.updater.editable(docuri, kb)) {\n targetStore = subject.doc()\n } // an editable data file with hash\n\n const annotationStore = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!targetStore && isNamedNode(annotationStore)) {\n targetStore = annotationStore\n }\n\n // 2. where stuff is already stored\n if (!targetStore) {\n const docs = new Map<string, number>()\n kb.statementsMatching(subject).forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 1)\n }\n })\n kb\n .statementsMatching(undefined, undefined, subject)\n .forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 2)\n }\n })\n const docList = Array.from(docs.entries()).sort(function ([uriA, scoreA], [uriB, scoreB]) {\n return scoreA - scoreB || uriA.localeCompare(uriB)\n })\n for (const [uri] of docList) {\n if (uri && kb.updater.editable(uri, kb)) {\n targetStore = kb.sym(uri)\n break\n }\n }\n }\n\n // 3. In a workspace store\n const date = '2014' // @@@@@@@@@@@@ pass as parameter\n\n if (targetStore) {\n // mention(\"@@ Ok, we have a store <\" + store.uri + \">.\");\n renderFormsFor(targetStore, subject)\n } else {\n complain('No suitable store is known, to edit <' + subject.uri + '>.')\n const workspaceDetails: WorkspaceSelectionDetails = {\n noun: 'form',\n appPathSegment: 'form'\n }\n const foobarbaz = UI.login.selectWorkspace(dom, workspaceDetails, function (workspaceUri: string | null) {\n const workspace = workspaceUri ? kb.sym(workspaceUri) : null\n if (!workspace) {\n complain('Workspace selection was cancelled.')\n return\n }\n mention('Workspace selected OK: ' + workspace.uri)\n\n const activities = kb.each(undefined, ns.space('workspace'), workspace).filter(isNamedNode)\n for (let j = 0; j < activities.length; j++) {\n const act = activities[j]\n\n const subjectDoc2 = kb.any(act, ns.space('store'))\n const start = kb.any(act, ns.cal('dtstart'))?.value\n const end = kb.any(act, ns.cal('dtend'))?.value\n if (isNamedNode(subjectDoc2) && start && end && start <= date && end > date) {\n renderFormsFor(subjectDoc2, subject)\n break\n } else {\n complain('Note no suitable annotation store in activity: ' + act)\n }\n }\n })\n box.appendChild(foobarbaz)\n }\n\n return box\n }\n}\n"],"mappings":"8LAYA,IAAM,EAAK,EAAG,GAOd,SAAS,EAAa,EAAmE,CACvF,OAAO,GAAM,WAAa,WAC5B,CAIA,SAAS,EAA8B,EAA4D,EAAuB,CACxH,IAAM,EAAU,EAAK,IAAM,EAAK,IAAI,EAAI,IAAA,GAClC,EAAQ,EAAM,KAAK,EAAM,EAAG,IAAI,MAAM,EAAG,IAAA,GAAW,CAAO,CAAC,CAAC,OAAO,CAAW,EAC/E,EAAe,EAAM,KAAK,GAAQ,EAAK,SAAS,EAAG,GAAG,OAAO,CAAC,CAAC,EAC/D,EAAoB,EAAM,KAAK,GAAQ,CAAC,EAAK,SAAS,EAAG,GAAG,OAAO,CAAC,GAAK,CAAC,EAAK,SAAS,EAAG,GAAG,MAAM,CAAC,CAAC,EACtG,EAAc,CAAC,CAAC,EAAM,IAAI,EAAM,EAAG,GAAG,UAAU,EAAG,IAAA,GAAW,CAAO,EACrE,EAAY,EAAM,IAAI,EAAM,EAAG,GAAG,OAAO,EAAG,IAAA,GAAW,CAAO,EAC9D,EAAW,CAAC,CAAC,GAAW,UAAU,QAAU,EAAM,KAAK,EAAM,EAAG,GAAG,MAAM,EAAG,IAAA,GAAW,CAAO,CAAC,CAAC,OAAS,EAI3G,GAAgB,GAAqB,GAAe,CAAC,GACvD,EAAM,WAAW,EAAM,EAAG,IAAI,MAAM,EAAG,EAAG,GAAG,OAAO,EAAG,CAAO,EAGhE,IAAM,EAAY,GAAW,UAAY,CAAC,EAC1C,IAAK,IAAM,KAAQ,EACb,EAAY,CAA6B,GAC3C,EAA6B,EAAO,CAAi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B,EAAU,GAAG,EAEjD,IAAM,EAAa,EAAG,KAAK,IAAA,GAAW,EAAG,MAAM,WAAW,EAAG,CAAS,CAAC,CAAC,OAAO,CAAW,EAC1F,IAAK,IAAI,EAAI,EAAG,EAAI,EAAW,OAAQ,IAAK,CAC1C,IAAM,EAAM,EAAW,GAEjB,EAAc,EAAG,IAAI,EAAK,EAAG,MAAM,OAAO,CAAC,EAC3C,EAAQ,EAAG,IAAI,EAAK,EAAG,IAAI,SAAS,CAAC,CAAC,EAAE,MACxC,EAAM,EAAG,IAAI,EAAK,EAAG,IAAI,OAAO,CAAC,CAAC,EAAE,MAC1C,GAAI,EAAY,CAAW,GAAK,GAAS,GAAO,GAAS,GAAQ,EAAM,EAAM,CAC3E,EAAe,EAAa,CAAO,EACnC,KACF,CACE,EAAS,kDAAoD,CAAG,CAEpE,CACF,CAAC,EACD,EAAI,YAAY,CAAS,CAC3B,CAEA,OAAO,CACT,CACF"}
@@ -1,4 +1,3 @@
1
- import type { PaneDefinition } from 'pane-registry';
2
- import './formPane.css';
1
+ import { PaneDefinition } from '../../node_modules/pane-registry';
3
2
  export declare const formPane: PaneDefinition;
4
3
  //# sourceMappingURL=pane.d.ts.map
@@ -0,0 +1,122 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.formPane a,.formPane a:link{color:var(--color-text-link,#3b5998);text-decoration:none}.formPane a:visited{color:var(--color-text-link-visited,#3b5998);text-decoration:none}.formPane a:hover{color:var(--color-text-link-hover,#3b5998);font-weight:700}.formPane a:active{color:var(--color-text-link-active,#888);text-decoration:none}.formPane__message,.formPaneMessage{color:#666;margin:var(--spacing-xs,.5em) 0;padding:var(--spacing-xs,.35em) var(--spacing-xs,.5em)}.formPane__message--info{background-color:var(--color-main-block-bg,#eee)}.formPane__message--error{background-color:var(--color-log-error-bg,#fee)}.formPane__editButton{padding:var(--spacing-xs,.5rem);float:none;border:.5rem solid #fff;align-self:center;margin-left:auto;font-size:100%}.formPane .formPane__mobileTextareaValue>div{min-width:0;display:block;position:relative}.formPane .formPane__mobileTextareaValue>div>textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.formPane .formPane__mobileTextareaValue>div>button[type=button]{position:absolute;top:0;right:0;float:none!important}.formPane[data-layout=mobile] .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane[data-layout=mobile] .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane[data-layout=mobile] .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane[data-layout=mobile] .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}@media (width<=960px){.formPane .formPane__mobileTextareaRow{align-items:stretch;flex-direction:column!important}.formPane .formPane__mobileTextareaLabel{padding-bottom:0;width:auto!important}.formPane .formPane__mobileTextareaValue{box-sizing:border-box;min-width:0;padding-right:var(--spacing-sm,.75rem);width:100%}.formPane .formPane__mobileTextareaValue textarea{box-sizing:border-box;width:100%;max-width:100%;margin-left:0!important;margin-right:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
+ import * as e from "solid-ui";
3
+ import { authn as t } from "solid-logic";
4
+ import * as n from "rdflib";
5
+ //#region src/form/pane.ts
6
+ var r = e.ns;
7
+ function i(e) {
8
+ return e?.termType === "NamedNode";
9
+ }
10
+ function a(e, t) {
11
+ let n = t.doc ? t.doc() : void 0, o = e.each(t, r.rdf("type"), void 0, n).filter(i), s = o.some((e) => e.sameTerm(r.ui("Group"))), c = o.some((e) => !e.sameTerm(r.ui("Group")) && !e.sameTerm(r.ui("Form"))), l = !!e.any(t, r.ui("property"), void 0, n), u = e.any(t, r.ui("parts"), void 0, n), d = !!u?.elements?.length || e.each(t, r.ui("part"), void 0, n).length > 0;
12
+ s && c && l && !d && e.removeMany(t, r.rdf("type"), r.ui("Group"), n);
13
+ let f = u?.elements ?? [];
14
+ for (let t of f) i(t) && a(e, t);
15
+ let p = e.each(t, r.ui("part"), void 0, n);
16
+ for (let t of p) i(t) && a(e, t);
17
+ }
18
+ function o(e) {
19
+ let t = Array.from(e.querySelectorAll("textarea"));
20
+ for (let e of t) {
21
+ let t = e.parentElement;
22
+ for (; t;) {
23
+ let e = t.firstElementChild;
24
+ if (e && (e.classList.contains("formFieldName") || e.querySelector("a") !== null) && t.children.length >= 2) {
25
+ t.classList.add("formPane__mobileTextareaRow"), e.classList.add("formPane__mobileTextareaLabel"), t.children[1].classList.add("formPane__mobileTextareaValue");
26
+ break;
27
+ }
28
+ t = t.parentElement;
29
+ }
30
+ }
31
+ }
32
+ var s = {
33
+ icon: e.icons.iconBase + "noun_122196.svg",
34
+ name: "form",
35
+ audience: [r.solid("PowerUser")],
36
+ label: function(t, n) {
37
+ let r = e.widgets.formsFor(t).length;
38
+ return e.log.debug("Form pane: forms for " + t + ": " + r), r ? "" + r + " forms" : null;
39
+ },
40
+ render: function(s, c) {
41
+ let l = c.session.store, u = c.dom, d = u.createElement("div");
42
+ d.setAttribute("class", "formPane");
43
+ function f(e) {
44
+ let t = c.environment ?? {};
45
+ e.dataset.layout = t.layout ?? "desktop";
46
+ }
47
+ f(d);
48
+ let p = function(e, t = "info") {
49
+ let n = u.createElement("p");
50
+ return n.className = `formPane__message formPane__message--${t}`, d.appendChild(n).textContent = e, n;
51
+ }, m = function(e) {
52
+ return p(e, "error");
53
+ }, h = function(e, t) {
54
+ e || m("Sorry, failed to save your change:\n" + t);
55
+ }, g = t.currentUser();
56
+ g ? l.each(g, r.ui("workspace")).length === 0 && p("You don't seem to have any workspaces defined. A workspace is a place on the web (http://..) or in the file system (file:///) to store application data.\n") : p("You are not logged in. If you log in and have workspaces then you would be able to select workspace in which to put this new information");
57
+ let _ = function(t, r) {
58
+ l.fetcher.nowOrWhenFetched(t.uri, r, function(i, s) {
59
+ if (!i) return m("Cannot load store " + t.uri + ": " + s);
60
+ let c = e.widgets.formsFor(r);
61
+ for (let i of c) {
62
+ a(l, i);
63
+ let s = u.createElement("h4");
64
+ if (s.classList.add("formPane__heading"), d.appendChild(s), i.uri) {
65
+ let t = n.Util.uri.document(i.uri);
66
+ t.uri !== i.uri && d.appendChild(e.widgets.editFormButton(u, d, i, t, h)).classList.add("formPane__editButton");
67
+ }
68
+ let c = u.createElement("a");
69
+ c.classList.add("formPane__headingLink"), c.setAttribute("href", i.uri), s.insertBefore(c, s.firstChild), c.textContent = e.utils.label(i, !0), e.widgets.appendForm(u, d, {}, r, i, t, h), o(d);
70
+ }
71
+ });
72
+ }, v = null, y = n.Util.uri.docpart(s.uri);
73
+ l.updater.editable(y, l) && (v = s.doc());
74
+ let b = l.any(l.sym(y), r.link("annotationStore"));
75
+ if (!v && i(b) && (v = b), !v) {
76
+ let e = /* @__PURE__ */ new Map();
77
+ l.statementsMatching(s).forEach(function(t) {
78
+ t.why.value && e.set(t.why.value, 1);
79
+ }), l.statementsMatching(void 0, void 0, s).forEach(function(t) {
80
+ t.why.value && e.set(t.why.value, 2);
81
+ });
82
+ let t = Array.from(e.entries()).sort(function([e, t], [n, r]) {
83
+ return t - r || e.localeCompare(n);
84
+ });
85
+ for (let [e] of t) if (e && l.updater.editable(e, l)) {
86
+ v = l.sym(e);
87
+ break;
88
+ }
89
+ }
90
+ let x = "2014";
91
+ if (v) _(v, s);
92
+ else {
93
+ m("No suitable store is known, to edit <" + s.uri + ">.");
94
+ let t = e.login.selectWorkspace(u, {
95
+ noun: "form",
96
+ appPathSegment: "form"
97
+ }, function(e) {
98
+ let t = e ? l.sym(e) : null;
99
+ if (!t) {
100
+ m("Workspace selection was cancelled.");
101
+ return;
102
+ }
103
+ p("Workspace selected OK: " + t.uri);
104
+ let n = l.each(void 0, r.space("workspace"), t).filter(i);
105
+ for (let e = 0; e < n.length; e++) {
106
+ let t = n[e], a = l.any(t, r.space("store")), o = l.any(t, r.cal("dtstart"))?.value, c = l.any(t, r.cal("dtend"))?.value;
107
+ if (i(a) && o && c && o <= x && c > x) {
108
+ _(a, s);
109
+ break;
110
+ }
111
+ m("Note no suitable annotation store in activity: " + t);
112
+ }
113
+ });
114
+ d.appendChild(t);
115
+ }
116
+ return d;
117
+ }
118
+ };
119
+ //#endregion
120
+ export { s as formPane };
121
+
122
+ //# sourceMappingURL=pane.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pane.esm.js","names":[],"sources":["../../src/form/pane.ts"],"sourcesContent":["/*\n ** Pane for running existing forms for any object\n **\n */\n\nimport * as UI from 'solid-ui'\nimport { authn } from 'solid-logic'\nimport * as $rdf from 'rdflib'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport type { RenderEnvironment } from 'pane-registry'\nimport type { NamedNode, Statement } from 'rdflib'\nimport './formPane.css'\nconst ns = UI.ns\n\ntype WorkspaceSelectionDetails = {\n noun: string\n appPathSegment: string\n}\n\nfunction isNamedNode (term: { termType?: string } | null | undefined): term is NamedNode {\n return term?.termType === 'NamedNode'\n}\n\n/* The following helper was generated by AI GPT-5.4 Model */\n/* Prompt: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing. */\nfunction normalizeAmbiguousFieldTypes (store: typeof $rdf.graph extends () => infer T ? T : never, form: NamedNode): void {\n const formDoc = form.doc ? form.doc() : undefined\n const types = store.each(form, ns.rdf('type'), undefined, formDoc).filter(isNamedNode)\n const hasGroupType = types.some(type => type.sameTerm(ns.ui('Group')))\n const hasOtherFieldType = types.some(type => !type.sameTerm(ns.ui('Group')) && !type.sameTerm(ns.ui('Form')))\n const hasProperty = !!store.any(form, ns.ui('property'), undefined, formDoc)\n const partsList = store.any(form, ns.ui('parts'), undefined, formDoc) as { elements?: unknown[] } | null\n const hasParts = !!partsList?.elements?.length || store.each(form, ns.ui('part'), undefined, formDoc).length > 0\n\n // Some legacy forms mark a leaf field as both ui:Group and a concrete input type.\n // solid-ui may then choose the Group renderer and produce an empty nested box.\n if (hasGroupType && hasOtherFieldType && hasProperty && !hasParts) {\n store.removeMany(form, ns.rdf('type'), ns.ui('Group'), formDoc)\n }\n\n const listParts = partsList?.elements ?? []\n for (const part of listParts) {\n if (isNamedNode(part as { termType?: string })) {\n normalizeAmbiguousFieldTypes(store, part as NamedNode)\n }\n }\n\n const unorderedParts = store.each(form, ns.ui('part'), undefined, formDoc)\n for (const part of unorderedParts) {\n if (isNamedNode(part)) {\n normalizeAmbiguousFieldTypes(store, part)\n }\n }\n}\n\nfunction tagMobileTextareaRows (renderedForm: HTMLElement): void {\n const textareas = Array.from(renderedForm.querySelectorAll('textarea'))\n\n for (const textarea of textareas) {\n let row: HTMLDivElement | null = textarea.parentElement as HTMLDivElement | null\n\n while (row) {\n const firstChild = row.firstElementChild as HTMLElement | null\n const hasLabelColumn = !!firstChild && (\n firstChild.classList.contains('formFieldName') ||\n firstChild.querySelector('a') !== null\n )\n\n if (hasLabelColumn && row.children.length >= 2) {\n row.classList.add('formPane__mobileTextareaRow')\n firstChild.classList.add('formPane__mobileTextareaLabel')\n const valueColumn = row.children[1] as HTMLElement\n valueColumn.classList.add('formPane__mobileTextareaValue')\n break\n }\n\n row = row.parentElement as HTMLDivElement | null\n }\n }\n}\n\nexport const formPane: PaneDefinition = {\n icon: UI.icons.iconBase + 'noun_122196.svg',\n\n name: 'form',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject: NamedNode, _context: DataBrowserContext): string | null {\n const n = UI.widgets.formsFor(subject).length\n UI.log.debug('Form pane: forms for ' + subject + ': ' + n)\n if (!n) return null\n return '' + n + ' forms'\n },\n\n render: function (subject: NamedNode, context: DataBrowserContext): HTMLDivElement {\n const kb = context.session.store\n const dom = context.dom\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane')\n\n function applyEnvironmentAttributes (element: HTMLDivElement): void {\n const environment = (context.environment ?? {}) as Partial<RenderEnvironment>\n element.dataset.layout = environment.layout ?? 'desktop'\n }\n\n applyEnvironmentAttributes(box)\n\n const mention = function (\n message: string,\n modifier: 'info' | 'error' = 'info'\n ): HTMLParagraphElement {\n const pre = dom.createElement('p')\n pre.className = `formPane__message formPane__message--${modifier}`\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function (message: string): HTMLParagraphElement {\n return mention(message, 'error')\n }\n\n const complainIfBad = function (ok: boolean, body: string): void {\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 // The question of where to store this data about subject\n // This in general needs a whole lot more thought\n // and it connects to the discoverbility through links\n\n // const t = kb.findTypeURIs(subject)\n\n const me = authn.currentUser()\n\n if (!me) {\n mention(\n 'You are not logged in. If you log in and have ' +\n 'workspaces then you would be able to select workspace in which ' +\n 'to put this new information'\n )\n } else {\n const ws = kb.each(me, ns.ui('workspace'))\n if (ws.length === 0) {\n mention(\n 'You don\\'t seem to have any workspaces defined. ' +\n 'A workspace is a place on the web (http://..) or in ' +\n 'the file system (file:///) to store application data.\\n'\n )\n } else {\n // @@\n }\n }\n\n // Render forms using a given store\n\n const renderFormsFor = function (storeNode: NamedNode, targetSubject: NamedNode): void {\n kb.fetcher.nowOrWhenFetched(\n storeNode.uri,\n targetSubject as unknown as Parameters<typeof kb.fetcher.nowOrWhenFetched>[1],\n function (ok, body) {\n if (!ok) return complain('Cannot load store ' + storeNode.uri + ': ' + body)\n\n // Render the forms\n\n const forms = UI.widgets.formsFor(targetSubject) as NamedNode[]\n\n // complain('Form for editing this form:');\n for (const form of forms) {\n normalizeAmbiguousFieldTypes(kb as never, form)\n\n const heading = dom.createElement('h4')\n heading.classList.add('formPane__heading')\n box.appendChild(heading)\n /* The edit Form is not working in the local environment. it does not find\n the ui FormForm ontology. Need to research further and check in production. */\n if (form.uri) {\n const formStore = $rdf.Util.uri.document(form.uri)\n if (formStore.uri !== form.uri) {\n const editButton = box.appendChild(\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formStore,\n complainIfBad\n )\n )\n editButton.classList.add('formPane__editButton')\n }\n }\n\n const anchor = dom.createElement('a')\n anchor.classList.add('formPane__headingLink')\n anchor.setAttribute('href', form.uri)\n heading.insertBefore(anchor, heading.firstChild)\n anchor.textContent = UI.utils.label(form, true)\n\n /* Keep tis as a reminder to let a New one have its URI given by user\n mention(\"Where will this information be stored?\")\n const ele = dom.createElement('input');\n box.appendChild(ele);\n ele.setAttribute('type', 'text');\n ele.setAttribute('size', '72');\n ele.setAttribute('maxlength', '1024');\n ele.setAttribute('style', 'font-size: 80%; color:#222;');\n ele.value = store.uri\n */\n\n UI.widgets.appendForm(\n dom,\n box,\n {},\n targetSubject,\n form,\n storeNode,\n complainIfBad\n )\n tagMobileTextareaRows(box)\n }\n }\n ) // end: when store loded\n } // renderFormsFor\n\n // Figure out what store\n\n // Which places are editable and have stuff about the subject?\n\n let targetStore: NamedNode | null = null\n\n // 1. The document URI of the subject itself\n const docuri = $rdf.Util.uri.docpart(subject.uri)\n if (kb.updater.editable(docuri, kb)) {\n targetStore = subject.doc()\n } // an editable data file with hash\n\n const annotationStore = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!targetStore && isNamedNode(annotationStore)) {\n targetStore = annotationStore\n }\n\n // 2. where stuff is already stored\n if (!targetStore) {\n const docs = new Map<string, number>()\n kb.statementsMatching(subject).forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 1)\n }\n })\n kb\n .statementsMatching(undefined, undefined, subject)\n .forEach(function (st: Statement) {\n if (st.why.value) {\n docs.set(st.why.value, 2)\n }\n })\n const docList = Array.from(docs.entries()).sort(function ([uriA, scoreA], [uriB, scoreB]) {\n return scoreA - scoreB || uriA.localeCompare(uriB)\n })\n for (const [uri] of docList) {\n if (uri && kb.updater.editable(uri, kb)) {\n targetStore = kb.sym(uri)\n break\n }\n }\n }\n\n // 3. In a workspace store\n const date = '2014' // @@@@@@@@@@@@ pass as parameter\n\n if (targetStore) {\n // mention(\"@@ Ok, we have a store <\" + store.uri + \">.\");\n renderFormsFor(targetStore, subject)\n } else {\n complain('No suitable store is known, to edit <' + subject.uri + '>.')\n const workspaceDetails: WorkspaceSelectionDetails = {\n noun: 'form',\n appPathSegment: 'form'\n }\n const foobarbaz = UI.login.selectWorkspace(dom, workspaceDetails, function (workspaceUri: string | null) {\n const workspace = workspaceUri ? kb.sym(workspaceUri) : null\n if (!workspace) {\n complain('Workspace selection was cancelled.')\n return\n }\n mention('Workspace selected OK: ' + workspace.uri)\n\n const activities = kb.each(undefined, ns.space('workspace'), workspace).filter(isNamedNode)\n for (let j = 0; j < activities.length; j++) {\n const act = activities[j]\n\n const subjectDoc2 = kb.any(act, ns.space('store'))\n const start = kb.any(act, ns.cal('dtstart'))?.value\n const end = kb.any(act, ns.cal('dtend'))?.value\n if (isNamedNode(subjectDoc2) && start && end && start <= date && end > date) {\n renderFormsFor(subjectDoc2, subject)\n break\n } else {\n complain('Note no suitable annotation store in activity: ' + act)\n }\n }\n })\n box.appendChild(foobarbaz)\n }\n\n return box\n }\n}\n"],"mappings":";;;;;AAYA,IAAM,IAAK,EAAG;AAOd,SAAS,EAAa,GAAmE;CACvF,OAAO,GAAM,aAAa;AAC5B;AAIA,SAAS,EAA8B,GAA4D,GAAuB;CACxH,IAAM,IAAU,EAAK,MAAM,EAAK,IAAI,IAAI,KAAA,GAClC,IAAQ,EAAM,KAAK,GAAM,EAAG,IAAI,MAAM,GAAG,KAAA,GAAW,CAAO,CAAC,CAAC,OAAO,CAAW,GAC/E,IAAe,EAAM,MAAK,MAAQ,EAAK,SAAS,EAAG,GAAG,OAAO,CAAC,CAAC,GAC/D,IAAoB,EAAM,MAAK,MAAQ,CAAC,EAAK,SAAS,EAAG,GAAG,OAAO,CAAC,KAAK,CAAC,EAAK,SAAS,EAAG,GAAG,MAAM,CAAC,CAAC,GACtG,IAAc,CAAC,CAAC,EAAM,IAAI,GAAM,EAAG,GAAG,UAAU,GAAG,KAAA,GAAW,CAAO,GACrE,IAAY,EAAM,IAAI,GAAM,EAAG,GAAG,OAAO,GAAG,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CAAC,MAAQ,GAClB,IAAI,KAAO,EAAG,QAAQ,SAAS,GAAK,CAAE,GAAG;IACvC,IAAc,EAAG,IAAI,CAAG;IACxB;GACF;EAEJ;EAGA,IAAM,IAAO;EAEb,IAAI,GAEF,EAAe,GAAa,CAAO;OAC9B;GACL,EAAS,0CAA0C,EAAQ,MAAM,IAAI;GAKrE,IAAM,IAAY,EAAG,MAAM,gBAAgB,GAAK;IAH9C,MAAM;IACN,gBAAgB;GAE8B,GAAkB,SAAU,GAA6B;IACvG,IAAM,IAAY,IAAe,EAAG,IAAI,CAAY,IAAI;IACxD,IAAI,CAAC,GAAW;KACd,EAAS,oCAAoC;KAC7C;IACF;IACA,EAAQ,4BAA4B,EAAU,GAAG;IAEjD,IAAM,IAAa,EAAG,KAAK,KAAA,GAAW,EAAG,MAAM,WAAW,GAAG,CAAS,CAAC,CAAC,OAAO,CAAW;IAC1F,KAAK,IAAI,IAAI,GAAG,IAAI,EAAW,QAAQ,KAAK;KAC1C,IAAM,IAAM,EAAW,IAEjB,IAAc,EAAG,IAAI,GAAK,EAAG,MAAM,OAAO,CAAC,GAC3C,IAAQ,EAAG,IAAI,GAAK,EAAG,IAAI,SAAS,CAAC,CAAC,EAAE,OACxC,IAAM,EAAG,IAAI,GAAK,EAAG,IAAI,OAAO,CAAC,CAAC,EAAE;KAC1C,IAAI,EAAY,CAAW,KAAK,KAAS,KAAO,KAAS,KAAQ,IAAM,GAAM;MAC3E,EAAe,GAAa,CAAO;MACnC;KACF;KACE,EAAS,oDAAoD,CAAG;IAEpE;GACF,CAAC;GACD,EAAI,YAAY,CAAS;EAC3B;EAEA,OAAO;CACT;AACF"}
@@ -0,0 +1,2 @@
1
+ let e=require("solid-ui"),t=require("solid-logic");var n={icon:e.icons.iconBase+`noun_547570.svg`,global:!0,name:`home`,label:function(){return`home`},audience:[e.ns.solid(`PowerUser`)],render:function(n,r){let i=r.dom,a=async function(){let t={div:o,dom:i,statusArea:o,me:s};o.appendChild(i.createElement(`h4`)).textContent=`Create new thing somewhere`;let n={div:o.appendChild(i.createElement(`div`)),dom:i,statusArea:o,me:s},a=await e.login.filterAvailablePanes(r.session.paneRegistry.list);e.create.newThingUI(n,r,a),e.login.registrationList(t,{}).then(function(){})},o=i.createElement(`div`),s=t.authn.currentUser();return a(),o}};exports.default=n;
2
+ //# sourceMappingURL=homePane.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"homePane.cjs.js","names":[],"sources":["../../src/home/homePane.ts"],"sourcesContent":["/* Home Pane\n **\n ** The home pane is avaiable everywhere and allows a user\n ** to\n ** - keep track of their stuff\n ** - make new things, and possibly\n ** - keep track of accounts and workspaces etc\n **\n */\n\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { authn } from 'solid-logic'\nimport { create, icons, login, ns } from 'solid-ui'\nimport type { CreateContext } from 'solid-ui'\n\nconst HomePaneSource: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg', // noun_25830\n\n global: true,\n\n name: 'home',\n\n // Does the subject deserve an home pane?\n //\n // yes, always!\n //\n label: function () {\n return 'home'\n },\n\n audience: [ns.solid('PowerUser')],\n\n render: function (subject, context: DataBrowserContext) {\n const dom = context.dom\n const showContent = async function () {\n const homePaneContext = { div, dom, statusArea: div, me }\n /*\n div.appendChild(dom.createElement('h4')).textContent = 'Login status'\n var loginStatusDiv = div.appendChild(context.dom.createElement('div'))\n // TODO: Find out what the actual type is:\n type UriType = unknown;\n loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {\n // Here we know new log in status\n }))\n */\n div.appendChild(dom.createElement('h4')).textContent =\n 'Create new thing somewhere'\n const creationDiv = div.appendChild(dom.createElement('div'))\n const creationContext: CreateContext = {\n div: creationDiv,\n dom,\n statusArea: div,\n me\n }\n const relevantPanes = await login.filterAvailablePanes(\n context.session.paneRegistry.list\n )\n // @ts-ignore\n create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down\n\n login.registrationList(homePaneContext, {}).then(function () {})\n }\n\n const div = dom.createElement('div')\n const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in\n\n showContent()\n\n return div\n }\n} // pane object\n\n// ends\nexport default HomePaneSource\n"],"mappings":"mDAgBA,IAAM,EAAiC,CACrC,KAAM,EAAA,MAAM,SAAW,kBAEvB,OAAQ,GAER,KAAM,OAMN,MAAO,UAAY,CACjB,MAAO,MACT,EAEA,SAAU,CAAC,EAAA,GAAG,MAAM,WAAW,CAAC,EAEhC,OAAQ,SAAU,EAAS,EAA6B,CACtD,IAAM,EAAM,EAAQ,IACd,EAAc,gBAAkB,CACpC,IAAM,EAAkB,CAAE,MAAK,MAAK,WAAY,EAAK,IAAG,EAUxD,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,YACvC,6BAEF,IAAM,EAAiC,CACrC,IAFkB,EAAI,YAAY,EAAI,cAAc,KAAK,CAEpD,EACL,MACA,WAAY,EACZ,IACF,EACM,EAAgB,MAAM,EAAA,MAAM,qBAChC,EAAQ,QAAQ,aAAa,IAC/B,EAEA,EAAA,OAAO,WAAW,EAAiB,EAAS,CAAa,EAEzD,EAAA,MAAM,iBAAiB,EAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,UAAY,CAAC,CAAC,CACjE,EAEM,EAAM,EAAI,cAAc,KAAK,EAC7B,EAAgB,EAAA,MAAM,YAAY,EAIxC,OAFA,EAAY,EAEL,CACT,CACF"}
@@ -1,4 +1,4 @@
1
- import { PaneDefinition } from 'pane-registry';
1
+ import { PaneDefinition } from '../../node_modules/pane-registry';
2
2
  declare const HomePaneSource: PaneDefinition;
3
3
  export default HomePaneSource;
4
4
  //# sourceMappingURL=homePane.d.ts.map
@@ -0,0 +1,35 @@
1
+ import { create as e, icons as t, login as n, ns as r } from "solid-ui";
2
+ import { authn as i } from "solid-logic";
3
+ //#region src/home/homePane.ts
4
+ var a = {
5
+ icon: t.iconBase + "noun_547570.svg",
6
+ global: !0,
7
+ name: "home",
8
+ label: function() {
9
+ return "home";
10
+ },
11
+ audience: [r.solid("PowerUser")],
12
+ render: function(t, r) {
13
+ let a = r.dom, o = async function() {
14
+ let t = {
15
+ div: s,
16
+ dom: a,
17
+ statusArea: s,
18
+ me: c
19
+ };
20
+ s.appendChild(a.createElement("h4")).textContent = "Create new thing somewhere";
21
+ let i = {
22
+ div: s.appendChild(a.createElement("div")),
23
+ dom: a,
24
+ statusArea: s,
25
+ me: c
26
+ }, o = await n.filterAvailablePanes(r.session.paneRegistry.list);
27
+ e.newThingUI(i, r, o), n.registrationList(t, {}).then(function() {});
28
+ }, s = a.createElement("div"), c = i.currentUser();
29
+ return o(), s;
30
+ }
31
+ };
32
+ //#endregion
33
+ export { a as default };
34
+
35
+ //# sourceMappingURL=homePane.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"homePane.esm.js","names":[],"sources":["../../src/home/homePane.ts"],"sourcesContent":["/* Home Pane\n **\n ** The home pane is avaiable everywhere and allows a user\n ** to\n ** - keep track of their stuff\n ** - make new things, and possibly\n ** - keep track of accounts and workspaces etc\n **\n */\n\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { authn } from 'solid-logic'\nimport { create, icons, login, ns } from 'solid-ui'\nimport type { CreateContext } from 'solid-ui'\n\nconst HomePaneSource: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg', // noun_25830\n\n global: true,\n\n name: 'home',\n\n // Does the subject deserve an home pane?\n //\n // yes, always!\n //\n label: function () {\n return 'home'\n },\n\n audience: [ns.solid('PowerUser')],\n\n render: function (subject, context: DataBrowserContext) {\n const dom = context.dom\n const showContent = async function () {\n const homePaneContext = { div, dom, statusArea: div, me }\n /*\n div.appendChild(dom.createElement('h4')).textContent = 'Login status'\n var loginStatusDiv = div.appendChild(context.dom.createElement('div'))\n // TODO: Find out what the actual type is:\n type UriType = unknown;\n loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {\n // Here we know new log in status\n }))\n */\n div.appendChild(dom.createElement('h4')).textContent =\n 'Create new thing somewhere'\n const creationDiv = div.appendChild(dom.createElement('div'))\n const creationContext: CreateContext = {\n div: creationDiv,\n dom,\n statusArea: div,\n me\n }\n const relevantPanes = await login.filterAvailablePanes(\n context.session.paneRegistry.list\n )\n // @ts-ignore\n create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down\n\n login.registrationList(homePaneContext, {}).then(function () {})\n }\n\n const div = dom.createElement('div')\n const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in\n\n showContent()\n\n return div\n }\n} // pane object\n\n// ends\nexport default HomePaneSource\n"],"mappings":";;;AAgBA,IAAM,IAAiC;CACrC,MAAM,EAAM,WAAW;CAEvB,QAAQ;CAER,MAAM;CAMN,OAAO,WAAY;EACjB,OAAO;CACT;CAEA,UAAU,CAAC,EAAG,MAAM,WAAW,CAAC;CAEhC,QAAQ,SAAU,GAAS,GAA6B;EACtD,IAAM,IAAM,EAAQ,KACd,IAAc,iBAAkB;GACpC,IAAM,IAAkB;IAAE;IAAK;IAAK,YAAY;IAAK;GAAG;GAUxD,EAAI,YAAY,EAAI,cAAc,IAAI,CAAC,CAAC,CAAC,cACvC;GAEF,IAAM,IAAiC;IACrC,KAFkB,EAAI,YAAY,EAAI,cAAc,KAAK,CAEpD;IACL;IACA,YAAY;IACZ;GACF,GACM,IAAgB,MAAM,EAAM,qBAChC,EAAQ,QAAQ,aAAa,IAC/B;GAIA,AAFA,EAAO,WAAW,GAAiB,GAAS,CAAa,GAEzD,EAAM,iBAAiB,GAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,WAAY,CAAC,CAAC;EACjE,GAEM,IAAM,EAAI,cAAc,KAAK,GAC7B,IAAgB,EAAM,YAAY;EAIxC,OAFA,EAAY,GAEL;CACT;AACF"}
@@ -1,6 +1,5 @@
1
- import type { DataBrowserContext } from 'pane-registry';
2
- import type { NamedNode } from 'rdflib';
3
- import './humanReadablePane.css';
1
+ import { DataBrowserContext } from '../node_modules/pane-registry';
2
+ import { NamedNode } from '../node_modules/rdflib';
4
3
  type HumanReadableIcon = string | Promise<string>;
5
4
  type HumanReadablePaneDefinition = {
6
5
  icon: (subject: NamedNode, context: DataBrowserContext) => HumanReadableIcon;
@@ -0,0 +1,2 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.human-readable-pane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block}.human-readable-pane__container{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.human-readable-pane__frame{height:var(--human-readable-pane-height,30rem);box-sizing:border-box;resize:both;border:1px solid;width:100%;min-width:0;max-width:100%;padding:1rem;display:block;overflow:auto}.human-readable-pane__frame--iframe{background:var(--color-background,white);width:100%;max-width:100%;min-height:18rem;padding:0;overflow:hidden}.human-readable-pane__frame--markdown{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane__frame--plain-text{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-family:monospace}.human-readable-pane__frame--markdown>*{box-sizing:border-box;max-width:100%}.human-readable-pane__frame--markdown img,.human-readable-pane__frame--markdown video,.human-readable-pane__frame--markdown canvas,.human-readable-pane__frame--markdown iframe{max-width:100%;height:auto}.human-readable-pane__frame--markdown pre,.human-readable-pane__frame--markdown code{overflow-wrap:anywhere;word-break:break-word;max-width:100%}.human-readable-pane__frame--markdown pre{white-space:pre-wrap}.human-readable-pane__frame--markdown table{box-sizing:border-box;width:100%;max-width:100%;display:block;overflow-x:auto}.human-readable-pane__frame--markdown th,.human-readable-pane__frame--markdown td{white-space:normal;overflow-wrap:anywhere;word-break:break-word}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame{resize:none;min-width:0;padding:.75rem}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--markdown,.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--plain-text{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane[data-layout=mobile] .human-readable-pane__frame--iframe{width:100%;max-width:100%;min-height:16rem;height:min(var(--human-readable-pane-height,30rem), 75vh)}@media (width<=576px){.human-readable-pane__frame{resize:none;min-width:0;padding:.75rem}.human-readable-pane__frame--markdown,.human-readable-pane__frame--plain-text{overflow-wrap:anywhere;word-break:break-word}.human-readable-pane__frame--iframe{width:100%;max-width:100%;min-height:16rem;height:min(var(--human-readable-pane-height,30rem), 75vh)}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("./_virtual/_rolldown/runtime.cjs.js");;let t=require("solid-ui"),n=require("rdflib"),r=require("marked"),i=require("dompurify");i=e.__toESM(i);var a=e=>{if(!e)return!1;let t=e.split(`?`)[0].split(`#`)[0];return/\.(md|markdown|mdown|mkd|mkdn)$/i.test(t)},o=new Map;function s(e,t,n){e.className=``,e.classList.add(`human-readable-pane__frame`),e.classList.add(`human-readable-pane__frame--${t}`),e.style.setProperty(`--human-readable-pane-height`,`${n}em`)}var c={icon:function(e,n){if(e&&a(e.uri))return t.icons.iconBase+`markdown.svg`;if(e){let r=n.session.store,i=o.get(e.uri);if(i===`dokieli`)return t.icons.iconBase+`dokieli-logo.png`;if(i===`html`)return t.icons.originalIconBase+`tango/22-text-x-generic.png`;let a=r.fetcher.getHeader(e.doc(),`content`);if(a&&a.length>0){let n=a[0],r=n.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||n.includes(`dokieli.css`);return o.set(e.uri,r?`dokieli`:`html`),r?t.icons.iconBase+`dokieli-logo.png`:t.icons.originalIconBase+`tango/22-text-x-generic.png`}let s=r.fetcher.getHeader(e.doc(),`content-type`);if((s?s[0].split(`;`,1)[0].trim():null)===`text/html`)return r.fetcher._fetch(e.uri).then(e=>e.text()).then(n=>{let r=n.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||n.includes(`dokieli.css`);return o.set(e.uri,r?`dokieli`:`html`),r?t.icons.iconBase+`dokieli-logo.png`:t.icons.originalIconBase+`tango/22-text-x-generic.png`}).catch(()=>(o.set(e.uri,`html`),t.icons.originalIconBase+`tango/22-text-x-generic.png`))}return t.icons.originalIconBase+`tango/22-text-x-generic.png`},name:`humanReadable`,label:function(e,r){let i=r.session.store,s=[`text/plain`,`text/html`,`text/markdown`,`application/xhtml+xml`,`image/png`,`image/jpeg`,`application/pdf`,`video/mp4`],c=function(e,t,n){let r=e.fetcher.getHeader(t,`content-type`);if(r){for(let e=0;e<r.length;e++)for(let t=0;t<n.length;t++)if(r[e].indexOf(n[t])>=0)return!0}return!1},l=function(e,t,r){let i=e.findTypeURIs(t);for(let e=0;e<r.length;e++)if(n.Util.mediaTypeClass(r[e]).uri in i)return!0;return!1};if(!e.uri)return null;if(i.findTypeURIs(e)[t.ns.link(`WebPage`).uri])return`view`;if(a(e.uri))return`View`;if(c(i,e,s)||l(i,e,s)){let t=i.fetcher.getHeader(e.doc(),`content-type`);return(t?t[0].split(`;`,1)[0].trim():null)===`text/html`&&!o.has(e.uri)&&i.fetcher._fetch(e.uri).then(e=>e.text()).then(t=>{let n=t.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||t.includes(`dokieli.css`);o.set(e.uri,n?`dokieli`:`html`)}).catch(()=>{o.set(e.uri,`html`)}),`View`}return null},render:function(e,t){let n=t.dom,c=n.createElement(`div`),l=t.session.store;function u(e){let n=t.environment??{};e.dataset.layout=n.layout??`desktop`}let d=l.fetcher.getHeader(e.doc(),`content-type`),f=d?d[0].split(`;`,1)[0].trim():null,p=f===`text/markdown`||a(e.uri),m=f===`text/plain`;f||console.log(`humanReadablePane: unknown content-type?`),c.classList.add(`human-readable-pane`),u(c);let h=function(t){l.fetcher.webOperation(`GET`,e.uri).then(e=>{let n=e.responseText??``,a=Math.min(30,n.split(/\n/).length+5),o=r.marked.parse(n,{async:!1});t.innerHTML=i.default.sanitize(o),s(t,`markdown`,a)}).catch(e=>{console.error(`Error fetching markdown content:`,e),t.innerHTML=`<p>Error loading content</p>`})},g=function(t){l.fetcher.webOperation(`GET`,e.uri).then(e=>{let n=e.responseText??``,r=Math.min(30,n.split(/\n/).length+5);t.textContent=n,s(t,`plain-text`,r)}).catch(e=>{console.error(`Error fetching plain text content:`,e),t.textContent=`Error loading content`})},_=(t,n)=>{t.setAttribute(`src`,e.uri),s(t,`iframe`,n)};if(p){let e=n.createElement(`div`);h(e);let t=n.createElement(`div`);t.classList.add(`human-readable-pane__container`),t.appendChild(e),c.appendChild(t)}else if(m){let e=n.createElement(`pre`);g(e);let t=n.createElement(`div`);t.classList.add(`human-readable-pane__container`),t.appendChild(e),c.appendChild(t)}else{let t=n.createElement(`iframe`);(f===`text/html`||f===`application/xhtml+xml`)&&t.setAttribute(`sandbox`,`allow-scripts allow-same-origin allow-forms`),l.fetcher.webOperation(`GET`,e.uri).then(n=>{let r=n.responseText??``,i=r.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)?-10:5,a=Math.min(30,r.split(/\n/).length+i),s=r.includes(`<script src="https://dokie.li/scripts/dokieli.js">`)||r.includes(`dokieli.css`);o.set(e.uri,s?`dokieli`:`html`),_(t,a)}).catch(e=>{console.error(`Error fetching content for line calculation:`,e),_(t,30)});let r=n.createElement(`div`);r.classList.add(`human-readable-pane__container`),r.appendChild(t),c.appendChild(r)}return c}};exports.default=c;
2
+ //# sourceMappingURL=humanReadablePane2.cjs.js.map