@patternfly/pfe-core
Advanced tools
Comparing version 2.0.0-next.3 to 2.0.0-next.4
@@ -1,2 +0,2 @@ | ||
function x(e,t){return{name:e,initialValue:t}}var n=class extends Event{constructor(t,o,l){super("context-request",{bubbles:!0,composed:!0});this.context=t;this.callback=o;this.multiple=l}};export{n as ContextEvent,x as createContext}; | ||
function r(e,t){return{name:e,initialValue:t}}var n=class extends Event{constructor(o,l,x){super("context-request",{bubbles:!0,composed:!0});this.context=o;this.callback=l;this.multiple=x}};export{n as ContextEvent,r as createContext}; | ||
//# sourceMappingURL=context.js.map |
@@ -1,2 +0,2 @@ | ||
var p=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var h=(a,t,e,s)=>{for(var i=s>1?void 0:s?l(t,e):t,o=a.length-1,r;o>=0;o--)(r=a[o])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&p(t,e,i),i};import{bound as d}from"../decorators/bound.js";import{debounce as f}from"../functions/debounce.js";import{Logger as g}from"./logger.js";var n=class{constructor(t,e){this.host=t;this.options=e;this.mo=new MutationObserver(this.parse);this.cache=new Map;this.class=t.constructor,this.logger=new g(this.host),n.instances.set(t,this);let s=this.options?.properties??{};for(let[i,o]of Object.entries(s))this.initProp(i,o);t.addController(this),this.cascadeProperties=f(this.cascadeProperties,1)}hostUpdated(){this.cascadeProperties()}hostConnected(){this.mo.observe(this.host,{attributes:!0,childList:!0}),this.cascadeProperties()}hostDisconnected(){this.mo.disconnect()}cascadeProperties(t=this.host.children){if(this.host.isConnected){let e=this.cache.keys();if(!t)return this._cascadeAttributes(e,this.cache);for(let s of t)if(s instanceof Element){for(let i of e)if(s.matches(i)){let o=this.cache.get(i);for(let r of o??[])this._copyAttribute(r,s)}}}}initProp(t,e){for(let s of[e].flat(1/0).filter(Boolean)){let{attribute:i}=this.class.getPropertyOptions(t),o=typeof i=="string"?i:t.toLowerCase();this.cache.get(s)?this.cache.get(s)?.push(o):this.cache.set(s,[o])}}parse(t){for(let e of t??[])e.type==="childList"&&e.addedNodes.length?this.cascadeProperties(e.addedNodes):e.type==="attributes"&&this._cascadeAttributes(this.cache.keys(),this.cache)}async _copyAttribute(t,e){this.logger.log(`copying ${t} to ${e}`);let s=this.host.getAttribute(t);e.isConnected&&(s==null?e.removeAttribute(t):e.setAttribute(t,s))}_cascadeAttributes(t,e){for(let s of t)for(let i of e.get(s)??[])this._cascadeAttribute(i,s)}_cascadeAttribute(t,e){let s=[...this.host.querySelectorAll(e),...this.host.shadowRoot?.querySelectorAll(e)??[]];for(let i of s)this._copyAttribute(t,i)}},c=n;c.instances=new WeakMap,h([d],c.prototype,"parse",1);export{c as CascadeController}; | ||
var p=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var h=(a,t,e,s)=>{for(var i=s>1?void 0:s?l(t,e):t,o=a.length-1,r;o>=0;o--)(r=a[o])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&p(t,e,i),i};import{bound as f}from"../decorators/bound.js";import{debounce as d}from"../functions/debounce.js";import{Logger as g}from"./logger.js";var n=class{constructor(t,e){this.host=t;this.options=e;this.mo=new MutationObserver(this.parse);this.cache=new Map;this.class=t.constructor,this.logger=new g(this.host),n.instances.set(t,this);let s=this.options?.properties??{};for(let[i,o]of Object.entries(s))this.initProp(i,o);t.addController(this),this.cascadeProperties=d(this.cascadeProperties,1)}hostUpdated(){this.cascadeProperties()}hostConnected(){this.mo.observe(this.host,{attributes:!0,childList:!0}),this.cascadeProperties()}hostDisconnected(){this.mo.disconnect()}cascadeProperties(t=this.host.children){if(this.host.isConnected){let e=this.cache.keys();if(!t)return this._cascadeAttributes(e,this.cache);for(let s of t)if(s instanceof Element){for(let i of e)if(s.matches(i)){let o=this.cache.get(i);for(let r of o??[])this._copyAttribute(r,s)}}}}initProp(t,e){for(let s of[e].flat(1/0).filter(Boolean)){let{attribute:i}=this.class.getPropertyOptions(t),o=typeof i=="string"?i:t.toLowerCase();this.cache.get(s)?this.cache.get(s)?.push(o):this.cache.set(s,[o])}}parse(t){for(let e of t??[])e.type==="childList"&&e.addedNodes.length?this.cascadeProperties(e.addedNodes):e.type==="attributes"&&this._cascadeAttributes(this.cache.keys(),this.cache)}async _copyAttribute(t,e){this.logger.log(`copying ${t} to ${e}`);let s=this.host.getAttribute(t);e.isConnected&&(s==null?e.removeAttribute(t):e.setAttribute(t,s))}_cascadeAttributes(t,e){for(let s of t)for(let i of e.get(s)??[])this._cascadeAttribute(i,s)}_cascadeAttribute(t,e){let s=[...this.host.querySelectorAll(e),...this.host.shadowRoot?.querySelectorAll(e)??[]];for(let i of s)this._copyAttribute(t,i)}},c=n;c.instances=new WeakMap,h([f],c.prototype,"parse",1);export{c as CascadeController}; | ||
//# sourceMappingURL=cascade-controller.js.map |
@@ -1,2 +0,2 @@ | ||
import{Logger as e}from"./logger.js";var o=class{constructor(t,i,s){this.host=t;this.options=s;this.initializer=i.bind(t),this.mo=new MutationObserver(this.initializer),this.logger=new e(this.host),t.addController(this)}hostConnected(){this.hasLightDOM()?this.initializer():this.options?.emptyWarning&&this.logger.warn(this.options?.emptyWarning),this.initObserver()}hostDisconnected(){this.mo.disconnect()}initObserver(){(this.options?.observe??!0)&&this.mo.observe(this.host,typeof this.options?.observe!="object"?{childList:!0}:this.options?.observe)}hasLightDOM(){return this.host.children.length>0||(this.host.textContent??"").trim().length>0}};export{o as LightDOMController}; | ||
import{Logger as o}from"./logger.js";var i=class{constructor(t,e,s){this.host=t;this.options=s;this.initializer=e.bind(t),this.mo=new MutationObserver(this.initializer),this.logger=new o(this.host),t.addController(this)}hostConnected(){this.hasLightDOM()?this.initializer():this.options?.emptyWarning&&this.logger.warn(this.options?.emptyWarning),this.initObserver()}hostDisconnected(){this.mo.disconnect()}initObserver(){(this.options?.observe??!0)&&this.mo.observe(this.host,typeof this.options?.observe!="object"?{childList:!0}:this.options?.observe)}hasLightDOM(){return this.host.children.length>0||(this.host.textContent??"").trim().length>0}};export{i as LightDOMController}; | ||
//# sourceMappingURL=light-dom-controller.js.map |
@@ -1,2 +0,2 @@ | ||
var e=class{constructor(t){this.host=t;if(e.instances.get(t))return e.instances.get(t);t.addController(this),e.instances.set(t,this)}get prefix(){return`[${this.host.localName}${this.host.id?`#${this.host.id}`:""}]`}static debugLog(t=null){try{return t!==null&&(e.logDebug=!!t,localStorage.pfeLog=!!t),localStorage.pfeLog==="true"}catch{return e.logDebug}}static log(...t){e.debugLog()&&console.log(...t)}static warn(...t){console.warn(...t)}static error(...t){throw new Error([...t].join(" "))}log(...t){e.log(this.prefix,...t)}warn(...t){e.warn(this.prefix,...t)}error(...t){e.error(this.prefix,...t)}hostConnected(){this.log("connected")}},n=e;n.instances=new WeakMap;export{n as Logger}; | ||
var e=class{constructor(t){this.host=t;if(e.instances.get(t))return e.instances.get(t);t.addController(this),e.instances.set(t,this)}get prefix(){return`[${this.host.localName}${this.host.id?`#${this.host.id}`:""}]`}static debugLog(t=null){try{return t!==null&&(e.logDebug=!!t,localStorage.pfeLog=!!t),localStorage.pfeLog==="true"}catch{return e.logDebug}}static log(...t){e.debugLog()&&console.log(...t)}static warn(...t){console.warn(...t)}static error(...t){console.error([...t].join(" "))}log(...t){e.log(this.prefix,...t)}warn(...t){e.warn(this.prefix,...t)}error(...t){e.error(this.prefix,...t)}hostConnected(){this.log("connected")}},n=e;n.instances=new WeakMap;export{n as Logger}; | ||
//# sourceMappingURL=logger.js.map |
@@ -1,2 +0,2 @@ | ||
import{getRandomId as r}from"../functions/random.js";var a=class{constructor(e){this.host=e;this.hasMeasured=!1;e.addController(this),e.id?e.id.startsWith("pfe-")&&!e.id.startsWith(e.localName)?this.markId=e.id.replace("pfe",e.localName):this.markId=`${e.localName}-${e.id}`:this.markId=r(e.localName),performance.mark(`${this.markId}-defined`)}hostUpdate(){this.hasMeasured||this.measure()}measure(){this.hasMeasured=!0,performance.mark(`${this.markId}-rendered`),performance.measure(`${this.markId}-from-navigation-to-first-render`,void 0,`${this.markId}-rendered`),performance.measure(`${this.markId}-from-defined-to-first-render`,`${this.markId}-defined`,`${this.markId}-rendered`),this.host.removeController(this)}};export{a as PerfController}; | ||
import{getRandomId as a}from"../functions/random.js";var r=class{constructor(e){this.host=e;this.hasMeasured=!1;e.addController(this),e.id?e.id.startsWith("pfe-")&&!e.id.startsWith(e.localName)?this.markId=e.id.replace("pfe",e.localName):this.markId=`${e.localName}-${e.id}`:this.markId=a(e.localName),performance.mark(`${this.markId}-defined`)}hostUpdate(){this.hasMeasured||this.measure()}measure(){this.hasMeasured=!0,performance.mark(`${this.markId}-rendered`),performance.measure(`${this.markId}-from-navigation-to-first-render`,void 0,`${this.markId}-rendered`),performance.measure(`${this.markId}-from-defined-to-first-render`,`${this.markId}-defined`,`${this.markId}-rendered`),this.host.removeController(this)}};export{r as PerfController}; | ||
//# sourceMappingURL=perf-controller.js.map |
@@ -1,2 +0,2 @@ | ||
var l=Symbol("observed properties controller"),t=class{constructor(e){this.host=e;this.values=new Map;if(t.hosts.get(e))return t.hosts.get(e);e.addController(this),e[l]=this}delete(e){this.values.delete(e)}hostUpdate(){for(let[e,[r,[o,s]]]of this.values)this.host[r]?.(o,s),this.delete(e)}hostUpdated(){this.host.removeController(this)}cache(e,r,...o){this.values.set(e,[r,o])}},a=t;a.hosts=new WeakMap;export{a as PropertyObserverController,l as observedController}; | ||
var l=Symbol("observed properties controller"),t=class{constructor(e){this.host=e;this.values=new Map;if(t.hosts.get(e))return t.hosts.get(e);e.addController(this),e[l]=this}delete(e){this.values.delete(e)}hostUpdate(){for(let[e,[o,[r,s]]]of this.values)this.host[o]?.(r,s),this.delete(e)}hostUpdated(){this.host.removeController(this)}cache(e,o,...r){this.values.set(e,[o,r])}},a=t;a.hosts=new WeakMap;export{a as PropertyObserverController,l as observedController}; | ||
//# sourceMappingURL=property-observer-controller.js.map |
@@ -1,2 +0,2 @@ | ||
var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=(i,t,e,o)=>{for(var s=o>1?void 0:o?m(t,e):t,n=i.length-1,r;n>=0;n--)(r=i[n])&&(s=(o?r(t,e,s):r(s))||s);return o&&s&&c(t,e,s),s};import{bound as h}from"../decorators/bound.js";import{Logger as g}from"./logger.js";function u(i){return i.length===1&&i[0]!==null}var p=i=>t=>i===l.anonymous?!t.hasAttribute("slot"):t.getAttribute("slot")===i,d=class{constructor(t,...e){this.host=t;this.nodes=new Map;this.firstUpdated=!1;this.mo=new MutationObserver(this.onMutation);this.deprecations={};if(this.logger=new g(this.host),u(e)){let[{slots:o,deprecations:s}]=e;this.slotNames=o,this.deprecations=s??{}}else e.length>1?(this.slotNames=e,this.deprecations={}):this.slotNames=[null];t.addController(this)}hostConnected(){this.host.addEventListener("slotchange",this.onSlotChange),this.firstUpdated=!1,this.mo.observe(this.host,{childList:!0}),this.init()}hostUpdated(){this.firstUpdated||(this.slotNames.forEach(this.initSlot),this.firstUpdated=!0)}hostDisconnected(){this.mo.disconnect()}hasSlotted(...t){return t.length?t.some(e=>this.nodes.get(e)?.hasContent??!1):(this.logger.warn("Please provide at least one slot name for which to search."),!1)}getSlotted(...t){return t.length?t.flatMap(e=>this.nodes.get(e)?.elements??[]):this.nodes.get(d.anonymous)?.elements??[]}onSlotChange(t){let e=t.target.name;this.initSlot(e),this.host.requestUpdate()}async onMutation(t){let e=[];for(let{addedNodes:o,removedNodes:s}of t)for(let n of[...o,...s])n instanceof HTMLElement&&n.slot&&(this.initSlot(n.slot),e.push(n.slot));e.length&&this.host.requestUpdate()}getChildrenForSlot(t){return Array.from(this.host.children).filter(p(t))}initSlot(t){let e=t||d.anonymous,o=this.nodes.get(e)?.slot?.assignedElements?.()??this.getChildrenForSlot(e),s=t?`slot[name="${t}"]`:"slot:not([name])",n=this.host.shadowRoot?.querySelector?.(s)??null,r=!!o.length;this.nodes.set(e,{elements:o,name:t??"",hasContent:r,slot:n}),this.logger.log(t,r)}init(){this.nodes.clear(),this.slotNames.forEach(this.initSlot),Object.values(this.deprecations).forEach(this.initSlot),this.host.requestUpdate()}},l=d;l.anonymous=Symbol("anonymous slot"),a([h],l.prototype,"onSlotChange",1),a([h],l.prototype,"onMutation",1),a([h],l.prototype,"initSlot",1),a([h],l.prototype,"init",1);export{l as SlotController}; | ||
var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var a=(i,t,e,n)=>{for(var s=n>1?void 0:n?m(t,e):t,o=i.length-1,r;o>=0;o--)(r=i[o])&&(s=(n?r(t,e,s):r(s))||s);return n&&s&&c(t,e,s),s};import{bound as h}from"../decorators/bound.js";import{Logger as g}from"./logger.js";function u(i){return i.length===1&&i[0]!==null}var p=i=>t=>i===l.anonymous?!t.hasAttribute("slot"):t.getAttribute("slot")===i,d=class{constructor(t,...e){this.host=t;this.nodes=new Map;this.firstUpdated=!1;this.mo=new MutationObserver(this.onMutation);this.deprecations={};if(this.logger=new g(this.host),u(e)){let[{slots:n,deprecations:s}]=e;this.slotNames=n,this.deprecations=s??{}}else e.length>1?(this.slotNames=e,this.deprecations={}):this.slotNames=[null];t.addController(this)}hostConnected(){this.host.addEventListener("slotchange",this.onSlotChange),this.firstUpdated=!1,this.mo.observe(this.host,{childList:!0}),this.init()}hostUpdated(){this.firstUpdated||(this.slotNames.forEach(this.initSlot),this.firstUpdated=!0)}hostDisconnected(){this.mo.disconnect()}hasSlotted(...t){return t.length?t.some(e=>this.nodes.get(e)?.hasContent??!1):(this.logger.warn("Please provide at least one slot name for which to search."),!1)}getSlotted(...t){return t.length?t.flatMap(e=>this.nodes.get(e)?.elements??[]):this.nodes.get(d.anonymous)?.elements??[]}onSlotChange(t){let e=t.target.name;this.initSlot(e),this.host.requestUpdate()}async onMutation(t){let e=[];for(let{addedNodes:n,removedNodes:s}of t)for(let o of[...n,...s])o instanceof HTMLElement&&o.slot&&(this.initSlot(o.slot),e.push(o.slot));e.length&&this.host.requestUpdate()}getChildrenForSlot(t){return Array.from(this.host.children).filter(p(t))}initSlot(t){let e=t||d.anonymous,n=this.nodes.get(e)?.slot?.assignedElements?.()??this.getChildrenForSlot(e),s=t?`slot[name="${t}"]`:"slot:not([name])",o=this.host.shadowRoot?.querySelector?.(s)??null,r=!!n.length;this.nodes.set(e,{elements:n,name:t??"",hasContent:r,slot:o}),this.logger.log(t,r)}init(){this.nodes.clear(),this.slotNames.forEach(this.initSlot),Object.values(this.deprecations).forEach(this.initSlot),this.host.requestUpdate()}},l=d;l.anonymous=Symbol("anonymous slot"),a([h],l.prototype,"onSlotChange",1),a([h],l.prototype,"onMutation",1),a([h],l.prototype,"initSlot",1),a([h],l.prototype,"init",1);export{l as SlotController}; | ||
//# sourceMappingURL=slot-controller.js.map |
@@ -1,2 +0,2 @@ | ||
import{getCompatibleStyle as l,supportsAdoptingStyleSheets as r}from"lit";var n=class{constructor(t,e){this.host=t;this.styles=e;this.stylesAdopted=!1;t.addController(this)}hostConnected(){if(this.stylesAdopted||!(this.host.renderRoot instanceof ShadowRoot))return;let t=[this.styles].flatMap(e=>l(e)).filter(e=>!!e);r?this.host.renderRoot.adoptedStyleSheets=[...this.host.renderRoot.adoptedStyleSheets??[],...t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet)]:t.forEach(e=>{let o=document.createElement("style"),s=window.litNonce;s!==void 0&&o.setAttribute("nonce",s),o.textContent=e.cssText,this.host.renderRoot.appendChild(o)}),this.stylesAdopted=!0}};export{n as StyleController}; | ||
import{getCompatibleStyle as i,supportsAdoptingStyleSheets as n}from"lit";var l=class{constructor(t,e){this.host=t;this.styles=e;this.stylesAdopted=!1;t.addController(this)}hostConnected(){if(this.stylesAdopted||!(this.host.renderRoot instanceof ShadowRoot))return;let t=[this.styles].flatMap(e=>i(e)).filter(e=>!!e);n?this.host.renderRoot.adoptedStyleSheets=[...t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet),...this.host.renderRoot.adoptedStyleSheets??[]]:t.forEach(e=>{let s=document.createElement("style"),o=window.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,this.host.renderRoot.appendChild(s)}),this.stylesAdopted=!0}};export{l as StyleController}; | ||
//# sourceMappingURL=style-controller.js.map |
import type { ComplexAttributeConverter } from 'lit'; | ||
export type { ColorPalette, ColorTheme } from './controllers/color-context.js'; | ||
/** PatternFly Elements global config object */ | ||
@@ -11,4 +12,2 @@ export interface PfeConfig { | ||
} | ||
export declare type ColorTheme = ('base' | 'accent' | 'complement' | 'lighter' | 'lightest' | 'darker' | 'darkest'); | ||
export declare type ContextTheme = ('dark' | 'light' | 'saturated'); | ||
declare const noPref: unique symbol; | ||
@@ -39,2 +38,1 @@ /** | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
var o=Symbol();function r(e){return document.head.querySelector(`meta[name="${e}"]`)?.content}function f(e=o){return e!==o&&(window.PfeConfig.trackPerformance=!!e),window.PfeConfig.trackPerformance}var l={fromAttribute(e){return typeof e!="string"?null:e.split(",").map(t=>t.trim()).map(t=>parseInt(t,10))},toAttribute(e){return e.join(",")}},i=class extends Event{constructor(t,a){super(t,{bubbles:!0,composed:!0,...a})}},n=document.body.hasAttribute("no-auto-reveal");window.PfeConfig=Object.assign(window.PfeConfig??{},{trackPerformance:window.PfeConfig?.trackPerformance??r("pfe-track-performance")==="true",autoReveal:window.PfeConfig?.autoReveal??(n?!n:r("pfe-auto-reveal")==="true"),get log(){return!!localStorage.pfeLog},set log(e){e?localStorage.setItem("pfeLog",`${!0}`):localStorage.removeItem("pfeLog")}});export{i as ComposedEvent,l as NumberListConverter,f as trackPerformance}; | ||
var o=Symbol();function r(e){return document.head.querySelector(`meta[name="${e}"]`)?.content}function l(e=o){return e!==o&&(window.PfeConfig.trackPerformance=!!e),window.PfeConfig.trackPerformance}var i={fromAttribute(e){return typeof e!="string"?null:e.split(",").map(t=>t.trim()).map(t=>parseInt(t,10))},toAttribute(e){return e.join(",")}},n=class extends Event{constructor(t,f){super(t,{bubbles:!0,composed:!0,...f})}},a=document.body.hasAttribute("no-auto-reveal");window.PfeConfig=Object.assign(window.PfeConfig??{},{trackPerformance:window.PfeConfig?.trackPerformance??r("pfe-track-performance")==="true",autoReveal:window.PfeConfig?.autoReveal??(a?!a:r("pfe-auto-reveal")==="true"),get log(){return!!localStorage.pfeLog},set log(e){e?localStorage.setItem("pfeLog",`${!0}`):localStorage.removeItem("pfeLog")}});export{n as ComposedEvent,i as NumberListConverter,l as trackPerformance}; | ||
//# sourceMappingURL=core.js.map |
export * from './decorators/bound.js'; | ||
export * from './decorators/cascades.js'; | ||
export * from './decorators/color-context.js'; | ||
export * from './decorators/deprecation.js'; | ||
export * from './decorators/initializer.js'; | ||
@@ -4,0 +6,0 @@ export * from './decorators/observed.js'; |
@@ -1,2 +0,2 @@ | ||
export*from"./decorators/bound.js";export*from"./decorators/cascades.js";export*from"./decorators/initializer.js";export*from"./decorators/observed.js";export*from"./decorators/pfelement.js";export*from"./decorators/time.js";export*from"./decorators/trace.js"; | ||
export*from"./decorators/bound.js";export*from"./decorators/cascades.js";export*from"./decorators/color-context.js";export*from"./decorators/deprecation.js";export*from"./decorators/initializer.js";export*from"./decorators/observed.js";export*from"./decorators/pfelement.js";export*from"./decorators/time.js";export*from"./decorators/trace.js"; | ||
//# sourceMappingURL=decorators.js.map |
@@ -0,1 +1,5 @@ | ||
export interface PfelementOptions { | ||
className: string; | ||
attribute: string; | ||
} | ||
/** | ||
@@ -6,2 +10,2 @@ * Adds pfelement APIs to the decorated custom-element class | ||
*/ | ||
export declare function pfelement(): ClassDecorator; | ||
export declare function pfelement(options?: PfelementOptions): ClassDecorator; |
@@ -1,2 +0,2 @@ | ||
import{trackPerformance as i}from"../core.js";import{ColorContextController as l}from"../controllers/color-context-controller.js";import{PerfController as a}from"../controllers/perf-controller.js";function m(t){return typeof t.addInitializer=="function"}var r=!1,o=new Set;async function f(t){if(o.add(t),!r){for(r=!0;o.size;){let e=[];for(let n of o)e.push(n.updateComplete),o.delete(n);await Promise.all(e)}document.body.removeAttribute("unresolved")}}function d(){return function(t){if(!m(t))throw new Error(`@pfelement may only decorate ReactiveElements. ${t.name} is does not implement ReactiveElement.`);t.addInitializer(e=>{window.PfeConfig.autoReveal&&f(e),e.addController({hostConnected(){e.setAttribute("pfelement",""),e.classList.add("PFElement")}}),new l(e),i()&&new a(e)})}}export{d as pfelement}; | ||
import{trackPerformance as l}from"../core.js";import{PerfController as s}from"../controllers/perf-controller.js";function m(e){return typeof e.addInitializer=="function"}var a=!1,i=new Set;async function f(e){if(i.add(e),!a){for(a=!0;i.size;){let n=[];for(let o of i)n.push(o.updateComplete),i.delete(o);await Promise.all(n)}document.body.removeAttribute("unresolved")}}function d(e){let n=e?.attribute??"pfelement",o=e?.className??"PFElement";return function(r){if(!m(r))throw new Error(`@pfelement may only decorate ReactiveElements. ${r.name} is does not implement ReactiveElement.`);r.addInitializer(t=>{window.PfeConfig.autoReveal&&f(t),t.addController({hostConnected(){t.setAttribute(n,""),t.classList.add(o)}}),l()&&new s(t)})}}export{d as pfelement}; | ||
//# sourceMappingURL=pfelement.js.map |
{ | ||
"name": "@patternfly/pfe-core", | ||
"version": "2.0.0-next.3", | ||
"version": "2.0.0-next.4", | ||
"license": "MIT", | ||
@@ -17,3 +17,3 @@ "description": "PatternFly Elements Core Library", | ||
"./controllers/cascade-controller.js": "./controllers/cascade-controller.js", | ||
"./controllers/color-context-controller.js": "./controllers/color-context-controller.js", | ||
"./controllers/color-context.js": "./controllers/color-context.js", | ||
"./controllers/css-variable-controller.js": "./controllers/css-variable-controller.js", | ||
@@ -28,2 +28,4 @@ "./controllers/light-dom-controller.js": "./controllers/light-dom-controller.js", | ||
"./decorators/cascades.js": "./decorators/cascades.js", | ||
"./decorators/color-context.js": "./decorators/color-context.js", | ||
"./decorators/deprecation.js": "./decorators/deprecation.js", | ||
"./decorators/initializer.js": "./decorators/initializer.js", | ||
@@ -30,0 +32,0 @@ "./decorators/observed.js": "./decorators/observed.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126890
77
687