@depict-ai/portal-components 2.7.31 → 2.7.32
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 +1 -1
- package/dist/main.js +6 -16
- package/dist/module.js +6 -16
- package/package.json +1 -1
- package/src/specialForShopify/DefaultSolidProductCard.tsx +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { SearchFilter } from "@depict-ai/types/api/SearchResponse";
|
|
|
4
4
|
import { Locale } from "@depict-ai/react-ui/locales/latest";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
7
|
-
export const version = "2.7.
|
|
7
|
+
export const version = "2.7.32";
|
|
8
8
|
type TextOptions = {
|
|
9
9
|
/** Enabled */
|
|
10
10
|
enabled: boolean;
|
package/dist/main.js
CHANGED
|
@@ -20,7 +20,7 @@ $parcel$export(module.exports, "ExpandingSection", () => $2214dc111b9e2866$expor
|
|
|
20
20
|
$parcel$export(module.exports, "ReactLookCard", () => $35bab9ff48bfe404$export$48787da2a5568bc);
|
|
21
21
|
$parcel$export(module.exports, "version", () => $0a017be3a74fcc94$export$83d89fbfd8236492);
|
|
22
22
|
/*! Depict.ai portal components */ // This is where the actual source of your React stuff should live
|
|
23
|
-
const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.
|
|
23
|
+
const $0a017be3a74fcc94$export$83d89fbfd8236492 = "2.7.32";
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -718,7 +718,7 @@ function $3375ddd88f77967d$var$ImagesAndVideos({ image_urls_: image_urls_, video
|
|
|
718
718
|
const [itemsWantingToBeRendered, setItemsWantingToBeRendered] = (0, $7jsgb$solidjs.createSignal)([], {
|
|
719
719
|
equals: false
|
|
720
720
|
});
|
|
721
|
-
// When slidable, only render items (and therefore fetch images) when the user actually tried swiping -> this is for better network performance
|
|
721
|
+
// When slidable, only render extra items (and therefore fetch images) when the user actually tried swiping -> this is for better network performance
|
|
722
722
|
const MaybeShowLazily = (props)=>{
|
|
723
723
|
const us = Symbol();
|
|
724
724
|
setItemsWantingToBeRendered((prev)=>{
|
|
@@ -726,14 +726,15 @@ function $3375ddd88f77967d$var$ImagesAndVideos({ image_urls_: image_urls_, video
|
|
|
726
726
|
return prev;
|
|
727
727
|
});
|
|
728
728
|
(0, $7jsgb$solidjs.onCleanup)(()=>setItemsWantingToBeRendered((prev)=>prev.filter((item)=>item !== us)));
|
|
729
|
-
return
|
|
729
|
+
return(// After it has been swiped, render (and fetch the images) for the rest.
|
|
730
|
+
(0, $7jsgb$solidjsweb.createComponent)((0, $7jsgb$solidjs.Show), {
|
|
730
731
|
get when () {
|
|
731
|
-
return !slidable() ||
|
|
732
|
+
return !slidable() || userTriedSliding() || itemsWantingToBeRendered().indexOf(us) < 2;
|
|
732
733
|
},
|
|
733
734
|
get children () {
|
|
734
735
|
return props.children;
|
|
735
736
|
}
|
|
736
|
-
});
|
|
737
|
+
}));
|
|
737
738
|
};
|
|
738
739
|
return (0, $7jsgb$solidjsweb.createComponent)((0, $7jsgb$solidjs.Show), {
|
|
739
740
|
get when () {
|
|
@@ -835,17 +836,6 @@ function $3375ddd88f77967d$var$ImagesAndVideos({ image_urls_: image_urls_, video
|
|
|
835
836
|
})
|
|
836
837
|
});
|
|
837
838
|
}
|
|
838
|
-
}),
|
|
839
|
-
(0, $7jsgb$solidjsweb.createComponent)((0, $7jsgb$solidjs.Show), {
|
|
840
|
-
get when () {
|
|
841
|
-
return (0, $7jsgb$solidjsweb.memo)(()=>!!(slidable() && itemsWantingToBeRendered().length > 1))() && !userTriedSliding();
|
|
842
|
-
},
|
|
843
|
-
get children () {
|
|
844
|
-
return (0, $7jsgb$solidjsweb.createComponent)((0, $7jsgb$depictaiuilatest.ImagePlaceholder), {
|
|
845
|
-
width: "100%",
|
|
846
|
-
height: ""
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
839
|
})
|
|
850
840
|
];
|
|
851
841
|
}
|
package/dist/module.js
CHANGED
|
@@ -7,7 +7,7 @@ import {createContext as $2MCgq$createContext, createMemo as $2MCgq$createMemo,
|
|
|
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.
|
|
10
|
+
const $91c11b750e80ede3$export$83d89fbfd8236492 = "2.7.32";
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -705,7 +705,7 @@ function $29535f590238371c$var$ImagesAndVideos({ image_urls_: image_urls_, video
|
|
|
705
705
|
const [itemsWantingToBeRendered, setItemsWantingToBeRendered] = (0, $2MCgq$createSignal)([], {
|
|
706
706
|
equals: false
|
|
707
707
|
});
|
|
708
|
-
// When slidable, only render items (and therefore fetch images) when the user actually tried swiping -> this is for better network performance
|
|
708
|
+
// When slidable, only render extra items (and therefore fetch images) when the user actually tried swiping -> this is for better network performance
|
|
709
709
|
const MaybeShowLazily = (props)=>{
|
|
710
710
|
const us = Symbol();
|
|
711
711
|
setItemsWantingToBeRendered((prev)=>{
|
|
@@ -713,14 +713,15 @@ function $29535f590238371c$var$ImagesAndVideos({ image_urls_: image_urls_, video
|
|
|
713
713
|
return prev;
|
|
714
714
|
});
|
|
715
715
|
(0, $2MCgq$onCleanup)(()=>setItemsWantingToBeRendered((prev)=>prev.filter((item)=>item !== us)));
|
|
716
|
-
return
|
|
716
|
+
return(// After it has been swiped, render (and fetch the images) for the rest.
|
|
717
|
+
(0, $2MCgq$createComponent)((0, $2MCgq$Show), {
|
|
717
718
|
get when () {
|
|
718
|
-
return !slidable() ||
|
|
719
|
+
return !slidable() || userTriedSliding() || itemsWantingToBeRendered().indexOf(us) < 2;
|
|
719
720
|
},
|
|
720
721
|
get children () {
|
|
721
722
|
return props.children;
|
|
722
723
|
}
|
|
723
|
-
});
|
|
724
|
+
}));
|
|
724
725
|
};
|
|
725
726
|
return (0, $2MCgq$createComponent)((0, $2MCgq$Show), {
|
|
726
727
|
get when () {
|
|
@@ -822,17 +823,6 @@ function $29535f590238371c$var$ImagesAndVideos({ image_urls_: image_urls_, video
|
|
|
822
823
|
})
|
|
823
824
|
});
|
|
824
825
|
}
|
|
825
|
-
}),
|
|
826
|
-
(0, $2MCgq$createComponent)((0, $2MCgq$Show), {
|
|
827
|
-
get when () {
|
|
828
|
-
return (0, $2MCgq$memo)(()=>!!(slidable() && itemsWantingToBeRendered().length > 1))() && !userTriedSliding();
|
|
829
|
-
},
|
|
830
|
-
get children () {
|
|
831
|
-
return (0, $2MCgq$createComponent)((0, $2MCgq$ImagePlaceholder), {
|
|
832
|
-
width: "100%",
|
|
833
|
-
height: ""
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
826
|
})
|
|
837
827
|
];
|
|
838
828
|
}
|
package/package.json
CHANGED
|
@@ -773,7 +773,7 @@ function ImagesAndVideos({
|
|
|
773
773
|
);
|
|
774
774
|
};
|
|
775
775
|
const [itemsWantingToBeRendered, setItemsWantingToBeRendered] = createSignal<symbol[]>([], { equals: false });
|
|
776
|
-
// When slidable, only render items (and therefore fetch images) when the user actually tried swiping -> this is for better network performance
|
|
776
|
+
// When slidable, only render extra items (and therefore fetch images) when the user actually tried swiping -> this is for better network performance
|
|
777
777
|
const MaybeShowLazily = (props: { children: JSX.Element }) => {
|
|
778
778
|
const us = Symbol();
|
|
779
779
|
setItemsWantingToBeRendered(prev => {
|
|
@@ -782,7 +782,11 @@ function ImagesAndVideos({
|
|
|
782
782
|
});
|
|
783
783
|
onCleanup(() => setItemsWantingToBeRendered(prev => prev.filter(item => item !== us)));
|
|
784
784
|
return (
|
|
785
|
-
|
|
785
|
+
// Render the first two items immediately, so the slider can be swiped and there is an image when it's done.
|
|
786
|
+
// After it has been swiped, render (and fetch the images) for the rest.
|
|
787
|
+
<Show when={!slidable() || userTriedSliding() || itemsWantingToBeRendered().indexOf(us) < 2}>
|
|
788
|
+
{props.children}
|
|
789
|
+
</Show>
|
|
786
790
|
);
|
|
787
791
|
};
|
|
788
792
|
|
|
@@ -830,9 +834,6 @@ function ImagesAndVideos({
|
|
|
830
834
|
)}
|
|
831
835
|
</For>
|
|
832
836
|
</Show>
|
|
833
|
-
<Show when={slidable() && itemsWantingToBeRendered().length > 1 && !userTriedSliding()}>
|
|
834
|
-
<ImagePlaceholder width="100%" height="" />
|
|
835
|
-
</Show>
|
|
836
837
|
</Container>
|
|
837
838
|
</Show>
|
|
838
839
|
);
|