@agencecinq/utils 4.0.0 → 4.0.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.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +6 -0
- package/dist/events.d.ts +1 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/package.json +1 -1
- package/src/events.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @agencecinq/utils@4.0.
|
|
3
|
+
> @agencecinq/utils@4.0.1 build /Users/19h47/Sites/agencecinq-ui/packages/utils
|
|
4
4
|
> vite build
|
|
5
5
|
|
|
6
6
|
[36mvite v7.3.1 [32mbuilding client environment for production...[36m[39m
|
|
7
|
-
[2K[1Gtransforming (1) [2msrc/index.ts[22m[2K[1G[32m✓[39m 7 modules transformed.
|
|
7
|
+
[2K[1Gtransforming (1) [2msrc/index.ts[22m[2K[1Gtransforming (5) [2msrc/scroll.ts[22m[2K[1G[32m✓[39m 7 modules transformed.
|
|
8
8
|
[2K[1Grendering chunks (1)...[2K[1G[32m
|
|
9
9
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
10
|
-
[2K[1Gcomputing gzip size (0)...[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.js [39m[1m[2m3.
|
|
11
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
10
|
+
[2K[1Gcomputing gzip size (0)...[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.js [39m[1m[2m3.41 kB[22m[1m[22m[2m │ gzip: 1.57 kB[22m
|
|
11
|
+
[32m[36m[vite:dts][32m Declaration files built in 1952ms.
|
|
12
12
|
[39m
|
|
13
|
-
[32m✓ built in
|
|
13
|
+
[32m✓ built in 2.35s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @agencecinq/utils
|
|
2
2
|
|
|
3
|
+
## 4.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add `CART_BEFORE_UPDATE` event constant to coordinate cart pre-update flows. Listeners can call `event.preventDefault()` on the dispatched `CustomEvent` to take ownership of subsequent section rendering (e.g. a free-samples controller batching its own sync into a single render).
|
|
8
|
+
|
|
3
9
|
## 4.0.0
|
|
4
10
|
|
|
5
11
|
### Major Changes
|
package/dist/events.d.ts
CHANGED
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;CAUlB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const D = {
|
|
2
2
|
DRAWER_CLOSE: "drawer-close",
|
|
3
3
|
DRAWER_OPEN: "drawer-open",
|
|
4
4
|
DRAWER_TOGGLE: "drawer-toggle",
|
|
5
5
|
MODAL_CLOSE: "modal-close",
|
|
6
6
|
MODAL_OPEN: "modal-open",
|
|
7
7
|
MODAL_TOGGLE: "modal-toggle",
|
|
8
|
+
CART_BEFORE_UPDATE: "cart-before-update",
|
|
8
9
|
CART_UPDATE: "cart-update",
|
|
9
10
|
VARIANT_CHANGE: "variant-change"
|
|
10
11
|
}, f = (e, t) => {
|
|
@@ -15,7 +16,7 @@ const _ = {
|
|
|
15
16
|
return (...c) => {
|
|
16
17
|
r = c, o || (o = setTimeout(s, t));
|
|
17
18
|
};
|
|
18
|
-
}, l = document.documentElement, { body: i } = document,
|
|
19
|
+
}, l = document.documentElement, { body: i } = document, C = l.hasAttribute("data-debug"), n = {
|
|
19
20
|
y: 0,
|
|
20
21
|
x: 0
|
|
21
22
|
}, a = {
|
|
@@ -29,12 +30,12 @@ window.addEventListener(
|
|
|
29
30
|
}, 100),
|
|
30
31
|
{ passive: !0 }
|
|
31
32
|
);
|
|
32
|
-
const
|
|
33
|
+
const W = {
|
|
33
34
|
lg: window.matchMedia("(width >= 64rem)"),
|
|
34
35
|
xl: window.matchMedia("(min-width: 1280px)"),
|
|
35
36
|
"2xl": window.matchMedia("(min-width: 1440px)"),
|
|
36
37
|
"3xl": window.matchMedia("(min-width: 1920px)")
|
|
37
|
-
},
|
|
38
|
+
}, k = !0, u = (e, t) => {
|
|
38
39
|
typeof e < "u" && (n.x = e), typeof t < "u" && (n.y = t), window.scrollTo(n.x, n.y);
|
|
39
40
|
};
|
|
40
41
|
function M() {
|
|
@@ -76,36 +77,36 @@ function G(e, t = e) {
|
|
|
76
77
|
function E(e = null) {
|
|
77
78
|
d.keydown && document.removeEventListener("keydown", d.keydown), e && e.focus();
|
|
78
79
|
}
|
|
79
|
-
const p = 8, w = 9,
|
|
80
|
+
const p = 8, w = 9, A = 13, h = 16, b = 27, g = 32, R = 33, x = 34, P = 35, T = 36, v = 37, L = 38, O = 39, S = 40, _ = 46, H = {
|
|
80
81
|
BACKSPACE: p,
|
|
81
82
|
TAB: w,
|
|
82
|
-
ENTER:
|
|
83
|
-
SHIFT:
|
|
83
|
+
ENTER: A,
|
|
84
|
+
SHIFT: h,
|
|
84
85
|
ESCAPE: b,
|
|
85
86
|
SPACE: g,
|
|
86
|
-
PAGE_UP:
|
|
87
|
-
PAGE_DOWN:
|
|
88
|
-
END:
|
|
89
|
-
HOME:
|
|
90
|
-
ARROW_LEFT:
|
|
91
|
-
ARROW_UP:
|
|
92
|
-
ARROW_RIGHT:
|
|
93
|
-
ARROW_DOWN:
|
|
94
|
-
DELETE:
|
|
87
|
+
PAGE_UP: R,
|
|
88
|
+
PAGE_DOWN: x,
|
|
89
|
+
END: P,
|
|
90
|
+
HOME: T,
|
|
91
|
+
ARROW_LEFT: v,
|
|
92
|
+
ARROW_UP: L,
|
|
93
|
+
ARROW_RIGHT: O,
|
|
94
|
+
ARROW_DOWN: S,
|
|
95
|
+
DELETE: _
|
|
95
96
|
};
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
D as EVENTS,
|
|
98
99
|
G as addTrapFocus,
|
|
99
100
|
i as body,
|
|
100
|
-
|
|
101
|
+
W as breakpoints,
|
|
101
102
|
M as disableScroll,
|
|
102
103
|
N as enableScroll,
|
|
103
104
|
y as getFocusableElements,
|
|
104
105
|
l as html,
|
|
105
|
-
|
|
106
|
+
C as isDebug,
|
|
106
107
|
H as keycode,
|
|
107
108
|
a as mouse,
|
|
108
|
-
|
|
109
|
+
k as production,
|
|
109
110
|
E as removeTrapFocus,
|
|
110
111
|
n as scroll,
|
|
111
112
|
f as throttle
|
package/package.json
CHANGED