@depict-ai/ui 2.1.18 → 2.1.20
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 +14 -2
- package/ES10/index.d.ts +13 -10
- package/ES10/index.js +15 -3
- package/latest/index.cjs +14 -2
- package/latest/index.d.ts +13 -10
- package/latest/index.js +15 -3
- package/package.json +3 -3
- package/server/ES10/index.cjs +6 -3
- package/server/ES10/index.d.ts +13 -10
- package/server/ES10/index.js +7 -4
- package/server/latest/index.cjs +6 -3
- package/server/latest/index.d.ts +13 -10
- package/server/latest/index.js +7 -4
- package/locales/require.js +0 -1152
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.20";
|
|
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();
|
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.20";
|
|
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?: {
|
|
@@ -652,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
652
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
653
656
|
page_url: string;
|
|
654
657
|
})[];
|
|
655
|
-
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] };
|
|
656
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
657
660
|
get_metadata?: () => Promise<{
|
|
658
661
|
[k: string]: string;
|
|
@@ -669,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
669
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
670
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
671
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
672
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
673
676
|
failed?: true;
|
|
674
677
|
}>;
|
|
675
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
676
679
|
failed?: true;
|
|
677
680
|
}>;
|
|
678
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
679
682
|
failed?: true;
|
|
680
683
|
}>;
|
|
681
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
682
685
|
displays: T[];
|
|
683
686
|
} & {
|
|
684
687
|
failed?: true | undefined;
|
|
@@ -1141,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1141
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1142
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1143
1146
|
}) => import("solid-js").JSX.Element;
|
|
1144
|
-
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.20";
|
|
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();
|
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.20";
|
|
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();
|
package/latest/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/latest";
|
|
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.20";
|
|
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?: {
|
|
@@ -652,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
652
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
653
656
|
page_url: string;
|
|
654
657
|
})[];
|
|
655
|
-
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] };
|
|
656
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
657
660
|
get_metadata?: () => Promise<{
|
|
658
661
|
[k: string]: string;
|
|
@@ -669,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
669
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
670
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
671
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
672
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
673
676
|
failed?: true;
|
|
674
677
|
}>;
|
|
675
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
676
679
|
failed?: true;
|
|
677
680
|
}>;
|
|
678
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
679
682
|
failed?: true;
|
|
680
683
|
}>;
|
|
681
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
682
685
|
displays: T[];
|
|
683
686
|
} & {
|
|
684
687
|
failed?: true | undefined;
|
|
@@ -1141,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1141
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1142
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1143
1146
|
}) => import("solid-js").JSX.Element;
|
|
1144
|
-
export type { SearchFilter } from "@depict-ai/types/api/
|
|
1147
|
+
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV2";
|
package/latest/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { add_to_version_info as $9HbP8$add_to_version_info, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, dlog as $9HbP8$dlog, queueMacroTask as $9HbP8$queueMacroTask, catchify as $9HbP8$catchify, is_safari as $9HbP8$is_safari, observer as $9HbP8$observer, dwarn as $9HbP8$dwarn, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, slider_fractional_factory as $9HbP8$slider_fractional_factory, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, fetch_recs as $9HbP8$fetch_recs, snakeCasifyObject as $9HbP8$snakeCasifyObject, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base_url as $9HbP8$base_url, get_depict_id as $9HbP8$get_depict_id, get_user_id as $9HbP8$get_user_id, get_session_id as $9HbP8$get_session_id, sort_obj as $9HbP8$sort_obj, fetch_retry as $9HbP8$fetch_retry, add_version_query_params as $9HbP8$add_version_query_params, make_url_with_query_params as $9HbP8$make_url_with_query_params, edit_current_page_meta_tags as $9HbP8$edit_current_page_meta_tags, javascript_media_query as $9HbP8$javascript_media_query, use_href_accessor as $9HbP8$use_href_accessor, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ListenableSet as $9HbP8$ListenableSet, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
|
-
import { createComponent as $9HbP8$createComponent, insert as $9HbP8$insert, template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, effect as $9HbP8$effect, style as $9HbP8$style, spread as $9HbP8$spread, setAttribute as $9HbP8$setAttribute, mergeProps as $9HbP8$mergeProps1, isServer as $9HbP8$isServer, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener,
|
|
2
|
+
import { createComponent as $9HbP8$createComponent, insert as $9HbP8$insert, template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, effect as $9HbP8$effect, style as $9HbP8$style, className as $9HbP8$className, spread as $9HbP8$spread, setAttribute as $9HbP8$setAttribute, mergeProps as $9HbP8$mergeProps1, isServer as $9HbP8$isServer, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, getNextMarker as $9HbP8$getNextMarker, classList as $9HbP8$classList, use as $9HbP8$use, Dynamic as $9HbP8$Dynamic, setProperty as $9HbP8$setProperty } from "solid-js/web";
|
|
3
3
|
import { createSignal as $9HbP8$createSignal, getOwner as $9HbP8$getOwner, createEffect as $9HbP8$createEffect, runWithOwner as $9HbP8$runWithOwner, onCleanup as $9HbP8$onCleanup, createMemo as $9HbP8$createMemo, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, mergeProps as $9HbP8$mergeProps, Show as $9HbP8$Show, createResource as $9HbP8$createResource, Suspense as $9HbP8$Suspense, untrack as $9HbP8$untrack, createRenderEffect as $9HbP8$createRenderEffect, Index as $9HbP8$Index, createRoot as $9HbP8$createRoot, For as $9HbP8$For, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, on as $9HbP8$on, batch as $9HbP8$batch, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
|
|
4
4
|
import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from "solid-js/store";
|
|
5
5
|
|
|
6
6
|
/*! Depict.ai search and product listing SDK */
|
|
7
7
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
8
8
|
register_es_version("ui", "latest");
|
|
9
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.
|
|
9
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.20";
|
|
10
10
|
const $4147651646da990a$var$fallback_operator = "in";
|
|
11
11
|
const $4147651646da990a$var$fallback_token = "";
|
|
12
12
|
const $4147651646da990a$var$legacy_filter_prefix = "filter_";
|
|
@@ -197,7 +197,16 @@ const $f18d425032111270$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`);
|
|
|
197
197
|
function $f18d425032111270$export$94026ee33dbabc26(props) {
|
|
198
198
|
return (() => {
|
|
199
199
|
const _el$ = $9HbP8$getNextElement($f18d425032111270$var$_tmpl$);
|
|
200
|
-
$9HbP8$effect(
|
|
200
|
+
$9HbP8$effect(_p$ => {
|
|
201
|
+
const _v$ = `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`,
|
|
202
|
+
_v$2 = props.class;
|
|
203
|
+
_p$._v$ = $9HbP8$style(_el$, _v$, _p$._v$);
|
|
204
|
+
_v$2 !== _p$._v$2 && $9HbP8$className(_el$, _p$._v$2 = _v$2);
|
|
205
|
+
return _p$;
|
|
206
|
+
}, {
|
|
207
|
+
_v$: undefined,
|
|
208
|
+
_v$2: undefined
|
|
209
|
+
});
|
|
201
210
|
return _el$;
|
|
202
211
|
})();
|
|
203
212
|
}
|
|
@@ -358,6 +367,9 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
|
|
|
358
367
|
const container = $9HbP8$createComponent((0, $f18d425032111270$export$94026ee33dbabc26), {
|
|
359
368
|
get aspectRatio() {
|
|
360
369
|
return props.aspectRatio;
|
|
370
|
+
},
|
|
371
|
+
get ["class"]() {
|
|
372
|
+
return props.class;
|
|
361
373
|
}
|
|
362
374
|
});
|
|
363
375
|
const owner = $9HbP8$getOwner();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.20",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -237,8 +237,8 @@
|
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
239
|
"@depict-ai/plp-styling": "^1.2.14",
|
|
240
|
-
"@depict-ai/types": "^
|
|
241
|
-
"@depict-ai/utilishared": "^1.0.
|
|
240
|
+
"@depict-ai/types": "^2.0.0",
|
|
241
|
+
"@depict-ai/utilishared": "^1.0.50",
|
|
242
242
|
"solid-js": "^1.8.1"
|
|
243
243
|
},
|
|
244
244
|
"type": "module",
|
package/server/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.20";
|
|
80
80
|
const $a68b73fd7ba0853f$var$fallback_operator = "in";
|
|
81
81
|
const $a68b73fd7ba0853f$var$fallback_token = "";
|
|
82
82
|
const $a68b73fd7ba0853f$var$legacy_filter_prefix = "filter_";
|
|
@@ -268,9 +268,9 @@ function $d067f3a30f047b41$export$e68cff63f76bd15b(props) {
|
|
|
268
268
|
function $d067f3a30f047b41$export$8d0c4fdbb05a2f2e() {
|
|
269
269
|
return $3hooq$solidjs.useContext($d067f3a30f047b41$var$ListingContext);
|
|
270
270
|
}
|
|
271
|
-
const $ce467edb5343cfcd$var$_tmpl$ = ["<div", ' style="', '"></div>
|
|
271
|
+
const $ce467edb5343cfcd$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
|
|
272
272
|
function $ce467edb5343cfcd$export$94026ee33dbabc26(props) {
|
|
273
|
-
return $3hooq$solidjsweb.ssr($ce467edb5343cfcd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")));
|
|
273
|
+
return $3hooq$solidjsweb.ssr($ce467edb5343cfcd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $3hooq$solidjsweb.ssrAttribute("class", $3hooq$solidjsweb.escape(props.class, true), false));
|
|
274
274
|
}
|
|
275
275
|
function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
|
|
276
276
|
const [size, setSize] = $3hooq$solidjs.createSignal(0);
|
|
@@ -432,6 +432,9 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
|
|
|
432
432
|
const container = $3hooq$solidjsweb.createComponent((0, $ce467edb5343cfcd$export$94026ee33dbabc26), {
|
|
433
433
|
get aspectRatio() {
|
|
434
434
|
return props.aspectRatio;
|
|
435
|
+
},
|
|
436
|
+
get ["class"]() {
|
|
437
|
+
return props.class;
|
|
435
438
|
}
|
|
436
439
|
});
|
|
437
440
|
const owner = $3hooq$solidjs.getOwner();
|
package/server/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.20";
|
|
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?: {
|
|
@@ -652,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
652
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
653
656
|
page_url: string;
|
|
654
657
|
})[];
|
|
655
|
-
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] };
|
|
656
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
657
660
|
get_metadata?: () => Promise<{
|
|
658
661
|
[k: string]: string;
|
|
@@ -669,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
669
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
670
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
671
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
672
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
673
676
|
failed?: true;
|
|
674
677
|
}>;
|
|
675
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
676
679
|
failed?: true;
|
|
677
680
|
}>;
|
|
678
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
679
682
|
failed?: true;
|
|
680
683
|
}>;
|
|
681
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
682
685
|
displays: T[];
|
|
683
686
|
} & {
|
|
684
687
|
failed?: true | undefined;
|
|
@@ -1141,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1141
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1142
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1143
1146
|
}) => import("solid-js").JSX.Element;
|
|
1144
|
-
export type { SearchFilter } from "@depict-ai/types/api/
|
|
1147
|
+
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV2";
|
package/server/ES10/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { add_to_version_info as $b8hua$add_to_version_info, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, dlog as $b8hua$dlog, queueMacroTask as $b8hua$queueMacroTask, catchify as $b8hua$catchify, is_safari as $b8hua$is_safari, observer as $b8hua$observer, dwarn as $b8hua$dwarn, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, slider_fractional_factory as $b8hua$slider_fractional_factory, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, fetch_recs as $b8hua$fetch_recs, snakeCasifyObject as $b8hua$snakeCasifyObject, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, base_url as $b8hua$base_url, get_depict_id as $b8hua$get_depict_id, get_user_id as $b8hua$get_user_id, get_session_id as $b8hua$get_session_id, make_url_with_query_params as $b8hua$make_url_with_query_params, fetch_retry as $b8hua$fetch_retry, add_version_query_params as $b8hua$add_version_query_params, sort_obj as $b8hua$sort_obj, edit_current_page_meta_tags as $b8hua$edit_current_page_meta_tags, javascript_media_query as $b8hua$javascript_media_query, use_href_accessor as $b8hua$use_href_accessor, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, ContainedImage as $b8hua$ContainedImage, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
|
-
import { createComponent as $b8hua$createComponent, insert as $b8hua$insert, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle,
|
|
2
|
+
import { createComponent as $b8hua$createComponent, insert as $b8hua$insert, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, ssrAttribute as $b8hua$ssrAttribute, escape as $b8hua$escape, spread as $b8hua$spread, mergeProps as $b8hua$mergeProps1, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
3
|
import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createMemo as $b8hua$createMemo, createContext as $b8hua$createContext, useContext as $b8hua$useContext, mergeProps as $b8hua$mergeProps, Show as $b8hua$Show, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, For as $b8hua$For, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, batch as $b8hua$batch, on as $b8hua$on, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
4
4
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
5
5
|
import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -9,7 +9,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$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.20";
|
|
13
13
|
const $2855bffe06ef7a03$var$fallback_operator = "in";
|
|
14
14
|
const $2855bffe06ef7a03$var$fallback_token = "";
|
|
15
15
|
const $2855bffe06ef7a03$var$legacy_filter_prefix = "filter_";
|
|
@@ -201,9 +201,9 @@ function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
|
201
201
|
function $5441862cd2f5e111$export$8d0c4fdbb05a2f2e() {
|
|
202
202
|
return $b8hua$useContext($5441862cd2f5e111$var$ListingContext);
|
|
203
203
|
}
|
|
204
|
-
const $801e8845d3fa3653$var$_tmpl$ = ["<div", ' style="', '"></div>
|
|
204
|
+
const $801e8845d3fa3653$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
|
|
205
205
|
function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
|
|
206
|
-
return $b8hua$ssr($801e8845d3fa3653$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")));
|
|
206
|
+
return $b8hua$ssr($801e8845d3fa3653$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $b8hua$ssrAttribute("class", $b8hua$escape(props.class, true), false));
|
|
207
207
|
}
|
|
208
208
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
209
209
|
const [size, setSize] = $b8hua$createSignal(0);
|
|
@@ -365,6 +365,9 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
365
365
|
const container = $b8hua$createComponent((0, $801e8845d3fa3653$export$94026ee33dbabc26), {
|
|
366
366
|
get aspectRatio() {
|
|
367
367
|
return props.aspectRatio;
|
|
368
|
+
},
|
|
369
|
+
get ["class"]() {
|
|
370
|
+
return props.class;
|
|
368
371
|
}
|
|
369
372
|
});
|
|
370
373
|
const owner = $b8hua$getOwner();
|
package/server/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.20";
|
|
74
74
|
const $1ab22f2cd39b3061$var$fallback_operator = "in";
|
|
75
75
|
const $1ab22f2cd39b3061$var$fallback_token = "";
|
|
76
76
|
const $1ab22f2cd39b3061$var$legacy_filter_prefix = "filter_";
|
|
@@ -257,9 +257,9 @@ function $84798aaa863a4909$export$e68cff63f76bd15b(props) {
|
|
|
257
257
|
function $84798aaa863a4909$export$8d0c4fdbb05a2f2e() {
|
|
258
258
|
return $5vyXB$solidjs.useContext($84798aaa863a4909$var$ListingContext);
|
|
259
259
|
}
|
|
260
|
-
const $93304d59a9747aa6$var$_tmpl$ = ["<div", ' style="', '"></div>
|
|
260
|
+
const $93304d59a9747aa6$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
|
|
261
261
|
function $93304d59a9747aa6$export$94026ee33dbabc26(props) {
|
|
262
|
-
return $5vyXB$solidjsweb.ssr($93304d59a9747aa6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(`position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`));
|
|
262
|
+
return $5vyXB$solidjsweb.ssr($93304d59a9747aa6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(`position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`), $5vyXB$solidjsweb.ssrAttribute("class", $5vyXB$solidjsweb.escape(props.class, true), false));
|
|
263
263
|
}
|
|
264
264
|
function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
|
|
265
265
|
const [size, setSize] = $5vyXB$solidjs.createSignal(0);
|
|
@@ -418,6 +418,9 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
|
|
|
418
418
|
const container = $5vyXB$solidjsweb.createComponent((0, $93304d59a9747aa6$export$94026ee33dbabc26), {
|
|
419
419
|
get aspectRatio() {
|
|
420
420
|
return props.aspectRatio;
|
|
421
|
+
},
|
|
422
|
+
get ["class"]() {
|
|
423
|
+
return props.class;
|
|
421
424
|
}
|
|
422
425
|
});
|
|
423
426
|
const owner = $5vyXB$solidjs.getOwner();
|
package/server/latest/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/latest";
|
|
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.20";
|
|
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?: {
|
|
@@ -652,7 +655,7 @@ type ReplaceBaseCategoryDisplay<T> = T extends BaseCategoryDisplay ? BaseCategor
|
|
|
652
655
|
type _AddPageUrlToDisplay1<T extends any[]> = (T[number] & {
|
|
653
656
|
page_url: string;
|
|
654
657
|
})[];
|
|
655
|
-
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] };
|
|
656
659
|
type DepictAPIConstructorOptions<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = {
|
|
657
660
|
get_metadata?: () => Promise<{
|
|
658
661
|
[k: string]: string;
|
|
@@ -669,16 +672,16 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
|
|
|
669
672
|
page_url_creator: PageURLCreator<ModernDisplay, OutputDisplay> | undefined;
|
|
670
673
|
display_transformers: DisplayTransformers<ModernDisplay, OutputDisplay> | undefined;
|
|
671
674
|
constructor(options: DepictAPIConstructorOptions<InputDisplay, OutputDisplay>);
|
|
672
|
-
suggest(input_req:
|
|
675
|
+
suggest(input_req: SearchSuggestionsRequestV2): Promise<SearchSuggestionsResponseAfterURLCreator & {
|
|
673
676
|
failed?: true;
|
|
674
677
|
}>;
|
|
675
|
-
query(input_req:
|
|
678
|
+
query(input_req: SearchRequestV2): Promise<SearchResponseAfterURLCreator & {
|
|
676
679
|
failed?: true;
|
|
677
680
|
}>;
|
|
678
681
|
list(input_req: ProductListingRequestV2): Promise<ProductListingResponseAfterURLCreator & {
|
|
679
682
|
failed?: true;
|
|
680
683
|
}>;
|
|
681
|
-
get_recommended<T extends Display>(input_req:
|
|
684
|
+
get_recommended<T extends Display>(input_req: BaseSearchRequestV2): Promise<{
|
|
682
685
|
displays: T[];
|
|
683
686
|
} & {
|
|
684
687
|
failed?: true | undefined;
|
|
@@ -1141,4 +1144,4 @@ export const defaultCategoryTitlePlugin: ({
|
|
|
1141
1144
|
category_title_: import("solid-js").Accessor<string | undefined>;
|
|
1142
1145
|
product_count_: import("solid-js").JSX.Element;
|
|
1143
1146
|
}) => import("solid-js").JSX.Element;
|
|
1144
|
-
export type { SearchFilter } from "@depict-ai/types/api/
|
|
1147
|
+
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV2";
|