solid-logic 4.0.8-test.0 → 5.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.
- package/dist/solid-logic.esm.js +19 -0
- package/dist/solid-logic.esm.js.map +1 -1
- package/dist/solid-logic.esm.min.js +1 -1
- package/dist/solid-logic.esm.min.js.map +1 -1
- package/dist/solid-logic.js +19 -0
- package/dist/solid-logic.js.map +1 -1
- package/dist/solid-logic.min.js +1 -1
- package/dist/solid-logic.min.js.map +1 -1
- package/package.json +6 -6
package/dist/solid-logic.esm.js
CHANGED
|
@@ -518,6 +518,25 @@ if (typeof _session.addEventListener === 'function') {
|
|
|
518
518
|
});
|
|
519
519
|
}
|
|
520
520
|
const authSession = Object.assign(_session, { events });
|
|
521
|
+
// Legacy `info` compatibility shape.
|
|
522
|
+
// The uvdsl session stores state on `webId_`/`isActive_` and exposes them via
|
|
523
|
+
// `webId`/`isActive` getters, but legacy consumers (e.g. solid-ui's
|
|
524
|
+
// `loginStatusBox` widget, `SolidAuthnLogic.currentUser()`'s fallback path)
|
|
525
|
+
// read `authSession.info.webId` / `authSession.info.isLoggedIn`. Expose those
|
|
526
|
+
// as a derived getter so legacy login/logout UI renders the correct state
|
|
527
|
+
// (logout button instead of a mislabelled login button).
|
|
528
|
+
Object.defineProperty(authSession, 'info', {
|
|
529
|
+
enumerable: true,
|
|
530
|
+
configurable: true,
|
|
531
|
+
get() {
|
|
532
|
+
const sessionAny = _session;
|
|
533
|
+
const isActive = sessionAny.isActive === true || Boolean(sessionAny.webId);
|
|
534
|
+
return {
|
|
535
|
+
webId: sessionAny.webId,
|
|
536
|
+
isLoggedIn: isActive
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
});
|
|
521
540
|
|
|
522
541
|
;// external "rdflib"
|
|
523
542
|
const external_rdflib_namespaceObject = __WEBPACK_EXTERNAL_MODULE_rdflib__;
|