@wix/headless-stores 0.0.21 → 0.0.23

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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "main": "../../cjs/dist/astro/actions/index.js",
3
+ "types": "../../dist/astro/actions/index.d.ts"
4
+ }
@@ -30,14 +30,37 @@ export interface ProductDescriptionProps {
30
30
  * Render props for ProductDescription component
31
31
  */
32
32
  export interface ProductDescriptionRenderProps {
33
- /** Product description (may contain HTML) */
33
+ /** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
34
34
  description: NonNullable<V3Product["description"]>;
35
- /** Product plain description */
35
+ /** Product description with plain html */
36
36
  plainDescription: NonNullable<V3Product["plainDescription"]>;
37
37
  }
38
38
  /**
39
- * Headless component for product description display
40
- *
41
- * @component
39
+ * Render props for ProductDescription component
42
40
  */
41
+ export interface ProductDescriptionRenderProps {
42
+ /** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
43
+ description: NonNullable<V3Product["description"]>;
44
+ /** Product description with plain html */
45
+ plainDescription: NonNullable<V3Product["plainDescription"]>;
46
+ }
47
+ /**
48
+ * Headless component for product description display
49
+ *
50
+ * @example
51
+ * <Product.Description>
52
+ * {({ plainDescription }) => (
53
+ * <>
54
+ * {plainDescription && (
55
+ * <p
56
+ * dangerouslySetInnerHTML={{
57
+ * __html: plainDescription,
58
+ * }}
59
+ * />
60
+ * )}
61
+ * </>
62
+ * )}
63
+ * </Product.Description>
64
+ * @component
65
+ */
43
66
  export declare const Description: (props: ProductDescriptionProps) => import("react").ReactNode;
@@ -14,10 +14,24 @@ export const Name = (props) => {
14
14
  });
15
15
  };
16
16
  /**
17
- * Headless component for product description display
18
- *
19
- * @component
20
- */
17
+ * Headless component for product description display
18
+ *
19
+ * @example
20
+ * <Product.Description>
21
+ * {({ plainDescription }) => (
22
+ * <>
23
+ * {plainDescription && (
24
+ * <p
25
+ * dangerouslySetInnerHTML={{
26
+ * __html: plainDescription,
27
+ * }}
28
+ * />
29
+ * )}
30
+ * </>
31
+ * )}
32
+ * </Product.Description>
33
+ * @component
34
+ */
21
35
  export const Description = (props) => {
22
36
  const service = useService(ProductServiceDefinition);
23
37
  const product = service.product.get();
@@ -30,14 +30,37 @@ export interface ProductDescriptionProps {
30
30
  * Render props for ProductDescription component
31
31
  */
32
32
  export interface ProductDescriptionRenderProps {
33
- /** Product description (may contain HTML) */
33
+ /** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
34
34
  description: NonNullable<V3Product["description"]>;
35
- /** Product plain description */
35
+ /** Product description with plain html */
36
36
  plainDescription: NonNullable<V3Product["plainDescription"]>;
37
37
  }
38
38
  /**
39
- * Headless component for product description display
40
- *
41
- * @component
39
+ * Render props for ProductDescription component
42
40
  */
41
+ export interface ProductDescriptionRenderProps {
42
+ /** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
43
+ description: NonNullable<V3Product["description"]>;
44
+ /** Product description with plain html */
45
+ plainDescription: NonNullable<V3Product["plainDescription"]>;
46
+ }
47
+ /**
48
+ * Headless component for product description display
49
+ *
50
+ * @example
51
+ * <Product.Description>
52
+ * {({ plainDescription }) => (
53
+ * <>
54
+ * {plainDescription && (
55
+ * <p
56
+ * dangerouslySetInnerHTML={{
57
+ * __html: plainDescription,
58
+ * }}
59
+ * />
60
+ * )}
61
+ * </>
62
+ * )}
63
+ * </Product.Description>
64
+ * @component
65
+ */
43
66
  export declare const Description: (props: ProductDescriptionProps) => import("react").ReactNode;
@@ -14,10 +14,24 @@ export const Name = (props) => {
14
14
  });
15
15
  };
16
16
  /**
17
- * Headless component for product description display
18
- *
19
- * @component
20
- */
17
+ * Headless component for product description display
18
+ *
19
+ * @example
20
+ * <Product.Description>
21
+ * {({ plainDescription }) => (
22
+ * <>
23
+ * {plainDescription && (
24
+ * <p
25
+ * dangerouslySetInnerHTML={{
26
+ * __html: plainDescription,
27
+ * }}
28
+ * />
29
+ * )}
30
+ * </>
31
+ * )}
32
+ * </Product.Description>
33
+ * @component
34
+ */
21
35
  export const Description = (props) => {
22
36
  const service = useService(ProductServiceDefinition);
23
37
  const product = service.product.get();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-stores",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "prebuild": "cd ../media && yarn build && cd ../ecom && yarn build",
@@ -46,7 +46,7 @@
46
46
  "@types/node": "^20.9.0",
47
47
  "@vitest/ui": "^3.1.4",
48
48
  "jsdom": "^26.1.0",
49
- "typescript": "^5.7.3",
49
+ "typescript": "^5.8.3",
50
50
  "vitest": "^3.1.4"
51
51
  },
52
52
  "dependencies": {
@@ -57,10 +57,10 @@
57
57
  "@wix/auto_sdk_stores_products-v-3": "^1.0.53",
58
58
  "@wix/auto_sdk_stores_read-only-variants-v-3": "^1.0.23",
59
59
  "@wix/ecom": "^1.0.1238",
60
- "@wix/essentials": "^0.1.22",
61
- "@wix/headless-ecom": "^0.0.7",
62
- "@wix/headless-media": "^0.0.4",
63
- "@wix/redirects": "^1.0.79",
60
+ "@wix/essentials": "^0.1.24",
61
+ "@wix/headless-ecom": "^0.0.8",
62
+ "@wix/headless-media": "^0.0.5",
63
+ "@wix/redirects": "^1.0.83",
64
64
  "@wix/services-definitions": "^0.1.4",
65
65
  "@wix/services-manager-react": "^0.1.26"
66
66
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "main": "../cjs/dist/react/index.js",
3
+ "types": "../dist/react/index.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "main": "../cjs/dist/server-actions/index.js",
3
+ "types": "../dist/server-actions/index.d.ts"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "main": "../cjs/dist/services/index.js",
3
+ "types": "../dist/services/index.d.ts"
4
+ }