@depict-ai/ui 4.8.12 → 4.8.14
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 +8 -8
- package/ES10/index.d.ts +7 -3
- package/ES10/index.js +8 -8
- package/latest/index.cjs +6 -7
- package/latest/index.d.ts +7 -3
- package/latest/index.js +6 -7
- package/package.json +3 -3
- package/server/ES10/index.cjs +8 -5
- package/server/ES10/index.d.ts +7 -3
- package/server/ES10/index.js +8 -5
- package/server/latest/index.cjs +6 -4
- package/server/latest/index.d.ts +7 -3
- package/server/latest/index.js +6 -4
package/ES10/index.cjs
CHANGED
|
@@ -114,7 +114,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
114
114
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
115
115
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
116
116
|
/*! Depict.ai search and product listing SDK */
|
|
117
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.
|
|
117
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.14";
|
|
118
118
|
function $054b1113e4897051$export$54c6d6ff54e72743(whatToWatch) {
|
|
119
119
|
const [width, setWidth] = $52FdA$solidjs.createSignal(0);
|
|
120
120
|
const [height, setHeight] = $52FdA$solidjs.createSignal(0);
|
|
@@ -259,7 +259,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
259
259
|
};
|
|
260
260
|
});
|
|
261
261
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
262
|
-
const [, otherAttributes] = $52FdA$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
262
|
+
const [, otherAttributes] = $52FdA$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
263
263
|
]);
|
|
264
264
|
|
|
265
265
|
const [hasSetSize, setHasSetSize] = $52FdA$solidjs.createSignal(false);
|
|
@@ -388,11 +388,13 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
388
388
|
}
|
|
389
389
|
img.decode().catch(e => $52FdA$depictaiutilishared.dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
|
|
390
390
|
.then(async () => {
|
|
391
|
+
var _props$onDecoded;
|
|
391
392
|
// Also wait with inserting image (i.e. paint) until browser is idle
|
|
392
393
|
await new Promise(r => executeWhenIdleBatched(r, false));
|
|
393
394
|
if (gotCleanedUp) return;
|
|
394
395
|
setHasDecoded(true);
|
|
395
396
|
hasDecodedFastPath = true;
|
|
397
|
+
(_props$onDecoded = props.onDecoded) === null || _props$onDecoded === void 0 || _props$onDecoded.call(props);
|
|
396
398
|
});
|
|
397
399
|
});
|
|
398
400
|
$52FdA$solidjs.createEffect(() => hasDecoded() && requestAnimationFrame($52FdA$depictaiutilishared.catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1693,8 +1695,8 @@ function $6c2c739b113a8ddf$export$445d8d3f5f706a40(props, container_element) {
|
|
|
1693
1695
|
const update_children_count = () => (0, $52FdA$solidjsweb.isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1694
1696
|
const col_styling = $52FdA$solidjs.createMemo(() => $52FdA$depictaiutilishared.n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1695
1697
|
const default_currently_visible_signal = $52FdA$solidjs.createSignal($52FdA$solidjs.untrack(() => {
|
|
1696
|
-
var _rows_or_empty_object;
|
|
1697
|
-
return (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1;
|
|
1698
|
+
var _ref, _rows_or_empty_object;
|
|
1699
|
+
return (_ref = (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : rows_or_empty_object().max_rows) !== null && _ref !== void 0 ? _ref : 1;
|
|
1698
1700
|
})); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1699
1701
|
const rows_visible_signal = $52FdA$solidjs.createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1700
1702
|
const get_rows_visible = $52FdA$solidjs.createMemo(() => rows_visible_signal()[0]());
|
|
@@ -16104,10 +16106,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
16104
16106
|
},
|
|
16105
16107
|
src: mediaUrl_,
|
|
16106
16108
|
"class": "d-standard-content",
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
setHasLoaded(true);
|
|
16110
|
-
}))
|
|
16109
|
+
onDecoded: () => setHasLoaded(true),
|
|
16110
|
+
ref: el => el.addEventListener("load", $52FdA$depictaiutilisharedlatest.catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
16111
16111
|
});
|
|
16112
16112
|
}
|
|
16113
16113
|
}), $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Match), {
|
package/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.14";
|
|
15
15
|
/**
|
|
16
16
|
* Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
17
17
|
*/
|
|
@@ -127,6 +127,10 @@ export function ShopifyResponsiveImg(props: {
|
|
|
127
127
|
*/
|
|
128
128
|
sizeHeight?: Accessor<number>;
|
|
129
129
|
src: string;
|
|
130
|
+
/**
|
|
131
|
+
* When image is not lazy loaded this callback will be called every time the image has been decoded
|
|
132
|
+
*/
|
|
133
|
+
onDecoded?: VoidFunction;
|
|
130
134
|
loading?: "eager" | "lazy" | "force-lazy";
|
|
131
135
|
customUrls?: (url: string, width: number) => string;
|
|
132
136
|
/**
|
|
@@ -1512,7 +1516,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1512
1516
|
* Open the modal with support for alignment.
|
|
1513
1517
|
* @returns {void}
|
|
1514
1518
|
*/
|
|
1515
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1519
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1516
1520
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1517
1521
|
export interface PageReplacer {
|
|
1518
1522
|
readonly render_: () => Node_Array;
|
|
@@ -1591,5 +1595,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1591
1595
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1592
1596
|
layout?: PossibleLayout;
|
|
1593
1597
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1594
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1598
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1595
1599
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $8tj43$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.8.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.14";
|
|
14
14
|
function $4be619ec2cd7bba3$export$54c6d6ff54e72743(whatToWatch) {
|
|
15
15
|
const [width, setWidth] = $8tj43$createSignal(0);
|
|
16
16
|
const [height, setHeight] = $8tj43$createSignal(0);
|
|
@@ -155,7 +155,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
155
155
|
};
|
|
156
156
|
});
|
|
157
157
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
158
|
-
const [, otherAttributes] = $8tj43$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
158
|
+
const [, otherAttributes] = $8tj43$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
159
159
|
]);
|
|
160
160
|
|
|
161
161
|
const [hasSetSize, setHasSetSize] = $8tj43$createSignal(false);
|
|
@@ -284,11 +284,13 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
284
284
|
}
|
|
285
285
|
img.decode().catch(e => $8tj43$dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
|
|
286
286
|
.then(async () => {
|
|
287
|
+
var _props$onDecoded;
|
|
287
288
|
// Also wait with inserting image (i.e. paint) until browser is idle
|
|
288
289
|
await new Promise(r => executeWhenIdleBatched(r, false));
|
|
289
290
|
if (gotCleanedUp) return;
|
|
290
291
|
setHasDecoded(true);
|
|
291
292
|
hasDecodedFastPath = true;
|
|
293
|
+
(_props$onDecoded = props.onDecoded) === null || _props$onDecoded === void 0 || _props$onDecoded.call(props);
|
|
292
294
|
});
|
|
293
295
|
});
|
|
294
296
|
$8tj43$createEffect(() => hasDecoded() && requestAnimationFrame($8tj43$catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1589,8 +1591,8 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
1589
1591
|
const update_children_count = () => (0, $8tj43$isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1590
1592
|
const col_styling = $8tj43$createMemo(() => $8tj43$n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1591
1593
|
const default_currently_visible_signal = $8tj43$createSignal($8tj43$untrack(() => {
|
|
1592
|
-
var _rows_or_empty_object;
|
|
1593
|
-
return (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1;
|
|
1594
|
+
var _ref, _rows_or_empty_object;
|
|
1595
|
+
return (_ref = (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : rows_or_empty_object().max_rows) !== null && _ref !== void 0 ? _ref : 1;
|
|
1594
1596
|
})); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1595
1597
|
const rows_visible_signal = $8tj43$createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1596
1598
|
const get_rows_visible = $8tj43$createMemo(() => rows_visible_signal()[0]());
|
|
@@ -16000,10 +16002,8 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
16000
16002
|
},
|
|
16001
16003
|
src: mediaUrl_,
|
|
16002
16004
|
"class": "d-standard-content",
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
setHasLoaded(true);
|
|
16006
|
-
}))
|
|
16005
|
+
onDecoded: () => setHasLoaded(true),
|
|
16006
|
+
ref: el => el.addEventListener("load", $8tj43$catchify1(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
16007
16007
|
});
|
|
16008
16008
|
}
|
|
16009
16009
|
}), $8tj43$createComponent((0, $8tj43$Match), {
|
package/latest/index.cjs
CHANGED
|
@@ -108,7 +108,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
108
108
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
109
109
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
110
110
|
/*! Depict.ai search and product listing SDK */
|
|
111
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.
|
|
111
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.14";
|
|
112
112
|
function $128302ab61dab8f1$export$54c6d6ff54e72743(whatToWatch) {
|
|
113
113
|
const [width, setWidth] = $gVhhF$solidjs.createSignal(0);
|
|
114
114
|
const [height, setHeight] = $gVhhF$solidjs.createSignal(0);
|
|
@@ -248,7 +248,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
248
248
|
};
|
|
249
249
|
});
|
|
250
250
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
251
|
-
const [, otherAttributes] = $gVhhF$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
251
|
+
const [, otherAttributes] = $gVhhF$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
252
252
|
]);
|
|
253
253
|
|
|
254
254
|
const [hasSetSize, setHasSetSize] = $gVhhF$solidjs.createSignal(false);
|
|
@@ -379,6 +379,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
379
379
|
if (gotCleanedUp) return;
|
|
380
380
|
setHasDecoded(true);
|
|
381
381
|
hasDecodedFastPath = true;
|
|
382
|
+
props.onDecoded?.();
|
|
382
383
|
});
|
|
383
384
|
});
|
|
384
385
|
$gVhhF$solidjs.createEffect(() => hasDecoded() && requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1623,7 +1624,7 @@ function $f48d0fbb00835aaa$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
1623
1624
|
const [get_children_count, set_children_count] = $gVhhF$solidjs.createSignal(0);
|
|
1624
1625
|
const update_children_count = () => (0, $gVhhF$solidjsweb.isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1625
1626
|
const col_styling = $gVhhF$solidjs.createMemo(() => $gVhhF$depictaiutilishared.n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1626
|
-
const default_currently_visible_signal = $gVhhF$solidjs.createSignal($gVhhF$solidjs.untrack(() => rows_or_empty_object().start_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1627
|
+
const default_currently_visible_signal = $gVhhF$solidjs.createSignal($gVhhF$solidjs.untrack(() => rows_or_empty_object().start_rows ?? rows_or_empty_object().max_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1627
1628
|
const rows_visible_signal = $gVhhF$solidjs.createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1628
1629
|
const get_rows_visible = $gVhhF$solidjs.createMemo(() => rows_visible_signal()[0]());
|
|
1629
1630
|
const set_rows_visible = $gVhhF$solidjs.createMemo(() => rows_visible_signal()[1]);
|
|
@@ -15051,10 +15052,8 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
15051
15052
|
sizeHeight: () => wrapperSize()?.[1]?.() || 0,
|
|
15052
15053
|
src: mediaUrl_,
|
|
15053
15054
|
"class": "d-standard-content",
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
setHasLoaded(true);
|
|
15057
|
-
}))
|
|
15055
|
+
onDecoded: () => setHasLoaded(true),
|
|
15056
|
+
ref: el => el.addEventListener("load", $gVhhF$depictaiutilisharedlatest.catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
15058
15057
|
});
|
|
15059
15058
|
}
|
|
15060
15059
|
}), $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Match), {
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.14";
|
|
15
15
|
/**
|
|
16
16
|
* Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
17
17
|
*/
|
|
@@ -127,6 +127,10 @@ export function ShopifyResponsiveImg(props: {
|
|
|
127
127
|
*/
|
|
128
128
|
sizeHeight?: Accessor<number>;
|
|
129
129
|
src: string;
|
|
130
|
+
/**
|
|
131
|
+
* When image is not lazy loaded this callback will be called every time the image has been decoded
|
|
132
|
+
*/
|
|
133
|
+
onDecoded?: VoidFunction;
|
|
130
134
|
loading?: "eager" | "lazy" | "force-lazy";
|
|
131
135
|
customUrls?: (url: string, width: number) => string;
|
|
132
136
|
/**
|
|
@@ -1512,7 +1516,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1512
1516
|
* Open the modal with support for alignment.
|
|
1513
1517
|
* @returns {void}
|
|
1514
1518
|
*/
|
|
1515
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1519
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1516
1520
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1517
1521
|
export interface PageReplacer {
|
|
1518
1522
|
readonly render_: () => Node_Array;
|
|
@@ -1591,5 +1595,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1591
1595
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1592
1596
|
layout?: PossibleLayout;
|
|
1593
1597
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1594
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1598
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1595
1599
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { dlog as $9HbP8$dlog, catchify as $9HbP8$catchify1, ListenableSet as $9H
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.14";
|
|
11
11
|
function $a444a52bafa0dacc$export$54c6d6ff54e72743(whatToWatch) {
|
|
12
12
|
const [width, setWidth] = $9HbP8$createSignal(0);
|
|
13
13
|
const [height, setHeight] = $9HbP8$createSignal(0);
|
|
@@ -147,7 +147,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
147
147
|
};
|
|
148
148
|
});
|
|
149
149
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
150
|
-
const [, otherAttributes] = $9HbP8$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
150
|
+
const [, otherAttributes] = $9HbP8$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
151
151
|
]);
|
|
152
152
|
|
|
153
153
|
const [hasSetSize, setHasSetSize] = $9HbP8$createSignal(false);
|
|
@@ -278,6 +278,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
278
278
|
if (gotCleanedUp) return;
|
|
279
279
|
setHasDecoded(true);
|
|
280
280
|
hasDecodedFastPath = true;
|
|
281
|
+
props.onDecoded?.();
|
|
281
282
|
});
|
|
282
283
|
});
|
|
283
284
|
$9HbP8$createEffect(() => hasDecoded() && requestAnimationFrame($9HbP8$catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1522,7 +1523,7 @@ function $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
1522
1523
|
const [get_children_count, set_children_count] = $9HbP8$createSignal(0);
|
|
1523
1524
|
const update_children_count = () => (0, $9HbP8$isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1524
1525
|
const col_styling = $9HbP8$createMemo(() => $9HbP8$n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1525
|
-
const default_currently_visible_signal = $9HbP8$createSignal($9HbP8$untrack(() => rows_or_empty_object().start_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1526
|
+
const default_currently_visible_signal = $9HbP8$createSignal($9HbP8$untrack(() => rows_or_empty_object().start_rows ?? rows_or_empty_object().max_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1526
1527
|
const rows_visible_signal = $9HbP8$createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1527
1528
|
const get_rows_visible = $9HbP8$createMemo(() => rows_visible_signal()[0]());
|
|
1528
1529
|
const set_rows_visible = $9HbP8$createMemo(() => rows_visible_signal()[1]);
|
|
@@ -14950,10 +14951,8 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
14950
14951
|
sizeHeight: () => wrapperSize()?.[1]?.() || 0,
|
|
14951
14952
|
src: mediaUrl_,
|
|
14952
14953
|
"class": "d-standard-content",
|
|
14953
|
-
|
|
14954
|
-
|
|
14955
|
-
setHasLoaded(true);
|
|
14956
|
-
}))
|
|
14954
|
+
onDecoded: () => setHasLoaded(true),
|
|
14955
|
+
ref: el => el.addEventListener("load", $9HbP8$catchify1(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
14957
14956
|
});
|
|
14958
14957
|
}
|
|
14959
14958
|
}), $9HbP8$createComponent((0, $9HbP8$Match), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.14",
|
|
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,8 +236,8 @@
|
|
|
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": "^4.4.
|
|
240
|
-
"@depict-ai/types": "^5.4.
|
|
239
|
+
"@depict-ai/plp-styling": "^4.4.12",
|
|
240
|
+
"@depict-ai/types": "^5.4.3",
|
|
241
241
|
"@depict-ai/utilishared": "^2.4.4",
|
|
242
242
|
"solid-js": "^1.8.12"
|
|
243
243
|
},
|
package/server/ES10/index.cjs
CHANGED
|
@@ -114,7 +114,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
114
114
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
115
115
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
116
116
|
/*! Depict.ai search and product listing SDK */
|
|
117
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.
|
|
117
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.14";
|
|
118
118
|
function $054b1113e4897051$export$54c6d6ff54e72743(whatToWatch) {
|
|
119
119
|
const [width, setWidth] = $3hooq$solidjs.createSignal(0);
|
|
120
120
|
const [height, setHeight] = $3hooq$solidjs.createSignal(0);
|
|
@@ -245,7 +245,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
245
245
|
};
|
|
246
246
|
});
|
|
247
247
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
248
|
-
const [, otherAttributes] = $3hooq$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
248
|
+
const [, otherAttributes] = $3hooq$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
249
249
|
]);
|
|
250
250
|
|
|
251
251
|
const [hasSetSize, setHasSetSize] = $3hooq$solidjs.createSignal(false);
|
|
@@ -374,11 +374,13 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
374
374
|
}
|
|
375
375
|
img.decode().catch(e => $3hooq$depictaiutilishared.dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
|
|
376
376
|
.then(async () => {
|
|
377
|
+
var _props$onDecoded;
|
|
377
378
|
// Also wait with inserting image (i.e. paint) until browser is idle
|
|
378
379
|
await new Promise(r => executeWhenIdleBatched(r, false));
|
|
379
380
|
if (gotCleanedUp) return;
|
|
380
381
|
setHasDecoded(true);
|
|
381
382
|
hasDecodedFastPath = true;
|
|
383
|
+
(_props$onDecoded = props.onDecoded) === null || _props$onDecoded === void 0 || _props$onDecoded.call(props);
|
|
382
384
|
});
|
|
383
385
|
});
|
|
384
386
|
$3hooq$solidjs.createEffect(() => hasDecoded() && requestAnimationFrame($3hooq$depictaiutilishared.catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1491,8 +1493,8 @@ function $6c2c739b113a8ddf$export$445d8d3f5f706a40(props, container_element) {
|
|
|
1491
1493
|
const update_children_count = () => (0, $3hooq$solidjsweb.isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1492
1494
|
const col_styling = $3hooq$solidjs.createMemo(() => $3hooq$depictaiutilishared.n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1493
1495
|
const default_currently_visible_signal = $3hooq$solidjs.createSignal($3hooq$solidjs.untrack(() => {
|
|
1494
|
-
var _rows_or_empty_object;
|
|
1495
|
-
return (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1;
|
|
1496
|
+
var _ref, _rows_or_empty_object;
|
|
1497
|
+
return (_ref = (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : rows_or_empty_object().max_rows) !== null && _ref !== void 0 ? _ref : 1;
|
|
1496
1498
|
})); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1497
1499
|
const rows_visible_signal = $3hooq$solidjs.createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1498
1500
|
const get_rows_visible = $3hooq$solidjs.createMemo(() => rows_visible_signal()[0]());
|
|
@@ -13463,7 +13465,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
13463
13465
|
return ((_wrapperSize2 = wrapperSize()) === null || _wrapperSize2 === void 0 ? void 0 : (_wrapperSize2$ = _wrapperSize2[1]) === null || _wrapperSize2$ === void 0 ? void 0 : _wrapperSize2$.call(_wrapperSize2)) || 0;
|
|
13464
13466
|
},
|
|
13465
13467
|
src: mediaUrl_,
|
|
13466
|
-
"class": "d-standard-content"
|
|
13468
|
+
"class": "d-standard-content",
|
|
13469
|
+
onDecoded: () => setHasLoaded(true)
|
|
13467
13470
|
});
|
|
13468
13471
|
}
|
|
13469
13472
|
}), $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Match), {
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.14";
|
|
15
15
|
/**
|
|
16
16
|
* Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
17
17
|
*/
|
|
@@ -127,6 +127,10 @@ export function ShopifyResponsiveImg(props: {
|
|
|
127
127
|
*/
|
|
128
128
|
sizeHeight?: Accessor<number>;
|
|
129
129
|
src: string;
|
|
130
|
+
/**
|
|
131
|
+
* When image is not lazy loaded this callback will be called every time the image has been decoded
|
|
132
|
+
*/
|
|
133
|
+
onDecoded?: VoidFunction;
|
|
130
134
|
loading?: "eager" | "lazy" | "force-lazy";
|
|
131
135
|
customUrls?: (url: string, width: number) => string;
|
|
132
136
|
/**
|
|
@@ -1512,7 +1516,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1512
1516
|
* Open the modal with support for alignment.
|
|
1513
1517
|
* @returns {void}
|
|
1514
1518
|
*/
|
|
1515
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1519
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1516
1520
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1517
1521
|
export interface PageReplacer {
|
|
1518
1522
|
readonly render_: () => Node_Array;
|
|
@@ -1591,5 +1595,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1591
1595
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1592
1596
|
layout?: PossibleLayout;
|
|
1593
1597
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1594
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1598
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1595
1599
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ 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.8.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.14";
|
|
14
14
|
function $4be619ec2cd7bba3$export$54c6d6ff54e72743(whatToWatch) {
|
|
15
15
|
const [width, setWidth] = $b8hua$createSignal(0);
|
|
16
16
|
const [height, setHeight] = $b8hua$createSignal(0);
|
|
@@ -141,7 +141,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
141
141
|
};
|
|
142
142
|
});
|
|
143
143
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
144
|
-
const [, otherAttributes] = $b8hua$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
144
|
+
const [, otherAttributes] = $b8hua$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
145
145
|
]);
|
|
146
146
|
|
|
147
147
|
const [hasSetSize, setHasSetSize] = $b8hua$createSignal(false);
|
|
@@ -270,11 +270,13 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
270
270
|
}
|
|
271
271
|
img.decode().catch(e => $b8hua$dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
|
|
272
272
|
.then(async () => {
|
|
273
|
+
var _props$onDecoded;
|
|
273
274
|
// Also wait with inserting image (i.e. paint) until browser is idle
|
|
274
275
|
await new Promise(r => executeWhenIdleBatched(r, false));
|
|
275
276
|
if (gotCleanedUp) return;
|
|
276
277
|
setHasDecoded(true);
|
|
277
278
|
hasDecodedFastPath = true;
|
|
279
|
+
(_props$onDecoded = props.onDecoded) === null || _props$onDecoded === void 0 || _props$onDecoded.call(props);
|
|
278
280
|
});
|
|
279
281
|
});
|
|
280
282
|
$b8hua$createEffect(() => hasDecoded() && requestAnimationFrame($b8hua$catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1387,8 +1389,8 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
1387
1389
|
const update_children_count = () => (0, $b8hua$isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1388
1390
|
const col_styling = $b8hua$createMemo(() => $b8hua$n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1389
1391
|
const default_currently_visible_signal = $b8hua$createSignal($b8hua$untrack(() => {
|
|
1390
|
-
var _rows_or_empty_object;
|
|
1391
|
-
return (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1;
|
|
1392
|
+
var _ref, _rows_or_empty_object;
|
|
1393
|
+
return (_ref = (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : rows_or_empty_object().max_rows) !== null && _ref !== void 0 ? _ref : 1;
|
|
1392
1394
|
})); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1393
1395
|
const rows_visible_signal = $b8hua$createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1394
1396
|
const get_rows_visible = $b8hua$createMemo(() => rows_visible_signal()[0]());
|
|
@@ -13359,7 +13361,8 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
13359
13361
|
return ((_wrapperSize2 = wrapperSize()) === null || _wrapperSize2 === void 0 ? void 0 : (_wrapperSize2$ = _wrapperSize2[1]) === null || _wrapperSize2$ === void 0 ? void 0 : _wrapperSize2$.call(_wrapperSize2)) || 0;
|
|
13360
13362
|
},
|
|
13361
13363
|
src: mediaUrl_,
|
|
13362
|
-
"class": "d-standard-content"
|
|
13364
|
+
"class": "d-standard-content",
|
|
13365
|
+
onDecoded: () => setHasLoaded(true)
|
|
13363
13366
|
});
|
|
13364
13367
|
}
|
|
13365
13368
|
}), $b8hua$createComponent((0, $b8hua$Match), {
|
package/server/latest/index.cjs
CHANGED
|
@@ -108,7 +108,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
108
108
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
109
109
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
110
110
|
/*! Depict.ai search and product listing SDK */
|
|
111
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.
|
|
111
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.14";
|
|
112
112
|
function $128302ab61dab8f1$export$54c6d6ff54e72743(whatToWatch) {
|
|
113
113
|
const [width, setWidth] = $5vyXB$solidjs.createSignal(0);
|
|
114
114
|
const [height, setHeight] = $5vyXB$solidjs.createSignal(0);
|
|
@@ -234,7 +234,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
234
234
|
};
|
|
235
235
|
});
|
|
236
236
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
237
|
-
const [, otherAttributes] = $5vyXB$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
237
|
+
const [, otherAttributes] = $5vyXB$solidjs.splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
238
238
|
]);
|
|
239
239
|
|
|
240
240
|
const [hasSetSize, setHasSetSize] = $5vyXB$solidjs.createSignal(false);
|
|
@@ -365,6 +365,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
365
365
|
if (gotCleanedUp) return;
|
|
366
366
|
setHasDecoded(true);
|
|
367
367
|
hasDecodedFastPath = true;
|
|
368
|
+
props.onDecoded?.();
|
|
368
369
|
});
|
|
369
370
|
});
|
|
370
371
|
$5vyXB$solidjs.createEffect(() => hasDecoded() && requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1429,7 +1430,7 @@ function $f48d0fbb00835aaa$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
1429
1430
|
const [get_children_count, set_children_count] = $5vyXB$solidjs.createSignal(0);
|
|
1430
1431
|
const update_children_count = () => (0, $5vyXB$solidjsweb.isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1431
1432
|
const col_styling = $5vyXB$solidjs.createMemo(() => $5vyXB$depictaiutilishared.n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1432
|
-
const default_currently_visible_signal = $5vyXB$solidjs.createSignal($5vyXB$solidjs.untrack(() => rows_or_empty_object().start_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1433
|
+
const default_currently_visible_signal = $5vyXB$solidjs.createSignal($5vyXB$solidjs.untrack(() => rows_or_empty_object().start_rows ?? rows_or_empty_object().max_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1433
1434
|
const rows_visible_signal = $5vyXB$solidjs.createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1434
1435
|
const get_rows_visible = $5vyXB$solidjs.createMemo(() => rows_visible_signal()[0]());
|
|
1435
1436
|
const set_rows_visible = $5vyXB$solidjs.createMemo(() => rows_visible_signal()[1]);
|
|
@@ -12491,7 +12492,8 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
12491
12492
|
size: () => wrapperSize()?.[0]?.() || 0,
|
|
12492
12493
|
sizeHeight: () => wrapperSize()?.[1]?.() || 0,
|
|
12493
12494
|
src: mediaUrl_,
|
|
12494
|
-
"class": "d-standard-content"
|
|
12495
|
+
"class": "d-standard-content",
|
|
12496
|
+
onDecoded: () => setHasLoaded(true)
|
|
12495
12497
|
});
|
|
12496
12498
|
}
|
|
12497
12499
|
}), $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Match), {
|
package/server/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.14";
|
|
15
15
|
/**
|
|
16
16
|
* Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
17
17
|
*/
|
|
@@ -127,6 +127,10 @@ export function ShopifyResponsiveImg(props: {
|
|
|
127
127
|
*/
|
|
128
128
|
sizeHeight?: Accessor<number>;
|
|
129
129
|
src: string;
|
|
130
|
+
/**
|
|
131
|
+
* When image is not lazy loaded this callback will be called every time the image has been decoded
|
|
132
|
+
*/
|
|
133
|
+
onDecoded?: VoidFunction;
|
|
130
134
|
loading?: "eager" | "lazy" | "force-lazy";
|
|
131
135
|
customUrls?: (url: string, width: number) => string;
|
|
132
136
|
/**
|
|
@@ -1512,7 +1516,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1512
1516
|
* Open the modal with support for alignment.
|
|
1513
1517
|
* @returns {void}
|
|
1514
1518
|
*/
|
|
1515
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1519
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1516
1520
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1517
1521
|
export interface PageReplacer {
|
|
1518
1522
|
readonly render_: () => Node_Array;
|
|
@@ -1591,5 +1595,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1591
1595
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1592
1596
|
layout?: PossibleLayout;
|
|
1593
1597
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1594
|
-
}): import("@depict-ai/utilishared").Node_Array;
|
|
1598
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1595
1599
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { dlog as $i7OB2$dlog, catchify as $i7OB2$catchify1, ListenableSet as $i7
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.14";
|
|
11
11
|
function $a444a52bafa0dacc$export$54c6d6ff54e72743(whatToWatch) {
|
|
12
12
|
const [width, setWidth] = $i7OB2$createSignal(0);
|
|
13
13
|
const [height, setHeight] = $i7OB2$createSignal(0);
|
|
@@ -133,7 +133,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
133
133
|
};
|
|
134
134
|
});
|
|
135
135
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
136
|
-
const [, otherAttributes] = $i7OB2$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
136
|
+
const [, otherAttributes] = $i7OB2$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "sizeHeight", "onDecoded", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
137
137
|
]);
|
|
138
138
|
|
|
139
139
|
const [hasSetSize, setHasSetSize] = $i7OB2$createSignal(false);
|
|
@@ -264,6 +264,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
264
264
|
if (gotCleanedUp) return;
|
|
265
265
|
setHasDecoded(true);
|
|
266
266
|
hasDecodedFastPath = true;
|
|
267
|
+
props.onDecoded?.();
|
|
267
268
|
});
|
|
268
269
|
});
|
|
269
270
|
$i7OB2$createEffect(() => hasDecoded() && requestAnimationFrame($i7OB2$catchify(() => setRAFSinceReturned(prev => !prev))));
|
|
@@ -1328,7 +1329,7 @@ function $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
1328
1329
|
const [get_children_count, set_children_count] = $i7OB2$createSignal(0);
|
|
1329
1330
|
const update_children_count = () => (0, $i7OB2$isServer) ? 20 : set_children_count(container_element.children.length);
|
|
1330
1331
|
const col_styling = $i7OB2$createMemo(() => $i7OB2$n_col_styling_with_dist(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
1331
|
-
const default_currently_visible_signal = $i7OB2$createSignal($i7OB2$untrack(() => rows_or_empty_object().start_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1332
|
+
const default_currently_visible_signal = $i7OB2$createSignal($i7OB2$untrack(() => rows_or_empty_object().start_rows ?? rows_or_empty_object().max_rows ?? 1)); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
1332
1333
|
const rows_visible_signal = $i7OB2$createMemo(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
1333
1334
|
const get_rows_visible = $i7OB2$createMemo(() => rows_visible_signal()[0]());
|
|
1334
1335
|
const set_rows_visible = $i7OB2$createMemo(() => rows_visible_signal()[1]);
|
|
@@ -12390,7 +12391,8 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
12390
12391
|
size: () => wrapperSize()?.[0]?.() || 0,
|
|
12391
12392
|
sizeHeight: () => wrapperSize()?.[1]?.() || 0,
|
|
12392
12393
|
src: mediaUrl_,
|
|
12393
|
-
"class": "d-standard-content"
|
|
12394
|
+
"class": "d-standard-content",
|
|
12395
|
+
onDecoded: () => setHasLoaded(true)
|
|
12394
12396
|
});
|
|
12395
12397
|
}
|
|
12396
12398
|
}), $i7OB2$createComponent((0, $i7OB2$Match), {
|