aptechka 0.64.9 → 0.65.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,29 +1,45 @@
1
- import { a as Q, p as D } from "../attributes-69we3byR.js";
2
- import { a as d } from "../index-Bv9zgfdb.js";
3
- import { i as z } from "../index-Bv9zgfdb.js";
4
- import { a as N, c as $, f as F, m as V } from "../canvas-DeZ0SLUJ.js";
5
- import { g as U, n as q, s as H } from "../coordinates-CgdGoSYs.js";
6
- import { b as K, f as W, a as G, g as J } from "../dom-CVWzyXPH.js";
7
- import { d as Y, o as X, g as _, q as ee, c as te, j as se, n as ae, a as oe, h as re, k as ne, f as ie, p as ce, b as le, i as ue, m as fe, l as de } from "../easings-BEmRlrDd.js";
8
- import { i as pe } from "../element-CGVl1jA-.js";
9
- import { d as be } from "../events-CsVF98U6.js";
10
- import { c as he, d as ye } from "../file-GHShUlue.js";
11
- import { d as Ie, t as ve } from "../function-C10DGppn.js";
12
- import { s as we } from "../gestures-CcXV6fCp.js";
13
- import { c as Te, s as Oe } from "../stylesheet-DpnWNVyD.js";
14
- import { g as Be, a as Ae, c as Re, b as Qe } from "../layout-BSMtwCga.js";
15
- import { e as je, f as ze, c as Me, d as Ne, l as $e, m as Fe, r as Ve, b as ke, a as Ue, s as qe } from "../math-BOBiC4TN.js";
16
- import { b as Ze, l as Ke, p as We, r as Ge, t as Je } from "../number-CbdpfO3u.js";
17
- import { c as Ye, d as Xe, i as _e, b as et, a as tt, m as st, e as at, o as ot, p as rt } from "../object-D6MVWB4l.js";
18
- import { n as it, r as ct } from "../polyfills-DJrTJQky.js";
19
- import { s as ut, w as ft } from "../scroll-BWF48oHS.js";
20
- import { c as mt, a as pt, b as xt, d as bt, g as gt, i as ht, k as yt, s as Ct, t as It, u as vt } from "../string-BlMQbe8b.js";
21
- import { g as wt, a as St } from "../style-j2TwriJ_.js";
22
- import { c as Ot, n as Pt, p as Bt, s as At, u as Rt } from "../url-Cc-RVfii.js";
23
- function g(t, e, ...s) {
1
+ var f = (t, e, s) => new Promise((a, o) => {
2
+ var r = (n) => {
3
+ try {
4
+ c(s.next(n));
5
+ } catch (l) {
6
+ o(l);
7
+ }
8
+ }, i = (n) => {
9
+ try {
10
+ c(s.throw(n));
11
+ } catch (l) {
12
+ o(l);
13
+ }
14
+ }, c = (n) => n.done ? a(n.value) : Promise.resolve(n.value).then(r, i);
15
+ c((s = s.apply(t, e)).next());
16
+ });
17
+ import { a as z, p as M } from "../attributes-69we3byR.js";
18
+ import { a as m } from "../index-Bv9zgfdb.js";
19
+ import { i as $ } from "../index-Bv9zgfdb.js";
20
+ import { a as V, c as k, f as U, m as q } from "../canvas-DeZ0SLUJ.js";
21
+ import { g as Z, n as K, s as W } from "../coordinates-CgdGoSYs.js";
22
+ import { b as J, f as L, a as Y, g as X } from "../dom-CVWzyXPH.js";
23
+ import { f as ee, p as te, h as se, b as ae, d as oe, k as re, o as ne, a as ie, i as ce, m as le, g as ue, q as fe, c as de, j as me, n as pe, l as xe } from "../easings-DngMp9IN.js";
24
+ import { i as be } from "../element-CGVl1jA-.js";
25
+ import { d as ye } from "../events-CsVF98U6.js";
26
+ import { c as Ie, d as we } from "../file-GHShUlue.js";
27
+ import { d as ve, t as Se } from "../function-C10DGppn.js";
28
+ import { s as Oe } from "../gestures-CcXV6fCp.js";
29
+ import { c as Be, s as Ae } from "../stylesheet-DpnWNVyD.js";
30
+ import { g as De, a as Qe, c as je, b as ze } from "../layout-BSMtwCga.js";
31
+ import { e as Ne, f as $e, c as Fe, d as Ve, l as ke, m as Ue, r as qe, b as He, a as Ze, s as Ke } from "../math-BOBiC4TN.js";
32
+ import { b as Ge, l as Je, p as Le, r as Ye, t as Xe } from "../number-CbdpfO3u.js";
33
+ import { c as et, d as tt, i as st, b as at, a as ot, m as rt, e as nt, o as it, p as ct } from "../object-D6MVWB4l.js";
34
+ import { n as ut, r as ft } from "../polyfills-DJrTJQky.js";
35
+ import { s as mt, w as pt } from "../scroll-DNGJVxa2.js";
36
+ import { c as ht, a as bt, b as gt, d as yt, g as Ct, i as It, k as wt, s as Et, t as vt, u as St } from "../string-BlMQbe8b.js";
37
+ import { g as Ot, a as Pt } from "../style-j2TwriJ_.js";
38
+ import { c as At, n as Rt, p as Dt, s as Qt, u as jt } from "../url-Cc-RVfii.js";
39
+ function y(t, e, ...s) {
24
40
  return [...t.slice(0, e), ...s, ...t.slice(e)];
25
41
  }
26
- function h(t, e) {
42
+ function C(t, e) {
27
43
  const s = t.length;
28
44
  e = e % s;
29
45
  const a = new Array(s);
@@ -33,7 +49,7 @@ function h(t, e) {
33
49
  }
34
50
  return a;
35
51
  }
36
- function y(t, e = 2) {
52
+ function I(t, e = 2) {
37
53
  if (!+t) return "0 Bytes";
38
54
  const s = 1024, a = e < 0 ? 0 : e, o = [
39
55
  "Bytes",
@@ -48,7 +64,7 @@ function y(t, e = 2) {
48
64
  ], r = Math.floor(Math.log(t) / Math.log(s));
49
65
  return `${parseFloat((t / Math.pow(s, r)).toFixed(a))} ${o[r]}`;
50
66
  }
51
- function C(t) {
67
+ function w(t) {
52
68
  if (navigator.clipboard)
53
69
  navigator.clipboard.writeText(t).then(() => {
54
70
  console.log("Text copied to clipboard successfully!");
@@ -66,34 +82,34 @@ function C(t) {
66
82
  document.body.removeChild(e);
67
83
  }
68
84
  }
69
- function I(t, e) {
85
+ function E(t, e) {
70
86
  return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
71
87
  }
72
88
  function v(t, e) {
73
89
  return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
74
90
  }
75
- function E(t, e) {
91
+ function S(t, e) {
76
92
  let s = !1;
77
93
  const { x: a, y: o } = t;
78
- for (let r = 0, n = e.length - 1; r < e.length; n = r++) {
79
- const c = e[r].x, i = e[r].y, l = e[n].x, u = e[n].y;
80
- i > o != u > o && a < (l - c) * (o - i) / (u - i) + c && (s = !s);
94
+ for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
95
+ const c = e[r].x, n = e[r].y, l = e[i].x, u = e[i].y;
96
+ n > o != u > o && a < (l - c) * (o - n) / (u - n) + c && (s = !s);
81
97
  }
82
98
  return s;
83
99
  }
84
- function f(t, e) {
100
+ function d(t, e) {
85
101
  const s = t.style.getPropertyValue(e);
86
102
  if (s) {
87
103
  const a = s.toString();
88
- return a.startsWith("var") ? f(t, a.slice(4, -1)) : a;
104
+ return a.startsWith("var") ? d(t, a.slice(4, -1)) : a;
89
105
  }
90
106
  }
91
- function w(...t) {
107
+ function T(...t) {
92
108
  const e = {};
93
109
  return Array.from(document.styleSheets).forEach((s) => {
94
110
  Array.from(s.cssRules).forEach((a) => {
95
111
  a instanceof CSSStyleRule && a.selectorText === ":root" && t.forEach((o) => {
96
- const r = f(a, o);
112
+ const r = d(a, o);
97
113
  r && (e[o] = r);
98
114
  });
99
115
  });
@@ -101,139 +117,145 @@ function w(...t) {
101
117
  e[s] || console.warn(`variable named ${s} not found`);
102
118
  }), e;
103
119
  }
104
- function S(t) {
120
+ function O(...t) {
121
+ return f(this, null, function* () {
122
+ return yield Promise.all(t.map((e) => customElements.whenDefined(e)));
123
+ });
124
+ }
125
+ function P(t) {
105
126
  const e = window.atob(t);
106
127
  return decodeURIComponent(window.escape(e));
107
128
  }
108
- function T(t) {
129
+ function B(t) {
109
130
  const e = window.unescape(encodeURIComponent(t));
110
131
  return window.btoa(e);
111
132
  }
112
- const m = /^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/, p = /^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;
113
- function O(t) {
133
+ const p = /^(\+?\d{1,3}[-.\s]?)?(\(?\d{3}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{2,4}[-.\s]?\d{2,4}$/, x = /^[\w.-]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,}$/;
134
+ function A(t) {
114
135
  let e, s;
115
- return p.test(t) ? (e = `mailto:${t.trim()}`, s = "email") : m.test(t) && (e = `tel:${t.replace(/[^0-9\\.\\+]+/g, "")}`, s = "phone"), { href: e, type: s, contact: t };
136
+ return x.test(t) ? (e = `mailto:${t.trim()}`, s = "email") : p.test(t) && (e = `tel:${t.replace(/[^0-9\\.\\+]+/g, "")}`, s = "phone"), { href: e, type: s, contact: t };
116
137
  }
117
- function P(t, e) {
138
+ function R(t, e) {
118
139
  if (t) {
119
140
  const a = t.content.cloneNode(!0).firstElementChild;
120
141
  return a && (e == null || e(a)), a;
121
142
  }
122
143
  return null;
123
144
  }
124
- function B(t, e, s, a) {
125
- let o, r = !1, n = 0;
145
+ function D(t, e, s, a) {
146
+ let o, r = !1, i = 0;
126
147
  const c = () => {
127
- clearInterval(o), a != null && a.restartCounter && (n = 0), r && (o = setInterval(() => {
128
- s(n++);
148
+ clearInterval(o), a != null && a.restartCounter && (i = 0), r && (o = setInterval(() => {
149
+ s(i++);
129
150
  }, e));
130
- }, i = d.subscribe(t, (l) => {
151
+ }, n = m.subscribe(t, (l) => {
131
152
  r = l.isIntersecting, c();
132
153
  });
133
154
  return () => {
134
- i(), clearInterval(o);
155
+ n(), clearInterval(o);
135
156
  };
136
157
  }
137
158
  export {
138
- Ze as beautifyNumber,
139
- je as calculateDistance,
140
- ze as calculateDistanceWithRadius,
141
- mt as camelToKebab,
142
- pt as capitalize,
143
- Ot as changeHistory,
144
- Me as clamp,
145
- Ye as cloneDeep,
146
- P as cloneTemplateContent,
147
- Xe as compareObjects,
148
- N as contain,
149
- C as copyTextToClipboard,
150
- $ as cover,
151
- he as createJSONAndSave,
152
- Te as createStylesheet,
153
- Ne as damp,
154
- Ie as debounce,
155
- xt as declension,
156
- T as decode,
157
- bt as decodeHtmlEntities,
158
- be as dispatchEvent,
159
+ Ge as beautifyNumber,
160
+ Ne as calculateDistance,
161
+ $e as calculateDistanceWithRadius,
162
+ ht as camelToKebab,
163
+ bt as capitalize,
164
+ At as changeHistory,
165
+ Fe as clamp,
166
+ et as cloneDeep,
167
+ R as cloneTemplateContent,
168
+ tt as compareObjects,
169
+ V as contain,
170
+ w as copyTextToClipboard,
171
+ k as cover,
172
+ Ie as createJSONAndSave,
173
+ Be as createStylesheet,
174
+ Ve as damp,
175
+ ve as debounce,
176
+ gt as declension,
177
+ B as decode,
178
+ yt as decodeHtmlEntities,
179
+ ye as dispatchEvent,
159
180
  v as dotCircleCollision,
160
- E as dotPolygonCollision,
161
- I as dotRectCollision,
162
- ye as downloadURI,
163
- Y as easeInCubic,
164
- X as easeInExpo,
165
- _ as easeInOutCubic,
166
- ee as easeInOutExpo,
167
- te as easeInOutQuad,
168
- se as easeInOutQuart,
169
- ae as easeInOutQuint,
170
- oe as easeInQuad,
171
- re as easeInQuart,
172
- ne as easeInQuint,
173
- ie as easeOutCubic,
174
- ce as easeOutExpo,
175
- le as easeOutQuad,
176
- ue as easeOutQuart,
177
- fe as easeOutQuint,
178
- S as encode,
179
- K as findParentElement,
180
- W as findScrollParentElement,
181
- F as fixPosition,
182
- y as formatBytes,
183
- gt as generateId,
184
- G as getAllParentElements,
185
- Be as getCumulativeOffsetLeft,
186
- Ae as getCumulativeOffsetTop,
187
- Re as getCumulativePosition,
188
- J as getElement,
189
- wt as getElementTransitionDurationMS,
190
- St as getElementTransitionDurationS,
191
- U as getPointerPosition,
192
- w as getRootVariables,
193
- Qe as getStickyOffset,
194
- g as insert,
195
- z as isBrowser,
196
- _e as isESClass,
197
- pe as isElementVisible,
198
- et as isNullish,
199
- tt as isObject,
200
- ht as isUppercase,
201
- yt as kebabToCamel,
202
- $e as lerp,
203
- de as linear,
204
- Ke as loopNumber,
205
- Fe as mapRange,
206
- V as measureText,
207
- st as mergeDeep,
208
- at as mixin,
209
- q as normalize,
210
- Pt as normalizeBase,
211
- it as nullishCoalescing,
212
- ot as omit,
213
- Q as parseAttribute,
214
- D as parseAttributeValue,
215
- Bt as parseSearchParameters,
216
- rt as pick,
217
- We as preciseNumber,
218
- ct as requestIdleCallback,
219
- Ve as round,
220
- Ge as roundNumberTo,
221
- H as screenToCartesian,
222
- ut as scrollToElement,
223
- B as setIntervalOnIntersection,
224
- we as setupDrag,
225
- h as shiftArray,
226
- ke as smootherstep,
227
- Ue as smoothstep,
228
- Ct as snakeToDotted,
229
- At as splitPath,
230
- qe as step,
231
- Oe as styleToString,
232
- ve as throttle,
233
- It as toPascalCase,
234
- Je as toStep,
235
- O as tryCreateHrefFromContact,
236
- vt as uncapitalize,
237
- Rt as updateSearchParameter,
238
- ft as wait
181
+ S as dotPolygonCollision,
182
+ E as dotRectCollision,
183
+ we as downloadURI,
184
+ ee as easeInCubic,
185
+ te as easeInExpo,
186
+ se as easeInOutCubic,
187
+ ae as easeInOutExpo,
188
+ oe as easeInOutQuad,
189
+ re as easeInOutQuart,
190
+ ne as easeInOutQuint,
191
+ ie as easeInQuad,
192
+ ce as easeInQuart,
193
+ le as easeInQuint,
194
+ ue as easeOutCubic,
195
+ fe as easeOutExpo,
196
+ de as easeOutQuad,
197
+ me as easeOutQuart,
198
+ pe as easeOutQuint,
199
+ P as encode,
200
+ J as findParentElement,
201
+ L as findScrollParentElement,
202
+ U as fixPosition,
203
+ I as formatBytes,
204
+ Ct as generateId,
205
+ Y as getAllParentElements,
206
+ De as getCumulativeOffsetLeft,
207
+ Qe as getCumulativeOffsetTop,
208
+ je as getCumulativePosition,
209
+ X as getElement,
210
+ Ot as getElementTransitionDurationMS,
211
+ Pt as getElementTransitionDurationS,
212
+ Z as getPointerPosition,
213
+ T as getRootVariables,
214
+ ze as getStickyOffset,
215
+ y as insert,
216
+ $ as isBrowser,
217
+ st as isESClass,
218
+ be as isElementVisible,
219
+ at as isNullish,
220
+ ot as isObject,
221
+ It as isUppercase,
222
+ wt as kebabToCamel,
223
+ ke as lerp,
224
+ xe as linear,
225
+ Je as loopNumber,
226
+ Ue as mapRange,
227
+ q as measureText,
228
+ rt as mergeDeep,
229
+ nt as mixin,
230
+ K as normalize,
231
+ Rt as normalizeBase,
232
+ ut as nullishCoalescing,
233
+ it as omit,
234
+ z as parseAttribute,
235
+ M as parseAttributeValue,
236
+ Dt as parseSearchParameters,
237
+ ct as pick,
238
+ Le as preciseNumber,
239
+ ft as requestIdleCallback,
240
+ qe as round,
241
+ Ye as roundNumberTo,
242
+ W as screenToCartesian,
243
+ mt as scrollToElement,
244
+ D as setIntervalOnIntersection,
245
+ Oe as setupDrag,
246
+ C as shiftArray,
247
+ He as smootherstep,
248
+ Ze as smoothstep,
249
+ Et as snakeToDotted,
250
+ Qt as splitPath,
251
+ Ke as step,
252
+ Ae as styleToString,
253
+ Se as throttle,
254
+ vt as toPascalCase,
255
+ Xe as toStep,
256
+ A as tryCreateHrefFromContact,
257
+ St as uncapitalize,
258
+ jt as updateSearchParameter,
259
+ pt as wait,
260
+ O as whenDefined
239
261
  };
@@ -3,5 +3,5 @@ export declare function scrollToElement(elementOrSelectorOrNumber: ElementOrSele
3
3
  behavior?: ScrollBehavior;
4
4
  offset?: number | ElementOrSelector<HTMLElement>;
5
5
  center?: boolean;
6
- scrollElement?: HTMLElement;
6
+ scrollElement?: HTMLElement | Window;
7
7
  }): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.64.9",
3
+ "version": "0.65.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -401,21 +401,21 @@
401
401
  "dev": "vite --host --mode site"
402
402
  },
403
403
  "devDependencies": {
404
- "@types/node": "^22.10.1",
405
- "@types/three": "^0.174.0",
406
- "tsx": "^4.19.2",
407
- "vite": "^6.0.1",
408
- "vite-plugin-dts": "^4.3.0",
409
- "vite-plugin-htmc": "0.1.15"
404
+ "@types/node": "^22.13.17",
405
+ "@types/three": "^0.175.0",
406
+ "tsx": "^4.19.3",
407
+ "vite": "^6.2.4",
408
+ "vite-plugin-dts": "^4.5.3",
409
+ "vite-plugin-htmc": "0.1.16"
410
410
  },
411
411
  "dependencies": {
412
412
  "construct-style-sheets-polyfill": "^3.1.0",
413
- "three": "^0.174.0",
413
+ "three": "^0.175.0",
414
414
  "urlpattern-polyfill": "^10.0.0"
415
415
  },
416
416
  "peerDependencies": {
417
417
  "construct-style-sheets-polyfill": "^3.1.0",
418
- "three": "^0.174.0",
418
+ "three": "^0.175.0",
419
419
  "urlpattern-polyfill": "^10.0.0"
420
420
  }
421
421
  }
@@ -1,37 +0,0 @@
1
- import { g as l, f as u } from "./dom-CVWzyXPH.js";
2
- import { a as c } from "./layout-BSMtwCga.js";
3
- import "construct-style-sheets-polyfill";
4
- import "./index-Bv9zgfdb.js";
5
- function E(e) {
6
- return new Promise((o) => {
7
- setTimeout(() => {
8
- o();
9
- }, e);
10
- });
11
- }
12
- function H(e, {
13
- behavior: o = "instant",
14
- offset: i = 0,
15
- center: m = !1,
16
- scrollElement: s
17
- } = {}) {
18
- var r;
19
- let n, f = s, a = s;
20
- if (typeof e == "number")
21
- n = e;
22
- else {
23
- const t = l(e);
24
- t && (f = t, a = s || u(t), n = c(t));
25
- }
26
- if (f && a && typeof n == "number") {
27
- const t = (typeof i == "number" ? i : ((r = l(i)) == null ? void 0 : r.offsetHeight) || 0) * -1, p = m ? innerHeight / 2 * -1 + f.offsetHeight / 2 : 0;
28
- a.scroll({
29
- top: n + t + p,
30
- behavior: o
31
- });
32
- }
33
- }
34
- export {
35
- H as s,
36
- E as w
37
- };
@@ -1 +0,0 @@
1
- "use strict";const u=require("./dom-JBOkFLTh.cjs"),m=require("./layout-Ctc2p3uz.cjs");require("construct-style-sheets-polyfill");require("./index-DekP7OZe.cjs");function g(t){return new Promise(i=>{setTimeout(()=>{i()},t)})}function p(t,{behavior:i="instant",offset:o=0,center:a=!1,scrollElement:l}={}){var f;let n,s=l,r=l;if(typeof t=="number")n=t;else{const e=u.getElement(t);e&&(s=e,r=l||u.findScrollParentElement(e),n=m.getCumulativeOffsetTop(e))}if(s&&r&&typeof n=="number"){const e=(typeof o=="number"?o:((f=u.getElement(o))==null?void 0:f.offsetHeight)||0)*-1,c=a?innerHeight/2*-1+s.offsetHeight/2:0;r.scroll({top:n+e+c,behavior:i})}}exports.scrollToElement=p;exports.wait=g;