@tapcart/mobile-components 0.16.3 → 0.16.4

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.
@@ -42,6 +42,9 @@ interface UseSearchAnalyticsOpenProductParams {
42
42
  * carousels, ...) so there's one implementation to maintain. The results are
43
43
  * held in a ref so the returned callback keeps a stable identity (preserving
44
44
  * a memoized ProductCard) while still reading the latest list on click.
45
+ *
46
+ * @deprecated Emission moved app-side; see the module note above. Still used by
47
+ * pinned forks for the product/open it performs, so it must keep working.
45
48
  */
46
49
  export declare function useSearchAnalyticsOpenProduct({ products, searchClient, emitProductClick, action, surface, }: UseSearchAnalyticsOpenProductParams): (props: OpenProductProps) => void;
47
50
  interface AddToCartProps {
@@ -80,6 +83,9 @@ interface UseSearchAnalyticsAddToCartParams {
80
83
  * (`searchClient` falsy), the emitter isn't injected, or the added variant
81
84
  * isn't in the current results — without a matched hit there's no `objectID` to
82
85
  * attribute, so we skip the emit rather than send a provider-less event.
86
+ *
87
+ * @deprecated Emission moved app-side; see the module note above. Still used by
88
+ * pinned forks for the cart/add it performs, so it must keep working.
83
89
  */
84
90
  export declare function useSearchAnalyticsAddToCart({ products, searchClient, emitProductConversion, action, surface, }: UseSearchAnalyticsAddToCartParams): (props: AddToCartProps) => Promise<void>;
85
91
  /**
@@ -93,6 +99,9 @@ export declare function useSearchAnalyticsAddToCart({ products, searchClient, em
93
99
  * Algolia `objectID` + 1-based position, no cart mutation. No-ops when the grid
94
100
  * isn't search-backed (`searchClient` falsy), the emitter isn't injected, the
95
101
  * variant is missing, or the variant isn't found in the current results.
102
+ *
103
+ * @deprecated Emission moved app-side; the quick-add provider now resolves the
104
+ * attribution itself. Emit-only, so this is inert once wrapper emission is on.
96
105
  */
97
106
  export declare function useSearchAnalyticsConversionEmit({ products, searchClient, emitProductConversion, surface, }: UseSearchAnalyticsAddToCartParams): (variantId?: string) => void;
98
107
  interface UseSearchAnalyticsImpressionParams {
@@ -118,6 +127,9 @@ interface UseSearchAnalyticsImpressionParams {
118
127
  * Returns `undefined` when the grid isn't search-backed or no emitter is
119
128
  * injected, so ProductCard skips setting up an IntersectionObserver entirely on
120
129
  * non-search surfaces.
130
+ *
131
+ * @deprecated Emission moved app-side; impressions are observed from the block's
132
+ * rendered cards. Emit-only, so this is inert once wrapper emission is on.
121
133
  */
122
134
  export declare function useSearchAnalyticsImpression({ searchClient, emitProductImpression, surface, enabled, }: UseSearchAnalyticsImpressionParams): ((product: SearchAnalyticsProduct | undefined | null) => void) | undefined;
123
135
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"use-search-analytics-open-product.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-search-analytics-open-product.ts"],"names":[],"mappings":"AAIA,UAAU,sBAAsB;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;CACrD;AAED,UAAU,6BAA6B;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,sBAAsB,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,CAAC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ACvB,EAAE,iCAAiC,gBAKnB,MAAM,UAuBtB;AAED,UAAU,kCAAkC;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,6BAA6B,KAAK,IAAI,CAAA;IACxE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,YAAY,EACZ,qBAAqB,EACrB,OAAsB,EACtB,OAAc,GACf,EAAE,kCAAkC,cAKhB,sBAAsB,GAAG,SAAS,GAAG,IAAI,uBAa7D"}
1
+ {"version":3,"file":"use-search-analytics-open-product.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-search-analytics-open-product.ts"],"names":[],"mappings":"AA6BA,UAAU,sBAAsB;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;CACrD;AAED,UAAU,6BAA6B;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAED,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,UAAU,mCAAmC;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,sBAAsB,GAAG,SAAS,GA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;;GAcG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACR,YAAY,EACZ,qBAAqB,EACrB,OAAsB,GACvB,EAAE,iCAAiC,gBAKnB,MAAM,UAuBtB;AAED,UAAU,kCAAkC;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,6BAA6B,KAAK,IAAI,CAAA;IACxE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,YAAY,EACZ,qBAAqB,EACrB,OAAsB,EACtB,OAAc,GACf,EAAE,kCAAkC,cAKhB,sBAAsB,GAAG,SAAS,GAAG,IAAI,uBAa7D"}
@@ -25,6 +25,9 @@ import { getIdFromGid } from "../../lib/utils";
25
25
  * carousels, ...) so there's one implementation to maintain. The results are
26
26
  * held in a ref so the returned callback keeps a stable identity (preserving
27
27
  * a memoized ProductCard) while still reading the latest list on click.
28
+ *
29
+ * @deprecated Emission moved app-side; see the module note above. Still used by
30
+ * pinned forks for the product/open it performs, so it must keep working.
28
31
  */
29
32
  export function useSearchAnalyticsOpenProduct({ products, searchClient, emitProductClick, action, surface = "collection", }) {
30
33
  const productsRef = React.useRef(products);
@@ -79,6 +82,9 @@ export function useSearchAnalyticsOpenProduct({ products, searchClient, emitProd
79
82
  * (`searchClient` falsy), the emitter isn't injected, or the added variant
80
83
  * isn't in the current results — without a matched hit there's no `objectID` to
81
84
  * attribute, so we skip the emit rather than send a provider-less event.
85
+ *
86
+ * @deprecated Emission moved app-side; see the module note above. Still used by
87
+ * pinned forks for the cart/add it performs, so it must keep working.
82
88
  */
83
89
  export function useSearchAnalyticsAddToCart({ products, searchClient, emitProductConversion, action, surface = "collection", }) {
84
90
  const productsRef = React.useRef(products);
@@ -135,6 +141,9 @@ export function useSearchAnalyticsAddToCart({ products, searchClient, emitProduc
135
141
  * Algolia `objectID` + 1-based position, no cart mutation. No-ops when the grid
136
142
  * isn't search-backed (`searchClient` falsy), the emitter isn't injected, the
137
143
  * variant is missing, or the variant isn't found in the current results.
144
+ *
145
+ * @deprecated Emission moved app-side; the quick-add provider now resolves the
146
+ * attribution itself. Emit-only, so this is inert once wrapper emission is on.
138
147
  */
139
148
  export function useSearchAnalyticsConversionEmit({ products, searchClient, emitProductConversion, surface = "collection", }) {
140
149
  const productsRef = React.useRef(products);
@@ -168,6 +177,9 @@ export function useSearchAnalyticsConversionEmit({ products, searchClient, emitP
168
177
  * Returns `undefined` when the grid isn't search-backed or no emitter is
169
178
  * injected, so ProductCard skips setting up an IntersectionObserver entirely on
170
179
  * non-search surfaces.
180
+ *
181
+ * @deprecated Emission moved app-side; impressions are observed from the block's
182
+ * rendered cards. Emit-only, so this is inert once wrapper emission is on.
171
183
  */
172
184
  export function useSearchAnalyticsImpression({ searchClient, emitProductImpression, surface = "collection", enabled = true, }) {
173
185
  const seenRef = React.useRef(new Set());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapcart/mobile-components",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "style": "dist/styles.css",