@symbiotejs/symbiote 3.3.2 → 3.3.3
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/core/Symbiote.js +14 -8
- package/package.json +1 -1
- package/types/core/Symbiote.d.ts.map +1 -1
package/core/Symbiote.js
CHANGED
|
@@ -146,7 +146,9 @@ export class Symbiote extends HTMLElement {
|
|
|
146
146
|
|
|
147
147
|
if (this.#super.shadowStyleSheets) {
|
|
148
148
|
shadow = true; // is needed for cases when Shadow DOM was created manually for some other purposes
|
|
149
|
-
|
|
149
|
+
if (!clientSSR) {
|
|
150
|
+
this.shadowRoot.adoptedStyleSheets = [...this.#super.shadowStyleSheets];
|
|
151
|
+
}
|
|
150
152
|
}
|
|
151
153
|
addFr();
|
|
152
154
|
}
|
|
@@ -466,14 +468,18 @@ export class Symbiote extends HTMLElement {
|
|
|
466
468
|
this.#initCallback();
|
|
467
469
|
} else {
|
|
468
470
|
if (this.#super.rootStyleSheets) {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
// Skip adopted sheets when hydrating SSR (inline <style> tags already present):
|
|
472
|
+
let hydrating = this.ssrMode || (this.isoMode && this.childNodes.length > 0);
|
|
473
|
+
if (!hydrating) {
|
|
474
|
+
/** @type {Document | ShadowRoot} */
|
|
475
|
+
// @ts-expect-error
|
|
476
|
+
let root = this.getRootNode();
|
|
477
|
+
if (!root) {
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
let styleSet = new Set([...root.adoptedStyleSheets, ...this.#super.rootStyleSheets]);
|
|
481
|
+
root.adoptedStyleSheets = [...styleSet];
|
|
474
482
|
}
|
|
475
|
-
let styleSet = new Set([...root.adoptedStyleSheets, ...this.#super.rootStyleSheets]);
|
|
476
|
-
root.adoptedStyleSheets = [...styleSet];
|
|
477
483
|
}
|
|
478
484
|
this.render();
|
|
479
485
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@symbiotejs/symbiote",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.3",
|
|
5
5
|
"description": "Symbiote.js - zero-dependency close-to-platform frontend library to build super-powered web components",
|
|
6
6
|
"author": "team@rnd-pro.com",
|
|
7
7
|
"license": "MIT",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Symbiote.d.ts","sourceRoot":"","sources":["../../core/Symbiote.js"],"names":[],"mappings":";;AAmBA,sBADc,CAAC;IAuBb,cADW,mBAAmB,CACjB;IAGb,sCAAwB;IAExB,iCAGC;IAED,8BAEC;IAkBD,wBAAgB;
|
|
1
|
+
{"version":3,"file":"Symbiote.d.ts","sourceRoot":"","sources":["../../core/Symbiote.js"],"names":[],"mappings":";;AAmBA,sBADc,CAAC;IAuBb,cADW,mBAAmB,CACjB;IAGb,sCAAwB;IAExB,iCAGC;IAED,8BAEC;IAkBD,wBAAgB;IAsJhB,+BAJwB,CAAC,SAAZ,aAAU,uBAEZ,CAAC;;;MAuCX;IAmPD,qCAA+B;IAoC/B,iDAFa,OAAO,QAAQ,CAqB3B;IAED,wBAKC;IAGD;;aAOC;IA6GD,6BADY,SAAS,aAAa,QAOjC;IAGD,+BADY,SAAS,aAAa,QAOjC;IAGD,8BADY,SAAS,aAAa,EAIjC;IAGD,gCADY,SAAS,aAAa,EAIjC;IA1iBD,cA6BC;IAjID,gCAEC;IAED,qBAAiB;IACjB,uBAAmB;IAiBnB,kBAHW,SAAS,gBAAgB,0BA+EnC;IAnDG,iBAAyC;IAwD3C,OADW,CAAC,CACoB;IAEhC;;MAAmC;IAEnC,oBADW,GAAG,CAAC,CAAC,EAAE,EAAE,gBAAgB,gBAAW,EAAE,KAAK,eAAU,KAAK,IAAI,CAAC,CACvC;IAEnC;;MAA8B;IAC9B,kBAAwB;IAExB,qBAAwB;IAExB,sBAAyB;IAEzB,wBAA0B;IAE1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