@machinemetrics/mm-react-embeddable 2.0.0-7 → 2.0.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.
|
@@ -90,18 +90,12 @@ const ne = fe(null), J = fe({
|
|
|
90
90
|
origin: n,
|
|
91
91
|
authUrl: e.authUrl,
|
|
92
92
|
silentUrl: e.silentUrl || null,
|
|
93
|
-
// v2 entries try the invisible silent resolver first — but only on a host that can
|
|
94
|
-
// frame login (https). Otherwise (and for legacy signals) go straight to interactive,
|
|
95
|
-
// so an http host doesn't wait out a silent frame that can never load login.
|
|
96
93
|
status: r && v.current ? "broker" : r && e.silentUrl && te ? "silent" : "interactive",
|
|
97
94
|
v2: r,
|
|
98
|
-
// v1.9: the scope the guest asked for; forwarded verbatim to the broker.
|
|
99
95
|
scope: e.scope || null,
|
|
100
96
|
acceptsCredentials: G.current[n] || null,
|
|
101
97
|
consent: null,
|
|
102
98
|
error: null,
|
|
103
|
-
// clientId from the request payload (v2) or the cached init (legacy);
|
|
104
|
-
// the host resolves the display name from it.
|
|
105
99
|
clientId: e.clientId || R.current[n] || null,
|
|
106
100
|
popupBlocked: !1
|
|
107
101
|
}
|
|
@@ -155,12 +149,6 @@ const ne = fe(null), J = fe({
|
|
|
155
149
|
if (!d)
|
|
156
150
|
return;
|
|
157
151
|
const e = [
|
|
158
|
-
// `init` carries the app's OAuth clientId. Cache it by the ATTESTED app
|
|
159
|
-
// origin (payload `origin` is ignored) and attach it to any entry already
|
|
160
|
-
// showing. `init` is posted before the authorize/login/credential-request
|
|
161
|
-
// signals, so it is usually cached by the time an entry is created. The
|
|
162
|
-
// clientId is only a lookup key: the host resolves the display name from
|
|
163
|
-
// it, and a broker binds it to the attested origin server-side.
|
|
164
152
|
d.addListener("*", "init", (r, n) => {
|
|
165
153
|
n != null && n.origin && (r != null && r.clientId) && (R.current[n.origin] = r.clientId, M(n.origin)), n != null && n.origin && Array.isArray(r == null ? void 0 : r.acceptsCredentials) ? G.current[n.origin] = r.acceptsCredentials : n != null && n.origin && ae(n.origin, window.location.origin) && L(n.origin, "cross-site-legacy");
|
|
166
154
|
}),
|
|
@@ -325,8 +313,6 @@ const ne = fe(null), J = fe({
|
|
|
325
313
|
},
|
|
326
314
|
[s, o]
|
|
327
315
|
), j = {
|
|
328
|
-
// Hosts render UI for interactive entries only; silent resolution is
|
|
329
|
-
// invisible by design.
|
|
330
316
|
pending: Object.values(f).filter(
|
|
331
317
|
(e) => e.status === "interactive"
|
|
332
318
|
),
|
|
@@ -522,9 +508,8 @@ const qe = () => V(J), Ie = (t) => {
|
|
|
522
508
|
Me.propTypes = {
|
|
523
509
|
children: E.node.isRequired,
|
|
524
510
|
/**
|
|
525
|
-
* Required. True once the host holds
|
|
526
|
-
*
|
|
527
|
-
* always carries a token. Missing prop = not ready, plus a one-time alert.
|
|
511
|
+
* Required. True once the host holds its bearer; zones mount no iframe until then. Missing =
|
|
512
|
+
* not ready, plus a one-time alert.
|
|
528
513
|
*/
|
|
529
514
|
ready: E.bool.isRequired,
|
|
530
515
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@machinemetrics/mm-react-embeddable",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "dist/mm-react-embeddable.es.js",
|
|
6
6
|
"main": "dist/mm-react-embeddable.cjs.js",
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
"vite": "^7.2.2",
|
|
45
45
|
"vitest": "^4.0.10"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|