frontend/shared: add attachShadowCss, the shared shadow-DOM style-attach helper

Pulls the attachShadow-plus-plain-<style>-tag boilerplate that hive-dialog
and hive-toast already build per component into one shared helper, so the
next shadow-DOM custom element (the agent context menu, next commit) can
reuse it instead of re-deriving the same few lines. A plain <style>
element rather than a constructed CSSStyleSheet with adoptedStyleSheets --
each component instance builds its own fresh stylesheet per connect with
no sharing across instances, so adoptedStyleSheets buys nothing here over
the plain, universally-understood <style> tag.
This commit is contained in:
iris 2026-07-31 22:14:52 +02:00 committed by mara
commit ed92883294

View file

@ -17,7 +17,8 @@
"./chrome.css": "./src/chrome.css",
"./forms.js": "./src/forms.js",
"./dom.js": "./src/dom.js",
"./modal.js": "./src/modal.js"
"./modal.js": "./src/modal.js",
"./shadow-css.js": "./src/shadow-css.js"
},
"files": [
"src/"