@wix/stores 1.0.959 → 1.0.960
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/_sdk-exports/context-category-by-id-context-provider/runtime.d.ts +4026 -0
- package/_sdk-exports/context-category-by-id-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-category-by-slug-context-provider/runtime.d.ts +4046 -0
- package/_sdk-exports/context-category-by-slug-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-category-info-context-provider/runtime.d.ts +3530 -0
- package/_sdk-exports/context-category-info-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-category-list-context-provider/runtime.d.ts +101 -0
- package/_sdk-exports/context-category-list-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-by-id-context-provider/runtime.d.ts +4221 -0
- package/_sdk-exports/context-product-by-id-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-by-slug-context-provider/runtime.d.ts +4217 -0
- package/_sdk-exports/context-product-by-slug-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-context-provider/runtime.d.ts +4449 -0
- package/_sdk-exports/context-product-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-item-context-provider/runtime.d.ts +4102 -0
- package/_sdk-exports/context-product-item-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-product-list-context-provider/runtime.d.ts +3969 -0
- package/_sdk-exports/context-product-list-context-provider/runtime.js +2 -0
- package/_sdk-exports/context-promotion-item-context-provider/runtime.d.ts +85 -0
- package/_sdk-exports/context-promotion-item-context-provider/runtime.js +2 -0
- package/build/cjs/context-category-by-id-context-provider.d.ts +4026 -0
- package/build/cjs/context-category-by-id-context-provider.js +3572 -0
- package/build/cjs/context-category-by-id-context-provider.js.map +1 -0
- package/build/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
- package/build/cjs/context-category-by-slug-context-provider.js +3674 -0
- package/build/cjs/context-category-by-slug-context-provider.js.map +1 -0
- package/build/cjs/context-category-info-context-provider.d.ts +3530 -0
- package/build/cjs/context-category-info-context-provider.js +1201 -0
- package/build/cjs/context-category-info-context-provider.js.map +1 -0
- package/build/cjs/context-category-list-context-provider.d.ts +101 -0
- package/build/cjs/context-category-list-context-provider.js +587 -0
- package/build/cjs/context-category-list-context-provider.js.map +1 -0
- package/build/cjs/context-product-by-id-context-provider.d.ts +4221 -0
- package/build/cjs/context-product-by-id-context-provider.js +3454 -0
- package/build/cjs/context-product-by-id-context-provider.js.map +1 -0
- package/build/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
- package/build/cjs/context-product-by-slug-context-provider.js +3477 -0
- package/build/cjs/context-product-by-slug-context-provider.js.map +1 -0
- package/build/cjs/context-product-context-provider.d.ts +4449 -0
- package/build/cjs/context-product-context-provider.js +587 -0
- package/build/cjs/context-product-context-provider.js.map +1 -0
- package/build/cjs/context-product-item-context-provider.d.ts +4102 -0
- package/build/cjs/context-product-item-context-provider.js +4396 -0
- package/build/cjs/context-product-item-context-provider.js.map +1 -0
- package/build/cjs/context-product-list-context-provider.d.ts +3970 -0
- package/build/cjs/context-product-list-context-provider.js +587 -0
- package/build/cjs/context-product-list-context-provider.js.map +1 -0
- package/build/cjs/context-promotion-item-context-provider.d.ts +85 -0
- package/build/cjs/context-promotion-item-context-provider.js +592 -0
- package/build/cjs/context-promotion-item-context-provider.js.map +1 -0
- package/build/es/context-category-by-id-context-provider.d.mts +4026 -0
- package/build/es/context-category-by-id-context-provider.mjs +3532 -0
- package/build/es/context-category-by-id-context-provider.mjs.map +1 -0
- package/build/es/context-category-by-slug-context-provider.d.mts +4046 -0
- package/build/es/context-category-by-slug-context-provider.mjs +3634 -0
- package/build/es/context-category-by-slug-context-provider.mjs.map +1 -0
- package/build/es/context-category-info-context-provider.d.mts +3530 -0
- package/build/es/context-category-info-context-provider.mjs +1172 -0
- package/build/es/context-category-info-context-provider.mjs.map +1 -0
- package/build/es/context-category-list-context-provider.d.mts +101 -0
- package/build/es/context-category-list-context-provider.mjs +558 -0
- package/build/es/context-category-list-context-provider.mjs.map +1 -0
- package/build/es/context-product-by-id-context-provider.d.mts +4221 -0
- package/build/es/context-product-by-id-context-provider.mjs +3415 -0
- package/build/es/context-product-by-id-context-provider.mjs.map +1 -0
- package/build/es/context-product-by-slug-context-provider.d.mts +4217 -0
- package/build/es/context-product-by-slug-context-provider.mjs +3437 -0
- package/build/es/context-product-by-slug-context-provider.mjs.map +1 -0
- package/build/es/context-product-context-provider.d.mts +4449 -0
- package/build/es/context-product-context-provider.mjs +558 -0
- package/build/es/context-product-context-provider.mjs.map +1 -0
- package/build/es/context-product-item-context-provider.d.mts +4102 -0
- package/build/es/context-product-item-context-provider.mjs +4356 -0
- package/build/es/context-product-item-context-provider.mjs.map +1 -0
- package/build/es/context-product-list-context-provider.d.mts +3970 -0
- package/build/es/context-product-list-context-provider.mjs +558 -0
- package/build/es/context-product-list-context-provider.mjs.map +1 -0
- package/build/es/context-promotion-item-context-provider.d.mts +85 -0
- package/build/es/context-promotion-item-context-provider.mjs +563 -0
- package/build/es/context-promotion-item-context-provider.mjs.map +1 -0
- package/build/internal/cjs/context-category-by-id-context-provider.d.ts +4026 -0
- package/build/internal/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
- package/build/internal/cjs/context-category-info-context-provider.d.ts +3530 -0
- package/build/internal/cjs/context-category-list-context-provider.d.ts +101 -0
- package/build/internal/cjs/context-product-by-id-context-provider.d.ts +4221 -0
- package/build/internal/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
- package/build/internal/cjs/context-product-context-provider.d.ts +4449 -0
- package/build/internal/cjs/context-product-item-context-provider.d.ts +4102 -0
- package/build/internal/cjs/context-product-list-context-provider.d.ts +3970 -0
- package/build/internal/cjs/context-promotion-item-context-provider.d.ts +85 -0
- package/build/internal/es/context-category-by-id-context-provider.d.mts +4026 -0
- package/build/internal/es/context-category-by-slug-context-provider.d.mts +4046 -0
- package/build/internal/es/context-category-info-context-provider.d.mts +3530 -0
- package/build/internal/es/context-category-list-context-provider.d.mts +101 -0
- package/build/internal/es/context-product-by-id-context-provider.d.mts +4221 -0
- package/build/internal/es/context-product-by-slug-context-provider.d.mts +4217 -0
- package/build/internal/es/context-product-context-provider.d.mts +4449 -0
- package/build/internal/es/context-product-item-context-provider.d.mts +4102 -0
- package/build/internal/es/context-product-list-context-provider.d.mts +3970 -0
- package/build/internal/es/context-promotion-item-context-provider.d.mts +85 -0
- package/category-by-id-context-provider/package.json +3 -0
- package/category-by-slug-context-provider/package.json +3 -0
- package/category-info-context-provider/package.json +3 -0
- package/category-list-context-provider/package.json +3 -0
- package/context/category-by-id-context-provider/package.json +3 -0
- package/context/category-by-slug-context-provider/package.json +3 -0
- package/context/category-info-context-provider/package.json +3 -0
- package/context/category-list-context-provider/package.json +3 -0
- package/context/product-by-id-context-provider/package.json +3 -0
- package/context/product-by-slug-context-provider/package.json +3 -0
- package/context/product-context-provider/package.json +3 -0
- package/context/product-item-context-provider/package.json +3 -0
- package/context/product-list-context-provider/package.json +3 -0
- package/context/promotion-item-context-provider/package.json +3 -0
- package/package.json +159 -24
- package/product-by-id-context-provider/package.json +3 -0
- package/product-by-slug-context-provider/package.json +3 -0
- package/product-context-provider/package.json +3 -0
- package/product-item-context-provider/package.json +3 -0
- package/product-list-context-provider/package.json +3 -0
- package/promotion-item-context-provider/package.json +3 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/type-fest/source/observable-like.d.ts
|
|
4
|
+
declare global {
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
6
|
+
interface SymbolConstructor {
|
|
7
|
+
readonly observable: symbol;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
@remarks
|
|
12
|
+
The TC39 observable proposal defines a `closed` property, but some implementations (such as xstream) do not as of 10/08/2021.
|
|
13
|
+
As well, some guidance on making an `Observable` to not include `closed` property.
|
|
14
|
+
@see https://github.com/tc39/proposal-observable/blob/master/src/Observable.js#L129-L130
|
|
15
|
+
@see https://github.com/staltz/xstream/blob/6c22580c1d84d69773ee4b0905df44ad464955b3/src/index.ts#L79-L85
|
|
16
|
+
@see https://github.com/benlesh/symbol-observable#making-an-object-observable
|
|
17
|
+
|
|
18
|
+
@category Observable
|
|
19
|
+
*/
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../../node_modules/@wix/sdk-types/internal/build/index.d.ts
|
|
22
|
+
declare global {
|
|
23
|
+
interface ContextualClient {}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Creates concrete types from SDK descriptors when a contextual client is
|
|
27
|
+
* available.
|
|
28
|
+
*
|
|
29
|
+
* For a REST descriptor the built (bound) API is intersected with the original
|
|
30
|
+
* descriptor, matching what `contextualizeRESTModuleV2` returns at runtime — a
|
|
31
|
+
* value callable as the bound API and still usable as a descriptor. Keeping the
|
|
32
|
+
* descriptor half lets contextual modules be passed to descriptor-constrained
|
|
33
|
+
* helpers such as `elevate` from `@wix/sdk/context` (FEDINF-14092).
|
|
34
|
+
*
|
|
35
|
+
* The `& T` is scoped to REST descriptors — the only shape codegen wraps in
|
|
36
|
+
* `MaybeContext` — so `BuildDescriptors` (used by `createClient().use`) is left
|
|
37
|
+
* unchanged and stays bound-only. The fix lives here rather than in `elevate`,
|
|
38
|
+
* which is kept strict on purpose (see #941) so it still rejects bound-only
|
|
39
|
+
* functions that are unsafe through `createRESTModule`.
|
|
40
|
+
*/
|
|
41
|
+
declare global {
|
|
42
|
+
/**
|
|
43
|
+
* A global interface to set the exposure toggle for the SDK.
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* declare global {
|
|
47
|
+
* interface SDKExposureToggle {
|
|
48
|
+
* alpha: true;
|
|
49
|
+
* }
|
|
50
|
+
* }
|
|
51
|
+
*/
|
|
52
|
+
interface SDKExposureToggle {}
|
|
53
|
+
}
|
|
54
|
+
declare global {
|
|
55
|
+
/**
|
|
56
|
+
* A global interface to set the type mode for the SDK.
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* declare global {
|
|
60
|
+
* interface SDKTypeMode {
|
|
61
|
+
* strict: true;
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
*/
|
|
65
|
+
interface SDKTypeMode {}
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/domain/category/category-node/category-node.d.ts
|
|
69
|
+
interface CategoryNode {
|
|
70
|
+
id: string | null | undefined;
|
|
71
|
+
name?: string | null | undefined;
|
|
72
|
+
slug?: string | null | undefined;
|
|
73
|
+
href: string;
|
|
74
|
+
parentCategoryId?: string | null | undefined;
|
|
75
|
+
sortIndex?: number | null | undefined;
|
|
76
|
+
childCategoryIds: string[];
|
|
77
|
+
}
|
|
78
|
+
type CategoryNodes = Partial<Record<string, CategoryNode>>;
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/extensions/gallery/providers/category-list-context/contract.d.ts
|
|
81
|
+
interface CategoryListContextValue {
|
|
82
|
+
/** All visible store categories, keyed by category id. */
|
|
83
|
+
categories: CategoryNodes;
|
|
84
|
+
/** Id of the current category, or `undefined` when there is none. */
|
|
85
|
+
currentCategoryId: string | undefined;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/extensions/gallery/providers/category-list-context/category-list-context-provider.d.ts
|
|
89
|
+
/** Reads the visible store categories and the current category. */
|
|
90
|
+
declare function useCategoryListContext(): CategoryListContextValue;
|
|
91
|
+
/** Props accepted by {@link CategoryListContextProvider}. */
|
|
92
|
+
interface CategoryListContextProviderProps extends React.PropsWithChildren {
|
|
93
|
+
value: CategoryListContextValue;
|
|
94
|
+
}
|
|
95
|
+
/** Supplies the category list and current category to descendant components. */
|
|
96
|
+
declare function CategoryListContextProvider({
|
|
97
|
+
children,
|
|
98
|
+
value
|
|
99
|
+
}: CategoryListContextProviderProps): React.ReactNode;
|
|
100
|
+
|
|
101
|
+
export { CategoryListContextProvider, type CategoryListContextProviderProps, type CategoryListContextValue, CategoryListContextProvider as default, useCategoryListContext };
|