@depict-ai/portal-components 2.7.12 → 2.7.14

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
@@ -1,10 +1,9 @@
1
- import { ModernDisplayWithPageUrl, SDKRenderingInfo } from "@depict-ai/ui/latest";
2
- import { Accessor, JSX } from "solid-js";
1
+ import { ModernDisplayWithPageUrl } from "@depict-ai/ui/latest";
3
2
  import { SearchFilter } from "@depict-ai/types/api/SearchResponse";
4
3
  import { Locale } from "@depict-ai/react-ui/locales/latest";
5
4
  import { ReactNode } from "react";
6
5
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
7
- export const version = "2.7.11";
6
+ export const version = "2.7.14";
8
7
  type TextOptions = {
9
8
  /** Enabled */
10
9
  enabled: boolean;
@@ -44,41 +43,8 @@ type ProductCardSchema = {
44
43
  image_carousel: boolean;
45
44
  image_aspect_ratio: number;
46
45
  };
47
- /**
48
- * ProductCard built according to this excerpt of our SDK docs https://docs.depict.ai/js-ui-guide/setup/product-card
49
- */
50
- export function DefaultSolidProductCard(display: Accessor<null | ModernDisplayWithPageUrl<YourDisplay>>, info?: SDKRenderingInfo & {
51
- depictCardsDataset?: Record<string, string>;
52
- formatPrice: <T extends number | undefined>(price: T) => T extends undefined ? undefined : string;
53
- }, configuredOptions_?: Accessor<ProductCardSchema>): JSX.Element;
54
- interface YourDisplay {
55
- variant_index: number;
56
- variant_displays: YourVariantDisplay[];
57
- }
58
- type YourVariantDisplay = {
59
- title: string;
60
- image_urls: string[];
61
- videos?: {
62
- preview_image_url: string;
63
- video_urls: string[];
64
- }[];
65
- video?: {
66
- preview_image_url: string;
67
- video_urls: string[];
68
- };
69
- page_url: string;
70
- color_name: string;
71
- size_name: string | null;
72
- in_stock: boolean;
73
- } & ({
74
- sale_price: Promise<number>;
75
- original_price: Promise<number>;
76
- } | {
77
- sale_price: Promise<undefined>;
78
- original_price: Promise<undefined>;
79
- });
80
46
  export function ReactDefaultProductCard(react_props: {
81
- options: ProductCardSchema;
47
+ options?: ProductCardSchema;
82
48
  display: null | ModernDisplayWithPageUrl<any>;
83
49
  }): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
84
50
  export function ReactSelectedFilters(react_props: {
package/dist/main.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var $7jsgb$depictaiutilisharedlatest = require("@depict-ai/utilishared/latest");
2
2
  var $7jsgb$solidjsweb = require("solid-js/web");
3
- var $7jsgb$depictaiuilatest = require("@depict-ai/ui/latest");
4
- var $7jsgb$solidjs = require("solid-js");
5
3
  var $7jsgb$react = require("react");
6
4
  var $7jsgb$solidjsstore = require("solid-js/store");
5
+ var $7jsgb$depictaiuilatest = require("@depict-ai/ui/latest");
6
+ var $7jsgb$solidjs = require("solid-js");
7
7
  var $7jsgb$reactdom = require("react-dom");
8
8
 
9
9
 
@@ -11,7 +11,6 @@ function $parcel$export(e, n, v, s) {
11
11
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
12
  }
13
13
 
14
- $parcel$export(module.exports, "DefaultSolidProductCard", () => $3375ddd88f77967d$export$f11681c54c860912);
15
14
  $parcel$export(module.exports, "ReactDefaultProductCard", () => $70cc6bd7e3f1dd4b$export$d1a48be4967fe67c);
16
15
  $parcel$export(module.exports, "ReactSelectedFilters", () => $19e9e02e1e300b6d$export$aea1707d7b01c3a2);
17
16
  $parcel$export(module.exports, "ReactFilterBody", () => $240090d16a629bfe$export$d929db7fb6179159);
@@ -19,9 +18,32 @@ $parcel$export(module.exports, "ExpandingSection", () => $2214dc111b9e2866$expor
19
18
  $parcel$export(module.exports, "ReactLookCard", () => $35bab9ff48bfe404$export$48787da2a5568bc);
20
19
  $parcel$export(module.exports, "version", () => $0a017be3a74fcc94$export$83d89fbfd8236492);
21
20
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
22
- const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.12";
21
+ const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.14";
22
+
23
+
24
+
25
+
23
26
 
24
27
 
28
+ function $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef({ solid_component: solid_component, props: props, wrapper_type: wrapper_type = "div", wrapper_style: wrapper_style = {}, className: className }) {
29
+ const wrapper_element_ref = (0, $7jsgb$react.useRef)();
30
+ const [[store, write_store]] = (0, $7jsgb$react.useState)(()=>(0, $7jsgb$solidjsstore.createStore)(props));
31
+ // Update store when props change
32
+ write_store((0, $7jsgb$solidjsstore.reconcile)(props));
33
+ (0, $7jsgb$react.useEffect)(()=>{
34
+ const wrapper_element = wrapper_element_ref.current;
35
+ // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
36
+ // This can happen for HMR or when SSR capable components are only rendered on the client
37
+ const dispose = (0, $7jsgb$solidjsweb.render)(()=>solid_component(store, wrapper_element), wrapper_element);
38
+ return dispose;
39
+ }, []);
40
+ return (0, $7jsgb$react.createElement)(wrapper_type, {
41
+ ref: wrapper_element_ref,
42
+ style: wrapper_style,
43
+ className: className
44
+ });
45
+ }
46
+
25
47
 
26
48
 
27
49
 
@@ -69,44 +91,7 @@ const $3375ddd88f77967d$var$sizeOrder = [
69
91
  ];
70
92
  const $3375ddd88f77967d$var$ContainsColorSwatchesContext = /*@__PURE__*/ (0, $7jsgb$solidjs.createContext)();
71
93
  let $3375ddd88f77967d$var$colorCanvasContext;
72
- function $3375ddd88f77967d$export$f11681c54c860912(display, info, configuredOptions_ = ()=>({
73
- image_radius: "md",
74
- alignment: "left",
75
- sizes: true,
76
- smart_labels: {
77
- font_size_rem: 0.5,
78
- enabled: true,
79
- bold: false,
80
- italic: false,
81
- color: "red",
82
- bg_color: "yellow"
83
- },
84
- title: {
85
- font_size_rem: 1.6,
86
- enabled: true,
87
- bold: false,
88
- italic: false,
89
- color: "black"
90
- },
91
- price: {
92
- font_size_rem: 1.5,
93
- enabled: true,
94
- bold: false,
95
- italic: false,
96
- color: "black"
97
- },
98
- original_price: {
99
- font_size_rem: 0.9,
100
- enabled: true,
101
- bold: false,
102
- italic: false,
103
- color: "black"
104
- },
105
- use_hover_image: true,
106
- image_carousel: true,
107
- color_options: true,
108
- image_aspect_ratio: 1
109
- })) {
94
+ function $3375ddd88f77967d$export$f11681c54c860912(display, info, configuredOptions_) {
110
95
  const variantDisplays = (0, $7jsgb$solidjs.createMemo)(()=>display()?.variant_displays);
111
96
  const defaultVariantIndex = (0, $7jsgb$solidjs.createMemo)(()=>display()?.variant_index);
112
97
  const [showVariantIndex, setShowVariantIndex] = (0, $7jsgb$solidjs.createSignal)((0, $7jsgb$solidjs.untrack)(defaultVariantIndex));
@@ -1010,30 +995,6 @@ function $3375ddd88f77967d$var$InComponentOrDiv(props) {
1010
995
 
1011
996
 
1012
997
 
1013
-
1014
-
1015
- function $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef({ solid_component: solid_component, props: props, wrapper_type: wrapper_type = "div", wrapper_style: wrapper_style = {}, className: className }) {
1016
- const wrapper_element_ref = (0, $7jsgb$react.useRef)();
1017
- const [[store, write_store]] = (0, $7jsgb$react.useState)(()=>(0, $7jsgb$solidjsstore.createStore)(props));
1018
- // Update store when props change
1019
- write_store((0, $7jsgb$solidjsstore.reconcile)(props));
1020
- (0, $7jsgb$react.useEffect)(()=>{
1021
- const wrapper_element = wrapper_element_ref.current;
1022
- // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
1023
- // This can happen for HMR or when SSR capable components are only rendered on the client
1024
- const dispose = (0, $7jsgb$solidjsweb.render)(()=>solid_component(store, wrapper_element), wrapper_element);
1025
- return dispose;
1026
- }, []);
1027
- return (0, $7jsgb$react.createElement)(wrapper_type, {
1028
- ref: wrapper_element_ref,
1029
- style: wrapper_style,
1030
- className: className
1031
- });
1032
- }
1033
-
1034
-
1035
-
1036
-
1037
998
  function $70cc6bd7e3f1dd4b$export$d1a48be4967fe67c(react_props) {
1038
999
  return (0, $d38f1fd3cc4cd6b2$export$f6e64e17bd69eeef)({
1039
1000
  solid_component: (props_store)=>{
@@ -1041,7 +1002,45 @@ function $70cc6bd7e3f1dd4b$export$d1a48be4967fe67c(react_props) {
1041
1002
  set_on_index_change: ()=>{},
1042
1003
  depictCardsDataset: {},
1043
1004
  formatPrice: (price)=>price && (0, $7jsgb$depictaiutilisharedlatest.standard_price_format)(price)
1044
- }, ()=>props_store.options);
1005
+ }, ()=>props_store?.options || {
1006
+ image_radius: "md",
1007
+ alignment: "left",
1008
+ sizes: true,
1009
+ smart_labels: {
1010
+ font_size_rem: 1,
1011
+ enabled: true,
1012
+ bold: false,
1013
+ italic: false,
1014
+ color: "#0f0f0f"
1015
+ },
1016
+ title: {
1017
+ font_size_rem: 1,
1018
+ enabled: true,
1019
+ bold: false,
1020
+ italic: false,
1021
+ color: "#0f0f0f"
1022
+ },
1023
+ price: {
1024
+ font_size_rem: 1,
1025
+ enabled: true,
1026
+ bold: false,
1027
+ italic: false,
1028
+ color: "#0f0f0f"
1029
+ },
1030
+ original_price: {
1031
+ font_size_rem: 1,
1032
+ enabled: true,
1033
+ bold: false,
1034
+ italic: false,
1035
+ color: "#0f0f0f"
1036
+ },
1037
+ use_hover_image: true,
1038
+ image_carousel: true,
1039
+ color_options: true,
1040
+ image_aspect_ratio: 1,
1041
+ underline_text: false,
1042
+ is_ejected: false
1043
+ });
1045
1044
  },
1046
1045
  // Work around in case https://github.com/solidjs/solid/issues/2139 potentially arises
1047
1046
  props: structuredClone(react_props),
package/dist/module.js CHANGED
@@ -1,15 +1,38 @@
1
- import {add_to_version_info as $2MCgq$add_to_version_info, catchify as $2MCgq$catchify, dlog as $2MCgq$dlog, dwarn as $2MCgq$dwarn, standard_price_format as $2MCgq$standard_price_format} from "@depict-ai/utilishared/latest";
2
- import {template as $2MCgq$template, createComponent as $2MCgq$createComponent, addEventListener as $2MCgq$addEventListener, use as $2MCgq$use, insert as $2MCgq$insert, effect as $2MCgq$effect, className as $2MCgq$className, setAttribute as $2MCgq$setAttribute, memo as $2MCgq$memo, style as $2MCgq$style, classList as $2MCgq$classList, spread as $2MCgq$spread, mergeProps as $2MCgq$mergeProps, delegateEvents as $2MCgq$delegateEvents, render as $2MCgq$render} from "solid-js/web";
3
- import {media_query_to_accessor as $2MCgq$media_query_to_accessor, TextPlaceholder as $2MCgq$TextPlaceholder, useSlidableInformation as $2MCgq$useSlidableInformation, SlidableItems as $2MCgq$SlidableItems, ImagePlaceholder as $2MCgq$ImagePlaceholder, ImageContainer as $2MCgq$ImageContainer, ShopifyContainedImage as $2MCgq$ShopifyContainedImage, useVisibilityState as $2MCgq$useVisibilityState, useProductCardIndex as $2MCgq$useProductCardIndex, useProductCardIsVisible as $2MCgq$useProductCardIsVisible, accessor_of_object_to_object_with_accessor_values as $2MCgq$accessor_of_object_to_object_with_accessor_values, create_modified_filters as $2MCgq$create_modified_filters, SelectedFilters as $2MCgq$SelectedFilters, FilterBody as $2MCgq$FilterBody, ExpandingDetails as $2MCgq$ExpandingDetails, ListingProvider as $2MCgq$ListingProvider, PseudoRouter as $2MCgq$PseudoRouter, LookCard as $2MCgq$LookCard} from "@depict-ai/ui/latest";
4
- import {createContext as $2MCgq$createContext, createMemo as $2MCgq$createMemo, createSignal as $2MCgq$createSignal, untrack as $2MCgq$untrack, createResource as $2MCgq$createResource, Suspense as $2MCgq$Suspense, createEffect as $2MCgq$createEffect, Show as $2MCgq$Show, children as $2MCgq$children, onCleanup as $2MCgq$onCleanup, For as $2MCgq$For, createRenderEffect as $2MCgq$createRenderEffect, on as $2MCgq$on, useContext as $2MCgq$useContext} from "solid-js";
1
+ import {add_to_version_info as $2MCgq$add_to_version_info, standard_price_format as $2MCgq$standard_price_format, catchify as $2MCgq$catchify, dlog as $2MCgq$dlog, dwarn as $2MCgq$dwarn} from "@depict-ai/utilishared/latest";
2
+ import {render as $2MCgq$render, template as $2MCgq$template, createComponent as $2MCgq$createComponent, addEventListener as $2MCgq$addEventListener, use as $2MCgq$use, insert as $2MCgq$insert, effect as $2MCgq$effect, className as $2MCgq$className, setAttribute as $2MCgq$setAttribute, memo as $2MCgq$memo, style as $2MCgq$style, classList as $2MCgq$classList, spread as $2MCgq$spread, mergeProps as $2MCgq$mergeProps, delegateEvents as $2MCgq$delegateEvents} from "solid-js/web";
5
3
  import {useRef as $2MCgq$useRef, useState as $2MCgq$useState, useEffect as $2MCgq$useEffect, createElement as $2MCgq$createElement, Fragment as $2MCgq$Fragment} from "react";
6
4
  import {createStore as $2MCgq$createStore, reconcile as $2MCgq$reconcile} from "solid-js/store";
5
+ import {media_query_to_accessor as $2MCgq$media_query_to_accessor, TextPlaceholder as $2MCgq$TextPlaceholder, useSlidableInformation as $2MCgq$useSlidableInformation, SlidableItems as $2MCgq$SlidableItems, ImagePlaceholder as $2MCgq$ImagePlaceholder, ImageContainer as $2MCgq$ImageContainer, ShopifyContainedImage as $2MCgq$ShopifyContainedImage, useVisibilityState as $2MCgq$useVisibilityState, useProductCardIndex as $2MCgq$useProductCardIndex, useProductCardIsVisible as $2MCgq$useProductCardIsVisible, accessor_of_object_to_object_with_accessor_values as $2MCgq$accessor_of_object_to_object_with_accessor_values, create_modified_filters as $2MCgq$create_modified_filters, SelectedFilters as $2MCgq$SelectedFilters, FilterBody as $2MCgq$FilterBody, ExpandingDetails as $2MCgq$ExpandingDetails, ListingProvider as $2MCgq$ListingProvider, PseudoRouter as $2MCgq$PseudoRouter, LookCard as $2MCgq$LookCard} from "@depict-ai/ui/latest";
6
+ import {createContext as $2MCgq$createContext, createMemo as $2MCgq$createMemo, createSignal as $2MCgq$createSignal, untrack as $2MCgq$untrack, createResource as $2MCgq$createResource, Suspense as $2MCgq$Suspense, createEffect as $2MCgq$createEffect, Show as $2MCgq$Show, children as $2MCgq$children, onCleanup as $2MCgq$onCleanup, For as $2MCgq$For, createRenderEffect as $2MCgq$createRenderEffect, on as $2MCgq$on, useContext as $2MCgq$useContext} from "solid-js";
7
7
  import {createPortal as $2MCgq$createPortal} from "react-dom";
8
8
 
9
9
  /*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
10
- const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.12";
10
+ const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.14";
11
+
12
+
13
+
14
+
11
15
 
12
16
 
17
+ function $0fe03f2fcd2418f8$export$f6e64e17bd69eeef({ solid_component: solid_component, props: props, wrapper_type: wrapper_type = "div", wrapper_style: wrapper_style = {}, className: className }) {
18
+ const wrapper_element_ref = (0, $2MCgq$useRef)();
19
+ const [[store, write_store]] = (0, $2MCgq$useState)(()=>(0, $2MCgq$createStore)(props));
20
+ // Update store when props change
21
+ write_store((0, $2MCgq$reconcile)(props));
22
+ (0, $2MCgq$useEffect)(()=>{
23
+ const wrapper_element = wrapper_element_ref.current;
24
+ // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
25
+ // This can happen for HMR or when SSR capable components are only rendered on the client
26
+ const dispose = (0, $2MCgq$render)(()=>solid_component(store, wrapper_element), wrapper_element);
27
+ return dispose;
28
+ }, []);
29
+ return (0, $2MCgq$createElement)(wrapper_type, {
30
+ ref: wrapper_element_ref,
31
+ style: wrapper_style,
32
+ className: className
33
+ });
34
+ }
35
+
13
36
 
14
37
 
15
38
 
@@ -57,44 +80,7 @@ const $29535f590238371c$var$sizeOrder = [
57
80
  ];
58
81
  const $29535f590238371c$var$ContainsColorSwatchesContext = /*@__PURE__*/ (0, $2MCgq$createContext)();
59
82
  let $29535f590238371c$var$colorCanvasContext;
60
- function $29535f590238371c$export$f11681c54c860912(display, info, configuredOptions_ = ()=>({
61
- image_radius: "md",
62
- alignment: "left",
63
- sizes: true,
64
- smart_labels: {
65
- font_size_rem: 0.5,
66
- enabled: true,
67
- bold: false,
68
- italic: false,
69
- color: "red",
70
- bg_color: "yellow"
71
- },
72
- title: {
73
- font_size_rem: 1.6,
74
- enabled: true,
75
- bold: false,
76
- italic: false,
77
- color: "black"
78
- },
79
- price: {
80
- font_size_rem: 1.5,
81
- enabled: true,
82
- bold: false,
83
- italic: false,
84
- color: "black"
85
- },
86
- original_price: {
87
- font_size_rem: 0.9,
88
- enabled: true,
89
- bold: false,
90
- italic: false,
91
- color: "black"
92
- },
93
- use_hover_image: true,
94
- image_carousel: true,
95
- color_options: true,
96
- image_aspect_ratio: 1
97
- })) {
83
+ function $29535f590238371c$export$f11681c54c860912(display, info, configuredOptions_) {
98
84
  const variantDisplays = (0, $2MCgq$createMemo)(()=>display()?.variant_displays);
99
85
  const defaultVariantIndex = (0, $2MCgq$createMemo)(()=>display()?.variant_index);
100
86
  const [showVariantIndex, setShowVariantIndex] = (0, $2MCgq$createSignal)((0, $2MCgq$untrack)(defaultVariantIndex));
@@ -998,30 +984,6 @@ function $29535f590238371c$var$InComponentOrDiv(props) {
998
984
 
999
985
 
1000
986
 
1001
-
1002
-
1003
- function $0fe03f2fcd2418f8$export$f6e64e17bd69eeef({ solid_component: solid_component, props: props, wrapper_type: wrapper_type = "div", wrapper_style: wrapper_style = {}, className: className }) {
1004
- const wrapper_element_ref = (0, $2MCgq$useRef)();
1005
- const [[store, write_store]] = (0, $2MCgq$useState)(()=>(0, $2MCgq$createStore)(props));
1006
- // Update store when props change
1007
- write_store((0, $2MCgq$reconcile)(props));
1008
- (0, $2MCgq$useEffect)(()=>{
1009
- const wrapper_element = wrapper_element_ref.current;
1010
- // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
1011
- // This can happen for HMR or when SSR capable components are only rendered on the client
1012
- const dispose = (0, $2MCgq$render)(()=>solid_component(store, wrapper_element), wrapper_element);
1013
- return dispose;
1014
- }, []);
1015
- return (0, $2MCgq$createElement)(wrapper_type, {
1016
- ref: wrapper_element_ref,
1017
- style: wrapper_style,
1018
- className: className
1019
- });
1020
- }
1021
-
1022
-
1023
-
1024
-
1025
987
  function $474e9d712b745d60$export$d1a48be4967fe67c(react_props) {
1026
988
  return (0, $0fe03f2fcd2418f8$export$f6e64e17bd69eeef)({
1027
989
  solid_component: (props_store)=>{
@@ -1029,7 +991,45 @@ function $474e9d712b745d60$export$d1a48be4967fe67c(react_props) {
1029
991
  set_on_index_change: ()=>{},
1030
992
  depictCardsDataset: {},
1031
993
  formatPrice: (price)=>price && (0, $2MCgq$standard_price_format)(price)
1032
- }, ()=>props_store.options);
994
+ }, ()=>props_store?.options || {
995
+ image_radius: "md",
996
+ alignment: "left",
997
+ sizes: true,
998
+ smart_labels: {
999
+ font_size_rem: 1,
1000
+ enabled: true,
1001
+ bold: false,
1002
+ italic: false,
1003
+ color: "#0f0f0f"
1004
+ },
1005
+ title: {
1006
+ font_size_rem: 1,
1007
+ enabled: true,
1008
+ bold: false,
1009
+ italic: false,
1010
+ color: "#0f0f0f"
1011
+ },
1012
+ price: {
1013
+ font_size_rem: 1,
1014
+ enabled: true,
1015
+ bold: false,
1016
+ italic: false,
1017
+ color: "#0f0f0f"
1018
+ },
1019
+ original_price: {
1020
+ font_size_rem: 1,
1021
+ enabled: true,
1022
+ bold: false,
1023
+ italic: false,
1024
+ color: "#0f0f0f"
1025
+ },
1026
+ use_hover_image: true,
1027
+ image_carousel: true,
1028
+ color_options: true,
1029
+ image_aspect_ratio: 1,
1030
+ underline_text: false,
1031
+ is_ejected: false
1032
+ });
1033
1033
  },
1034
1034
  // Work around in case https://github.com/solidjs/solid/issues/2139 potentially arises
1035
1035
  props: structuredClone(react_props),
@@ -1225,4 +1225,4 @@ function $8a700ff0722c56b3$export$48787da2a5568bc(react_props) {
1225
1225
  (0, $2MCgq$add_to_version_info)("react-ui", (0, $91c11b750e80ede3$export$83d89fbfd8236492));
1226
1226
 
1227
1227
 
1228
- export {$29535f590238371c$export$f11681c54c860912 as DefaultSolidProductCard, $474e9d712b745d60$export$d1a48be4967fe67c as ReactDefaultProductCard, $0cb1638b3c084153$export$aea1707d7b01c3a2 as ReactSelectedFilters, $890b58a81f64b470$export$d929db7fb6179159 as ReactFilterBody, $c79c5cb5e9424dd7$export$4ea53cd12ff17334 as ExpandingSection, $8a700ff0722c56b3$export$48787da2a5568bc as ReactLookCard, $91c11b750e80ede3$export$83d89fbfd8236492 as version};
1228
+ export {$474e9d712b745d60$export$d1a48be4967fe67c as ReactDefaultProductCard, $0cb1638b3c084153$export$aea1707d7b01c3a2 as ReactSelectedFilters, $890b58a81f64b470$export$d929db7fb6179159 as ReactFilterBody, $c79c5cb5e9424dd7$export$4ea53cd12ff17334 as ExpandingSection, $8a700ff0722c56b3$export$48787da2a5568bc as ReactLookCard, $91c11b750e80ede3$export$83d89fbfd8236492 as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/portal-components",
3
- "version": "2.7.12",
3
+ "version": "2.7.14",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -70,7 +70,8 @@
70
70
  "require": "./dist/main.js",
71
71
  "sass": "./dist/styles/index.scss"
72
72
  },
73
- "./styles/*": "./dist/styles/*"
73
+ "./styles/*": "./dist/styles/*",
74
+ "./src/specialForShopify/DefaultSolidProductCard.tsx": "./src/specialForShopify/DefaultSolidProductCard.tsx"
74
75
  },
75
76
  "files": [
76
77
  "/dist",
@@ -119,56 +119,18 @@ const sizeOrder = [
119
119
  const ContainsColorSwatchesContext = /*@__PURE__*/ createContext<Signal<boolean>>();
120
120
  let colorCanvasContext: CanvasRenderingContext2D | undefined | null;
121
121
 
122
- /**
123
- * ProductCard built according to this excerpt of our SDK docs https://docs.depict.ai/js-ui-guide/setup/product-card
124
- */
125
122
  export function DefaultSolidProductCard(
126
123
  display: Accessor<null | ModernDisplayWithPageUrl<YourDisplay>>,
127
- info?: SDKRenderingInfo & {
128
- // depictCardsDataset is the dataset of the #depict-cards HTML element. It is empty in the development environment.
129
- depictCardsDataset?: Record<string, string>;
130
- // formatPrice takes a price as number (`price` is NOT in cents but the actual price, as returned from Depict) and returns a formatted string. It will use the same currency formatting that the shopify store is configured to use.
131
- // In development (product card editor), a fallback formatting will be used.
132
- formatPrice: <T extends number | undefined>(price: T) => T extends undefined ? undefined : string;
133
- },
134
- configuredOptions_: Accessor<ProductCardSchema> = () => ({
135
- image_radius: "md",
136
- alignment: "left",
137
- sizes: true,
138
- smart_labels: {
139
- font_size_rem: 0.5,
140
- enabled: true,
141
- bold: false,
142
- italic: false,
143
- color: "red",
144
- bg_color: "yellow",
145
- },
146
- title: {
147
- font_size_rem: 1.6,
148
- enabled: true,
149
- bold: false,
150
- italic: false,
151
- color: "black",
152
- },
153
- price: {
154
- font_size_rem: 1.5,
155
- enabled: true,
156
- bold: false,
157
- italic: false,
158
- color: "black",
159
- },
160
- original_price: {
161
- font_size_rem: 0.9,
162
- enabled: true,
163
- bold: false,
164
- italic: false,
165
- color: "black",
166
- },
167
- use_hover_image: true,
168
- image_carousel: true,
169
- color_options: true,
170
- image_aspect_ratio: 1,
171
- })
124
+ info:
125
+ | undefined
126
+ | (SDKRenderingInfo & {
127
+ // depictCardsDataset is the dataset of the #depict-cards HTML element. It is empty in the development environment.
128
+ depictCardsDataset?: Record<string, string>;
129
+ // formatPrice takes a price as number (`price` is NOT in cents but the actual price, as returned from Depict) and returns a formatted string. It will use the same currency formatting that the shopify store is configured to use.
130
+ // In development (product card editor), a fallback formatting will be used.
131
+ formatPrice: <T extends number | undefined>(price: T) => T extends undefined ? undefined : string;
132
+ }),
133
+ configuredOptions_: Accessor<ProductCardSchema>
172
134
  ) {
173
135
  const variantDisplays = createMemo(() => display()?.variant_displays);
174
136
  const defaultVariantIndex = createMemo(() => display()?.variant_index);