@public-ui/hydrate 3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.0 → 3.0.0-37e952f54ae220a836264edf844556a2c45116ea.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/index.js CHANGED
@@ -2657,7 +2657,7 @@ var loglevel = {exports: {}};
2657
2657
 
2658
2658
  var m = loglevel.exports;
2659
2659
 
2660
- const o$1={A11yUi:{CSS_STYLE_CACHE:new Map,HYDRATED_HISTORY:[],STYLING_TASK_QUEUE:new Map,Themes:{}}};let h=!1;const H=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,O=t=>typeof t=="string"&&H.test(t),p=t=>{if(O(t)===!1)throw new Error(`[Theming] The theme identifier "${typeof t=="string"?t:""}" (Type: ${typeof t}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},_=(t,e,s,a)=>T(t,e,s,a),T=(t,e,s,a)=>{a=a??{},a.append=a.append??!1,p(t),h===!1&&(h=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${t}" should not be patched.
2660
+ const o$1={A11yUi:{CSS_STYLE_CACHE:new Map,HYDRATED_HISTORY:[],STYLING_TASK_QUEUE:new Map,Themes:{}}};let h=!1;const O=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,_=t=>typeof t=="string"&&O.test(t),g=t=>{if(_(t)===!1)throw new Error(`[Theming] The theme identifier "${typeof t=="string"?t:""}" (Type: ${typeof t}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},I=(t,e,s,a)=>u$1(t,e,s,a),u$1=(t,e,s,a)=>{a=a??{},a.append=a.append??!1,g(t),h===!1&&(h=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${t}" should not be patched.
2661
2661
 
2662
2662
  import { register } from 'adopted-style-sheets';
2663
2663
  import { defineCustomElements } from '...';
@@ -2667,7 +2667,7 @@ const o$1={A11yUi:{CSS_STYLE_CACHE:new Map,HYDRATED_HISTORY:[],STYLING_TASK_QUEU
2667
2667
  .then(() => {
2668
2668
  // run your app or website
2669
2669
  })
2670
- .catch(console.warn);`)),(typeof o$1.A11yUi.Themes[t]!="object"||o$1.A11yUi.Themes[t]===null)&&(o$1.A11yUi.Themes[t]={}),a.append&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e]+=s:o$1.A11yUi.Themes[t][e]=s;},I=(t,e,s,a)=>u$1(t,e,s,a),u$1=(t,e,s,a)=>(p(t),typeof e=="object"&&e!==null&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r],i=r.toLowerCase(),c=typeof a?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(r)?a.transformTagName(i):r;typeof n=="string"&&n.length>0&&T(t,c.toUpperCase(),n,s);}),t);const U=new Set,z=/--[^;]+/g,D=/:/;let f=0,C;const Q=(t,e)=>{let s=e.match(z);if(Array.isArray(s)){s=s.filter(r=>D.test(r));const a=document.createElement("style");a.innerHTML=`.${t} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}U.add(t);},y=(t,e)=>typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[t]=="object"&&o$1.A11yUi.Themes[t]!==null&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e].replace(/\r?\n/g,""):"",F=t=>{for(const e of Array.from(t.childNodes))if(e instanceof HTMLStyleElement&&e.tagName==="STYLE"&&e.dataset.themingFallback===void 0)t.removeChild(e);else break},q=(t,e)=>{try{if(o$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=[];e.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),t.adoptedStyleSheets=s;}catch{[...e].reverse().forEach((a,r)=>{if(typeof a!="string"||a.length===0)return;const n=document.createElement("style");switch(n.dataset.themingFallback="",r){case 4:n.dataset.themingBaseA11y="";break;case 3:n.dataset.themingBaseGlobal="";break;case 2:n.dataset.themingBaseComponent="";break;case 1:n.dataset.themingCustomGlobal="";break;case 0:n.dataset.themingCustomComponent="";break;default:n.dataset.themingUnknown="";break}n.innerHTML=a,t.insertBefore(n,t.firstChild);});}},J=(t,e,s)=>{if(s!==!1){const a=[...Array.from(t.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(t.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>e.unshift(n.innerHTML)),r.reverse().forEach(n=>e.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>e.push(n.innerHTML)),r.forEach(n=>e.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},w=(t,e)=>{const s=e.name||"default";let a;try{if(t.shadowRoot===null)throw new Error("ShadowRoot is null");a=t.shadowRoot;}catch{a=t;}if(o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.has(t.tagName))L(a,o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.get(t.tagName));else {const r=y(s,"PROPERTIES"),n=y(s,"GLOBAL"),i=y(s,t.tagName);U.has(s)===!1&&Q(s,n);const c=[r,n,i];J(a,c,e.encroachCss),e.cache===!0&&(o$1.A11yUi.CSS_STYLE_CACHE.has(s)===!1&&o$1.A11yUi.CSS_STYLE_CACHE.set(s,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.set(t.tagName,c)),L(a,c);}},L=(t,e)=>{F(t),q(t,e);},V={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1},W={attributes:!0,attributeFilter:[],childList:!1,subtree:!1},v=new MutationObserver(t=>{for(const e of t){const s=e.target;if(s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{themeDetails:r}=a;w(s,r),M(s);}v.observe(s,W);}}}),j=new IntersectionObserver(t=>{for(const e of t){const s=e.target;if(e.isIntersecting){if(f===0&&(f=performance.now()),s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{themeDetails:r}=a;w(s,r),M(s);}}else v.observe(s,V);j.unobserve(s);}}},{root:null,threshold:0}),M=t=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(t),clearTimeout(C),C=setTimeout(()=>{const e=Math.round(performance.now()-f-2500);console.log(`Theming finished for all components in ${e}ms`),f=0;},2500);};
2670
+ .catch(console.warn);`)),(typeof o$1.A11yUi.Themes[t]!="object"||o$1.A11yUi.Themes[t]===null)&&(o$1.A11yUi.Themes[t]={}),a.append&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e]+=s:o$1.A11yUi.Themes[t][e]=s;},R=(t,e,s,a)=>p(t,e,s,a),p=(t,e,s,a)=>(g(t),typeof e=="object"&&e!==null&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r],i=r.toLowerCase(),c=typeof a?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(r)?a.transformTagName(i):r;typeof n=="string"&&n.length>0&&u$1(t,c.toUpperCase(),n,s);}),t);const C=new Set,D=/--[^;]+/g,F=/:/;let f=0,w;const Q=(t,e)=>{let s=e.match(D);if(Array.isArray(s)){s=s.filter(r=>F.test(r));const a=document.createElement("style");a.innerHTML=`.${t} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}C.add(t);},y=(t,e)=>typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[t]=="object"&&o$1.A11yUi.Themes[t]!==null&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e].replace(/\r?\n/g,""):"",V=t=>{for(const e of Array.from(t.childNodes))if(e instanceof HTMLStyleElement&&e.tagName==="STYLE"&&e.dataset.themingFallback===void 0)t.removeChild(e);else break},q=(t,e)=>{try{if(o$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=[];e.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),t.adoptedStyleSheets=s;}catch{[...e].reverse().forEach((a,r)=>{if(typeof a!="string"||a.length===0)return;const n=document.createElement("style");switch(n.dataset.themingFallback="",r){case 4:n.dataset.themingBaseA11y="";break;case 3:n.dataset.themingBaseGlobal="";break;case 2:n.dataset.themingBaseComponent="";break;case 1:n.dataset.themingCustomGlobal="";break;case 0:n.dataset.themingCustomComponent="";break;default:n.dataset.themingUnknown="";break}n.innerHTML=a,t.insertBefore(n,t.firstChild);});}},J=(t,e,s)=>{if(s!==!1){const a=[...Array.from(t.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(t.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>e.unshift(n.innerHTML)),r.reverse().forEach(n=>e.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>e.push(n.innerHTML)),r.forEach(n=>e.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},L=(t,e,s)=>{const a=e.name||"default";let r;try{if(t.shadowRoot===null)throw new Error("ShadowRoot is null");r=t.shadowRoot;}catch{r=t;}if(o$1.A11yUi.CSS_STYLE_CACHE.get(a)?.has(t.tagName))v(t,r,o$1.A11yUi.CSS_STYLE_CACHE.get(a)?.get(t.tagName),s);else {const n=y(a,"PROPERTIES"),i=y(a,"GLOBAL"),c=y(a,t.tagName);C.has(a)===!1&&Q(a,i);const d=[n,i,c];J(r,d,e.encroachCss),e.cache===!0&&(o$1.A11yUi.CSS_STYLE_CACHE.has(a)===!1&&o$1.A11yUi.CSS_STYLE_CACHE.set(a,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(a)?.set(t.tagName,d)),v(t,r,d,s);}},v=(t,e,s,a)=>{V(e),q(e,s),requestAnimationFrame(()=>{t.style.visibility=a;});},W={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1},X={attributes:!0,attributeFilter:[],childList:!1,subtree:!1},j=new MutationObserver(t=>{for(const e of t){const s=e.target;if(s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{styleVisibility:r,themeDetails:n}=a;L(s,n,r),N(s);}j.observe(s,X);}}}),M=new IntersectionObserver(t=>{for(const e of t){const s=e.target;if(e.isIntersecting){if(f===0&&(f=performance.now()),s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{styleVisibility:r,themeDetails:n}=a;L(s,n,r),N(s);}}else j.observe(s,W);M.unobserve(s);}}},{root:null,threshold:0}),N=t=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(t),clearTimeout(w),w=setTimeout(()=>{const e=Math.round(performance.now()-f-2500);console.log(`Theming finished for all components in ${e}ms`),f=0;},2500);};
2671
2671
 
2672
2672
  const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'];
2673
2673
  const alertVariantOptions = ['card', 'msg'];
@@ -3714,8 +3714,8 @@ const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, n
3714
3714
  class KoliBriDevHelper {
3715
3715
  }
3716
3716
  KoliBriDevHelper.getCssStyle = y;
3717
- KoliBriDevHelper.patchTheme = I;
3718
- KoliBriDevHelper.patchThemeTag = _;
3717
+ KoliBriDevHelper.patchTheme = R;
3718
+ KoliBriDevHelper.patchThemeTag = I;
3719
3719
  KoliBriDevHelper.querySelector = koliBriQuerySelector;
3720
3720
  KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
3721
3721
  KoliBriDevHelper.stringifyJson = stringifyJson;
package/dist/index.mjs CHANGED
@@ -2653,7 +2653,7 @@ var loglevel = {exports: {}};
2653
2653
 
2654
2654
  var m = loglevel.exports;
2655
2655
 
2656
- const o$1={A11yUi:{CSS_STYLE_CACHE:new Map,HYDRATED_HISTORY:[],STYLING_TASK_QUEUE:new Map,Themes:{}}};let h=!1;const H=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,O=t=>typeof t=="string"&&H.test(t),p=t=>{if(O(t)===!1)throw new Error(`[Theming] The theme identifier "${typeof t=="string"?t:""}" (Type: ${typeof t}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},_=(t,e,s,a)=>T(t,e,s,a),T=(t,e,s,a)=>{a=a??{},a.append=a.append??!1,p(t),h===!1&&(h=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${t}" should not be patched.
2656
+ const o$1={A11yUi:{CSS_STYLE_CACHE:new Map,HYDRATED_HISTORY:[],STYLING_TASK_QUEUE:new Map,Themes:{}}};let h=!1;const O=/^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/,_=t=>typeof t=="string"&&O.test(t),g=t=>{if(_(t)===!1)throw new Error(`[Theming] The theme identifier "${typeof t=="string"?t:""}" (Type: ${typeof t}) is not valid. Please use only follow this pattern: /^[a-z][a-z0-9]{1,}(-[a-z0-9]+)?$/`)},I=(t,e,s,a)=>u$1(t,e,s,a),u$1=(t,e,s,a)=>{a=a??{},a.append=a.append??!1,g(t),h===!1&&(h=!0,m.warn(`[Theming] The theme process is locked. This means that the theme "${t}" should not be patched.
2657
2657
 
2658
2658
  import { register } from 'adopted-style-sheets';
2659
2659
  import { defineCustomElements } from '...';
@@ -2663,7 +2663,7 @@ const o$1={A11yUi:{CSS_STYLE_CACHE:new Map,HYDRATED_HISTORY:[],STYLING_TASK_QUEU
2663
2663
  .then(() => {
2664
2664
  // run your app or website
2665
2665
  })
2666
- .catch(console.warn);`)),(typeof o$1.A11yUi.Themes[t]!="object"||o$1.A11yUi.Themes[t]===null)&&(o$1.A11yUi.Themes[t]={}),a.append&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e]+=s:o$1.A11yUi.Themes[t][e]=s;},I=(t,e,s,a)=>u$1(t,e,s,a),u$1=(t,e,s,a)=>(p(t),typeof e=="object"&&e!==null&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r],i=r.toLowerCase(),c=typeof a?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(r)?a.transformTagName(i):r;typeof n=="string"&&n.length>0&&T(t,c.toUpperCase(),n,s);}),t);const U=new Set,z=/--[^;]+/g,D=/:/;let f=0,C;const Q=(t,e)=>{let s=e.match(z);if(Array.isArray(s)){s=s.filter(r=>D.test(r));const a=document.createElement("style");a.innerHTML=`.${t} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}U.add(t);},y=(t,e)=>typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[t]=="object"&&o$1.A11yUi.Themes[t]!==null&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e].replace(/\r?\n/g,""):"",F=t=>{for(const e of Array.from(t.childNodes))if(e instanceof HTMLStyleElement&&e.tagName==="STYLE"&&e.dataset.themingFallback===void 0)t.removeChild(e);else break},q=(t,e)=>{try{if(o$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=[];e.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),t.adoptedStyleSheets=s;}catch{[...e].reverse().forEach((a,r)=>{if(typeof a!="string"||a.length===0)return;const n=document.createElement("style");switch(n.dataset.themingFallback="",r){case 4:n.dataset.themingBaseA11y="";break;case 3:n.dataset.themingBaseGlobal="";break;case 2:n.dataset.themingBaseComponent="";break;case 1:n.dataset.themingCustomGlobal="";break;case 0:n.dataset.themingCustomComponent="";break;default:n.dataset.themingUnknown="";break}n.innerHTML=a,t.insertBefore(n,t.firstChild);});}},J=(t,e,s)=>{if(s!==!1){const a=[...Array.from(t.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(t.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>e.unshift(n.innerHTML)),r.reverse().forEach(n=>e.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>e.push(n.innerHTML)),r.forEach(n=>e.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},w=(t,e)=>{const s=e.name||"default";let a;try{if(t.shadowRoot===null)throw new Error("ShadowRoot is null");a=t.shadowRoot;}catch{a=t;}if(o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.has(t.tagName))L(a,o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.get(t.tagName));else {const r=y(s,"PROPERTIES"),n=y(s,"GLOBAL"),i=y(s,t.tagName);U.has(s)===!1&&Q(s,n);const c=[r,n,i];J(a,c,e.encroachCss),e.cache===!0&&(o$1.A11yUi.CSS_STYLE_CACHE.has(s)===!1&&o$1.A11yUi.CSS_STYLE_CACHE.set(s,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(s)?.set(t.tagName,c)),L(a,c);}},L=(t,e)=>{F(t),q(t,e);},V={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1},W={attributes:!0,attributeFilter:[],childList:!1,subtree:!1},v=new MutationObserver(t=>{for(const e of t){const s=e.target;if(s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{themeDetails:r}=a;w(s,r),M(s);}v.observe(s,W);}}}),j=new IntersectionObserver(t=>{for(const e of t){const s=e.target;if(e.isIntersecting){if(f===0&&(f=performance.now()),s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{themeDetails:r}=a;w(s,r),M(s);}}else v.observe(s,V);j.unobserve(s);}}},{root:null,threshold:0}),M=t=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(t),clearTimeout(C),C=setTimeout(()=>{const e=Math.round(performance.now()-f-2500);console.log(`Theming finished for all components in ${e}ms`),f=0;},2500);};
2666
+ .catch(console.warn);`)),(typeof o$1.A11yUi.Themes[t]!="object"||o$1.A11yUi.Themes[t]===null)&&(o$1.A11yUi.Themes[t]={}),a.append&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e]+=s:o$1.A11yUi.Themes[t][e]=s;},R=(t,e,s,a)=>p(t,e,s,a),p=(t,e,s,a)=>(g(t),typeof e=="object"&&e!==null&&Object.getOwnPropertyNames(e).forEach(r=>{const n=e[r],i=r.toLowerCase(),c=typeof a?.transformTagName=="function"&&!["GLOBAL","PROPERTIES"].includes(r)?a.transformTagName(i):r;typeof n=="string"&&n.length>0&&u$1(t,c.toUpperCase(),n,s);}),t);const C=new Set,D=/--[^;]+/g,F=/:/;let f=0,w;const Q=(t,e)=>{let s=e.match(D);if(Array.isArray(s)){s=s.filter(r=>F.test(r));const a=document.createElement("style");a.innerHTML=`.${t} {${s.join(";")}}`,document.querySelector("head")?.appendChild(a);}C.add(t);},y=(t,e)=>typeof o$1.A11yUi=="object"&&o$1.A11yUi!==null&&typeof o$1.A11yUi.Themes=="object"&&o$1.A11yUi.Themes!==null&&typeof o$1.A11yUi.Themes[t]=="object"&&o$1.A11yUi.Themes[t]!==null&&typeof o$1.A11yUi.Themes[t][e]=="string"?o$1.A11yUi.Themes[t][e].replace(/\r?\n/g,""):"",V=t=>{for(const e of Array.from(t.childNodes))if(e instanceof HTMLStyleElement&&e.tagName==="STYLE"&&e.dataset.themingFallback===void 0)t.removeChild(e);else break},q=(t,e)=>{try{if(o$1.A11yUi.Theme?.mode==="ssr")throw new Error("SSR");const s=[];e.forEach(a=>{const r=new CSSStyleSheet;r.replaceSync(a),s.push(r);}),t.adoptedStyleSheets=s;}catch{[...e].reverse().forEach((a,r)=>{if(typeof a!="string"||a.length===0)return;const n=document.createElement("style");switch(n.dataset.themingFallback="",r){case 4:n.dataset.themingBaseA11y="";break;case 3:n.dataset.themingBaseGlobal="";break;case 2:n.dataset.themingBaseComponent="";break;case 1:n.dataset.themingCustomGlobal="";break;case 0:n.dataset.themingCustomComponent="";break;default:n.dataset.themingUnknown="";break}n.innerHTML=a,t.insertBefore(n,t.firstChild);});}},J=(t,e,s)=>{if(s!==!1){const a=[...Array.from(t.childNodes).filter(n=>n instanceof HTMLStyleElement&&n.tagName==="STYLE")];let r;try{r=[...Array.from(t.adoptedStyleSheets)];}catch{r=[];}s?.mode==="before"?(a.reverse().forEach(n=>e.unshift(n.innerHTML)),r.reverse().forEach(n=>e.unshift(Array.from(n.cssRules).map(i=>i.cssText).join("")))):s?.mode==="after"&&(a.forEach(n=>e.push(n.innerHTML)),r.forEach(n=>e.push(Array.from(n.cssRules).map(i=>i.cssText).join(""))));}},L=(t,e,s)=>{const a=e.name||"default";let r;try{if(t.shadowRoot===null)throw new Error("ShadowRoot is null");r=t.shadowRoot;}catch{r=t;}if(o$1.A11yUi.CSS_STYLE_CACHE.get(a)?.has(t.tagName))v(t,r,o$1.A11yUi.CSS_STYLE_CACHE.get(a)?.get(t.tagName),s);else {const n=y(a,"PROPERTIES"),i=y(a,"GLOBAL"),c=y(a,t.tagName);C.has(a)===!1&&Q(a,i);const d=[n,i,c];J(r,d,e.encroachCss),e.cache===!0&&(o$1.A11yUi.CSS_STYLE_CACHE.has(a)===!1&&o$1.A11yUi.CSS_STYLE_CACHE.set(a,new Map),o$1.A11yUi.CSS_STYLE_CACHE.get(a)?.set(t.tagName,d)),v(t,r,d,s);}},v=(t,e,s,a)=>{V(e),q(e,s),requestAnimationFrame(()=>{t.style.visibility=a;});},W={attributes:!0,attributeFilter:["class"],childList:!1,subtree:!1},X={attributes:!0,attributeFilter:[],childList:!1,subtree:!1},j=new MutationObserver(t=>{for(const e of t){const s=e.target;if(s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{styleVisibility:r,themeDetails:n}=a;L(s,n,r),N(s);}j.observe(s,X);}}}),M=new IntersectionObserver(t=>{for(const e of t){const s=e.target;if(e.isIntersecting){if(f===0&&(f=performance.now()),s.classList.contains("hydrated")){const a=o$1.A11yUi.STYLING_TASK_QUEUE.get(s);if(a){const{styleVisibility:r,themeDetails:n}=a;L(s,n,r),N(s);}}else j.observe(s,W);M.unobserve(s);}}},{root:null,threshold:0}),N=t=>{o$1.A11yUi.STYLING_TASK_QUEUE.delete(t),clearTimeout(w),w=setTimeout(()=>{const e=Math.round(performance.now()-f-2500);console.log(`Theming finished for all components in ${e}ms`),f=0;},2500);};
2667
2667
 
2668
2668
  const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'];
2669
2669
  const alertVariantOptions = ['card', 'msg'];
@@ -3710,8 +3710,8 @@ const koliBriQuerySelectorAll = (selector, node) => querySelectorAll(selector, n
3710
3710
  class KoliBriDevHelper {
3711
3711
  }
3712
3712
  KoliBriDevHelper.getCssStyle = y;
3713
- KoliBriDevHelper.patchTheme = I;
3714
- KoliBriDevHelper.patchThemeTag = _;
3713
+ KoliBriDevHelper.patchTheme = R;
3714
+ KoliBriDevHelper.patchThemeTag = I;
3715
3715
  KoliBriDevHelper.querySelector = koliBriQuerySelector;
3716
3716
  KoliBriDevHelper.querySelectorAll = koliBriQuerySelectorAll;
3717
3717
  KoliBriDevHelper.stringifyJson = stringifyJson;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/hydrate",
3
- "version": "3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.0",
3
+ "version": "3.0.0-37e952f54ae220a836264edf844556a2c45116ea.0",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -46,10 +46,10 @@
46
46
  ],
47
47
  "devDependencies": {
48
48
  "rimraf": "6.0.1",
49
- "@public-ui/components": "3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.0"
49
+ "@public-ui/components": "3.0.0-37e952f54ae220a836264edf844556a2c45116ea.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@public-ui/components": "3.0.0-0a564237c37a5d1ca12470bdd73e4ea1eac06982.0"
52
+ "@public-ui/components": "3.0.0-37e952f54ae220a836264edf844556a2c45116ea.0"
53
53
  },
54
54
  "sideEffects": false,
55
55
  "type": "commonjs",