@panphora/clayjs 1.20.0 → 1.21.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/all.js +1 -1
- package/dist/clay-dom.js +1 -1
- package/dist/clay-events.js +1 -1
- package/dist/clay-internals.js +1 -1
- package/dist/clay-options.js +1 -1
- package/dist/clay-router.js +1 -1
- package/dist/clay-ui.js +1 -1
- package/dist/clay-utils.js +1 -1
- package/dist/clay.js +1 -1
- package/dist/clay.standalone.js +173 -59
- package/dist/m/{c-Z32V4MHK.js → c-5FEU5MMY.js} +1 -1
- package/dist/m/{c-D3E4WJ4M.js → c-HDWZEJHM.js} +49 -32
- package/dist/m/{loader-DZZLUBVB.js → loader-ZVPK4ZN3.js} +1 -1
- package/dist/m/{manifest-3AEF5191.js → manifest-5498AFD3.js} +1 -1
- package/dist/m/{manifest-edit-29A26F22.js → manifest-edit-62A5A00F.js} +1 -1
- package/dist/m/manifest.json +33 -33
- package/dist/m/plugins/{derive-FRE5JJQE.js → derive-QVI3LI3A.js} +1 -1
- package/dist/m/plugins/menu-DM2JHPSR.js +1 -0
- package/dist/m/vendor/{sap-core.vendor-RN4ZVY4X.js → sap-core.vendor-OA5SKL7Q.js} +1 -1
- package/dist/offline-manifest.json +51 -51
- package/docs/guide.md +14 -6
- package/entries/sap.js +1 -1
- package/package.json +1 -1
- package/src/plugins/menu/style.js +59 -31
- package/src/plugins/menu.js +131 -28
- package/src/vendor/sap-core.vendor.js +1 -1
- package/dist/m/plugins/menu-KGWKT6CS.js +0 -1
package/dist/all.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["dom/all-APS5ZSKP.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
clay.loaded.all = __clayChunks.runtime.then(function (R) {
|
|
76
76
|
if (!R.chunks) return import(__clayChunks.tree + "/src/dom/all.js");
|
package/dist/clay-dom.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["dom/dom-helpers-L7OSR6S4.js","c-XQXZAO7N.js","c-WRBKEJD4.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
clay.loaded.dom = __clayChunks.runtime.then(function (R) {
|
|
76
76
|
if (!R.chunks) return import(__clayChunks.tree + "/src/dom/dom-helpers.js");
|
package/dist/clay-events.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["events/index-B6TGDYMG.js","c-LA2BW7UY.js","c-IJUK2GPW.js","c-VG5XIN4T.js","c-2YYDMLNZ.js","c-HA6INT6J.js","c-WRBKEJD4.js","c-ICMAOOGK.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
// The mutation-backed attrs subscribe to a hub that observes document.body, so
|
|
76
76
|
// wait for DOM ready before importing (same gate as clay.js).
|
package/dist/clay-internals.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["internals/index-HDRANDWE.js","c-GVPNDIKJ.js","c-ATKAOH23.js","c-EK63G3CG.js","c-NQJRVJ56.js","c-XGH4GS2T.js","c-3O7OBDCM.js","c-BPF2NSPV.js","c-HA6INT6J.js","c-WRBKEJD4.js","c-P7KNDG34.js","c-CYWLPPUS.js","c-N7JPUPGC.js","c-IJUK2GPW.js","c-EGTIAL6P.js","c-XQXZAO7N.js","c-S7LK4KUE.js","c-VG5XIN4T.js","c-2YYDMLNZ.js","c-ICMAOOGK.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
// No DOM gate: nothing here touches document.body at import time, unlike clay-ui.
|
|
76
76
|
clay.loaded.internals = __clayChunks.runtime.then(function (R) {
|
package/dist/clay-options.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["options/options-55LQHSJ4.js","c-7SWMYKAI.js","c-LA2BW7UY.js","c-IJUK2GPW.js","c-VG5XIN4T.js","c-2YYDMLNZ.js","c-HA6INT6J.js","c-WRBKEJD4.js","c-ICMAOOGK.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
// Subscribes to the mutation hub (observes document.body); wait for DOM ready.
|
|
76
76
|
function domReady() {
|
package/dist/clay-router.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["route/route-62CHXL5B.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
// Mirror the hash onto <html> now, before the module loads, so a saved
|
|
76
76
|
// show-when:route-* rule is right at first paint. The module re-applies.
|
package/dist/clay-ui.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["ui/index-QNIPDHXQ.js","c-W23KVGUO.js","c-BRLCTNMC.js","c-QHWJ5ZIJ.js","c-4JZDZFF6.js","c-46XYM55L.js","c-CJFDLD43.js","c-BJ7YQ5QZ.js","c-VAK7SG37.js","c-NUHP2XDB.js","c-MHI3GYKF.js","c-RG6XUZFA.js","c-QY7F6EN6.js","c-ICMAOOGK.js","c-WRBKEJD4.js","c-UL2YUY52.js","c-VKEDWYDF.js","c-2AZDZWCK.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
// Toasts and dialogs append to document.body, so `loaded.ui` must not resolve
|
|
76
76
|
// before the DOM is ready (same gate as clay-events).
|
package/dist/clay-utils.js
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
return { tree: tree, runtime: clay.__runtime };
|
|
73
|
-
})({"dir":"m/","manifest":"manifest-
|
|
73
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["utils/index-4TJCVLT7.js","c-UL2YUY52.js","c-GQ6F6IDK.js","c-P7KNDG34.js","c-VHNSBD2M.js","manifest-5498AFD3.js"]})
|
|
74
74
|
|
|
75
75
|
clay.loaded.utils = __clayChunks.runtime.then(function (R) {
|
|
76
76
|
if (!R.chunks) return import(__clayChunks.tree + "/src/utils/index.js");
|
package/dist/clay.js
CHANGED
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
return { tree: tree, runtime: clay.__runtime };
|
|
125
|
-
})({"dir":"m/","manifest":"manifest-
|
|
125
|
+
})({"dir":"m/","manifest":"manifest-5498AFD3.js","edit":"manifest-edit-62A5A00F.js","preload":["loader-ZVPK4ZN3.js","c-46XYM55L.js","c-RS77ODLY.js","c-7SWMYKAI.js","c-UGHH4MB3.js","c-LA2BW7UY.js","c-IJUK2GPW.js","c-VG5XIN4T.js","c-2YYDMLNZ.js","c-HA6INT6J.js","c-WRBKEJD4.js","c-ICMAOOGK.js","c-VHNSBD2M.js","c-FILLTJA7.js","c-VKEDWYDF.js","c-CYWLPPUS.js","manifest-5498AFD3.js","core/draft-mode-WSQAT67S.js","c-N7JPUPGC.js","core/is-edit-mode-GCX6767E.js","c-3O7OBDCM.js","c-BPF2NSPV.js","c-P7KNDG34.js","lib/region-policy-KWBPROWF.js"]})
|
|
126
126
|
__clayChunks.runtime.then(function (R) {
|
|
127
127
|
if (!R.chunks) return import(__clayChunks.tree + "/src/loader.js");
|
|
128
128
|
window.clay.__chunked = true;
|
package/dist/clay.standalone.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* clayjs 1.
|
|
1
|
+
/* clayjs 1.21.0 standalone build: every clayjs module in one file. https://clayjs.com/offline
|
|
2
2
|
Third-party code inside keeps its own license (Sortable MIT, Squire MIT, DOMPurify Apache-2.0 OR MPL-2.0, MicroModal MIT, parse5 MIT, Highlights from Pierre Apache-2.0): https://clayjs.com/THIRD-PARTY-NOTICES.md */
|
|
3
3
|
(() => {
|
|
4
4
|
var __create = Object.create;
|
|
@@ -92700,11 +92700,11 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92700
92700
|
});
|
|
92701
92701
|
|
|
92702
92702
|
// src/plugins/menu/style.js
|
|
92703
|
-
var MENU_SURFACE, style_default;
|
|
92703
|
+
var MENU_SURFACE, MENU_BASE, MENU_FLOATING, MENU_SKIN, MENU_TOUCH, style_default;
|
|
92704
92704
|
var init_style2 = __esm({
|
|
92705
92705
|
"src/plugins/menu/style.js"() {
|
|
92706
92706
|
MENU_SURFACE = { light: [255, 252, 246], dark: [26, 29, 44], mutedLight: [107, 89, 66], mutedDark: [163, 169, 194] };
|
|
92707
|
-
|
|
92707
|
+
MENU_BASE = `.clay-menu-dock, .clay-menu-spots, .clay-seo {
|
|
92708
92708
|
--bevel-font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
92709
92709
|
--bevel-font-serif: Newsreader, Georgia, "Times New Roman", serif;
|
|
92710
92710
|
--bevel-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
@@ -92741,19 +92741,11 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92741
92741
|
text-size-adjust: 100%;
|
|
92742
92742
|
}
|
|
92743
92743
|
|
|
92744
|
-
|
|
92745
|
-
.clay-menu-dock { position:
|
|
92746
|
-
.clay-menu-dock[data-corner$="left"] { right: auto; left: max(12px, env(safe-area-inset-left)); flex-direction: row-reverse; }
|
|
92747
|
-
.clay-menu-dock[data-corner^="bottom"] { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); }
|
|
92744
|
+
.clay-menu-dock { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.4; }
|
|
92745
|
+
.clay-menu-dock[data-embedded] { position: relative; display: inline-flex; }
|
|
92748
92746
|
.clay-menu-dock[hidden], .clay-menu-spots[hidden], .clay-menu-dock [hidden], .clay-seo [hidden] { display: none !important; }
|
|
92749
92747
|
|
|
92750
|
-
.clay-menu { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px;
|
|
92751
|
-
.clay-menu-dock[data-dragging] .clay-menu { border-color: var(--bevel-brass); cursor: grabbing; }
|
|
92752
|
-
|
|
92753
|
-
.clay-menu-grip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 28px; margin: 0; padding: 0; border: 0; background: none; color: var(--bevel-faint); cursor: grab; touch-action: none; }
|
|
92754
|
-
.clay-menu-grip::before { content: ""; position: absolute; inset: -8px -2px -8px -10px; }
|
|
92755
|
-
.clay-menu-grip:hover { color: var(--bevel-ink-2); }
|
|
92756
|
-
.clay-menu-grip svg { display: block; width: 6px; height: 12px; fill: currentColor; }
|
|
92748
|
+
.clay-menu { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; user-select: none; -webkit-user-select: none; }
|
|
92757
92749
|
|
|
92758
92750
|
.clay-menu-edit { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 28px; margin: 0; padding: 0 8px 0 5px; border: 0; background: none; font: 500 13px/1 var(--bevel-font-sans); color: var(--bevel-ink); cursor: pointer; }
|
|
92759
92751
|
.clay-menu-edit::before { content: ""; position: absolute; inset: -8px 0; }
|
|
@@ -92769,12 +92761,8 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92769
92761
|
|
|
92770
92762
|
.clay-menu-divider { width: 1px; height: 18px; margin: 0 2px; background: var(--bevel-line-2); }
|
|
92771
92763
|
|
|
92772
|
-
.clay-menu-goo { position: relative; display: inline-grid; place-items: center; box-sizing: border-box;
|
|
92773
|
-
.clay-menu-goo
|
|
92774
|
-
.clay-menu-goo svg { display: block; width: 18px; height: auto; fill: currentColor; }
|
|
92775
|
-
.clay-menu-goo:hover svg { translate: 0 -1px; }
|
|
92776
|
-
.clay-menu-goo:active, .clay-menu-goo[aria-expanded="true"] { background: var(--bevel-face-in); border-color: var(--bevel-edge-in) var(--bevel-edge-in-hi) var(--bevel-edge-in-hi) var(--bevel-edge-in); }
|
|
92777
|
-
.clay-menu-goo:active svg, .clay-menu-goo[aria-expanded="true"] svg { translate: 1px 1px; }
|
|
92764
|
+
.clay-menu-goo { position: relative; display: inline-grid; place-items: center; box-sizing: border-box; margin: 0; padding: 0; cursor: pointer; }
|
|
92765
|
+
.clay-menu-goo svg { display: block; }
|
|
92778
92766
|
.clay-menu-dot { position: absolute; top: -1px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--bevel-brass); box-shadow: 0 0 0 2px var(--bevel-surface); }
|
|
92779
92767
|
|
|
92780
92768
|
.clay-menu :focus-visible, .clay-roster:focus-visible { outline: 2px solid var(--bevel-brass); outline-offset: 2px; }
|
|
@@ -92799,22 +92787,24 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92799
92787
|
.clay-avatar[data-tone="teal"] { background: var(--bevel-teal-soft); color: var(--bevel-teal); border-color: color-mix(in srgb, var(--bevel-teal) 35%, var(--bevel-teal-soft)); }
|
|
92800
92788
|
|
|
92801
92789
|
/* Popovers: the menu, the people panel, the status note. Below the dock, above it in a bottom corner. */
|
|
92802
|
-
.clay-menu-list, .clay-people, .clay-menu-note { position: absolute; z-index: 1; top: calc(100% + 8px); right: 0; box-sizing: border-box; margin: 0;
|
|
92803
|
-
.clay-
|
|
92804
|
-
.clay-menu-dock[data-corner^="bottom"] :is(.clay-menu-list, .clay-people, .clay-menu-note) { top: auto; bottom: calc(100% + 8px); }
|
|
92790
|
+
.clay-menu-list, .clay-people, .clay-menu-note { position: absolute; z-index: 1; top: calc(100% + 8px); right: 0; box-sizing: border-box; margin: 0; color: var(--bevel-ink); text-align: left; }
|
|
92791
|
+
.clay-people, .clay-menu-note { border: 1px solid var(--bevel-line-2); background: var(--bevel-surface); box-shadow: var(--clay-shadow); }
|
|
92805
92792
|
|
|
92806
|
-
.clay-menu-list { width: max-content;
|
|
92807
|
-
.clay-menu-list
|
|
92793
|
+
.clay-menu-list { width: max-content; max-width: calc(100vw - 24px); max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; }
|
|
92794
|
+
.clay-menu-list[popover] { position: fixed; inset: auto; margin: 0; }
|
|
92795
|
+
.clay-menu-list [role="menuitem"] { box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 0; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer; }
|
|
92808
92796
|
.clay-menu-list [role="menuitem"]:hover:not([aria-disabled="true"]), .clay-menu-list [role="menuitem"]:focus-visible { outline: none; background: var(--bevel-sunk); }
|
|
92809
|
-
.clay-menu-list [role="menuitem"][aria-disabled="true"] {
|
|
92810
|
-
.clay-menu-list [role="menuitem"][aria-disabled="true"] kbd { opacity: .6; }
|
|
92797
|
+
.clay-menu-list [role="menuitem"][aria-disabled="true"] { cursor: default; }
|
|
92811
92798
|
.clay-menu-pair { display: flex; gap: 12px; padding: 3px 9px; }
|
|
92812
|
-
.clay-menu-list .clay-menu-pair [role="menuitem"] { flex: none; width: auto;
|
|
92813
|
-
.clay-menu-list kbd { flex: none;
|
|
92814
|
-
.clay-menu-
|
|
92799
|
+
.clay-menu-list .clay-menu-pair [role="menuitem"] { flex: none; width: auto; justify-content: flex-start; gap: 9px; }
|
|
92800
|
+
.clay-menu-list kbd { flex: none; white-space: nowrap; }
|
|
92801
|
+
.clay-menu-row { display: flex; align-items: center; gap: 2px; }
|
|
92802
|
+
.clay-menu-list .clay-menu-row > [part~="item"] { flex: 1; width: auto; min-width: 0; }
|
|
92803
|
+
.clay-menu-list .clay-menu-row > [part~="dismiss"] { flex: none; width: 28px; justify-content: center; padding: 0; }
|
|
92804
|
+
.clay-menu-row > [part~="dismiss"] svg { display: block; width: 10px; height: 10px; fill: currentColor; }
|
|
92815
92805
|
.clay-menu-upgrade { display: inline-flex; align-items: center; gap: 8px; }
|
|
92816
92806
|
.clay-menu-upgrade::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bevel-brass); }
|
|
92817
|
-
.clay-menu-version { margin: 0;
|
|
92807
|
+
.clay-menu-version { margin: 0; }
|
|
92818
92808
|
|
|
92819
92809
|
.clay-menu-note { z-index: 2; width: max-content; max-width: 264px; padding: 8px 12px; font-size: 13px; line-height: 1.45; }
|
|
92820
92810
|
|
|
@@ -92850,6 +92840,18 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92850
92840
|
.clay-menu-btn-small { height: 26px; padding: 0 9px; font-size: 12px; }
|
|
92851
92841
|
.clay-menu-btn-primary { --bevel-face: var(--bevel-ink); --bevel-edge-hi: color-mix(in srgb, var(--bevel-ink), light-dark(#FFFCF6, #FFFFFF) 22%); --bevel-edge-lo: color-mix(in srgb, var(--bevel-ink), light-dark(#0B0C13, #6A7090) 34%); color: var(--bevel-ground); }
|
|
92852
92842
|
.clay-menu-btn-primary:hover { background: color-mix(in srgb, var(--bevel-ink), var(--bevel-ground) 12%); }
|
|
92843
|
+
`;
|
|
92844
|
+
MENU_FLOATING = `/* The dock: the roster (when a page opts in) and the capsule, fixed in one corner. */
|
|
92845
|
+
.clay-menu-dock { position: fixed; z-index: 2147482000; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
|
|
92846
|
+
.clay-menu-dock[data-corner$="left"] { right: auto; left: max(12px, env(safe-area-inset-left)); flex-direction: row-reverse; }
|
|
92847
|
+
.clay-menu-dock[data-corner^="bottom"] { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); }
|
|
92848
|
+
.clay-menu-dock[data-corner$="left"] :is(.clay-menu-list, .clay-people, .clay-menu-note) { right: auto; left: 0; }
|
|
92849
|
+
.clay-menu-dock[data-corner^="bottom"] :is(.clay-menu-list, .clay-people, .clay-menu-note) { top: auto; bottom: calc(100% + 8px); }
|
|
92850
|
+
.clay-menu-dock[data-dragging] .clay-menu { border-color: var(--bevel-brass); cursor: grabbing; }
|
|
92851
|
+
.clay-menu-grip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 28px; margin: 0; padding: 0; border: 0; background: none; color: var(--bevel-faint); cursor: grab; touch-action: none; }
|
|
92852
|
+
.clay-menu-grip::before { content: ""; position: absolute; inset: -8px -2px -8px -10px; }
|
|
92853
|
+
.clay-menu-grip:hover { color: var(--bevel-ink-2); }
|
|
92854
|
+
.clay-menu-grip svg { display: block; width: 6px; height: 12px; fill: currentColor; }
|
|
92853
92855
|
|
|
92854
92856
|
/* Drop spots while dragging. */
|
|
92855
92857
|
.clay-menu-spots { position: fixed; inset: 0; z-index: 2147481999; pointer-events: none; }
|
|
@@ -92859,8 +92861,25 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92859
92861
|
.clay-menu-spot[data-to$="left"] { left: 12px; }
|
|
92860
92862
|
.clay-menu-spot[data-to$="right"] { right: 12px; }
|
|
92861
92863
|
.clay-menu-spot[data-near] { border: 2px solid var(--bevel-brass); background: var(--bevel-brass-soft); }
|
|
92862
|
-
|
|
92863
|
-
|
|
92864
|
+
`;
|
|
92865
|
+
MENU_SKIN = `.clay-menu { height: 34px; padding: 0 4px 0 2px; border: 1px solid var(--bevel-line-3); background: var(--bevel-surface); box-shadow: var(--clay-shadow); }
|
|
92866
|
+
.clay-menu-goo { width: 28px; height: 28px; min-height: 0; border-radius: 0; border: 2px solid transparent; background: none; color: var(--bevel-ink); }
|
|
92867
|
+
.clay-menu-goo::before { content: ""; position: absolute; inset: -8px -8px -8px -4px; }
|
|
92868
|
+
.clay-menu-goo svg { width: 18px; height: auto; fill: currentColor; }
|
|
92869
|
+
.clay-menu-goo:hover svg { translate: 0 -1px; }
|
|
92870
|
+
.clay-menu-goo:active, .clay-menu-goo[aria-expanded="true"] { background: var(--bevel-face-in); border-color: var(--bevel-edge-in) var(--bevel-edge-in-hi) var(--bevel-edge-in-hi) var(--bevel-edge-in); }
|
|
92871
|
+
.clay-menu-goo:active svg, .clay-menu-goo[aria-expanded="true"] svg { translate: 1px 1px; }
|
|
92872
|
+
.clay-menu-list { min-width: 284px; padding: 6px; border: 1px solid var(--bevel-line-2); background: var(--bevel-surface); box-shadow: var(--clay-shadow); }
|
|
92873
|
+
.clay-menu-list [role="menuitem"] { min-height: 32px; padding: 5px 9px; font: 400 13px/1.35 var(--bevel-font-sans); color: var(--bevel-ink); }
|
|
92874
|
+
.clay-menu-list [role="menuitem"][aria-disabled="true"] { color: var(--bevel-faint); }
|
|
92875
|
+
.clay-menu-list [role="menuitem"][aria-disabled="true"] kbd { opacity: .6; }
|
|
92876
|
+
.clay-menu-list .clay-menu-pair [role="menuitem"] { min-height: 30px; padding: 4px 6px 4px 9px; border: 1px solid var(--bevel-line); }
|
|
92877
|
+
.clay-menu-list kbd { font: 500 11px/1 var(--bevel-font-mono); padding: 3px 5px; border: 1px solid var(--bevel-line-2); background: var(--bevel-sunk); color: var(--bevel-muted); }
|
|
92878
|
+
.clay-menu-list [part~="quiet"] { font-size: 12px; color: var(--bevel-muted); }
|
|
92879
|
+
.clay-menu-sep { height: 1px; margin: 4px 2px; background: var(--bevel-line); }
|
|
92880
|
+
.clay-menu-version { padding: 6px 9px 4px; font: 400 11.5px/1.4 var(--bevel-font-mono); color: var(--bevel-muted); }
|
|
92881
|
+
`;
|
|
92882
|
+
MENU_TOUCH = `@media (pointer: coarse), (max-width: 680px) {
|
|
92864
92883
|
.clay-menu-list [role="menuitem"] { min-height: 44px; font-size: 15px; }
|
|
92865
92884
|
.clay-menu-list .clay-menu-pair [role="menuitem"] { min-height: 44px; }
|
|
92866
92885
|
:is(.clay-menu-dock, .clay-seo) :is(input, textarea, select) { font-size: 16px; }
|
|
@@ -92869,7 +92888,9 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
92869
92888
|
}
|
|
92870
92889
|
@media (prefers-reduced-motion: reduce) {
|
|
92871
92890
|
.clay-menu-track, .clay-menu-thumb { transition: none; }
|
|
92872
|
-
}
|
|
92891
|
+
}
|
|
92892
|
+
`;
|
|
92893
|
+
style_default = MENU_BASE + MENU_FLOATING + MENU_SKIN + MENU_TOUCH;
|
|
92873
92894
|
}
|
|
92874
92895
|
});
|
|
92875
92896
|
|
|
@@ -94650,24 +94671,77 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94650
94671
|
|
|
94651
94672
|
// src/plugins/menu.js
|
|
94652
94673
|
var menu_exports = {};
|
|
94674
|
+
function findSlot() {
|
|
94675
|
+
const slots = document.querySelectorAll("[clay-menu-slot]");
|
|
94676
|
+
if (slots.length > 1) console.warn("[clay] This page has more than one clay-menu-slot. The menu uses the first.");
|
|
94677
|
+
return slots[0] || null;
|
|
94678
|
+
}
|
|
94679
|
+
function pageSkin() {
|
|
94680
|
+
const style3 = document.querySelector("style[clay-menu-skin]");
|
|
94681
|
+
if (!style3) return null;
|
|
94682
|
+
if (style3.getAttribute("clay-menu-skin") !== SKIN_VERSION) {
|
|
94683
|
+
console.warn(`[clay] This runtime reads clay-menu-skin="${SKIN_VERSION}". The menu keeps its default look.`);
|
|
94684
|
+
return null;
|
|
94685
|
+
}
|
|
94686
|
+
return style3.textContent;
|
|
94687
|
+
}
|
|
94653
94688
|
function mount3() {
|
|
94654
94689
|
if (document.querySelector('clay-editor-ui[data-clay-ui="menu"]')) return;
|
|
94690
|
+
const slot3 = findSlot();
|
|
94691
|
+
const embedded = Boolean(slot3);
|
|
94692
|
+
const skin = embedded ? pageSkin() : null;
|
|
94693
|
+
const hideSwitch = embedded && slot3.hasAttribute("no-edit-switch");
|
|
94655
94694
|
const root4 = document.createElement("div");
|
|
94656
94695
|
root4.className = "clay-menu-dock";
|
|
94657
94696
|
root4.setAttribute("clay", "editor-ui");
|
|
94697
|
+
root4.setAttribute("part", "dock");
|
|
94698
|
+
if (embedded) root4.dataset.embedded = "";
|
|
94658
94699
|
root4.dataset.corner = "top-right";
|
|
94659
|
-
root4.innerHTML = `<div class="clay-menu" clay="editor-ui"><button type="button" class="clay-menu-grip" aria-label="Move the menu. Drag it, or use the arrow keys to move it to another corner.">${GRIP}</button><button type="button" class="clay-menu-edit" role="switch" aria-checked="false"><span class="clay-menu-track" aria-hidden="true"><span class="clay-menu-thumb"></span></span><span class="clay-menu-label">Edit</span></button><span class="clay-menu-divider" aria-hidden="true"></span><button type="button" class="clay-menu-goo" aria-haspopup="menu" aria-expanded="false" aria-label="Clay menu">${claygoo_svg_default}</button></div><div class="clay-menu-list" role="menu" aria-label="Clay menu" hidden></div><div class="clay-menu-note" role="status" hidden></div>`;
|
|
94700
|
+
root4.innerHTML = `<div class="clay-menu" part="capsule" clay="editor-ui"><button type="button" class="clay-menu-grip" aria-label="Move the menu. Drag it, or use the arrow keys to move it to another corner.">${GRIP}</button><button type="button" class="clay-menu-edit" part="edit" role="switch" aria-checked="false"><span class="clay-menu-track" aria-hidden="true"><span class="clay-menu-thumb"></span></span><span class="clay-menu-label">Edit</span></button><span class="clay-menu-divider" aria-hidden="true"></span><button type="button" class="clay-menu-goo" part="button" aria-haspopup="menu" aria-expanded="false" aria-label="Clay menu">${claygoo_svg_default}</button></div><div class="clay-menu-list" part="list" role="menu" aria-label="Clay menu" hidden></div><div class="clay-menu-note" part="note" role="status" hidden></div>`;
|
|
94660
94701
|
const grip = root4.querySelector(".clay-menu-grip");
|
|
94661
94702
|
const edit3 = root4.querySelector(".clay-menu-edit");
|
|
94662
94703
|
const goo = root4.querySelector(".clay-menu-goo");
|
|
94663
94704
|
const list3 = root4.querySelector(".clay-menu-list");
|
|
94664
94705
|
const noteEl = root4.querySelector(".clay-menu-note");
|
|
94665
94706
|
const items = /* @__PURE__ */ new Map();
|
|
94707
|
+
if (embedded) {
|
|
94708
|
+
grip.hidden = true;
|
|
94709
|
+
const icon2 = slot3.querySelector("template[clay-menu-icon]");
|
|
94710
|
+
if (icon2) goo.replaceChildren(icon2.content.cloneNode(true));
|
|
94711
|
+
const name = slot3.getAttribute("clay-menu-label");
|
|
94712
|
+
if (name) {
|
|
94713
|
+
goo.setAttribute("aria-label", name);
|
|
94714
|
+
goo.title = name;
|
|
94715
|
+
list3.setAttribute("aria-label", name);
|
|
94716
|
+
}
|
|
94717
|
+
if (hideSwitch) {
|
|
94718
|
+
edit3.hidden = true;
|
|
94719
|
+
root4.querySelector(".clay-menu-divider").hidden = true;
|
|
94720
|
+
}
|
|
94721
|
+
}
|
|
94722
|
+
const topLayer = embedded && typeof list3.showPopover === "function";
|
|
94723
|
+
if (topLayer) list3.setAttribute("popover", "manual");
|
|
94724
|
+
function placeList() {
|
|
94725
|
+
const anchor = goo.getBoundingClientRect();
|
|
94726
|
+
const { offsetWidth: width, offsetHeight: height } = list3;
|
|
94727
|
+
const left = Math.max(EDGE_GAP, Math.min(anchor.right - width, window.innerWidth - width - EDGE_GAP));
|
|
94728
|
+
const below = anchor.bottom + EDGE_GAP;
|
|
94729
|
+
const top = below + height > window.innerHeight - EDGE_GAP ? Math.max(EDGE_GAP, anchor.top - height - EDGE_GAP) : below;
|
|
94730
|
+
list3.style.left = `${Math.round(left)}px`;
|
|
94731
|
+
list3.style.top = `${Math.round(top)}px`;
|
|
94732
|
+
}
|
|
94666
94733
|
const focusedEl = () => root4.getRootNode().activeElement || null;
|
|
94667
94734
|
const isOpen = () => !list3.hidden;
|
|
94668
94735
|
function setExpanded(open5) {
|
|
94669
94736
|
list3.hidden = !open5;
|
|
94670
94737
|
goo.setAttribute("aria-expanded", open5 ? "true" : "false");
|
|
94738
|
+
if (!topLayer) return;
|
|
94739
|
+
if (open5) {
|
|
94740
|
+
list3.showPopover();
|
|
94741
|
+
placeList();
|
|
94742
|
+
} else if (list3.matches(":popover-open")) {
|
|
94743
|
+
list3.hidePopover();
|
|
94744
|
+
}
|
|
94671
94745
|
}
|
|
94672
94746
|
const buttons2 = () => [...list3.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')];
|
|
94673
94747
|
function focusItem(index) {
|
|
@@ -94699,6 +94773,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94699
94773
|
button4.type = "button";
|
|
94700
94774
|
}
|
|
94701
94775
|
button4.setAttribute("role", "menuitem");
|
|
94776
|
+
button4.setAttribute("part", item.quiet ? "item quiet" : "item");
|
|
94702
94777
|
button4.dataset.menuId = item.id;
|
|
94703
94778
|
if (item.badge && item.id === "upgrade") {
|
|
94704
94779
|
const label = document.createElement("span");
|
|
@@ -94717,7 +94792,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94717
94792
|
button4.addEventListener("click", () => {
|
|
94718
94793
|
if (item.disabled) return;
|
|
94719
94794
|
close();
|
|
94720
|
-
if (item.run) item.run();
|
|
94795
|
+
if (item.run) item.run({ anchor: goo });
|
|
94721
94796
|
});
|
|
94722
94797
|
return button4;
|
|
94723
94798
|
}
|
|
@@ -94725,6 +94800,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94725
94800
|
if (item.text) {
|
|
94726
94801
|
const line = document.createElement("p");
|
|
94727
94802
|
line.className = "clay-menu-version";
|
|
94803
|
+
line.setAttribute("part", "text");
|
|
94728
94804
|
line.dataset.menuId = item.id;
|
|
94729
94805
|
line.textContent = item.label;
|
|
94730
94806
|
return line;
|
|
@@ -94736,11 +94812,33 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94736
94812
|
for (const part of item.pair) pair2.append(itemButton(part));
|
|
94737
94813
|
return pair2;
|
|
94738
94814
|
}
|
|
94815
|
+
if (item.dismiss) return dismissibleRow(item);
|
|
94739
94816
|
return itemButton(item);
|
|
94740
94817
|
}
|
|
94818
|
+
function dismissibleRow(item) {
|
|
94819
|
+
const row = document.createElement("div");
|
|
94820
|
+
row.className = "clay-menu-row";
|
|
94821
|
+
row.dataset.menuId = item.id;
|
|
94822
|
+
const dismiss5 = document.createElement("button");
|
|
94823
|
+
dismiss5.type = "button";
|
|
94824
|
+
dismiss5.setAttribute("role", "menuitem");
|
|
94825
|
+
dismiss5.setAttribute("part", "dismiss");
|
|
94826
|
+
dismiss5.dataset.menuId = `${item.id}.dismiss`;
|
|
94827
|
+
dismiss5.setAttribute("aria-label", item.dismiss.label);
|
|
94828
|
+
dismiss5.title = item.dismiss.label;
|
|
94829
|
+
dismiss5.innerHTML = DISMISS_ICON;
|
|
94830
|
+
dismiss5.addEventListener("click", () => {
|
|
94831
|
+
removeItem(item.id);
|
|
94832
|
+
item.dismiss.run?.();
|
|
94833
|
+
});
|
|
94834
|
+
row.append(itemButton(item), dismiss5);
|
|
94835
|
+
return row;
|
|
94836
|
+
}
|
|
94741
94837
|
function sections() {
|
|
94742
|
-
const
|
|
94743
|
-
|
|
94838
|
+
const inSection = (name) => [...items.values()].filter((item) => item.section === name);
|
|
94839
|
+
const extra = [...items.keys()].filter((id2) => !SLOTTED.has(id2) && !items.get(id2).section);
|
|
94840
|
+
const fixed = SECTIONS.map((ids) => (ids || extra).map((id2) => items.get(id2)).filter(Boolean));
|
|
94841
|
+
return [inSection("start"), ...fixed, inSection("end")].filter((group) => group.length);
|
|
94744
94842
|
}
|
|
94745
94843
|
function render4() {
|
|
94746
94844
|
const now3 = focusedEl();
|
|
@@ -94751,6 +94849,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94751
94849
|
const sep = document.createElement("div");
|
|
94752
94850
|
sep.className = "clay-menu-sep";
|
|
94753
94851
|
sep.setAttribute("role", "separator");
|
|
94852
|
+
sep.setAttribute("part", "separator");
|
|
94754
94853
|
list3.append(sep);
|
|
94755
94854
|
}
|
|
94756
94855
|
for (const item of group) list3.append(itemNode(item));
|
|
@@ -94780,11 +94879,14 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94780
94879
|
keys: keys2 ? String(keys2) : "",
|
|
94781
94880
|
disabled: Boolean(disabled)
|
|
94782
94881
|
});
|
|
94783
|
-
function addItem({ id: id2, label, run: run5, badge, keys: keys2, disabled, text: text6, pair: pair2, href } = {}) {
|
|
94882
|
+
function addItem({ id: id2, label, run: run5, badge, keys: keys2, disabled, text: text6, pair: pair2, href, section, quiet, dismiss: dismiss5 } = {}) {
|
|
94784
94883
|
if (!id2) return null;
|
|
94785
94884
|
const item = clean2({ id: id2, label, run: run5, badge, keys: keys2, disabled, href });
|
|
94786
94885
|
if (text6) item.text = true;
|
|
94787
94886
|
if (Array.isArray(pair2)) item.pair = pair2.map(clean2);
|
|
94887
|
+
if (section === "start" || section === "end") item.section = section;
|
|
94888
|
+
if (quiet) item.quiet = true;
|
|
94889
|
+
if (dismiss5) item.dismiss = { label: String(dismiss5.label || "Dismiss"), run: typeof dismiss5.run === "function" ? dismiss5.run : null };
|
|
94788
94890
|
items.set(id2, item);
|
|
94789
94891
|
render4();
|
|
94790
94892
|
return id2;
|
|
@@ -94809,6 +94911,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94809
94911
|
};
|
|
94810
94912
|
function setChecked() {
|
|
94811
94913
|
edit3.setAttribute("aria-checked", currentMode() === "edit" ? "true" : "false");
|
|
94914
|
+
if (hideSwitch) addItem({ id: "clay.mode", label: currentMode() === "edit" ? "View mode" : "Edit mode", section: "start", run: () => edit3.click() });
|
|
94812
94915
|
}
|
|
94813
94916
|
setChecked();
|
|
94814
94917
|
document.addEventListener("clay:modechange", setChecked);
|
|
@@ -94921,23 +95024,31 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94921
95024
|
const rect = root4.getBoundingClientRect();
|
|
94922
95025
|
vars.textContent = `:root { --clay-menu-width: ${Math.ceil(rect.width)}px; --clay-menu-height: ${Math.ceil(rect.height)}px; }`;
|
|
94923
95026
|
}
|
|
94924
|
-
const
|
|
94925
|
-
|
|
94926
|
-
|
|
94927
|
-
|
|
94928
|
-
|
|
94929
|
-
|
|
94930
|
-
|
|
94931
|
-
|
|
94932
|
-
|
|
94933
|
-
|
|
94934
|
-
|
|
94935
|
-
|
|
94936
|
-
|
|
94937
|
-
|
|
94938
|
-
|
|
94939
|
-
|
|
94940
|
-
|
|
95027
|
+
const css = embedded ? [MENU_BASE, skin ?? MENU_SKIN, MENU_TOUCH] : [MENU_BASE, MENU_FLOATING, MENU_SKIN, MENU_TOUCH];
|
|
95028
|
+
const ui8 = mountEditorUI({ name: "menu", content: root4, css, parent: slot3 || document.body, attributes: { "clay-mode-toggle": "" } });
|
|
95029
|
+
if (embedded) {
|
|
95030
|
+
window.addEventListener("resize", close);
|
|
95031
|
+
window.addEventListener("scroll", () => {
|
|
95032
|
+
if (topLayer && isOpen()) placeList();
|
|
95033
|
+
}, { capture: true, passive: true });
|
|
95034
|
+
} else {
|
|
95035
|
+
attachPlacement({
|
|
95036
|
+
dock: root4,
|
|
95037
|
+
container: ui8.shadow,
|
|
95038
|
+
grip,
|
|
95039
|
+
storage: window.clay.storage && window.clay.storage.local,
|
|
95040
|
+
onMove: replace3,
|
|
95041
|
+
onDragStart: () => {
|
|
95042
|
+
close();
|
|
95043
|
+
people2?.close({ restore: false });
|
|
95044
|
+
}
|
|
95045
|
+
});
|
|
95046
|
+
reserveSpace();
|
|
95047
|
+
if (typeof ResizeObserver === "function") new ResizeObserver(reserveSpace).observe(root4);
|
|
95048
|
+
new MutationObserver(watchIntro).observe(doc.body, { childList: true });
|
|
95049
|
+
watchIntro();
|
|
95050
|
+
}
|
|
95051
|
+
if (!skin) followLook(root4, root4.querySelector(".clay-menu"), MENU_SURFACE);
|
|
94941
95052
|
const openSeo = () => Promise.resolve().then(() => (init_seo(), seo_exports)).then((m7) => m7.open({ returnFocus: goo }));
|
|
94942
95053
|
actions = attachActions({ addItem, note: showNote2, currentMode });
|
|
94943
95054
|
people2 = attachPeople({ root: root4, capsule: root4.querySelector(".clay-menu"), addItem, removeItem, closeMenu: close, note: showNote2 });
|
|
@@ -94958,7 +95069,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94958
95069
|
followCapability = applyHidden;
|
|
94959
95070
|
if (currentMode() !== "edit") Promise.resolve().then(() => (init_host_permission(), host_permission_exports)).then((m7) => m7.checkHostPermission()).catch(() => {
|
|
94960
95071
|
});
|
|
94961
|
-
window.clay.menu = { addItem, removeItem, open: open4, close, note: showNote2 };
|
|
95072
|
+
window.clay.menu = { addItem, removeItem, open: open4, close, note: showNote2, embedded, button: goo };
|
|
94962
95073
|
document.dispatchEvent(new CustomEvent("clay:menu-ready"));
|
|
94963
95074
|
}
|
|
94964
95075
|
function mountOnce() {
|
|
@@ -94966,7 +95077,7 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94966
95077
|
mounted = true;
|
|
94967
95078
|
mount3();
|
|
94968
95079
|
}
|
|
94969
|
-
var SEO_ITEM, NOTE_MS, INTRO_GAP, GRIP, SECTIONS, SLOTTED, currentMode, mounted, followCapability, shouldMount;
|
|
95080
|
+
var SEO_ITEM, SKIN_VERSION, EDGE_GAP, DISMISS_ICON, NOTE_MS, INTRO_GAP, GRIP, SECTIONS, SLOTTED, currentMode, mounted, followCapability, shouldMount;
|
|
94970
95081
|
var init_menu = __esm({
|
|
94971
95082
|
"src/plugins/menu.js"() {
|
|
94972
95083
|
init_is_edit_mode();
|
|
@@ -94981,6 +95092,9 @@ textarea.clay-seo-input.is-short { min-height: 32px; }
|
|
|
94981
95092
|
init_page_colour();
|
|
94982
95093
|
init_editor_ui();
|
|
94983
95094
|
SEO_ITEM = true;
|
|
95095
|
+
SKIN_VERSION = "1";
|
|
95096
|
+
EDGE_GAP = 8;
|
|
95097
|
+
DISMISS_ICON = '<svg viewBox="0 0 10 10" aria-hidden="true" focusable="false"><path d="M1 0 5 4l4-4 1 1-4 4 4 4-1 1-4-4-4 4-1-1 4-4-4-4z"/></svg>';
|
|
94984
95098
|
NOTE_MS = 6e3;
|
|
94985
95099
|
INTRO_GAP = 12;
|
|
94986
95100
|
GRIP = '<svg viewBox="0 0 6 12" aria-hidden="true" focusable="false"><rect width="2" height="2"/><rect x="4" width="2" height="2"/><rect y="5" width="2" height="2"/><rect x="4" y="5" width="2" height="2"/><rect y="10" width="2" height="2"/><rect x="4" y="10" width="2" height="2"/></svg>';
|
|
@@ -111214,7 +111328,7 @@ ${t2}` : `"use strict"; return (${t2});`;
|
|
|
111214
111328
|
}
|
|
111215
111329
|
return { status: r45, report: i2, debug: s3, greenLine: n3, printGreenLines: o3, REGISTRY: Zt8 };
|
|
111216
111330
|
}
|
|
111217
|
-
var yn5 = "0.7.
|
|
111331
|
+
var yn5 = "0.7.1";
|
|
111218
111332
|
function An5({ createAccessor: t2, installInput: e20, debugExtras: r45 }) {
|
|
111219
111333
|
let n3 = /* @__PURE__ */ new Map(), o3 = [], i2 = be10(bt9);
|
|
111220
111334
|
function s3(l2) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as We}from"./c-HAWFNBYG.js";import{a as Ye,
|
|
1
|
+
import{b as We}from"./c-HAWFNBYG.js";import{a as Ye,f as $e}from"./c-HDWZEJHM.js";import{a as qe}from"./c-AQLFEATB.js";import{a as Ge}from"./c-AQYCG7QW.js";import{b as je}from"./c-QY7F6EN6.js";import{c as _e}from"./c-MHI3GYKF.js";import{b as Ke,c as Ve}from"./c-E4IBSAQM.js";import{a as Fe}from"./c-I2SCCUEW.js";import{d as Ne}from"./c-XGH4GS2T.js";import"./c-3O7OBDCM.js";import"./c-BPF2NSPV.js";import"./c-P7KNDG34.js";import"./c-CYWLPPUS.js";import"./c-N7JPUPGC.js";import"./c-HA6INT6J.js";import"./c-ICMAOOGK.js";import"./c-WRBKEJD4.js";import"./c-VHNSBD2M.js";var xt=/^[a-z][a-z0-9+.-]*:/i,wt=["noindex","nofollow"],kt=["ogTitle","ogDescription","ogImage","ogImageAlt","siteName"],m=e=>e==null?"":String(e),O=e=>m(e).trim()!=="",T=e=>e.head||e.querySelector("head"),I=(e,t,o)=>Array.from(T(e).querySelectorAll("meta")).filter(i=>m(i.getAttribute(t)).trim().toLowerCase()===o),se=(e,t)=>Array.from(T(e).querySelectorAll("link")).filter(o=>m(o.getAttribute("rel")).trim().toLowerCase().split(/\s+/).includes(t)),ce=e=>Array.from(T(e).querySelectorAll("title")),pe=e=>I(e,"name","robots"),w=e=>e.remove();function $(e,t,o){let i=e.createElement("meta");return i.setAttribute(t,o),T(e).appendChild(i),i}function Et(e,t){let o=e.createElement("link");return o.setAttribute("rel",t),T(e).appendChild(o),o}function de(e,t,o,i){(I(e,t,o)[0]||$(e,t,o)).setAttribute("content",i)}function C(e,t,{trim:o=!1}={}){let i=c=>I(c,e,t);return{find:i,read(c){let d=i(c)[0];return d?m(d.getAttribute("content")):""},write(c,d){let f=i(c),p=m(d);if(!O(p)){f.forEach(w);return}(f[0]||$(c,e,t)).setAttribute("content",o?p.trim():p),f.slice(1).forEach(w)}}}var Je=e=>m(e.getAttribute("content")).split(",").map(t=>t.trim()).filter(Boolean);function At(e,t){let o=pe(e),i=(o[0]?Je(o[0]):[]).filter(p=>!wt.includes(p.toLowerCase())),c=[];t.index===!1&&c.push("noindex"),t.follow===!1&&c.push("nofollow");let d=c.concat(i);if(!d.length){o.forEach(w);return}(o[0]||$(e,"name","robots")).setAttribute("content",d.join(", ")),o.slice(1).forEach(w)}function Xe(e){let t=e==="noindex"?"index":"follow",o=t==="index"?"follow":"index";return{find:pe,read(i){let c=pe(i)[0];return c?!Je(c).some(d=>d.toLowerCase()===e):!0},write(i,c){let d={index:!0,follow:!0};d[t]=!!c,d[o]=x[o].read(i),At(i,d)}}}var Lt={find:ce,read(e){let t=ce(e)[0];return t?m(t.textContent):""},write(e,t){let o=ce(e),i=m(t);if(!O(i)){o.forEach(w);return}let c=o[0]||e.createElement("title");o.length||T(e).appendChild(c),c.textContent=i,o.slice(1).forEach(w)}},St={find(e){let t=e.documentElement;return t&&t.hasAttribute("lang")?[t]:[]},read(e){let t=e.documentElement;return t&&t.hasAttribute("lang")?m(t.getAttribute("lang")):""},write(e,t){let o=e.documentElement;if(!o)return;let i=m(t);if(!O(i)){o.removeAttribute("lang");return}o.setAttribute("lang",i.trim())}},Ct={find:e=>se(e,"canonical"),read(e){let t=se(e,"canonical")[0];return t?m(t.getAttribute("href")):""},write(e,t){let o=se(e,"canonical"),i=m(t);if(!O(i)){o.forEach(w);return}(o[0]||Et(e,"canonical")).setAttribute("href",i.trim()),o.slice(1).forEach(w)}},Y="clay-seo-title-mode",Ot={find:e=>I(e,"name",Y),read(e){return I(e,"name",Y).some(o=>m(o.getAttribute("content")).trim().toLowerCase()==="custom")?"custom":"derived"},write(e,t){let o=I(e,"name",Y);if(m(t).trim().toLowerCase()!=="custom"){o.forEach(w);return}(o[0]||$(e,"name",Y)).setAttribute("content","custom"),o.slice(1).forEach(w)}},x={title:Lt,description:C("name","description"),lang:St,canonical:Ct,index:Xe("noindex"),follow:Xe("nofollow"),ogTitle:C("property","og:title"),ogDescription:C("property","og:description"),ogImage:C("property","og:image",{trim:!0}),ogImageAlt:C("property","og:image:alt"),siteName:C("property","og:site_name"),twitterSite:C("name","twitter:site"),titleMode:Ot},Qe=Object.fromEntries(Object.keys(x).map(e=>[e,{read:x[e].read,write:x[e].write}]));function Ze(e){let t=e.hostname.toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"}function ue(e){try{return new URL(e)}catch{return null}}function fe(e){return e.protocol==="http:"||e.protocol==="https:"}function et(e){let t=e.location&&e.location.href||e.URL||e.baseURI||"",o=ue(t);return!o||!fe(o)||Ze(o)?"":o.origin+o.pathname}function tt(e){let t=m(e).trim();if(!t)return"";let o=ue(t);return!o||!fe(o)?"Enter a full http: or https: address.":Ze(o)?"A localhost address cannot be a canonical URL.":""}function It(e,t){let o=m(e).trim();if(!o)return"";if(xt.test(o)){let i=ue(o);return!i||!fe(i)?"Use an http: or https: image address.":""}if(t)try{new URL(o,t)}catch{return"Use an http: or https: image address."}return""}function ot(e,t){let o=("canonical"in t?m(t.canonical).trim():x.canonical.read(e)).trim();return o&&!tt(o)?o:""}function Ut(e,t){let o=kt.some(d=>d in t&&O(t[d])),i="canonical"in t&&O(t.canonical);if(!o&&!i&&!("ogImage"in t))return;if(o||i){I(e,"property","og:type").length||de(e,"property","og:type","website");let d=ot(e,t)||et(e);d&&de(e,"property","og:url",d)}let c="ogImage"in t?t.ogImage:x.ogImage.read(e);de(e,"name","twitter:card",O(c)?"summary_large_image":"summary")}function H(e){let t={},o={};for(let i of Object.keys(x)){let c=x[i];t[i]=c.read(e),o[i]=c.find(e).length>0}return{values:t,present:o}}function G(e,t){let o=t||{},i=Object.keys(x).filter(p=>p in o),c={};if(i.includes("canonical")){let p=tt(o.canonical);p&&(c.canonical=p)}if(i.includes("ogImage")){let p=ot(e,o)||et(e),h=It(o.ogImage,p);h&&(c.ogImage=h)}if(Object.keys(c).length)return{normalized:[],errors:c};let d=[],f=new Set;for(let p of i){let h=x[p].find;h(e).length>1&&!f.has(h)&&(f.add(h),d.push(p))}for(let p of i)x[p].write(e,o[p]);return Ut(e,o),{normalized:d,errors:{}}}var nt="reopen-seo",zt="SEO and social sharing",Tt="SEO settings",it="SEO settings applied",dt=/^[a-z][a-z0-9+.-]*:/i,Mt="This site is hidden from search engines in your account settings, so this page stays hidden whatever you choose here.",Rt="Uploaded images are public to anyone with the link.",Pt="Paste the address of an image on the web.",Bt={title:{label:"Title",kind:"text",full:!0,count:60},description:{label:"Description",kind:"textarea",full:!0,count:160},ogTitle:{label:"Preview title",note:"Open Graph",kind:"text"},ogDescription:{label:"Preview description",note:"Open Graph",kind:"textarea",short:!0},ogImage:{label:"Preview image",note:"Open Graph",kind:"text",full:!0},canonical:{label:"Canonical URL",kind:"text"},lang:{label:"Language",kind:"text"},ogImageAlt:{label:"Image alt text",kind:"text"},siteName:{label:"Site name",kind:"text"},twitterSite:{label:"Social handle",kind:"text",placeholder:"@yourname"},index:{label:"Show in search results",kind:"checkbox"},follow:{label:"Let search engines follow links",kind:"checkbox"}},Dt=["title","description","ogTitle","ogDescription","ogImage"],Ht=["canonical","lang","ogImageAlt","siteName","twitterSite"],Nt=["index","follow"],_t=`.clay-seo { box-sizing: border-box; width: 100%; border-bottom: 1px solid var(--bevel-line-3); background: var(--bevel-surface); box-shadow: var(--clay-sheet-shadow); font-size: 13px; line-height: 1.45; container-type: inline-size; animation: clay-seo-in .2s ease-out; position: relative; z-index: 2147482001; grid-column: 1 / -1; flex: 0 0 100%; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; }
|
|
2
2
|
@keyframes clay-seo-in { from { margin-top: -40px; opacity: 0; } to { margin-top: 0; opacity: 1; } }
|
|
3
3
|
.clay-seo-inner { max-width: 1120px; margin: 0 auto; padding: 14px 20px 18px; }
|
|
4
4
|
.clay-seo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--bevel-line-2); }
|