@depict-ai/ui 4.7.35 → 4.8.1
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 +148 -92
- package/ES10/index.d.ts +61 -61
- package/ES10/index.js +149 -92
- package/latest/index.cjs +142 -86
- package/latest/index.d.ts +61 -61
- package/latest/index.js +143 -86
- package/package.json +2 -2
- package/server/ES10/index.cjs +135 -73
- package/server/ES10/index.d.ts +61 -61
- package/server/ES10/index.js +136 -73
- package/server/latest/index.cjs +129 -67
- package/server/latest/index.d.ts +61 -61
- package/server/latest/index.js +130 -67
package/server/ES10/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { add_to_version_info as $b8hua$add_to_version_info, queueMacroTask as $b8hua$queueMacroTask, catchify as $b8hua$catchify, findMostFrequentItem as $b8hua$findMostFrequentItem, dwarn as $b8hua$dwarn, observer as $b8hua$observer, layout_media_query_header as $b8hua$layout_media_query_header, javascript_media_query as $b8hua$javascript_media_query, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, dlog as $b8hua$dlog1, camelCasifyObject as $b8hua$camelCasifyObject, useExpandingContainer as $b8hua$useExpandingContainer, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, 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, report as $b8hua$report, standard_price_format as $b8hua$standard_price_format, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ContainedImage as $b8hua$ContainedImage, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, 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, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
|
-
import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createMemo as $b8hua$createMemo, splitProps as $b8hua$splitProps, mergeProps as $b8hua$mergeProps1, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Show as $b8hua$Show, batch as $b8hua$batch, createComputed as $b8hua$createComputed, mapArray as $b8hua$mapArray, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, createRoot as $b8hua$createRoot, For as $b8hua$For, Index as $b8hua$Index, createUniqueId as $b8hua$createUniqueId, ErrorBoundary as $b8hua$ErrorBoundary, on as $b8hua$on, createSelector as $b8hua$createSelector, children as $b8hua$children, createReaction as $b8hua$createReaction } from "solid-js";
|
|
3
|
+
import { createSignal as $b8hua$createSignal, getOwner as $b8hua$getOwner, createEffect as $b8hua$createEffect, runWithOwner as $b8hua$runWithOwner, onCleanup as $b8hua$onCleanup, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createMemo as $b8hua$createMemo, splitProps as $b8hua$splitProps, mergeProps as $b8hua$mergeProps1, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Show as $b8hua$Show, batch as $b8hua$batch, createComputed as $b8hua$createComputed, mapArray as $b8hua$mapArray, createResource as $b8hua$createResource, Suspense as $b8hua$Suspense, createRoot as $b8hua$createRoot, For as $b8hua$For, Index as $b8hua$Index, createUniqueId as $b8hua$createUniqueId, ErrorBoundary as $b8hua$ErrorBoundary, on as $b8hua$on, createSelector as $b8hua$createSelector, children as $b8hua$children, createReaction as $b8hua$createReaction, Switch as $b8hua$Switch, Match as $b8hua$Match } from "solid-js";
|
|
4
4
|
import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from "solid-js/store";
|
|
5
5
|
import { dlog as $b8hua$dlog, catchify as $b8hua$catchify1, ListenableSet as $b8hua$ListenableSet, use_href_accessor as $b8hua$use_href_accessor1, queueMacroTask as $b8hua$queueMacroTask1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
6
6
|
import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -10,7 +10,14 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.1";
|
|
14
|
+
|
|
15
|
+
// Value first so shopify merchants can set (extra) display transformers in the shopify app
|
|
16
|
+
// Calling these functions normally doesn't do anything, but our shopify app respects them
|
|
17
|
+
// Them being here is value first too because this can be easily imported in the product card editor
|
|
18
|
+
let $80c7883e020be192$var$extraDisplayTransformers;
|
|
19
|
+
const $80c7883e020be192$export$b2d94be4f02525b2 = () => $80c7883e020be192$var$extraDisplayTransformers;
|
|
20
|
+
const $80c7883e020be192$export$f98b8d5ea7207a1 = displayTransformers => $80c7883e020be192$var$extraDisplayTransformers = displayTransformers;
|
|
14
21
|
const $5441862cd2f5e111$var$ListingContext = /*@__PURE__*/$b8hua$createContext();
|
|
15
22
|
function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
16
23
|
const our_object = {};
|
|
@@ -77,8 +84,12 @@ const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingCo
|
|
|
77
84
|
function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
78
85
|
const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
|
|
79
86
|
const [ourRatioKeyed, setOurRatioKeyed] = $b8hua$createSignal();
|
|
87
|
+
const [rAFSinceReturned, setRAFSinceReturned] = $b8hua$createSignal(false);
|
|
80
88
|
const sizeToUse = $b8hua$createMemo(() => {
|
|
81
89
|
var _props$sizeHeight;
|
|
90
|
+
// We first put the images into the DOM after they have been decoded. We can only get the correct object-fit value after the image is in the DOM.
|
|
91
|
+
// To avoid using an observer for knowing when the image is in the DOM (one of the most CPU intensive things when we did lighthouse optimisation) we just re-check an animationframe after we told <Show> to show the image, which seems to work reliably
|
|
92
|
+
rAFSinceReturned();
|
|
82
93
|
// props.size could be a getter that expects a cleanup so get it in this memo instead of where we set img.sizes (also we need to multiply, and it's good with some diffing here so people calling the comp don't have to)
|
|
83
94
|
const incomingSize = props.size();
|
|
84
95
|
const ratio = ourRatioKeyed();
|
|
@@ -237,6 +248,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
237
248
|
hasDecodedFastPath = true;
|
|
238
249
|
});
|
|
239
250
|
});
|
|
251
|
+
$b8hua$createEffect(() => hasDecoded() && requestAnimationFrame($b8hua$catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
240
252
|
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
241
253
|
get when() {
|
|
242
254
|
return hasDecoded();
|
|
@@ -438,13 +450,6 @@ function $98688279b9059f50$export$140423fa4bfb6d63(props) {
|
|
|
438
450
|
customUrls: $98688279b9059f50$var$customUrls
|
|
439
451
|
}));
|
|
440
452
|
}
|
|
441
|
-
|
|
442
|
-
// Value first so shopify merchants can set (extra) display transformers in the shopify app
|
|
443
|
-
// Calling these functions normally doesn't do anything, but our shopify app respects them
|
|
444
|
-
// Them being here is value first too because this can be easily imported in the product card editor
|
|
445
|
-
let $80c7883e020be192$var$extraDisplayTransformers;
|
|
446
|
-
const $80c7883e020be192$export$b2d94be4f02525b2 = () => $80c7883e020be192$var$extraDisplayTransformers;
|
|
447
|
-
const $80c7883e020be192$export$f98b8d5ea7207a1 = displayTransformers => $80c7883e020be192$var$extraDisplayTransformers = displayTransformers;
|
|
448
453
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
449
454
|
const signal = $b8hua$createSignal(false);
|
|
450
455
|
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
@@ -8158,7 +8163,8 @@ function $bc811d9630f9579b$export$9862539c89138352(_ref) {
|
|
|
8158
8163
|
let {
|
|
8159
8164
|
get_default_values_: get_default_values_,
|
|
8160
8165
|
router_: router_,
|
|
8161
|
-
prefix_: prefix_
|
|
8166
|
+
prefix_: prefix_,
|
|
8167
|
+
preserveKeys_: preserveKeys_
|
|
8162
8168
|
} = _ref;
|
|
8163
8169
|
const get_prefixed_default_values_ = () => {
|
|
8164
8170
|
const default_values = get_default_values_();
|
|
@@ -8168,9 +8174,11 @@ function $bc811d9630f9579b$export$9862539c89138352(_ref) {
|
|
|
8168
8174
|
}));
|
|
8169
8175
|
};
|
|
8170
8176
|
const prefixed_state = $972f6bce0f9d61be$export$e183a13865960371(get_prefixed_default_values_(), router_);
|
|
8177
|
+
const prefixedPreserveKeys = preserveKeys_ === null || preserveKeys_ === void 0 ? void 0 : preserveKeys_.map(key => prefix_ + key);
|
|
8171
8178
|
const reset_state = () => {
|
|
8172
8179
|
const new_defaults = get_prefixed_default_values_();
|
|
8173
8180
|
for (const key in prefixed_state) {
|
|
8181
|
+
if (prefixedPreserveKeys !== null && prefixedPreserveKeys !== void 0 && prefixedPreserveKeys.includes(key)) continue;
|
|
8174
8182
|
const new_value = new_defaults[key];
|
|
8175
8183
|
prefixed_state[key][1](new_value);
|
|
8176
8184
|
}
|
|
@@ -8905,8 +8913,13 @@ class $f5f54892fd0c7d9f$export$f34314aa9505732e {
|
|
|
8905
8913
|
local_filter_cache: [],
|
|
8906
8914
|
expanded_hierarchical_filters: [],
|
|
8907
8915
|
scroll_restoration_data: [],
|
|
8908
|
-
history_content_blocks:
|
|
8916
|
+
history_content_blocks: {
|
|
8917
|
+
blocks: [],
|
|
8918
|
+
aspectRatios: {}
|
|
8919
|
+
}
|
|
8909
8920
|
}),
|
|
8921
|
+
// Don't reset content block stuff when leaving category page as we need it for scroll restoration, same with scroll restoration data (actually a bit unsure if this is needed, I think it depends on if someone cleans up our elements before the location changes or after, and maybe some of the test flakyness we have seen is due to this not existing before?)
|
|
8922
|
+
preserveKeys_: ["history_content_blocks", "scroll_restoration_data"],
|
|
8910
8923
|
router_: $b8hua$babelruntimehelpersclassPrivateFieldGet(this, $f5f54892fd0c7d9f$var$_router),
|
|
8911
8924
|
prefix_: "category" + unique_instance_key_for_state + "_"
|
|
8912
8925
|
});
|
|
@@ -10041,8 +10054,15 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
10041
10054
|
return for_id === id_currently_querying_for_();
|
|
10042
10055
|
})) === null || _get_scroll_restorati2 === void 0 ? void 0 : _get_scroll_restorati2.min_results_loaded) !== null && _get_scroll_restorati !== void 0 ? _get_scroll_restorati : min_products_to_fetch_);
|
|
10043
10056
|
});
|
|
10044
|
-
const
|
|
10045
|
-
|
|
10057
|
+
const layout = $b8hua$createMemo(() => {
|
|
10058
|
+
const incoming_layout = layout_options_().layout;
|
|
10059
|
+
if (incoming_layout === "slider-without-filters") return "slider";
|
|
10060
|
+
return incoming_layout || "grid";
|
|
10061
|
+
});
|
|
10062
|
+
const doesnt_have_content_blocks = $b8hua$createMemo(() => !content_blocks_by_row_() || layout() !== "grid");
|
|
10063
|
+
const content_blocks_ = $b8hua$createMemo(() => doesnt_have_content_blocks() ?
|
|
10064
|
+
// This bailing here is to not use proxy/stores and retain old browser compatibility when no content blocks are present
|
|
10065
|
+
() => [] : $ff7feae4dddd6073$export$791ef57e62e21c3f({
|
|
10046
10066
|
content_blocks_: content_blocks_by_row_,
|
|
10047
10067
|
cols_at_size_: modified_cols_at_size,
|
|
10048
10068
|
set_top_row_shortened_by_: set_top_row_shortened_by_
|
|
@@ -10054,11 +10074,6 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
10054
10074
|
num_placeholders_: num_placeholders_
|
|
10055
10075
|
});
|
|
10056
10076
|
});
|
|
10057
|
-
const layout = $b8hua$createMemo(() => {
|
|
10058
|
-
const incoming_layout = layout_options_().layout;
|
|
10059
|
-
if (incoming_layout === "slider-without-filters") return "slider";
|
|
10060
|
-
return incoming_layout || "grid";
|
|
10061
|
-
});
|
|
10062
10077
|
const [get_suspense_is_blocked, set_suspense_is_blocked] = $b8hua$createSignal(false);
|
|
10063
10078
|
const block_suspense_if_needed = () => {
|
|
10064
10079
|
if (!is_just_after_plp_results_update) return;
|
|
@@ -10081,7 +10096,6 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
10081
10096
|
}, {
|
|
10082
10097
|
defer: true
|
|
10083
10098
|
}));
|
|
10084
|
-
$b8hua$createEffect(() => layout() !== "grid" && !doesnt_have_content_blocks() && $b8hua$dwarn("Slider layout doesn't support content blocks"));
|
|
10085
10099
|
/*
|
|
10086
10100
|
This suspense ensures that if someone has async templates, we still show placeholders until the product cards actually have finished rendering (automagically since they're createResource's)
|
|
10087
10101
|
We're creating it outside the <Show> so that we can benefit from <For>'s optimisation between changing results
|
|
@@ -13224,76 +13238,125 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
13224
13238
|
});
|
|
13225
13239
|
tracking_function_for_plp_results(plp_results_);
|
|
13226
13240
|
}
|
|
13227
|
-
var $3b772ef9a35560fe$var$_tmpl$ = ["<
|
|
13241
|
+
var $3b772ef9a35560fe$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop class="d-standard-content"></video>'];
|
|
13228
13242
|
function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
13229
13243
|
let {
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
},
|
|
13237
|
-
router_: router_
|
|
13244
|
+
link_: link_,
|
|
13245
|
+
type_: type_,
|
|
13246
|
+
router_: router_,
|
|
13247
|
+
setAspectRatioWas_: setAspectRatioWas_,
|
|
13248
|
+
mediaUrl_: mediaUrl_,
|
|
13249
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
13238
13250
|
} = _ref;
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
}
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13251
|
+
const [wrapperSize, setWrapperSize] = $b8hua$createSignal();
|
|
13252
|
+
const isImage = type_ === "image";
|
|
13253
|
+
return $b8hua$createComponent((0, $b8hua$Dynamic), $b8hua$mergeProps({
|
|
13254
|
+
component: link_ ? "a" : "div",
|
|
13255
|
+
"class": "d-standard-content-wrapper",
|
|
13256
|
+
get style() {
|
|
13257
|
+
return aspectRatioWhenAloneInRow_() ? "--media-aspect-ratio: ".concat(aspectRatioWhenAloneInRow_()) : "";
|
|
13258
|
+
},
|
|
13259
|
+
get onClick() {
|
|
13260
|
+
return $b8hua$catchify1(ev => link_ && router_.navigate_.go_to_({
|
|
13261
|
+
new_url_: link_,
|
|
13262
|
+
is_replace_: false,
|
|
13263
|
+
event_: ev
|
|
13264
|
+
}));
|
|
13265
|
+
}
|
|
13266
|
+
}, link_ && {
|
|
13267
|
+
href: link_
|
|
13268
|
+
}, {
|
|
13269
|
+
get children() {
|
|
13270
|
+
return $b8hua$createComponent((0, $b8hua$Switch), {
|
|
13271
|
+
get children() {
|
|
13272
|
+
return [$b8hua$createComponent((0, $b8hua$Match), {
|
|
13273
|
+
when: isImage,
|
|
13274
|
+
get children() {
|
|
13275
|
+
return $b8hua$createComponent((0, $98688279b9059f50$export$140423fa4bfb6d63), {
|
|
13276
|
+
size: () => {
|
|
13277
|
+
var _wrapperSize, _wrapperSize$;
|
|
13278
|
+
return ((_wrapperSize = wrapperSize()) === null || _wrapperSize === void 0 ? void 0 : (_wrapperSize$ = _wrapperSize[0]) === null || _wrapperSize$ === void 0 ? void 0 : _wrapperSize$.call(_wrapperSize)) || 0;
|
|
13279
|
+
},
|
|
13280
|
+
sizeHeight: () => {
|
|
13281
|
+
var _wrapperSize2, _wrapperSize2$;
|
|
13282
|
+
return ((_wrapperSize2 = wrapperSize()) === null || _wrapperSize2 === void 0 ? void 0 : (_wrapperSize2$ = _wrapperSize2[1]) === null || _wrapperSize2$ === void 0 ? void 0 : _wrapperSize2$.call(_wrapperSize2)) || 0;
|
|
13283
|
+
},
|
|
13284
|
+
src: mediaUrl_,
|
|
13285
|
+
"class": "d-standard-content"
|
|
13286
|
+
});
|
|
13287
|
+
}
|
|
13288
|
+
}), $b8hua$createComponent((0, $b8hua$Match), {
|
|
13289
|
+
when: type_ === "video",
|
|
13290
|
+
get children() {
|
|
13291
|
+
return $b8hua$ssr($3b772ef9a35560fe$var$_tmpl$, $b8hua$ssrHydrationKey() + $b8hua$ssrAttribute("src", $b8hua$escape(mediaUrl_, true), false));
|
|
13292
|
+
}
|
|
13293
|
+
})];
|
|
13294
|
+
}
|
|
13295
|
+
});
|
|
13296
|
+
}
|
|
13297
|
+
}));
|
|
13274
13298
|
}
|
|
13275
13299
|
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_) {
|
|
13300
|
+
let hasSeenContentBlock = false;
|
|
13276
13301
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
13302
|
+
const contentComponents = new Map();
|
|
13277
13303
|
$b8hua$createEffect(() => {
|
|
13278
13304
|
var _plp_meta;
|
|
13279
13305
|
const serverContentBlock = (_plp_meta = plp_meta()) === null || _plp_meta === void 0 ? void 0 : _plp_meta.content_blocks;
|
|
13280
|
-
|
|
13306
|
+
const currentHistory = $b8hua$untrack(historyContentBlocks);
|
|
13307
|
+
// Only write to the history if the content blocks have changed when a new backend results arrives (we have them in history so scroll restoration works when going back, even when running shopify without single page navigations where our script dies inbetween pages).
|
|
13308
|
+
if (serverContentBlock && JSON.stringify(serverContentBlock) !== JSON.stringify(currentHistory.blocks)) setHistoryContentBlocks({
|
|
13309
|
+
...currentHistory,
|
|
13310
|
+
blocks: serverContentBlock
|
|
13311
|
+
});
|
|
13281
13312
|
});
|
|
13282
13313
|
const contentBlocksByRow = $b8hua$createMemo(() => {
|
|
13283
13314
|
const developerProvided = content_blocks_by_row_();
|
|
13284
|
-
const
|
|
13285
|
-
|
|
13286
|
-
|
|
13315
|
+
const {
|
|
13316
|
+
blocks: blocksFromHistory
|
|
13317
|
+
} = historyContentBlocks();
|
|
13318
|
+
if (developerProvided) return developerProvided;
|
|
13319
|
+
// If we didn't get any content blocks (backend always return empty array) and we haven't seen any content blocks yet, return undefined
|
|
13320
|
+
// This is so the result rendering (PLPResults) will still use flexbox provided rendering on existing customers, so adding this isn't a breaking change
|
|
13321
|
+
// We don't want to switch rendering method every time one switches between a collection that hasn't vs has content blocks though, so once we've seen one content block we'll switch to css-grid-based rendering
|
|
13322
|
+
if (!(blocksFromHistory !== null && blocksFromHistory !== void 0 && blocksFromHistory.length) && !hasSeenContentBlock) return;
|
|
13287
13323
|
const content = [];
|
|
13288
|
-
|
|
13324
|
+
hasSeenContentBlock = true;
|
|
13325
|
+
blocksFromHistory.forEach(row => {
|
|
13326
|
+
const {
|
|
13327
|
+
content: {
|
|
13328
|
+
link: link,
|
|
13329
|
+
type: type,
|
|
13330
|
+
url: url
|
|
13331
|
+
}
|
|
13332
|
+
} = row;
|
|
13333
|
+
// Key the "content"-component by the link, type and url, so we can reuse the component (and later downstream the block elements) if it's the same
|
|
13334
|
+
// This makes the block not flicker when going backwards/forwards if the content is the same on both pages
|
|
13335
|
+
// Also it lets us rewrite the blocks state in the history based on the block aspect ratio without infinite looping
|
|
13336
|
+
const componentCacheKey = JSON.stringify([link, type, url]);
|
|
13337
|
+
let component = contentComponents.get(componentCacheKey);
|
|
13338
|
+
if (!component) {
|
|
13339
|
+
component = () => $b8hua$createComponent((0, $3b772ef9a35560fe$export$780a853d15174484), {
|
|
13340
|
+
link_: link,
|
|
13341
|
+
type_: type,
|
|
13342
|
+
mediaUrl_: url,
|
|
13343
|
+
router_: router_,
|
|
13344
|
+
aspectRatioWhenAloneInRow_: () => historyContentBlocks().aspectRatios[componentCacheKey],
|
|
13345
|
+
setAspectRatioWas_: aspectRatio => setHistoryContentBlocks(prev => ({
|
|
13346
|
+
...prev,
|
|
13347
|
+
aspectRatios: {
|
|
13348
|
+
...prev.aspectRatios,
|
|
13349
|
+
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
13350
|
+
}
|
|
13351
|
+
}))
|
|
13352
|
+
});
|
|
13353
|
+
contentComponents.set(componentCacheKey, component);
|
|
13354
|
+
}
|
|
13289
13355
|
const contentBlock = {
|
|
13290
13356
|
span_columns: row.span_columns,
|
|
13291
13357
|
span_rows: row.span_rows,
|
|
13292
13358
|
position: row.position,
|
|
13293
|
-
content:
|
|
13294
|
-
contentBlock_: row,
|
|
13295
|
-
router_: router_
|
|
13296
|
-
})
|
|
13359
|
+
content: component
|
|
13297
13360
|
};
|
|
13298
13361
|
content[row.row] = contentBlock;
|
|
13299
13362
|
});
|
|
@@ -13803,4 +13866,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
13803
13866
|
}, "Entire CategoryPage failed");
|
|
13804
13867
|
}
|
|
13805
13868
|
$b8hua$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
13806
|
-
export { $
|
|
13869
|
+
export { $80c7883e020be192$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $80c7883e020be192$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $98688279b9059f50$export$140423fa4bfb6d63 as ModernResponsiveImage, $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $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, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $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, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|