@depict-ai/ui 2.0.2 → 2.0.4
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 +19 -18
- package/ES10/index.d.ts +8 -2
- package/ES10/index.js +20 -20
- package/latest/index.cjs +18 -17
- package/latest/index.d.ts +8 -2
- package/latest/index.js +19 -19
- package/package.json +3 -3
- package/server/ES10/index.cjs +19 -18
- package/server/ES10/index.d.ts +8 -2
- package/server/ES10/index.js +20 -20
- package/server/latest/index.cjs +18 -17
- package/server/latest/index.d.ts +8 -2
- package/server/latest/index.js +19 -19
- package/locales/require.js +0 -1152
package/ES10/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var $52FdA$depictaiutilishared = require("@depict-ai/utilishared/ES10");
|
|
2
|
-
var $52FdA$solidjsweb = require("solid-js/web");
|
|
3
2
|
var $52FdA$solidjs = require("solid-js");
|
|
3
|
+
var $52FdA$solidjsweb = require("solid-js/web");
|
|
4
4
|
var $52FdA$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
5
5
|
var $52FdA$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
6
6
|
var $52FdA$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
@@ -16,6 +16,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
16
16
|
function $parcel$interopDefault(a) {
|
|
17
17
|
return a && a.__esModule ? a.default : a;
|
|
18
18
|
}
|
|
19
|
+
$parcel$export(module.exports, "make_accurate_size_accessor", () => $13671aa5e984acd9$export$9f191182275e9ef);
|
|
19
20
|
$parcel$export(module.exports, "RecommendationSlider", () => $2badc30d7c6610e1$export$9574e176201e5e8d);
|
|
20
21
|
$parcel$export(module.exports, "RecommendationGrid", () => $41227f10ad680afd$export$9756467d34d91cdb);
|
|
21
22
|
$parcel$export(module.exports, "ShopifyResponsiveImg", () => $858fdcf73148519f$export$6e5611bc7e57e477);
|
|
@@ -66,7 +67,23 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
66
67
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
67
68
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
68
69
|
/*! Depict.ai search and product listing SDK */
|
|
69
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
70
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.4";
|
|
71
|
+
|
|
72
|
+
/** @jsxImportSource solid-js */
|
|
73
|
+
|
|
74
|
+
function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
|
|
75
|
+
const [size, setSize] = $52FdA$solidjs.createSignal();
|
|
76
|
+
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => {
|
|
77
|
+
for (let j = 0; j < records.length; j++) {
|
|
78
|
+
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
79
|
+
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
80
|
+
setSize(width);
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
resizeObserver.observe(what_to_watch);
|
|
84
|
+
$52FdA$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
85
|
+
return size;
|
|
86
|
+
}
|
|
70
87
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
71
88
|
const cols_at_size = [];
|
|
72
89
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -2667,22 +2684,6 @@ function $9c1d49181fb3002a$var$expand_until_choice(data_structure) {
|
|
|
2667
2684
|
}
|
|
2668
2685
|
});
|
|
2669
2686
|
}
|
|
2670
|
-
|
|
2671
|
-
/** @jsxImportSource solid-js */
|
|
2672
|
-
|
|
2673
|
-
function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
|
|
2674
|
-
const [size, setSize] = $52FdA$solidjs.createSignal();
|
|
2675
|
-
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => {
|
|
2676
|
-
for (let j = 0; j < records.length; j++) {
|
|
2677
|
-
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
2678
|
-
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
2679
|
-
setSize(width);
|
|
2680
|
-
}
|
|
2681
|
-
}));
|
|
2682
|
-
resizeObserver.observe(what_to_watch);
|
|
2683
|
-
$52FdA$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
2684
|
-
return size;
|
|
2685
|
-
}
|
|
2686
2687
|
const $cd0e5524f9476f9b$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"></div>`, 2),
|
|
2687
2688
|
$cd0e5524f9476f9b$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<span class="count-wrapper"><span class="count"></span></span>`, 4),
|
|
2688
2689
|
$cd0e5524f9476f9b$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button><!#><!/><!#><!/></button>`, 6);
|
package/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "2.0.
|
|
10
|
+
export const version = "2.0.4";
|
|
11
|
+
/**
|
|
12
|
+
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
13
|
+
*/
|
|
14
|
+
export function make_accurate_size_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
|
|
11
15
|
export type SDKGridSpacing = string | {
|
|
12
16
|
horizontal: string;
|
|
13
17
|
vertical: string;
|
|
@@ -474,6 +478,7 @@ type RecsAPIWrapperOptions = {
|
|
|
474
478
|
userId?: string;
|
|
475
479
|
sessionId?: string;
|
|
476
480
|
headers?: HeadersInit;
|
|
481
|
+
metadata?: Record<string, any>;
|
|
477
482
|
} & ExclusiveId;
|
|
478
483
|
/**
|
|
479
484
|
* Fetches recommendations from Depict's API.
|
|
@@ -485,8 +490,9 @@ type RecsAPIWrapperOptions = {
|
|
|
485
490
|
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
486
491
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
487
492
|
* @param productIds When requesting recommendations that should take multiple products into account, i.e. the contents of the basket/cart, pass an array of product ids as `productIds`
|
|
488
|
-
* @param userId Optional unique identifier of a logged
|
|
493
|
+
* @param userId Optional unique identifier of a logged-in user. Should be persistent across devices and sessions.
|
|
489
494
|
* @param sessionId Optional unique identifer of the current session. Only necessary when performing server side requests to Depict.
|
|
495
|
+
* @param metadata Custom metadata to be sent with each request to the Depict API. Only necessary if specifically instructed by Depict.
|
|
490
496
|
* @param headers Optional headers to send to the Depict API. This could be authentication for example. 99% of integrations can leave this unset.
|
|
491
497
|
* When no id is provided (none out of `categoryId`, `productId` and `productIds`) general recommendations will be fetched. This is for, for example, the frontpage where generally popular products get returned.
|
|
492
498
|
*
|
package/ES10/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, catchify as $8tj43$catchify, slider_fractional_factory as $8tj43$slider_fractional_factory, 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, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, observer as $8tj43$observer, is_safari as $8tj43$is_safari, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, dlog as $8tj43$dlog, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, javascript_media_query as $8tj43$javascript_media_query, 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, dwarn as $8tj43$dwarn, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, use_href_accessor as $8tj43$use_href_accessor, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, 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 { createSignal as $8tj43$createSignal, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, createResource as $8tj43$createResource, Suspense as $8tj43$Suspense, Show as $8tj43$Show, createRenderEffect as $8tj43$createRenderEffect, createRoot as $8tj43$createRoot, For as $8tj43$For, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, createEffect as $8tj43$createEffect, untrack as $8tj43$untrack, createUniqueId as $8tj43$createUniqueId, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, on as $8tj43$on, batch as $8tj43$batch, createReaction as $8tj43$createReaction } from "solid-js";
|
|
2
3
|
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, createComponent as $8tj43$createComponent, mergeProps as $8tj43$mergeProps, isServer as $8tj43$isServer, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, addEventListener as $8tj43$addEventListener, className as $8tj43$className, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, effect as $8tj43$effect, classList as $8tj43$classList, setAttribute as $8tj43$setAttribute, getNextMarker as $8tj43$getNextMarker, style as $8tj43$style, Dynamic as $8tj43$Dynamic, use as $8tj43$use } from "solid-js/web";
|
|
3
|
-
import { createMemo as $8tj43$createMemo, createResource as $8tj43$createResource, Suspense as $8tj43$Suspense, Show as $8tj43$Show, createSignal as $8tj43$createSignal, createRenderEffect as $8tj43$createRenderEffect, createRoot as $8tj43$createRoot, onCleanup as $8tj43$onCleanup, For as $8tj43$For, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, createEffect as $8tj43$createEffect, untrack as $8tj43$untrack, createUniqueId as $8tj43$createUniqueId, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, on as $8tj43$on, batch as $8tj43$batch, createReaction as $8tj43$createReaction } from "solid-js";
|
|
4
4
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
5
5
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
6
6
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -8,7 +8,23 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.4";
|
|
12
|
+
|
|
13
|
+
/** @jsxImportSource solid-js */
|
|
14
|
+
|
|
15
|
+
function $0dc044cffe1e825b$export$9f191182275e9ef(what_to_watch) {
|
|
16
|
+
const [size, setSize] = $8tj43$createSignal();
|
|
17
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify(records => {
|
|
18
|
+
for (let j = 0; j < records.length; j++) {
|
|
19
|
+
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
20
|
+
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
21
|
+
setSize(width);
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
resizeObserver.observe(what_to_watch);
|
|
25
|
+
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
26
|
+
return size;
|
|
27
|
+
}
|
|
12
28
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
13
29
|
const cols_at_size = [];
|
|
14
30
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -2609,22 +2625,6 @@ function $0ae614c5c7babb43$var$expand_until_choice(data_structure) {
|
|
|
2609
2625
|
}
|
|
2610
2626
|
});
|
|
2611
2627
|
}
|
|
2612
|
-
|
|
2613
|
-
/** @jsxImportSource solid-js */
|
|
2614
|
-
|
|
2615
|
-
function $0dc044cffe1e825b$export$9f191182275e9ef(what_to_watch) {
|
|
2616
|
-
const [size, setSize] = $8tj43$createSignal();
|
|
2617
|
-
const resizeObserver = new ResizeObserver($8tj43$catchify(records => {
|
|
2618
|
-
for (let j = 0; j < records.length; j++) {
|
|
2619
|
-
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
2620
|
-
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
2621
|
-
setSize(width);
|
|
2622
|
-
}
|
|
2623
|
-
}));
|
|
2624
|
-
resizeObserver.observe(what_to_watch);
|
|
2625
|
-
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
2626
|
-
return size;
|
|
2627
|
-
}
|
|
2628
2628
|
const $830ea8efda59884e$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"></div>`, 2),
|
|
2629
2629
|
$830ea8efda59884e$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<span class="count-wrapper"><span class="count"></span></span>`, 4),
|
|
2630
2630
|
$830ea8efda59884e$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<button><!#><!/><!#><!/></button>`, 6);
|
|
@@ -11614,4 +11614,4 @@ const $d399250dfa491636$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
11614
11614
|
const $d399250dfa491636$export$864d304a0bc46829 = "2%";
|
|
11615
11615
|
const $d399250dfa491636$export$7bf543b9d9be2c22 = (0, $fa332ea03168857c$export$b91cec6bdc6b32a1);
|
|
11616
11616
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
11617
|
-
export { $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $5c5732ef44f05b26$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $96fd967c5b358ead$export$643598a327b5833e as get_categories, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $eb064bc3350276c1$export$316f6f283ae64765 as SearchField, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version };
|
|
11617
|
+
export { $0dc044cffe1e825b$export$9f191182275e9ef as make_accurate_size_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $5c5732ef44f05b26$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $96fd967c5b358ead$export$643598a327b5833e as get_categories, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $eb064bc3350276c1$export$316f6f283ae64765 as SearchField, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version };
|
package/latest/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var $gVhhF$depictaiutilishared = require("@depict-ai/utilishared/latest");
|
|
2
|
-
var $gVhhF$solidjsweb = require("solid-js/web");
|
|
3
2
|
var $gVhhF$solidjs = require("solid-js");
|
|
3
|
+
var $gVhhF$solidjsweb = require("solid-js/web");
|
|
4
4
|
require("../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {
|
|
@@ -10,6 +10,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
10
10
|
configurable: true
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
$parcel$export(module.exports, "make_accurate_size_accessor", () => $e5f442fb78c98741$export$9f191182275e9ef);
|
|
13
14
|
$parcel$export(module.exports, "RecommendationSlider", () => $72f96c4782db0b1b$export$9574e176201e5e8d);
|
|
14
15
|
$parcel$export(module.exports, "RecommendationGrid", () => $1f8dbf7e28b3eff2$export$9756467d34d91cdb);
|
|
15
16
|
$parcel$export(module.exports, "ShopifyResponsiveImg", () => $19950faaac026e09$export$6e5611bc7e57e477);
|
|
@@ -60,7 +61,22 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
60
61
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
61
62
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
62
63
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.
|
|
64
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.4";
|
|
65
|
+
|
|
66
|
+
/** @jsxImportSource solid-js */
|
|
67
|
+
|
|
68
|
+
function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
|
|
69
|
+
const [size, setSize] = $gVhhF$solidjs.createSignal();
|
|
70
|
+
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => {
|
|
71
|
+
for (let j = 0; j < records.length; j++) {
|
|
72
|
+
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
73
|
+
setSize(width);
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
resizeObserver.observe(what_to_watch);
|
|
77
|
+
$gVhhF$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
78
|
+
return size;
|
|
79
|
+
}
|
|
64
80
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
65
81
|
const cols_at_size = [];
|
|
66
82
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -2499,21 +2515,6 @@ function $3bdc00a1353c1150$var$expand_until_choice(data_structure) {
|
|
|
2499
2515
|
}
|
|
2500
2516
|
});
|
|
2501
2517
|
}
|
|
2502
|
-
|
|
2503
|
-
/** @jsxImportSource solid-js */
|
|
2504
|
-
|
|
2505
|
-
function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
|
|
2506
|
-
const [size, setSize] = $gVhhF$solidjs.createSignal();
|
|
2507
|
-
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => {
|
|
2508
|
-
for (let j = 0; j < records.length; j++) {
|
|
2509
|
-
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
2510
|
-
setSize(width);
|
|
2511
|
-
}
|
|
2512
|
-
}));
|
|
2513
|
-
resizeObserver.observe(what_to_watch);
|
|
2514
|
-
$gVhhF$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
2515
|
-
return size;
|
|
2516
|
-
}
|
|
2517
2518
|
const $0ef1681699140f1a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"></div>`, 2),
|
|
2518
2519
|
$0ef1681699140f1a$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<span class="count-wrapper"><span class="count"></span></span>`, 4),
|
|
2519
2520
|
$0ef1681699140f1a$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button><!#><!/><!#><!/></button>`, 6);
|
package/latest/index.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "2.0.
|
|
10
|
+
export const version = "2.0.4";
|
|
11
|
+
/**
|
|
12
|
+
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
13
|
+
*/
|
|
14
|
+
export function make_accurate_size_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
|
|
11
15
|
export type SDKGridSpacing = string | {
|
|
12
16
|
horizontal: string;
|
|
13
17
|
vertical: string;
|
|
@@ -474,6 +478,7 @@ type RecsAPIWrapperOptions = {
|
|
|
474
478
|
userId?: string;
|
|
475
479
|
sessionId?: string;
|
|
476
480
|
headers?: HeadersInit;
|
|
481
|
+
metadata?: Record<string, any>;
|
|
477
482
|
} & ExclusiveId;
|
|
478
483
|
/**
|
|
479
484
|
* Fetches recommendations from Depict's API.
|
|
@@ -485,8 +490,9 @@ type RecsAPIWrapperOptions = {
|
|
|
485
490
|
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
486
491
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
487
492
|
* @param productIds When requesting recommendations that should take multiple products into account, i.e. the contents of the basket/cart, pass an array of product ids as `productIds`
|
|
488
|
-
* @param userId Optional unique identifier of a logged
|
|
493
|
+
* @param userId Optional unique identifier of a logged-in user. Should be persistent across devices and sessions.
|
|
489
494
|
* @param sessionId Optional unique identifer of the current session. Only necessary when performing server side requests to Depict.
|
|
495
|
+
* @param metadata Custom metadata to be sent with each request to the Depict API. Only necessary if specifically instructed by Depict.
|
|
490
496
|
* @param headers Optional headers to send to the Depict API. This could be authentication for example. 99% of integrations can leave this unset.
|
|
491
497
|
* When no id is provided (none out of `categoryId`, `productId` and `productIds`) general recommendations will be fetched. This is for, for example, the frontpage where generally popular products get returned.
|
|
492
498
|
*
|
package/latest/index.js
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, catchify as $9HbP8$catchify, slider_fractional_factory as $9HbP8$slider_fractional_factory, 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, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, observer as $9HbP8$observer, is_safari as $9HbP8$is_safari, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, dlog as $9HbP8$dlog, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, javascript_media_query as $9HbP8$javascript_media_query, 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, dwarn as $9HbP8$dwarn, make_url_with_query_params as $9HbP8$make_url_with_query_params, edit_current_page_meta_tags as $9HbP8$edit_current_page_meta_tags, use_href_accessor as $9HbP8$use_href_accessor, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, 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 { createSignal as $9HbP8$createSignal, onCleanup as $9HbP8$onCleanup, createMemo as $9HbP8$createMemo, createResource as $9HbP8$createResource, Suspense as $9HbP8$Suspense, Show as $9HbP8$Show, createRenderEffect as $9HbP8$createRenderEffect, createRoot as $9HbP8$createRoot, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createEffect as $9HbP8$createEffect, untrack as $9HbP8$untrack, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, Index as $9HbP8$Index, on as $9HbP8$on, batch as $9HbP8$batch, createReaction as $9HbP8$createReaction } from "solid-js";
|
|
2
3
|
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps, isServer as $9HbP8$isServer, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, addEventListener as $9HbP8$addEventListener, className as $9HbP8$className, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, effect as $9HbP8$effect, classList as $9HbP8$classList, setAttribute as $9HbP8$setAttribute, getNextMarker as $9HbP8$getNextMarker, style as $9HbP8$style, Dynamic as $9HbP8$Dynamic, use as $9HbP8$use } from "solid-js/web";
|
|
3
|
-
import { createMemo as $9HbP8$createMemo, createResource as $9HbP8$createResource, Suspense as $9HbP8$Suspense, Show as $9HbP8$Show, createSignal as $9HbP8$createSignal, createRenderEffect as $9HbP8$createRenderEffect, createRoot as $9HbP8$createRoot, onCleanup as $9HbP8$onCleanup, For as $9HbP8$For, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, createEffect as $9HbP8$createEffect, untrack as $9HbP8$untrack, createUniqueId as $9HbP8$createUniqueId, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, Index as $9HbP8$Index, on as $9HbP8$on, batch as $9HbP8$batch, createReaction as $9HbP8$createReaction } from "solid-js";
|
|
4
4
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.4";
|
|
9
|
+
|
|
10
|
+
/** @jsxImportSource solid-js */
|
|
11
|
+
|
|
12
|
+
function $0fdb37d8ddabef25$export$9f191182275e9ef(what_to_watch) {
|
|
13
|
+
const [size, setSize] = $9HbP8$createSignal();
|
|
14
|
+
const resizeObserver = new ResizeObserver($9HbP8$catchify(records => {
|
|
15
|
+
for (let j = 0; j < records.length; j++) {
|
|
16
|
+
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
17
|
+
setSize(width);
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
resizeObserver.observe(what_to_watch);
|
|
21
|
+
$9HbP8$onCleanup(() => resizeObserver.disconnect());
|
|
22
|
+
return size;
|
|
23
|
+
}
|
|
9
24
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
10
25
|
const cols_at_size = [];
|
|
11
26
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -2444,21 +2459,6 @@ function $1c8cac76cb67e9af$var$expand_until_choice(data_structure) {
|
|
|
2444
2459
|
}
|
|
2445
2460
|
});
|
|
2446
2461
|
}
|
|
2447
|
-
|
|
2448
|
-
/** @jsxImportSource solid-js */
|
|
2449
|
-
|
|
2450
|
-
function $0fdb37d8ddabef25$export$9f191182275e9ef(what_to_watch) {
|
|
2451
|
-
const [size, setSize] = $9HbP8$createSignal();
|
|
2452
|
-
const resizeObserver = new ResizeObserver($9HbP8$catchify(records => {
|
|
2453
|
-
for (let j = 0; j < records.length; j++) {
|
|
2454
|
-
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
2455
|
-
setSize(width);
|
|
2456
|
-
}
|
|
2457
|
-
}));
|
|
2458
|
-
resizeObserver.observe(what_to_watch);
|
|
2459
|
-
$9HbP8$onCleanup(() => resizeObserver.disconnect());
|
|
2460
|
-
return size;
|
|
2461
|
-
}
|
|
2462
2462
|
const $93716a9ad0dea854$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0"></div>`, 2),
|
|
2463
2463
|
$93716a9ad0dea854$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<span class="count-wrapper"><span class="count"></span></span>`, 4),
|
|
2464
2464
|
$93716a9ad0dea854$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<button><!#><!/><!#><!/></button>`, 6);
|
|
@@ -10698,4 +10698,4 @@ const $4690a06c8489dcd0$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
10698
10698
|
const $4690a06c8489dcd0$export$864d304a0bc46829 = "2%";
|
|
10699
10699
|
const $4690a06c8489dcd0$export$7bf543b9d9be2c22 = (0, $e4615ecd1849548f$export$b91cec6bdc6b32a1);
|
|
10700
10700
|
$9HbP8$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
10701
|
-
export { $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|
|
10701
|
+
export { $0fdb37d8ddabef25$export$9f191182275e9ef as make_accurate_size_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
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",
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^1.2.
|
|
239
|
+
"@depict-ai/plp-styling": "^1.2.4",
|
|
240
240
|
"@depict-ai/types": "^1.0.39",
|
|
241
|
-
"@depict-ai/utilishared": "^1.0.
|
|
241
|
+
"@depict-ai/utilishared": "^1.0.42",
|
|
242
242
|
"solid-js": "^1.7.3"
|
|
243
243
|
},
|
|
244
244
|
"type": "module",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var $3hooq$depictaiutilishared = require("@depict-ai/utilishared/ES10");
|
|
2
|
-
var $3hooq$solidjsweb = require("solid-js/web");
|
|
3
2
|
var $3hooq$solidjs = require("solid-js");
|
|
3
|
+
var $3hooq$solidjsweb = require("solid-js/web");
|
|
4
4
|
var $3hooq$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
5
5
|
var $3hooq$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
6
6
|
var $3hooq$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
@@ -16,6 +16,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
16
16
|
function $parcel$interopDefault(a) {
|
|
17
17
|
return a && a.__esModule ? a.default : a;
|
|
18
18
|
}
|
|
19
|
+
$parcel$export(module.exports, "make_accurate_size_accessor", () => $13671aa5e984acd9$export$9f191182275e9ef);
|
|
19
20
|
$parcel$export(module.exports, "RecommendationSlider", () => $2badc30d7c6610e1$export$9574e176201e5e8d);
|
|
20
21
|
$parcel$export(module.exports, "RecommendationGrid", () => $41227f10ad680afd$export$9756467d34d91cdb);
|
|
21
22
|
$parcel$export(module.exports, "ShopifyResponsiveImg", () => $858fdcf73148519f$export$6e5611bc7e57e477);
|
|
@@ -66,7 +67,23 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
66
67
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
67
68
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
68
69
|
/*! Depict.ai search and product listing SDK */
|
|
69
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
70
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.4";
|
|
71
|
+
|
|
72
|
+
/** @jsxImportSource solid-js */
|
|
73
|
+
|
|
74
|
+
function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
|
|
75
|
+
const [size, setSize] = $3hooq$solidjs.createSignal();
|
|
76
|
+
const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => {
|
|
77
|
+
for (let j = 0; j < records.length; j++) {
|
|
78
|
+
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
79
|
+
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
80
|
+
setSize(width);
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
resizeObserver.observe(what_to_watch);
|
|
84
|
+
$3hooq$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
85
|
+
return size;
|
|
86
|
+
}
|
|
70
87
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
71
88
|
const cols_at_size = [];
|
|
72
89
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1981,22 +1998,6 @@ function $9c1d49181fb3002a$var$expand_until_choice(data_structure) {
|
|
|
1981
1998
|
}
|
|
1982
1999
|
});
|
|
1983
2000
|
}
|
|
1984
|
-
|
|
1985
|
-
/** @jsxImportSource solid-js */
|
|
1986
|
-
|
|
1987
|
-
function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
|
|
1988
|
-
const [size, setSize] = $3hooq$solidjs.createSignal();
|
|
1989
|
-
const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => {
|
|
1990
|
-
for (let j = 0; j < records.length; j++) {
|
|
1991
|
-
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
1992
|
-
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
1993
|
-
setSize(width);
|
|
1994
|
-
}
|
|
1995
|
-
}));
|
|
1996
|
-
resizeObserver.observe(what_to_watch);
|
|
1997
|
-
$3hooq$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
1998
|
-
return size;
|
|
1999
|
-
}
|
|
2000
2001
|
const $cd0e5524f9476f9b$var$_tmpl$ = ["<div", ' class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0">', "</div>"],
|
|
2001
2002
|
$cd0e5524f9476f9b$var$_tmpl$2 = ["<span", ' class="count-wrapper"><span class="count">', "</span></span>"];
|
|
2002
2003
|
const $cd0e5524f9476f9b$var$gap_px = 5;
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "2.0.
|
|
10
|
+
export const version = "2.0.4";
|
|
11
|
+
/**
|
|
12
|
+
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
13
|
+
*/
|
|
14
|
+
export function make_accurate_size_accessor(what_to_watch: HTMLElement): import("solid-js").Accessor<number | undefined>;
|
|
11
15
|
export type SDKGridSpacing = string | {
|
|
12
16
|
horizontal: string;
|
|
13
17
|
vertical: string;
|
|
@@ -474,6 +478,7 @@ type RecsAPIWrapperOptions = {
|
|
|
474
478
|
userId?: string;
|
|
475
479
|
sessionId?: string;
|
|
476
480
|
headers?: HeadersInit;
|
|
481
|
+
metadata?: Record<string, any>;
|
|
477
482
|
} & ExclusiveId;
|
|
478
483
|
/**
|
|
479
484
|
* Fetches recommendations from Depict's API.
|
|
@@ -485,8 +490,9 @@ type RecsAPIWrapperOptions = {
|
|
|
485
490
|
* @param categoryId When requesting recommendations for a category page, pass the id of the category page as `categoryId`.
|
|
486
491
|
* @param productId When requesting recommendations for a single product, e.g. on a product detail page, pass the id of the product as `productId`.
|
|
487
492
|
* @param productIds When requesting recommendations that should take multiple products into account, i.e. the contents of the basket/cart, pass an array of product ids as `productIds`
|
|
488
|
-
* @param userId Optional unique identifier of a logged
|
|
493
|
+
* @param userId Optional unique identifier of a logged-in user. Should be persistent across devices and sessions.
|
|
489
494
|
* @param sessionId Optional unique identifer of the current session. Only necessary when performing server side requests to Depict.
|
|
495
|
+
* @param metadata Custom metadata to be sent with each request to the Depict API. Only necessary if specifically instructed by Depict.
|
|
490
496
|
* @param headers Optional headers to send to the Depict API. This could be authentication for example. 99% of integrations can leave this unset.
|
|
491
497
|
* When no id is provided (none out of `categoryId`, `productId` and `productIds`) general recommendations will be fetched. This is for, for example, the frontpage where generally popular products get returned.
|
|
492
498
|
*
|
package/server/ES10/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, catchify as $b8hua$catchify, slider_fractional_factory as $b8hua$slider_fractional_factory, 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, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, observer as $b8hua$observer, is_safari as $b8hua$is_safari, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, dlog as $b8hua$dlog, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, javascript_media_query as $b8hua$javascript_media_query, 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, dwarn as $b8hua$dwarn, sort_obj as $b8hua$sort_obj, edit_current_page_meta_tags as $b8hua$edit_current_page_meta_tags, use_href_accessor as $b8hua$use_href_accessor, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, 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 { createSignal as $b8hua$createSignal, onCleanup as $b8hua$onCleanup, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, Show as $b8hua$Show, createRenderEffect as $b8hua$createRenderEffect, createRoot as $b8hua$createRoot, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createEffect as $b8hua$createEffect, untrack as $b8hua$untrack, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, Index as $b8hua$Index, on as $b8hua$on, batch as $b8hua$batch, createReaction as $b8hua$createReaction } from "solid-js";
|
|
2
3
|
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, ssrStyle as $b8hua$ssrStyle, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
|
-
import { createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, Show as $b8hua$Show, createSignal as $b8hua$createSignal, createRenderEffect as $b8hua$createRenderEffect, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createEffect as $b8hua$createEffect, untrack as $b8hua$untrack, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, Index as $b8hua$Index, on as $b8hua$on, batch as $b8hua$batch, createReaction as $b8hua$createReaction } from "solid-js";
|
|
4
4
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
5
5
|
import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
6
6
|
import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -8,7 +8,23 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.4";
|
|
12
|
+
|
|
13
|
+
/** @jsxImportSource solid-js */
|
|
14
|
+
|
|
15
|
+
function $0dc044cffe1e825b$export$9f191182275e9ef(what_to_watch) {
|
|
16
|
+
const [size, setSize] = $b8hua$createSignal();
|
|
17
|
+
const resizeObserver = new ResizeObserver($b8hua$catchify(records => {
|
|
18
|
+
for (let j = 0; j < records.length; j++) {
|
|
19
|
+
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
20
|
+
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
21
|
+
setSize(width);
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
resizeObserver.observe(what_to_watch);
|
|
25
|
+
$b8hua$onCleanup(() => resizeObserver.disconnect());
|
|
26
|
+
return size;
|
|
27
|
+
}
|
|
12
28
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
13
29
|
const cols_at_size = [];
|
|
14
30
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1923,22 +1939,6 @@ function $0ae614c5c7babb43$var$expand_until_choice(data_structure) {
|
|
|
1923
1939
|
}
|
|
1924
1940
|
});
|
|
1925
1941
|
}
|
|
1926
|
-
|
|
1927
|
-
/** @jsxImportSource solid-js */
|
|
1928
|
-
|
|
1929
|
-
function $0dc044cffe1e825b$export$9f191182275e9ef(what_to_watch) {
|
|
1930
|
-
const [size, setSize] = $b8hua$createSignal();
|
|
1931
|
-
const resizeObserver = new ResizeObserver($b8hua$catchify(records => {
|
|
1932
|
-
for (let j = 0; j < records.length; j++) {
|
|
1933
|
-
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
1934
|
-
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
1935
|
-
setSize(width);
|
|
1936
|
-
}
|
|
1937
|
-
}));
|
|
1938
|
-
resizeObserver.observe(what_to_watch);
|
|
1939
|
-
$b8hua$onCleanup(() => resizeObserver.disconnect());
|
|
1940
|
-
return size;
|
|
1941
|
-
}
|
|
1942
1942
|
const $830ea8efda59884e$var$_tmpl$ = ["<div", ' class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0">', "</div>"],
|
|
1943
1943
|
$830ea8efda59884e$var$_tmpl$2 = ["<span", ' class="count-wrapper"><span class="count">', "</span></span>"];
|
|
1944
1944
|
const $830ea8efda59884e$var$gap_px = 5;
|
|
@@ -9664,4 +9664,4 @@ const $d399250dfa491636$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
9664
9664
|
const $d399250dfa491636$export$864d304a0bc46829 = "2%";
|
|
9665
9665
|
const $d399250dfa491636$export$7bf543b9d9be2c22 = (0, $fa332ea03168857c$export$b91cec6bdc6b32a1);
|
|
9666
9666
|
$b8hua$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
9667
|
-
export { $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $5c5732ef44f05b26$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $96fd967c5b358ead$export$643598a327b5833e as get_categories, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $eb064bc3350276c1$export$316f6f283ae64765 as SearchField, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version };
|
|
9667
|
+
export { $0dc044cffe1e825b$export$9f191182275e9ef as make_accurate_size_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $5c5732ef44f05b26$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $96fd967c5b358ead$export$643598a327b5833e as get_categories, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $eb064bc3350276c1$export$316f6f283ae64765 as SearchField, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version };
|
package/server/latest/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var $5vyXB$depictaiutilishared = require("@depict-ai/utilishared/latest");
|
|
2
|
-
var $5vyXB$solidjsweb = require("solid-js/web");
|
|
3
2
|
var $5vyXB$solidjs = require("solid-js");
|
|
3
|
+
var $5vyXB$solidjsweb = require("solid-js/web");
|
|
4
4
|
require("../../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {
|
|
@@ -10,6 +10,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
10
10
|
configurable: true
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
$parcel$export(module.exports, "make_accurate_size_accessor", () => $e5f442fb78c98741$export$9f191182275e9ef);
|
|
13
14
|
$parcel$export(module.exports, "RecommendationSlider", () => $72f96c4782db0b1b$export$9574e176201e5e8d);
|
|
14
15
|
$parcel$export(module.exports, "RecommendationGrid", () => $1f8dbf7e28b3eff2$export$9756467d34d91cdb);
|
|
15
16
|
$parcel$export(module.exports, "ShopifyResponsiveImg", () => $19950faaac026e09$export$6e5611bc7e57e477);
|
|
@@ -60,7 +61,22 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
60
61
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
61
62
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
62
63
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.
|
|
64
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.4";
|
|
65
|
+
|
|
66
|
+
/** @jsxImportSource solid-js */
|
|
67
|
+
|
|
68
|
+
function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
|
|
69
|
+
const [size, setSize] = $5vyXB$solidjs.createSignal();
|
|
70
|
+
const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => {
|
|
71
|
+
for (let j = 0; j < records.length; j++) {
|
|
72
|
+
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
73
|
+
setSize(width);
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
resizeObserver.observe(what_to_watch);
|
|
77
|
+
$5vyXB$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
78
|
+
return size;
|
|
79
|
+
}
|
|
64
80
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
65
81
|
const cols_at_size = [];
|
|
66
82
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -1841,21 +1857,6 @@ function $3bdc00a1353c1150$var$expand_until_choice(data_structure) {
|
|
|
1841
1857
|
}
|
|
1842
1858
|
});
|
|
1843
1859
|
}
|
|
1844
|
-
|
|
1845
|
-
/** @jsxImportSource solid-js */
|
|
1846
|
-
|
|
1847
|
-
function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
|
|
1848
|
-
const [size, setSize] = $5vyXB$solidjs.createSignal();
|
|
1849
|
-
const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => {
|
|
1850
|
-
for (let j = 0; j < records.length; j++) {
|
|
1851
|
-
const width = records[j].borderBoxSize?.[0]?.inlineSize ?? what_to_watch.getBoundingClientRect().width;
|
|
1852
|
-
setSize(width);
|
|
1853
|
-
}
|
|
1854
|
-
}));
|
|
1855
|
-
resizeObserver.observe(what_to_watch);
|
|
1856
|
-
$5vyXB$solidjs.onCleanup(() => resizeObserver.disconnect());
|
|
1857
|
-
return size;
|
|
1858
|
-
}
|
|
1859
1860
|
const $0ef1681699140f1a$var$_tmpl$ = ["<div", ' class="checkbox-grid" style="position:absolute;z-index:-1;pointer-events:none;opacity:0">', "</div>"],
|
|
1860
1861
|
$0ef1681699140f1a$var$_tmpl$2 = ["<span", ' class="count-wrapper"><span class="count">', "</span></span>"];
|
|
1861
1862
|
const $0ef1681699140f1a$var$gap_px = 5;
|