aptechka 0.10.0 → 0.10.1

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,24 +1,24 @@
1
- import { a as h, p as b } from "../attributes-69we3byR.js";
2
- import { i as E } from "../browser-0zX67oeU.js";
3
- import { a as y, c as O, f as w, m as B } from "../canvas-DeZ0SLUJ.js";
4
- import { g as v, n as P, s as T } from "../coordinates-CgdGoSYs.js";
5
- import { f as Q, b as D, g as M, a as R } from "../dom-P5QbAASX.js";
6
- import { c as k, n as j, f as N, p as V, b as U, i as $, m as F, e as K, g as W, j as q, d as G, o as H, a as J, h as L, k as Y, l as Z } from "../easings-BKi40vHz.js";
7
- import { d as _, a as ee } from "../events-CJTUMSLU.js";
8
- import { c as te } from "../file-lxi_oXJf.js";
9
- import { d as oe, t as ne } from "../function-C10DGppn.js";
10
- import { s as ie } from "../gestures-D2Fdra_G.js";
11
- import { g as ue, a as le, b as fe } from "../layout-HoBT_Da2.js";
12
- import { e as me, f as de, c as ge, d as xe, l as he, m as be, r as Ce, b as Ee, a as Se, s as ye } from "../math-BOBiC4TN.js";
13
- import { n as we, p as Be, r as Ie, t as ve } from "../polyfills-X6KXuHg-.js";
14
- import { c as Te, d as Ae, i as Qe, b as De, a as Me, m as Re, e as ze, o as ke, p as je } from "../object-D6MVWB4l.js";
15
- import { c as Ve, a as Ue, g as $e, i as Fe, k as Ke, s as We, t as qe, u as Ge } from "../string-f0Dnk0L1.js";
16
- import { g as Je, a as Le } from "../style-j2TwriJ_.js";
17
- import { c as Ze, n as Xe, s as _e } from "../url-DMNfW7uN.js";
1
+ import { a as b, p as C } from "../attributes-69we3byR.js";
2
+ import { i as w } from "../browser-0zX67oeU.js";
3
+ import { a as y, c as O, f as B, m as I } from "../canvas-DeZ0SLUJ.js";
4
+ import { g as T, n as v, s as A } from "../coordinates-CgdGoSYs.js";
5
+ import { f as D, b as M, g as R, a as z } from "../dom-P5QbAASX.js";
6
+ import { c as j, n as N, f as V, p as U, b as $, i as F, m as K, e as W, g as q, j as G, d as H, o as J, a as L, h as Y, k as Z, l as X } from "../easings-BKi40vHz.js";
7
+ import { d as ee, a as ae } from "../events-CJTUMSLU.js";
8
+ import { c as se } from "../file-lxi_oXJf.js";
9
+ import { d as ne, t as re } from "../function-C10DGppn.js";
10
+ import { s as ue } from "../gestures-D2Fdra_G.js";
11
+ import { g as le, a as fe, b as pe } from "../layout-HoBT_Da2.js";
12
+ import { e as de, f as ge, c as xe, d as he, l as be, m as Ce, r as Ee, b as we, a as Se, s as ye } from "../math-BOBiC4TN.js";
13
+ import { n as Be, p as Ie, r as Pe, t as Te } from "../polyfills-X6KXuHg-.js";
14
+ import { c as Ae, d as Qe, i as De, b as Me, a as Re, m as ze, e as ke, o as je, p as Ne } from "../object-D6MVWB4l.js";
15
+ import { c as Ue, a as $e, g as Fe, i as Ke, k as We, s as qe, t as Ge, u as He } from "../string-f0Dnk0L1.js";
16
+ import { g as Le, a as Ye } from "../style-j2TwriJ_.js";
17
+ import { c as Xe, n as _e, s as ea } from "../url-DMNfW7uN.js";
18
18
  function i(a, e, ...t) {
19
19
  return [...a.slice(0, e), ...t, ...a.slice(e)];
20
20
  }
21
- function c(a, e) {
21
+ function u(a, e) {
22
22
  const t = a.length;
23
23
  e = e % t;
24
24
  const s = new Array(t);
@@ -28,7 +28,7 @@ function c(a, e) {
28
28
  }
29
29
  return s;
30
30
  }
31
- function u(a, e = 2) {
31
+ function c(a, e = 2) {
32
32
  if (!+a)
33
33
  return "0 Bytes";
34
34
  const t = 1024, s = e < 0 ? 0 : e, o = [
@@ -78,88 +78,96 @@ function d(a) {
78
78
  const e = window.unescape(encodeURIComponent(a));
79
79
  return window.btoa(e);
80
80
  }
81
+ function g(a) {
82
+ return new Promise((e) => {
83
+ setTimeout(() => {
84
+ e();
85
+ }, a);
86
+ });
87
+ }
81
88
  export {
82
- me as calculateDistance,
83
- de as calculateDistanceWithRadius,
84
- Ve as camelToKebab,
85
- Ue as capitalize,
86
- Ze as changeHistory,
87
- ge as clamp,
88
- Te as cloneDeep,
89
- Ae as compareObjects,
89
+ de as calculateDistance,
90
+ ge as calculateDistanceWithRadius,
91
+ Ue as camelToKebab,
92
+ $e as capitalize,
93
+ Xe as changeHistory,
94
+ xe as clamp,
95
+ Ae as cloneDeep,
96
+ Qe as compareObjects,
90
97
  y as contain,
91
98
  O as cover,
92
- te as createJSONAndSave,
93
- xe as damp,
94
- oe as debounce,
99
+ se as createJSONAndSave,
100
+ he as damp,
101
+ ne as debounce,
95
102
  d as decode,
96
- _ as dispatchBeforeSizeChangeEvent,
97
- ee as dispatchSizeChangeEvent,
103
+ ee as dispatchBeforeSizeChangeEvent,
104
+ ae as dispatchSizeChangeEvent,
98
105
  f as dotCircleCollision,
99
106
  l as dotRectCollision,
100
- k as easeInCubic,
101
- j as easeInExpo,
102
- N as easeInOutCubic,
103
- V as easeInOutExpo,
104
- U as easeInOutQuad,
105
- $ as easeInOutQuart,
106
- F as easeInOutQuint,
107
- K as easeInQuad,
108
- W as easeInQuart,
109
- q as easeInQuint,
110
- G as easeOutCubic,
111
- H as easeOutExpo,
112
- J as easeOutQuad,
113
- L as easeOutQuart,
114
- Y as easeOutQuint,
107
+ j as easeInCubic,
108
+ N as easeInExpo,
109
+ V as easeInOutCubic,
110
+ U as easeInOutExpo,
111
+ $ as easeInOutQuad,
112
+ F as easeInOutQuart,
113
+ K as easeInOutQuint,
114
+ W as easeInQuad,
115
+ q as easeInQuart,
116
+ G as easeInQuint,
117
+ H as easeOutCubic,
118
+ J as easeOutExpo,
119
+ L as easeOutQuad,
120
+ Y as easeOutQuart,
121
+ Z as easeOutQuint,
115
122
  m as encode,
116
- Q as findParentElement,
117
- D as findScrollParentElement,
118
- w as fixPosition,
119
- u as formatBytes,
120
- $e as generateId,
121
- M as getAllParentElements,
122
- ue as getCumulativeOffsetLeft,
123
- le as getCumulativeOffsetTop,
124
- fe as getCumulativePosition,
125
- R as getElement,
126
- Je as getElementTransitionDurationMS,
127
- Le as getElementTransitionDurationS,
128
- v as getPointerPosition,
123
+ D as findParentElement,
124
+ M as findScrollParentElement,
125
+ B as fixPosition,
126
+ c as formatBytes,
127
+ Fe as generateId,
128
+ R as getAllParentElements,
129
+ le as getCumulativeOffsetLeft,
130
+ fe as getCumulativeOffsetTop,
131
+ pe as getCumulativePosition,
132
+ z as getElement,
133
+ Le as getElementTransitionDurationMS,
134
+ Ye as getElementTransitionDurationS,
135
+ T as getPointerPosition,
129
136
  p as getRootVariables,
130
137
  i as insert,
131
- E as isBrowser,
132
- Qe as isESClass,
133
- De as isNullish,
134
- Me as isObject,
135
- Fe as isUppercase,
136
- Ke as kebabToCamel,
137
- he as lerp,
138
- Z as linear,
139
- be as mapRange,
140
- B as measureText,
141
- Re as mergeDeep,
142
- ze as mixin,
143
- P as normalize,
144
- Xe as normalizeBase,
145
- we as nullishCoalescing,
146
- ke as omit,
147
- h as parseAttribute,
148
- b as parseAttributeValue,
149
- je as pick,
150
- Be as preciseNumber,
151
- Ce as round,
152
- Ie as roundNumberTo,
153
- T as screenToCartesian,
154
- ie as setupDrag,
155
- c as shiftArray,
156
- Ee as smootherstep,
138
+ w as isBrowser,
139
+ De as isESClass,
140
+ Me as isNullish,
141
+ Re as isObject,
142
+ Ke as isUppercase,
143
+ We as kebabToCamel,
144
+ be as lerp,
145
+ X as linear,
146
+ Ce as mapRange,
147
+ I as measureText,
148
+ ze as mergeDeep,
149
+ ke as mixin,
150
+ v as normalize,
151
+ _e as normalizeBase,
152
+ Be as nullishCoalescing,
153
+ je as omit,
154
+ b as parseAttribute,
155
+ C as parseAttributeValue,
156
+ Ne as pick,
157
+ Ie as preciseNumber,
158
+ Ee as round,
159
+ Pe as roundNumberTo,
160
+ A as screenToCartesian,
161
+ ue as setupDrag,
162
+ u as shiftArray,
163
+ we as smootherstep,
157
164
  Se as smoothstep,
158
- We as snakeToDotted,
159
- _e as splitPath,
165
+ qe as snakeToDotted,
166
+ ea as splitPath,
160
167
  ye as step,
161
- ne as throttle,
162
- qe as toPascalCase,
163
- ve as toStep,
164
- Ge as uncapitalize
168
+ re as throttle,
169
+ Ge as toPascalCase,
170
+ Te as toStep,
171
+ He as uncapitalize,
172
+ g as wait
165
173
  };
@@ -0,0 +1 @@
1
+ export declare function wait(dur: number): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1 +0,0 @@
1
- "use strict";var u=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var i=(e,r,s)=>(u(e,r,"read from private field"),s?s.call(e):r.get(e)),n=(e,r,s)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,s)},o=(e,r,s,c)=>(u(e,r,"write to private field"),c?c.call(e,s):r.set(e,s),s);const d=require("./Store-Cr3VaD9G.cjs");var t;class h extends d.Store{constructor(s,c,l){super(null,l);n(this,t,void 0);o(this,t,s.subscribe(b=>{this.current=c(b.current)}))}close(){super.close(),i(this,t).call(this)}}t=new WeakMap;exports.Derived=h;
@@ -1,27 +0,0 @@
1
- var u = (s, r, e) => {
2
- if (!r.has(s))
3
- throw TypeError("Cannot " + e);
4
- };
5
- var o = (s, r, e) => (u(s, r, "read from private field"), e ? e.call(s) : r.get(s)), i = (s, r, e) => {
6
- if (r.has(s))
7
- throw TypeError("Cannot add the same private member more than once");
8
- r instanceof WeakSet ? r.add(s) : r.set(s, e);
9
- }, n = (s, r, e, c) => (u(s, r, "write to private field"), c ? c.call(s, e) : r.set(s, e), e);
10
- import { S as p } from "./Store-Qr3SNOSf.js";
11
- var t;
12
- class d extends p {
13
- constructor(e, c, l) {
14
- super(null, l);
15
- i(this, t, void 0);
16
- n(this, t, e.subscribe((b) => {
17
- this.current = c(b.current);
18
- }));
19
- }
20
- close() {
21
- super.close(), o(this, t).call(this);
22
- }
23
- }
24
- t = new WeakMap();
25
- export {
26
- d as D
27
- };
@@ -1 +0,0 @@
1
- "use strict";var L=Object.defineProperty,T=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var y=(n,e,l)=>e in n?L(n,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[e]=l,i=(n,e)=>{for(var l in e||(e={}))F.call(e,l)&&y(n,l,e[l]);if(g)for(var l of g(e))M.call(e,l)&&y(n,l,e[l]);return n},w=(n,e)=>T(n,_(e));var R=(n,e,l)=>{if(!e.has(n))throw TypeError("Cannot "+l)};var c=(n,e,l)=>(R(n,e,"read from private field"),l?l.call(n):e.get(n)),h=(n,e,l)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,l)};const k=require("./ElementConstructor-OK-6OPjh.cjs"),D=require("./object-CCiXnER2.cjs"),j=require("./string-DhgS_iFl.cjs"),r=require("./globals-bYKki-b9.cjs");require("./Store-Cr3VaD9G.cjs");require("./ticker/index.cjs");var a,d,m,C,u;class H extends HTMLElement{constructor(l){var s;super();h(this,a,new Set);h(this,d,new Set);h(this,m,new Map);h(this,C,()=>{r.contextStack.value.unshift(c(this,m))});h(this,u,()=>{r.contextStack.value=r.contextStack.value.filter(l=>l!==c(this,m))});const o=r.currentComponentElement.value;r.currentComponentElement.value=this,c(this,C).call(this);const f=l==null?void 0:l.tag(i({},l.attributes)),v=(s=r.nextComponentAttributes.value)!=null&&s.lightChildren?"lightChildren":"children";new k.ElementConstructor(this,w(i({},r.nextComponentAttributes.value),{[v]:f})),r.currentComponentElement.value=o,r.nextComponentAttributes.value=null,c(this,u).call(this)}addConnectCallback(l){c(this,a).add(l)}addDisconnectCallback(l){c(this,d).add(l)}createContext(l,o){c(this,m).set(l,o)}connectedCallback(){r.currentComponentElement.value=this,c(this,a).forEach(l=>{const o=l(this);o&&c(this,d).add(o)}),r.currentComponentElement.value=null,this.addEventListener("beforeChildrenChange",c(this,C)),this.addEventListener("afterChildrenChange",c(this,u))}disconnectedCallback(){c(this,d).forEach(l=>{l(this)}),this.removeEventListener("beforeChildrenChange",c(this,C)),this.removeEventListener("afterChildrenChange",c(this,u))}}a=new WeakMap,d=new WeakMap,m=new WeakMap,C=new WeakMap,u=new WeakMap;function A(n,e,...l){var s;l=l.flat().filter(t=>t!=null);const o=[],f=[];e=e||{},o.push(...l.reverse());const v=n==="instance";if(v&&e.from&&(n=e.from,e==null||delete e.from),typeof n=="function")if(v){let t=null;return D.isESClass(n)?t=new n:t=n(),delete e.children,()=>new k.ElementConstructor(t,e).node}else{if(e.children=o.reverse(),n===x)return x(e.children);const t={noCustomElement:n.noCustomElement,onlyRegister:e.__register};if(e==null||delete e.__register,t.noCustomElement){const q=n(i({},e));return()=>q}const p=`e-${j.camelToKebab(n.name)}`;let E=customElements.get(p);return E||(E=(s=class extends H{constructor(S){super(t.onlyRegister?{tag:n,attributes:e}:S)}},s.formAssociated=n.formAssociated,s),customElements.define(p,E)),()=>t.onlyRegister?E:new E({tag:n,attributes:e})}for(;o.length;){const t=o.pop();Array.isArray(t)?o.push(...t):t!=null&&f.push(t)}if(n==="component"){const t=x(f);return r.nextComponentAttributes.value=e,t.node}else{const t=e!=null&&e.lightChildren?"lightChildren":"children";return e==null||delete e.children,n?new k.ElementConstructor(n,w(i({},e),{[t]:f})):null}}function x(n){return new k.ElementConstructor(document.createDocumentFragment(),{children:n})}function I(n,e){const l=e==null?void 0:e.children,o=e==null?void 0:e.attributes;return A(n,i({},o),l)()}exports.Fragment=x;exports.h=A;exports.instantiate=I;