aptechka 0.81.0 → 0.82.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.
Files changed (121) hide show
  1. package/lib/{Animation-C4tLEBGM.js → Animation-DxtCzFP3.js} +2 -2
  2. package/lib/{Composed-BB1MtFiT.js → Composed-DtS09lSU.js} +2 -2
  3. package/lib/{Damped-DVG5nrYV.js → Damped-DMnIOXpC.js} +2 -2
  4. package/lib/{DerivedArray-D3scYQdp.js → DerivedArray-DG9iR0mf.js} +1 -1
  5. package/lib/{DragControls-Cm_88cLt.js → DragControls-DCC8iEOR.js} +4 -4
  6. package/lib/LocalLinks-Bua7BGRF.cjs +1 -0
  7. package/lib/LocalLinks-TQkTpAMx.js +62 -0
  8. package/lib/PageAnnouncerElement-C4k2kDJ5.cjs +1 -0
  9. package/lib/PageAnnouncerElement-sfh0_4vl.js +24 -0
  10. package/lib/PageScroll-C7QBpx0G.cjs +1 -0
  11. package/lib/PageScroll-cQ3B5-6N.js +62 -0
  12. package/lib/SourceElement-BQ7g2KWK.js +260 -0
  13. package/lib/SourceElement-TzgPNQOd.cjs +5 -0
  14. package/lib/{Store-BtVtCGLk.js → Store-CgQ3ReoB.js} +1 -1
  15. package/lib/{Tweened-C1lnK6n9.js → Tweened-lT68VACv.js} +2 -2
  16. package/lib/{Viewport-DbN_JWBM.js → Viewport-DGnJ31b4.js} +2 -2
  17. package/lib/accordion/index.js +1 -1
  18. package/lib/animation/index.js +3 -3
  19. package/lib/attribute/index.js +3 -3
  20. package/lib/billboard/index.js +2 -2
  21. package/lib/cache/Cache.d.ts +8 -0
  22. package/lib/cache/index.cjs +1 -0
  23. package/lib/cache/index.d.ts +1 -0
  24. package/lib/cache/index.js +37 -0
  25. package/lib/canvas/index.js +2 -2
  26. package/lib/controls/index.js +1 -1
  27. package/lib/css-property/index.js +3 -3
  28. package/lib/css-value-parser/index.js +1 -1
  29. package/lib/dev/index.js +2 -2
  30. package/lib/device/index.js +1 -1
  31. package/lib/{dom-fgxIeFxm.js → dom-BIeVMHfK.js} +2 -2
  32. package/lib/element-linked-store/index.js +2 -2
  33. package/lib/element-resizer/index.js +2 -2
  34. package/lib/en3/index.js +2 -2
  35. package/lib/history/History.d.ts +10 -0
  36. package/lib/history/index.cjs +1 -0
  37. package/lib/history/index.d.ts +1 -0
  38. package/lib/history/index.js +34 -0
  39. package/lib/iframe/index.cjs +1 -1
  40. package/lib/iframe/index.js +3 -3
  41. package/lib/image/index.cjs +1 -1
  42. package/lib/image/index.js +4 -4
  43. package/lib/{index-JqYHGoo6.js → index-LReFyN6i.js} +1 -1
  44. package/lib/intersector/index.js +2 -2
  45. package/lib/jsx/index.js +6 -6
  46. package/lib/ladder/index.js +2 -2
  47. package/lib/layout-box/index.js +2 -2
  48. package/lib/loading/index.js +1 -1
  49. package/lib/local-links/LocalLinks.d.ts +17 -0
  50. package/lib/local-links/index.cjs +1 -0
  51. package/lib/local-links/index.d.ts +1 -0
  52. package/lib/local-links/index.js +4 -0
  53. package/lib/masonry-layout/index.js +2 -2
  54. package/lib/media/index.js +2 -2
  55. package/lib/metadata-BcYZ5w3T.cjs +1 -0
  56. package/lib/metadata-jfowcCyz.js +12 -0
  57. package/lib/morph/index.cjs +1 -1
  58. package/lib/morph/index.js +141 -140
  59. package/lib/morph-B6sGhLCi.cjs +1 -0
  60. package/lib/morph-BQErz7qP.js +242 -0
  61. package/lib/need_redo_tweaker/index.cjs +1 -1
  62. package/lib/need_redo_tweaker/index.js +4 -4
  63. package/lib/{object-D6MVWB4l.js → object-CcMK4y_r.js} +12 -10
  64. package/lib/object-baN9pgbU.cjs +1 -0
  65. package/lib/page-announcer/PageAnnouncerElement.d.ts +10 -0
  66. package/lib/page-announcer/index.cjs +1 -0
  67. package/lib/page-announcer/index.d.ts +1 -0
  68. package/lib/page-announcer/index.js +4 -0
  69. package/lib/page-scroll/PageScroll.d.ts +23 -0
  70. package/lib/page-scroll/index.cjs +1 -0
  71. package/lib/page-scroll/index.d.ts +1 -0
  72. package/lib/page-scroll/index.js +4 -0
  73. package/lib/pixel-perfect/index.js +3 -3
  74. package/lib/pointer/index.js +4 -4
  75. package/lib/popover/index.cjs +1 -1
  76. package/lib/popover/index.js +3 -3
  77. package/lib/radio/index.js +1 -1
  78. package/lib/{render-CMQbWthg.js → render-CiA0mn5V.js} +3 -3
  79. package/lib/router/Route.d.ts +1 -2
  80. package/lib/router/Router.d.ts +18 -23
  81. package/lib/router/index.cjs +1 -1
  82. package/lib/router/index.d.ts +1 -1
  83. package/lib/router/index.js +183 -249
  84. package/lib/scroll/index.js +8 -8
  85. package/lib/scroll-entries/index.js +1 -1
  86. package/lib/{scroll-7JSxRKFK.js → scroll-jcbHDexr.js} +2 -2
  87. package/lib/scroll-kit/index.js +4 -4
  88. package/lib/sequence/index.cjs +1 -1
  89. package/lib/sequence/index.js +3 -3
  90. package/lib/size-element/index.js +1 -1
  91. package/lib/slicer/index.js +1 -1
  92. package/lib/source/SourceElement.d.ts +1 -1
  93. package/lib/source/index.cjs +1 -1
  94. package/lib/source/index.js +1 -1
  95. package/lib/spa/SPA.d.ts +29 -0
  96. package/lib/spa/index.cjs +1 -0
  97. package/lib/spa/index.d.ts +1 -0
  98. package/lib/spa/index.js +130 -0
  99. package/lib/store/index.js +3 -3
  100. package/lib/{stylesheet-JlRFfJIc.js → stylesheet-DbHOxtjw.js} +1 -1
  101. package/lib/ticker/index.js +2 -2
  102. package/lib/url-CPgw9bd5.cjs +1 -0
  103. package/lib/url-DAl-mgbC.js +97 -0
  104. package/lib/utils/index.cjs +1 -1
  105. package/lib/utils/index.d.ts +2 -0
  106. package/lib/utils/index.js +141 -120
  107. package/lib/utils/morph.d.ts +49 -0
  108. package/lib/utils/object.d.ts +1 -1
  109. package/lib/utils/url.d.ts +6 -0
  110. package/lib/video/index.cjs +1 -1
  111. package/lib/video/index.js +3 -3
  112. package/lib/window-resizer/index.js +1 -1
  113. package/lib/youtube/index.cjs +1 -1
  114. package/lib/youtube/index.js +3 -3
  115. package/package.json +49 -1
  116. package/lib/SourceElement-BBfaAgwe.cjs +0 -5
  117. package/lib/SourceElement-BiNNtaz9.js +0 -265
  118. package/lib/object-CCiXnER2.cjs +0 -1
  119. package/lib/router/Link.d.ts +0 -8
  120. package/lib/url-CoUSEREU.cjs +0 -1
  121. package/lib/url-IGj2LgDW.js +0 -66
@@ -1,30 +1,32 @@
1
- import { a as D, p as Q } from "../attributes-69we3byR.js";
2
- import { a as d } from "../index-JqYHGoo6.js";
3
- import { i as j } from "../index-JqYHGoo6.js";
4
- import { a as M, 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 { w as K } from "../custom-elements-DBnCK7Zx.js";
7
- import { b as G, f as J, a as L, g as Y, c as X, t as _ } from "../dom-fgxIeFxm.js";
8
- import { d as te, o as se, g as ae, q as oe, c as re, j as ne, n as ie, a as ce, h as le, k as ue, f as fe, p as de, b as me, i as pe, m as xe, l as he } from "../easings-BEmRlrDd.js";
9
- import { i as ge } from "../element-CGVl1jA-.js";
10
- import { d as Ce } from "../events-CsVF98U6.js";
11
- import { c as ve, d as we } from "../file-GHShUlue.js";
12
- import { d as Se, t as Te } from "../function-C10DGppn.js";
1
+ import { a as _, p as D } from "../attributes-69we3byR.js";
2
+ import { a as d } from "../index-LReFyN6i.js";
3
+ import { i as B } from "../index-LReFyN6i.js";
4
+ import { a as Q, c as U, f as V, m as j } from "../canvas-DeZ0SLUJ.js";
5
+ import { g as F, n as L, s as k } from "../coordinates-CgdGoSYs.js";
6
+ import { w as q } from "../custom-elements-DBnCK7Zx.js";
7
+ import { b as K, f as Z, a as W, g as G, t as J, c as X } from "../dom-BIeVMHfK.js";
8
+ import { d as te, o as se, g as ae, q as oe, c as re, j as ne, n as ie, a as ce, h as le, k as ue, f as fe, p as de, b as me, i as pe, m as xe, l as Ee } from "../easings-BEmRlrDd.js";
9
+ import { i as Te } from "../element-CGVl1jA-.js";
10
+ import { d as ge } from "../events-CsVF98U6.js";
11
+ import { c as ye, d as Ie } from "../file-GHShUlue.js";
12
+ import { d as Ae, t as Ne } from "../function-C10DGppn.js";
13
13
  import { s as Pe } from "../gestures-CcXV6fCp.js";
14
- import { c as Ae, s as Re } from "../stylesheet-JlRFfJIc.js";
15
- import { g as Qe, a as Ne, c as je, b as ze } from "../layout-BSMtwCga.js";
16
- import { e as $e, f as Fe, c as Ve, d as ke, l as Ue, m as qe, r as He, b as Ze, a as Ke, s as We } from "../math-BOBiC4TN.js";
17
- import { b as Je, l as Le, p as Ye, r as Xe, t as _e } from "../number-CumqY64S.js";
18
- import { c as tt, d as st, i as at, b as ot, a as rt, m as nt, e as it, o as ct, p as lt } from "../object-D6MVWB4l.js";
19
- import { n as ft, r as dt } from "../polyfills-DJrTJQky.js";
20
- import { s as pt, w as xt } from "../scroll-7JSxRKFK.js";
21
- import { c as bt, a as gt, b as yt, d as Ct, g as It, i as vt, k as wt, s as Et, t as St, u as Tt } from "../string-BlMQbe8b.js";
22
- import { g as Pt, a as Bt } from "../style-j2TwriJ_.js";
23
- import { c as Rt, n as Dt, p as Qt, s as Nt, u as jt } from "../url-IGj2LgDW.js";
24
- function b(t, e, ...s) {
14
+ import { c as Se, s as we } from "../stylesheet-DbHOxtjw.js";
15
+ import { g as De, a as Me, c as Be, b as ze } from "../layout-BSMtwCga.js";
16
+ import { e as Ue, f as Ve, c as je, d as $e, l as Fe, m as Le, r as ke, b as Ye, a as qe, s as He } from "../math-BOBiC4TN.js";
17
+ import { f as Ze } from "../metadata-jfowcCyz.js";
18
+ import { A as Ge, j as Je, d as Xe, h as et, e as tt, g as st, i as at, f as ot, b as rt, c as nt, N as it, a as ct, k as lt, m as ut, p as ft } from "../morph-BQErz7qP.js";
19
+ import { b as mt, l as pt, p as xt, r as Et, t as ht } from "../number-CumqY64S.js";
20
+ import { c as bt, d as gt, i as Ct, b as yt, a as It, m as Ot, e as At, o as Nt, p as vt } from "../object-CcMK4y_r.js";
21
+ import { n as Rt, r as St } from "../polyfills-DJrTJQky.js";
22
+ import { s as _t, w as Dt } from "../scroll-jcbHDexr.js";
23
+ import { c as Bt, a as zt, b as Qt, d as Ut, g as Vt, i as jt, k as $t, s as Ft, t as Lt, u as kt } from "../string-BlMQbe8b.js";
24
+ import { g as qt, a as Ht } from "../style-j2TwriJ_.js";
25
+ import { c as Zt, i as Wt, a as Gt, b as Jt, n as Xt, p as es, s as ts, u as ss } from "../url-DAl-mgbC.js";
26
+ function h(t, e, ...s) {
25
27
  return [...t.slice(0, e), ...s, ...t.slice(e)];
26
28
  }
27
- function g(t, e) {
29
+ function T(t, e) {
28
30
  const s = t.length;
29
31
  e = e % s;
30
32
  const a = new Array(s);
@@ -34,7 +36,7 @@ function g(t, e) {
34
36
  }
35
37
  return a;
36
38
  }
37
- function y(t, e = 2) {
39
+ function b(t, e = 2) {
38
40
  if (!+t) return "0 Bytes";
39
41
  const s = 1024, a = e < 0 ? 0 : e, o = [
40
42
  "Bytes",
@@ -49,7 +51,7 @@ function y(t, e = 2) {
49
51
  ], r = Math.floor(Math.log(t) / Math.log(s));
50
52
  return `${parseFloat((t / Math.pow(s, r)).toFixed(a))} ${o[r]}`;
51
53
  }
52
- function C(t) {
54
+ function g(t) {
53
55
  if (navigator.clipboard)
54
56
  navigator.clipboard.writeText(t).then(() => {
55
57
  console.log("Text copied to clipboard successfully!");
@@ -67,13 +69,13 @@ function C(t) {
67
69
  document.body.removeChild(e);
68
70
  }
69
71
  }
70
- function I(t, e) {
72
+ function C(t, e) {
71
73
  return t.x < e.x + e.width && t.x > e.x && t.y < e.y + e.height && t.y > e.y;
72
74
  }
73
- function v(t, e) {
75
+ function y(t, e) {
74
76
  return Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2) < e.radius;
75
77
  }
76
- function w(t, e) {
78
+ function I(t, e) {
77
79
  let s = !1;
78
80
  const { x: a, y: o } = t;
79
81
  for (let r = 0, n = e.length - 1; r < e.length; n = r++) {
@@ -89,7 +91,7 @@ function f(t, e) {
89
91
  return a.startsWith("var") ? f(t, a.slice(4, -1)) : a;
90
92
  }
91
93
  }
92
- function E(...t) {
94
+ function O(...t) {
93
95
  const e = {};
94
96
  return Array.from(document.styleSheets).forEach((s) => {
95
97
  Array.from(s.cssRules).forEach((a) => {
@@ -102,16 +104,16 @@ function E(...t) {
102
104
  e[s] || console.warn(`variable named ${s} not found`);
103
105
  }), e;
104
106
  }
105
- function S(t) {
107
+ function A(t) {
106
108
  const e = window.atob(t);
107
109
  return decodeURIComponent(window.escape(e));
108
110
  }
109
- function T(t) {
111
+ function N(t) {
110
112
  const e = window.unescape(encodeURIComponent(t));
111
113
  return window.btoa(e);
112
114
  }
113
115
  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,}$/;
114
- function O(t) {
116
+ function v(t) {
115
117
  let e, s;
116
118
  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 };
117
119
  }
@@ -122,7 +124,7 @@ function P(t, e) {
122
124
  }
123
125
  return null;
124
126
  }
125
- function B(t, e, s, a) {
127
+ function R(t, e, s, a) {
126
128
  let o, r = !1, n = 0;
127
129
  const c = () => {
128
130
  clearInterval(o), a != null && a.restartCounter && (n = 0), r && (o = setInterval(() => {
@@ -136,31 +138,44 @@ function B(t, e, s, a) {
136
138
  };
137
139
  }
138
140
  export {
139
- Je as beautifyNumber,
140
- $e as calculateDistance,
141
- Fe as calculateDistanceWithRadius,
142
- bt as camelToKebab,
143
- gt as capitalize,
144
- Rt as changeHistory,
145
- Ve as clamp,
146
- tt as cloneDeep,
141
+ Ge as ACTION_CREATE,
142
+ Je as ACTION_PRESERVE,
143
+ Xe as ACTION_REMOVE,
144
+ et as ACTION_REMOVE_ATTR,
145
+ tt as ACTION_REPLACE,
146
+ st as ACTION_SET_ATTR,
147
+ at as ACTION_SKIP,
148
+ ot as ACTION_UPDATE,
149
+ rt as NODE_TYPE_COMMENT,
150
+ nt as NODE_TYPE_DOCUMENT,
151
+ it as NODE_TYPE_ELEMENT,
152
+ ct as NODE_TYPE_TEXT,
153
+ mt as beautifyNumber,
154
+ Ue as calculateDistance,
155
+ Ve as calculateDistanceWithRadius,
156
+ Bt as camelToKebab,
157
+ zt as capitalize,
158
+ Zt as changeHistory,
159
+ je as clamp,
160
+ bt as cloneDeep,
147
161
  P as cloneTemplateContent,
148
- st as compareObjects,
149
- M as contain,
150
- C as copyTextToClipboard,
151
- $ as cover,
152
- ve as createJSONAndSave,
153
- Ae as createStylesheet,
154
- ke as damp,
155
- Se as debounce,
156
- yt as declension,
157
- T as decode,
158
- Ct as decodeHtmlEntities,
159
- Ce as dispatchEvent,
160
- v as dotCircleCollision,
161
- w as dotPolygonCollision,
162
- I as dotRectCollision,
163
- we as downloadURI,
162
+ gt as compareObjects,
163
+ Q as contain,
164
+ g as copyTextToClipboard,
165
+ U as cover,
166
+ ye as createJSONAndSave,
167
+ Se as createStylesheet,
168
+ $e as damp,
169
+ Ae as debounce,
170
+ Qt as declension,
171
+ N as decode,
172
+ Ut as decodeHtmlEntities,
173
+ lt as diff,
174
+ ge as dispatchEvent,
175
+ y as dotCircleCollision,
176
+ I as dotPolygonCollision,
177
+ C as dotRectCollision,
178
+ Ie as downloadURI,
164
179
  te as easeInCubic,
165
180
  se as easeInExpo,
166
181
  ae as easeInOutCubic,
@@ -176,68 +191,74 @@ export {
176
191
  me as easeOutQuad,
177
192
  pe as easeOutQuart,
178
193
  xe as easeOutQuint,
179
- S as encode,
180
- G as findParentElement,
181
- J as findScrollParentElement,
182
- F as fixPosition,
183
- y as formatBytes,
184
- It as generateId,
185
- L as getAllParentElements,
186
- Qe as getCumulativeOffsetLeft,
187
- Ne as getCumulativeOffsetTop,
188
- je as getCumulativePosition,
189
- Y as getElement,
190
- Pt as getElementTransitionDurationMS,
191
- Bt as getElementTransitionDurationS,
192
- U as getPointerPosition,
193
- E as getRootVariables,
194
+ A as encode,
195
+ K as findParentElement,
196
+ Z as findScrollParentElement,
197
+ V as fixPosition,
198
+ b as formatBytes,
199
+ Ze as formatMediaDuration,
200
+ Vt as generateId,
201
+ W as getAllParentElements,
202
+ De as getCumulativeOffsetLeft,
203
+ Me as getCumulativeOffsetTop,
204
+ Be as getCumulativePosition,
205
+ G as getElement,
206
+ qt as getElementTransitionDurationMS,
207
+ Ht as getElementTransitionDurationS,
208
+ F as getPointerPosition,
209
+ O as getRootVariables,
194
210
  ze as getStickyOffset,
195
- b as insert,
196
- j as isBrowser,
197
- at as isESClass,
198
- ge as isElementVisible,
199
- ot as isNullish,
200
- rt as isObject,
201
- vt as isUppercase,
202
- wt as kebabToCamel,
203
- Ue as lerp,
204
- he as linear,
205
- Le as loopNumber,
206
- qe as mapRange,
207
- V as measureText,
208
- nt as mergeDeep,
209
- it as mixin,
210
- q as normalize,
211
- Dt as normalizeBase,
212
- ft as nullishCoalescing,
213
- ct as omit,
214
- D as parseAttribute,
215
- Q as parseAttributeValue,
216
- Qt as parseSearchParameters,
217
- lt as pick,
218
- Ye as preciseNumber,
219
- dt as requestIdleCallback,
220
- He as round,
221
- Xe as roundNumberTo,
222
- H as screenToCartesian,
223
- pt as scrollToElement,
224
- B as setIntervalOnIntersection,
211
+ h as insert,
212
+ B as isBrowser,
213
+ Ct as isESClass,
214
+ Te as isElementVisible,
215
+ Wt as isLocalUrl,
216
+ yt as isNullish,
217
+ It as isObject,
218
+ jt as isUppercase,
219
+ $t as kebabToCamel,
220
+ Fe as lerp,
221
+ Ee as linear,
222
+ pt as loopNumber,
223
+ Le as mapRange,
224
+ j as measureText,
225
+ Ot as mergeDeep,
226
+ At as mixin,
227
+ ut as morph,
228
+ L as normalize,
229
+ Gt as normalizeBase,
230
+ Jt as normalizeRelativeURLs,
231
+ Xt as normalizeURL,
232
+ Rt as nullishCoalescing,
233
+ Nt as omit,
234
+ _ as parseAttribute,
235
+ D as parseAttributeValue,
236
+ es as parseSearchParameters,
237
+ ft as patch,
238
+ vt as pick,
239
+ xt as preciseNumber,
240
+ St as requestIdleCallback,
241
+ ke as round,
242
+ Et as roundNumberTo,
243
+ k as screenToCartesian,
244
+ _t as scrollToElement,
245
+ R as setIntervalOnIntersection,
225
246
  Pe as setupDrag,
226
- g as shiftArray,
227
- Ze as smootherstep,
228
- Ke as smoothstep,
229
- Et as snakeToDotted,
230
- Nt as splitPath,
231
- We as step,
232
- Re as styleToString,
233
- Te as throttle,
234
- St as toPascalCase,
235
- _e as toStep,
236
- X as traverseNodes,
237
- _ as traverseShadowRoots,
238
- O as tryCreateHrefFromContact,
239
- Tt as uncapitalize,
240
- jt as updateSearchParameter,
241
- xt as wait,
242
- K as whenDefined
247
+ T as shiftArray,
248
+ Ye as smootherstep,
249
+ qe as smoothstep,
250
+ Ft as snakeToDotted,
251
+ ts as splitPath,
252
+ He as step,
253
+ we as styleToString,
254
+ Ne as throttle,
255
+ Lt as toPascalCase,
256
+ ht as toStep,
257
+ J as traverseNodes,
258
+ X as traverseShadowRoots,
259
+ v as tryCreateHrefFromContact,
260
+ kt as uncapitalize,
261
+ ss as updateSearchParameter,
262
+ Dt as wait,
263
+ q as whenDefined
243
264
  };
@@ -0,0 +1,49 @@
1
+ export declare const NODE_TYPE_ELEMENT: 1;
2
+ export declare const NODE_TYPE_TEXT: 3;
3
+ export declare const NODE_TYPE_COMMENT: 8;
4
+ export declare const NODE_TYPE_DOCUMENT: 9;
5
+ export declare const ACTION_CREATE: 0;
6
+ export declare const ACTION_REMOVE: 1;
7
+ export declare const ACTION_REPLACE: 2;
8
+ export declare const ACTION_UPDATE: 3;
9
+ export declare const ACTION_SET_ATTR: 4;
10
+ export declare const ACTION_REMOVE_ATTR: 5;
11
+ export declare const ACTION_SKIP: 6;
12
+ export declare const ACTION_PRESERVE: 7;
13
+ type ActionType = typeof ACTION_CREATE | typeof ACTION_REMOVE | typeof ACTION_REPLACE | typeof ACTION_UPDATE | typeof ACTION_SET_ATTR | typeof ACTION_REMOVE_ATTR | typeof ACTION_SKIP | typeof ACTION_PRESERVE;
14
+ interface PatchBase {
15
+ type: ActionType;
16
+ }
17
+ interface CreatePatch extends PatchBase {
18
+ type: typeof ACTION_CREATE;
19
+ node: Node;
20
+ }
21
+ interface RemovePatch extends PatchBase {
22
+ type: typeof ACTION_REMOVE;
23
+ }
24
+ interface ReplacePatch extends PatchBase {
25
+ type: typeof ACTION_REPLACE;
26
+ node?: Node;
27
+ value?: string;
28
+ }
29
+ interface UpdatePatch extends PatchBase {
30
+ type: typeof ACTION_UPDATE;
31
+ attributes: AttributePatch[];
32
+ children: Patch[];
33
+ }
34
+ interface AttributePatch extends PatchBase {
35
+ type: typeof ACTION_SET_ATTR | typeof ACTION_REMOVE_ATTR;
36
+ name: string;
37
+ value?: string;
38
+ }
39
+ interface SkipPatch extends PatchBase {
40
+ type: typeof ACTION_SKIP;
41
+ }
42
+ interface PreservePatch extends PatchBase {
43
+ type: typeof ACTION_PRESERVE;
44
+ }
45
+ type Patch = CreatePatch | RemovePatch | ReplacePatch | UpdatePatch | AttributePatch | SkipPatch | PreservePatch | undefined;
46
+ export declare function diff(from: Node | undefined, to: Node | undefined): Patch;
47
+ export declare function patch(parent: Node, PATCH: Patch, child?: Node): Promise<void>;
48
+ export declare function morph(from: Node, to: Node): Promise<void>;
49
+ export {};
@@ -4,6 +4,6 @@ export declare function mergeDeep(target: object, source: object, isObjectFuncti
4
4
  export declare function isNullish(value: any): boolean;
5
5
  export declare function compareObjects(obj1: any, obj2: any): boolean;
6
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>;
7
+ export declare function omit<T extends object, R extends keyof T>(object: T | undefined, keys: Array<R>): Omit<T, R>;
8
8
  export declare function isESClass(fn: Function): boolean;
9
9
  export declare function mixin(baseClass: any, ...mixins: any[]): void;
@@ -28,3 +28,9 @@ export declare function parseSearchParameters(search: string): {
28
28
  [key: string]: string;
29
29
  };
30
30
  export declare function updateSearchParameter(parameterName: string, value?: string | number): void;
31
+ export declare function normalizeRelativeURLs(el: Element | Document, base: string | URL): void;
32
+ export declare function normalizeURL(url: URL | string, { base, trailingSlash, }?: {
33
+ base?: string;
34
+ trailingSlash?: boolean;
35
+ }): URL;
36
+ export declare function isLocalUrl(href: string): boolean;
@@ -1 +1 @@
1
- "use strict";var d=t=>{throw TypeError(t)};var E=(t,s,e)=>s.has(t)||d("Cannot "+e);var i=(t,s,e)=>(E(t,s,"read from private field"),e?e.call(t):s.get(t)),a=(t,s,e)=>s.has(t)?d("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),n=(t,s,e,m)=>(E(t,s,"write to private field"),m?m.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const f=require("../index-CKTweR3M.cjs"),y=require("../events-KVanG9sR.cjs");require("construct-style-sheets-polyfill");const h=require("../ticker/index.cjs");var r,u,c,o,l;class p extends b.SourceElement{constructor(){super(...arguments);a(this,r,0);a(this,u,!1);a(this,c,this);a(this,o,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e!==i(this,r)&&y.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}}),e>i(this,r)&&n(this,r,e),this.consumerElement.readyState===4&&(h.ticker.unsubscribe(i(this,o)),i(this,u)&&this.sourceManager.current&&this.consumerElement.play())});a(this,l,()=>{this.hasAttribute("click-controls")&&(this.consumerElement.paused?this.consumerElement.play():this.hasAttribute("controls")||this.consumerElement.pause())})}connectedCallback(){super.connectedCallback();const e=this.getAttribute("click-controls");e&&(e==="parent"?n(this,c,this.parentElement):n(this,c,document.querySelector(e)||this)),this.addEventListener("sourceCapture",()=>{n(this,u,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():n(this,u,!0)),h.ticker.subscribe(i(this,o))}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.pause(),this.hasAttribute("release-pause")&&this.consumerElement.pause(),this.hasAttribute("release-stop")&&(this.consumerElement.pause(),this.consumerElement.currentTime=0),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")}),i(this,c).addEventListener("click",i(this,l))}disconnectedCallback(){super.disconnectedCallback(),h.ticker.unsubscribe(i(this,o)),n(this,r,0),i(this,c).removeEventListener("click",i(this,l))}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||"",e&&this.hasAttribute("volume")&&(this.consumerElement.volume=parseFloat(this.getAttribute("volume")||"1"))}}r=new WeakMap,u=new WeakMap,c=new WeakMap,o=new WeakMap,l=new WeakMap;f.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",p);exports.VideoElement=p;
1
+ "use strict";var d=t=>{throw TypeError(t)};var E=(t,s,e)=>s.has(t)||d("Cannot "+e);var i=(t,s,e)=>(E(t,s,"read from private field"),e?e.call(t):s.get(t)),a=(t,s,e)=>s.has(t)?d("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,e),n=(t,s,e,m)=>(E(t,s,"write to private field"),m?m.call(t,e):s.set(t,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../SourceElement-TzgPNQOd.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const f=require("../index-CKTweR3M.cjs"),y=require("../events-KVanG9sR.cjs");require("construct-style-sheets-polyfill");const h=require("../ticker/index.cjs");var r,u,c,o,l;class p extends b.SourceElement{constructor(){super(...arguments);a(this,r,0);a(this,u,!1);a(this,c,this);a(this,o,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const e=this.consumerElement.readyState/4;e!==i(this,r)&&y.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}}),e>i(this,r)&&n(this,r,e),this.consumerElement.readyState===4&&(h.ticker.unsubscribe(i(this,o)),i(this,u)&&this.sourceManager.current&&this.consumerElement.play())});a(this,l,()=>{this.hasAttribute("click-controls")&&(this.consumerElement.paused?this.consumerElement.play():this.hasAttribute("controls")||this.consumerElement.pause())})}connectedCallback(){super.connectedCallback();const e=this.getAttribute("click-controls");e&&(e==="parent"?n(this,c,this.parentElement):n(this,c,document.querySelector(e)||this)),this.addEventListener("sourceCapture",()=>{n(this,u,!1),this.hasAttribute("capture-autoplay")&&(this.sourceManager.current?this.consumerElement.play():n(this,u,!0)),h.ticker.subscribe(i(this,o))}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.pause(),this.hasAttribute("release-pause")&&this.consumerElement.pause(),this.hasAttribute("release-stop")&&(this.consumerElement.pause(),this.consumerElement.currentTime=0),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")}),i(this,c).addEventListener("click",i(this,l))}disconnectedCallback(){super.disconnectedCallback(),h.ticker.unsubscribe(i(this,o)),n(this,r,0),i(this,c).removeEventListener("click",i(this,l))}createConsumer(){return document.createElement("video")}consumeSource(e){this.consumerElement.src=e||"",e&&this.hasAttribute("volume")&&(this.consumerElement.volume=parseFloat(this.getAttribute("volume")||"1"))}}r=new WeakMap,u=new WeakMap,c=new WeakMap,o=new WeakMap,l=new WeakMap;f.isBrowser&&!customElements.get("e-video")&&customElements.define("e-video",p);exports.VideoElement=p;
@@ -3,10 +3,10 @@ var d = (t) => {
3
3
  };
4
4
  var p = (t, s, e) => s.has(t) || d("Cannot " + e);
5
5
  var i = (t, s, e) => (p(t, s, "read from private field"), e ? e.call(t) : s.get(t)), c = (t, s, e) => s.has(t) ? d("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), a = (t, s, e, m) => (p(t, s, "write to private field"), m ? m.call(t, e) : s.set(t, e), e);
6
- import { a as E } from "../SourceElement-BiNNtaz9.js";
6
+ import { a as E } from "../SourceElement-BQ7g2KWK.js";
7
7
  import "../window-resizer/index.js";
8
- import "../Store-BtVtCGLk.js";
9
- import { i as f } from "../index-JqYHGoo6.js";
8
+ import "../Store-CgQ3ReoB.js";
9
+ import { i as f } from "../index-LReFyN6i.js";
10
10
  import { d as b } from "../events-CsVF98U6.js";
11
11
  import "construct-style-sheets-polyfill";
12
12
  import { ticker as h } from "../ticker/index.js";
@@ -4,7 +4,7 @@ var h = (e) => {
4
4
  var c = (e, i, s) => i.has(e) || h("Cannot " + s);
5
5
  var t = (e, i, s) => (c(e, i, "read from private field"), s ? s.call(e) : i.get(e)), u = (e, i, s) => i.has(e) ? h("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, s), f = (e, i, s, n) => (c(e, i, "write to private field"), n ? n.call(e, s) : i.set(e, s), s);
6
6
  import { Notifier as p } from "../notifier/index.js";
7
- import { i as w } from "../index-JqYHGoo6.js";
7
+ import { i as w } from "../index-LReFyN6i.js";
8
8
  import { d as z } from "../function-C10DGppn.js";
9
9
  import "construct-style-sheets-polyfill";
10
10
  var r, o, d;
@@ -1 +1 @@
1
- "use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../SourceElement-BBfaAgwe.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const L=require("../index-CKTweR3M.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
1
+ "use strict";var v=s=>{throw TypeError(s)};var E=(s,r,t)=>r.has(s)||v("Cannot "+t);var e=(s,r,t)=>(E(s,r,"read from private field"),t?t.call(s):r.get(s)),o=(s,r,t)=>r.has(s)?v("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),u=(s,r,t,a)=>(E(s,r,"write to private field"),a?a.call(s,t):r.set(s,t),t),w=(s,r,t)=>(E(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../SourceElement-TzgPNQOd.cjs");require("../window-resizer/index.cjs");require("../Store-1JrMCgdX.cjs");const L=require("../index-CKTweR3M.cjs"),T=require("../events-KVanG9sR.cjs"),_=require("../string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");var i,c,n,y,l,f,b,R,p,I;const d=class d extends A.SourceElement{constructor(){super();o(this,p);o(this,i);o(this,c);o(this,n,!1);o(this,y,!1);o(this,l,()=>{u(this,n,e(this,n)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),u(this,i,new window.YT.Player(e(this,c),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,f),onError:e(this,b),onStateChange:e(this,R)}}))});o(this,f,()=>{u(this,y,!0),w(this,p,I).call(this)});o(this,b,t=>{var a,h;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(h=(a=this.consumerElement).onerror)==null||h.call(a,new Event("error"))});o(this,R,()=>{});u(this,c,"yt-"+_.generateId(10)),d.__apiReady||(window.onYouTubeIframeAPIReady=()=>{d.__apiReady=!0,T.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,y)?e(this,i).playVideo():u(this,n,!0))}),this.addEventListener("sourceRelease",()=>{e(this,i)&&this.hasAttribute("capture-autoplay")&&(e(this,i).pauseVideo(),this.hasAttribute("replay")&&e(this,i).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,c),t}consumeSource(t){var a;if(t){if(!document.getElementById("youtube-script")){const h=document.createElement("script");h.id,h.src="https://www.youtube.com/iframe_api";const g=document.getElementsByTagName("script")[0];(a=g.parentNode)==null||a.insertBefore(h,g)}e(this,i)?w(this,p,I).call(this):d.__apiReady?e(this,l).call(this):addEventListener("youTubeIframeAPIReady",e(this,l))}else e(this,i)&&e(this,i).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,i)&&e(this,i).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,l))}};i=new WeakMap,c=new WeakMap,n=new WeakMap,y=new WeakMap,l=new WeakMap,f=new WeakMap,b=new WeakMap,R=new WeakMap,p=new WeakSet,I=function(){var t,a;this.currentURL&&(this.currentURL.startsWith("http")?e(this,i).loadVideoByUrl(this.currentURL):e(this,i).loadVideoById(this.currentURL)),e(this,n)?e(this,i).playVideo():e(this,i).stopVideo(),u(this,n,!1),(a=(t=this.consumerElement).onload)==null||a.call(t,new Event("load"))},d.__apiReady=!1;let m=d;L.isBrowser&&!customElements.get("e-youtube")&&customElements.define("e-youtube",m);exports.YouTubeElement=m;
@@ -3,10 +3,10 @@ var L = (s) => {
3
3
  };
4
4
  var b = (s, r, t) => r.has(s) || L("Cannot " + t);
5
5
  var e = (s, r, t) => (b(s, r, "read from private field"), t ? t.call(s) : r.get(s)), o = (s, r, t) => r.has(s) ? L("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, t), u = (s, r, t, a) => (b(s, r, "write to private field"), a ? a.call(s, t) : r.set(s, t), t), E = (s, r, t) => (b(s, r, "access private method"), t);
6
- import { a as g } from "../SourceElement-BiNNtaz9.js";
6
+ import { a as g } from "../SourceElement-BQ7g2KWK.js";
7
7
  import "../window-resizer/index.js";
8
- import "../Store-BtVtCGLk.js";
9
- import { i as v } from "../index-JqYHGoo6.js";
8
+ import "../Store-CgQ3ReoB.js";
9
+ import { i as v } from "../index-LReFyN6i.js";
10
10
  import { d as T } from "../events-CsVF98U6.js";
11
11
  import { g as V } from "../string-BlMQbe8b.js";
12
12
  import "construct-style-sheets-polyfill";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.81.0",
3
+ "version": "0.82.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -38,6 +38,11 @@
38
38
  "require": "./lib/billboard/index.cjs",
39
39
  "default": "./lib/billboard/index.js"
40
40
  },
41
+ "./cache": {
42
+ "types": "./lib/cache/index.d.ts",
43
+ "require": "./lib/cache/index.cjs",
44
+ "default": "./lib/cache/index.js"
45
+ },
41
46
  "./canvas": {
42
47
  "types": "./lib/canvas/index.d.ts",
43
48
  "require": "./lib/canvas/index.cjs",
@@ -93,6 +98,11 @@
93
98
  "require": "./lib/en3/index.cjs",
94
99
  "default": "./lib/en3/index.js"
95
100
  },
101
+ "./history": {
102
+ "types": "./lib/history/index.d.ts",
103
+ "require": "./lib/history/index.cjs",
104
+ "default": "./lib/history/index.js"
105
+ },
96
106
  "./iframe": {
97
107
  "types": "./lib/iframe/index.d.ts",
98
108
  "require": "./lib/iframe/index.cjs",
@@ -128,6 +138,11 @@
128
138
  "require": "./lib/loading/index.cjs",
129
139
  "default": "./lib/loading/index.js"
130
140
  },
141
+ "./local-links": {
142
+ "types": "./lib/local-links/index.d.ts",
143
+ "require": "./lib/local-links/index.cjs",
144
+ "default": "./lib/local-links/index.js"
145
+ },
131
146
  "./masonry-layout": {
132
147
  "types": "./lib/masonry-layout/index.d.ts",
133
148
  "require": "./lib/masonry-layout/index.cjs",
@@ -153,6 +168,16 @@
153
168
  "require": "./lib/order/index.cjs",
154
169
  "default": "./lib/order/index.js"
155
170
  },
171
+ "./page-announcer": {
172
+ "types": "./lib/page-announcer/index.d.ts",
173
+ "require": "./lib/page-announcer/index.cjs",
174
+ "default": "./lib/page-announcer/index.js"
175
+ },
176
+ "./page-scroll": {
177
+ "types": "./lib/page-scroll/index.d.ts",
178
+ "require": "./lib/page-scroll/index.cjs",
179
+ "default": "./lib/page-scroll/index.js"
180
+ },
156
181
  "./pixel-perfect": {
157
182
  "types": "./lib/pixel-perfect/index.d.ts",
158
183
  "require": "./lib/pixel-perfect/index.cjs",
@@ -213,6 +238,11 @@
213
238
  "require": "./lib/source/index.cjs",
214
239
  "default": "./lib/source/index.js"
215
240
  },
241
+ "./spa": {
242
+ "types": "./lib/spa/index.d.ts",
243
+ "require": "./lib/spa/index.cjs",
244
+ "default": "./lib/spa/index.js"
245
+ },
216
246
  "./store": {
217
247
  "types": "./lib/store/index.d.ts",
218
248
  "require": "./lib/store/index.cjs",
@@ -263,6 +293,9 @@
263
293
  "billboard": [
264
294
  "lib/billboard/index.d.ts"
265
295
  ],
296
+ "cache": [
297
+ "lib/cache/index.d.ts"
298
+ ],
266
299
  "canvas": [
267
300
  "lib/canvas/index.d.ts"
268
301
  ],
@@ -299,6 +332,9 @@
299
332
  "en3": [
300
333
  "lib/en3/index.d.ts"
301
334
  ],
335
+ "history": [
336
+ "lib/history/index.d.ts"
337
+ ],
302
338
  "iframe": [
303
339
  "lib/iframe/index.d.ts"
304
340
  ],
@@ -320,6 +356,9 @@
320
356
  "loading": [
321
357
  "lib/loading/index.d.ts"
322
358
  ],
359
+ "local-links": [
360
+ "lib/local-links/index.d.ts"
361
+ ],
323
362
  "masonry-layout": [
324
363
  "lib/masonry-layout/index.d.ts"
325
364
  ],
@@ -335,6 +374,12 @@
335
374
  "order": [
336
375
  "lib/order/index.d.ts"
337
376
  ],
377
+ "page-announcer": [
378
+ "lib/page-announcer/index.d.ts"
379
+ ],
380
+ "page-scroll": [
381
+ "lib/page-scroll/index.d.ts"
382
+ ],
338
383
  "pixel-perfect": [
339
384
  "lib/pixel-perfect/index.d.ts"
340
385
  ],
@@ -371,6 +416,9 @@
371
416
  "source": [
372
417
  "lib/source/index.d.ts"
373
418
  ],
419
+ "spa": [
420
+ "lib/spa/index.d.ts"
421
+ ],
374
422
  "store": [
375
423
  "lib/store/index.d.ts"
376
424
  ],
@@ -1,5 +0,0 @@
1
- "use strict";var Y=l=>{throw TypeError(l)};var Z=(l,n,e)=>n.has(l)||Y("Cannot "+e);var t=(l,n,e)=>(Z(l,n,"read from private field"),e?e.call(l):n.get(l)),i=(l,n,e)=>n.has(l)?Y("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(l):n.set(l,e),s=(l,n,e,h)=>(Z(l,n,"write to private field"),h?h.call(l,e):n.set(l,e),e),F=(l,n,e)=>(Z(l,n,"access private method"),e);const rt=require("./element-linked-store/index.cjs"),nt=require("./index-CKTweR3M.cjs"),w=require("./events-KVanG9sR.cjs"),tt=require("./string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");const J=require("./loading/index.cjs"),at=require("./order/index.cjs"),et=require("./window-resizer/index.cjs"),ht=require("./Store-1JrMCgdX.cjs");var V,b,_,L,m,p,M;class st{constructor(n){i(this,V);i(this,b);i(this,_);i(this,L);i(this,m);i(this,p);i(this,M);s(this,V,n);let e=n.split(".");const h=/\b\d{1,2}x\b/g,a=e.find(y=>y.match(h)&&parseInt(y));s(this,_,a?parseInt(a):1),a&&(e=e.slice(0,-1)),s(this,b,e.length>1?e.slice(0,-1).join("."):e.join("."));const o=/\d+max/g,d=/\d+min/g,N=/\d+mar/g,U=/\d+mir/g,W=e.find(y=>y.match(o)),u=e.find(y=>y.match(d)),x=e.find(y=>y.match(N)),X=e.find(y=>y.match(U));x?(s(this,m,parseInt(x)),s(this,p,"max"),s(this,L,`(max-aspect-ratio: ${t(this,m)})`)):X?(s(this,m,parseInt(X)),s(this,p,"max"),s(this,L,`(min-aspect-ratio: ${t(this,m)})`)):W?(s(this,m,parseInt(W)),s(this,p,"max"),s(this,L,`(max-width: ${t(this,m)}px)`)):u?(s(this,m,parseInt(u)),s(this,L,`(min-width: ${t(this,m)}px)`),s(this,p,"min")):(s(this,m,0),s(this,L,`(min-width: ${t(this,m)}px)`),s(this,p,"min")),s(this,b,t(this,b).replace(`.${t(this,m)}${t(this,p)}`,"")),s(this,M,e[e.length-1]===t(this,b)?"":"."+e[e.length-1]),s(this,M,t(this,M).replace(`.${t(this,m)}${t(this,p)}`,""))}get url(){return t(this,V)}get name(){return t(this,b)}get density(){return t(this,_)}get query(){return t(this,L)}get extension(){return t(this,M)}get queryType(){return t(this,p)}get queryValue(){return t(this,m)}}V=new WeakMap,b=new WeakMap,_=new WeakMap,L=new WeakMap,m=new WeakMap,p=new WeakMap,M=new WeakMap;var v;class Q{constructor(n,e){i(this,v);s(this,v,new Map);const h=(e==null?void 0:e.mediaBuckets)!==!1,a=typeof n=="string"?h?n.trim().split(",").map(u=>u.trim()).filter(u=>!!u):[n]:n,o=[];a.forEach(u=>{const x=new st(u);o.push([x.query,x])});const d=o.filter(u=>u[1].queryType.includes("max")).sort((u,x)=>x[1].queryValue-u[1].queryValue),N=o.filter(u=>u[1].queryType.includes("min")&&u[1].queryValue!==0).sort((u,x)=>u[1].queryValue-x[1].queryValue),U=o.filter(u=>u[0]==="(min-width: 0px)");(U?[...U,...d,...N]:[...d,...N]).forEach(u=>{t(this,v).has(u[0])||t(this,v).set(u[0],[]),t(this,v).get(u[0]).push(u[1])})}get mediaBuckets(){return t(this,v)}}v=new WeakMap;var A,$;class it extends ht.Store{constructor(e){super(void 0);i(this,A);i(this,$,()=>{let e;t(this,A).mediaBuckets.forEach((o,d)=>{matchMedia(d).matches&&(e=o)});let h,a=0;e==null||e.forEach(o=>{o.density>a&&o.density<=Math.max(devicePixelRatio,1)&&(a=o.density,h=o)}),e!=null&&e.length&&!h&&(h=e[0]),this.current=h});s(this,A,new Q(e.srcset,e.sourceSetOptions))}updateSource(e){s(this,A,new Q(e.srcset,e.sourceSetOptions)),t(this,$).call(this)}close(){super.close(),this.disconnect()}connect(){et.windowResizer.subscribe(t(this,$),at.RESIZE_ORDER.SOURCE_MANAGER),t(this,$).call(this)}disconnect(){et.windowResizer.unsubscribe(t(this,$))}}A=new WeakMap,$=new WeakMap;function ot(l){if(isNaN(l))return"0:00";const n=Math.floor(Math.max(0,l)),e=Math.floor(n/3600),h=Math.floor(n%3600/60),o=(n%60).toString().padStart(2,"0");if(e>0){const d=h.toString().padStart(2,"0");return`${e}:${d}:${o}`}else return`${h}:${o}`}let ct=0;var f,r,I,E,S,g,z,k,c,R,O,q,B,T,j,G,P,K,D,H,C;class lt extends HTMLElement{constructor(e){super();i(this,T);i(this,f,null);i(this,r,null);i(this,I,this);i(this,E,!1);i(this,S,!1);i(this,g,!1);i(this,z,"");i(this,k,"");i(this,c,new rt.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1,playing:!1,metadata:!1}));i(this,R,null);i(this,O);i(this,q,null);i(this,B);i(this,G,e=>{const h=e[0];t(this,g)&&(!t(this,S)||this.hasAttribute("reload-source"))&&h.isIntersecting&&this.triggerLazyLoad(),h.isIntersecting?w.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(F(this,T,j).call(this,void 0),s(this,S,!1)),w.dispatchEvent(this,"sourceRelease",{custom:!0}))});i(this,P,()=>{t(this,c).set("loaded",!0),t(this,c).set("error",!1),t(this,c).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.complete(t(this,k)),w.dispatchEvent(this,"sourceLoaded",{custom:!0});const e=getComputedStyle(this).getPropertyValue("--clear-duration");e?s(this,O,setTimeout(()=>{t(this,c).set("clear",!0)},parseFloat(e)*1e3)):t(this,c).set("clear",!0),s(this,E,!0)});i(this,K,e=>{t(this,c).set("loaded",!1),t(this,c).set("error",!0),t(this,c).set("loading",!1),!t(this,g)&&!t(this,E)&&J.loading.error(t(this,k)),w.dispatchEvent(this,"sourceError",{custom:!0}),s(this,E,!0)});i(this,D,()=>{t(this,c).set("playing",!0),w.dispatchEvent(this,"sourcePlay",{custom:!0})});i(this,H,()=>{t(this,c).set("playing",!1),w.dispatchEvent(this,"sourcePause",{custom:!0})});i(this,C,()=>{const e=t(this,r);(e.tagName==="VIDEO"||e.tagName==="AUDIO")&&e.readyState>=1&&(t(this,c).set("metadata",!0),w.dispatchEvent(this,"sourceMetadataLoaded",{custom:!0}),this.querySelectorAll("[data-source-duration]").forEach(h=>{h.textContent=ot(e.duration)}))});s(this,B,e==null?void 0:e.sourceSetOptions),nt.isBrowser&&window.IntersectionObserver&&s(this,R,new IntersectionObserver(t(this,G))),t(this,c).subscribe(h=>{var o;const a=(o=this.getAttribute("data-global-play-class"))==null?void 0:o.split(",");a!=null&&a.length&&(h.current.playing?a.forEach(d=>{document.documentElement.classList.add(d.trim())}):a.forEach(d=>{document.documentElement.classList.remove(d.trim())}))})}get consumerElement(){return t(this,r)}get consumerHolderElement(){return t(this,I)}get sourceManager(){return t(this,f)}get status(){return t(this,c)}get isLazy(){return t(this,g)}get currentURL(){return t(this,q)}get isFirstLoadHappened(){return t(this,E)}triggerLazyLoad(){!t(this,S)&&t(this,f).current&&t(this,f).current!==t(this,f).previous&&(s(this,S,!0),F(this,T,j).call(this,t(this,f).current))}connectedCallback(){s(this,z,`source-consumer-${++ct}`);const e=this.getAttribute("srcset")||"",h=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;h&&t(this,c).addElement(h),s(this,I,this.querySelector("[data-consumer-holder]")||this),this.querySelectorAll(".source-consumer").forEach(a=>a==null?void 0:a.remove()),s(this,r,this.createConsumer()),t(this,r).style.cssText=`
2
- display: block;
3
- width: 100%;
4
- height: 100%;
5
- `,t(this,r).classList.add("source-consumer"),t(this,r).addEventListener("play",t(this,D)),t(this,r).addEventListener("pause",t(this,H)),t(this,r).addEventListener("loadedmetadata",t(this,C)),t(this,C).call(this),this.classList.contains("MaskedVideo__video__element")&&console.log(),Array.from(this.attributes).forEach(a=>{if(a.name!=="srcset"){const o=a.nodeValue||"",d=tt.kebabToCamel(a.name);d in t(this,r)&&(t(this,r)[d]=o||!0)}});for(const a in this.dataset){const o=this.dataset[a],d=tt.kebabToCamel(a);d in t(this,r)&&(t(this,r)[d]=o?o==="false"?!1:o:!0)}t(this,I).appendChild(t(this,r)),s(this,f,new it({srcset:e,sourceSetOptions:t(this,B)})),s(this,g,this.hasAttribute("lazy")),t(this,f).subscribe(a=>{(!t(this,g)||t(this,g)&&t(this,S))&&F(this,T,j).call(this,a.current)}),t(this,f).connect(),t(this,R).observe(this)}disconnectedCallback(){var e;clearTimeout(t(this,O)),t(this,R).disconnect(),(e=t(this,f))==null||e.close(),t(this,r)&&(this.consumeSource(null),t(this,r).removeEventListener("play",t(this,D)),t(this,r).removeEventListener("pause",t(this,H)),t(this,r).removeEventListener("loadedmetadata",t(this,C)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,r).onerror=null,t(this,r).remove()),s(this,E,!1),s(this,S,!1),t(this,c).reset()}}f=new WeakMap,r=new WeakMap,I=new WeakMap,E=new WeakMap,S=new WeakMap,g=new WeakMap,z=new WeakMap,k=new WeakMap,c=new WeakMap,R=new WeakMap,O=new WeakMap,q=new WeakMap,B=new WeakMap,T=new WeakSet,j=function(e){if(clearTimeout(t(this,O)),t(this,r).onloadeddata=null,t(this,r).onload=null,t(this,r).onerror=null,t(this,c).set("loaded",!1),t(this,c).set("error",!1),t(this,c).set("loading",!1),t(this,c).set("clear",!1),t(this,c).set("playing",!1),t(this,c).set("metadata",!1),e){s(this,k,`${t(this,z)}-${e.url}`);const h=this.hasAttribute("keep-source-parameters");t(this,c).set("loading",!0),s(this,q,h?e.url:e.name+e.extension),this.consumeSource(t(this,q)),!t(this,g)&&!t(this,E)&&J.loading.add(t(this,k)),t(this,r).onloadeddata=()=>{t(this,P).call(this)},t(this,r).onload=()=>{t(this,P).call(this)},t(this,r).onerror=()=>{t(this,K).call(this,t(this,q))}}else s(this,q,null),this.consumeSource(null)},G=new WeakMap,P=new WeakMap,K=new WeakMap,D=new WeakMap,H=new WeakMap,C=new WeakMap;exports.Source=st;exports.SourceElement=lt;exports.SourceManager=it;exports.SourceSet=Q;