solid-panes 4.2.4 → 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) {
@@ -31605,8 +31605,11 @@ function UserInput (outline) {
31605
31605
  false
31606
31606
  )
31607
31607
  window.addEventListener('mousedown', UserInput.Mousedown, false)
31608
- document.getElementById('outline').oncontextmenu = function () {
31609
- return false
31608
+ const outlineView = document.getElementById('OutlineView')
31609
+ if (outlineView) {
31610
+ outlineView.oncontextmenu = function () {
31611
+ return false
31612
+ }
31610
31613
  }
31611
31614
 
31612
31615
  if (e.button === 2) {
@@ -33325,10 +33328,10 @@ function QuerySource () {
33325
33328
  async function showDashboard (options = {}) {
33326
33329
  const dashboardContainer = getDashboardContainer()
33327
33330
  const outlineContainer = getOutlineContainer()
33328
- // reuse dashboard if already children already is inserted
33331
+ // reuse dashboard if children already inserted
33329
33332
  if (dashboardContainer.childNodes.length > 0 && options.pane) {
33330
- outlineContainer.style.display = 'none'
33331
- dashboardContainer.style.display = 'inherit'
33333
+ outlineContainer.setAttribute('hidden', '')
33334
+ dashboardContainer.removeAttribute('hidden')
33332
33335
  const tab = dashboardContainer.querySelector(
33333
33336
  `[data-global-pane-name="${options.pane}"]`
33334
33337
  )
@@ -33351,7 +33354,8 @@ function QuerySource () {
33351
33354
  external_SolidLogic_.authSession.events.on('logout', closeDashboard)
33352
33355
 
33353
33356
  // finally - switch to showing dashboard
33354
- outlineContainer.style.display = 'none'
33357
+ outlineContainer.setAttribute('hidden', '')
33358
+ dashboardContainer.removeAttribute('hidden')
33355
33359
  dashboardContainer.appendChild(dashboard)
33356
33360
  const tab = dashboardContainer.querySelector(
33357
33361
  `[data-global-pane-name="${options.pane}"]`
@@ -33361,35 +33365,37 @@ function QuerySource () {
33361
33365
  }
33362
33366
 
33363
33367
  function closeDashboard () {
33364
- dashboardContainer.style.display = 'none'
33365
- outlineContainer.style.display = 'inherit'
33368
+ dashboardContainer.setAttribute('hidden', '')
33369
+ outlineContainer.removeAttribute('hidden')
33366
33370
  }
33367
33371
  }
33368
33372
  this.showDashboard = showDashboard
33369
33373
 
33370
33374
  function getDashboardContainer () {
33371
- return getOrCreateContainer('GlobalDashboard')
33375
+ return getOrCreateContainer('GlobalDashboard', 'Dashboard')
33372
33376
  }
33373
33377
 
33374
33378
  function getOutlineContainer () {
33375
- return getOrCreateContainer('outline')
33379
+ return getOrCreateContainer('OutlineView', 'Resource browser')
33376
33380
  }
33377
33381
 
33378
33382
  /**
33379
- * Get element with id or create a new on the fly with that id
33383
+ * Get element with id or create a new section on the fly with that id
33380
33384
  *
33381
33385
  * @param {string} id The ID of the element you want to get or create
33386
+ * @param {string} [ariaLabel] Optional aria-label for accessibility
33382
33387
  * @returns {HTMLElement}
33383
33388
  */
33384
- function getOrCreateContainer (id) {
33389
+ function getOrCreateContainer (id, ariaLabel) {
33385
33390
  return (
33386
33391
  document.getElementById(id) ||
33387
33392
  (() => {
33388
- const dashboardContainer = document.createElement('div')
33389
- dashboardContainer.id = id
33393
+ const container = document.createElement('section')
33394
+ container.id = id
33395
+ if (ariaLabel) container.setAttribute('aria-label', ariaLabel)
33390
33396
  const mainContainer =
33391
33397
  document.querySelector('[role="main"]') || document.body
33392
- return mainContainer.appendChild(dashboardContainer)
33398
+ return mainContainer.appendChild(container)
33393
33399
  })()
33394
33400
  )
33395
33401
  }
@@ -33442,8 +33448,9 @@ function QuerySource () {
33442
33448
  const paneHiddenStyle =
33443
33449
  'width: 24px; border-radius: 0.5em; margin-left: 1em; padding: 3px'
33444
33450
  const paneIconTray = td.appendChild(dom.createElement('nav'))
33445
- paneIconTray.style =
33446
- 'display:flex; justify-content: flex-start; align-items: center;'
33451
+ paneIconTray.setAttribute('role', 'toolbar')
33452
+ paneIconTray.setAttribute('aria-label', 'Pane views')
33453
+ paneIconTray.classList.add('paneIconTray')
33447
33454
 
33448
33455
  const relevantPanes = options.hideList
33449
33456
  ? []
@@ -34438,7 +34445,7 @@ function QuerySource () {
34438
34445
  outline.GotoSubject(object, true)
34439
34446
  /* //deal with this later
34440
34447
  deselectAll();
34441
- var newTr=dom.getElementById('outline').lastChild;
34448
+ var newTr=dom.getElementById('OutlineView').lastChild;
34442
34449
  setSelected(newTr.firstChild.firstChild.childNodes[1].lastChild,true);
34443
34450
  function setSelectedAfterward(uri){
34444
34451
  deselectAll();
@@ -35103,7 +35110,7 @@ function QuerySource () {
35103
35110
  @param table -- option -- a table element in which to put the outline.
35104
35111
  */
35105
35112
  this.GotoSubject = function (subject, expand, pane, solo, referrer, table) {
35106
- table = table || dom.getElementById('outline') // if does not exist just add one? nowhere to out it
35113
+ table = table || dom.getElementById('OutlineView') // if does not exist just add one? nowhere to out it
35107
35114
  if (solo) {
35108
35115
  external_UI_.utils.emptyNode(table)
35109
35116
  table.style.width = '100%'
@@ -35666,6 +35673,7 @@ const basicPreferencesPane = {
35666
35673
  // The subject should be the logged in user.
35667
35674
  render: (subject, context) => {
35668
35675
  const dom = context.dom;
35676
+ // @ts-ignore
35669
35677
  const store = context.session.store;
35670
35678
  function complainIfBad(ok, mess) {
35671
35679
  if (ok)
@@ -41869,6 +41877,7 @@ const paneDef = {
41869
41877
  audience: [external_UI_.ns.solid('PowerUser')],
41870
41878
  // Does the subject deserve an pad pane?
41871
41879
  label: function (subject, context) {
41880
+ // @ts-ignore
41872
41881
  const t = context.session.store.findTypeURIs(subject);
41873
41882
  if (t['http://www.w3.org/ns/pim/pad#Notepad']) {
41874
41883
  return 'pad';
@@ -41877,6 +41886,7 @@ const paneDef = {
41877
41886
  },
41878
41887
  mintClass: external_UI_.ns.pad('Notepad'),
41879
41888
  mintNew: function (context, newPaneOptions) {
41889
+ // @ts-ignore
41880
41890
  const store = context.session.store;
41881
41891
  const updater = store.updater;
41882
41892
  if (newPaneOptions.me && !newPaneOptions.me.uri) {
@@ -41919,6 +41929,7 @@ const paneDef = {
41919
41929
  // @@ TODO Set better type for paneOptions
41920
41930
  render: function (subject, context, paneOptions) {
41921
41931
  const dom = context.dom;
41932
+ // @ts-ignore
41922
41933
  const store = context.session.store;
41923
41934
  // Utility functions
41924
41935
  const complainIfBad = function (ok, message) {
@@ -43294,6 +43305,7 @@ const TabbedPane = {
43294
43305
  audience: [external_UI_.ns.solid('PowerUser')],
43295
43306
  // Does the subject deserve this pane?
43296
43307
  label: (subject, context) => {
43308
+ // @ts-ignore
43297
43309
  const kb = context.session.store;
43298
43310
  const typeURIs = kb.findTypeURIs(subject);
43299
43311
  if (external_UI_.ns.meeting('Cluster').uri in typeURIs) {
@@ -43303,6 +43315,7 @@ const TabbedPane = {
43303
43315
  },
43304
43316
  render: (subject, context) => {
43305
43317
  const dom = context.dom;
43318
+ // @ts-ignore
43306
43319
  const store = context.session.store;
43307
43320
  const div = dom.createElement('div');
43308
43321
  (async () => {
@@ -49049,6 +49062,7 @@ const internalPane_pane = {
49049
49062
  },
49050
49063
  render: function (subject, context) {
49051
49064
  const dom = context.dom;
49065
+ // @ts-ignore
49052
49066
  const store = context.session.store;
49053
49067
  const canonizedSubject = store.canon(subject);
49054
49068
  const types = store.findTypeURIs(canonizedSubject);
@@ -49443,7 +49457,9 @@ function createContext(dom, paneRegistry, store, logic) {
49443
49457
  getOutliner: getOutliner,
49444
49458
  session: {
49445
49459
  paneRegistry,
49460
+ // @ts-ignore
49446
49461
  store,
49462
+ // @ts-ignore
49447
49463
  logic
49448
49464
  }
49449
49465
  };