@depict-ai/utilishared 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/latest/index.cjs CHANGED
@@ -271,7 +271,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
271
271
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
272
272
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
273
273
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
274
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.3";
274
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.4";
275
275
  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"))();
276
276
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
277
277
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -4000,11 +4000,11 @@ const $1683d0164abd7c1d$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<d
4000
4000
  $1683d0164abd7c1d$var$_tmpl$4 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
4001
4001
  class $1683d0164abd7c1d$export$692b27c28639e5b9 {
4002
4002
  // this is just here because it's often needed together with the slider
4003
- container = $1683d0164abd7c1d$var$_tmpl$();
4003
+ container = $z0IcO$solidjsweb.getNextElement($1683d0164abd7c1d$var$_tmpl$);
4004
4004
  #elements = {
4005
- sliding_el_: $1683d0164abd7c1d$var$_tmpl$2(),
4006
- left_: $1683d0164abd7c1d$var$_tmpl$3(),
4007
- right_: $1683d0164abd7c1d$var$_tmpl$4()
4005
+ sliding_el_: $z0IcO$solidjsweb.getNextElement($1683d0164abd7c1d$var$_tmpl$2),
4006
+ left_: $z0IcO$solidjsweb.getNextElement($1683d0164abd7c1d$var$_tmpl$3),
4007
+ right_: $z0IcO$solidjsweb.getNextElement($1683d0164abd7c1d$var$_tmpl$4)
4008
4008
  };
4009
4009
  insert_here = this.#elements.sliding_el_;
4010
4010
  intersecting_items_object = {};
@@ -5113,7 +5113,7 @@ function $66a2a93dfa520bc6$var$setup_load_more(t, root, chunk_size, view_more_te
5113
5113
  } = t,
5114
5114
  load_more_cont = $bf7f12fe044e41b2$export$d3e2a0560cbf4787(`<div class="load-more-container"></div>`),
5115
5115
  load_button = load_more_cont.appendChild((() => {
5116
- const _el$ = $66a2a93dfa520bc6$var$_tmpl$();
5116
+ const _el$ = $z0IcO$solidjsweb.getNextElement($66a2a93dfa520bc6$var$_tmpl$);
5117
5117
  $z0IcO$solidjsweb.insert(_el$, view_more_text);
5118
5118
  return _el$;
5119
5119
  })());
@@ -5264,8 +5264,8 @@ const $107a74aa4ea5902d$export$ffb0004e005737fa = ({
5264
5264
  };
5265
5265
  const $c3af1bfb402a8820$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
5266
5266
  $c3af1bfb402a8820$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
5267
- const $c3af1bfb402a8820$export$dc84183312f0c201 = /*@__PURE__*/(() => $c3af1bfb402a8820$var$_tmpl$())();
5268
- const $c3af1bfb402a8820$export$6038895ac52bd044 = /*@__PURE__*/(() => $c3af1bfb402a8820$var$_tmpl$2())();
5267
+ const $c3af1bfb402a8820$export$dc84183312f0c201 = /*@__PURE__*/(() => $z0IcO$solidjsweb.getNextElement($c3af1bfb402a8820$var$_tmpl$))();
5268
+ const $c3af1bfb402a8820$export$6038895ac52bd044 = /*@__PURE__*/(() => $z0IcO$solidjsweb.getNextElement($c3af1bfb402a8820$var$_tmpl$2))();
5269
5269
  const $febdc40c8da5c25e$export$68c017fd93791405 = ({
5270
5270
  duration = 500
5271
5271
  } = {
@@ -5323,7 +5323,7 @@ async function $1cc2444a0f1b992e$export$c84671f46d6a1ca({
5323
5323
  ipns: ipns
5324
5324
  } = rows_or_empty_object;
5325
5325
  const is_static = !ipns && !button;
5326
- const our_style_el = $1cc2444a0f1b992e$var$_tmpl$();
5326
+ const our_style_el = $z0IcO$solidjsweb.getNextElement($1cc2444a0f1b992e$var$_tmpl$);
5327
5327
  const container_class = $650b64c1b384c895$export$a6db784f019668ba();
5328
5328
  const selector_beginning = `.depict .${container_class}>`;
5329
5329
  const el_count_ipns = $9a42a570de51ea3d$export$e806c6c1615a59ae();
@@ -5361,7 +5361,7 @@ async function $1cc2444a0f1b992e$export$c84671f46d6a1ca({
5361
5361
  if (button) {
5362
5362
  button_class = $650b64c1b384c895$export$a6db784f019668ba();
5363
5363
  const button_container = (() => {
5364
- const _el$2 = $1cc2444a0f1b992e$var$_tmpl$2();
5364
+ const _el$2 = $z0IcO$solidjsweb.getNextElement($1cc2444a0f1b992e$var$_tmpl$2);
5365
5365
  $z0IcO$solidjsweb.className(_el$2, "load-more-container " + button_class);
5366
5366
  $z0IcO$solidjsweb.insert(_el$2, () => $90e0b983530610e7$export$f63fcc839cb0f734("click", () => ipns(ipns.state + (rows_or_empty_object.rows_per_click ?? 1)), button));
5367
5367
  return _el$2;
@@ -5663,7 +5663,7 @@ function $a8a0385b88626561$export$80039a49055269fb() {
5663
5663
  }
5664
5664
  const $edc9fe0b09e00df6$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
5665
5665
  function $edc9fe0b09e00df6$export$af88b4929c2dc86() {
5666
- const img = $edc9fe0b09e00df6$var$_tmpl$();
5666
+ const img = $z0IcO$solidjsweb.getNextElement($edc9fe0b09e00df6$var$_tmpl$);
5667
5667
  return {
5668
5668
  left: [img],
5669
5669
  right: [img.cloneNode()]
@@ -5758,7 +5758,7 @@ function $158313c0231e6555$export$1d17a045bcc711b1({
5758
5758
  }
5759
5759
  function $158313c0231e6555$export$a09282b33e69b43f(unique_name) {
5760
5760
  return (() => {
5761
- const _el$ = $158313c0231e6555$var$_tmpl$(),
5761
+ const _el$ = $z0IcO$solidjsweb.getNextElement($158313c0231e6555$var$_tmpl$),
5762
5762
  _el$2 = _el$.firstChild;
5763
5763
  $z0IcO$solidjsweb.setAttribute(_el$2, "name", `radio-${unique_name}`);
5764
5764
  return _el$;
@@ -5935,8 +5935,8 @@ const $1942530ef27e571b$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<d
5935
5935
  $1942530ef27e571b$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict_slider_scroll_container>`);
5936
5936
  function $1942530ef27e571b$export$93223e488e7ee078(options) {
5937
5937
  function constructor_plugin(_slider_options) {
5938
- const scroll_bar = $1942530ef27e571b$var$_tmpl$();
5939
- const scroll_container = $1942530ef27e571b$var$_tmpl$2();
5938
+ const scroll_bar = $z0IcO$solidjsweb.getNextElement($1942530ef27e571b$var$_tmpl$);
5939
+ const scroll_container = $z0IcO$solidjsweb.getNextElement($1942530ef27e571b$var$_tmpl$2);
5940
5940
  if (options.scroll_bar_classes?.length) scroll_bar.classList.add(...options.scroll_bar_classes);
5941
5941
  if (options.scroll_container_classes?.length) scroll_container.classList.add(...options.scroll_container_classes);
5942
5942
  // Default styles always present
@@ -5993,7 +5993,7 @@ function $6af20338fcad1911$export$b36d2489a5a16728(_t, {
5993
5993
  }
5994
5994
  async function $6af20338fcad1911$export$49b950309ab787ad() {
5995
5995
  if ("scrollBehavior" in document.documentElement.style) return true;
5996
- const test_div = $6af20338fcad1911$var$_tmpl$();
5996
+ const test_div = $z0IcO$solidjsweb.getNextElement($6af20338fcad1911$var$_tmpl$);
5997
5997
  const body = await (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("body");
5998
5998
  body.append(test_div);
5999
5999
  test_div.scrollLeft = 1;
@@ -7499,11 +7499,12 @@ function $dba3e72fb3e5c53d$export$4a3043e508dd72f0({
7499
7499
  ...attributes
7500
7500
  }) {
7501
7501
  const button = (() => {
7502
- const _el$ = $dba3e72fb3e5c53d$var$_tmpl$();
7502
+ const _el$ = $z0IcO$solidjsweb.getNextElement($dba3e72fb3e5c53d$var$_tmpl$);
7503
7503
  $z0IcO$solidjsweb.spread(_el$, $z0IcO$solidjsweb.mergeProps(attributes, {
7504
7504
  "type": "button"
7505
7505
  }), false, true);
7506
7506
  $z0IcO$solidjsweb.insert(_el$, children);
7507
+ $z0IcO$solidjsweb.runHydrationEvents();
7507
7508
  return _el$;
7508
7509
  })();
7509
7510
  button.classList.add("show-more");
@@ -7511,7 +7512,7 @@ function $dba3e72fb3e5c53d$export$4a3043e508dd72f0({
7511
7512
  }
7512
7513
  const $a7550e9f97f84465$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=slidein-backdrop>`),
7513
7514
  $a7550e9f97f84465$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
7514
- $a7550e9f97f84465$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict>`);
7515
+ $a7550e9f97f84465$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict><!$><!/><!$><!/>`);
7515
7516
  async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7516
7517
  title_: title_,
7517
7518
  children: children,
@@ -7522,14 +7523,15 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7522
7523
  const open_promise = new Promise(r => close_ = r);
7523
7524
  const body = await (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("body");
7524
7525
  const backdrop = (() => {
7525
- const _el$ = $a7550e9f97f84465$var$_tmpl$();
7526
+ const _el$ = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$);
7526
7527
  $z0IcO$solidjsweb.addEventListener(_el$, "click", close_, true);
7528
+ $z0IcO$solidjsweb.runHydrationEvents();
7527
7529
  return _el$;
7528
7530
  })();
7529
7531
  const [exit_title_iterator, exitable_title_iterator] = $bbe52965151ee7f0$export$927664b47117acb0(title_);
7530
7532
  const closing_handlers = [exit_title_iterator];
7531
7533
  const slidein = (() => {
7532
- const _el$2 = $a7550e9f97f84465$var$_tmpl$2(),
7534
+ const _el$2 = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$2),
7533
7535
  _el$3 = _el$2.firstChild,
7534
7536
  _el$4 = _el$3.firstChild,
7535
7537
  _el$5 = _el$4.nextSibling,
@@ -7538,12 +7540,17 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7538
7540
  $z0IcO$solidjsweb.addEventListener(_el$5, "click", close_, true);
7539
7541
  $z0IcO$solidjsweb.insert(_el$5, CloseIcon);
7540
7542
  $z0IcO$solidjsweb.insert(_el$6, children);
7543
+ $z0IcO$solidjsweb.runHydrationEvents();
7541
7544
  return _el$2;
7542
7545
  })();
7543
7546
  const elements_in_container = (() => {
7544
- const _el$7 = $a7550e9f97f84465$var$_tmpl$3();
7545
- $z0IcO$solidjsweb.insert(_el$7, backdrop, null);
7546
- $z0IcO$solidjsweb.insert(_el$7, slidein, null);
7547
+ const _el$7 = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$3),
7548
+ _el$8 = _el$7.firstChild,
7549
+ [_el$9, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$8.nextSibling),
7550
+ _el$10 = _el$9.nextSibling,
7551
+ [_el$11, _co$2] = $z0IcO$solidjsweb.getNextMarker(_el$10.nextSibling);
7552
+ $z0IcO$solidjsweb.insert(_el$7, backdrop, _el$9, _co$);
7553
+ $z0IcO$solidjsweb.insert(_el$7, slidein, _el$11, _co$2);
7547
7554
  return _el$7;
7548
7555
  })();
7549
7556
  body.append(elements_in_container);
@@ -7595,7 +7602,7 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7595
7602
  }
7596
7603
  $z0IcO$solidjsweb.delegateEvents(["click"]);
7597
7604
  const $bd0fccdac6624b01$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=option-list>`),
7598
- $bd0fccdac6624b01$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button type=button><span class=size>`),
7605
+ $bd0fccdac6624b01$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button type=button><span class=size></span><!$><!/>`),
7599
7606
  $bd0fccdac6624b01$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<span class=sold-out>`);
7600
7607
  async function $bd0fccdac6624b01$export$c068ad5361be7646({
7601
7608
  title_: title_,
@@ -7613,15 +7620,17 @@ async function $bd0fccdac6624b01$export$c068ad5361be7646({
7613
7620
  CloseIcon: CloseIcon,
7614
7621
  title_: title_,
7615
7622
  children: [(() => {
7616
- const _el$ = $bd0fccdac6624b01$var$_tmpl$();
7623
+ const _el$ = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$);
7617
7624
  $z0IcO$solidjsweb.insert(_el$, () => items_.map(({
7618
7625
  size_name_: size_name_,
7619
7626
  is_available_: is_available_,
7620
7627
  id_: id_
7621
7628
  }) => {
7622
7629
  const button = (() => {
7623
- const _el$2 = $bd0fccdac6624b01$var$_tmpl$2(),
7624
- _el$3 = _el$2.firstChild;
7630
+ const _el$2 = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$2),
7631
+ _el$3 = _el$2.firstChild,
7632
+ _el$4 = _el$3.nextSibling,
7633
+ [_el$5, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$4.nextSibling);
7625
7634
  _el$2.$$click = () => {
7626
7635
  size_selected(id_);
7627
7636
  close_();
@@ -7629,10 +7638,11 @@ async function $bd0fccdac6624b01$export$c068ad5361be7646({
7629
7638
  $z0IcO$solidjsweb.className(_el$2, "option" + (is_available_ ? " available" : ""));
7630
7639
  $z0IcO$solidjsweb.insert(_el$3, size_name_);
7631
7640
  $z0IcO$solidjsweb.insert(_el$2, !is_available_ && (() => {
7632
- const _el$4 = $bd0fccdac6624b01$var$_tmpl$3();
7633
- $z0IcO$solidjsweb.insert(_el$4, () => $374ca311b64f260b$export$7c081fdbc65b6a2a(exitable_oos_iterator));
7634
- return _el$4;
7635
- })(), null);
7641
+ const _el$6 = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$3);
7642
+ $z0IcO$solidjsweb.insert(_el$6, () => $374ca311b64f260b$export$7c081fdbc65b6a2a(exitable_oos_iterator));
7643
+ return _el$6;
7644
+ })(), _el$5, _co$);
7645
+ $z0IcO$solidjsweb.runHydrationEvents();
7636
7646
  return _el$2;
7637
7647
  })();
7638
7648
  if (!is_available_) button.disabled = true;
@@ -7663,10 +7673,11 @@ const $e587cb3b31b82f43$export$84712d0562a614b8 = ({
7663
7673
  $e587cb3b31b82f43$var$inserted = true;
7664
7674
  }
7665
7675
  return (() => {
7666
- const _el$ = $e587cb3b31b82f43$var$_tmpl$();
7676
+ const _el$ = $z0IcO$solidjsweb.getNextElement($e587cb3b31b82f43$var$_tmpl$);
7667
7677
  $z0IcO$solidjsweb.className(_el$, `depict-placeholder${extra_classes ? " " + extra_classes : ""}`);
7668
7678
  $z0IcO$solidjsweb.spread(_el$, attributes, false, false);
7669
7679
  $z0IcO$solidjsweb.effect(_$p => $z0IcO$solidjsweb.style(_el$, style ? style : `width:${width};height:${height};`, _$p));
7680
+ $z0IcO$solidjsweb.runHydrationEvents();
7670
7681
  return _el$;
7671
7682
  })();
7672
7683
  };
@@ -7678,22 +7689,24 @@ const $e587cb3b31b82f43$export$d613f5b6d0a331a8 = ({
7678
7689
  style: `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`
7679
7690
  }, attributes));
7680
7691
  };
7681
- const $b9c0746e4d18273a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class="depict recommendation_container"><div class=grid>`),
7692
+ const $b9c0746e4d18273a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class="depict recommendation_container"><!$><!/><div class=grid>`),
7682
7693
  $b9c0746e4d18273a$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<h4 class=recs_header>`);
7683
7694
  const $b9c0746e4d18273a$export$97f31f44c68c1d5 = (title, surface_classes = []) => $90e0b983530610e7$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
7684
- const _el$ = $b9c0746e4d18273a$var$_tmpl$(),
7685
- _el$2 = _el$.firstChild;
7695
+ const _el$ = $z0IcO$solidjsweb.getNextElement($b9c0746e4d18273a$var$_tmpl$),
7696
+ _el$3 = _el$.firstChild,
7697
+ [_el$4, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$3.nextSibling),
7698
+ _el$2 = _el$4.nextSibling;
7686
7699
  $z0IcO$solidjsweb.insert(_el$, title && typeof title === "string" ? (() => {
7687
- const _el$3 = $b9c0746e4d18273a$var$_tmpl$2();
7688
- $z0IcO$solidjsweb.insert(_el$3, title);
7689
- return _el$3;
7690
- })() : title, _el$2);
7700
+ const _el$5 = $z0IcO$solidjsweb.getNextElement($b9c0746e4d18273a$var$_tmpl$2);
7701
+ $z0IcO$solidjsweb.insert(_el$5, title);
7702
+ return _el$5;
7703
+ })() : title, _el$4, _co$);
7691
7704
  return _el$;
7692
7705
  })());
7693
7706
  const $69accc27bcbd6972$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
7694
7707
  $69accc27bcbd6972$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
7695
- const $69accc27bcbd6972$export$32a55d57d151bc5a = () => $69accc27bcbd6972$var$_tmpl$();
7696
- const $69accc27bcbd6972$export$ddd70fdae1b350e6 = () => $69accc27bcbd6972$var$_tmpl$2();
7708
+ const $69accc27bcbd6972$export$32a55d57d151bc5a = () => $z0IcO$solidjsweb.getNextElement($69accc27bcbd6972$var$_tmpl$);
7709
+ const $69accc27bcbd6972$export$ddd70fdae1b350e6 = () => $z0IcO$solidjsweb.getNextElement($69accc27bcbd6972$var$_tmpl$2);
7697
7710
  const $af92e61c7dfccf01$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
7698
7711
  $af92e61c7dfccf01$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=color-picker role=form aria-label="Color picker">`);
7699
7712
  /**
@@ -7706,7 +7719,7 @@ function $af92e61c7dfccf01$var$ColorCircle({
7706
7719
  onHoverUpdate: onHoverUpdate
7707
7720
  }) {
7708
7721
  const button = (() => {
7709
- const _el$ = $af92e61c7dfccf01$var$_tmpl$(),
7722
+ const _el$ = $z0IcO$solidjsweb.getNextElement($af92e61c7dfccf01$var$_tmpl$),
7710
7723
  _el$2 = _el$.firstChild,
7711
7724
  _el$3 = _el$2.firstChild;
7712
7725
  _el$.$$click = e => onClick(e.currentTarget, color);
@@ -7723,6 +7736,7 @@ function $af92e61c7dfccf01$var$ColorCircle({
7723
7736
  _v$2: undefined,
7724
7737
  _v$3: undefined
7725
7738
  });
7739
+ $z0IcO$solidjsweb.runHydrationEvents();
7726
7740
  return _el$;
7727
7741
  })();
7728
7742
  button.addEventListener("mouseenter", $268cbd9e4ade92db$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
@@ -7791,7 +7805,7 @@ function $af92e61c7dfccf01$export$590326cc34f49e2d({
7791
7805
  if (initial_index > -1) setActiveIndex(initial_index);
7792
7806
  if (onlyCircles) return circles;
7793
7807
  return (() => {
7794
- const _el$4 = $af92e61c7dfccf01$var$_tmpl$2();
7808
+ const _el$4 = $z0IcO$solidjsweb.getNextElement($af92e61c7dfccf01$var$_tmpl$2);
7795
7809
  $z0IcO$solidjsweb.insert(_el$4, circles);
7796
7810
  return _el$4;
7797
7811
  })();
@@ -7825,12 +7839,12 @@ const $b25f388f0fe2f1b3$export$237455ad7e59d4e5 = ({
7825
7839
  }) => {
7826
7840
  if (Array.isArray(children) && children.length === 1) children = children[0];
7827
7841
  innerRef = (() => {
7828
- const _el$ = $b25f388f0fe2f1b3$var$_tmpl$();
7842
+ const _el$ = $z0IcO$solidjsweb.getNextElement($b25f388f0fe2f1b3$var$_tmpl$);
7829
7843
  $z0IcO$solidjsweb.insert(_el$, children);
7830
7844
  return _el$;
7831
7845
  })();
7832
7846
  outerRef = (() => {
7833
- const _el$2 = $b25f388f0fe2f1b3$var$_tmpl$2();
7847
+ const _el$2 = $z0IcO$solidjsweb.getNextElement($b25f388f0fe2f1b3$var$_tmpl$2);
7834
7848
  $z0IcO$solidjsweb.insert(_el$2, innerRef);
7835
7849
  return _el$2;
7836
7850
  })();
@@ -7965,8 +7979,9 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
7965
7979
  $e6c6e7929ea385ae$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
7966
7980
  $548fd58b14b25a52$export$8048b892d651b310(new Error("no image src provided: " + src));
7967
7981
  return (() => {
7968
- const _el$ = $ff973b2032639b5f$var$_tmpl$();
7982
+ const _el$ = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$);
7969
7983
  $z0IcO$solidjsweb.spread(_el$, image_options, false, false);
7984
+ $z0IcO$solidjsweb.runHydrationEvents();
7970
7985
  return _el$;
7971
7986
  })(); // we don't want everything to fail if someone misused this component
7972
7987
  }
@@ -7978,13 +7993,14 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
7978
7993
  const format = formats[i];
7979
7994
  const srcset = $ff973b2032639b5f$var$make_srcset(src, format, resolutions);
7980
7995
  sources.push((() => {
7981
- const _el$2 = $ff973b2032639b5f$var$_tmpl$2();
7996
+ const _el$2 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$2);
7982
7997
  $z0IcO$solidjsweb.setAttribute(_el$2, "type", `image/${format}`);
7983
7998
  $z0IcO$solidjsweb.spread(_el$2, set_dataset ? {
7984
7999
  "data-srcset": srcset
7985
8000
  } : {
7986
8001
  srcset: srcset
7987
8002
  }, false, false);
8003
+ $z0IcO$solidjsweb.runHydrationEvents();
7988
8004
  return _el$2;
7989
8005
  })());
7990
8006
  }
@@ -7994,8 +8010,9 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
7994
8010
  delete opts_without_src["src"];
7995
8011
  delete opts_without_src["srcset"];
7996
8012
  const the_image = (() => {
7997
- const _el$3 = $ff973b2032639b5f$var$_tmpl$();
8013
+ const _el$3 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$);
7998
8014
  $z0IcO$solidjsweb.spread(_el$3, opts_without_src, false, false);
8015
+ $z0IcO$solidjsweb.runHydrationEvents();
7999
8016
  return _el$3;
8000
8017
  })(); // create image
8001
8018
  sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
@@ -8005,7 +8022,7 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
8005
8022
  for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $548fd58b14b25a52$export$8048b892d651b310));
8006
8023
  // embed all sources into a <picture> so that the browser understands they're "together"
8007
8024
  const picture = (() => {
8008
- const _el$4 = $ff973b2032639b5f$var$_tmpl$3();
8025
+ const _el$4 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$3);
8009
8026
  $z0IcO$solidjsweb.insert(_el$4, sources);
8010
8027
  return _el$4;
8011
8028
  })();
@@ -8039,7 +8056,7 @@ function $ff973b2032639b5f$var$optimized_img_url_generator(format, url, width) {
8039
8056
  }
8040
8057
  const $a312bccd722ac9e4$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`),
8041
8058
  $a312bccd722ac9e4$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<canvas class=depict-img-filler height=3000>`),
8042
- $a312bccd722ac9e4$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont>`);
8059
+ $a312bccd722ac9e4$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont></div><!$><!/>`);
8043
8060
  const $a312bccd722ac9e4$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
8044
8061
  // Add nolazy to placeholders to avoid errors with the stupid lazyfier
8045
8062
  const $a312bccd722ac9e4$var$add_nolazy_to_placeholder = type => type === "placeholder" ? "nolazy" : "";
@@ -8069,7 +8086,7 @@ function $a312bccd722ac9e4$var$Image({
8069
8086
  ...image_options
8070
8087
  }) {
8071
8088
  const div = (() => {
8072
- const _el$ = $a312bccd722ac9e4$var$_tmpl$();
8089
+ const _el$ = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$);
8073
8090
  $z0IcO$solidjsweb.effect(_$p => $z0IcO$solidjsweb.style(_el$, `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`, _$p));
8074
8091
  return _el$;
8075
8092
  })();
@@ -8095,15 +8112,17 @@ function $a312bccd722ac9e4$var$CompatibleImage({
8095
8112
  ...image_options
8096
8113
  }) {
8097
8114
  const canvas = (() => {
8098
- const _el$2 = $a312bccd722ac9e4$var$_tmpl$2();
8115
+ const _el$2 = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$2);
8099
8116
  $z0IcO$solidjsweb.setAttribute(_el$2, "width", 3000 * aspect_ratio);
8100
8117
  return _el$2;
8101
8118
  })();
8102
8119
  const sourceset_component = $a312bccd722ac9e4$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
8103
8120
  const IMG_tag = image_options.src?.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
8104
8121
  return (() => {
8105
- const _el$3 = $a312bccd722ac9e4$var$_tmpl$3(),
8106
- _el$4 = _el$3.firstChild;
8122
+ const _el$3 = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$3),
8123
+ _el$4 = _el$3.firstChild,
8124
+ _el$5 = _el$4.nextSibling,
8125
+ [_el$6, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$5.nextSibling);
8107
8126
  $z0IcO$solidjsweb.insert(_el$4, $z0IcO$solidjsweb.createComponent(IMG_tag, $z0IcO$solidjsweb.mergeProps({
8108
8127
  alt: alt
8109
8128
  }, remove_on_error ? {
@@ -8113,7 +8132,7 @@ function $a312bccd722ac9e4$var$CompatibleImage({
8113
8132
  return $90e0b983530610e7$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $a312bccd722ac9e4$var$add_nolazy_to_placeholder(rendering_options?.type)]);
8114
8133
  }
8115
8134
  })));
8116
- $z0IcO$solidjsweb.insert(_el$3, canvas, null);
8135
+ $z0IcO$solidjsweb.insert(_el$3, canvas, _el$6, _co$);
8117
8136
  return _el$3;
8118
8137
  })();
8119
8138
  }
@@ -8134,7 +8153,7 @@ function $a312bccd722ac9e4$var$srcset_comp_from_map_or_new(rendering_options, sr
8134
8153
  }
8135
8154
  var $db57c943efeaebed$exports = {};
8136
8155
  $db57c943efeaebed$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
8137
- const $a656daa2fa8c279a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=images-container><div class=main-image-container>`),
8156
+ const $a656daa2fa8c279a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=images-container><!$><!/><div class=main-image-container>`),
8138
8157
  $a656daa2fa8c279a$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=second-image-container>`);
8139
8158
  // Saving bytez
8140
8159
  // Maybe? @Daniel
@@ -8276,13 +8295,15 @@ const $a656daa2fa8c279a$export$2369f6fc1c911576 = ({
8276
8295
  });
8277
8296
  const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
8278
8297
  const images_container = (() => {
8279
- const _el$ = $a656daa2fa8c279a$var$_tmpl$(),
8280
- _el$2 = _el$.firstChild;
8298
+ const _el$ = $z0IcO$solidjsweb.getNextElement($a656daa2fa8c279a$var$_tmpl$),
8299
+ _el$3 = _el$.firstChild,
8300
+ [_el$4, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$3.nextSibling),
8301
+ _el$2 = _el$4.nextSibling;
8281
8302
  $z0IcO$solidjsweb.insert(_el$, !no_second_img && (() => {
8282
- const _el$3 = $a656daa2fa8c279a$var$_tmpl$2();
8283
- $z0IcO$solidjsweb.insert(_el$3, second_image);
8284
- return _el$3;
8285
- })(), _el$2);
8303
+ const _el$5 = $z0IcO$solidjsweb.getNextElement($a656daa2fa8c279a$var$_tmpl$2);
8304
+ $z0IcO$solidjsweb.insert(_el$5, second_image);
8305
+ return _el$5;
8306
+ })(), _el$4, _co$);
8286
8307
  $z0IcO$solidjsweb.insert(_el$2, main_image);
8287
8308
  return _el$;
8288
8309
  })();
package/latest/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- /// <reference path="../jsx.d.ts" />
2
1
  import { JSX, Accessor } from "solid-js";
3
- export const version = "2.0.3";
2
+ export const version = "2.0.4";
4
3
  export const is_debug: boolean;
5
4
  /**
6
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.