@depict-ai/ui 2.1.17 → 2.1.19
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/ES10/index.cjs +56 -18
- package/ES10/index.d.ts +15 -10
- package/ES10/index.js +57 -19
- package/latest/index.cjs +56 -18
- package/latest/index.d.ts +15 -10
- package/latest/index.js +57 -19
- package/package.json +3 -3
- package/server/ES10/index.cjs +35 -10
- package/server/ES10/index.d.ts +15 -10
- package/server/ES10/index.js +36 -11
- package/server/latest/index.cjs +35 -10
- package/server/latest/index.d.ts +15 -10
- package/server/latest/index.js +36 -11
package/ES10/index.cjs
CHANGED
|
@@ -76,7 +76,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
76
76
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
77
77
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
78
78
|
/*! Depict.ai search and product listing SDK */
|
|
79
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.
|
|
79
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.1.19";
|
|
80
80
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
81
81
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
82
82
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -272,7 +272,16 @@ const $ce467edb5343cfcd$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<d
|
|
|
272
272
|
function $ce467edb5343cfcd$export$94026ee33dbabc26(props) {
|
|
273
273
|
return (() => {
|
|
274
274
|
const _el$ = $52FdA$solidjsweb.getNextElement($ce467edb5343cfcd$var$_tmpl$);
|
|
275
|
-
$52FdA$solidjsweb.effect(
|
|
275
|
+
$52FdA$solidjsweb.effect(_p$ => {
|
|
276
|
+
const _v$ = "position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%"),
|
|
277
|
+
_v$2 = props.class;
|
|
278
|
+
_p$._v$ = $52FdA$solidjsweb.style(_el$, _v$, _p$._v$);
|
|
279
|
+
_v$2 !== _p$._v$2 && $52FdA$solidjsweb.className(_el$, _p$._v$2 = _v$2);
|
|
280
|
+
return _p$;
|
|
281
|
+
}, {
|
|
282
|
+
_v$: undefined,
|
|
283
|
+
_v$2: undefined
|
|
284
|
+
});
|
|
276
285
|
return _el$;
|
|
277
286
|
})();
|
|
278
287
|
}
|
|
@@ -436,6 +445,9 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
|
|
|
436
445
|
const container = $52FdA$solidjsweb.createComponent((0, $ce467edb5343cfcd$export$94026ee33dbabc26), {
|
|
437
446
|
get aspectRatio() {
|
|
438
447
|
return props.aspectRatio;
|
|
448
|
+
},
|
|
449
|
+
get ["class"]() {
|
|
450
|
+
return props.class;
|
|
439
451
|
}
|
|
440
452
|
});
|
|
441
453
|
const owner = $52FdA$solidjs.getOwner();
|
|
@@ -1041,20 +1053,32 @@ function $6c2c739b113a8ddf$export$445d8d3f5f706a40(props, container_element) {
|
|
|
1041
1053
|
return [container_element, $52FdA$solidjsweb.memo(view_more_button_container), $52FdA$solidjsweb.memo(view_less_button_container), style_element];
|
|
1042
1054
|
}
|
|
1043
1055
|
$52FdA$solidjsweb.delegateEvents(["click"]);
|
|
1056
|
+
const $236a257ee52e5414$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<h2 class=recs-title>`);
|
|
1044
1057
|
function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
1045
1058
|
let {
|
|
1046
1059
|
recommendations_resource_: recommendations_resource_,
|
|
1047
1060
|
product_card_template_: product_card_template_,
|
|
1048
1061
|
layout_options_: layout_options_,
|
|
1049
1062
|
merchant_: merchant_,
|
|
1050
|
-
market_: market_
|
|
1063
|
+
market_: market_,
|
|
1064
|
+
title_: title_
|
|
1051
1065
|
} = _ref;
|
|
1052
1066
|
const is_showing_something = $52FdA$solidjs.createMemo(() => {
|
|
1053
1067
|
var _recommendations_reso;
|
|
1054
1068
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
1055
1069
|
});
|
|
1070
|
+
const title = $52FdA$solidjs.createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
1056
1071
|
const num_placeholders_ = () => 20;
|
|
1057
|
-
const slider = $52FdA$solidjsweb.createComponent((0, $
|
|
1072
|
+
const slider = [$52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1073
|
+
get when() {
|
|
1074
|
+
return title();
|
|
1075
|
+
},
|
|
1076
|
+
get children() {
|
|
1077
|
+
const _el$ = $52FdA$solidjsweb.getNextElement($236a257ee52e5414$var$_tmpl$);
|
|
1078
|
+
$52FdA$solidjsweb.insert(_el$, title);
|
|
1079
|
+
return _el$;
|
|
1080
|
+
}
|
|
1081
|
+
}), $52FdA$solidjsweb.createComponent((0, $ad8ec7729fffeb9c$export$6649caad96ef8870), {
|
|
1058
1082
|
arrow_height_: 25,
|
|
1059
1083
|
arrow_width_: 12.5,
|
|
1060
1084
|
disable_fading_: true,
|
|
@@ -1093,7 +1117,7 @@ function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
|
1093
1117
|
}
|
|
1094
1118
|
});
|
|
1095
1119
|
}
|
|
1096
|
-
});
|
|
1120
|
+
})];
|
|
1097
1121
|
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1098
1122
|
get when() {
|
|
1099
1123
|
return is_showing_something();
|
|
@@ -1164,6 +1188,7 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
|
|
|
1164
1188
|
recommendations_resource_: recommendations_resource_,
|
|
1165
1189
|
market_: () => props.market,
|
|
1166
1190
|
merchant_: () => props.merchant,
|
|
1191
|
+
title_: () => props.title,
|
|
1167
1192
|
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
1168
1193
|
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1169
1194
|
...grid_spacing_override()
|
|
@@ -1175,7 +1200,8 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
|
|
|
1175
1200
|
})();
|
|
1176
1201
|
}, "RecommendationSlider failed");
|
|
1177
1202
|
}
|
|
1178
|
-
const $2c920813c92d6987$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<
|
|
1203
|
+
const $2c920813c92d6987$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<h2 class=recs-title>`),
|
|
1204
|
+
$2c920813c92d6987$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
|
|
1179
1205
|
function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
1180
1206
|
let {
|
|
1181
1207
|
recommendations_resource_: recommendations_resource_,
|
|
@@ -1183,21 +1209,32 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
1183
1209
|
layout_options_: layout_options_,
|
|
1184
1210
|
merchant_: merchant_,
|
|
1185
1211
|
market_: market_,
|
|
1186
|
-
rows_object_: rows_object_
|
|
1212
|
+
rows_object_: rows_object_,
|
|
1213
|
+
title_: title_
|
|
1187
1214
|
} = _ref;
|
|
1188
1215
|
const is_showing_something = $52FdA$solidjs.createMemo(() => {
|
|
1189
1216
|
var _recommendations_reso;
|
|
1190
1217
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
1191
1218
|
});
|
|
1219
|
+
const title = $52FdA$solidjs.createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
1192
1220
|
const num_placeholders_ = () => 20;
|
|
1193
|
-
const elements = (()
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1221
|
+
const elements = [$52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1222
|
+
get when() {
|
|
1223
|
+
return title();
|
|
1224
|
+
},
|
|
1225
|
+
get children() {
|
|
1226
|
+
const _el$ = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$);
|
|
1227
|
+
$52FdA$solidjsweb.insert(_el$, title);
|
|
1228
|
+
return _el$;
|
|
1229
|
+
}
|
|
1230
|
+
}), (() => {
|
|
1231
|
+
const _el$2 = $52FdA$solidjsweb.getNextElement($2c920813c92d6987$var$_tmpl$2),
|
|
1232
|
+
_el$3 = _el$2.firstChild,
|
|
1233
|
+
[_el$4, _co$] = $52FdA$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
1234
|
+
_el$5 = _el$4.nextSibling,
|
|
1235
|
+
[_el$6, _co$2] = $52FdA$solidjsweb.getNextMarker(_el$5.nextSibling);
|
|
1236
|
+
$52FdA$solidjsweb.insert(_el$2, (0, $8edd3cf30d1fd8b4$export$a2cc176055f8f08), _el$4, _co$);
|
|
1237
|
+
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $6c2c739b113a8ddf$export$d21e32dfedac04be), $52FdA$solidjsweb.mergeProps({
|
|
1201
1238
|
get rows() {
|
|
1202
1239
|
return rows_object_();
|
|
1203
1240
|
},
|
|
@@ -1228,9 +1265,9 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
1228
1265
|
}
|
|
1229
1266
|
});
|
|
1230
1267
|
}
|
|
1231
|
-
})), _el$
|
|
1232
|
-
return _el
|
|
1233
|
-
})();
|
|
1268
|
+
})), _el$6, _co$2);
|
|
1269
|
+
return _el$2;
|
|
1270
|
+
})()];
|
|
1234
1271
|
return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1235
1272
|
get when() {
|
|
1236
1273
|
return is_showing_something();
|
|
@@ -1289,6 +1326,7 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
1289
1326
|
recommendations_resource_: recommendations_resource_,
|
|
1290
1327
|
market_: () => props.market,
|
|
1291
1328
|
merchant_: () => props.merchant,
|
|
1329
|
+
title_: () => props.title,
|
|
1292
1330
|
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
1293
1331
|
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1294
1332
|
...grid_spacing_override()
|
package/ES10/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JSX, Accessor, Signal, Setter } from "solid-js";
|
|
2
2
|
import { report, Display, Amazing_Slider, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/ES10";
|
|
3
|
-
import { SearchFilter,
|
|
3
|
+
import { SearchFilter, SearchRequestV2 } from "@depict-ai/types/api/SearchRequestV2";
|
|
4
4
|
import { SearchFilter as _SearchFilter1, ContentLink, SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
5
|
-
import { BaseCategoryDisplay,
|
|
5
|
+
import { BaseCategoryDisplay, ProductListingResponseV2 } from "@depict-ai/types/api/ProductListingResponseV2";
|
|
6
6
|
import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/api/SearchSuggestionsResponse";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { BaseSearchRequestV2 } from "@depict-ai/types/api/BaseSearchRequestV2";
|
|
8
|
+
import { SearchSuggestionsRequestV2 } from "@depict-ai/types/api/SearchSuggestionsRequestV2";
|
|
9
9
|
import { ProductListingRequestV2 } from "@depict-ai/types/api/ProductListingRequestV2";
|
|
10
|
-
export const version = "2.1.
|
|
10
|
+
export const version = "2.1.19";
|
|
11
11
|
/**
|
|
12
12
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
13
13
|
*/
|
|
@@ -145,6 +145,7 @@ export function useListing(): Record<symbol, any> | undefined;
|
|
|
145
145
|
*/
|
|
146
146
|
export function ImageContainer(props: {
|
|
147
147
|
aspectRatio: number;
|
|
148
|
+
class?: string;
|
|
148
149
|
}): HTMLDivElement;
|
|
149
150
|
/**
|
|
150
151
|
* Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
@@ -173,10 +174,12 @@ export const shopifyContainedImageContextSymbol: unique symbol;
|
|
|
173
174
|
* This works because the listings (recs, search, plp) all are wrapped in `<ListingProvider>`'s. This means all components rendered within can use `useListing` to get an object to write data to that will be the same for all components rendered within that listing. The first instance of this component rendered within a listing puts a ResizeObserver on its div and the other components then just set the sizes attribute of their image to that.
|
|
174
175
|
* @property src image source
|
|
175
176
|
* @property aspectRatio aspect ratio of the image
|
|
177
|
+
* @property class extra class to add to the container
|
|
176
178
|
*/
|
|
177
179
|
export function ShopifyContainedImage(props: {
|
|
178
180
|
src: string;
|
|
179
181
|
aspectRatio: number;
|
|
182
|
+
class?: string;
|
|
180
183
|
}): HTMLDivElement;
|
|
181
184
|
/** @jsxImportSource solid-js */
|
|
182
185
|
export function GenericSliderArrowButton(props?: {
|
|
@@ -242,6 +245,7 @@ type RecommendationSliderBaseProps<T extends Display> = {
|
|
|
242
245
|
grid_spacing: SDKGridSpacing;
|
|
243
246
|
cols_at_size: SDKColsAtSize;
|
|
244
247
|
recommendations: Promise<T[]>;
|
|
248
|
+
title?: JSX.Element;
|
|
245
249
|
};
|
|
246
250
|
/**
|
|
247
251
|
* Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
|
|
@@ -260,6 +264,7 @@ export function RecommendationSlider<T extends Display>(props: {
|
|
|
260
264
|
type RecommendationGridBaseProps<T extends Display> = {
|
|
261
265
|
grid_spacing: SDKGridSpacing;
|
|
262
266
|
cols_at_size: SDKColsAtSize;
|
|
267
|
+
title?: JSX.Element;
|
|
263
268
|
recommendations: Promise<T[]>;
|
|
264
269
|
view_more_button?: {
|
|
265
270
|
text: string;
|
|
@@ -650,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
650
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
651
656
|
page_url: string;
|
|
652
657
|
})[];
|
|
653
|
-
type ProductListingResponseAfterURLCreator = { [K in keyof
|
|
658
|
+
type ProductListingResponseAfterURLCreator = { [K in keyof ProductListingResponseV2]: K extends "displays" ? _AddPageUrlToDisplay1<ProductListingResponseV2[K]> : K extends "breadcrumb" | "quick_links" ? ReplaceBaseCategoryDisplay<ProductListingResponseV2[K]> : K extends "filters" ? AddActualFieldToFilters<ProductListingResponseV2[K]> : ProductListingResponseV2[K] };
|
|
654
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
655
660
|
get_metadata?: () => Promise<{
|
|
656
661
|
[k: string]: string;
|
|
@@ -667,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
667
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
668
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
669
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
670
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
671
676
|
failed?: true;
|
|
672
677
|
}>;
|
|
673
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
674
679
|
failed?: true;
|
|
675
680
|
}>;
|
|
676
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
677
682
|
failed?: true;
|
|
678
683
|
}>;
|
|
679
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
680
685
|
displays: T[];
|
|
681
686
|
} & {
|
|
682
687
|
failed?: true | undefined;
|
|
@@ -1139,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1139
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1140
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1141
1146
|
}) => import("solid-js").JSX.Element;
|
|
1142
|
-
export type { SearchFilter } from "@depict-ai/types/api/
|
|
1147
|
+
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV2";
|
package/ES10/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { add_to_version_info as $8tj43$add_to_version_info, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, dlog as $8tj43$dlog, queueMacroTask as $8tj43$queueMacroTask, catchify as $8tj43$catchify, is_safari as $8tj43$is_safari, observer as $8tj43$observer, dwarn as $8tj43$dwarn, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, slider_fractional_factory as $8tj43$slider_fractional_factory, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, report as $8tj43$report, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, fetch_recs as $8tj43$fetch_recs, snakeCasifyObject as $8tj43$snakeCasifyObject, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base_url as $8tj43$base_url, get_depict_id as $8tj43$get_depict_id, get_user_id as $8tj43$get_user_id, get_session_id as $8tj43$get_session_id, make_url_with_query_params as $8tj43$make_url_with_query_params, fetch_retry as $8tj43$fetch_retry, add_version_query_params as $8tj43$add_version_query_params, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, javascript_media_query as $8tj43$javascript_media_query, use_href_accessor as $8tj43$use_href_accessor, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
|
-
import { createComponent as $8tj43$createComponent, insert as $8tj43$insert, template as $8tj43$template, getNextElement as $8tj43$getNextElement, effect as $8tj43$effect, style as $8tj43$style, spread as $8tj43$spread, setAttribute as $8tj43$setAttribute, mergeProps as $8tj43$mergeProps1, isServer as $8tj43$isServer, runHydrationEvents as $8tj43$runHydrationEvents, addEventListener as $8tj43$addEventListener,
|
|
2
|
+
import { createComponent as $8tj43$createComponent, insert as $8tj43$insert, template as $8tj43$template, getNextElement as $8tj43$getNextElement, effect as $8tj43$effect, style as $8tj43$style, className as $8tj43$className, spread as $8tj43$spread, setAttribute as $8tj43$setAttribute, mergeProps as $8tj43$mergeProps1, isServer as $8tj43$isServer, runHydrationEvents as $8tj43$runHydrationEvents, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, getNextMarker as $8tj43$getNextMarker, classList as $8tj43$classList, use as $8tj43$use, Dynamic as $8tj43$Dynamic, setProperty as $8tj43$setProperty } from "solid-js/web";
|
|
3
3
|
import { createSignal as $8tj43$createSignal, getOwner as $8tj43$getOwner, createEffect as $8tj43$createEffect, runWithOwner as $8tj43$runWithOwner, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, createContext as $8tj43$createContext, useContext as $8tj43$useContext, mergeProps as $8tj43$mergeProps, Show as $8tj43$Show, createResource as $8tj43$createResource, Suspense as $8tj43$Suspense, untrack as $8tj43$untrack, createRenderEffect as $8tj43$createRenderEffect, Index as $8tj43$Index, createRoot as $8tj43$createRoot, For as $8tj43$For, createUniqueId as $8tj43$createUniqueId, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, on as $8tj43$on, batch as $8tj43$batch, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
|
|
4
4
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
5
5
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -9,7 +9,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
9
9
|
/*! Depict.ai search and product listing SDK */
|
|
10
10
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
11
11
|
register_es_version("ui", "ES10");
|
|
12
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.
|
|
12
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.1.19";
|
|
13
13
|
const $2855bffe06ef7a03$var$fallback_operator = "in";
|
|
14
14
|
const $2855bffe06ef7a03$var$fallback_token = "";
|
|
15
15
|
const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
|
|
@@ -205,7 +205,16 @@ const $801e8845d3fa3653$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`);
|
|
|
205
205
|
function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
|
|
206
206
|
return (() => {
|
|
207
207
|
const _el$ = $8tj43$getNextElement($801e8845d3fa3653$var$_tmpl$);
|
|
208
|
-
$8tj43$effect(
|
|
208
|
+
$8tj43$effect(_p$ => {
|
|
209
|
+
const _v$ = "position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%"),
|
|
210
|
+
_v$2 = props.class;
|
|
211
|
+
_p$._v$ = $8tj43$style(_el$, _v$, _p$._v$);
|
|
212
|
+
_v$2 !== _p$._v$2 && $8tj43$className(_el$, _p$._v$2 = _v$2);
|
|
213
|
+
return _p$;
|
|
214
|
+
}, {
|
|
215
|
+
_v$: undefined,
|
|
216
|
+
_v$2: undefined
|
|
217
|
+
});
|
|
209
218
|
return _el$;
|
|
210
219
|
})();
|
|
211
220
|
}
|
|
@@ -369,6 +378,9 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
369
378
|
const container = $8tj43$createComponent((0, $801e8845d3fa3653$export$94026ee33dbabc26), {
|
|
370
379
|
get aspectRatio() {
|
|
371
380
|
return props.aspectRatio;
|
|
381
|
+
},
|
|
382
|
+
get ["class"]() {
|
|
383
|
+
return props.class;
|
|
372
384
|
}
|
|
373
385
|
});
|
|
374
386
|
const owner = $8tj43$getOwner();
|
|
@@ -974,20 +986,32 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
974
986
|
return [container_element, $8tj43$memo(view_more_button_container), $8tj43$memo(view_less_button_container), style_element];
|
|
975
987
|
}
|
|
976
988
|
$8tj43$delegateEvents(["click"]);
|
|
989
|
+
const $39ddb986053fb759$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<h2 class=recs-title>`);
|
|
977
990
|
function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
978
991
|
let {
|
|
979
992
|
recommendations_resource_: recommendations_resource_,
|
|
980
993
|
product_card_template_: product_card_template_,
|
|
981
994
|
layout_options_: layout_options_,
|
|
982
995
|
merchant_: merchant_,
|
|
983
|
-
market_: market_
|
|
996
|
+
market_: market_,
|
|
997
|
+
title_: title_
|
|
984
998
|
} = _ref;
|
|
985
999
|
const is_showing_something = $8tj43$createMemo(() => {
|
|
986
1000
|
var _recommendations_reso;
|
|
987
1001
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
988
1002
|
});
|
|
1003
|
+
const title = $8tj43$createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
989
1004
|
const num_placeholders_ = () => 20;
|
|
990
|
-
const slider = $8tj43$createComponent((0, $
|
|
1005
|
+
const slider = [$8tj43$createComponent((0, $8tj43$Show), {
|
|
1006
|
+
get when() {
|
|
1007
|
+
return title();
|
|
1008
|
+
},
|
|
1009
|
+
get children() {
|
|
1010
|
+
const _el$ = $8tj43$getNextElement($39ddb986053fb759$var$_tmpl$);
|
|
1011
|
+
$8tj43$insert(_el$, title);
|
|
1012
|
+
return _el$;
|
|
1013
|
+
}
|
|
1014
|
+
}), $8tj43$createComponent((0, $002f09d00aac50b2$export$6649caad96ef8870), {
|
|
991
1015
|
arrow_height_: 25,
|
|
992
1016
|
arrow_width_: 12.5,
|
|
993
1017
|
disable_fading_: true,
|
|
@@ -1026,7 +1050,7 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
1026
1050
|
}
|
|
1027
1051
|
});
|
|
1028
1052
|
}
|
|
1029
|
-
});
|
|
1053
|
+
})];
|
|
1030
1054
|
return $8tj43$createComponent((0, $8tj43$Show), {
|
|
1031
1055
|
get when() {
|
|
1032
1056
|
return is_showing_something();
|
|
@@ -1097,6 +1121,7 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
1097
1121
|
recommendations_resource_: recommendations_resource_,
|
|
1098
1122
|
market_: () => props.market,
|
|
1099
1123
|
merchant_: () => props.merchant,
|
|
1124
|
+
title_: () => props.title,
|
|
1100
1125
|
layout_options_: $8tj43$createMemo(() => ({
|
|
1101
1126
|
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1102
1127
|
...grid_spacing_override()
|
|
@@ -1108,7 +1133,8 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
1108
1133
|
})();
|
|
1109
1134
|
}, "RecommendationSlider failed");
|
|
1110
1135
|
}
|
|
1111
|
-
const $e3efeb558d952696$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<
|
|
1136
|
+
const $e3efeb558d952696$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<h2 class=recs-title>`),
|
|
1137
|
+
$e3efeb558d952696$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
|
|
1112
1138
|
function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
1113
1139
|
let {
|
|
1114
1140
|
recommendations_resource_: recommendations_resource_,
|
|
@@ -1116,21 +1142,32 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
1116
1142
|
layout_options_: layout_options_,
|
|
1117
1143
|
merchant_: merchant_,
|
|
1118
1144
|
market_: market_,
|
|
1119
|
-
rows_object_: rows_object_
|
|
1145
|
+
rows_object_: rows_object_,
|
|
1146
|
+
title_: title_
|
|
1120
1147
|
} = _ref;
|
|
1121
1148
|
const is_showing_something = $8tj43$createMemo(() => {
|
|
1122
1149
|
var _recommendations_reso;
|
|
1123
1150
|
return recommendations_resource_.loading || ((_recommendations_reso = recommendations_resource_()) === null || _recommendations_reso === void 0 ? void 0 : _recommendations_reso.length);
|
|
1124
1151
|
});
|
|
1152
|
+
const title = $8tj43$createMemo(() => title_ === null || title_ === void 0 ? void 0 : title_()); // In case getter/accessor creates elements, don't create them twice
|
|
1125
1153
|
const num_placeholders_ = () => 20;
|
|
1126
|
-
const elements = (()
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1154
|
+
const elements = [$8tj43$createComponent((0, $8tj43$Show), {
|
|
1155
|
+
get when() {
|
|
1156
|
+
return title();
|
|
1157
|
+
},
|
|
1158
|
+
get children() {
|
|
1159
|
+
const _el$ = $8tj43$getNextElement($e3efeb558d952696$var$_tmpl$);
|
|
1160
|
+
$8tj43$insert(_el$, title);
|
|
1161
|
+
return _el$;
|
|
1162
|
+
}
|
|
1163
|
+
}), (() => {
|
|
1164
|
+
const _el$2 = $8tj43$getNextElement($e3efeb558d952696$var$_tmpl$2),
|
|
1165
|
+
_el$3 = _el$2.firstChild,
|
|
1166
|
+
[_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
|
|
1167
|
+
_el$5 = _el$4.nextSibling,
|
|
1168
|
+
[_el$6, _co$2] = $8tj43$getNextMarker(_el$5.nextSibling);
|
|
1169
|
+
$8tj43$insert(_el$2, (0, $ca55612a53dbbdd2$export$a2cc176055f8f08), _el$4, _co$);
|
|
1170
|
+
$8tj43$insert(_el$2, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
1134
1171
|
get rows() {
|
|
1135
1172
|
return rows_object_();
|
|
1136
1173
|
},
|
|
@@ -1161,9 +1198,9 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
1161
1198
|
}
|
|
1162
1199
|
});
|
|
1163
1200
|
}
|
|
1164
|
-
})), _el$
|
|
1165
|
-
return _el
|
|
1166
|
-
})();
|
|
1201
|
+
})), _el$6, _co$2);
|
|
1202
|
+
return _el$2;
|
|
1203
|
+
})()];
|
|
1167
1204
|
return $8tj43$createComponent((0, $8tj43$Show), {
|
|
1168
1205
|
get when() {
|
|
1169
1206
|
return is_showing_something();
|
|
@@ -1222,6 +1259,7 @@ function $b432b11321ad4c97$export$9756467d34d91cdb(props) {
|
|
|
1222
1259
|
recommendations_resource_: recommendations_resource_,
|
|
1223
1260
|
market_: () => props.market,
|
|
1224
1261
|
merchant_: () => props.merchant,
|
|
1262
|
+
title_: () => props.title,
|
|
1225
1263
|
layout_options_: $8tj43$createMemo(() => ({
|
|
1226
1264
|
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1227
1265
|
...grid_spacing_override()
|
package/latest/index.cjs
CHANGED
|
@@ -70,7 +70,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
70
70
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
71
71
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
72
72
|
/*! Depict.ai search and product listing SDK */
|
|
73
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.
|
|
73
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.1.19";
|
|
74
74
|
const $1ab22f2cd39b3061$var$fallback_operator = "in";
|
|
75
75
|
const $1ab22f2cd39b3061$var$fallback_token = "";
|
|
76
76
|
const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
|
|
@@ -261,7 +261,16 @@ const $93304d59a9747aa6$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<d
|
|
|
261
261
|
function $93304d59a9747aa6$export$94026ee33dbabc26(props) {
|
|
262
262
|
return (() => {
|
|
263
263
|
const _el$ = $gVhhF$solidjsweb.getNextElement($93304d59a9747aa6$var$_tmpl$);
|
|
264
|
-
$gVhhF$solidjsweb.effect(
|
|
264
|
+
$gVhhF$solidjsweb.effect(_p$ => {
|
|
265
|
+
const _v$ = `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`,
|
|
266
|
+
_v$2 = props.class;
|
|
267
|
+
_p$._v$ = $gVhhF$solidjsweb.style(_el$, _v$, _p$._v$);
|
|
268
|
+
_v$2 !== _p$._v$2 && $gVhhF$solidjsweb.className(_el$, _p$._v$2 = _v$2);
|
|
269
|
+
return _p$;
|
|
270
|
+
}, {
|
|
271
|
+
_v$: undefined,
|
|
272
|
+
_v$2: undefined
|
|
273
|
+
});
|
|
265
274
|
return _el$;
|
|
266
275
|
})();
|
|
267
276
|
}
|
|
@@ -422,6 +431,9 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
|
|
|
422
431
|
const container = $gVhhF$solidjsweb.createComponent((0, $93304d59a9747aa6$export$94026ee33dbabc26), {
|
|
423
432
|
get aspectRatio() {
|
|
424
433
|
return props.aspectRatio;
|
|
434
|
+
},
|
|
435
|
+
get ["class"]() {
|
|
436
|
+
return props.class;
|
|
425
437
|
}
|
|
426
438
|
});
|
|
427
439
|
const owner = $gVhhF$solidjs.getOwner();
|
|
@@ -982,16 +994,28 @@ function $f48d0fbb00835aaa$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
982
994
|
return [container_element, $gVhhF$solidjsweb.memo(view_more_button_container), $gVhhF$solidjsweb.memo(view_less_button_container), style_element];
|
|
983
995
|
}
|
|
984
996
|
$gVhhF$solidjsweb.delegateEvents(["click"]);
|
|
997
|
+
const $363ce4d1d71041aa$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<h2 class=recs-title>`);
|
|
985
998
|
function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
986
999
|
recommendations_resource_: recommendations_resource_,
|
|
987
1000
|
product_card_template_: product_card_template_,
|
|
988
1001
|
layout_options_: layout_options_,
|
|
989
1002
|
merchant_: merchant_,
|
|
990
|
-
market_: market_
|
|
1003
|
+
market_: market_,
|
|
1004
|
+
title_: title_
|
|
991
1005
|
}) {
|
|
992
1006
|
const is_showing_something = $gVhhF$solidjs.createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
1007
|
+
const title = $gVhhF$solidjs.createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
993
1008
|
const num_placeholders_ = () => 20;
|
|
994
|
-
const slider = $gVhhF$solidjsweb.createComponent((0, $
|
|
1009
|
+
const slider = [$gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1010
|
+
get when() {
|
|
1011
|
+
return title();
|
|
1012
|
+
},
|
|
1013
|
+
get children() {
|
|
1014
|
+
const _el$ = $gVhhF$solidjsweb.getNextElement($363ce4d1d71041aa$var$_tmpl$);
|
|
1015
|
+
$gVhhF$solidjsweb.insert(_el$, title);
|
|
1016
|
+
return _el$;
|
|
1017
|
+
}
|
|
1018
|
+
}), $gVhhF$solidjsweb.createComponent((0, $a0e53f99354809d9$export$6649caad96ef8870), {
|
|
995
1019
|
arrow_height_: 25,
|
|
996
1020
|
arrow_width_: 12.5,
|
|
997
1021
|
disable_fading_: true,
|
|
@@ -1030,7 +1054,7 @@ function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
|
1030
1054
|
}
|
|
1031
1055
|
});
|
|
1032
1056
|
}
|
|
1033
|
-
});
|
|
1057
|
+
})];
|
|
1034
1058
|
return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1035
1059
|
get when() {
|
|
1036
1060
|
return is_showing_something();
|
|
@@ -1098,6 +1122,7 @@ function $72f96c4782db0b1b$export$9574e176201e5e8d(props) {
|
|
|
1098
1122
|
recommendations_resource_: recommendations_resource_,
|
|
1099
1123
|
market_: () => props.market,
|
|
1100
1124
|
merchant_: () => props.merchant,
|
|
1125
|
+
title_: () => props.title,
|
|
1101
1126
|
layout_options_: $gVhhF$solidjs.createMemo(() => ({
|
|
1102
1127
|
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1103
1128
|
...grid_spacing_override()
|
|
@@ -1109,25 +1134,37 @@ function $72f96c4782db0b1b$export$9574e176201e5e8d(props) {
|
|
|
1109
1134
|
})();
|
|
1110
1135
|
}, "RecommendationSlider failed");
|
|
1111
1136
|
}
|
|
1112
|
-
const $b8e79813f4f7ebe4$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<
|
|
1137
|
+
const $b8e79813f4f7ebe4$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<h2 class=recs-title>`),
|
|
1138
|
+
$b8e79813f4f7ebe4$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
|
|
1113
1139
|
function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
1114
1140
|
recommendations_resource_: recommendations_resource_,
|
|
1115
1141
|
product_card_template_: product_card_template_,
|
|
1116
1142
|
layout_options_: layout_options_,
|
|
1117
1143
|
merchant_: merchant_,
|
|
1118
1144
|
market_: market_,
|
|
1119
|
-
rows_object_: rows_object_
|
|
1145
|
+
rows_object_: rows_object_,
|
|
1146
|
+
title_: title_
|
|
1120
1147
|
}) {
|
|
1121
1148
|
const is_showing_something = $gVhhF$solidjs.createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
1149
|
+
const title = $gVhhF$solidjs.createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
1122
1150
|
const num_placeholders_ = () => 20;
|
|
1123
|
-
const elements = (()
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1151
|
+
const elements = [$gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1152
|
+
get when() {
|
|
1153
|
+
return title();
|
|
1154
|
+
},
|
|
1155
|
+
get children() {
|
|
1156
|
+
const _el$ = $gVhhF$solidjsweb.getNextElement($b8e79813f4f7ebe4$var$_tmpl$);
|
|
1157
|
+
$gVhhF$solidjsweb.insert(_el$, title);
|
|
1158
|
+
return _el$;
|
|
1159
|
+
}
|
|
1160
|
+
}), (() => {
|
|
1161
|
+
const _el$2 = $gVhhF$solidjsweb.getNextElement($b8e79813f4f7ebe4$var$_tmpl$2),
|
|
1162
|
+
_el$3 = _el$2.firstChild,
|
|
1163
|
+
[_el$4, _co$] = $gVhhF$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
1164
|
+
_el$5 = _el$4.nextSibling,
|
|
1165
|
+
[_el$6, _co$2] = $gVhhF$solidjsweb.getNextMarker(_el$5.nextSibling);
|
|
1166
|
+
$gVhhF$solidjsweb.insert(_el$2, (0, $fc23d7668ae0011d$export$a2cc176055f8f08), _el$4, _co$);
|
|
1167
|
+
$gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $f48d0fbb00835aaa$export$d21e32dfedac04be), $gVhhF$solidjsweb.mergeProps({
|
|
1131
1168
|
get rows() {
|
|
1132
1169
|
return rows_object_();
|
|
1133
1170
|
},
|
|
@@ -1158,9 +1195,9 @@ function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
|
1158
1195
|
}
|
|
1159
1196
|
});
|
|
1160
1197
|
}
|
|
1161
|
-
})), _el$
|
|
1162
|
-
return _el
|
|
1163
|
-
})();
|
|
1198
|
+
})), _el$6, _co$2);
|
|
1199
|
+
return _el$2;
|
|
1200
|
+
})()];
|
|
1164
1201
|
return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1165
1202
|
get when() {
|
|
1166
1203
|
return is_showing_something();
|
|
@@ -1216,6 +1253,7 @@ function $1f8dbf7e28b3eff2$export$9756467d34d91cdb(props) {
|
|
|
1216
1253
|
recommendations_resource_: recommendations_resource_,
|
|
1217
1254
|
market_: () => props.market,
|
|
1218
1255
|
merchant_: () => props.merchant,
|
|
1256
|
+
title_: () => props.title,
|
|
1219
1257
|
layout_options_: $gVhhF$solidjs.createMemo(() => ({
|
|
1220
1258
|
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
1221
1259
|
...grid_spacing_override()
|