@unisim/sdk 0.183.0 → 0.183.1
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/tuneThisApp.d.ts.map +1 -1
- package/dist/tuneThisApp.js +15 -4
- package/dist/tuneThisApp.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuneThisApp.d.ts","sourceRoot":"","sources":["../src/tuneThisApp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tuneThisApp.d.ts","sourceRoot":"","sources":["../src/tuneThisApp.ts"],"names":[],"mappings":"AA8BA,oDAAoD;AACpD,eAAO,MAAM,wBAAwB,8BAA8B,CAAA;AASnE,oFAAoF;AACpF,wBAAgB,eAAe,IAAI,IAAI,CAGtC;AAED,qEAAqE;AACrE,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,iEAAiE;AACjE,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
|
package/dist/tuneThisApp.js
CHANGED
|
@@ -18,23 +18,34 @@
|
|
|
18
18
|
// 390px in Cyber Assess, 2026-10-10). Held open, the phone copy that replaces it
|
|
19
19
|
// opens the dialog too; closing it clears the request.
|
|
20
20
|
//
|
|
21
|
+
// ⚠️ And it lives on `window`, not in this module (0.182.2). A production
|
|
22
|
+
// Next.js build can carry this module in TWO chunks — Ergo's did — and each
|
|
23
|
+
// copy then has its own `let`: the /settings page set the flag in its copy,
|
|
24
|
+
// the navbar mounted under /upload read another, and the dialog opened and
|
|
25
|
+
// vanished on the redirect home. Dev bundles it once, so it only showed live.
|
|
26
|
+
// One property on `window` is the same for every copy.
|
|
27
|
+
//
|
|
21
28
|
// No React in here, so a route component can import it without dragging in
|
|
22
29
|
// anything (see colorSchemeKeys.ts for why that matters to the test harnesses).
|
|
23
30
|
/** The window event <UserProfile /> listens for. */
|
|
24
31
|
export const OPEN_TUNE_THIS_APP_EVENT = 'unisim:open-tune-this-app';
|
|
25
|
-
|
|
32
|
+
const FLAG = '__unisimTuneThisAppRequested';
|
|
33
|
+
// Before a window exists (SSR) a request cannot be shown anyway; a module-local
|
|
34
|
+
// holder keeps the calls safe there.
|
|
35
|
+
const local = {};
|
|
36
|
+
const holder = () => (typeof window !== 'undefined' ? window : local);
|
|
26
37
|
/** Opens this app's "Tune this app" dialog, now or as soon as the navbar mounts. */
|
|
27
38
|
export function openTuneThisApp() {
|
|
28
|
-
|
|
39
|
+
holder()[FLAG] = true;
|
|
29
40
|
if (typeof window !== 'undefined')
|
|
30
41
|
window.dispatchEvent(new CustomEvent(OPEN_TUNE_THIS_APP_EVENT));
|
|
31
42
|
}
|
|
32
43
|
/** @internal Whether a request is waiting for the dialog to open. */
|
|
33
44
|
export function tuneThisAppRequested() {
|
|
34
|
-
return
|
|
45
|
+
return holder()[FLAG] === true;
|
|
35
46
|
}
|
|
36
47
|
/** @internal The dialog was closed: the request is done with. */
|
|
37
48
|
export function clearTuneThisAppRequest() {
|
|
38
|
-
|
|
49
|
+
holder()[FLAG] = false;
|
|
39
50
|
}
|
|
40
51
|
//# sourceMappingURL=tuneThisApp.js.map
|
package/dist/tuneThisApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tuneThisApp.js","sourceRoot":"","sources":["../src/tuneThisApp.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,sCAAsC;AACtC,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAEhF,oDAAoD;AACpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AA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