aptechka 0.4.20 → 0.4.21

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.
Files changed (38) hide show
  1. package/lib/Damped-B0G_t-pw.cjs +1 -0
  2. package/lib/{Damped-ChjjwnrU.js → Damped-DpaKIZqv.js} +1 -1
  3. package/lib/accordion/index.js +9 -9
  4. package/lib/animation/index.cjs +1 -1
  5. package/lib/animation/index.js +2 -2
  6. package/lib/canvas/index.cjs +1 -1
  7. package/lib/canvas/index.d.ts +2 -0
  8. package/lib/canvas/index.js +63 -48
  9. package/lib/canvas-CU5Xjahf.cjs +1 -0
  10. package/lib/canvas-DeZ0SLUJ.js +34 -0
  11. package/lib/class-linked-status/index.cjs +1 -0
  12. package/lib/class-linked-status/index.d.ts +10 -0
  13. package/lib/class-linked-status/index.js +51 -0
  14. package/lib/coordinates-CgdGoSYs.js +24 -0
  15. package/lib/coordinates-D8Np3cPD.cjs +1 -0
  16. package/lib/{index-Fasue6kv.js → index-DTe0hK7c.js} +28 -28
  17. package/lib/pointer/Pointer.d.ts +21 -0
  18. package/lib/pointer/PointerElement.d.ts +13 -0
  19. package/lib/pointer/index.cjs +1 -0
  20. package/lib/pointer/index.d.ts +2 -0
  21. package/lib/pointer/index.js +130 -0
  22. package/lib/popover/index.js +11 -11
  23. package/lib/scroll/index.cjs +1 -1
  24. package/lib/scroll/index.js +1 -1
  25. package/lib/select/index.js +1 -1
  26. package/lib/sequence/index.cjs +1 -0
  27. package/lib/sequence/index.d.ts +19 -0
  28. package/lib/sequence/index.js +151 -0
  29. package/lib/{style-j2TwriJ_.js → style-CklEF62D.js} +2 -2
  30. package/lib/tweaker/index.js +1 -1
  31. package/lib/utils/canvas.d.ts +1 -0
  32. package/lib/utils/coordinates.d.ts +2 -2
  33. package/lib/utils/index.cjs +1 -1
  34. package/lib/utils/index.d.ts +24 -24
  35. package/lib/utils/index.js +133 -168
  36. package/lib/utils/ts-shape.d.ts +2 -1
  37. package/package.json +25 -1
  38. package/lib/Damped-CbT5qqTP.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attributes-Bf2svn4j.cjs"),I=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),r=require("../easings-DsS5-Kqc.cjs"),v=require("../events-Crwi8fz6.cjs"),P=require("../file-EevnUtRj.cjs"),y=require("../function-MthRj-GJ.cjs"),S=require("../gestures-DHLrn6Q8.cjs"),f=require("../layout-8ryRAMGJ.cjs"),h=require("../math-GDWEqu7y.cjs"),b=require("../number-yVpzMdbQ.cjs"),d=require("../object-CCiXnER2.cjs"),D=require("../polyfills-CrcS4RcO.cjs"),p=require("../string-DhgS_iFl.cjs"),w=require("../style-At6aDoqG.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");function T(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function q(t,e){const n=t.length;e=e%n;const s=new Array(n);for(let a=0;a<n;a++){const o=(a+e)%n;s[o]=t[a]}return s}function Q(t,e){const n=t.measureText(e),s=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,a=n.width;return{height:s,width:a}}function M(t){return Math.floor(t)+.5}function A(t,e,n,s,a,o){let i=t/e,u=n/s,l=0,c=0;return a=typeof a=="undefined"?.5:a,o=typeof o=="undefined"?.5:o,i>u?(l=s,c=s*i):(c=n,l=n/i),[(n-c)*a,(s-l)*o,c,l]}function R(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function z(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function B(t,e,n=!1){let s=t.x-e.width/2,a=e.height/2-t.y;return n&&(s=s/(e.width/2),a=a/(e.height/2)),{x:s,y:a}}function N(t,e){const n=t.x/e.x,s=t.y/e.y;return{x:n,y:s}}function j(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function k(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&t.forEach(a=>{const o=s.styleMap.get(a);o&&(e[a]=o.toString())})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function U(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function V(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function C(t,{pathSelector:e="path"}={}){const n=document.createElement(null);n.innerHTML=t;const s=n.firstElementChild,o=s.querySelector(e).getPathData(),i=s.getAttribute("viewBox").split(" ").map(c=>c.trim()),u={x:parseInt(i[0]),y:parseInt(i[1]),width:parseInt(i[2]),height:parseInt(i[3])},l=Math.min(u.width,u.height);return o.forEach(c=>{c.values=c.values.map(g=>g/l)}),o}function J(t,e,n,s,a){const o=[];for(let i=0;i<=1;i+=1/a){const u=Math.pow(1-i,3)*t.x+3*Math.pow(1-i,2)*i*e.x+3*(1-i)*Math.pow(i,2)*n.x+Math.pow(i,3)*s.x,l=Math.pow(1-i,3)*t.y+3*Math.pow(1-i,2)*i*e.y+3*(1-i)*Math.pow(i,2)*n.y+Math.pow(i,3)*s.y;o.push({x:u,y:l})}return o}function K(t,e){const n=(e==null?void 0:e.segments)||20,s=C(t,e);let a=[];for(let o=0;o<s.length-1;o++){const{type:i,values:u}=s[o];if(i==="M"&&o===0)a.push({x:u[0],y:u[1]});else if(i==="C"){const l=a[a.length-1],c={x:u[0],y:u[1]},g={x:u[2],y:u[3]},O={x:u[4],y:u[5]},E=J(l,c,g,O,n);a=[...a,...E]}}return a}exports.parseAttribute=x.parseAttribute;exports.parseAttributeValue=x.parseAttributeValue;exports.isBrowser=I.isBrowser;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=r.easeInCubic;exports.easeInExpo=r.easeInExpo;exports.easeInOutCubic=r.easeInOutCubic;exports.easeInOutExpo=r.easeInOutExpo;exports.easeInOutQuad=r.easeInOutQuad;exports.easeInOutQuart=r.easeInOutQuart;exports.easeInOutQuint=r.easeInOutQuint;exports.easeInQuad=r.easeInQuad;exports.easeInQuart=r.easeInQuart;exports.easeInQuint=r.easeInQuint;exports.easeOutCubic=r.easeOutCubic;exports.easeOutExpo=r.easeOutExpo;exports.easeOutQuad=r.easeOutQuad;exports.easeOutQuart=r.easeOutQuart;exports.easeOutQuint=r.easeOutQuint;exports.linear=r.linear;exports.dispatchSizeChangeEvent=v.dispatchSizeChangeEvent;exports.createJSONAndSave=P.createJSONAndSave;exports.debounce=y.debounce;exports.throttle=y.throttle;exports.setupDrag=S.setupDrag;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=h.calculateDistance;exports.calculateDistanceWithRadius=h.calculateDistanceWithRadius;exports.clamp=h.clamp;exports.damp=h.damp;exports.lerp=h.lerp;exports.mapRange=h.mapRange;exports.round=h.round;exports.smootherstep=h.smootherstep;exports.smoothstep=h.smoothstep;exports.step=h.step;exports.preciseNumber=b.preciseNumber;exports.roundNumberTo=b.roundNumberTo;exports.cloneDeep=d.cloneDeep;exports.compareObjects=d.compareObjects;exports.isESClass=d.isESClass;exports.isNullish=d.isNullish;exports.isObject=d.isObject;exports.mergeDeep=d.mergeDeep;exports.mixin=d.mixin;exports.omit=d.omit;exports.pick=d.pick;exports.nullishCoalescing=D.nullishCoalescing;exports.camelToKebab=p.camelToKebab;exports.capitalize=p.capitalize;exports.generateId=p.generateId;exports.isUppercase=p.isUppercase;exports.kebabToCamel=p.kebabToCamel;exports.snakeToDotted=p.snakeToDotted;exports.toPascalCase=p.toPascalCase;exports.uncapitalize=p.uncapitalize;exports.getElementTransitionDurationMS=w.getElementTransitionDurationMS;exports.getElementTransitionDurationS=w.getElementTransitionDurationS;exports.cover=A;exports.decode=V;exports.dotCircleCollision=z;exports.dotRectCollision=R;exports.encode=U;exports.fixPosition=M;exports.getPathData=C;exports.getPointerPosition=j;exports.getPoints=K;exports.getRootVariables=k;exports.insert=T;exports.measureText=Q;exports.normalize=N;exports.screenToCartesian=B;exports.shiftArray=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),P=require("../browser-CpzFX2xg.cjs"),h=require("../canvas-CU5Xjahf.cjs"),b=require("../coordinates-D8Np3cPD.cjs"),g=require("../dom-JBOkFLTh.cjs"),o=require("../easings-DsS5-Kqc.cjs"),S=require("../events-Crwi8fz6.cjs"),T=require("../file-EevnUtRj.cjs"),x=require("../function-MthRj-GJ.cjs"),q=require("../gestures-DHLrn6Q8.cjs"),C=require("../layout-8ryRAMGJ.cjs"),c=require("../math-GDWEqu7y.cjs"),O=require("../number-yVpzMdbQ.cjs"),l=require("../object-CCiXnER2.cjs"),D=require("../polyfills-CrcS4RcO.cjs"),p=require("../string-DhgS_iFl.cjs"),E=require("../style-At6aDoqG.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");function Q(t,e,...a){return[...t.slice(0,e),...a,...t.slice(e)]}function M(t,e){const a=t.length;e=e%a;const i=new Array(a);for(let s=0;s<a;s++){const r=(s+e)%a;i[r]=t[s]}return i}function A(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function R(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function z(...t){const e={};return Array.from(document.styleSheets).forEach(a=>{Array.from(a.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(s=>{const r=i.styleMap.get(s);r&&(e[s]=r.toString())})})}),t.forEach(a=>{e[a]||console.warn(`variable named ${a} not found`)}),e}function N(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function j(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function w(t,{pathSelector:e="path"}={}){const a=document.createElement(null);a.innerHTML=t;const i=a.firstElementChild,r=i.querySelector(e).getPathData(),n=i.getAttribute("viewBox").split(" ").map(m=>m.trim()),u={x:parseInt(n[0]),y:parseInt(n[1]),width:parseInt(n[2]),height:parseInt(n[3])},d=Math.min(u.width,u.height);return r.forEach(m=>{m.values=m.values.map(f=>f/d)}),r}function k(t,e,a,i,s){const r=[];for(let n=0;n<=1;n+=1/s){const u=Math.pow(1-n,3)*t.x+3*Math.pow(1-n,2)*n*e.x+3*(1-n)*Math.pow(n,2)*a.x+Math.pow(n,3)*i.x,d=Math.pow(1-n,3)*t.y+3*Math.pow(1-n,2)*n*e.y+3*(1-n)*Math.pow(n,2)*a.y+Math.pow(n,3)*i.y;r.push({x:u,y:d})}return r}function B(t,e){const a=(e==null?void 0:e.segments)||20,i=w(t,e);let s=[];for(let r=0;r<i.length-1;r++){const{type:n,values:u}=i[r];if(n==="M"&&r===0)s.push({x:u[0],y:u[1]});else if(n==="C"){const d=s[s.length-1],m={x:u[0],y:u[1]},f={x:u[2],y:u[3]},I={x:u[4],y:u[5]},v=k(d,m,f,I,a);s=[...s,...v]}}return s}exports.parseAttribute=y.parseAttribute;exports.parseAttributeValue=y.parseAttributeValue;exports.isBrowser=P.isBrowser;exports.contain=h.contain;exports.cover=h.cover;exports.fixPosition=h.fixPosition;exports.measureText=h.measureText;exports.getPointerPosition=b.getPointerPosition;exports.normalize=b.normalize;exports.screenToCartesian=b.screenToCartesian;exports.findParentElement=g.findParentElement;exports.findScrollParentElement=g.findScrollParentElement;exports.getAllParentElements=g.getAllParentElements;exports.getElement=g.getElement;exports.easeInCubic=o.easeInCubic;exports.easeInExpo=o.easeInExpo;exports.easeInOutCubic=o.easeInOutCubic;exports.easeInOutExpo=o.easeInOutExpo;exports.easeInOutQuad=o.easeInOutQuad;exports.easeInOutQuart=o.easeInOutQuart;exports.easeInOutQuint=o.easeInOutQuint;exports.easeInQuad=o.easeInQuad;exports.easeInQuart=o.easeInQuart;exports.easeInQuint=o.easeInQuint;exports.easeOutCubic=o.easeOutCubic;exports.easeOutExpo=o.easeOutExpo;exports.easeOutQuad=o.easeOutQuad;exports.easeOutQuart=o.easeOutQuart;exports.easeOutQuint=o.easeOutQuint;exports.linear=o.linear;exports.dispatchSizeChangeEvent=S.dispatchSizeChangeEvent;exports.createJSONAndSave=T.createJSONAndSave;exports.debounce=x.debounce;exports.throttle=x.throttle;exports.setupDrag=q.setupDrag;exports.getCumulativeOffsetLeft=C.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=C.getCumulativeOffsetTop;exports.getCumulativePosition=C.getCumulativePosition;exports.calculateDistance=c.calculateDistance;exports.calculateDistanceWithRadius=c.calculateDistanceWithRadius;exports.clamp=c.clamp;exports.damp=c.damp;exports.lerp=c.lerp;exports.mapRange=c.mapRange;exports.round=c.round;exports.smootherstep=c.smootherstep;exports.smoothstep=c.smoothstep;exports.step=c.step;exports.preciseNumber=O.preciseNumber;exports.roundNumberTo=O.roundNumberTo;exports.cloneDeep=l.cloneDeep;exports.compareObjects=l.compareObjects;exports.isESClass=l.isESClass;exports.isNullish=l.isNullish;exports.isObject=l.isObject;exports.mergeDeep=l.mergeDeep;exports.mixin=l.mixin;exports.omit=l.omit;exports.pick=l.pick;exports.nullishCoalescing=D.nullishCoalescing;exports.camelToKebab=p.camelToKebab;exports.capitalize=p.capitalize;exports.generateId=p.generateId;exports.isUppercase=p.isUppercase;exports.kebabToCamel=p.kebabToCamel;exports.snakeToDotted=p.snakeToDotted;exports.toPascalCase=p.toPascalCase;exports.uncapitalize=p.uncapitalize;exports.getElementTransitionDurationMS=E.getElementTransitionDurationMS;exports.getElementTransitionDurationS=E.getElementTransitionDurationS;exports.decode=j;exports.dotCircleCollision=R;exports.dotRectCollision=A;exports.encode=N;exports.getPathData=w;exports.getPoints=B;exports.getRootVariables=z;exports.insert=Q;exports.shiftArray=M;
@@ -1,24 +1,24 @@
1
- export { insert, shiftArray } from './array';
2
- export { parseAttribute, parseAttributeValue } from './attributes';
3
- export { isBrowser } from './browser';
4
- export { measureText, fixPosition, cover } from './canvas';
5
- export { dotRectCollision, dotCircleCollision } from './collisions';
6
- export { screenToCartesian, normalize, getPointerPosition } from './coordinates';
7
- export { getRootVariables } from './cssom';
8
- export { encode, decode } from './decoding';
9
- export { findParentElement, getElement, findScrollParentElement, getAllParentElements, type ElementOrSelector, } from './dom';
10
- export { linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint, easeOutQuint, easeInOutQuint, easeInExpo, easeOutExpo, easeInOutExpo, type EasingFunction, } from './easings';
11
- export { dispatchSizeChangeEvent } from './events';
12
- export { createJSONAndSave } from './file';
13
- export { debounce, throttle } from './function';
14
- export { setupDrag } from './gestures';
15
- export { getCumulativePosition, getCumulativeOffsetLeft, getCumulativeOffsetTop, } from './layout';
16
- export { lerp, damp, step, round, clamp, mapRange, smoothstep, smootherstep, calculateDistance, calculateDistanceWithRadius, } from './math';
17
- export { preciseNumber, roundNumberTo } from './number';
18
- export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, isESClass, mixin, } from './object';
19
- export { nullishCoalescing } from './polyfills';
20
- export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, uncapitalize, generateId, isUppercase, } from './string';
21
- export { getElementTransitionDurationMS, getElementTransitionDurationS, } from './style';
22
- export { type GenerateSVGPathDataOptions, type BezierPoint, getPathData, getPoints, } from './svg';
23
- export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D, } from './ts-shape';
24
- export type { NestedKeys, NestedValueOf, DeepOmit, DeepPartial, Requiredish, WithRequired, Split, SplitFirst, Tail, KebabToCamel, CamelToKebab, } from './ts-utility';
1
+ export * from './array';
2
+ export * from './attributes';
3
+ export * from './browser';
4
+ export * from './canvas';
5
+ export * from './collisions';
6
+ export * from './coordinates';
7
+ export * from './cssom';
8
+ export * from './decoding';
9
+ export * from './dom';
10
+ export * from './easings';
11
+ export * from './events';
12
+ export * from './file';
13
+ export * from './function';
14
+ export * from './gestures';
15
+ export * from './layout';
16
+ export * from './math';
17
+ export * from './number';
18
+ export * from './object';
19
+ export * from './polyfills';
20
+ export * from './string';
21
+ export * from './style';
22
+ export * from './svg';
23
+ export * from './ts-shape';
24
+ export * from './ts-utility';
@@ -1,209 +1,174 @@
1
- import { a as Q, p as T } from "../attributes-69we3byR.js";
2
- import { i as k } from "../browser-0zX67oeU.js";
3
- import { f as N, b as j, a as U, g as q } from "../dom-0S_WDL4g.js";
4
- import { c as J, n as K, f as $, p as F, b as G, i as H, m as W, e as X, g as Y, j as Z, d as _, o as L, a as ee, h as te, k as ae, l as se } from "../easings-BKi40vHz.js";
5
- import { d as oe } from "../events-_C2CztxR.js";
6
- import { c as ie } from "../file-lxi_oXJf.js";
7
- import { d as ce, t as le } from "../function-C10DGppn.js";
8
- import { s as he } from "../gestures-D2Fdra_G.js";
9
- import { g as fe, a as de, b as xe } from "../layout-HoBT_Da2.js";
10
- import { e as ye, f as we, c as be, d as Ce, l as Ee, m as ve, r as Ie, b as Me, a as Oe, s as Se } from "../math-BOBiC4TN.js";
11
- import { p as Ae, r as De } from "../number-Bo5RdrA1.js";
12
- import { c as Qe, d as Te, i as Be, b as ke, a as ze, m as Ne, e as je, o as Ue, p as qe } from "../object-D6MVWB4l.js";
13
- import { n as Je } from "../polyfills-DJUYczFm.js";
14
- import { c as $e, a as Fe, g as Ge, i as He, k as We, s as Xe, t as Ye, u as Ze } from "../string-f0Dnk0L1.js";
15
- import { g as Le, a as et } from "../style-j2TwriJ_.js";
1
+ import { a as S, p as M } from "../attributes-69we3byR.js";
2
+ import { i as T } from "../browser-0zX67oeU.js";
3
+ import { a as D, c as Q, f as R, m as z } from "../canvas-DeZ0SLUJ.js";
4
+ import { g as B, n as N, s as j } from "../coordinates-CgdGoSYs.js";
5
+ import { f as q, b as L, a as V, g as H } from "../dom-0S_WDL4g.js";
6
+ import { c as K, n as W, f as $, p as F, b as G, i as X, m as Y, e as Z, g as _, j as ee, d as te, o as ae, a as se, h as oe, k as ne, l as re } from "../easings-BKi40vHz.js";
7
+ import { d as ce } from "../events-_C2CztxR.js";
8
+ import { c as le } from "../file-lxi_oXJf.js";
9
+ import { d as fe, t as me } from "../function-C10DGppn.js";
10
+ import { s as de } from "../gestures-D2Fdra_G.js";
11
+ import { g as ge, a as be, b as we } from "../layout-HoBT_Da2.js";
12
+ import { e as Ce, f as ve, c as Ee, d as Ie, l as Oe, m as Se, r as Me, b as Pe, a as Te, s as Ae } from "../math-BOBiC4TN.js";
13
+ import { p as Qe, r as Re } from "../number-Bo5RdrA1.js";
14
+ import { c as ke, d as Be, i as Ne, b as je, a as Ue, m as qe, e as Le, o as Ve, p as He } from "../object-D6MVWB4l.js";
15
+ import { n as Ke } from "../polyfills-DJUYczFm.js";
16
+ import { c as $e, a as Fe, g as Ge, i as Xe, k as Ye, s as Ze, t as _e, u as et } from "../string-f0Dnk0L1.js";
17
+ import { a as at, g as st } from "../style-CklEF62D.js";
16
18
  import "../path-data-polyfill-DgeDWYeI.js";
17
- function x(t, e, ...a) {
18
- return [...t.slice(0, e), ...a, ...t.slice(e)];
19
+ function x(t, e, ...s) {
20
+ return [...t.slice(0, e), ...s, ...t.slice(e)];
19
21
  }
20
22
  function g(t, e) {
21
- const a = t.length;
22
- e = e % a;
23
- const s = new Array(a);
24
- for (let n = 0; n < a; n++) {
25
- const r = (n + e) % a;
26
- s[r] = t[n];
23
+ const s = t.length;
24
+ e = e % s;
25
+ const n = new Array(s);
26
+ for (let o = 0; o < s; o++) {
27
+ const r = (o + e) % s;
28
+ n[r] = t[o];
27
29
  }
28
- return s;
29
- }
30
- function y(t, e) {
31
- const a = t.measureText(e), s = a.actualBoundingBoxAscent + a.actualBoundingBoxDescent, n = a.width;
32
- return {
33
- height: s,
34
- width: n
35
- };
36
- }
37
- function w(t) {
38
- return Math.floor(t) + 0.5;
39
- }
40
- function b(t, e, a, s, n, r) {
41
- let o = t / e, i = a / s, c = 0, u = 0;
42
- return n = typeof n == "undefined" ? 0.5 : n, r = typeof r == "undefined" ? 0.5 : r, o > i ? (c = s, u = s * o) : (u = a, c = a / o), [
43
- (a - u) * n,
44
- (s - c) * r,
45
- u,
46
- c
47
- ];
30
+ return n;
48
31
  }
49
- function C(t, e) {
32
+ function b(t, e) {
50
33
  return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
51
34
  }
52
- function E(t, e) {
35
+ function w(t, e) {
53
36
  return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
54
37
  }
55
- function v(t, e, a = !1) {
56
- let s = t.x - e.width / 2, n = e.height / 2 - t.y;
57
- return a && (s = s / (e.width / 2), n = n / (e.height / 2)), { x: s, y: n };
58
- }
59
- function I(t, e) {
60
- const a = t.x / e.x, s = t.y / e.y;
61
- return { x: a, y: s };
62
- }
63
- function M(t, e) {
64
- return e = e || {
65
- x: 0,
66
- y: 0,
67
- width: document.documentElement.offsetWidth,
68
- height: innerHeight
69
- }, {
70
- x: (t.x - e.x) / e.width * e.width,
71
- y: (t.y - e.y) / e.height * e.height
72
- };
73
- }
74
- function O(...t) {
38
+ function y(...t) {
75
39
  const e = {};
76
- return Array.from(document.styleSheets).forEach((a) => {
77
- Array.from(a.cssRules).forEach((s) => {
78
- s instanceof CSSStyleRule && s.selectorText === ":root" && t.forEach((n) => {
79
- const r = s.styleMap.get(n);
80
- r && (e[n] = r.toString());
40
+ return Array.from(document.styleSheets).forEach((s) => {
41
+ Array.from(s.cssRules).forEach((n) => {
42
+ n instanceof CSSStyleRule && n.selectorText === ":root" && t.forEach((o) => {
43
+ const r = n.styleMap.get(o);
44
+ r && (e[o] = r.toString());
81
45
  });
82
46
  });
83
- }), t.forEach((a) => {
84
- e[a] || console.warn(`variable named ${a} not found`);
47
+ }), t.forEach((s) => {
48
+ e[s] || console.warn(`variable named ${s} not found`);
85
49
  }), e;
86
50
  }
87
- function S(t) {
51
+ function C(t) {
88
52
  const e = window.atob(t);
89
53
  return decodeURIComponent(window.escape(e));
90
54
  }
91
- function P(t) {
55
+ function v(t) {
92
56
  const e = window.unescape(encodeURIComponent(t));
93
57
  return window.btoa(e);
94
58
  }
95
59
  function m(t, { pathSelector: e = "path" } = {}) {
96
- const a = document.createElement(null);
97
- a.innerHTML = t;
98
- const s = a.firstElementChild, r = s.querySelector(e).getPathData(), o = s.getAttribute("viewBox").split(" ").map((u) => u.trim()), i = {
99
- x: parseInt(o[0]),
100
- y: parseInt(o[1]),
101
- width: parseInt(o[2]),
102
- height: parseInt(o[3])
103
- }, c = Math.min(i.width, i.height);
104
- return r.forEach((u) => {
105
- u.values = u.values.map((l) => l / c);
60
+ const s = document.createElement(null);
61
+ s.innerHTML = t;
62
+ const n = s.firstElementChild, r = n.querySelector(e).getPathData(), a = n.getAttribute("viewBox").split(" ").map((c) => c.trim()), i = {
63
+ x: parseInt(a[0]),
64
+ y: parseInt(a[1]),
65
+ width: parseInt(a[2]),
66
+ height: parseInt(a[3])
67
+ }, u = Math.min(i.width, i.height);
68
+ return r.forEach((c) => {
69
+ c.values = c.values.map((l) => l / u);
106
70
  }), r;
107
71
  }
108
- function f(t, e, a, s, n) {
72
+ function h(t, e, s, n, o) {
109
73
  const r = [];
110
- for (let o = 0; o <= 1; o += 1 / n) {
111
- const i = Math.pow(1 - o, 3) * t.x + 3 * Math.pow(1 - o, 2) * o * e.x + 3 * (1 - o) * Math.pow(o, 2) * a.x + Math.pow(o, 3) * s.x, c = Math.pow(1 - o, 3) * t.y + 3 * Math.pow(1 - o, 2) * o * e.y + 3 * (1 - o) * Math.pow(o, 2) * a.y + Math.pow(o, 3) * s.y;
112
- r.push({ x: i, y: c });
74
+ for (let a = 0; a <= 1; a += 1 / o) {
75
+ const i = Math.pow(1 - a, 3) * t.x + 3 * Math.pow(1 - a, 2) * a * e.x + 3 * (1 - a) * Math.pow(a, 2) * s.x + Math.pow(a, 3) * n.x, u = Math.pow(1 - a, 3) * t.y + 3 * Math.pow(1 - a, 2) * a * e.y + 3 * (1 - a) * Math.pow(a, 2) * s.y + Math.pow(a, 3) * n.y;
76
+ r.push({ x: i, y: u });
113
77
  }
114
78
  return r;
115
79
  }
116
- function A(t, e) {
117
- const a = (e == null ? void 0 : e.segments) || 20, s = m(t, e);
118
- let n = [];
119
- for (let r = 0; r < s.length - 1; r++) {
120
- const { type: o, values: i } = s[r];
121
- if (o === "M" && r === 0)
122
- n.push({ x: i[0], y: i[1] });
123
- else if (o === "C") {
124
- const c = n[n.length - 1], u = { x: i[0], y: i[1] }, l = { x: i[2], y: i[3] }, p = { x: i[4], y: i[5] }, h = f(c, u, l, p, a);
125
- n = [...n, ...h];
80
+ function E(t, e) {
81
+ const s = (e == null ? void 0 : e.segments) || 20, n = m(t, e);
82
+ let o = [];
83
+ for (let r = 0; r < n.length - 1; r++) {
84
+ const { type: a, values: i } = n[r];
85
+ if (a === "M" && r === 0)
86
+ o.push({ x: i[0], y: i[1] });
87
+ else if (a === "C") {
88
+ const u = o[o.length - 1], c = { x: i[0], y: i[1] }, l = { x: i[2], y: i[3] }, p = { x: i[4], y: i[5] }, f = h(u, c, l, p, s);
89
+ o = [...o, ...f];
126
90
  }
127
91
  }
128
- return n;
92
+ return o;
129
93
  }
130
94
  export {
131
- ye as calculateDistance,
132
- we as calculateDistanceWithRadius,
95
+ Ce as calculateDistance,
96
+ ve as calculateDistanceWithRadius,
133
97
  $e as camelToKebab,
134
98
  Fe as capitalize,
135
- be as clamp,
136
- Qe as cloneDeep,
137
- Te as compareObjects,
138
- b as cover,
139
- ie as createJSONAndSave,
140
- Ce as damp,
141
- ce as debounce,
142
- P as decode,
143
- oe as dispatchSizeChangeEvent,
144
- E as dotCircleCollision,
145
- C as dotRectCollision,
146
- J as easeInCubic,
147
- K as easeInExpo,
99
+ Ee as clamp,
100
+ ke as cloneDeep,
101
+ Be as compareObjects,
102
+ D as contain,
103
+ Q as cover,
104
+ le as createJSONAndSave,
105
+ Ie as damp,
106
+ fe as debounce,
107
+ v as decode,
108
+ ce as dispatchSizeChangeEvent,
109
+ w as dotCircleCollision,
110
+ b as dotRectCollision,
111
+ K as easeInCubic,
112
+ W as easeInExpo,
148
113
  $ as easeInOutCubic,
149
114
  F as easeInOutExpo,
150
115
  G as easeInOutQuad,
151
- H as easeInOutQuart,
152
- W as easeInOutQuint,
153
- X as easeInQuad,
154
- Y as easeInQuart,
155
- Z as easeInQuint,
156
- _ as easeOutCubic,
157
- L as easeOutExpo,
158
- ee as easeOutQuad,
159
- te as easeOutQuart,
160
- ae as easeOutQuint,
161
- S as encode,
162
- N as findParentElement,
163
- j as findScrollParentElement,
164
- w as fixPosition,
116
+ X as easeInOutQuart,
117
+ Y as easeInOutQuint,
118
+ Z as easeInQuad,
119
+ _ as easeInQuart,
120
+ ee as easeInQuint,
121
+ te as easeOutCubic,
122
+ ae as easeOutExpo,
123
+ se as easeOutQuad,
124
+ oe as easeOutQuart,
125
+ ne as easeOutQuint,
126
+ C as encode,
127
+ q as findParentElement,
128
+ L as findScrollParentElement,
129
+ R as fixPosition,
165
130
  Ge as generateId,
166
- U as getAllParentElements,
167
- fe as getCumulativeOffsetLeft,
168
- de as getCumulativeOffsetTop,
169
- xe as getCumulativePosition,
170
- q as getElement,
171
- Le as getElementTransitionDurationMS,
172
- et as getElementTransitionDurationS,
131
+ V as getAllParentElements,
132
+ ge as getCumulativeOffsetLeft,
133
+ be as getCumulativeOffsetTop,
134
+ we as getCumulativePosition,
135
+ H as getElement,
136
+ at as getElementTransitionDurationMS,
137
+ st as getElementTransitionDurationS,
173
138
  m as getPathData,
174
- M as getPointerPosition,
175
- A as getPoints,
176
- O as getRootVariables,
139
+ B as getPointerPosition,
140
+ E as getPoints,
141
+ y as getRootVariables,
177
142
  x as insert,
178
- k as isBrowser,
179
- Be as isESClass,
180
- ke as isNullish,
181
- ze as isObject,
182
- He as isUppercase,
183
- We as kebabToCamel,
184
- Ee as lerp,
185
- se as linear,
186
- ve as mapRange,
187
- y as measureText,
188
- Ne as mergeDeep,
189
- je as mixin,
190
- I as normalize,
191
- Je as nullishCoalescing,
192
- Ue as omit,
193
- Q as parseAttribute,
194
- T as parseAttributeValue,
195
- qe as pick,
196
- Ae as preciseNumber,
197
- Ie as round,
198
- De as roundNumberTo,
199
- v as screenToCartesian,
200
- he as setupDrag,
143
+ T as isBrowser,
144
+ Ne as isESClass,
145
+ je as isNullish,
146
+ Ue as isObject,
147
+ Xe as isUppercase,
148
+ Ye as kebabToCamel,
149
+ Oe as lerp,
150
+ re as linear,
151
+ Se as mapRange,
152
+ z as measureText,
153
+ qe as mergeDeep,
154
+ Le as mixin,
155
+ N as normalize,
156
+ Ke as nullishCoalescing,
157
+ Ve as omit,
158
+ S as parseAttribute,
159
+ M as parseAttributeValue,
160
+ He as pick,
161
+ Qe as preciseNumber,
162
+ Me as round,
163
+ Re as roundNumberTo,
164
+ j as screenToCartesian,
165
+ de as setupDrag,
201
166
  g as shiftArray,
202
- Me as smootherstep,
203
- Oe as smoothstep,
204
- Xe as snakeToDotted,
205
- Se as step,
206
- le as throttle,
207
- Ye as toPascalCase,
208
- Ze as uncapitalize
167
+ Pe as smootherstep,
168
+ Te as smoothstep,
169
+ Ze as snakeToDotted,
170
+ Ae as step,
171
+ me as throttle,
172
+ _e as toPascalCase,
173
+ et as uncapitalize
209
174
  };
@@ -4,10 +4,11 @@ export type Dot2D = {
4
4
  x: number;
5
5
  y: number;
6
6
  };
7
- export type Rect2D = Dot2D & {
7
+ export type Dimension2D = {
8
8
  width: number;
9
9
  height: number;
10
10
  };
11
+ export type Rect2D = Dot2D & Dimension2D;
11
12
  export type Circle = Dot2D & {
12
13
  radius: number;
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -43,6 +43,11 @@
43
43
  "default": "./lib/checkbox/index.js",
44
44
  "types": "./lib/checkbox/index.d.ts"
45
45
  },
46
+ "./class-linked-status": {
47
+ "require": "./lib/class-linked-status/index.cjs",
48
+ "default": "./lib/class-linked-status/index.js",
49
+ "types": "./lib/class-linked-status/index.d.ts"
50
+ },
46
51
  "./connector": {
47
52
  "require": "./lib/connector/index.cjs",
48
53
  "default": "./lib/connector/index.js",
@@ -148,6 +153,11 @@
148
153
  "default": "./lib/order/index.js",
149
154
  "types": "./lib/order/index.d.ts"
150
155
  },
156
+ "./pointer": {
157
+ "require": "./lib/pointer/index.cjs",
158
+ "default": "./lib/pointer/index.js",
159
+ "types": "./lib/pointer/index.d.ts"
160
+ },
151
161
  "./popover": {
152
162
  "require": "./lib/popover/index.cjs",
153
163
  "default": "./lib/popover/index.js",
@@ -178,6 +188,11 @@
178
188
  "default": "./lib/select/index.js",
179
189
  "types": "./lib/select/index.d.ts"
180
190
  },
191
+ "./sequence": {
192
+ "require": "./lib/sequence/index.cjs",
193
+ "default": "./lib/sequence/index.js",
194
+ "types": "./lib/sequence/index.d.ts"
195
+ },
181
196
  "./slicer": {
182
197
  "require": "./lib/slicer/index.cjs",
183
198
  "default": "./lib/slicer/index.js",
@@ -241,6 +256,9 @@
241
256
  "checkbox": [
242
257
  "lib/checkbox/index.d.ts"
243
258
  ],
259
+ "class-linked-status": [
260
+ "lib/class-linked-status/index.d.ts"
261
+ ],
244
262
  "component": [
245
263
  "lib/component/index.d.ts"
246
264
  ],
@@ -307,6 +325,9 @@
307
325
  "order": [
308
326
  "lib/order/index.d.ts"
309
327
  ],
328
+ "pointer": [
329
+ "lib/pointer/index.d.ts"
330
+ ],
310
331
  "popover": [
311
332
  "lib/popover/index.d.ts"
312
333
  ],
@@ -325,6 +346,9 @@
325
346
  "select": [
326
347
  "lib/select/index.d.ts"
327
348
  ],
349
+ "sequence": [
350
+ "lib/sequence/index.d.ts"
351
+ ],
328
352
  "slicer": [
329
353
  "lib/slicer/index.d.ts"
330
354
  ],
@@ -1 +0,0 @@
1
- "use strict";var L=Object.defineProperty,_=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var k=(e,i,t)=>i in e?L(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,N=(e,i)=>{for(var t in i||(i={}))z.call(i,t)&&k(e,t,i[t]);if(O)for(var t of O(i))B.call(i,t)&&k(e,t,i[t]);return e},P=(e,i)=>_(e,j(i));var v=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var s=(e,i,t)=>(v(e,i,"read from private field"),t?t.call(e):i.get(e)),a=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},r=(e,i,t,h)=>(v(e,i,"write to private field"),h?h.call(e,t):i.set(e,t),t);const D=require("./math-GDWEqu7y.cjs"),S=require("./number-yVpzMdbQ.cjs"),c=require("./polyfills-CrcS4RcO.cjs");require("./path-data-polyfill-CXsOR7Oc.cjs");const I=require("./Store-BQGNOHlY.cjs"),M=require("./ticker/index.cjs");var d,f,F,m,C;class R extends I.Store{constructor(t){super(t||0);a(this,d,void 0);a(this,f,void 0);a(this,F,void 0);a(this,m,new I.Store(!1));a(this,C,t=>{this.handleAnimationFrame(t)})}get isRunning(){return s(this,m)}reset(){this.unlistenAnimationFrame(),super.reset()}close(){super.close(),this.unlistenAnimationFrame()}listenAnimationFrame(){s(this,m).current||(s(this,m).current=!0,M.ticker.subscribe(s(this,C),{maxFPS:s(this,d),order:s(this,f),culling:s(this,F)}))}unlistenAnimationFrame(){s(this,m).current&&(s(this,m).current=!1,M.ticker.unsubscribe(s(this,C)))}updateOptions(t){r(this,d,c.nullishCoalescing(t==null?void 0:t.maxFPS,s(this,d))),r(this,f,c.nullishCoalescing(t==null?void 0:t.order,s(this,f))),r(this,F,c.nullishCoalescing(t==null?void 0:t.culling,s(this,F)))}}d=new WeakMap,f=new WeakMap,F=new WeakMap,m=new WeakMap,C=new WeakMap;var n,A,u,l,g,x,b;class E extends R{constructor(t,h){super(t||0);a(this,n,void 0);a(this,A,void 0);a(this,u,void 0);a(this,l,void 0);a(this,g,void 0);a(this,x,void 0);a(this,b,void 0);this.damping=1,this.stiffness=0,this.mass=0,r(this,n,0),r(this,A,0),r(this,u,0),r(this,l,0),r(this,g,0),r(this,x,0),r(this,b,()=>{this.set(s(this,n),!0)}),r(this,u,c.nullishCoalescing(h==null?void 0:h.min,-1/0)),r(this,l,c.nullishCoalescing(h==null?void 0:h.max,1/0)),r(this,n,this.current),this.updateOptions(h),this.listenAnimationFrame()}get target(){return s(this,n)}get direction(){return s(this,A)}get min(){return s(this,u)}set min(t){r(this,u,t),s(this,b).call(this)}get max(){return s(this,l)}set max(t){r(this,l,t),s(this,b).call(this)}get velocity(){return s(this,g)}get speed(){return s(this,x)}get length(){return s(this,l)-s(this,u)}get progress(){return this.length?S.preciseNumber((this.current-s(this,u))/this.length,6):0}get entry(){return P(N({},super.entry),{min:s(this,u),max:s(this,l),length:this.length,direction:this.direction,progress:this.progress})}set(t,h=!1){const y=s(this,n);r(this,n,D.clamp(t,s(this,u),s(this,l))),h&&(this.current=s(this,n)),s(this,n)!==y&&(r(this,A,Math.sign(t-s(this,n))||1),this.listenAnimationFrame())}shift(t,h=!1){this.set(s(this,n)+t,h)}reset(){this.set(this.initial,!0),super.reset()}listenAnimationFrame(){this.current!==this.target&&super.listenAnimationFrame()}updateOptions(t){super.updateOptions(t),this.damping=c.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=c.nullishCoalescing(t==null?void 0:t.mass,this.mass),this.stiffness=c.nullishCoalescing(t==null?void 0:t.stiffness,this.stiffness)}handleAnimationFrame(t){S.preciseNumber(this.current,4)===S.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const h=this.current,y=Math.abs(h-this.target);r(this,x,y/t.elapsed);const q=t.elapsed/1e3;if(this.mass||this.stiffness){const w=(s(this,n)-this.current)*this.stiffness-s(this,g)*this.damping;r(this,g,s(this,g)+w/this.mass*q),this.current+=s(this,g)*q}else this.current=D.damp(this.current,this.target,this.damping,q)}}n=new WeakMap,A=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,x=new WeakMap,b=new WeakMap;exports.Animation=R;exports.Damped=E;