hyperbook 0.83.0 → 0.84.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/assets/client.js +24 -2
- package/dist/assets/cloud.js +752 -0
- package/dist/assets/shell.css +193 -0
- package/dist/assets/store.js +154 -23
- package/dist/index.js +264 -3
- package/dist/locales/de.json +21 -1
- package/dist/locales/en.json +21 -1
- package/package.json +4 -4
package/dist/assets/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var hyperbook = (function () {
|
|
1
|
+
var hyperbook = Object.assign(window.hyperbook || {}, (function () {
|
|
2
2
|
/**
|
|
3
3
|
* Initialize elements within the given root element.
|
|
4
4
|
* @param {HTMLElement} root - The root element to initialize.
|
|
@@ -488,6 +488,25 @@ var hyperbook = (function () {
|
|
|
488
488
|
|
|
489
489
|
observer.observe(document.body, { childList: true, subtree: true });
|
|
490
490
|
|
|
491
|
+
// User authentication functions (delegate to cloud.js IIFE)
|
|
492
|
+
const userToggle = () => {
|
|
493
|
+
if (window.hyperbook.cloud) {
|
|
494
|
+
window.hyperbook.cloud.userToggle();
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
const doLogin = async () => {
|
|
499
|
+
if (window.hyperbook.cloud) {
|
|
500
|
+
await window.hyperbook.cloud.doLogin();
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
const doLogout = () => {
|
|
505
|
+
if (window.hyperbook.cloud) {
|
|
506
|
+
window.hyperbook.cloud.doLogout();
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
|
|
491
510
|
return {
|
|
492
511
|
toggleLightbox,
|
|
493
512
|
toggleBookmark,
|
|
@@ -501,6 +520,9 @@ var hyperbook = (function () {
|
|
|
501
520
|
shareClose,
|
|
502
521
|
shareUpdatePreview,
|
|
503
522
|
shareCopyUrl,
|
|
523
|
+
userToggle,
|
|
524
|
+
doLogin,
|
|
525
|
+
doLogout,
|
|
504
526
|
init,
|
|
505
527
|
};
|
|
506
|
-
})();
|
|
528
|
+
})());
|