mashlib 2.0.0-a3c5171a → 2.0.0-a5f2d43a

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.
@@ -2,6 +2,17 @@
2
2
  <html id="docHTML">
3
3
  <head>
4
4
  <meta content="text/html; charset=UTF-8" http-equiv="content-type">
5
+ <script>
6
+ // Suppress harmless ResizeObserver loop errors that block the UI
7
+ window.addEventListener('error', function(e) {
8
+ if (e.message && e.message.includes('ResizeObserver loop')) {
9
+ e.stopImmediatePropagation();
10
+ e.stopPropagation();
11
+ e.preventDefault();
12
+ return false;
13
+ }
14
+ }, true);
15
+ </script>
5
16
  <link type="text/css" rel="stylesheet" href="mash.css" />
6
17
  <script type="text/javascript" src="mashlib.js"></script>
7
18
  <script>
@@ -10,7 +21,8 @@ document.addEventListener('DOMContentLoaded', function() {
10
21
  const authSession = SolidLogic.authSession
11
22
  const store = SolidLogic.store
12
23
  const dom = document
13
- $rdf.Fetcher.crossSiteProxyTemplate = self.origin + '/xss?uri={uri}'
24
+ // Disable cross-site proxy - modern Solid servers support CORS
25
+ // $rdf.Fetcher.crossSiteProxyTemplate = self.origin + '/xss?uri={uri}'
14
26
  const uri = window.location.href
15
27
  window.document.title = 'SolidOS Web App: ' + uri
16
28
  const outliner = panes.getOutliner(dom) //function from solid-panes
@@ -59,11 +71,11 @@ document.addEventListener('DOMContentLoaded', function() {
59
71
  const logoutButton = loginButtonArea.querySelector('input');
60
72
  logoutButton.value = "Logout";
61
73
  let displayId = `&lt;${me.value}>`;
62
- webIdArea.innerHTML = displayId;
63
- banner.style.backgroundColor="#bbccbb";
74
+ webIdArea.innerHTML = displayId;
75
+ banner.style.backgroundColor="#bbccbb";
64
76
  } else {
65
77
  banner.style.backgroundColor="#ccbbbb";
66
- }
78
+ }
67
79
  loginButtonArea.style.display="inline-block";
68
80
  }
69
81
 
@@ -87,33 +99,52 @@ document.addEventListener('DOMContentLoaded', function() {
87
99
  </script>
88
100
  </head>
89
101
  <body>
102
+ <a href="#DummyUUID" class="skip-link">Skip to main content</a>
103
+
104
+ <header id="PageHeader" role="banner" class="header-mash">
105
+ The SolidOS Databrowser
106
+ </header>
107
+ <main id="mainContent" tabindex="-1">
90
108
 
91
- <div style="width:100%;" id="inputArea">
92
- <div style="margin-bottom:0.6em">
93
- The SolidOS Databrowser
109
+ <div class="input-row" id="inputArea">
110
+ Viewing <input id="uriField" type="text" class="uri-field" placeholder="enter a pod address e.g. https://you.solidcommunity.net/"/> <input type="button" id="goButton" value="Go" />
94
111
  </div>
95
- <div style="margin-left:1em">
96
- Viewing <input id="uriField" type="text" style="font-size:100%; min-width:25em; padding:0.5em;" placeholder="enter a pod address e.g. https://you.solidcommunity.net/"/> <input type="button" id="goButton" value="Go" />
97
- </div>
98
- <div style="margin-top:0.5em;margin-left:1em">
99
- As user <span id="webId">&lt;public user></span> <span id="loginButtonArea"></span>
112
+ <div class="user-row">
113
+ As user <span id="webId">&lt;public user></span>
114
+ <span id="loginButtonArea"></span>
100
115
  </div>
101
116
  </div>
102
117
 
103
- <table style="width:100%;">
104
- <tr>
105
- <div class="TabulatorOutline" id="DummyUUID" role="main">
106
- <table id="outline"></table>
107
- <div id="GlobalDashboard"></div>
108
- </div>
109
- </tr>
110
- </table>
118
+ <div class="TabulatorOutline" id="DummyUUID">
119
+ <table id="outline">
120
+ <thead>
121
+ <tr>
122
+ <th id="outlineHeader" scope="col"></th>
123
+ <!-- Add more <th> as needed for columns -->
124
+ </tr>
125
+ </thead>
126
+ <tbody>
127
+ <!-- Table rows injected by JS -->
128
+ </tbody>
129
+ </table>
130
+ <div id="GlobalDashboard" aria-label="Global Dashboard"></div>
131
+ </div>
132
+ </main>
111
133
 
134
+ <footer id="PageFooter" role="contentinfo"></footer>
112
135
  <style>
113
- #inputArea {
136
+ .header-mash {
114
137
  width:100%;
115
- padding:0.5em;
116
- background-color:#d0d0d0;
138
+ padding:1em;
139
+ background-color:#ccbbbb;
140
+ }
141
+ .input-row {
142
+ padding-left:1em;
143
+ padding-bottom:1em;
144
+ }
145
+ .user-row {
146
+ margin-top:0.5em;
147
+ margin-left:1em;
117
148
  }
118
149
  #loginButtonArea input {
119
150
  display:inline-block;
@@ -125,7 +156,10 @@ document.addEventListener('DOMContentLoaded', function() {
125
156
  padding-top:0.6em;
126
157
  padding-bottom:0.6em;
127
158
  }
128
- #uriField {
159
+ #uriField, .uri-field {
160
+ font-size:100%;
161
+ min-width:25em;
162
+ padding:0.5em;
129
163
  width:70%;
130
164
  margin-top:0.6em !important;
131
165
  }
package/dist/browse.html CHANGED
@@ -2,15 +2,27 @@
2
2
  <html id="docHTML">
3
3
  <head>
4
4
  <meta content="text/html; charset=UTF-8" http-equiv="content-type">
5
+ <script>
6
+ // Suppress harmless ResizeObserver loop errors that block the UI
7
+ window.addEventListener('error', function(e) {
8
+ if (e.message && e.message.includes('ResizeObserver loop')) {
9
+ e.stopImmediatePropagation();
10
+ e.stopPropagation();
11
+ e.preventDefault();
12
+ return false;
13
+ }
14
+ }, true);
15
+ </script>
5
16
  <link type="text/css" rel="stylesheet" href="mash.css" />
6
- <script type="text/javascript" src="mashlib.min.js"></script>
17
+ <script type="text/javascript" src="mashlib.js"></script>
7
18
  <script>
8
19
  document.addEventListener('DOMContentLoaded', function() {
9
20
  const authn = SolidLogic.authn
10
- const authSession = SolidLogic.authn.authSession
21
+ const authSession = SolidLogic.authSession
11
22
  const store = SolidLogic.store
12
23
  const dom = document
13
- $rdf.Fetcher.crossSiteProxyTemplate = self.origin + '/xss?uri={uri}'
24
+ // Disable cross-site proxy - modern Solid servers support CORS
25
+ // $rdf.Fetcher.crossSiteProxyTemplate = self.origin + '/xss?uri={uri}'
14
26
  const uri = window.location.href
15
27
  window.document.title = 'SolidOS Web App: ' + uri
16
28
  const outliner = panes.getOutliner(dom) //function from solid-panes
@@ -59,11 +71,11 @@ document.addEventListener('DOMContentLoaded', function() {
59
71
  const logoutButton = loginButtonArea.querySelector('input');
60
72
  logoutButton.value = "Logout";
61
73
  let displayId = `&lt;${me.value}>`;
62
- webIdArea.innerHTML = displayId;
63
- banner.style.backgroundColor="#bbccbb";
74
+ webIdArea.innerHTML = displayId;
75
+ banner.style.backgroundColor="#bbccbb";
64
76
  } else {
65
77
  banner.style.backgroundColor="#ccbbbb";
66
- }
78
+ }
67
79
  loginButtonArea.style.display="inline-block";
68
80
  }
69
81
 
@@ -81,39 +93,58 @@ document.addEventListener('DOMContentLoaded', function() {
81
93
  mungeLoginArea();
82
94
  go()
83
95
  })
84
- }
96
+ }
85
97
  mungeLoginArea();
86
98
  });
87
99
  </script>
88
100
  </head>
89
101
  <body>
102
+ <a href="#DummyUUID" class="skip-link">Skip to main content</a>
90
103
 
91
- <div style="width:100%;" id="inputArea">
92
- <div style="margin-bottom:0.6em">
93
- The SolidOS Databrowser
104
+ <header id="PageHeader" role="banner" class="header-mash">
105
+ The SolidOS Databrowser
106
+ </header>
107
+ <main id="mainContent" tabindex="-1">
108
+
109
+ <div class="input-row" id="inputArea">
110
+ Viewing <input id="uriField" type="text" class="uri-field" placeholder="enter a pod address e.g. https://you.solidcommunity.net/"/> <input type="button" id="goButton" value="Go" />
94
111
  </div>
95
- <div style="margin-left:1em">
96
- Viewing <input id="uriField" type="text" style="font-size:100%; min-width:25em; padding:0.5em;" placeholder="enter a pod address e.g. https://you.solidcommunity.net/"/> <input type="button" id="goButton" value="Go" />
97
- </div>
98
- <div style="margin-top:0.5em;margin-left:1em">
99
- As user <span id="webId">&lt;public user></span> <span id="loginButtonArea"></span>
112
+ <div class="user-row">
113
+ As user <span id="webId">&lt;public user></span>
114
+ <span id="loginButtonArea"></span>
100
115
  </div>
101
116
  </div>
102
117
 
103
- <table style="width:100%;">
104
- <tr>
105
- <div class="TabulatorOutline" id="DummyUUID" role="main">
106
- <table id="outline"></table>
107
- <div id="GlobalDashboard"></div>
108
- </div>
109
- </tr>
110
- </table>
118
+ <div class="TabulatorOutline" id="DummyUUID">
119
+ <table id="outline">
120
+ <thead>
121
+ <tr>
122
+ <th id="outlineHeader" scope="col"></th>
123
+ <!-- Add more <th> as needed for columns -->
124
+ </tr>
125
+ </thead>
126
+ <tbody>
127
+ <!-- Table rows injected by JS -->
128
+ </tbody>
129
+ </table>
130
+ <div id="GlobalDashboard" aria-label="Global Dashboard"></div>
131
+ </div>
132
+ </main>
111
133
 
134
+ <footer id="PageFooter" role="contentinfo"></footer>
112
135
  <style>
113
- #inputArea {
136
+ .header-mash {
114
137
  width:100%;
115
- padding:0.5em;
116
- background-color:#d0d0d0;
138
+ padding:1em;
139
+ background-color:#ccbbbb;
140
+ }
141
+ .input-row {
142
+ padding-left:1em;
143
+ padding-bottom:1em;
144
+ }
145
+ .user-row {
146
+ margin-top:0.5em;
147
+ margin-left:1em;
117
148
  }
118
149
  #loginButtonArea input {
119
150
  display:inline-block;
@@ -125,7 +156,10 @@ document.addEventListener('DOMContentLoaded', function() {
125
156
  padding-top:0.6em;
126
157
  padding-bottom:0.6em;
127
158
  }
128
- #uriField {
159
+ #uriField, .uri-field {
160
+ font-size:100%;
161
+ min-width:25em;
162
+ padding:0.5em;
129
163
  width:70%;
130
164
  margin-top:0.6em !important;
131
165
  }
@@ -1,3 +1,3 @@
1
1
  <!doctype html><html><head><meta charset="utf-8"/><title>SolidOS Web App</title><script>document.addEventListener('DOMContentLoaded', function() {
2
2
  panes.runDataBrowser()
3
- })</script><script defer="defer" src="/mashlib.min.js"></script><link href="/mash.css" rel="stylesheet"></head><body id="PageBody"><header id="PageHeader"></header><div class="TabulatorOutline" id="DummyUUID" role="main"><table id="outline"></table><div id="GlobalDashboard"></div></div><footer id="PageFooter"></footer></body></html>
3
+ })</script><script defer="defer" src="/mashlib.min.js"></script><link href="/mash.css" rel="stylesheet"></head><body id="PageBody"><a href="#DummyUUID" class="skip-link">Skip to main content</a><header id="PageHeader" role="banner"></header><main id="mainContent" tabindex="-1"><div class="TabulatorOutline" id="DummyUUID"><table id="outline"><thead><tr><th id="outlineHeader" scope="col"></th></tr></thead><tbody></tbody></table><div id="GlobalDashboard" aria-label="Global Dashboard"></div></div></main><footer id="PageFooter" role="contentinfo"></footer></body></html>