solid-panes 4.2.4-test.7 → 4.2.5-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.
package/README.md CHANGED
@@ -78,3 +78,11 @@ contacts (A VCARD Address Book, Group, Individual, Organization) can be handled
78
78
  pane. Any other pane which wants to deal with contacts can just use the pane within its own user interface.
79
79
 
80
80
  ![Mapping many classes on the L to panes on the R](https://solidos.github.io/solid-panes/doc/images/panes-for-classes.svg)
81
+
82
+
83
+ ## Generative AI usage
84
+ The SolidOS team is using GitHub Copilot integrated in Visual Studio Code.
85
+ We have added comments in the code to make it explicit which parts are 100% written by AI.
86
+
87
+ ### Prompt usage hitory:
88
+ * Model Claude Opus 4.6: Initially solid-panes is loaded into a HTML shell form mashlib that looks like ... Also, an iFrame is rendered inside the <div class="TabulatorOutline" id="DummyUUID"> for “isolated pane rendering”. Analize the solid-panes code for what it uses from this HTML and suggest a new HTML structure which is mobile and accessibility friendly. Lets go ahead and make chnages in this code as suggested to accommodate the new databwroser HTML.
@@ -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":"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;AAE9C,QAAA,MAAM,IAAI,EAAE,cAyOX,CAAA;AAiBD,eAAe,IAAI,CAAA"}
@@ -21,6 +21,7 @@ const pane = {
21
21
  },
22
22
  render: function (subject, context) {
23
23
  const dom = context.dom;
24
+ // @ts-ignore
24
25
  const store = context.session.store;
25
26
  const canonizedSubject = store.canon(subject);
26
27
  const types = store.findTypeURIs(canonizedSubject);
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/outline/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,wBAAgB,aAAa,CAC3B,GAAG,EAAE,YAAY,EACjB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,UAAU,GAChB,kBAAkB,CAUpB"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/outline/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,wBAAgB,aAAa,CAC3B,GAAG,EAAE,YAAY,EACjB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,UAAU,GAChB,kBAAkB,CAYpB"}
@@ -11,7 +11,9 @@ function createContext(dom, paneRegistry, store, logic) {
11
11
  getOutliner: _index.getOutliner,
12
12
  session: {
13
13
  paneRegistry,
14
+ // @ts-ignore
14
15
  store,
16
+ // @ts-ignore
15
17
  logic
16
18
  }
17
19
  };
@@ -400,10 +400,10 @@ function _default(context) {
400
400
  async function showDashboard(options = {}) {
401
401
  const dashboardContainer = getDashboardContainer();
402
402
  const outlineContainer = getOutlineContainer();
403
- // reuse dashboard if already children already is inserted
403
+ // reuse dashboard if children already inserted
404
404
  if (dashboardContainer.childNodes.length > 0 && options.pane) {
405
- outlineContainer.style.display = 'none';
406
- dashboardContainer.style.display = 'inherit';
405
+ outlineContainer.setAttribute('hidden', '');
406
+ dashboardContainer.removeAttribute('hidden');
407
407
  const tab = dashboardContainer.querySelector(`[data-global-pane-name="${options.pane}"]`);
408
408
  if (tab) {
409
409
  tab.click();
@@ -422,37 +422,40 @@ function _default(context) {
422
422
  _solidLogic.authSession.events.on('logout', closeDashboard);
423
423
 
424
424
  // finally - switch to showing dashboard
425
- outlineContainer.style.display = 'none';
425
+ outlineContainer.setAttribute('hidden', '');
426
+ dashboardContainer.removeAttribute('hidden');
426
427
  dashboardContainer.appendChild(dashboard);
427
428
  const tab = dashboardContainer.querySelector(`[data-global-pane-name="${options.pane}"]`);
428
429
  if (tab) {
429
430
  tab.click();
430
431
  }
431
432
  function closeDashboard() {
432
- dashboardContainer.style.display = 'none';
433
- outlineContainer.style.display = 'inherit';
433
+ dashboardContainer.setAttribute('hidden', '');
434
+ outlineContainer.removeAttribute('hidden');
434
435
  }
435
436
  }
436
437
  this.showDashboard = showDashboard;
437
438
  function getDashboardContainer() {
438
- return getOrCreateContainer('GlobalDashboard');
439
+ return getOrCreateContainer('GlobalDashboard', 'Dashboard');
439
440
  }
440
441
  function getOutlineContainer() {
441
- return getOrCreateContainer('outline');
442
+ return getOrCreateContainer('OutlineView', 'Resource browser');
442
443
  }
443
444
 
444
445
  /**
445
- * Get element with id or create a new on the fly with that id
446
+ * Get element with id or create a new section on the fly with that id
446
447
  *
447
448
  * @param {string} id The ID of the element you want to get or create
449
+ * @param {string} [ariaLabel] Optional aria-label for accessibility
448
450
  * @returns {HTMLElement}
449
451
  */
450
- function getOrCreateContainer(id) {
452
+ function getOrCreateContainer(id, ariaLabel) {
451
453
  return document.getElementById(id) || (() => {
452
- const dashboardContainer = document.createElement('div');
453
- dashboardContainer.id = id;
454
+ const container = document.createElement('section');
455
+ container.id = id;
456
+ if (ariaLabel) container.setAttribute('aria-label', ariaLabel);
454
457
  const mainContainer = document.querySelector('[role="main"]') || document.body;
455
- return mainContainer.appendChild(dashboardContainer);
458
+ return mainContainer.appendChild(container);
456
459
  })();
457
460
  }
458
461
  async function loadContainerRepresentation(subject) {
@@ -496,7 +499,9 @@ function _default(context) {
496
499
  const paneShownStyle = 'width: 24px; border-radius: 0.5em; border-top: solid #222 1px; border-left: solid #222 0.1em; border-bottom: solid #eee 0.1em; border-right: solid #eee 0.1em; margin-left: 1em; padding: 3px; background-color: #ffd;';
497
500
  const paneHiddenStyle = 'width: 24px; border-radius: 0.5em; margin-left: 1em; padding: 3px';
498
501
  const paneIconTray = td.appendChild(dom.createElement('nav'));
499
- paneIconTray.style = 'display:flex; justify-content: flex-start; align-items: center;';
502
+ paneIconTray.setAttribute('role', 'toolbar');
503
+ paneIconTray.setAttribute('aria-label', 'Pane views');
504
+ paneIconTray.classList.add('paneIconTray');
500
505
  const relevantPanes = options.hideList ? [] : await getRelevantPanes(subject, context);
501
506
  tr.firstPane = requiredPane || getPane(relevantPanes, subject);
502
507
  const paneNumber = relevantPanes.indexOf(tr.firstPane);
@@ -1304,7 +1309,7 @@ function _default(context) {
1304
1309
  outline.GotoSubject(object, true);
1305
1310
  /* //deal with this later
1306
1311
  deselectAll();
1307
- var newTr=dom.getElementById('outline').lastChild;
1312
+ var newTr=dom.getElementById('OutlineView').lastChild;
1308
1313
  setSelected(newTr.firstChild.firstChild.childNodes[1].lastChild,true);
1309
1314
  function setSelectedAfterward(uri){
1310
1315
  deselectAll();
@@ -1878,7 +1883,7 @@ function _default(context) {
1878
1883
  @param table -- option -- a table element in which to put the outline.
1879
1884
  */
1880
1885
  this.GotoSubject = function (subject, expand, pane, solo, referrer, table) {
1881
- table = table || dom.getElementById('outline'); // if does not exist just add one? nowhere to out it
1886
+ table = table || dom.getElementById('OutlineView'); // if does not exist just add one? nowhere to out it
1882
1887
  if (solo) {
1883
1888
  UI.utils.emptyNode(table);
1884
1889
  table.style.width = '100%';
@@ -1069,9 +1069,12 @@ function UserInput(outline) {
1069
1069
  }
1070
1070
  }, false);
1071
1071
  window.addEventListener('mousedown', UserInput.Mousedown, false);
1072
- document.getElementById('outline').oncontextmenu = function () {
1073
- return false;
1074
- };
1072
+ const outlineView = document.getElementById('OutlineView');
1073
+ if (outlineView) {
1074
+ outlineView.oncontextmenu = function () {
1075
+ return false;
1076
+ };
1077
+ }
1075
1078
  if (e.button === 2) {
1076
1079
  // right click
1077
1080
  UserInput.switchMode();
@@ -1 +1 @@
1
- {"version":3,"file":"padPane.d.ts","sourceRoot":"","sources":["../../src/pad/padPane.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAK9C,QAAA,MAAM,OAAO,EAAE,cAmiBd,CAAA;AAGD,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"padPane.d.ts","sourceRoot":"","sources":["../../src/pad/padPane.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAK9C,QAAA,MAAM,OAAO,EAAE,cAsiBd,CAAA;AAGD,eAAe,OAAO,CAAA"}
@@ -18,6 +18,7 @@ const paneDef = {
18
18
  audience: [_solidUi.ns.solid('PowerUser')],
19
19
  // Does the subject deserve an pad pane?
20
20
  label: function (subject, context) {
21
+ // @ts-ignore
21
22
  const t = context.session.store.findTypeURIs(subject);
22
23
  if (t['http://www.w3.org/ns/pim/pad#Notepad']) {
23
24
  return 'pad';
@@ -26,6 +27,7 @@ const paneDef = {
26
27
  },
27
28
  mintClass: _solidUi.ns.pad('Notepad'),
28
29
  mintNew: function (context, newPaneOptions) {
30
+ // @ts-ignore
29
31
  const store = context.session.store;
30
32
  const updater = store.updater;
31
33
  if (newPaneOptions.me && !newPaneOptions.me.uri) {
@@ -65,6 +67,7 @@ const paneDef = {
65
67
  // @@ TODO Set better type for paneOptions
66
68
  render: function (subject, context, paneOptions) {
67
69
  const dom = context.dom;
70
+ // @ts-ignore
68
71
  const store = context.session.store;
69
72
  // Utility functions
70
73
  const complainIfBad = function (ok, message) {