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
@@ -8,6 +8,7 @@ var _solidUi = require("solid-ui");
8
8
  var _rdflib = require("rdflib");
9
9
  var _marked = require("marked");
10
10
  var _dompurify = _interopRequireDefault(require("dompurify"));
11
+ require("./humanReadablePane.css");
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
13
  /* Human-readable Pane
13
14
  **
@@ -16,6 +17,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
16
17
  */
17
18
 
18
19
  // Helper function to check if a URI has a markdown file extension
20
+
19
21
  const isMarkdownFile = uri => {
20
22
  if (!uri) return false;
21
23
  const path = uri.split('?')[0].split('#')[0]; // Remove query string and fragment
@@ -24,6 +26,12 @@ const isMarkdownFile = uri => {
24
26
 
25
27
  // Cache for dokieli detection results (keyed by subject URI)
26
28
  const dokieliCache = new Map();
29
+ function applyFrameClasses(frame, modifier, lines) {
30
+ frame.className = '';
31
+ frame.classList.add('human-readable-pane__frame');
32
+ frame.classList.add(`human-readable-pane__frame--${modifier}`);
33
+ frame.style.setProperty('--human-readable-pane-height', `${lines}em`);
34
+ }
27
35
  const humanReadablePane = {
28
36
  icon: function (subject, context) {
29
37
  // Markdown files detected by extension
@@ -131,11 +139,16 @@ const humanReadablePane = {
131
139
  const myDocument = context.dom;
132
140
  const div = myDocument.createElement('div');
133
141
  const kb = context.session.store;
142
+ function applyEnvironmentAttributes(element) {
143
+ const environment = context.environment ?? {};
144
+ element.dataset.layout = environment.layout ?? 'desktop';
145
+ }
134
146
  const cts = kb.fetcher.getHeader(subject.doc(), 'content-type');
135
147
  const ct = cts ? cts[0].split(';', 1)[0].trim() : null; // remove content-type parameters
136
148
 
137
149
  // Fallback: detect markdown by file extension if content-type is not text/markdown
138
150
  const isMarkdown = ct === 'text/markdown' || isMarkdownFile(subject.uri);
151
+ const isPlainText = ct === 'text/plain';
139
152
  if (ct) {
140
153
  // console.log('humanReadablePane: c-t:' + ct)
141
154
  } else {
@@ -143,38 +156,61 @@ const humanReadablePane = {
143
156
  }
144
157
 
145
158
  // @@ When we can, use CSP to turn off scripts within the iframe
146
- div.setAttribute('class', 'docView');
159
+ div.classList.add('human-readable-pane');
160
+ applyEnvironmentAttributes(div);
147
161
 
148
162
  // render markdown to html in a DIV element
149
163
  const renderMarkdownContent = function (frame) {
150
164
  kb.fetcher.webOperation('GET', subject.uri).then(response => {
151
- const markdownText = response.responseText;
165
+ const markdownText = response.responseText ?? '';
152
166
  const lines = Math.min(30, markdownText.split(/\n/).length + 5);
153
- const res = _marked.marked.parse(markdownText);
167
+ const res = _marked.marked.parse(markdownText, {
168
+ async: false
169
+ });
154
170
  const clean = _dompurify.default.sanitize(res);
155
171
  frame.innerHTML = clean;
156
- frame.setAttribute('class', 'doc');
157
- frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`);
172
+ applyFrameClasses(frame, 'markdown', lines);
158
173
  }).catch(error => {
159
174
  console.error('Error fetching markdown content:', error);
160
175
  frame.innerHTML = '<p>Error loading content</p>';
161
176
  });
162
177
  };
178
+
179
+ // render plain text in a PRE element
180
+ const renderPlainTextContent = function (frame) {
181
+ kb.fetcher.webOperation('GET', subject.uri).then(response => {
182
+ const plainText = response.responseText ?? '';
183
+ const lines = Math.min(30, plainText.split(/\n/).length + 5);
184
+ frame.textContent = plainText;
185
+ applyFrameClasses(frame, 'plain-text', lines);
186
+ }).catch(error => {
187
+ console.error('Error fetching plain text content:', error);
188
+ frame.textContent = 'Error loading content';
189
+ });
190
+ };
163
191
  const setIframeAttributes = (frame, lines) => {
164
192
  frame.setAttribute('src', subject.uri);
165
- frame.setAttribute('class', 'doc');
166
- frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`);
193
+ applyFrameClasses(frame, 'iframe', lines);
167
194
  };
168
195
  if (isMarkdown) {
169
196
  // For markdown, use a DIV element and render the content
170
- const frame = myDocument.createElement('DIV');
197
+ const frame = myDocument.createElement('div');
171
198
  renderMarkdownContent(frame);
172
- const tr = myDocument.createElement('TR');
173
- tr.appendChild(frame);
174
- div.appendChild(tr);
199
+ const frameContainer = myDocument.createElement('div');
200
+ frameContainer.classList.add('human-readable-pane__container');
201
+ frameContainer.appendChild(frame);
202
+ div.appendChild(frameContainer);
203
+ } else if (isPlainText) {
204
+ // For plain text, use a PRE element and render the content
205
+ const frame = myDocument.createElement('pre');
206
+ renderPlainTextContent(frame);
207
+ const frameContainer = myDocument.createElement('div');
208
+ frameContainer.classList.add('human-readable-pane__container');
209
+ frameContainer.appendChild(frame);
210
+ div.appendChild(frameContainer);
175
211
  } else {
176
212
  // For other content types, use IFRAME
177
- const frame = myDocument.createElement('IFRAME');
213
+ const frame = myDocument.createElement('iframe');
178
214
 
179
215
  // Apply sandbox for HTML/XHTML
180
216
  if (ct === 'text/html' || ct === 'application/xhtml+xml') {
@@ -183,7 +219,7 @@ const humanReadablePane = {
183
219
 
184
220
  // Fetch content to calculate lines dynamically
185
221
  kb.fetcher.webOperation('GET', subject.uri).then(response => {
186
- const blobText = response.responseText;
222
+ const blobText = response.responseText ?? '';
187
223
  const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5;
188
224
  const lines = Math.min(30, blobText.split(/\n/).length + newLines);
189
225
 
@@ -196,9 +232,10 @@ const humanReadablePane = {
196
232
  // Fallback to default height
197
233
  setIframeAttributes(frame, 30);
198
234
  });
199
- const tr = myDocument.createElement('TR');
200
- tr.appendChild(frame);
201
- div.appendChild(tr);
235
+ const frameContainer = myDocument.createElement('div');
236
+ frameContainer.classList.add('human-readable-pane__container');
237
+ frameContainer.appendChild(frame);
238
+ div.appendChild(frameContainer);
202
239
  }
203
240
  return div;
204
241
  }
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 20 20"
3
+ fill="none"
4
+ >
5
+ <path d="M9.99935 18.3334C14.6017 18.3334 18.3327 14.6025 18.3327 10.0001C18.3327 5.39771 14.6017 1.66675 9.99935 1.66675C5.39698 1.66675 1.66602 5.39771 1.66602 10.0001C1.66602 14.6025 5.39698 18.3334 9.99935 18.3334Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M10 5V10L13.3333 8.33333" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ >
5
+ <path d="M21 15C21 15.5304 20.7893 16.0391 20.4142 16.4142C20.0391 16.7893 19.5304 17 19 17H7L3 21V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -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 12 7"
3
+ fill="none"
4
+ >
5
+ <path d="M0.679688 0.678955L5.50729 5.50656L10.3349 0.678955" stroke="currentColor" stroke-width="1.35776" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -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>
@@ -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>
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 35 35"
3
+ fill="none"
4
+ >
5
+ <path d="M17.4546 30.9091C10.0462 30.9091 4 24.8625 4 17.4546C4 10.0462 10.0467 4 17.4546 4C24.8629 4 30.9091 10.0466 30.9091 17.4546C30.9091 24.8629 24.8625 30.9091 17.4546 30.9091ZM17.4546 5.57671C10.9051 5.57671 5.57671 10.9051 5.57671 17.4546C5.57671 24.0041 10.9051 29.3324 17.4546 29.3324C24.0041 29.3324 29.3324 24.0041 29.3324 17.4546C29.3324 10.9051 24.0041 5.57671 17.4546 5.57671Z" fill="currentColor"/>
6
+ <path d="M17.4554 21.3963C17.0201 21.3963 16.6671 21.0434 16.6671 20.608V19.7642C16.6671 18.3614 17.4221 17.0533 18.6374 16.3502C19.3671 15.9281 19.8205 15.1429 19.8205 14.3011C19.8205 12.997 18.7595 11.9361 17.4554 11.9361C16.1513 11.9361 15.0904 12.997 15.0904 14.3011C15.0904 14.7365 14.7374 15.0895 14.302 15.0895C13.8666 15.0895 13.5137 14.7365 13.5137 14.3011C13.5137 12.1277 15.2819 10.3594 17.4554 10.3594C19.6289 10.3594 21.3972 12.1277 21.3972 14.3011C21.3972 15.7039 20.6422 17.012 19.4269 17.7151C18.6971 18.1372 18.2438 18.9224 18.2438 19.7642V20.608C18.2438 21.0434 17.8908 21.3963 17.4554 21.3963Z" fill="currentColor"/>
7
+ <path d="M17.4544 24.5499C17.8898 24.5499 18.2427 24.1969 18.2427 23.7615C18.2427 23.3261 17.8898 22.9731 17.4544 22.9731C17.019 22.9731 16.666 23.3261 16.666 23.7615C16.666 24.1969 17.019 24.5499 17.4544 24.5499Z" fill="currentColor"/>
8
+ </svg>
@@ -0,0 +1,2 @@
1
+ export declare function createUiIcon(icon: string, label?: string, color?: string): string;
2
+ //# sourceMappingURL=iconHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iconHelper.d.ts","sourceRoot":"","sources":["../../src/icons/iconHelper.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,KAAK,SAAS,EACd,KAAK,GAAE,MAAuB,GAC7B,MAAM,CA6BR"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createUiIcon = createUiIcon;
7
+ function createUiIcon(icon, label = 'icon', color = 'currentColor') {
8
+ const styleBlocks = ['display:block'];
9
+ const extraAttrs = ['role="img"', `aria-label="${label}"`, 'focusable="false"', 'aria-hidden="true"', 'width="100%"', 'height="100%"', `style="${styleBlocks.join('; ')}"`].join(' ');
10
+ let svg = icon.replace(/^\uFEFF/, '').trim();
11
+
12
+ // If webpack gave us a data URL instead of raw SVG, decode it first
13
+ if (svg.startsWith('data:image/svg+xml;base64,')) {
14
+ svg = decodeURIComponent(escape(atob(svg.slice('data:image/svg+xml;base64,'.length))));
15
+ } else if (svg.startsWith('data:image/svg+xml,')) {
16
+ svg = decodeURIComponent(svg.slice('data:image/svg+xml,'.length));
17
+ }
18
+ if (color) {
19
+ svg = svg.replace(/\bcurrentColor\b/gi, color);
20
+ }
21
+ svg = svg.replace(/^(<svg\b)/i, `$1 ${extraAttrs}`);
22
+ return `data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(svg)))}`;
23
+ }
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 24 24"
3
+ fill="none"
4
+ >
5
+ <path d="M3 6H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M3 12H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M3 18H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
8
+ </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>
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 64 64"
3
+ fill="none"
4
+ >
5
+ <path d="M32.0007 58.6666C46.7282 58.6666 58.6673 46.7275 58.6673 31.9999C58.6673 17.2723 46.7282 5.33325 32.0007 5.33325C17.2731 5.33325 5.33398 17.2723 5.33398 31.9999C5.33398 46.7275 17.2731 58.6666 32.0007 58.6666Z" stroke="currentColor" stroke-width="5.33333" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M32 34.6667C36.4183 34.6667 40 31.085 40 26.6667C40 22.2485 36.4183 18.6667 32 18.6667C27.5817 18.6667 24 22.2485 24 26.6667C24 31.085 27.5817 34.6667 32 34.6667Z" stroke="currentColor" stroke-width="5.33333" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M18.666 55.0986V50.6666C18.666 49.2521 19.2279 47.8955 20.2281 46.8954C21.2283 45.8952 22.5849 45.3333 23.9993 45.3333H39.9993C41.4138 45.3333 42.7704 45.8952 43.7706 46.8954C44.7708 47.8955 45.3327 49.2521 45.3327 50.6666V55.0986" stroke="currentColor" stroke-width="5.33333" stroke-linecap="round" stroke-linejoin="round"/>
8
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 20 20"
3
+ fill="none"
4
+ >
5
+ <path d="M15 6.66675C16.3807 6.66675 17.5 5.54746 17.5 4.16675C17.5 2.78604 16.3807 1.66675 15 1.66675C13.6193 1.66675 12.5 2.78604 12.5 4.16675C12.5 5.54746 13.6193 6.66675 15 6.66675Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M5 12.5C6.38071 12.5 7.5 11.3807 7.5 10C7.5 8.61929 6.38071 7.5 5 7.5C3.61929 7.5 2.5 8.61929 2.5 10C2.5 11.3807 3.61929 12.5 5 12.5Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M15 18.3333C16.3807 18.3333 17.5 17.214 17.5 15.8333C17.5 14.4525 16.3807 13.3333 15 13.3333C13.6193 13.3333 12.5 14.4525 12.5 15.8333C12.5 17.214 13.6193 18.3333 15 18.3333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <path d="M7.1582 11.2583L12.8499 14.575" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
9
+ <path d="M12.8415 5.42505L7.1582 8.74172" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
10
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 20 20"
3
+ fill="none"
4
+ >
5
+ <path d="M13.3334 14.1667L17.5 10L13.3334 5.83337" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M17.5 10H7.5" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M7.5 17.5H4.16667C3.72464 17.5 3.30072 17.3244 2.98816 17.0118C2.67559 16.6993 2.5 16.2754 2.5 15.8333V4.16667C2.5 3.72464 2.67559 3.30072 2.98816 2.98816C3.30072 2.67559 3.72464 2.5 4.16667 2.5H7.5" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
8
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"
2
+ viewBox="0 0 24 24"
3
+ fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
4
+ class="lucide lucide-square-arrow-right-enter-icon lucide-square-arrow-right-enter">
5
+
6
+ <path d="m10 16 4-4-4-4"/>
7
+ <path d="M3 12h11"/>
8
+ <path d="M3 8V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3"/>
9
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.60306 1.91274C9.63958 1.83895 9.696 1.77685 9.76594 1.73342C9.83588 1.69 9.91657 1.66699 9.9989 1.66699C10.0812 1.66699 10.1619 1.69 10.2319 1.73342C10.3018 1.77685 10.3582 1.83895 10.3947 1.91274L12.3197 5.8119C12.4465 6.06854 12.6337 6.29058 12.8653 6.45895C13.0968 6.62732 13.3657 6.737 13.6489 6.77857L17.9539 7.40857C18.0355 7.42039 18.1121 7.4548 18.1751 7.5079C18.2382 7.56101 18.2851 7.63069 18.3106 7.70908C18.3361 7.78746 18.3391 7.87141 18.3194 7.95143C18.2996 8.03146 18.2579 8.10436 18.1989 8.1619L15.0856 11.1936C14.8802 11.3937 14.7266 11.6406 14.6379 11.9133C14.5492 12.1859 14.5281 12.476 14.5764 12.7586L15.3114 17.0419C15.3258 17.1234 15.317 17.2074 15.286 17.2841C15.255 17.3609 15.203 17.4274 15.136 17.4761C15.069 17.5247 14.9897 17.5536 14.9071 17.5593C14.8245 17.5651 14.742 17.5475 14.6689 17.5086L10.8206 15.4852C10.567 15.3521 10.2849 15.2825 9.99848 15.2825C9.71208 15.2825 9.42996 15.3521 9.1764 15.4852L5.3289 17.5086C5.25584 17.5472 5.17339 17.5646 5.09094 17.5588C5.00848 17.5529 4.92933 17.524 4.86247 17.4754C4.79562 17.4268 4.74376 17.3604 4.71278 17.2838C4.6818 17.2071 4.67294 17.1233 4.68723 17.0419L5.4214 12.7594C5.46989 12.4767 5.44888 12.1864 5.36018 11.9136C5.27147 11.6408 5.11774 11.3937 4.91223 11.1936L1.7989 8.16274C1.73939 8.10526 1.69722 8.03223 1.6772 7.95197C1.65717 7.8717 1.66009 7.78742 1.68563 7.70873C1.71116 7.63004 1.75828 7.56011 1.82163 7.50689C1.88497 7.45367 1.96198 7.41932 2.0439 7.40774L6.34806 6.77857C6.63161 6.73732 6.90089 6.62778 7.13272 6.45939C7.36455 6.291 7.55198 6.0688 7.6789 5.8119L9.60306 1.91274Z" stroke="#314158" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ .image-pane__image {
2
+ max-width: 100%;
3
+ max-height: 100%;
4
+ }
@@ -0,0 +1,12 @@
1
+ import type { DataBrowserContext } from 'pane-registry';
2
+ import type { NamedNode } from 'rdflib';
3
+ import './imagePane.css';
4
+ type ImagePane = {
5
+ icon: string;
6
+ name: string;
7
+ label: (subject: NamedNode, context: DataBrowserContext) => string | null;
8
+ render: (subject: NamedNode, context: DataBrowserContext) => HTMLDivElement;
9
+ };
10
+ export declare const imagePane: ImagePane;
11
+ export {};
12
+ //# sourceMappingURL=imagePane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imagePane.d.ts","sourceRoot":"","sources":["../src/imagePane.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,iBAAiB,CAAA;AAWxB,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,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;AAuBD,eAAO,MAAM,SAAS,EAAE,SA+CvB,CAAA"}
package/dist/imagePane.js CHANGED
@@ -5,12 +5,27 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.imagePane = void 0;
7
7
  var UI = _interopRequireWildcard(require("solid-ui"));
8
+ require("./imagePane.css");
8
9
  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); }
9
10
  /* Image Pane
10
11
  **
11
12
  ** This outline pane contains the document contents for an Image document
12
13
  */
13
14
 
15
+ function contentTypeMatch(store, subject, contentTypes) {
16
+ const contentTypesForSubject = store.fetcher.getHeader(subject, 'content-type');
17
+ if (!contentTypesForSubject) {
18
+ return false;
19
+ }
20
+ for (const contentType of contentTypesForSubject) {
21
+ for (const candidate of contentTypes) {
22
+ if (contentType.includes(candidate)) {
23
+ return true;
24
+ }
25
+ }
26
+ }
27
+ return false;
28
+ }
14
29
  const imagePane = exports.imagePane = {
15
30
  icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png',
16
31
  name: 'image',
@@ -23,19 +38,6 @@ const imagePane = exports.imagePane = {
23
38
 
24
39
  // See also the source pane, which has lower precedence.
25
40
 
26
- const contentTypeMatch = function (store, x, contentTypes) {
27
- const cts = store.fetcher.getHeader(x, 'content-type');
28
- if (cts) {
29
- for (let j = 0; j < cts.length; j++) {
30
- for (let k = 0; k < contentTypes.length; k++) {
31
- if (cts[j].indexOf(contentTypes[k]) >= 0) {
32
- return true;
33
- }
34
- }
35
- }
36
- }
37
- return false;
38
- };
39
41
  const suppressed = ['application/pdf'];
40
42
  if (contentTypeMatch(store, subject, suppressed)) {
41
43
  return null;
@@ -46,8 +48,8 @@ const imagePane = exports.imagePane = {
46
48
  const myDocument = context.dom;
47
49
  const store = context.session.store;
48
50
  const div = myDocument.createElement('div');
49
- div.setAttribute('class', 'imageView');
50
- const img = myDocument.createElement('IMG');
51
+ div.setAttribute('class', 'image-pane');
52
+ const img = myDocument.createElement('img');
51
53
 
52
54
  // get image with authenticated fetch
53
55
  store.fetcher._fetch(subject.uri).then(function (response) {
@@ -56,12 +58,8 @@ const imagePane = exports.imagePane = {
56
58
  const objectURL = URL.createObjectURL(myBlob);
57
59
  img.setAttribute('src', objectURL); // w640 h480 //
58
60
  });
59
- img.setAttribute('style', 'max-width: 100%; max-height: 100%;');
60
- // div.style['max-width'] = '640'
61
- // div.style['max-height'] = '480'
62
- const tr = myDocument.createElement('TR'); // why need tr?
63
- tr.appendChild(img);
64
- div.appendChild(tr);
61
+ img.classList.add('image-pane__image');
62
+ div.appendChild(img);
65
63
  return div;
66
64
  }
67
65
  };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import versionInfo from './versionInfo';
2
2
  import * as UI from 'solid-ui';
3
3
  import OutlineManager from './outline/manager.js';
4
- import { list, paneForIcon, paneForPredicate, register, byName } from 'pane-registry';
5
- import initMainPage from './mainPage';
6
- declare function getOutliner(dom: any): any;
7
- export { OutlineManager, getOutliner, UI, versionInfo, initMainPage, list, // from paneRegistry
4
+ import { list, paneForIcon, paneForPredicate, register, byName, RenderEnvironment } from 'pane-registry';
5
+ import { initMainPage, refreshUI } from './mainPage';
6
+ declare function getOutliner(dom: any, environment?: RenderEnvironment): OutlineManager;
7
+ declare function updateEnvironment(outliner: OutlineManager, environment: RenderEnvironment): void;
8
+ export { OutlineManager, getOutliner, updateEnvironment, UI, versionInfo, initMainPage, refreshUI, list, // from paneRegistry
8
9
  paneForIcon, // from paneRegistry
9
10
  paneForPredicate, // from paneRegistry
10
11
  register, // from paneRegistry
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAA;AAG9B,OAAO,cAAc,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACP,MAAM,eAAe,CAAA;AAEtB,OAAO,YAAY,MAAM,YAAY,CAAA;AAErC,iBAAS,WAAW,CAAE,GAAG,KAAA,OAWxB;AAaD,OAAO,EACL,cAAc,EACd,WAAW,EACX,EAAE,EACF,WAAW,EACX,YAAY,EACZ,IAAI,EAAE,oBAAoB;AAC1B,WAAW,EAAE,oBAAoB;AACjC,gBAAgB,EAAE,oBAAoB;AACtC,QAAQ,EAAE,oBAAoB;AAC9B,MAAM,EACP,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAA;AAG9B,OAAO,cAAc,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,iBAAiB,EAClB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEpD,iBAAS,WAAW,CAAE,GAAG,KAAA,EAAE,WAAW,CAAC,EAAE,iBAAiB,GAAG,cAAc,CAe1E;AAED,iBAAS,iBAAiB,CAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,iBAAiB,QAInF;AAaD,OAAO,EACL,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,EAAE,EACF,WAAW,EACX,YAAY,EACZ,SAAS,EACT,IAAI,EAAE,oBAAoB;AAC1B,WAAW,EAAE,oBAAoB;AACjC,gBAAgB,EAAE,oBAAoB;AACtC,QAAQ,EAAE,oBAAoB;AAC9B,MAAM,EACP,CAAA"}
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ exports.getOutliner = getOutliner;
20
20
  Object.defineProperty(exports, "initMainPage", {
21
21
  enumerable: true,
22
22
  get: function () {
23
- return _mainPage.default;
23
+ return _mainPage.initMainPage;
24
24
  }
25
25
  });
26
26
  Object.defineProperty(exports, "list", {
@@ -41,12 +41,19 @@ Object.defineProperty(exports, "paneForPredicate", {
41
41
  return _paneRegistry.paneForPredicate;
42
42
  }
43
43
  });
44
+ Object.defineProperty(exports, "refreshUI", {
45
+ enumerable: true,
46
+ get: function () {
47
+ return _mainPage.refreshUI;
48
+ }
49
+ });
44
50
  Object.defineProperty(exports, "register", {
45
51
  enumerable: true,
46
52
  get: function () {
47
53
  return _paneRegistry.register;
48
54
  }
49
55
  });
56
+ exports.updateEnvironment = updateEnvironment;
50
57
  Object.defineProperty(exports, "versionInfo", {
51
58
  enumerable: true,
52
59
  get: function () {
@@ -61,7 +68,7 @@ var _manager = _interopRequireDefault(require("./outline/manager.js"));
61
68
  var _registerPanes = require("./registerPanes.js");
62
69
  var _paneRegistry = require("pane-registry");
63
70
  var _context = require("./outline/context");
64
- var _mainPage = _interopRequireDefault(require("./mainPage"));
71
+ var _mainPage = require("./mainPage");
65
72
  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); }
66
73
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
67
74
  /* SOLID PANES
@@ -76,7 +83,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
76
83
  ** If it is relevant, then it returns a suitable tooltip for a control which selects the pane
77
84
  */
78
85
 
79
- function getOutliner(dom) {
86
+ function getOutliner(dom, environment) {
80
87
  if (!dom.outlineManager) {
81
88
  const context = (0, _context.createContext)(dom, {
82
89
  list: _paneRegistry.list,
@@ -84,11 +91,19 @@ function getOutliner(dom) {
84
91
  paneForPredicate: _paneRegistry.paneForPredicate,
85
92
  register: _paneRegistry.register,
86
93
  byName: _paneRegistry.byName
87
- }, _solidLogic.store, _solidLogic.solidLogicSingleton);
94
+ }, _solidLogic.store, _solidLogic.solidLogicSingleton, environment);
88
95
  dom.outlineManager = new _manager.default(context);
96
+ } else if (environment) {
97
+ dom.outlineManager.context = dom.outlineManager.context || {};
98
+ dom.outlineManager.context.environment = environment;
89
99
  }
90
100
  return dom.outlineManager;
91
101
  }
102
+ function updateEnvironment(outliner, environment) {
103
+ if (!outliner) return;
104
+ outliner.context = outliner.context || {};
105
+ outliner.context.environment = environment;
106
+ }
92
107
  if (typeof window !== 'undefined') {
93
108
  getOutliner(window.document);
94
109
  }
@@ -0,0 +1,14 @@
1
+ .internalPaneContent {
2
+ background-color: #ddddff;
3
+ padding: var(--spacing-xs, 0.5em);
4
+ border-radius: 1rem;
5
+ }
6
+
7
+ .internalPaneControls {
8
+ width: 100%;
9
+ margin: var(--spacing-sm, 1em);
10
+ }
11
+
12
+ .internalPaneDeleteButton {
13
+ height: var(--icon-base, 2em);
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { PaneDefinition } from 'pane-registry';
2
+ import './internalPane.css';
2
3
  declare const pane: PaneDefinition;
3
4
  export default pane;
4
5
  //# sourceMappingURL=internalPane.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internalPane.d.ts","sourceRoot":"","sources":["../../src/internal/internalPane.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,QAAA,MAAM,IAAI,EAAE,cAwOX,CAAA;AAiBD,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"internalPane.d.ts","sourceRoot":"","sources":["../../src/internal/internalPane.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,oBAAoB,CAAA;AAE3B,QAAA,MAAM,IAAI,EAAE,cAqOX,CAAA;AAiBD,eAAe,IAAI,CAAA"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _solidUi = require("solid-ui");
8
8
  var _rdflib = require("rdflib");
9
+ require("./internalPane.css");
9
10
  /* Internal Pane
10
11
  **
11
12
  ** This outline pane contains the properties which are
@@ -21,6 +22,7 @@ const pane = {
21
22
  },
22
23
  render: function (subject, context) {
23
24
  const dom = context.dom;
25
+ // @ts-ignore
24
26
  const store = context.session.store;
25
27
  const canonizedSubject = store.canon(subject);
26
28
  const types = store.findTypeURIs(canonizedSubject);
@@ -30,8 +32,7 @@ const pane = {
30
32
  return view && view.predicates && !!(typeof view.predicates[pred.uri] !== 'undefined');
31
33
  }
32
34
  const div = dom.createElement('div');
33
- div.setAttribute('class', 'internalPane');
34
- div.setAttribute('style', 'background-color: #ddddff; padding: 0.5em; border-radius: 1em;');
35
+ div.classList.add('internalPane', 'internalPaneContent');
35
36
  function deleteRecursive(kb, folder) {
36
37
  const fetcher = kb.fetcher;
37
38
  if (!fetcher) {
@@ -69,8 +70,7 @@ const pane = {
69
70
  const isDocument = subject.uri && !subject.uri.includes('#');
70
71
  if (isDocument) {
71
72
  const controls = div.appendChild(dom.createElement('table'));
72
- controls.style.width = '100%';
73
- controls.style.margin = '1em';
73
+ controls.classList.add('internalPaneControls');
74
74
  const controlRow = controls.appendChild(dom.createElement('tr'));
75
75
  const deleteCell = controlRow.appendChild(dom.createElement('td'));
76
76
  const isFolder = subject.uri && subject.uri.endsWith('/') || store.holds(subject, _solidUi.ns.rdf('type'), _solidUi.ns.ldp('Container'));
@@ -95,8 +95,8 @@ const pane = {
95
95
  alert(str);
96
96
  });
97
97
  });
98
- deleteButton.style = 'height: 2em;';
99
- deleteButton.class = ''; // Remove hover hide
98
+ deleteButton.removeAttribute('class'); // Remove hover hide
99
+ deleteButton.classList.add('internalPaneDeleteButton');
100
100
  deleteCell.appendChild(deleteButton);
101
101
  }
102
102
  const refreshCell = controlRow.appendChild(dom.createElement('td'));
@@ -1,3 +1,15 @@
1
- import { LiveStore } from 'rdflib';
2
- export declare function createFooter(store: LiveStore): void;
1
+ import 'solid-ui/components/footer';
2
+ import type { LiveStore } from 'rdflib';
3
+ declare module 'solid-ui/components/footer';
4
+ import 'solid-ui/components/footer';
5
+ type FooterElement = HTMLElement & {
6
+ store?: LiveStore | null;
7
+ position?: 'static' | 'absolute' | 'relative' | 'fixed' | 'sticky';
8
+ top?: string;
9
+ right?: string;
10
+ bottom?: string;
11
+ left?: string;
12
+ };
13
+ export declare function createFooter(store: LiveStore): FooterElement;
14
+ export {};
3
15
  //# sourceMappingURL=footer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/mainPage/footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AASlC,wBAAgB,YAAY,CAAE,KAAK,EAAE,SAAS,QAE7C"}
1
+ {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/mainPage/footer.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,OAAO,QAAQ,4BAA4B,CAAA;AAC3C,OAAO,4BAA4B,CAAA;AAEnC,KAAK,aAAa,GAAG,WAAW,GAAG;IACjC,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACxB,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAA;IAClE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,YAAY,CAAE,KAAK,EAAE,SAAS,iBAuB7C"}