solid-panes 4.5.1 → 4.5.3-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/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.js +16 -2
- package/dist/solid-panes.js +335 -317
- package/dist/solid-panes.js.map +1 -1
- package/dist/solid-panes.min.js +1 -2
- package/dist/solid-panes.min.js.map +1 -1
- package/dist/versionInfo.js +3 -3
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mainPage/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAe,cAAc,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mainPage/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAe,cAAc,EAAE,MAAM,UAAU,CAAA;AAqBtD,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAexC,wBAAsB,YAAY,CAChC,KAAK,EAAE,SAAS,EAChB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EAC/B,WAAW,CAAC,EAAE,iBAAiB;;;;;;;;;;IAchC;AAED,wBAAsB,SAAS,CAAE,QAAQ,EAAE,cAAc,iBA0BxD"}
|
package/dist/mainPage/index.js
CHANGED
|
@@ -29,6 +29,13 @@ var _menu = require("./menu");
|
|
|
29
29
|
// Symbol used to stash the last render-relevant env snapshot on the outliner
|
|
30
30
|
// so refreshUI can skip a full GotoSubject re-render when nothing changed.
|
|
31
31
|
const LAST_RENDER_ENV_KEY = '__lastRenderEnvSignature';
|
|
32
|
+
|
|
33
|
+
// Set once initMainPage has performed the initial (authenticated) render.
|
|
34
|
+
// refreshUI will not auto-GotoSubject before this flag is set, so early
|
|
35
|
+
// callers (e.g. mashlib's window 'load' -> syncEnvironmentToContext) cannot
|
|
36
|
+
// trigger a subject fetch before the auth session is active. See
|
|
37
|
+
// https://github.com/SolidOS/solid-logic/issues/324
|
|
38
|
+
const INITIAL_RENDER_KEY = '__initialRenderDone';
|
|
32
39
|
function renderEnvSignature(env) {
|
|
33
40
|
if (!env) return '';
|
|
34
41
|
return [env.layout, env.theme, env.inputMode].join('|');
|
|
@@ -52,6 +59,7 @@ async function initMainPage(store, uri, environment) {
|
|
|
52
59
|
uri = uri || window.location.href;
|
|
53
60
|
const subject = typeof uri === 'string' ? store.sym(uri) : uri;
|
|
54
61
|
outliner.GotoSubject(subject, true, undefined, true, undefined);
|
|
62
|
+
outliner[INITIAL_RENDER_KEY] = true;
|
|
55
63
|
const header = await (0, _header.createHeader)(store, outliner);
|
|
56
64
|
const menu = (0, _menu.createLeftSideMenu)(subject, outliner);
|
|
57
65
|
const footer = menu.then(() => (0, _footer.createFooter)(store));
|
|
@@ -65,11 +73,17 @@ async function refreshUI(outliner) {
|
|
|
65
73
|
const pane = paneName ? paneRegistry?.byName?.(paneName) : undefined;
|
|
66
74
|
|
|
67
75
|
// Only re-run GotoSubject (full pane re-render) when render-relevant
|
|
68
|
-
// environment fields actually changed since the last render
|
|
76
|
+
// environment fields actually changed since the last render, and only
|
|
77
|
+
// after initMainPage has performed the initial render. Without the
|
|
78
|
+
// INITIAL_RENDER_KEY gate, pre-auth callers (e.g. mashlib's window
|
|
79
|
+
// 'load' -> refreshUI) could trigger a subject fetch before the auth
|
|
80
|
+
// session is active, 401-ing on private containers and leaving the pane
|
|
81
|
+
// stuck on a login/error state (SolidOS/solid-logic#324).
|
|
82
|
+
const initialRenderDone = outliner?.[INITIAL_RENDER_KEY] === true;
|
|
69
83
|
const currentSignature = renderEnvSignature(outliner?.context?.environment);
|
|
70
84
|
const previousSignature = outliner?.[LAST_RENDER_ENV_KEY] ?? '';
|
|
71
85
|
const envChanged = currentSignature !== previousSignature;
|
|
72
|
-
if (envChanged && store && typeof outliner?.GotoSubject === 'function') {
|
|
86
|
+
if (initialRenderDone && envChanged && store && typeof outliner?.GotoSubject === 'function') {
|
|
73
87
|
outliner.GotoSubject(store.sym(subjectUri), true, pane, true, undefined);
|
|
74
88
|
outliner[LAST_RENDER_ENV_KEY] = currentSignature;
|
|
75
89
|
}
|