@depict-ai/utilishared 1.0.13 → 1.0.15
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/dist/index.d.ts +4 -2
- package/dist/main.js +14 -7
- package/dist/module.js +14 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="../jsx.d.ts" />
|
|
2
2
|
import { EUnavailabilityType } from "@depict-ai/types/api/TrackV2Request";
|
|
3
|
-
export const version = "1.0.
|
|
3
|
+
export const version = "1.0.15";
|
|
4
4
|
export const is_debug: boolean;
|
|
5
5
|
/**
|
|
6
6
|
* Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
|
|
@@ -1806,7 +1806,9 @@ export function reactive_template(initial_value?: ReactiveTemplateValueContents)
|
|
|
1806
1806
|
* @return An object containing `remove`, a function which removes the event listener again
|
|
1807
1807
|
*/
|
|
1808
1808
|
export function javascript_media_query(// inspired by code in houdinisportswear modify script
|
|
1809
|
-
query: string, handler: (e: MediaQueryListEvent | MediaQueryList
|
|
1809
|
+
query: string, handler: (e: MediaQueryListEvent | MediaQueryList | {
|
|
1810
|
+
matches: false;
|
|
1811
|
+
}) => void, initial_call?: boolean): {
|
|
1810
1812
|
remove(): void;
|
|
1811
1813
|
};
|
|
1812
1814
|
type RenderingFunction<T extends Display> = (...args: any[]) => Promise<{
|
package/dist/main.js
CHANGED
|
@@ -268,7 +268,7 @@ $parcel$export(module.exports, "relative_luminance_from_rgb", () => $d73746ee466
|
|
|
268
268
|
$parcel$export(module.exports, "hsb_to_rgb", () => $d73746ee466f09ca$export$486b165479b9284f);
|
|
269
269
|
$parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fbfd8236492);
|
|
270
270
|
$parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
|
|
271
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.
|
|
271
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "1.0.15";
|
|
272
272
|
|
|
273
273
|
|
|
274
274
|
const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/ (()=>process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
@@ -6774,10 +6774,16 @@ function $3721a5ccba25c247$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6774
6774
|
|
|
6775
6775
|
function $93c499898a1702c7$export$515c3ea4d599b05a(// inspired by code in houdinisportswear modify script
|
|
6776
6776
|
query, handler, initial_call = true) {
|
|
6777
|
-
if (typeof window !== "object") return {
|
|
6778
|
-
remove () {}
|
|
6779
|
-
}; // Don't run on the server
|
|
6780
6777
|
const catchified_handler = (0, $268cbd9e4ade92db$export$b3bbfd758f11cfa9)(handler, "Error in media query listener callback");
|
|
6778
|
+
if (typeof window !== "object") {
|
|
6779
|
+
// on server call the handler in case nothing is rendered if it isn't called, then do nothing
|
|
6780
|
+
catchified_handler({
|
|
6781
|
+
matches: false
|
|
6782
|
+
});
|
|
6783
|
+
return {
|
|
6784
|
+
remove () {}
|
|
6785
|
+
};
|
|
6786
|
+
}
|
|
6781
6787
|
const media_query = window?.matchMedia?.(query);
|
|
6782
6788
|
if (initial_call && media_query) catchified_handler(media_query);
|
|
6783
6789
|
let the_function;
|
|
@@ -8064,7 +8070,6 @@ function $dba3e72fb3e5c53d$export$4a3043e508dd72f0({ children: children , ...att
|
|
|
8064
8070
|
async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({ title_: title_ , children: children , CloseIcon: CloseIcon }) {
|
|
8065
8071
|
// TODO: make so once can't accidentally have multiple at once
|
|
8066
8072
|
let close_;
|
|
8067
|
-
const closing_handlers = [];
|
|
8068
8073
|
const open_promise = new Promise((r)=>close_ = r);
|
|
8069
8074
|
const body = await (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
8070
8075
|
const backdrop = (0, $107a74aa4ea5902d$export$34b9dba7ce09269b)("div", {
|
|
@@ -8072,6 +8077,9 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({ title_: title_ , chil
|
|
|
8072
8077
|
onClick: close_
|
|
8073
8078
|
});
|
|
8074
8079
|
const [exit_title_iterator, exitable_title_iterator] = (0, $bbe52965151ee7f0$export$927664b47117acb0)(title_);
|
|
8080
|
+
const closing_handlers = [
|
|
8081
|
+
exit_title_iterator
|
|
8082
|
+
];
|
|
8075
8083
|
const slidein = (0, $107a74aa4ea5902d$export$25062201e9e25d76)("div", {
|
|
8076
8084
|
class: "slidein",
|
|
8077
8085
|
children: [
|
|
@@ -8080,7 +8088,7 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({ title_: title_ , chil
|
|
|
8080
8088
|
children: [
|
|
8081
8089
|
(0, $107a74aa4ea5902d$export$34b9dba7ce09269b)("span", {
|
|
8082
8090
|
class: "title",
|
|
8083
|
-
children: (0, $374ca311b64f260b$export$7c081fdbc65b6a2a)(exitable_title_iterator)
|
|
8091
|
+
children: (0, $374ca311b64f260b$export$7c081fdbc65b6a2a)(exitable_title_iterator, false)
|
|
8084
8092
|
}),
|
|
8085
8093
|
(0, $107a74aa4ea5902d$export$34b9dba7ce09269b)("button", {
|
|
8086
8094
|
class: "close",
|
|
@@ -8158,7 +8166,6 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({ title_: title_ , chil
|
|
|
8158
8166
|
elements_in_container.remove();
|
|
8159
8167
|
closing_handlers.forEach((handler)=>handler());
|
|
8160
8168
|
}));
|
|
8161
|
-
exit_title_iterator();
|
|
8162
8169
|
}));
|
|
8163
8170
|
return {
|
|
8164
8171
|
close_: close_,
|
package/dist/module.js
CHANGED
|
@@ -6,7 +6,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
6
6
|
function $parcel$interopDefault(a) {
|
|
7
7
|
return a && a.__esModule ? a.default : a;
|
|
8
8
|
}
|
|
9
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.
|
|
9
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "1.0.15";
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
const $571bce04eb920cd8$export$55fe61489d2c7417 = /*@__PURE__*/ (()=>process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
|
|
@@ -6512,10 +6512,16 @@ function $49c4fa2e27e642fa$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6512
6512
|
|
|
6513
6513
|
function $29407d8301dc2f23$export$515c3ea4d599b05a(// inspired by code in houdinisportswear modify script
|
|
6514
6514
|
query, handler, initial_call = true) {
|
|
6515
|
-
if (typeof window !== "object") return {
|
|
6516
|
-
remove () {}
|
|
6517
|
-
}; // Don't run on the server
|
|
6518
6515
|
const catchified_handler = (0, $b04e44fad5ea42c7$export$b3bbfd758f11cfa9)(handler, "Error in media query listener callback");
|
|
6516
|
+
if (typeof window !== "object") {
|
|
6517
|
+
// on server call the handler in case nothing is rendered if it isn't called, then do nothing
|
|
6518
|
+
catchified_handler({
|
|
6519
|
+
matches: false
|
|
6520
|
+
});
|
|
6521
|
+
return {
|
|
6522
|
+
remove () {}
|
|
6523
|
+
};
|
|
6524
|
+
}
|
|
6519
6525
|
const media_query = window?.matchMedia?.(query);
|
|
6520
6526
|
if (initial_call && media_query) catchified_handler(media_query);
|
|
6521
6527
|
let the_function;
|
|
@@ -7802,7 +7808,6 @@ function $769ce417b39aa7d3$export$4a3043e508dd72f0({ children: children , ...att
|
|
|
7802
7808
|
async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({ title_: title_ , children: children , CloseIcon: CloseIcon }) {
|
|
7803
7809
|
// TODO: make so once can't accidentally have multiple at once
|
|
7804
7810
|
let close_;
|
|
7805
|
-
const closing_handlers = [];
|
|
7806
7811
|
const open_promise = new Promise((r)=>close_ = r);
|
|
7807
7812
|
const body = await (0, $0b48ba2f40ce6067$export$b6ae1bc530f4c149).wait_for_element("body");
|
|
7808
7813
|
const backdrop = (0, $63cbb5de51d11596$export$34b9dba7ce09269b)("div", {
|
|
@@ -7810,6 +7815,9 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({ title_: title_ , chil
|
|
|
7810
7815
|
onClick: close_
|
|
7811
7816
|
});
|
|
7812
7817
|
const [exit_title_iterator, exitable_title_iterator] = (0, $b8270fcf290bb3af$export$927664b47117acb0)(title_);
|
|
7818
|
+
const closing_handlers = [
|
|
7819
|
+
exit_title_iterator
|
|
7820
|
+
];
|
|
7813
7821
|
const slidein = (0, $63cbb5de51d11596$export$25062201e9e25d76)("div", {
|
|
7814
7822
|
class: "slidein",
|
|
7815
7823
|
children: [
|
|
@@ -7818,7 +7826,7 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({ title_: title_ , chil
|
|
|
7818
7826
|
children: [
|
|
7819
7827
|
(0, $63cbb5de51d11596$export$34b9dba7ce09269b)("span", {
|
|
7820
7828
|
class: "title",
|
|
7821
|
-
children: (0, $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a)(exitable_title_iterator)
|
|
7829
|
+
children: (0, $8c97019b5f7b0d0e$export$7c081fdbc65b6a2a)(exitable_title_iterator, false)
|
|
7822
7830
|
}),
|
|
7823
7831
|
(0, $63cbb5de51d11596$export$34b9dba7ce09269b)("button", {
|
|
7824
7832
|
class: "close",
|
|
@@ -7896,7 +7904,6 @@ async function $cf7ca80454d7b4c0$export$8a0e4d6f6abf7e90({ title_: title_ , chil
|
|
|
7896
7904
|
elements_in_container.remove();
|
|
7897
7905
|
closing_handlers.forEach((handler)=>handler());
|
|
7898
7906
|
}));
|
|
7899
|
-
exit_title_iterator();
|
|
7900
7907
|
}));
|
|
7901
7908
|
return {
|
|
7902
7909
|
close_: close_,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/utilishared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@babel/core": "latest",
|
|
49
49
|
"@babel/runtime": "latest",
|
|
50
50
|
"@babel/runtime-corejs3": "latest",
|
|
51
|
-
"@depict-ai/types": "^1.0.
|
|
51
|
+
"@depict-ai/types": "^1.0.19",
|
|
52
52
|
"@parcel/resolver-default": "^2.8.0",
|
|
53
53
|
"@sentry/cli": "latest",
|
|
54
54
|
"@sentry/types": "^7.13.0",
|