aptechka 0.16.0 → 0.17.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/lib/animation/Animation.d.ts +34 -0
- package/lib/animation/Damped.d.ts +18 -0
- package/lib/animation/Tweened.d.ts +14 -0
- package/lib/animation/index.d.ts +3 -0
- package/lib/attribute/index.d.ts +14 -0
- package/lib/canvas/index.d.ts +34 -0
- package/lib/class-linked-status/index.d.ts +11 -0
- package/lib/connector/index.d.ts +15 -0
- package/lib/controls/AutoplayControls.d.ts +16 -0
- package/lib/controls/Controls.d.ts +8 -0
- package/lib/controls/DragControls.d.ts +15 -0
- package/lib/controls/KeyboardControls.d.ts +13 -0
- package/lib/controls/WheelControls.d.ts +18 -0
- package/lib/controls/index.d.ts +5 -0
- package/lib/css-property/index.d.ts +16 -0
- package/lib/css-unit-parser/index.d.ts +6 -0
- package/lib/css-value-parser/index.d.ts +6 -0
- package/lib/dev/index.d.ts +1 -0
- package/lib/device/Device.d.ts +18 -0
- package/lib/device/Viewport.d.ts +28 -0
- package/lib/device/index.d.ts +2 -0
- package/lib/element-resizer/index.d.ts +9 -0
- package/lib/en3/En3Raycaster.d.ts +20 -0
- package/lib/en3/En3View.d.ts +39 -0
- package/lib/en3/en3.d.ts +36 -0
- package/lib/en3/index.d.ts +7 -0
- package/lib/en3/utils/coverTexture.d.ts +6 -0
- package/lib/en3/utils/dispose.d.ts +2 -0
- package/lib/en3/utils/getCurrentViewport.d.ts +8 -0
- package/lib/en3/utils/traverseMaterials.d.ts +2 -0
- package/lib/en3/utils/traverseMeshes.d.ts +2 -0
- package/lib/image/index.d.ts +10 -0
- package/lib/intersector/index.d.ts +9 -0
- package/lib/ladder/index.d.ts +23 -0
- package/lib/layout-box/index.d.ts +95 -0
- package/lib/loading/index.d.ts +38 -0
- package/lib/media/index.d.ts +11 -0
- package/lib/need_redo_tweaker/CheckboxElement.d.ts +14 -0
- package/lib/need_redo_tweaker/TweakerBooleanManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerColorManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerElement.d.ts +17 -0
- package/lib/need_redo_tweaker/TweakerFieldElement.d.ts +19 -0
- package/lib/need_redo_tweaker/TweakerFolderElement.d.ts +23 -0
- package/lib/need_redo_tweaker/TweakerLinkManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerNumberManagerElement.d.ts +13 -0
- package/lib/need_redo_tweaker/TweakerSelectManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/TweakerStoreManagerElement.d.ts +9 -0
- package/lib/need_redo_tweaker/TweakerStringManagerElement.d.ts +10 -0
- package/lib/need_redo_tweaker/element-constructor/ElementConstructor.d.ts +74 -0
- package/lib/need_redo_tweaker/element-constructor/createStylesheet.d.ts +2 -0
- package/lib/need_redo_tweaker/element-constructor/createTheme.d.ts +12 -0
- package/lib/need_redo_tweaker/element-constructor/index.d.ts +4 -0
- package/lib/need_redo_tweaker/element-constructor/knownSvgTags.d.ts +1 -0
- package/lib/need_redo_tweaker/element-constructor/tags.d.ts +118 -0
- package/lib/need_redo_tweaker/index.cjs +4 -4
- package/lib/need_redo_tweaker/index.d.ts +1 -0
- package/lib/need_redo_tweaker/index.js +1 -2
- package/lib/need_redo_tweaker/select/SelectElement.d.ts +24 -0
- package/lib/need_redo_tweaker/select/SelectHeadElement.d.ts +12 -0
- package/lib/need_redo_tweaker/select/SelectOptionElement.d.ts +13 -0
- package/lib/need_redo_tweaker/select/SelectUserElement.d.ts +6 -0
- package/lib/need_redo_tweaker/select/index.d.ts +4 -0
- package/lib/need_redo_tweaker/theme/index.d.ts +35 -0
- package/lib/need_redo_tweaker/tweakerManagerConstructors.d.ts +14 -0
- package/lib/need_redo_tweaker/tweakerStorage.d.ts +23 -0
- package/lib/notifier/index.d.ts +8 -0
- package/lib/object-DOa0yKM9.js +114 -0
- package/lib/object-HBC5QlzO.cjs +1 -0
- package/lib/order/index.d.ts +22 -0
- package/lib/pointer/Pointer.d.ts +22 -0
- package/lib/pointer/PointerElement.d.ts +13 -0
- package/lib/pointer/index.d.ts +2 -0
- package/lib/popover/PopoverButtonElement.d.ts +14 -0
- package/lib/popover/PopoverElement.d.ts +25 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/scroll/ScrollBulletButtonsElement.d.ts +11 -0
- package/lib/scroll/ScrollButtonElement.d.ts +5 -0
- package/lib/scroll/ScrollElement.d.ts +81 -0
- package/lib/scroll/ScrollSection.d.ts +22 -0
- package/lib/scroll/ScrollSegmentElement.d.ts +62 -0
- package/lib/scroll/ScrollSetButtonElement.d.ts +9 -0
- package/lib/scroll/ScrollStepButtonElement.d.ts +9 -0
- package/lib/scroll/ScrollUserElement.d.ts +6 -0
- package/lib/scroll/ScrollbarElement.d.ts +13 -0
- package/lib/scroll/index.d.ts +6 -0
- package/lib/scroll-entries/index.d.ts +20 -0
- package/lib/sequence/index.d.ts +20 -0
- package/lib/slicer/Letter.d.ts +11 -0
- package/lib/slicer/SlicerElement.d.ts +20 -0
- package/lib/slicer/Word.d.ts +16 -0
- package/lib/slicer/index.d.ts +3 -0
- package/lib/source/SourceClass.d.ts +11 -0
- package/lib/source/SourceElement.d.ts +24 -0
- package/lib/source/SourceManager.d.ts +13 -0
- package/lib/source/SourceSet.d.ts +8 -0
- package/lib/source/index.d.ts +4 -0
- package/lib/store/Composed.d.ts +7 -0
- package/lib/store/Derived.d.ts +7 -0
- package/lib/store/DerivedArray.d.ts +7 -0
- package/lib/store/Resource.d.ts +11 -0
- package/lib/store/Store.d.ts +35 -0
- package/lib/store/StoreRegistry.d.ts +22 -0
- package/lib/store/index.d.ts +6 -0
- package/lib/test/starting-style/index.d.ts +1 -0
- package/lib/ticker/index.d.ts +21 -0
- package/lib/utils/array.d.ts +2 -0
- package/lib/utils/attributes.d.ts +2 -0
- package/lib/utils/browser.d.ts +1 -0
- package/lib/utils/bytes.d.ts +1 -0
- package/lib/utils/canvas.d.ts +7 -0
- package/lib/utils/collisions.d.ts +3 -0
- package/lib/utils/coordinates.d.ts +13 -0
- package/lib/utils/cssom.d.ts +5 -0
- package/lib/utils/decoding.d.ts +2 -0
- package/lib/utils/dom.d.ts +5 -0
- package/lib/utils/easings.d.ts +17 -0
- package/lib/utils/events.d.ts +8 -0
- package/lib/utils/file.d.ts +1 -0
- package/lib/utils/function.d.ts +2 -0
- package/lib/utils/gestures.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +27 -0
- package/lib/utils/index.js +155 -140
- package/lib/utils/jss.d.ts +12 -0
- package/lib/utils/layout.d.ts +3 -0
- package/lib/utils/math.d.ts +11 -0
- package/lib/utils/number.d.ts +3 -0
- package/lib/utils/object.d.ts +9 -0
- package/lib/utils/polyfills.d.ts +1 -0
- package/lib/utils/promises.d.ts +1 -0
- package/lib/utils/string.d.ts +8 -0
- package/lib/utils/style.d.ts +2 -0
- package/lib/utils/ts-shape.d.ts +20 -0
- package/lib/utils/ts-utility.d.ts +26 -0
- package/lib/utils/url.d.ts +9 -0
- package/lib/video/index.d.ts +21 -0
- package/lib/window-resizer/index.d.ts +9 -0
- package/package.json +3 -21
- package/lib/file-BEr-o55N.js +0 -31
- package/lib/file-C9BbxzVU.cjs +0 -1
- package/lib/morph/index.cjs +0 -1
- package/lib/morph/index.js +0 -225
- package/lib/object-CCiXnER2.cjs +0 -1
- package/lib/object-D6MVWB4l.js +0 -85
- package/lib/router/index.cjs +0 -1
- package/lib/router/index.js +0 -266
- package/lib/url-C3dWnJQg.cjs +0 -1
- package/lib/url-DMNfW7uN.js +0 -22
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../attributes-Bf2svn4j.cjs"),E=require("../browser-CpzFX2xg.cjs"),p=require("../canvas-CU5Xjahf.cjs"),h=require("../coordinates-D8Np3cPD.cjs"),m=require("../dom-JBOkFLTh.cjs"),o=require("../easings-DsS5-Kqc.cjs"),a=require("../object-HBC5QlzO.cjs"),S=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-GJLvaNfT.cjs"),g=require("../layout-8ryRAMGJ.cjs"),u=require("../math-GDWEqu7y.cjs"),d=require("../polyfills-CM4SCDTt.cjs"),c=require("../string-DhgS_iFl.cjs"),b=require("../style-At6aDoqG.cjs");function T(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function P(e,t){const n=e.length;t=t%n;const s=new Array(n);for(let i=0;i<n;i++){const r=(i+t)%n;s[r]=e[i]}return s}function w(e,t=2){if(!+e)return"0 Bytes";const n=1024,s=t<0?0:t,i=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,r)).toFixed(s))} ${i[r]}`}function x(e,t){return e.x<t.x+t.width&&e.x>t.x&&e.y<t.y+t.height&&e.y>t.y}function B(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)<t.radius}function y(e,t){const n=e.styleMap.get(t);if(n){const s=n.toString();return s.startsWith("var")?y(e,s.slice(4,-1)):s}}function Q(...e){const t={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(s=>{s instanceof CSSStyleRule&&s.selectorText===":root"&&e.forEach(i=>{const r=y(s,i);r&&(t[i]=r)})})}),e.forEach(n=>{t[n]||console.warn(`variable named ${n} not found`)}),t}function q(e){const t=window.atob(e);return decodeURIComponent(window.escape(t))}function D(e){const t=window.unescape(encodeURIComponent(e));return window.btoa(t)}function v(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function A(e,t=""){t=t.endsWith("/")?t.slice(0,-1):t,e=e.replace(t,""),e.startsWith("/")&&(e=e.slice(1));const n=e.split("#"),s=n[0].split("?"),i=s[0].startsWith("/")?s[0]:"/"+s[0],r=t+i,f=s==null?void 0:s[1],l=n==null?void 0:n[1];return{leaf:i,pathname:r,parameters:f,hash:l}}function z(e="/"){return e.endsWith("/")||(e+="/"),e.startsWith("/")||(e+="/"),e}function R(e,t,n,s){const i=n||location.search,r=s?s.startsWith("#")?s:"#"+s:"",f=i?i.startsWith("?")?i:"?"+i:"",l=`${t}${r}${f}`;e==="push"?history.pushState(null,"",l):e==="replace"&&history.replaceState(null,"",l)}exports.parseAttribute=C.parseAttribute;exports.parseAttributeValue=C.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=p.contain;exports.cover=p.cover;exports.fixPosition=p.fixPosition;exports.measureText=p.measureText;exports.getPointerPosition=h.getPointerPosition;exports.normalize=h.normalize;exports.screenToCartesian=h.screenToCartesian;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.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.cloneDeep=a.cloneDeep;exports.compareObjects=a.compareObjects;exports.createJSONAndSave=a.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=a.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=a.dispatchSizeChangeEvent;exports.isESClass=a.isESClass;exports.isNullish=a.isNullish;exports.isObject=a.isObject;exports.mergeDeep=a.mergeDeep;exports.mixin=a.mixin;exports.omit=a.omit;exports.pick=a.pick;exports.debounce=S.debounce;exports.throttle=S.throttle;exports.setupDrag=I.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.round=u.round;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.nullishCoalescing=d.nullishCoalescing;exports.preciseNumber=d.preciseNumber;exports.roundNumberTo=d.roundNumberTo;exports.toStep=d.toStep;exports.camelToKebab=c.camelToKebab;exports.capitalize=c.capitalize;exports.generateId=c.generateId;exports.isUppercase=c.isUppercase;exports.kebabToCamel=c.kebabToCamel;exports.snakeToDotted=c.snakeToDotted;exports.toPascalCase=c.toPascalCase;exports.uncapitalize=c.uncapitalize;exports.getElementTransitionDurationMS=b.getElementTransitionDurationMS;exports.getElementTransitionDurationS=b.getElementTransitionDurationS;exports.changeHistory=R;exports.decode=D;exports.dotCircleCollision=B;exports.dotRectCollision=x;exports.encode=q;exports.formatBytes=w;exports.getRootVariables=Q;exports.insert=T;exports.normalizeBase=z;exports.shiftArray=P;exports.splitPath=A;exports.wait=v;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './array';
|
|
2
|
+
export * from './attributes';
|
|
3
|
+
export * from './browser';
|
|
4
|
+
export * from './bytes';
|
|
5
|
+
export * from './canvas';
|
|
6
|
+
export * from './collisions';
|
|
7
|
+
export * from './coordinates';
|
|
8
|
+
export * from './cssom';
|
|
9
|
+
export * from './decoding';
|
|
10
|
+
export * from './dom';
|
|
11
|
+
export * from './easings';
|
|
12
|
+
export * from './events';
|
|
13
|
+
export * from './file';
|
|
14
|
+
export * from './function';
|
|
15
|
+
export * from './gestures';
|
|
16
|
+
export * from './jss';
|
|
17
|
+
export * from './layout';
|
|
18
|
+
export * from './math';
|
|
19
|
+
export * from './number';
|
|
20
|
+
export * from './object';
|
|
21
|
+
export * from './polyfills';
|
|
22
|
+
export * from './promises';
|
|
23
|
+
export * from './string';
|
|
24
|
+
export * from './style';
|
|
25
|
+
export * from './ts-shape';
|
|
26
|
+
export * from './ts-utility';
|
|
27
|
+
export * from './url';
|
package/lib/utils/index.js
CHANGED
|
@@ -1,36 +1,34 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import { a as
|
|
4
|
-
import { g as
|
|
5
|
-
import { f as
|
|
6
|
-
import { c as
|
|
7
|
-
import { c as
|
|
8
|
-
import { d as
|
|
9
|
-
import { s as
|
|
10
|
-
import { c as
|
|
11
|
-
import { g as
|
|
12
|
-
import { e as
|
|
13
|
-
import { n as
|
|
14
|
-
import { c as
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function i(a, e, ...t) {
|
|
19
|
-
return [...a.slice(0, e), ...t, ...a.slice(e)];
|
|
1
|
+
import { a as O, p as b } from "../attributes-69we3byR.js";
|
|
2
|
+
import { i as I } from "../browser-0zX67oeU.js";
|
|
3
|
+
import { a as T, c as A, f as Q, m as W } from "../canvas-DeZ0SLUJ.js";
|
|
4
|
+
import { g as M, n as R, s as z } from "../coordinates-CgdGoSYs.js";
|
|
5
|
+
import { f as v, b as $, a as j, g as N } from "../dom-0S_WDL4g.js";
|
|
6
|
+
import { c as U, n as F, f as K, p as q, b as G, i as H, m as J, e as L, g as Y, j as Z, d as X, o as _, a as tt, h as et, k as st, l as at } from "../easings-BKi40vHz.js";
|
|
7
|
+
import { b as nt, f as rt, c as it, a as ct, d as ut, g as lt, e as ft, i as pt, m as mt, h as ht, o as dt, p as gt } from "../object-DOa0yKM9.js";
|
|
8
|
+
import { d as St, t as yt } from "../function-C10DGppn.js";
|
|
9
|
+
import { s as Et } from "../gestures-D2Fdra_G.js";
|
|
10
|
+
import { c as Ot, s as bt } from "../jss-CjccJC-K.js";
|
|
11
|
+
import { g as It, a as Pt, b as Tt } from "../layout-HoBT_Da2.js";
|
|
12
|
+
import { e as Qt, f as Wt, c as Dt, d as Mt, l as Rt, m as zt, r as kt, b as vt, a as $t, s as jt } from "../math-BOBiC4TN.js";
|
|
13
|
+
import { n as Vt, p as Ut, r as Ft, t as Kt } from "../polyfills-X6KXuHg-.js";
|
|
14
|
+
import { c as Gt, a as Ht, g as Jt, i as Lt, k as Yt, s as Zt, t as Xt, u as _t } from "../string-f0Dnk0L1.js";
|
|
15
|
+
import { g as ee, a as se } from "../style-j2TwriJ_.js";
|
|
16
|
+
function u(t, e, ...s) {
|
|
17
|
+
return [...t.slice(0, e), ...s, ...t.slice(e)];
|
|
20
18
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
e = e %
|
|
24
|
-
const
|
|
25
|
-
for (let o = 0; o <
|
|
26
|
-
const n = (o + e) %
|
|
27
|
-
|
|
19
|
+
function l(t, e) {
|
|
20
|
+
const s = t.length;
|
|
21
|
+
e = e % s;
|
|
22
|
+
const a = new Array(s);
|
|
23
|
+
for (let o = 0; o < s; o++) {
|
|
24
|
+
const n = (o + e) % s;
|
|
25
|
+
a[n] = t[o];
|
|
28
26
|
}
|
|
29
|
-
return
|
|
27
|
+
return a;
|
|
30
28
|
}
|
|
31
|
-
function
|
|
32
|
-
if (!+
|
|
33
|
-
const
|
|
29
|
+
function f(t, e = 2) {
|
|
30
|
+
if (!+t) return "0 Bytes";
|
|
31
|
+
const s = 1024, a = e < 0 ? 0 : e, o = [
|
|
34
32
|
"Bytes",
|
|
35
33
|
"KiB",
|
|
36
34
|
"MiB",
|
|
@@ -40,135 +38,152 @@ function u(a, e = 2) {
|
|
|
40
38
|
"EiB",
|
|
41
39
|
"ZiB",
|
|
42
40
|
"YiB"
|
|
43
|
-
], n = Math.floor(Math.log(
|
|
44
|
-
return `${parseFloat((
|
|
41
|
+
], n = Math.floor(Math.log(t) / Math.log(s));
|
|
42
|
+
return `${parseFloat((t / Math.pow(s, n)).toFixed(a))} ${o[n]}`;
|
|
45
43
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
44
|
+
function p(t, e) {
|
|
45
|
+
return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
|
|
48
46
|
}
|
|
49
|
-
function
|
|
50
|
-
return Math.sqrt((
|
|
47
|
+
function m(t, e) {
|
|
48
|
+
return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
|
|
51
49
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
return
|
|
50
|
+
function c(t, e) {
|
|
51
|
+
const s = t.styleMap.get(e);
|
|
52
|
+
if (s) {
|
|
53
|
+
const a = s.toString();
|
|
54
|
+
return a.startsWith("var") ? c(t, a.slice(4, -1)) : a;
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
|
-
function
|
|
57
|
+
function h(...t) {
|
|
60
58
|
const e = {};
|
|
61
|
-
return Array.from(document.styleSheets).forEach((
|
|
62
|
-
Array.from(
|
|
63
|
-
|
|
64
|
-
const n =
|
|
59
|
+
return Array.from(document.styleSheets).forEach((s) => {
|
|
60
|
+
Array.from(s.cssRules).forEach((a) => {
|
|
61
|
+
a instanceof CSSStyleRule && a.selectorText === ":root" && t.forEach((o) => {
|
|
62
|
+
const n = c(a, o);
|
|
65
63
|
n && (e[o] = n);
|
|
66
64
|
});
|
|
67
65
|
});
|
|
68
|
-
}),
|
|
69
|
-
e[
|
|
66
|
+
}), t.forEach((s) => {
|
|
67
|
+
e[s] || console.warn(`variable named ${s} not found`);
|
|
70
68
|
}), e;
|
|
71
69
|
}
|
|
72
|
-
function
|
|
73
|
-
const e = window.atob(
|
|
70
|
+
function d(t) {
|
|
71
|
+
const e = window.atob(t);
|
|
74
72
|
return decodeURIComponent(window.escape(e));
|
|
75
73
|
}
|
|
76
|
-
function
|
|
77
|
-
const e = window.unescape(encodeURIComponent(
|
|
74
|
+
function g(t) {
|
|
75
|
+
const e = window.unescape(encodeURIComponent(t));
|
|
78
76
|
return window.btoa(e);
|
|
79
77
|
}
|
|
80
|
-
function
|
|
78
|
+
function x(t) {
|
|
81
79
|
return new Promise((e) => {
|
|
82
80
|
setTimeout(() => {
|
|
83
81
|
e();
|
|
84
|
-
},
|
|
82
|
+
}, t);
|
|
85
83
|
});
|
|
86
84
|
}
|
|
85
|
+
function S(t, e = "") {
|
|
86
|
+
e = e.endsWith("/") ? e.slice(0, -1) : e, t = t.replace(e, ""), t.startsWith("/") && (t = t.slice(1));
|
|
87
|
+
const s = t.split("#"), a = s[0].split("?"), o = a[0].startsWith("/") ? a[0] : "/" + a[0], n = e + o, i = a == null ? void 0 : a[1], r = s == null ? void 0 : s[1];
|
|
88
|
+
return {
|
|
89
|
+
leaf: o,
|
|
90
|
+
pathname: n,
|
|
91
|
+
parameters: i,
|
|
92
|
+
hash: r
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function y(t = "/") {
|
|
96
|
+
return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
|
|
97
|
+
}
|
|
98
|
+
function C(t, e, s, a) {
|
|
99
|
+
const o = s || location.search, n = a ? a.startsWith("#") ? a : "#" + a : "", i = o ? o.startsWith("?") ? o : "?" + o : "", r = `${e}${n}${i}`;
|
|
100
|
+
t === "push" ? history.pushState(null, "", r) : t === "replace" && history.replaceState(null, "", r);
|
|
101
|
+
}
|
|
87
102
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
103
|
+
Qt as calculateDistance,
|
|
104
|
+
Wt as calculateDistanceWithRadius,
|
|
105
|
+
Gt as camelToKebab,
|
|
106
|
+
Ht as capitalize,
|
|
107
|
+
C as changeHistory,
|
|
108
|
+
Dt as clamp,
|
|
109
|
+
nt as cloneDeep,
|
|
110
|
+
rt as compareObjects,
|
|
111
|
+
T as contain,
|
|
112
|
+
A as cover,
|
|
113
|
+
it as createJSONAndSave,
|
|
114
|
+
Ot as createStylesheet,
|
|
115
|
+
Mt as damp,
|
|
116
|
+
St as debounce,
|
|
117
|
+
g as decode,
|
|
118
|
+
ct as dispatchBeforeSizeChangeEvent,
|
|
119
|
+
ut as dispatchSizeChangeEvent,
|
|
120
|
+
m as dotCircleCollision,
|
|
121
|
+
p as dotRectCollision,
|
|
122
|
+
U as easeInCubic,
|
|
123
|
+
F as easeInExpo,
|
|
124
|
+
K as easeInOutCubic,
|
|
125
|
+
q as easeInOutExpo,
|
|
126
|
+
G as easeInOutQuad,
|
|
127
|
+
H as easeInOutQuart,
|
|
128
|
+
J as easeInOutQuint,
|
|
129
|
+
L as easeInQuad,
|
|
130
|
+
Y as easeInQuart,
|
|
131
|
+
Z as easeInQuint,
|
|
132
|
+
X as easeOutCubic,
|
|
133
|
+
_ as easeOutExpo,
|
|
134
|
+
tt as easeOutQuad,
|
|
135
|
+
et as easeOutQuart,
|
|
136
|
+
st as easeOutQuint,
|
|
137
|
+
d as encode,
|
|
138
|
+
v as findParentElement,
|
|
139
|
+
$ as findScrollParentElement,
|
|
140
|
+
Q as fixPosition,
|
|
141
|
+
f as formatBytes,
|
|
142
|
+
Jt as generateId,
|
|
143
|
+
j as getAllParentElements,
|
|
144
|
+
It as getCumulativeOffsetLeft,
|
|
145
|
+
Pt as getCumulativeOffsetTop,
|
|
146
|
+
Tt as getCumulativePosition,
|
|
147
|
+
N as getElement,
|
|
148
|
+
ee as getElementTransitionDurationMS,
|
|
149
|
+
se as getElementTransitionDurationS,
|
|
150
|
+
M as getPointerPosition,
|
|
151
|
+
h as getRootVariables,
|
|
152
|
+
u as insert,
|
|
153
|
+
I as isBrowser,
|
|
154
|
+
lt as isESClass,
|
|
155
|
+
ft as isNullish,
|
|
156
|
+
pt as isObject,
|
|
157
|
+
Lt as isUppercase,
|
|
158
|
+
Yt as kebabToCamel,
|
|
159
|
+
Rt as lerp,
|
|
160
|
+
at as linear,
|
|
161
|
+
zt as mapRange,
|
|
162
|
+
W as measureText,
|
|
163
|
+
mt as mergeDeep,
|
|
164
|
+
ht as mixin,
|
|
165
|
+
R as normalize,
|
|
166
|
+
y as normalizeBase,
|
|
167
|
+
Vt as nullishCoalescing,
|
|
168
|
+
dt as omit,
|
|
169
|
+
O as parseAttribute,
|
|
170
|
+
b as parseAttributeValue,
|
|
171
|
+
gt as pick,
|
|
172
|
+
Ut as preciseNumber,
|
|
173
|
+
kt as round,
|
|
174
|
+
Ft as roundNumberTo,
|
|
175
|
+
z as screenToCartesian,
|
|
176
|
+
Et as setupDrag,
|
|
177
|
+
l as shiftArray,
|
|
178
|
+
vt as smootherstep,
|
|
179
|
+
$t as smoothstep,
|
|
180
|
+
Zt as snakeToDotted,
|
|
181
|
+
S as splitPath,
|
|
182
|
+
jt as step,
|
|
183
|
+
bt as styleToString,
|
|
184
|
+
yt as throttle,
|
|
185
|
+
Xt as toPascalCase,
|
|
186
|
+
Kt as toStep,
|
|
187
|
+
_t as uncapitalize,
|
|
188
|
+
x as wait
|
|
174
189
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type StyleToken = Exclude<Extract<keyof CSSStyleDeclaration, string> | `--${string}`, 'length' | 'parentRule'>;
|
|
2
|
+
export type StyleAttribute = Partial<{
|
|
3
|
+
[K in StyleToken]: string | number;
|
|
4
|
+
}>;
|
|
5
|
+
export type StyleWrapper = {
|
|
6
|
+
[key: string]: object | StyleAttribute;
|
|
7
|
+
};
|
|
8
|
+
export type Style = StyleAttribute | {
|
|
9
|
+
[key: string]: StyleWrapper | StyleAttribute;
|
|
10
|
+
};
|
|
11
|
+
export declare function styleToString(object: Style): string;
|
|
12
|
+
export declare function createStylesheet(object: Style): CSSStyleSheet;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const getCumulativePosition: (target: HTMLElement, from?: "offsetLeft" | "offsetTop", stopElement?: HTMLElement) => number;
|
|
2
|
+
export declare const getCumulativeOffsetLeft: (target: HTMLElement, stopElement?: HTMLElement) => number;
|
|
3
|
+
export declare const getCumulativeOffsetTop: (target: HTMLElement, stopElement?: HTMLElement) => number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dot2D } from './ts-shape.js';
|
|
2
|
+
export declare function lerp(a: number, b: number, c: number): number;
|
|
3
|
+
export declare function damp(a: number, b: number, c: number, dt: number): number;
|
|
4
|
+
export declare function step(edge: number, value: number, x?: number, y?: number): number;
|
|
5
|
+
export declare function round(number: number, precision?: number): number;
|
|
6
|
+
export declare function clamp(number: number, min?: number, max?: number): number;
|
|
7
|
+
export declare function mapRange(value: number, rangeA: [number, number], rangeB: [number, number]): number;
|
|
8
|
+
export declare function smoothstep(x: number, min: number, max: number): number;
|
|
9
|
+
export declare function smootherstep(x: number, min: number, max: number): number;
|
|
10
|
+
export declare function calculateDistance(d1: Dot2D, d2: Dot2D): number;
|
|
11
|
+
export declare function calculateDistanceWithRadius(x1: number, y1: number, r1: number, x2: number, y2: number, r2: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function isObject(value: any): value is object;
|
|
2
|
+
export declare function cloneDeep<T>(obj: T): T;
|
|
3
|
+
export declare function mergeDeep(target: object, source: object, isObjectFunction?: typeof isObject): object;
|
|
4
|
+
export declare function isNullish(value: any): boolean;
|
|
5
|
+
export declare function compareObjects(obj1: any, obj2: any): boolean;
|
|
6
|
+
export declare function pick<T extends object, R extends keyof T>(object: T, keys: Array<R>): Pick<T, R>;
|
|
7
|
+
export declare function omit<T extends object, R extends keyof T>(object: T, keys: Array<R>): Omit<T, R>;
|
|
8
|
+
export declare function isESClass(fn: Function): boolean;
|
|
9
|
+
export declare function mixin(baseClass: any, ...mixins: any[]): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nullishCoalescing<D, V = D>(value: V, defaultValue: D): D | (V & ({} | null));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function wait(dur: number): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function kebabToCamel(kebab: string, capitalize?: boolean): string;
|
|
2
|
+
export declare function camelToKebab(camelCaseString: string): string;
|
|
3
|
+
export declare function snakeToDotted(snake: string): string;
|
|
4
|
+
export declare function toPascalCase(str: string): string;
|
|
5
|
+
export declare function capitalize(string: string, everyWord?: boolean): string;
|
|
6
|
+
export declare function uncapitalize(string: string, everyWord?: boolean): string;
|
|
7
|
+
export declare function generateId(length: number, characters?: string): string;
|
|
8
|
+
export declare function isUppercase(string: string): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type Axes2D = 'x' | 'y';
|
|
2
|
+
export type Axes3D = Axes2D | 'z';
|
|
3
|
+
export type Dot2D = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export type Dimension2D = {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
export type Rect2D = Dot2D & Dimension2D;
|
|
12
|
+
export type Circle = Dot2D & {
|
|
13
|
+
radius: number;
|
|
14
|
+
};
|
|
15
|
+
export type Dot3D = Dot2D & {
|
|
16
|
+
z: number;
|
|
17
|
+
};
|
|
18
|
+
export type Rect3D = Rect2D & {
|
|
19
|
+
depth: number;
|
|
20
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type NestedKeys<T> = T extends Node ? '' : T extends object ? {
|
|
2
|
+
[K in keyof T]: T[K] extends infer U ? `${Extract<K, string>}${NestedKeys<U> extends '' ? '' : '.'}${NestedKeys<U>}` : never;
|
|
3
|
+
}[keyof T] : '';
|
|
4
|
+
export type NestedValueOf<Obj, Key extends string> = Obj extends object ? Key extends `${infer Parent}.${infer Leaf}` ? Parent extends keyof Obj ? NestedValueOf<Obj[Parent], Leaf> : never : Key extends keyof Obj ? Obj[Key] : never : never;
|
|
5
|
+
export type Tail<T extends any[]> = ((...t: T) => void) extends (h: any, ...r: infer R) => void ? R : never;
|
|
6
|
+
export type DeepOmit<T, Path extends string[]> = T extends object ? Path['length'] extends 1 ? Omit<T, Path[0]> : {
|
|
7
|
+
[K in keyof T]: K extends Path[0] ? DeepOmit<T[K], Tail<Path>> : T[K];
|
|
8
|
+
} : T;
|
|
9
|
+
export type DeepPartial<T> = {
|
|
10
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
11
|
+
};
|
|
12
|
+
export type Requiredish<T> = {
|
|
13
|
+
[K in keyof Required<T>]: T[K];
|
|
14
|
+
};
|
|
15
|
+
export type WithRequired<T, K extends keyof T> = T & {
|
|
16
|
+
[P in K]-?: T[P];
|
|
17
|
+
};
|
|
18
|
+
export type Split<S extends string, D extends string> = string extends S ? string[] : S extends '' ? [] : S extends `${infer T}${D}${infer U}` ? [T, ...Split<U, D>] : [S];
|
|
19
|
+
export type SplitFirst<S extends string, D extends string> = string extends S ? string[] : S extends '' ? [] : S extends `${infer T}${D}${infer U}` ? [T, U] : [S];
|
|
20
|
+
export type KebabToCamel<S extends string> = S extends `${infer T}-${infer U}` ? `${T}${Capitalize<KebabToCamel<U>>}` : S;
|
|
21
|
+
export type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
|
|
22
|
+
export type UndefIndex<T extends any[], I extends number> = {
|
|
23
|
+
[P in keyof T]: P extends Exclude<keyof T, keyof any[]> ? P extends `${I}` ? undefined : T[P] : T[P];
|
|
24
|
+
};
|
|
25
|
+
export type FilterUndefined<T extends any[]> = T extends [] ? [] : T extends [infer H, ...infer R] ? H extends undefined ? FilterUndefined<R> : [H, ...FilterUndefined<R>] : T;
|
|
26
|
+
export type SpliceTuple<T extends any[], I extends number> = FilterUndefined<UndefIndex<T, I>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function splitPath(value: string, base?: string): {
|
|
2
|
+
leaf: string;
|
|
3
|
+
pathname: string;
|
|
4
|
+
parameters: string;
|
|
5
|
+
hash: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function normalizeBase(base?: string): string;
|
|
8
|
+
export type ChangeHistoryAction = 'replace' | 'push' | 'none';
|
|
9
|
+
export declare function changeHistory(action: ChangeHistoryAction, pathname: string, parameters?: string | undefined, hash?: string | undefined): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SourceElement } from '../source';
|
|
2
|
+
export interface ReadyStateChangeEventDetail {
|
|
3
|
+
readyState: number;
|
|
4
|
+
progress: number;
|
|
5
|
+
}
|
|
6
|
+
export type ReadyStateChangeEvent = CustomEvent<ReadyStateChangeEventDetail>;
|
|
7
|
+
export declare class VideoElement extends SourceElement<HTMLVideoElement> {
|
|
8
|
+
#private;
|
|
9
|
+
protected connectedCallback(): void;
|
|
10
|
+
protected disconnectedCallback(): void;
|
|
11
|
+
protected createConsumer(): HTMLVideoElement;
|
|
12
|
+
protected consumeSource(url: string | null): void;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'e-video': VideoElement;
|
|
17
|
+
}
|
|
18
|
+
interface HTMLElementEventMap {
|
|
19
|
+
readyStateChange: ReadyStateChangeEvent;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Notifier } from '../notifier';
|
|
2
|
+
export type WindowResizerCallback = () => void;
|
|
3
|
+
export declare const dispatchWindowResizeEvent: (cause?: any) => void;
|
|
4
|
+
export declare class WindowResizer extends Notifier<WindowResizerCallback> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
subscribe(callback: WindowResizerCallback, order?: number): () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const windowResizer: WindowResizer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -113,11 +113,6 @@
|
|
|
113
113
|
"default": "./lib/media/index.js",
|
|
114
114
|
"types": "./lib/media/index.d.ts"
|
|
115
115
|
},
|
|
116
|
-
"./morph": {
|
|
117
|
-
"require": "./lib/morph/index.cjs",
|
|
118
|
-
"default": "./lib/morph/index.js",
|
|
119
|
-
"types": "./lib/morph/index.d.ts"
|
|
120
|
-
},
|
|
121
116
|
"./notifier": {
|
|
122
117
|
"require": "./lib/notifier/index.cjs",
|
|
123
118
|
"default": "./lib/notifier/index.js",
|
|
@@ -138,11 +133,6 @@
|
|
|
138
133
|
"default": "./lib/popover/index.js",
|
|
139
134
|
"types": "./lib/popover/index.d.ts"
|
|
140
135
|
},
|
|
141
|
-
"./router": {
|
|
142
|
-
"require": "./lib/router/index.cjs",
|
|
143
|
-
"default": "./lib/router/index.js",
|
|
144
|
-
"types": "./lib/router/index.d.ts"
|
|
145
|
-
},
|
|
146
136
|
"./scroll": {
|
|
147
137
|
"require": "./lib/scroll/index.cjs",
|
|
148
138
|
"default": "./lib/scroll/index.js",
|
|
@@ -276,9 +266,6 @@
|
|
|
276
266
|
"media": [
|
|
277
267
|
"lib/media/index.d.ts"
|
|
278
268
|
],
|
|
279
|
-
"morph": [
|
|
280
|
-
"lib/morph/index.d.ts"
|
|
281
|
-
],
|
|
282
269
|
"notifier": [
|
|
283
270
|
"lib/notifier/index.d.ts"
|
|
284
271
|
],
|
|
@@ -291,9 +278,6 @@
|
|
|
291
278
|
"popover": [
|
|
292
279
|
"lib/popover/index.d.ts"
|
|
293
280
|
],
|
|
294
|
-
"router": [
|
|
295
|
-
"lib/router/index.d.ts"
|
|
296
|
-
],
|
|
297
281
|
"scroll": [
|
|
298
282
|
"lib/scroll/index.d.ts"
|
|
299
283
|
],
|
|
@@ -345,12 +329,10 @@
|
|
|
345
329
|
},
|
|
346
330
|
"dependencies": {
|
|
347
331
|
"detect-gpu": "^5.0.42",
|
|
348
|
-
"three": "^0.167.1"
|
|
349
|
-
"urlpattern-polyfill": "^10.0.0"
|
|
332
|
+
"three": "^0.167.1"
|
|
350
333
|
},
|
|
351
334
|
"peerDependencies": {
|
|
352
335
|
"detect-gpu": "^5.0.42",
|
|
353
|
-
"three": "^0.167.1"
|
|
354
|
-
"urlpattern-polyfill": "^10.0.0"
|
|
336
|
+
"three": "^0.167.1"
|
|
355
337
|
}
|
|
356
338
|
}
|