@weareconceptstudio/account 2.1.1 → 2.1.2

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/dist/index.d.ts CHANGED
@@ -2,6 +2,5 @@ export { default as AccountCustomCheckbox } from './components/CustomCheckbox';
2
2
  export * from './AccountProvider';
3
3
  export * from './modules';
4
4
  export * from './utils/payment';
5
- export * from './utils/useCartSticky';
6
5
  export * from './components';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,5 @@ export { default as AccountCustomCheckbox } from './components/CustomCheckbox';
3
3
  export * from './AccountProvider';
4
4
  export * from './modules';
5
5
  export * from './utils/payment';
6
- export * from './utils/useCartSticky';
7
6
  export * from './components';
8
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weareconceptstudio/account",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Concept Studio Account",
5
5
  "author": "Concept Studio",
6
6
  "license": "ISC",
@@ -21,25 +21,25 @@
21
21
  "watch": "tsc -m es6 --watch"
22
22
  },
23
23
  "peerDependencies": {
24
- "@weareconceptstudio/cart": "^0.0.8",
25
- "@weareconceptstudio/core": "^0.4.7",
26
- "@weareconceptstudio/form": "^0.5.3",
24
+ "@weareconceptstudio/cart": "^0.0.10",
25
+ "@weareconceptstudio/core": "^0.4.10",
26
+ "@weareconceptstudio/form": "^0.5.6",
27
27
  "classnames": "2.5.1",
28
28
  "react": "^18.0.0 || ^19.0.0",
29
29
  "react-dom": "^18.0.0 || ^19.0.0",
30
- "styled-components": ">= 6",
31
- "zustand": "^4.4.0 || ^5.0.0"
30
+ "styled-components": "6.1.19",
31
+ "zustand": "5.0.5"
32
32
  },
33
33
  "dependencies": {
34
34
  "react-helmet": "6.1.0",
35
35
  "swiper": "11.1.14"
36
36
  },
37
37
  "devDependencies": {
38
- "@weareconceptstudio/cart": "^0.0.8",
39
- "@weareconceptstudio/core": "^0.4.7",
40
- "@weareconceptstudio/form": "^0.5.3",
38
+ "@weareconceptstudio/cart": "^0.0.10",
39
+ "@weareconceptstudio/core": "^0.4.10",
40
+ "@weareconceptstudio/form": "^0.5.6",
41
41
  "rimraf": "6.0.1",
42
42
  "typescript": "5.3.3",
43
- "zustand": "^5.0.2"
43
+ "zustand": "5.0.5"
44
44
  }
45
45
  }
@@ -1,5 +0,0 @@
1
- export function useCartSticky(options?: {}): {
2
- isSetup: boolean;
3
- };
4
- export default useCartSticky;
5
- //# sourceMappingURL=useCartSticky.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCartSticky.d.ts","sourceRoot":"","sources":["../../src/utils/useCartSticky.js"],"names":[],"mappings":"AAEO;;EAiEN"}
@@ -1,61 +0,0 @@
1
- import { useEffect, useRef, useCallback } from 'react';
2
- export const useCartSticky = (options = {}) => {
3
- const { enabled = true, breakpoint = 1024, loading = false, dependencies = [] } = options;
4
- const scrollTriggerRef = useRef(null);
5
- const mmRef = useRef(null);
6
- const setup = useCallback(async () => {
7
- if (!enabled || typeof window === 'undefined')
8
- return;
9
- // Wait until page is rendered
10
- await new Promise((r) => requestAnimationFrame(r));
11
- const { default: gsap } = await import('gsap');
12
- const { ScrollTrigger } = await import('gsap/ScrollTrigger');
13
- gsap.registerPlugin(ScrollTrigger);
14
- const leftPanel = document.querySelector('.left-panel-wrap');
15
- const pinElement = document.querySelector('.sticky-wrap');
16
- const header = document.querySelector('header');
17
- const container = document.querySelector('.cart-main-wrap');
18
- if (!leftPanel || !pinElement || !header || !container)
19
- return;
20
- const headerH = header.clientHeight;
21
- const pad = parseInt(getComputedStyle(container).paddingBlockStart) || 0;
22
- const startOffset = headerH + pad;
23
- // Remove old setup
24
- if (scrollTriggerRef.current)
25
- scrollTriggerRef.current.kill();
26
- if (mmRef.current)
27
- mmRef.current.revert();
28
- // Setup matchMedia
29
- mmRef.current = gsap.matchMedia();
30
- mmRef.current.add(`(min-width: ${breakpoint}px)`, () => {
31
- const pinH = pinElement.clientHeight;
32
- const leftH = leftPanel.clientHeight;
33
- if (leftH > pinH) {
34
- scrollTriggerRef.current = ScrollTrigger.create({
35
- trigger: leftPanel,
36
- start: `top ${startOffset}px`,
37
- end: `bottom ${startOffset + pinH}px`,
38
- pin: pinElement,
39
- pinSpacing: false,
40
- });
41
- }
42
- });
43
- }, [enabled, breakpoint]);
44
- // Run when loading state finished or dependencies change
45
- useEffect(() => {
46
- if (loading)
47
- return;
48
- setup();
49
- return () => {
50
- if (scrollTriggerRef.current)
51
- scrollTriggerRef.current.kill();
52
- if (mmRef.current)
53
- mmRef.current.revert();
54
- };
55
- }, [loading, setup, ...dependencies]);
56
- return {
57
- isSetup: !!scrollTriggerRef.current,
58
- };
59
- };
60
- export default useCartSticky;
61
- //# sourceMappingURL=useCartSticky.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCartSticky.js","sourceRoot":"","sources":["../../src/utils/useCartSticky.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE;IAC7C,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAE1F,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAE3B,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACpC,IAAI,CAAC,OAAO,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO;QAEtD,8BAA8B;QAC9B,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;QAEnD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,oBAA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