@proximus/lavender-common 2.0.0-alpha.203 → 2.0.0-alpha.204

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.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './common';
2
2
  export * from './breakpoints';
3
+ export * from './template';
package/dist/index.es.js CHANGED
@@ -768,6 +768,21 @@ var J = class {
768
768
  set attributeValue(e) {
769
769
  this._attributeValue = e, this.setCSSProperties();
770
770
  }
771
- };
771
+ }, Y = /* @__PURE__ */ new Map(), X = 500;
772
+ function Z(e) {
773
+ let t = document.createElement("template");
774
+ return t.innerHTML = e, t;
775
+ }
776
+ function Q(e) {
777
+ return Z(e);
778
+ }
779
+ function $(e) {
780
+ let t = Y.get(e);
781
+ return t || (t = Z(e), Y.size < X && Y.set(e, t)), t;
782
+ }
783
+ function ee(e, t) {
784
+ let n = typeof t == "string" ? $(t) : t;
785
+ e.replaceChildren(document.importNode(n.content, !0));
786
+ }
772
787
  //#endregion
773
- export { J as AttributeBreakpointHandlerDelegate, d as PxElement, f as VerticallyExtendedElement, u as WithExtraAttributes, c as WrappedInteractiveStateController, U as accessibilityAttributes, z as addGlobalStylesheet, R as assetContainerImgWidthValues, j as backgroundColorValues, M as backgroundSizeValues, K as booleanPropertyToAttributeSetter, k as borderColorValues, O as borderRadiusValues, A as borderSideValues, D as borderValues, N as boxShadowValues, H as checkName, x as colorValues, h as cssGridAlignSelfValues, _ as cssGridColSpanValues, g as cssGridJustifySelfValues, v as cssGridOrderValues, y as cssGridPlaceSelfValues, q as cssTokenBreakpoints, m as flexboxAlignSelfValues, b as fontsizeValues, S as fontweightValues, I as gapValues, n as getSupportedAttributeNames, t as getSupportedPropertyNames, V as getViewportFormat, F as gradientValues, p as gridGapValues, P as headingValues, C as iconSizeValues, w as iconSizeValuesKC, o as isComponentDebug, B as isFalsy, s as log, L as noBorderRadiusValues, E as paddingValues, G as propertyToAttributeSetter, T as textalignValues, W as transferAccessibilityAttributes };
788
+ export { J as AttributeBreakpointHandlerDelegate, d as PxElement, f as VerticallyExtendedElement, u as WithExtraAttributes, c as WrappedInteractiveStateController, U as accessibilityAttributes, z as addGlobalStylesheet, R as assetContainerImgWidthValues, j as backgroundColorValues, M as backgroundSizeValues, K as booleanPropertyToAttributeSetter, k as borderColorValues, O as borderRadiusValues, A as borderSideValues, D as borderValues, N as boxShadowValues, H as checkName, x as colorValues, Q as createTemplate, h as cssGridAlignSelfValues, _ as cssGridColSpanValues, g as cssGridJustifySelfValues, v as cssGridOrderValues, y as cssGridPlaceSelfValues, q as cssTokenBreakpoints, m as flexboxAlignSelfValues, b as fontsizeValues, S as fontweightValues, I as gapValues, n as getSupportedAttributeNames, t as getSupportedPropertyNames, $ as getTemplate, V as getViewportFormat, F as gradientValues, p as gridGapValues, P as headingValues, C as iconSizeValues, w as iconSizeValuesKC, o as isComponentDebug, B as isFalsy, s as log, L as noBorderRadiusValues, E as paddingValues, G as propertyToAttributeSetter, ee as renderTemplate, T as textalignValues, W as transferAccessibilityAttributes };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Declares a static template. Call it once, at module level, with a plain
3
+ * template literal: the build (scripts/vite-plugin-minify-templates.js)
4
+ * strips the whitespace between tags so clones contain no empty text nodes.
5
+ */
6
+ export declare function createTemplate(html: string): HTMLTemplateElement;
7
+ export declare function getTemplate(html: string): HTMLTemplateElement;
8
+ /**
9
+ * Drop-in replacement for `root.innerHTML = html`: replaces the children of
10
+ * `root` with a clone of the parsed template.
11
+ * `importNode` creates the nodes in the current document, so nested custom
12
+ * elements are upgraded synchronously, exactly like with `innerHTML`.
13
+ */
14
+ export declare function renderTemplate(root: ShadowRoot | Element | DocumentFragment, template: HTMLTemplateElement | string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-common",
3
- "version": "2.0.0-alpha.203",
3
+ "version": "2.0.0-alpha.204",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",