aptechka 0.90.2 → 0.90.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.
@@ -1,4 +1,4 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var _dummyElement,_CSSUnitParser_instances,createDummy_fn;const _CSSUnitParser=class _CSSUnitParser{constructor(){__privateAdd(this,_CSSUnitParser_instances);__privateAdd(this,_dummyElement,null)}parse(value){if(!value)return;__privateMethod(this,_CSSUnitParser_instances,createDummy_fn).call(this),__privateGet(this,_dummyElement).style.left=value;const computedWidth=getComputedStyle(__privateGet(this,_dummyElement)).getPropertyValue("left");return parseFloat(computedWidth)}};_dummyElement=new WeakMap,_CSSUnitParser_instances=new WeakSet,createDummy_fn=__name(function(){__privateGet(this,_dummyElement)||(__privateSet(this,_dummyElement,document.createElement("div")),__privateGet(this,_dummyElement).style.cssText=`
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var _dummyElement,_CSSUnitParser_instances,createDummy_fn;const _CSSUnitParser=class _CSSUnitParser{constructor(){__privateAdd(this,_CSSUnitParser_instances);__privateAdd(this,_dummyElement,null)}parse(value,element){if(!value)return;__privateMethod(this,_CSSUnitParser_instances,createDummy_fn).call(this),element?(__privateGet(this,_dummyElement).style.width=element.offsetWidth+"px",__privateGet(this,_dummyElement).style.height=element.offsetHeight+"px"):(__privateGet(this,_dummyElement).style.width="0",__privateGet(this,_dummyElement).style.height="0"),__privateGet(this,_dummyElement).style.left=value;const computedWidth=getComputedStyle(__privateGet(this,_dummyElement)).getPropertyValue("left");return parseFloat(computedWidth)}};_dummyElement=new WeakMap,_CSSUnitParser_instances=new WeakSet,createDummy_fn=__name(function(){__privateGet(this,_dummyElement)||(__privateSet(this,_dummyElement,document.createElement("div")),__privateGet(this,_dummyElement).style.cssText=`
2
2
  position: fixed;
3
3
  top: 0;
4
4
  left: 0;
@@ -1,6 +1,6 @@
1
1
  declare class CSSUnitParser {
2
2
  #private;
3
- parse(value?: string): number | undefined;
3
+ parse(value?: string, element?: HTMLElement): number | undefined;
4
4
  }
5
5
  export declare const cssUnitParser: CSSUnitParser;
6
6
  export {};
@@ -11,10 +11,10 @@ const _CSSUnitParser = class _CSSUnitParser {
11
11
  __privateAdd(this, _CSSUnitParser_instances);
12
12
  __privateAdd(this, _dummyElement, null);
13
13
  }
14
- parse(value) {
14
+ parse(value, element) {
15
15
  if (!value)
16
16
  return;
17
- __privateMethod(this, _CSSUnitParser_instances, createDummy_fn).call(this), __privateGet(this, _dummyElement).style.left = value;
17
+ __privateMethod(this, _CSSUnitParser_instances, createDummy_fn).call(this), element ? (__privateGet(this, _dummyElement).style.width = element.offsetWidth + "px", __privateGet(this, _dummyElement).style.height = element.offsetHeight + "px") : (__privateGet(this, _dummyElement).style.width = "0", __privateGet(this, _dummyElement).style.height = "0"), __privateGet(this, _dummyElement).style.left = value;
18
18
  const computedWidth = getComputedStyle(__privateGet(this, _dummyElement)).getPropertyValue(
19
19
  "left"
20
20
  );
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cssUnitParser_index=require("../css-unit-parser/index.cjs"),Viewport=require("../Viewport-Blxv_yl_.cjs"),_CSSValueParser=class _CSSValueParser{parse(value,element){var _a;const num=parseFloat(value),isNumber=!isNaN(num),unit=isNumber?(_a=value.match(/[a-z]+$/i))==null?void 0:_a[0]:void 0;return isNumber&&!unit?num:unit?unit==="px"?num:unit==="oh"?((element==null?void 0:element.offsetHeight)||0)*(num/100):unit==="ow"?((element==null?void 0:element.offsetWidth)||0)*(num/100):unit==="ohmh"?(((element==null?void 0:element.offsetHeight)||0)-Viewport.viewport.height)*(num/100):unit==="owmw"?(((element==null?void 0:element.offsetWidth)||0)-Viewport.viewport.width)*(num/100):unit&&_CSSValueParser.CSS_UNITS.has(unit)?cssUnitParser_index.cssUnitParser.parse(value):value:value.includes("calc")?value.includes("raw!")?value.replace("raw!",""):cssUnitParser_index.cssUnitParser.parse(value):value==="true"?!0:value==="false"?!1:value}};__name(_CSSValueParser,"CSSValueParser"),_CSSValueParser.CSS_UNITS=new Set(["px","rem","vw","vh","vmin","vmax","em","cm","mm","Q","in","pc","pt","ex","ch","lh","rlh","vb","vi","svw","svh","lvw","lvh","dvw","dvh"]);let CSSValueParser=_CSSValueParser;const cssValueParser=new CSSValueParser;exports.cssValueParser=cssValueParser;
1
+ "use strict";var __defProp=Object.defineProperty;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cssUnitParser_index=require("../css-unit-parser/index.cjs"),Viewport=require("../Viewport-Blxv_yl_.cjs"),_CSSValueParser=class _CSSValueParser{parse(value,element){var _a;const num=parseFloat(value),isNumber=!isNaN(num),unit=isNumber?(_a=value.match(/[a-z]+$/i))==null?void 0:_a[0]:void 0;return isNumber&&!unit?num:unit?unit==="px"?num:unit==="oh"?((element==null?void 0:element.offsetHeight)||0)*(num/100):unit==="ow"?((element==null?void 0:element.offsetWidth)||0)*(num/100):unit==="ohmh"?(((element==null?void 0:element.offsetHeight)||0)-Viewport.viewport.height)*(num/100):unit==="owmw"?(((element==null?void 0:element.offsetWidth)||0)-Viewport.viewport.width)*(num/100):unit&&_CSSValueParser.CSS_UNITS.has(unit)?cssUnitParser_index.cssUnitParser.parse(value,element):value:value.includes("calc")?value.includes("raw!")?value.replace("raw!",""):cssUnitParser_index.cssUnitParser.parse(value):value==="true"?!0:value==="false"?!1:value}};__name(_CSSValueParser,"CSSValueParser"),_CSSValueParser.CSS_UNITS=new Set(["px","rem","vw","vh","vmin","vmax","em","cm","mm","Q","in","pc","pt","ex","ch","lh","rlh","vb","vi","svw","svh","lvw","lvh","dvw","dvh"]);let CSSValueParser=_CSSValueParser;const cssValueParser=new CSSValueParser;exports.cssValueParser=cssValueParser;
@@ -6,7 +6,7 @@ const _CSSValueParser = class _CSSValueParser {
6
6
  parse(value, element) {
7
7
  var _a;
8
8
  const num = parseFloat(value), isNumber = !isNaN(num), unit = isNumber ? (_a = value.match(/[a-z]+$/i)) == null ? void 0 : _a[0] : void 0;
9
- return isNumber && !unit ? num : unit ? unit === "px" ? num : unit === "oh" ? ((element == null ? void 0 : element.offsetHeight) || 0) * (num / 100) : unit === "ow" ? ((element == null ? void 0 : element.offsetWidth) || 0) * (num / 100) : unit === "ohmh" ? (((element == null ? void 0 : element.offsetHeight) || 0) - viewport.height) * (num / 100) : unit === "owmw" ? (((element == null ? void 0 : element.offsetWidth) || 0) - viewport.width) * (num / 100) : unit && _CSSValueParser.CSS_UNITS.has(unit) ? cssUnitParser.parse(value) : value : value.includes("calc") ? value.includes("raw!") ? value.replace("raw!", "") : cssUnitParser.parse(value) : value === "true" ? !0 : value === "false" ? !1 : value;
9
+ return isNumber && !unit ? num : unit ? unit === "px" ? num : unit === "oh" ? ((element == null ? void 0 : element.offsetHeight) || 0) * (num / 100) : unit === "ow" ? ((element == null ? void 0 : element.offsetWidth) || 0) * (num / 100) : unit === "ohmh" ? (((element == null ? void 0 : element.offsetHeight) || 0) - viewport.height) * (num / 100) : unit === "owmw" ? (((element == null ? void 0 : element.offsetWidth) || 0) - viewport.width) * (num / 100) : unit && _CSSValueParser.CSS_UNITS.has(unit) ? cssUnitParser.parse(value, element) : value : value.includes("calc") ? value.includes("raw!") ? value.replace("raw!", "") : cssUnitParser.parse(value) : value === "true" ? !0 : value === "false" ? !1 : value;
10
10
  }
11
11
  };
12
12
  __name(_CSSValueParser, "CSSValueParser"), _CSSValueParser.CSS_UNITS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cssUnitParser_index=require("../css-unit-parser/index.cjs"),elementResizer_index=require("../element-resizer/index.cjs"),Store=require("../Store-B96mD8mD.cjs");require("../index-BoGx2BWX.cjs");require("construct-style-sheets-polyfill");function distributeAndNormalize({topLeftCornerRadius,topRightCornerRadius,bottomRightCornerRadius,bottomLeftCornerRadius,width,height}){const roundingAndSmoothingBudgetMap={topLeft:-1,topRight:-1,bottomLeft:-1,bottomRight:-1},cornerRadiusMap={topLeft:topLeftCornerRadius,topRight:topRightCornerRadius,bottomLeft:bottomLeftCornerRadius,bottomRight:bottomRightCornerRadius};return Object.entries(cornerRadiusMap).sort(([,radius1],[,radius2])=>radius2-radius1).forEach(([cornerName,radius])=>{const corner=cornerName,adjacents=adjacentsByCorner[corner],budget=Math.min(...adjacents.map(adjacent=>{const adjacentCornerRadius=cornerRadiusMap[adjacent.corner];if(radius===0&&adjacentCornerRadius===0)return 0;const adjacentCornerBudget=roundingAndSmoothingBudgetMap[adjacent.corner],sideLength=adjacent.side==="top"||adjacent.side==="bottom"?width:height;return adjacentCornerBudget>=0?sideLength-roundingAndSmoothingBudgetMap[adjacent.corner]:radius/(radius+adjacentCornerRadius)*sideLength}));roundingAndSmoothingBudgetMap[corner]=budget,cornerRadiusMap[corner]=Math.min(radius,budget)}),{topLeft:{radius:cornerRadiusMap.topLeft,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.topLeft},topRight:{radius:cornerRadiusMap.topRight,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.topRight},bottomLeft:{radius:cornerRadiusMap.bottomLeft,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.bottomLeft},bottomRight:{radius:cornerRadiusMap.bottomRight,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.bottomRight}}}__name(distributeAndNormalize,"distributeAndNormalize");const adjacentsByCorner={topLeft:[{corner:"topRight",side:"top"},{corner:"bottomLeft",side:"left"}],topRight:[{corner:"topLeft",side:"top"},{corner:"bottomRight",side:"right"}],bottomLeft:[{corner:"bottomRight",side:"bottom"},{corner:"topLeft",side:"left"}],bottomRight:[{corner:"bottomLeft",side:"bottom"},{corner:"topRight",side:"right"}]};function getPathParamsForCorner({cornerRadius,cornerSmoothing,preserveSmoothing,roundingAndSmoothingBudget,cornerAngleAlpha=90}){let p=(1+cornerSmoothing)*cornerRadius;if(!preserveSmoothing){const maxCornerSmoothing=roundingAndSmoothingBudget/cornerRadius-1;cornerSmoothing=Math.min(cornerSmoothing,maxCornerSmoothing),p=Math.min(p,roundingAndSmoothingBudget)}const arcMeasure=90*(1-cornerSmoothing),arcSectionLength=Math.sin(toRadians(arcMeasure/2))*cornerRadius*Math.sqrt(2),angleAlpha=(cornerAngleAlpha-arcMeasure)/2,p3ToP4Distance=cornerRadius*Math.tan(toRadians(angleAlpha/2)),angleBeta=45*cornerSmoothing,c=p3ToP4Distance*Math.cos(toRadians(angleBeta)),d=c*Math.tan(toRadians(angleBeta));let b=(p-arcSectionLength-c-d)/3,a=2*b;if(preserveSmoothing&&p>roundingAndSmoothingBudget){const p1ToP3MaxDistance=roundingAndSmoothingBudget-d-arcSectionLength-c,minA=p1ToP3MaxDistance/6,maxB=p1ToP3MaxDistance-minA;b=Math.min(b,maxB),a=p1ToP3MaxDistance-b,p=Math.min(p,roundingAndSmoothingBudget)}return{a,b,c,d,p,arcSectionLength,cornerRadius}}__name(getPathParamsForCorner,"getPathParamsForCorner");function getSVGPathFromPathParams({width,height,topLeftPathParams,topRightPathParams,bottomLeftPathParams,bottomRightPathParams,topNotches=[],rightNotches=[],bottomNotches=[],leftNotches=[]}){let d=`M ${topLeftPathParams.p} 0`;return topNotches.forEach(n=>{d+=drawTopNotch(n)}),d+=`L ${width-topRightPathParams.p} 0`,d+=drawTopRightPath(topRightPathParams),rightNotches.forEach(n=>{d+=drawRightNotch(n,width)}),d+=`L ${width} ${height-bottomRightPathParams.p}`,d+=drawBottomRightPath(bottomRightPathParams),bottomNotches.forEach(n=>{d+=drawBottomNotch(n,height)}),d+=`L ${bottomLeftPathParams.p} ${height}`,d+=drawBottomLeftPath(bottomLeftPathParams),leftNotches.forEach(n=>{d+=drawLeftNotch(n)}),d+=`L 0 ${topLeftPathParams.p}`,d+=drawTopLeftPath(topLeftPathParams),d+="Z",d.replace(/[\t\s\n]+/g," ").trim()}__name(getSVGPathFromPathParams,"getSVGPathFromPathParams");function drawTopNotch({start,length,slope,depth}){const end=start+length;return`
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cssUnitParser_index=require("../css-unit-parser/index.cjs"),cssValueParser_index=require("../css-value-parser/index.cjs"),elementResizer_index=require("../element-resizer/index.cjs"),Store=require("../Store-B96mD8mD.cjs");require("../index-BoGx2BWX.cjs");require("construct-style-sheets-polyfill");function distributeAndNormalize({topLeftCornerRadius,topRightCornerRadius,bottomRightCornerRadius,bottomLeftCornerRadius,width,height}){const roundingAndSmoothingBudgetMap={topLeft:-1,topRight:-1,bottomLeft:-1,bottomRight:-1},cornerRadiusMap={topLeft:topLeftCornerRadius,topRight:topRightCornerRadius,bottomLeft:bottomLeftCornerRadius,bottomRight:bottomRightCornerRadius};return Object.entries(cornerRadiusMap).sort(([,radius1],[,radius2])=>radius2-radius1).forEach(([cornerName,radius])=>{const corner=cornerName,adjacents=adjacentsByCorner[corner],budget=Math.min(...adjacents.map(adjacent=>{const adjacentCornerRadius=cornerRadiusMap[adjacent.corner];if(radius===0&&adjacentCornerRadius===0)return 0;const adjacentCornerBudget=roundingAndSmoothingBudgetMap[adjacent.corner],sideLength=adjacent.side==="top"||adjacent.side==="bottom"?width:height;return adjacentCornerBudget>=0?sideLength-roundingAndSmoothingBudgetMap[adjacent.corner]:radius/(radius+adjacentCornerRadius)*sideLength}));roundingAndSmoothingBudgetMap[corner]=budget,cornerRadiusMap[corner]=Math.min(radius,budget)}),{topLeft:{radius:cornerRadiusMap.topLeft,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.topLeft},topRight:{radius:cornerRadiusMap.topRight,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.topRight},bottomLeft:{radius:cornerRadiusMap.bottomLeft,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.bottomLeft},bottomRight:{radius:cornerRadiusMap.bottomRight,roundingAndSmoothingBudget:roundingAndSmoothingBudgetMap.bottomRight}}}__name(distributeAndNormalize,"distributeAndNormalize");const adjacentsByCorner={topLeft:[{corner:"topRight",side:"top"},{corner:"bottomLeft",side:"left"}],topRight:[{corner:"topLeft",side:"top"},{corner:"bottomRight",side:"right"}],bottomLeft:[{corner:"bottomRight",side:"bottom"},{corner:"topLeft",side:"left"}],bottomRight:[{corner:"bottomLeft",side:"bottom"},{corner:"topRight",side:"right"}]};function getPathParamsForCorner({cornerRadius,cornerSmoothing,preserveSmoothing,roundingAndSmoothingBudget,cornerAngleAlpha=90}){let p=(1+cornerSmoothing)*cornerRadius;if(!preserveSmoothing){const maxCornerSmoothing=roundingAndSmoothingBudget/cornerRadius-1;cornerSmoothing=Math.min(cornerSmoothing,maxCornerSmoothing),p=Math.min(p,roundingAndSmoothingBudget)}const arcMeasure=90*(1-cornerSmoothing),arcSectionLength=Math.sin(toRadians(arcMeasure/2))*cornerRadius*Math.sqrt(2),angleAlpha=(cornerAngleAlpha-arcMeasure)/2,p3ToP4Distance=cornerRadius*Math.tan(toRadians(angleAlpha/2)),angleBeta=45*cornerSmoothing,c=p3ToP4Distance*Math.cos(toRadians(angleBeta)),d=c*Math.tan(toRadians(angleBeta));let b=(p-arcSectionLength-c-d)/3,a=2*b;if(preserveSmoothing&&p>roundingAndSmoothingBudget){const p1ToP3MaxDistance=roundingAndSmoothingBudget-d-arcSectionLength-c,minA=p1ToP3MaxDistance/6,maxB=p1ToP3MaxDistance-minA;b=Math.min(b,maxB),a=p1ToP3MaxDistance-b,p=Math.min(p,roundingAndSmoothingBudget)}return{a,b,c,d,p,arcSectionLength,cornerRadius}}__name(getPathParamsForCorner,"getPathParamsForCorner");function getSVGPathFromPathParams({width,height,topLeftPathParams,topRightPathParams,bottomLeftPathParams,bottomRightPathParams,topNotches=[],rightNotches=[],bottomNotches=[],leftNotches=[]}){let d=`M ${topLeftPathParams.p} 0`;return topNotches.forEach(n=>{d+=drawTopNotch(n)}),d+=`L ${width-topRightPathParams.p} 0`,d+=drawTopRightPath(topRightPathParams),rightNotches.forEach(n=>{d+=drawRightNotch(n,width)}),d+=`L ${width} ${height-bottomRightPathParams.p}`,d+=drawBottomRightPath(bottomRightPathParams),bottomNotches.forEach(n=>{d+=drawBottomNotch(n,height)}),d+=`L ${bottomLeftPathParams.p} ${height}`,d+=drawBottomLeftPath(bottomLeftPathParams),leftNotches.forEach(n=>{d+=drawLeftNotch(n)}),d+=`L 0 ${topLeftPathParams.p}`,d+=drawTopLeftPath(topLeftPathParams),d+="Z",d.replace(/[\t\s\n]+/g," ").trim()}__name(getSVGPathFromPathParams,"getSVGPathFromPathParams");function drawTopNotch({start,length,slope,depth}){const end=start+length;return`
2
2
  L${start} 0
3
3
  C ${start+slope*.5},0 ${start+slope*.5},${depth} ${start+slope},${depth}
4
4
  L${end-slope},${depth}
@@ -52,4 +52,4 @@
52
52
  display: block;
53
53
  width: 100%;
54
54
  height: 100%;
55
- `,this.prepend(__privateGet(this,_imageElement)))}connectedCallback(){elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener))}disconnectedCallback(){elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener))}};_imageElement=new WeakMap,_clipId=new WeakMap,_resizeListener=new WeakMap,_NotchedElement_instances=new WeakSet,parseCSSNotchValue_fn=__name(function(value){const notchesString=value.split(",").map(v=>v.trim()).filter(v=>!!v),notches=[];return notchesString.forEach(notchString=>{const valuesStrings=notchString.split(" ").map(v=>v.trim()).filter(v=>!!v);notches.push({start:cssUnitParser_index.cssUnitParser.parse(valuesStrings[0])||0,length:cssUnitParser_index.cssUnitParser.parse(valuesStrings[1])||0,slope:cssUnitParser_index.cssUnitParser.parse(valuesStrings[2])||0,depth:cssUnitParser_index.cssUnitParser.parse(valuesStrings[3])||0})}),notches},"#parseCSSNotchValue"),__name(_NotchedElement,"NotchedElement");let NotchedElement=_NotchedElement;customElements.get("e-notched")||customElements.define("e-notched",NotchedElement);exports.NotchedElement=NotchedElement;
55
+ `,this.prepend(__privateGet(this,_imageElement)))}connectedCallback(){elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener))}disconnectedCallback(){elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener))}};_imageElement=new WeakMap,_clipId=new WeakMap,_resizeListener=new WeakMap,_NotchedElement_instances=new WeakSet,parseCSSNotchValue_fn=__name(function(value){const notchesString=value.split(",").map(v=>v.trim()).filter(v=>!!v),notches=[];return notchesString.forEach(notchString=>{const valuesStrings=notchString.split(" ").map(v=>v.trim()).filter(v=>!!v);notches.push({start:cssValueParser_index.cssValueParser.parse(valuesStrings[0],this)||0,length:cssValueParser_index.cssValueParser.parse(valuesStrings[1],this)||0,slope:cssValueParser_index.cssValueParser.parse(valuesStrings[2],this)||0,depth:cssValueParser_index.cssValueParser.parse(valuesStrings[3],this)||0})}),notches},"#parseCSSNotchValue"),__name(_NotchedElement,"NotchedElement");let NotchedElement=_NotchedElement;customElements.get("e-notched")||customElements.define("e-notched",NotchedElement);exports.NotchedElement=NotchedElement;
@@ -6,6 +6,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
6
6
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
8
8
  import { cssUnitParser } from "../css-unit-parser/index.js";
9
+ import { cssValueParser } from "../css-value-parser/index.js";
9
10
  import { elementResizer } from "../element-resizer/index.js";
10
11
  import { g as generateId } from "../Store-CAGUSjFX.js";
11
12
  import "../index-DAG0CtYo.js";
@@ -449,10 +450,10 @@ _imageElement = new WeakMap(), _clipId = new WeakMap(), _resizeListener = new We
449
450
  return notchesString.forEach((notchString) => {
450
451
  const valuesStrings = notchString.split(" ").map((v) => v.trim()).filter((v) => !!v);
451
452
  notches.push({
452
- start: cssUnitParser.parse(valuesStrings[0]) || 0,
453
- length: cssUnitParser.parse(valuesStrings[1]) || 0,
454
- slope: cssUnitParser.parse(valuesStrings[2]) || 0,
455
- depth: cssUnitParser.parse(valuesStrings[3]) || 0
453
+ start: cssValueParser.parse(valuesStrings[0], this) || 0,
454
+ length: cssValueParser.parse(valuesStrings[1], this) || 0,
455
+ slope: cssValueParser.parse(valuesStrings[2], this) || 0,
456
+ depth: cssValueParser.parse(valuesStrings[3], this) || 0
456
457
  });
457
458
  }), notches;
458
459
  }, "#parseCSSNotchValue"), __name(_NotchedElement, "NotchedElement");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.90.2",
3
+ "version": "0.90.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"