solid-panes 4.2.6 → 4.4.1-test.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 (143) hide show
  1. package/README.md +45 -1
  2. package/dist/0314353e28ce6e5539af.svg +9 -0
  3. package/dist/04567ff683933c35c465.png +0 -0
  4. package/dist/10163fd9b5a0e00d63a0.png +0 -0
  5. package/dist/1234dcb2eec2e45f252b.png +0 -0
  6. package/dist/20899934157df4db56cb.png +0 -0
  7. package/dist/33760bf79f097f449da5.png +0 -0
  8. package/dist/4cceba29ab33b1ddd9bb.svg +6 -0
  9. package/dist/578d2b6ed32e7624164e.png +0 -0
  10. package/dist/5f62a5b2b7e99b9640c7.png +0 -0
  11. package/dist/6525766ecd288ec60129.png +0 -0
  12. package/dist/7800be6f6c4b5b0f4f20.png +0 -0
  13. package/dist/7b7538c6f6b317968009.svg +9 -0
  14. package/dist/92d03142abe6efc0b42d.svg +6 -0
  15. package/dist/976473cf5fe24d657d4b.png +0 -0
  16. package/dist/RDFXMLPane.css +70 -0
  17. package/dist/RDFXMLPane.d.ts +13 -0
  18. package/dist/RDFXMLPane.d.ts.map +1 -0
  19. package/dist/RDFXMLPane.js +46 -4
  20. package/dist/bda84f59e7216675a208.png +0 -0
  21. package/dist/cd68e8f3990ba8b2139e.png +0 -0
  22. package/dist/dashboard/basicPreferences.d.ts.map +1 -1
  23. package/dist/dashboard/basicPreferences.js +1 -0
  24. package/dist/dashboard/dashboardPane.d.ts.map +1 -1
  25. package/dist/dashboard/dashboardPane.js +9 -3
  26. package/dist/dashboard/homepage.d.ts +1 -1
  27. package/dist/dashboard/homepage.d.ts.map +1 -1
  28. package/dist/dashboard/homepage.js +5 -35
  29. package/dist/dataContentPane.css +271 -0
  30. package/dist/dataContentPane.d.ts +14 -0
  31. package/dist/dataContentPane.d.ts.map +1 -0
  32. package/dist/dataContentPane.js +68 -101
  33. package/dist/defaultPane.css +97 -0
  34. package/dist/defaultPane.d.ts +14 -0
  35. package/dist/defaultPane.d.ts.map +1 -0
  36. package/dist/defaultPane.js +9 -2
  37. package/dist/e7074a7e2cb69e51cfd3.png +0 -0
  38. package/dist/f3772696fb7ee53c23d8.png +0 -0
  39. package/dist/form/formPane.css +120 -0
  40. package/dist/form/pane.d.ts +4 -0
  41. package/dist/form/pane.d.ts.map +1 -0
  42. package/dist/form/pane.js +120 -54
  43. package/dist/home/homePane.d.ts.map +1 -1
  44. package/dist/home/homePane.js +2 -0
  45. package/dist/humanReadablePane.css +129 -0
  46. package/dist/humanReadablePane.d.ts +13 -0
  47. package/dist/humanReadablePane.d.ts.map +1 -0
  48. package/dist/humanReadablePane.js +53 -16
  49. package/dist/icons/clock.svg +7 -0
  50. package/dist/icons/comment.svg +6 -0
  51. package/dist/icons/dashboard.svg +9 -0
  52. package/dist/icons/downArrow.svg +6 -0
  53. package/dist/icons/folder.svg +6 -0
  54. package/dist/icons/friends.svg +9 -0
  55. package/dist/icons/help.svg +8 -0
  56. package/dist/icons/iconHelper.d.ts +2 -0
  57. package/dist/icons/iconHelper.d.ts.map +1 -0
  58. package/dist/icons/iconHelper.js +23 -0
  59. package/dist/icons/menu.svg +8 -0
  60. package/dist/icons/person.svg +6 -0
  61. package/dist/icons/personInCircle.svg +8 -0
  62. package/dist/icons/sharing.svg +10 -0
  63. package/dist/icons/signOut.svg +8 -0
  64. package/dist/icons/signUp.svg +9 -0
  65. package/dist/icons/star.svg +3 -0
  66. package/dist/imagePane.css +4 -0
  67. package/dist/imagePane.d.ts +12 -0
  68. package/dist/imagePane.d.ts.map +1 -0
  69. package/dist/imagePane.js +19 -21
  70. package/dist/index.d.ts +5 -4
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +19 -4
  73. package/dist/internal/internalPane.css +14 -0
  74. package/dist/internal/internalPane.d.ts +1 -0
  75. package/dist/internal/internalPane.d.ts.map +1 -1
  76. package/dist/internal/internalPane.js +6 -6
  77. package/dist/mainPage/footer.d.ts +14 -2
  78. package/dist/mainPage/footer.d.ts.map +1 -1
  79. package/dist/mainPage/footer.js +21 -13
  80. package/dist/mainPage/header.d.ts +16 -1
  81. package/dist/mainPage/header.d.ts.map +1 -1
  82. package/dist/mainPage/header.js +179 -61
  83. package/dist/mainPage/index.d.ts +16 -1
  84. package/dist/mainPage/index.d.ts.map +1 -1
  85. package/dist/mainPage/index.js +61 -7
  86. package/dist/mainPage/menu.css +243 -0
  87. package/dist/mainPage/menu.d.ts +7 -0
  88. package/dist/mainPage/menu.d.ts.map +1 -0
  89. package/dist/mainPage/menu.js +436 -0
  90. package/dist/n3Pane.css +49 -0
  91. package/dist/n3Pane.d.ts +13 -0
  92. package/dist/n3Pane.d.ts.map +1 -0
  93. package/dist/n3Pane.js +36 -4
  94. package/dist/outline/context.d.ts +2 -2
  95. package/dist/outline/context.d.ts.map +1 -1
  96. package/dist/outline/context.js +5 -2
  97. package/dist/outline/manager.css +12 -14
  98. package/dist/outline/manager.js +172 -82
  99. package/dist/outline/userInput.js +6 -3
  100. package/dist/pad/padPane.css +40 -0
  101. package/dist/pad/padPane.d.ts +1 -0
  102. package/dist/pad/padPane.d.ts.map +1 -1
  103. package/dist/pad/padPane.js +33 -22
  104. package/dist/playlist/playlistPane.js +2 -6
  105. package/dist/profileUtils/ownerProfile.d.ts +5 -0
  106. package/dist/profileUtils/ownerProfile.d.ts.map +1 -0
  107. package/dist/profileUtils/ownerProfile.js +84 -0
  108. package/dist/registerPanes.js +12 -12
  109. package/dist/schedule/schedulePane.css +294 -0
  110. package/dist/schedule/schedulePane.d.ts +23 -0
  111. package/dist/schedule/schedulePane.d.ts.map +1 -0
  112. package/dist/schedule/schedulePane.js +161 -61
  113. package/dist/slideshow/slideshowPane.js +1 -1
  114. package/dist/social/editProfileDetails.d.ts +19 -0
  115. package/dist/social/editProfileDetails.d.ts.map +1 -0
  116. package/dist/social/editProfileDetails.js +362 -0
  117. package/dist/social/icons.d.ts +7 -0
  118. package/dist/social/icons.d.ts.map +1 -0
  119. package/dist/social/icons.js +95 -0
  120. package/dist/social/socialPane.css +1464 -0
  121. package/dist/social/socialPane.d.ts +30 -0
  122. package/dist/social/socialPane.d.ts.map +1 -0
  123. package/dist/social/socialPane.js +651 -0
  124. package/dist/social/socialSections.d.ts +77 -0
  125. package/dist/social/socialSections.d.ts.map +1 -0
  126. package/dist/social/socialSections.js +393 -0
  127. package/dist/social/spinner.d.ts +3 -0
  128. package/dist/social/spinner.d.ts.map +1 -0
  129. package/dist/social/spinner.js +13 -0
  130. package/dist/social/triage.d.ts +17 -0
  131. package/dist/social/triage.d.ts.map +1 -0
  132. package/dist/social/triage.js +79 -0
  133. package/dist/solid-panes.js +49544 -18164
  134. package/dist/solid-panes.js.map +1 -1
  135. package/dist/solid-panes.min.js +3884 -240
  136. package/dist/solid-panes.min.js.map +1 -1
  137. package/dist/{style → styles}/tabbedtab.css +0 -281
  138. package/dist/styles/utilities.css +5 -0
  139. package/dist/tabbed/tabbedPane.d.ts.map +1 -1
  140. package/dist/tabbed/tabbedPane.js +2 -0
  141. package/dist/versionInfo.js +14 -14
  142. package/package.json +37 -31
  143. package/dist/socialPane.js +0 -430
package/README.md CHANGED
@@ -1,5 +1,4 @@
1
1
  # solid-panes
2
-
3
2
  A set of core solid-compatible applets based on solid-ui
4
3
 
5
4
  These are a set of interlinked applications, or parts of applications,
@@ -78,3 +77,48 @@ contacts (A VCARD Address Book, Group, Individual, Organization) can be handled
78
77
  pane. Any other pane which wants to deal with contacts can just use the pane within its own user interface.
79
78
 
80
79
  ![Mapping many classes on the L to panes on the R](https://solidos.github.io/solid-panes/doc/images/panes-for-classes.svg)
80
+
81
+
82
+ ## Generative AI usage
83
+ The SolidOS team is using GitHub Copilot integrated in Visual Studio Code.
84
+ We have added comments in the code to make it explicit which parts are 100% written by AI.
85
+
86
+ ### Prompt usage hitory:
87
+ * Model Claude Opus 4.6: Initially solid-panes is loaded into an HTML shell form mashlib that looks like ... Also, an iFrame is rendered inside the `<div class="TabulatorOutline" id="DummyUUID">` for “isolated pane rendering”. Analyze the solid-panes code for what it uses from this HTML and suggest a new HTML structure which is mobile and accessibility friendly. Let's go ahead and make changes in this code as suggested to accommodate the new databrowser HTML.
88
+
89
+ * Raptor mini: take a look at how I wired the environment from mashlib into solid-panes. It is not quite right, can you suggest fixes?
90
+
91
+ * Raptor mini: Update the code to use the new solid-ui-header component. Keep in mind the log in and sign up are wired in specific ways.
92
+
93
+ * Auto: change the menu to fill up the menu items like in the code: async function getMenuItems (outliner: any) {
94
+ const items = await outliner.getDashboardItems()
95
+ return items.map((element) => {
96
+ return {
97
+ label: element.label,
98
+ onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)
99
+ }
100
+ })
101
+ }
102
+
103
+ * Auto: each #sym:MenuItem has an icon which i want displayed on the left side of each menu item when rendered
104
+
105
+ * Auto: don't add each menu item in a button looking border. Simply list them.
106
+ Upon hover apply background color e6dcff and selected or active to be background color: cbb9ff
107
+
108
+ * Raptor mini: the menu dissapears when on mobile. That is great.
109
+ I want the menu to have a tiny button on the bottom margin left with an arrow to the left or right for expanding the menu or for making it small. This is only for web. When we make it small it folds and only displays the icons of teh menu items, when it is expanded it should also add the labels to the menu items.
110
+
111
+ * Raptor mini: i want to imporve the left side menu on mobile. When the menu is visible it should be higher, the top part should be on top of the header, folding out and in with the rest of the menu. It should have an x close button and it should say menu. The locor of that top line of the header should be the color of the header 332746
112
+
113
+ * Raptor mini: the menu, on desktop, has a button to fold in or out. I want the same behavior to occur also when i simply click the folded in menu: it should expend. Not just when i click the dedicated button
114
+
115
+ * Raprot mini: instead of this code (index.ts of footer), I want to make use of a new footer web component with the readme: # solid-ui-footer component
116
+
117
+ * Raptor mini: The footer created should actually be part of the left side menu only. Should be displayed inside it and should collaps and expand as the menu.
118
+
119
+ * Raptor mini: the footer should completely dissapear when menu folded up.
120
+
121
+ * Raptor mini: Please always keep the footer at the bottom of the menu
122
+
123
+ * GPT-5.4 Model: Add a compatibility shim in the form pane for mixed `ui:Group` plus field typing.
124
+
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 20 20"
3
+ fill="none"
4
+ >
5
+ <path d="M13.3327 17.5V15.8333C13.3327 14.9493 12.9815 14.1014 12.3564 13.4763C11.7313 12.8512 10.8834 12.5 9.99935 12.5H4.99935C4.11529 12.5 3.26745 12.8512 2.64233 13.4763C2.01721 14.1014 1.66602 14.9493 1.66602 15.8333V17.5" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M13.334 2.60669C14.0488 2.792 14.6818 3.20941 15.1337 3.79341C15.5856 4.37741 15.8308 5.09493 15.8308 5.83336C15.8308 6.57178 15.5856 7.28931 15.1337 7.8733C14.6818 8.4573 14.0488 8.87471 13.334 9.06002" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M18.334 17.5001V15.8334C18.3334 15.0948 18.0876 14.3774 17.6351 13.7937C17.1826 13.2099 16.5491 12.793 15.834 12.6084" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <path d="M7.49935 9.16667C9.3403 9.16667 10.8327 7.67428 10.8327 5.83333C10.8327 3.99238 9.3403 2.5 7.49935 2.5C5.6584 2.5 4.16602 3.99238 4.16602 5.83333C4.16602 7.67428 5.6584 9.16667 7.49935 9.16667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
9
+ </svg>
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 16 16"
3
+ fill="none"
4
+ >
5
+ <path d="M13.334 13.3333C13.6876 13.3333 14.0267 13.1929 14.2768 12.9428C14.5268 12.6928 14.6673 12.3536 14.6673 12V5.33333C14.6673 4.97971 14.5268 4.64057 14.2768 4.39052C14.0267 4.14048 13.6876 4 13.334 4H8.06732C7.84433 4.00219 7.62435 3.94841 7.42752 3.84359C7.23069 3.73877 7.06329 3.58625 6.94065 3.4L6.40065 2.6C6.27924 2.41565 6.11397 2.26432 5.91965 2.1596C5.72533 2.05488 5.50806 2.00004 5.28732 2H2.66732C2.3137 2 1.97456 2.14048 1.72451 2.39052C1.47446 2.64057 1.33398 2.97971 1.33398 3.33333V12C1.33398 12.3536 1.47446 12.6928 1.72451 12.9428C1.97456 13.1929 2.3137 13.3333 2.66732 13.3333H13.334Z" stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 20 20"
3
+ fill="none"
4
+ >
5
+ <path d="M7.5 2.5H3.33333C2.8731 2.5 2.5 2.8731 2.5 3.33333V9.16667C2.5 9.6269 2.8731 10 3.33333 10H7.5C7.96024 10 8.33333 9.6269 8.33333 9.16667V3.33333C8.33333 2.8731 7.96024 2.5 7.5 2.5Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M16.666 2.5H12.4993C12.0391 2.5 11.666 2.8731 11.666 3.33333V5.83333C11.666 6.29357 12.0391 6.66667 12.4993 6.66667H16.666C17.1263 6.66667 17.4993 6.29357 17.4993 5.83333V3.33333C17.4993 2.8731 17.1263 2.5 16.666 2.5Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M16.666 10H12.4993C12.0391 10 11.666 10.3731 11.666 10.8333V16.6667C11.666 17.1269 12.0391 17.5 12.4993 17.5H16.666C17.1263 17.5 17.4993 17.1269 17.4993 16.6667V10.8333C17.4993 10.3731 17.1263 10 16.666 10Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <path d="M7.5 13.3333H3.33333C2.8731 13.3333 2.5 13.7063 2.5 14.1666V16.6666C2.5 17.1268 2.8731 17.4999 3.33333 17.4999H7.5C7.96024 17.4999 8.33333 17.1268 8.33333 16.6666V14.1666C8.33333 13.7063 7.96024 13.3333 7.5 13.3333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
9
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 20 20"
3
+ fill="none"
4
+ >
5
+ <path d="M13.0151 9.27363C14.2948 8.34031 15.1282 6.82984 15.1282 5.1282C15.1282 2.30051 12.8277 0 9.99998 0C7.17228 0 4.87177 2.30051 4.87177 5.1282C4.87177 6.82984 5.70509 8.34031 6.98486 9.27363C3.80361 10.491 1.53845 13.5754 1.53845 17.1795C1.53845 18.7347 2.80373 20 4.35896 20H15.641C17.1962 20 18.4615 18.7347 18.4615 17.1795C18.4615 13.5754 16.1963 10.491 13.0151 9.27363ZM6.41025 5.1282C6.41025 3.14883 8.0206 1.53848 9.99998 1.53848C11.9794 1.53848 13.5897 3.14883 13.5897 5.1282C13.5897 7.10758 11.9794 8.71797 9.99998 8.71797C8.0206 8.71797 6.41025 7.10758 6.41025 5.1282ZM15.641 18.4615H4.35896C3.65205 18.4615 3.07693 17.8864 3.07693 17.1795C3.07693 13.362 6.18255 10.2564 10 10.2564C13.8175 10.2564 16.9231 13.362 16.9231 17.1795C16.9231 17.8864 16.3479 18.4615 15.641 18.4615Z" fill="currentColor"/>
6
+ </svg>
Binary file
@@ -0,0 +1,70 @@
1
+ .rdfxml-pane {
2
+ padding: 1rem;
3
+ border-top: solid 2px var(--color-data-pane-border-top, black);
4
+ border-left: solid 2px var(--color-data-pane-border-top, black);
5
+ border-bottom: solid 2px var(--color-data-pane-border-side, #777);
6
+ border-right: solid 2px var(--color-data-pane-border-side, #777);
7
+ color: var(--color-text-brown, #440);
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ .rdfxml-pane__source {
12
+ overflow-x: auto;
13
+ max-width: 100%;
14
+ box-sizing: border-box;
15
+ font-family: monospace;
16
+ font-size: 120%;
17
+ margin: 0;
18
+ white-space: pre;
19
+ }
20
+
21
+ .rdfxml-pane__line {
22
+ display: grid;
23
+ grid-template-columns: var(--rdfxml-indent, 0) minmax(max-content, auto);
24
+ align-items: start;
25
+ }
26
+
27
+ .rdfxml-pane__line-indent {
28
+ display: block;
29
+ width: var(--rdfxml-indent, 0);
30
+ }
31
+
32
+ .rdfxml-pane__line-content {
33
+ white-space: pre;
34
+ }
35
+
36
+ .rdfxml-pane[data-layout='mobile'] .rdfxml-pane__source {
37
+ overflow-wrap: anywhere;
38
+ word-break: break-word;
39
+ white-space: normal;
40
+ }
41
+
42
+ .rdfxml-pane[data-layout='mobile'] .rdfxml-pane__line {
43
+ grid-template-columns: var(--rdfxml-indent, 0) minmax(0, 1fr);
44
+ }
45
+
46
+ .rdfxml-pane[data-layout='mobile'] .rdfxml-pane__line-content {
47
+ white-space: pre-wrap;
48
+ overflow-wrap: anywhere;
49
+ word-break: break-word;
50
+ min-width: 0;
51
+ }
52
+
53
+ @media (max-width: 576px) {
54
+ .rdfxml-pane__source {
55
+ overflow-wrap: anywhere;
56
+ word-break: break-word;
57
+ white-space: normal;
58
+ }
59
+
60
+ .rdfxml-pane__line {
61
+ grid-template-columns: var(--rdfxml-indent, 0) minmax(0, 1fr);
62
+ }
63
+
64
+ .rdfxml-pane__line-content {
65
+ white-space: pre-wrap;
66
+ overflow-wrap: anywhere;
67
+ word-break: break-word;
68
+ min-width: 0;
69
+ }
70
+ }
@@ -0,0 +1,13 @@
1
+ import type { DataBrowserContext } from 'pane-registry';
2
+ import type { NamedNode } from 'rdflib';
3
+ import './RDFXMLPane.css';
4
+ type RDFXMLPaneDefinition = {
5
+ icon: string;
6
+ name: string;
7
+ audience: NamedNode[];
8
+ label: (subject: NamedNode, context: DataBrowserContext) => string | null;
9
+ render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement;
10
+ };
11
+ export declare const RDFXMLPane: RDFXMLPaneDefinition;
12
+ export {};
13
+ //# sourceMappingURL=RDFXMLPane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RDFXMLPane.d.ts","sourceRoot":"","sources":["../src/RDFXMLPane.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,kBAAkB,EAAqB,MAAM,eAAe,CAAA;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,QAAQ,CAAA;AAClD,OAAO,kBAAkB,CAAA;AAIzB,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,MAAM,GAAG,IAAI,CAAA;IACzE,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,cAAc,CAAA;CAC5E,CAAA;AA0BD,eAAO,MAAM,UAAU,EAAE,oBAmFxB,CAAA"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.RDFXMLPane = void 0;
7
7
  var UI = _interopRequireWildcard(require("solid-ui"));
8
8
  var $rdf = _interopRequireWildcard(require("rdflib"));
9
+ require("./RDFXMLPane.css");
9
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
11
  /* RDF/XML content Pane
11
12
  **
@@ -15,6 +16,27 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
15
16
  */
16
17
 
17
18
  const ns = UI.ns;
19
+ function leadingIndentWidth(line) {
20
+ if (line.trim().length === 0) {
21
+ return 0;
22
+ }
23
+ let width = 0;
24
+ for (const character of line) {
25
+ if (character === ' ') {
26
+ width += 1;
27
+ continue;
28
+ }
29
+ if (character === '\t') {
30
+ width += 2;
31
+ continue;
32
+ }
33
+ break;
34
+ }
35
+ return Math.max(width, 2);
36
+ }
37
+ function trimLeadingIndent(line) {
38
+ return line.replace(/^[ \t]+/, '');
39
+ }
18
40
  const RDFXMLPane = exports.RDFXMLPane = {
19
41
  icon: UI.icons.originalIconBase + '22-text-xml4.png',
20
42
  name: 'RDFXML',
@@ -31,8 +53,13 @@ const RDFXMLPane = exports.RDFXMLPane = {
31
53
  render: function (subject, context) {
32
54
  const myDocument = context.dom;
33
55
  const kb = context.session.store;
56
+ function applyEnvironmentAttributes(element) {
57
+ const environment = context.environment ?? {};
58
+ element.dataset.layout = environment.layout ?? 'desktop';
59
+ }
34
60
  const div = myDocument.createElement('div');
35
- div.setAttribute('class', 'RDFXMLPane');
61
+ div.setAttribute('class', 'rdfxml-pane');
62
+ applyEnvironmentAttributes(div);
36
63
  // Because of smushing etc, this will not be a copy of the original source
37
64
  // We could instead either fetch and re-parse the source,
38
65
  // or we could keep all the pre-smushed triples.
@@ -48,9 +75,24 @@ const RDFXMLPane = exports.RDFXMLPane = {
48
75
  sz.suggestNamespaces(kb.namespaces);
49
76
  sz.setBase(subject.uri);
50
77
  const str = sz.statementsToXML(sts);
51
- const pre = myDocument.createElement('PRE');
52
- pre.appendChild(myDocument.createTextNode(str));
53
- div.appendChild(pre);
78
+ const source = myDocument.createElement('div');
79
+ source.classList.add('rdfxml-pane__source');
80
+ str.split('\n').forEach(line => {
81
+ const lineElement = myDocument.createElement('div');
82
+ const indentElement = myDocument.createElement('span');
83
+ const contentElement = myDocument.createElement('span');
84
+ const indentWidth = leadingIndentWidth(line);
85
+ lineElement.classList.add('rdfxml-pane__line');
86
+ lineElement.style.setProperty('--rdfxml-indent', `${indentWidth}ch`);
87
+ indentElement.classList.add('rdfxml-pane__line-indent');
88
+ indentElement.setAttribute('aria-hidden', 'true');
89
+ contentElement.classList.add('rdfxml-pane__line-content');
90
+ contentElement.textContent = line.length > 0 ? trimLeadingIndent(line) : ' ';
91
+ lineElement.appendChild(indentElement);
92
+ lineElement.appendChild(contentElement);
93
+ source.appendChild(lineElement);
94
+ });
95
+ div.appendChild(source);
54
96
  return div;
55
97
  }
56
98
  };
Binary file
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"basicPreferences.d.ts","sourceRoot":"","sources":["../../src/dashboard/basicPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAM9C,eAAO,MAAM,oBAAoB,EAAE,cA6ElC,CAAA;AAoBD,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"basicPreferences.d.ts","sourceRoot":"","sources":["../../src/dashboard/basicPreferences.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAM9C,eAAO,MAAM,oBAAoB,EAAE,cA8ElC,CAAA;AAoBD,eAAe,oBAAoB,CAAA"}
@@ -20,6 +20,7 @@ const basicPreferencesPane = exports.basicPreferencesPane = {
20
20
  // The subject should be the logged in user.
21
21
  render: (subject, context) => {
22
22
  const dom = context.dom;
23
+ // @ts-ignore
23
24
  const store = context.session.store;
24
25
  function complainIfBad(ok, mess) {
25
26
  if (ok) return;
@@ -1 +1 @@
1
- {"version":3,"file":"dashboardPane.d.ts","sourceRoot":"","sources":["../../src/dashboard/dashboardPane.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,cAAc,EAAE,MAAM,eAAe,CAAA;AAElE,eAAO,MAAM,aAAa,EAAE,cAoC3B,CAAA;AAuCD,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"dashboardPane.d.ts","sourceRoot":"","sources":["../../src/dashboard/dashboardPane.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,cAAc,EAAE,MAAM,eAAe,CAAA;AAElE,eAAO,MAAM,aAAa,EAAE,cAoC3B,CAAA;AAiDD,eAAe,aAAa,CAAA"}
@@ -38,12 +38,18 @@ const dashboardPane = exports.dashboardPane = {
38
38
  }
39
39
  };
40
40
  function buildPage(container, webId, context, subject) {
41
- // if uri then SolidOS is a browse.html web app
42
41
  const uri = new URL(window.location.href).searchParams.get('uri');
43
- if (webId && (uri || webId.site().uri === subject.site().uri)) {
42
+ if (uri && webId) {
44
43
  return buildDashboard(container, context);
45
44
  }
46
- return buildHomePage(container, subject);
45
+ if (!uri && subject) {
46
+ return buildHomePage(container, subject);
47
+ }
48
+ if (!uri && !subject && webId) {
49
+ return buildDashboard(container, context);
50
+ }
51
+ const fallbackSubject = subject || webId || _solidLogic.store.sym(window.location.href);
52
+ return buildHomePage(container, fallbackSubject);
47
53
  }
48
54
  function buildDashboard(container, context) {
49
55
  // console.log('build dashboard')
@@ -1,3 +1,3 @@
1
1
  import { Fetcher, IndexedFormula, NamedNode } from 'rdflib';
2
- export declare function generateHomepage(subject: NamedNode, store: IndexedFormula, fetcher: Fetcher): Promise<HTMLElement>;
2
+ export declare function generateHomepage(uri: NamedNode, store: IndexedFormula, fetcher: Fetcher): Promise<HTMLElement>;
3
3
  //# sourceMappingURL=homepage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"homepage.d.ts","sourceRoot":"","sources":["../../src/dashboard/homepage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAGhE,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAUtB"}
1
+ {"version":3,"file":"homepage.d.ts","sourceRoot":"","sources":["../../src/dashboard/homepage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAG3D,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAUtB"}
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.generateHomepage = generateHomepage;
7
- var _rdflib = require("rdflib");
8
- var _solidUi = require("solid-ui");
9
- async function generateHomepage(subject, store, fetcher) {
10
- const ownersProfile = await loadProfile(subject, store, fetcher);
11
- const name = getName(store, ownersProfile);
7
+ var _ownerProfile = require("../profileUtils/ownerProfile");
8
+ async function generateHomepage(uri, store, fetcher) {
9
+ const ownersProfile = await (0, _ownerProfile.loadProfileFromURI)(uri, store, fetcher);
10
+ const name = (0, _ownerProfile.getName)(store, ownersProfile);
12
11
  const wrapper = document.createElement('div');
13
12
  wrapper.classList.add('container');
14
13
  wrapper.appendChild(createTitle(ownersProfile.uri, name));
@@ -35,38 +34,9 @@ function createTitle(uri, name) {
35
34
  profileLink.href = uri;
36
35
  profileLink.innerText = name;
37
36
  const profileLinkPost = document.createElement('span');
38
- profileLinkPost.innerText = '\'s Pod';
37
+ profileLinkPost.innerText = '\'s Profile';
39
38
  const title = document.createElement('h1');
40
39
  title.appendChild(profileLink);
41
40
  title.appendChild(profileLinkPost);
42
41
  return title;
43
- }
44
- async function loadProfile(subject, store, fetcher) {
45
- const pod = subject.site().uri;
46
- // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now
47
- const webId = (0, _rdflib.sym)(`${pod}profile/card#me`);
48
- try {
49
- await fetcher.load(webId);
50
- return webId;
51
- } catch (err) {
52
- // Fall back to pod root and any discovered profile links.
53
- }
54
- try {
55
- await fetcher.load(subject);
56
- } catch (err) {
57
- return subject;
58
- }
59
- const primaryTopic = store.any(subject, _solidUi.ns.foaf('primaryTopic'), null, subject.doc());
60
- if (primaryTopic && primaryTopic.termType === 'NamedNode') {
61
- try {
62
- await fetcher.load(primaryTopic);
63
- return primaryTopic;
64
- } catch (err) {
65
- return subject;
66
- }
67
- }
68
- return subject;
69
- }
70
- function getName(store, ownersProfile) {
71
- return store.anyValue(ownersProfile, _solidUi.ns.vcard('fn'), null, ownersProfile.doc()) || store.anyValue(ownersProfile, _solidUi.ns.foaf('name'), null, ownersProfile.doc()) || new URL(ownersProfile.uri).host.split('.')[0];
72
42
  }