@depict-ai/utilishared 0.0.63 → 0.0.64
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 +1 -1
- package/dist/main.js +7 -17
- package/dist/module.js +7 -17
- 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 = "0.0.
|
|
3
|
+
export const version = "0.0.64";
|
|
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]`.
|
package/dist/main.js
CHANGED
|
@@ -274,7 +274,7 @@ $parcel$export(module.exports, "hsl_to_rgb", () => $d73746ee466f09ca$export$e4fd
|
|
|
274
274
|
$parcel$export(module.exports, "relative_luminance_from_rgb", () => $d73746ee466f09ca$export$98c2b3491e76c1f);
|
|
275
275
|
$parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fbfd8236492);
|
|
276
276
|
$parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
|
|
277
|
-
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.
|
|
277
|
+
const $815f67c61b4c0a42$export$83d89fbfd8236492 = "0.0.64";
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
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" && (document.currentScript?.dataset?.debug === "true" || localStorage.getItem("debug") === "true"))();
|
|
@@ -6640,12 +6640,12 @@ function $3d8df0a23b9bebac$var$scroll_idle(slider, chunk_size, clones_per_side)
|
|
|
6640
6640
|
|
|
6641
6641
|
|
|
6642
6642
|
|
|
6643
|
-
const $3721a5ccba25c247$var$connection_map = /*@__PURE__*/ new
|
|
6643
|
+
const $3721a5ccba25c247$var$connection_map = /*@__PURE__*/ new WeakMap();
|
|
6644
6644
|
function $3721a5ccba25c247$export$3d04c40e7acc1a32(initial_value) {
|
|
6645
6645
|
let subscribed = false;
|
|
6646
6646
|
const subscriber_array_fns = new Set();
|
|
6647
6647
|
const template_text_node = document.createTextNode("");
|
|
6648
|
-
|
|
6648
|
+
const current_els = [
|
|
6649
6649
|
template_text_node
|
|
6650
6650
|
];
|
|
6651
6651
|
let state;
|
|
@@ -6679,18 +6679,8 @@ function $3721a5ccba25c247$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6679
6679
|
current_els.push(...array_with_replacewithable_nodes);
|
|
6680
6680
|
for (const set_fn of subscriber_array_fns)set_fn(array_with_replacewithable_nodes);
|
|
6681
6681
|
state = new_value;
|
|
6682
|
-
// set subscribed and then synchronize here if should subscribe
|
|
6683
|
-
|
|
6684
|
-
for (const [key, value] of $3721a5ccba25c247$var$connection_map){
|
|
6685
|
-
const derefed_key = key.deref();
|
|
6686
|
-
if (derefed_key === new_value) {
|
|
6687
|
-
const derefed_value = value.deref();
|
|
6688
|
-
if (derefed_value) {
|
|
6689
|
-
connection_fn = derefed_value;
|
|
6690
|
-
break;
|
|
6691
|
-
}
|
|
6692
|
-
}
|
|
6693
|
-
}
|
|
6682
|
+
// set subscribed and then synchronize here, if should subscribe
|
|
6683
|
+
const connection_fn = $3721a5ccba25c247$var$connection_map.get(new_value /* if we get updated to the `elements` of another reactive_template it has to be an array */ );
|
|
6694
6684
|
if (connection_fn) // merge with reactive_template we got set to
|
|
6695
6685
|
subscribed = connection_fn((new_state)=>{
|
|
6696
6686
|
while(current_els.length)current_els.pop();
|
|
@@ -6698,14 +6688,14 @@ function $3721a5ccba25c247$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6698
6688
|
});
|
|
6699
6689
|
};
|
|
6700
6690
|
if (initial_value != null) update_state(initial_value);
|
|
6701
|
-
$3721a5ccba25c247$var$connection_map.set(
|
|
6691
|
+
$3721a5ccba25c247$var$connection_map.set(current_els, (set_template_array)=>{
|
|
6702
6692
|
subscriber_array_fns.add(set_template_array);
|
|
6703
6693
|
set_template_array(current_els);
|
|
6704
6694
|
return {
|
|
6705
6695
|
get_state_: get_state,
|
|
6706
6696
|
unsubscribe_: ()=>subscriber_array_fns.delete(set_template_array)
|
|
6707
6697
|
};
|
|
6708
|
-
})
|
|
6698
|
+
});
|
|
6709
6699
|
return [
|
|
6710
6700
|
current_els,
|
|
6711
6701
|
get_state,
|
package/dist/module.js
CHANGED
|
@@ -4,7 +4,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
4
4
|
function $parcel$interopDefault(a) {
|
|
5
5
|
return a && a.__esModule ? a.default : a;
|
|
6
6
|
}
|
|
7
|
-
const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.
|
|
7
|
+
const $0766c85d387a9765$export$83d89fbfd8236492 = "0.0.64";
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
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" && (document.currentScript?.dataset?.debug === "true" || localStorage.getItem("debug") === "true"))();
|
|
@@ -6370,12 +6370,12 @@ function $556d9c321900f1d4$var$scroll_idle(slider, chunk_size, clones_per_side)
|
|
|
6370
6370
|
|
|
6371
6371
|
|
|
6372
6372
|
|
|
6373
|
-
const $49c4fa2e27e642fa$var$connection_map = /*@__PURE__*/ new
|
|
6373
|
+
const $49c4fa2e27e642fa$var$connection_map = /*@__PURE__*/ new WeakMap();
|
|
6374
6374
|
function $49c4fa2e27e642fa$export$3d04c40e7acc1a32(initial_value) {
|
|
6375
6375
|
let subscribed = false;
|
|
6376
6376
|
const subscriber_array_fns = new Set();
|
|
6377
6377
|
const template_text_node = document.createTextNode("");
|
|
6378
|
-
|
|
6378
|
+
const current_els = [
|
|
6379
6379
|
template_text_node
|
|
6380
6380
|
];
|
|
6381
6381
|
let state;
|
|
@@ -6409,18 +6409,8 @@ function $49c4fa2e27e642fa$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6409
6409
|
current_els.push(...array_with_replacewithable_nodes);
|
|
6410
6410
|
for (const set_fn of subscriber_array_fns)set_fn(array_with_replacewithable_nodes);
|
|
6411
6411
|
state = new_value;
|
|
6412
|
-
// set subscribed and then synchronize here if should subscribe
|
|
6413
|
-
|
|
6414
|
-
for (const [key, value] of $49c4fa2e27e642fa$var$connection_map){
|
|
6415
|
-
const derefed_key = key.deref();
|
|
6416
|
-
if (derefed_key === new_value) {
|
|
6417
|
-
const derefed_value = value.deref();
|
|
6418
|
-
if (derefed_value) {
|
|
6419
|
-
connection_fn = derefed_value;
|
|
6420
|
-
break;
|
|
6421
|
-
}
|
|
6422
|
-
}
|
|
6423
|
-
}
|
|
6412
|
+
// set subscribed and then synchronize here, if should subscribe
|
|
6413
|
+
const connection_fn = $49c4fa2e27e642fa$var$connection_map.get(new_value /* if we get updated to the `elements` of another reactive_template it has to be an array */ );
|
|
6424
6414
|
if (connection_fn) // merge with reactive_template we got set to
|
|
6425
6415
|
subscribed = connection_fn((new_state)=>{
|
|
6426
6416
|
while(current_els.length)current_els.pop();
|
|
@@ -6428,14 +6418,14 @@ function $49c4fa2e27e642fa$export$3d04c40e7acc1a32(initial_value) {
|
|
|
6428
6418
|
});
|
|
6429
6419
|
};
|
|
6430
6420
|
if (initial_value != null) update_state(initial_value);
|
|
6431
|
-
$49c4fa2e27e642fa$var$connection_map.set(
|
|
6421
|
+
$49c4fa2e27e642fa$var$connection_map.set(current_els, (set_template_array)=>{
|
|
6432
6422
|
subscriber_array_fns.add(set_template_array);
|
|
6433
6423
|
set_template_array(current_els);
|
|
6434
6424
|
return {
|
|
6435
6425
|
get_state_: get_state,
|
|
6436
6426
|
unsubscribe_: ()=>subscriber_array_fns.delete(set_template_array)
|
|
6437
6427
|
};
|
|
6438
|
-
})
|
|
6428
|
+
});
|
|
6439
6429
|
return [
|
|
6440
6430
|
current_els,
|
|
6441
6431
|
get_state,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/utilishared",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@babel/core": "latest",
|
|
44
44
|
"@babel/runtime": "latest",
|
|
45
45
|
"@babel/runtime-corejs3": "latest",
|
|
46
|
-
"@depict-ai/types": "^0.0.
|
|
46
|
+
"@depict-ai/types": "^0.0.19",
|
|
47
47
|
"@parcel/resolver-default": "^2.8.0",
|
|
48
48
|
"@sentry/cli": "latest",
|
|
49
49
|
"@sentry/types": "^7.13.0",
|