@wix/headless-stores 0.0.40 → 0.0.41

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.
@@ -1,5 +1,5 @@
1
1
  import { type CategoriesListServiceConfig } from "../services/categories-list-service.js";
2
- import { categories } from "@wix/categories";
2
+ import { type Category } from "../services/category-service.js";
3
3
  export interface RootProps {
4
4
  children: React.ReactNode;
5
5
  categoriesListConfig: CategoriesListServiceConfig;
@@ -155,7 +155,7 @@ export interface ItemContentProps {
155
155
  */
156
156
  export interface ItemContentRenderProps {
157
157
  /** Category data */
158
- category: categories.Category;
158
+ category: Category;
159
159
  }
160
160
  /**
161
161
  * Component that renders content for each category in the list.
@@ -1,5 +1,5 @@
1
1
  import { type Signal } from "@wix/services-definitions/core-services/signals";
2
- import { categories } from "@wix/categories";
2
+ import { type Category } from "./category-service.js";
3
3
  /**
4
4
  * Configuration interface for the Categories List service.
5
5
  * Contains the initial categories data that will be loaded into the service.
@@ -8,7 +8,7 @@ import { categories } from "@wix/categories";
8
8
  */
9
9
  export type CategoriesListServiceConfig = {
10
10
  /** Array of category objects to initialize the service with */
11
- categories: categories.Category[];
11
+ categories: Category[];
12
12
  };
13
13
  /**
14
14
  * Service definition for the Categories List service.
@@ -19,7 +19,7 @@ export type CategoriesListServiceConfig = {
19
19
  export declare const CategoriesListServiceDefinition: string & {
20
20
  __api: {
21
21
  /** Reactive signal containing the list of categories */
22
- categories: Signal<categories.Category[]>;
22
+ categories: Signal<Category[]>;
23
23
  /** Reactive signal indicating if categories are currently being loaded */
24
24
  isLoading: Signal<boolean>;
25
25
  /** Reactive signal containing any error message, or null if no error */
@@ -29,7 +29,7 @@ export declare const CategoriesListServiceDefinition: string & {
29
29
  isServiceDefinition?: boolean;
30
30
  } & {
31
31
  /** Reactive signal containing the list of categories */
32
- categories: Signal<categories.Category[]>;
32
+ categories: Signal<Category[]>;
33
33
  /** Reactive signal indicating if categories are currently being loaded */
34
34
  isLoading: Signal<boolean>;
35
35
  /** Reactive signal containing any error message, or null if no error */
@@ -77,7 +77,7 @@ export declare const CategoriesListServiceDefinition: string & {
77
77
  export declare const CategoriesListService: import("@wix/services-definitions").ServiceFactory<string & {
78
78
  __api: {
79
79
  /** Reactive signal containing the list of categories */
80
- categories: Signal<categories.Category[]>;
80
+ categories: Signal<Category[]>;
81
81
  /** Reactive signal indicating if categories are currently being loaded */
82
82
  isLoading: Signal<boolean>;
83
83
  /** Reactive signal containing any error message, or null if no error */
@@ -87,7 +87,7 @@ export declare const CategoriesListService: import("@wix/services-definitions").
87
87
  isServiceDefinition?: boolean;
88
88
  } & {
89
89
  /** Reactive signal containing the list of categories */
90
- categories: Signal<categories.Category[]>;
90
+ categories: Signal<Category[]>;
91
91
  /** Reactive signal indicating if categories are currently being loaded */
92
92
  isLoading: Signal<boolean>;
93
93
  /** Reactive signal containing any error message, or null if no error */
@@ -105,7 +105,7 @@ export declare const CategoriesListService: import("@wix/services-definitions").
105
105
  * ---
106
106
  * // Astro page example - pages/categories.astro
107
107
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
108
- * import { CategoryList } from '@wix/stores/components';
108
+ * import { CategoryList } from '@wix/stores/components';
109
109
  *
110
110
  * // Load categories data during SSR
111
111
  * const categoriesConfig = await loadCategoriesListServiceConfig();
@@ -128,7 +128,7 @@ export declare const CategoriesListService: import("@wix/services-definitions").
128
128
  * // Next.js page example - pages/categories.tsx
129
129
  * import { GetServerSideProps } from 'next';
130
130
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
131
- * import { CategoryList } from '@wix/stores/components';
131
+ * import { CategoryList } from '@wix/stores/components';
132
132
  *
133
133
  * interface CategoriesPageProps {
134
134
  * categoriesConfig: Awaited<ReturnType<typeof loadCategoriesListServiceConfig>>;
@@ -70,7 +70,7 @@ export const CategoriesListService = implementService.withConfig()(CategoriesLis
70
70
  * ---
71
71
  * // Astro page example - pages/categories.astro
72
72
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
73
- * import { CategoryList } from '@wix/stores/components';
73
+ * import { CategoryList } from '@wix/stores/components';
74
74
  *
75
75
  * // Load categories data during SSR
76
76
  * const categoriesConfig = await loadCategoriesListServiceConfig();
@@ -93,7 +93,7 @@ export const CategoriesListService = implementService.withConfig()(CategoriesLis
93
93
  * // Next.js page example - pages/categories.tsx
94
94
  * import { GetServerSideProps } from 'next';
95
95
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
96
- * import { CategoryList } from '@wix/stores/components';
96
+ * import { CategoryList } from '@wix/stores/components';
97
97
  *
98
98
  * interface CategoriesPageProps {
99
99
  * categoriesConfig: Awaited<ReturnType<typeof loadCategoriesListServiceConfig>>;
@@ -1,5 +1,12 @@
1
1
  import { categories } from "@wix/categories";
2
2
  import { type Signal } from "@wix/services-definitions/core-services/signals";
3
+ /**
4
+ * Type representing a category from the Wix Categories API.
5
+ * This type is used to define the structure of category objects in the service.
6
+ *
7
+ * @type Category
8
+ */
9
+ export type Category = categories.Category;
3
10
  /**
4
11
  * Service definition for the Category service.
5
12
  * This defines the reactive API contract for managing a single product category.
@@ -9,13 +16,13 @@ import { type Signal } from "@wix/services-definitions/core-services/signals";
9
16
  export declare const CategoryServiceDefinition: string & {
10
17
  __api: {
11
18
  /** Reactive signal containing the current category data */
12
- category: Signal<categories.Category>;
19
+ category: Signal<Category>;
13
20
  };
14
21
  __config: {};
15
22
  isServiceDefinition?: boolean;
16
23
  } & {
17
24
  /** Reactive signal containing the current category data */
18
- category: Signal<categories.Category>;
25
+ category: Signal<Category>;
19
26
  };
20
27
  /**
21
28
  * Configuration interface for the Category service.
@@ -25,7 +32,7 @@ export declare const CategoryServiceDefinition: string & {
25
32
  */
26
33
  export type CategoryServiceConfig = {
27
34
  /** The category object to initialize the service with */
28
- category: categories.Category;
35
+ category: Category;
29
36
  };
30
37
  /**
31
38
  * Implementation of the Category service that manages reactive category data.
@@ -63,13 +70,13 @@ export type CategoryServiceConfig = {
63
70
  export declare const CategoryService: import("@wix/services-definitions").ServiceFactory<string & {
64
71
  __api: {
65
72
  /** Reactive signal containing the current category data */
66
- category: Signal<categories.Category>;
73
+ category: Signal<Category>;
67
74
  };
68
75
  __config: {};
69
76
  isServiceDefinition?: boolean;
70
77
  } & {
71
78
  /** Reactive signal containing the current category data */
72
- category: Signal<categories.Category>;
79
+ category: Signal<Category>;
73
80
  }, CategoryServiceConfig>;
74
81
  /**
75
82
  * Loads category service configuration from the Wix Categories API for SSR initialization.
@@ -1,4 +1,4 @@
1
- export { CategoryService, CategoryServiceDefinition, loadCategoryServiceConfig, CategoryServiceConfig, } from "./category-service.js";
1
+ export { CategoryService, CategoryServiceDefinition, loadCategoryServiceConfig, CategoryServiceConfig, Category, } from "./category-service.js";
2
2
  export { CategoriesListService, CategoriesListServiceDefinition, loadCategoriesListServiceConfig, CategoriesListServiceConfig, } from "./categories-list-service.js";
3
3
  export { ProductModifiersService, ProductModifiersServiceDefinition, } from "./product-modifiers-service.js";
4
4
  export { ProductService, ProductServiceDefinition, loadProductServiceConfig, } from "./product-service.js";
@@ -1,5 +1,5 @@
1
1
  import { type CategoriesListServiceConfig } from "../services/categories-list-service.js";
2
- import { categories } from "@wix/categories";
2
+ import { type Category } from "../services/category-service.js";
3
3
  export interface RootProps {
4
4
  children: React.ReactNode;
5
5
  categoriesListConfig: CategoriesListServiceConfig;
@@ -155,7 +155,7 @@ export interface ItemContentProps {
155
155
  */
156
156
  export interface ItemContentRenderProps {
157
157
  /** Category data */
158
- category: categories.Category;
158
+ category: Category;
159
159
  }
160
160
  /**
161
161
  * Component that renders content for each category in the list.
@@ -1,5 +1,5 @@
1
1
  import { type Signal } from "@wix/services-definitions/core-services/signals";
2
- import { categories } from "@wix/categories";
2
+ import { type Category } from "./category-service.js";
3
3
  /**
4
4
  * Configuration interface for the Categories List service.
5
5
  * Contains the initial categories data that will be loaded into the service.
@@ -8,7 +8,7 @@ import { categories } from "@wix/categories";
8
8
  */
9
9
  export type CategoriesListServiceConfig = {
10
10
  /** Array of category objects to initialize the service with */
11
- categories: categories.Category[];
11
+ categories: Category[];
12
12
  };
13
13
  /**
14
14
  * Service definition for the Categories List service.
@@ -19,7 +19,7 @@ export type CategoriesListServiceConfig = {
19
19
  export declare const CategoriesListServiceDefinition: string & {
20
20
  __api: {
21
21
  /** Reactive signal containing the list of categories */
22
- categories: Signal<categories.Category[]>;
22
+ categories: Signal<Category[]>;
23
23
  /** Reactive signal indicating if categories are currently being loaded */
24
24
  isLoading: Signal<boolean>;
25
25
  /** Reactive signal containing any error message, or null if no error */
@@ -29,7 +29,7 @@ export declare const CategoriesListServiceDefinition: string & {
29
29
  isServiceDefinition?: boolean;
30
30
  } & {
31
31
  /** Reactive signal containing the list of categories */
32
- categories: Signal<categories.Category[]>;
32
+ categories: Signal<Category[]>;
33
33
  /** Reactive signal indicating if categories are currently being loaded */
34
34
  isLoading: Signal<boolean>;
35
35
  /** Reactive signal containing any error message, or null if no error */
@@ -77,7 +77,7 @@ export declare const CategoriesListServiceDefinition: string & {
77
77
  export declare const CategoriesListService: import("@wix/services-definitions").ServiceFactory<string & {
78
78
  __api: {
79
79
  /** Reactive signal containing the list of categories */
80
- categories: Signal<categories.Category[]>;
80
+ categories: Signal<Category[]>;
81
81
  /** Reactive signal indicating if categories are currently being loaded */
82
82
  isLoading: Signal<boolean>;
83
83
  /** Reactive signal containing any error message, or null if no error */
@@ -87,7 +87,7 @@ export declare const CategoriesListService: import("@wix/services-definitions").
87
87
  isServiceDefinition?: boolean;
88
88
  } & {
89
89
  /** Reactive signal containing the list of categories */
90
- categories: Signal<categories.Category[]>;
90
+ categories: Signal<Category[]>;
91
91
  /** Reactive signal indicating if categories are currently being loaded */
92
92
  isLoading: Signal<boolean>;
93
93
  /** Reactive signal containing any error message, or null if no error */
@@ -105,7 +105,7 @@ export declare const CategoriesListService: import("@wix/services-definitions").
105
105
  * ---
106
106
  * // Astro page example - pages/categories.astro
107
107
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
108
- * import { CategoryList } from '@wix/stores/components';
108
+ * import { CategoryList } from '@wix/stores/components';
109
109
  *
110
110
  * // Load categories data during SSR
111
111
  * const categoriesConfig = await loadCategoriesListServiceConfig();
@@ -128,7 +128,7 @@ export declare const CategoriesListService: import("@wix/services-definitions").
128
128
  * // Next.js page example - pages/categories.tsx
129
129
  * import { GetServerSideProps } from 'next';
130
130
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
131
- * import { CategoryList } from '@wix/stores/components';
131
+ * import { CategoryList } from '@wix/stores/components';
132
132
  *
133
133
  * interface CategoriesPageProps {
134
134
  * categoriesConfig: Awaited<ReturnType<typeof loadCategoriesListServiceConfig>>;
@@ -70,7 +70,7 @@ export const CategoriesListService = implementService.withConfig()(CategoriesLis
70
70
  * ---
71
71
  * // Astro page example - pages/categories.astro
72
72
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
73
- * import { CategoryList } from '@wix/stores/components';
73
+ * import { CategoryList } from '@wix/stores/components';
74
74
  *
75
75
  * // Load categories data during SSR
76
76
  * const categoriesConfig = await loadCategoriesListServiceConfig();
@@ -93,7 +93,7 @@ export const CategoriesListService = implementService.withConfig()(CategoriesLis
93
93
  * // Next.js page example - pages/categories.tsx
94
94
  * import { GetServerSideProps } from 'next';
95
95
  * import { loadCategoriesListServiceConfig } from '@wix/stores/services';
96
- * import { CategoryList } from '@wix/stores/components';
96
+ * import { CategoryList } from '@wix/stores/components';
97
97
  *
98
98
  * interface CategoriesPageProps {
99
99
  * categoriesConfig: Awaited<ReturnType<typeof loadCategoriesListServiceConfig>>;
@@ -1,5 +1,12 @@
1
1
  import { categories } from "@wix/categories";
2
2
  import { type Signal } from "@wix/services-definitions/core-services/signals";
3
+ /**
4
+ * Type representing a category from the Wix Categories API.
5
+ * This type is used to define the structure of category objects in the service.
6
+ *
7
+ * @type Category
8
+ */
9
+ export type Category = categories.Category;
3
10
  /**
4
11
  * Service definition for the Category service.
5
12
  * This defines the reactive API contract for managing a single product category.
@@ -9,13 +16,13 @@ import { type Signal } from "@wix/services-definitions/core-services/signals";
9
16
  export declare const CategoryServiceDefinition: string & {
10
17
  __api: {
11
18
  /** Reactive signal containing the current category data */
12
- category: Signal<categories.Category>;
19
+ category: Signal<Category>;
13
20
  };
14
21
  __config: {};
15
22
  isServiceDefinition?: boolean;
16
23
  } & {
17
24
  /** Reactive signal containing the current category data */
18
- category: Signal<categories.Category>;
25
+ category: Signal<Category>;
19
26
  };
20
27
  /**
21
28
  * Configuration interface for the Category service.
@@ -25,7 +32,7 @@ export declare const CategoryServiceDefinition: string & {
25
32
  */
26
33
  export type CategoryServiceConfig = {
27
34
  /** The category object to initialize the service with */
28
- category: categories.Category;
35
+ category: Category;
29
36
  };
30
37
  /**
31
38
  * Implementation of the Category service that manages reactive category data.
@@ -63,13 +70,13 @@ export type CategoryServiceConfig = {
63
70
  export declare const CategoryService: import("@wix/services-definitions").ServiceFactory<string & {
64
71
  __api: {
65
72
  /** Reactive signal containing the current category data */
66
- category: Signal<categories.Category>;
73
+ category: Signal<Category>;
67
74
  };
68
75
  __config: {};
69
76
  isServiceDefinition?: boolean;
70
77
  } & {
71
78
  /** Reactive signal containing the current category data */
72
- category: Signal<categories.Category>;
79
+ category: Signal<Category>;
73
80
  }, CategoryServiceConfig>;
74
81
  /**
75
82
  * Loads category service configuration from the Wix Categories API for SSR initialization.
@@ -1,4 +1,4 @@
1
- export { CategoryService, CategoryServiceDefinition, loadCategoryServiceConfig, CategoryServiceConfig, } from "./category-service.js";
1
+ export { CategoryService, CategoryServiceDefinition, loadCategoryServiceConfig, CategoryServiceConfig, Category, } from "./category-service.js";
2
2
  export { CategoriesListService, CategoriesListServiceDefinition, loadCategoriesListServiceConfig, CategoriesListServiceConfig, } from "./categories-list-service.js";
3
3
  export { ProductModifiersService, ProductModifiersServiceDefinition, } from "./product-modifiers-service.js";
4
4
  export { ProductService, ProductServiceDefinition, loadProductServiceConfig, } from "./product-service.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-stores",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "prebuild": "cd ../media && yarn build && cd ../ecom && yarn build",