@depict-ai/utilishared 2.0.3 → 2.0.5

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 CHANGED
@@ -274,7 +274,7 @@ $parcel$export(module.exports, "version", () => $ce0ab19b284b64fa$export$83d89fb
274
274
  $parcel$export(module.exports, "add_to_version_info", () => $045fb30107c9eecc$export$2cefb7e61fcbae00);
275
275
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $84d13ab567309a50$export$c3f56a35e076f139);
276
276
  $parcel$export(module.exports, "use_href_accessor", () => $59b7011b96010a8e$export$e35115e6d0715f77);
277
- const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.3";
277
+ const $ce0ab19b284b64fa$export$83d89fbfd8236492 = "2.0.5";
278
278
  const $9e9538f4aff6f83c$export$55fe61489d2c7417 = /*@__PURE__*/((_globalThis$document, _globalThis$document$, _globalThis$document$2, _globalThis$localStor, _globalThis$localStor2) => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && ((globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : (_globalThis$document$ = _globalThis$document.currentScript) === null || _globalThis$document$ === void 0 ? void 0 : (_globalThis$document$2 = _globalThis$document$.dataset) === null || _globalThis$document$2 === void 0 ? void 0 : _globalThis$document$2.debug) === "true" || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$localStor = globalThis.localStorage) === null || _globalThis$localStor === void 0 ? void 0 : (_globalThis$localStor2 = _globalThis$localStor.getItem) === null || _globalThis$localStor2 === void 0 ? void 0 : _globalThis$localStor2.call(_globalThis$localStor, "debug")) === "true"))();
279
279
  const $7f95f77417d06249$var$browser_prefix_styling = "color: #fff;";
280
280
  let $7f95f77417d06249$var$browser_prefix = "[Depict]";
@@ -4597,13 +4597,13 @@ class $08a94efe56c2b35f$export$692b27c28639e5b9 {
4597
4597
  $08a94efe56c2b35f$var$_classPrivateMethodInitSpec(this, $08a94efe56c2b35f$var$_hide_buttons_if_needed);
4598
4598
  $08a94efe56c2b35f$var$_classPrivateMethodInitSpec(this, $08a94efe56c2b35f$var$_observer_callback);
4599
4599
  $08a94efe56c2b35f$var$_classPrivateMethodInitSpec(this, $08a94efe56c2b35f$var$_observe_element);
4600
- $parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "container", $08a94efe56c2b35f$var$_tmpl$());
4600
+ $parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "container", $bBfCy$solidjsweb.getNextElement($08a94efe56c2b35f$var$_tmpl$));
4601
4601
  $08a94efe56c2b35f$var$_classPrivateFieldInitSpec(this, $08a94efe56c2b35f$var$_elements, {
4602
4602
  writable: true,
4603
4603
  value: {
4604
- sliding_el_: $08a94efe56c2b35f$var$_tmpl$2(),
4605
- left_: $08a94efe56c2b35f$var$_tmpl$3(),
4606
- right_: $08a94efe56c2b35f$var$_tmpl$4()
4604
+ sliding_el_: $bBfCy$solidjsweb.getNextElement($08a94efe56c2b35f$var$_tmpl$2),
4605
+ left_: $bBfCy$solidjsweb.getNextElement($08a94efe56c2b35f$var$_tmpl$3),
4606
+ right_: $bBfCy$solidjsweb.getNextElement($08a94efe56c2b35f$var$_tmpl$4)
4607
4607
  }
4608
4608
  });
4609
4609
  $parcel$interopDefault($bBfCy$babelruntimehelpersdefineProperty)(this, "insert_here", $parcel$interopDefault($bBfCy$babelruntimehelpersclassPrivateFieldGet)(this, $08a94efe56c2b35f$var$_elements).sliding_el_);
@@ -5609,7 +5609,7 @@ function $14c1124272475590$var$setup_load_more(t, root, chunk_size) {
5609
5609
  } = t,
5610
5610
  load_more_cont = $8b27923e1d1e6b99$export$d3e2a0560cbf4787('<div class="load-more-container"></div>'),
5611
5611
  load_button = load_more_cont.appendChild((() => {
5612
- const _el$ = $14c1124272475590$var$_tmpl$();
5612
+ const _el$ = $bBfCy$solidjsweb.getNextElement($14c1124272475590$var$_tmpl$);
5613
5613
  $bBfCy$solidjsweb.insert(_el$, view_more_text);
5614
5614
  return _el$;
5615
5615
  })());
@@ -5765,8 +5765,8 @@ const $f0d9ae7bf9bd697d$export$ffb0004e005737fa = (_ref2, _unknown) => {
5765
5765
  };
5766
5766
  const $5638de1dd37b2d4d$var$_tmpl$ = /*#__PURE__*/$bBfCy$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">`),
5767
5767
  $5638de1dd37b2d4d$var$_tmpl$2 = /*#__PURE__*/$bBfCy$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">`);
5768
- const $5638de1dd37b2d4d$export$dc84183312f0c201 = /*@__PURE__*/(() => $5638de1dd37b2d4d$var$_tmpl$())();
5769
- const $5638de1dd37b2d4d$export$6038895ac52bd044 = /*@__PURE__*/(() => $5638de1dd37b2d4d$var$_tmpl$2())();
5768
+ const $5638de1dd37b2d4d$export$dc84183312f0c201 = /*@__PURE__*/(() => $bBfCy$solidjsweb.getNextElement($5638de1dd37b2d4d$var$_tmpl$))();
5769
+ const $5638de1dd37b2d4d$export$6038895ac52bd044 = /*@__PURE__*/(() => $bBfCy$solidjsweb.getNextElement($5638de1dd37b2d4d$var$_tmpl$2))();
5770
5770
  const $591ebabd2d3823ef$export$68c017fd93791405 = function () {
5771
5771
  let {
5772
5772
  duration = 500
@@ -5827,7 +5827,7 @@ async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
5827
5827
  ipns: ipns
5828
5828
  } = rows_or_empty_object;
5829
5829
  const is_static = !ipns && !button;
5830
- const our_style_el = $0c2e69f971c62390$var$_tmpl$();
5830
+ const our_style_el = $bBfCy$solidjsweb.getNextElement($0c2e69f971c62390$var$_tmpl$);
5831
5831
  const container_class = $a13f25507f352177$export$a6db784f019668ba();
5832
5832
  const selector_beginning = ".depict .".concat(container_class, ">");
5833
5833
  const el_count_ipns = $76a59c6ce18c8fd3$export$e806c6c1615a59ae();
@@ -5867,7 +5867,7 @@ async function $0c2e69f971c62390$export$c84671f46d6a1ca(_ref) {
5867
5867
  if (button) {
5868
5868
  button_class = $a13f25507f352177$export$a6db784f019668ba();
5869
5869
  const button_container = (() => {
5870
- const _el$2 = $0c2e69f971c62390$var$_tmpl$2();
5870
+ const _el$2 = $bBfCy$solidjsweb.getNextElement($0c2e69f971c62390$var$_tmpl$2);
5871
5871
  $bBfCy$solidjsweb.className(_el$2, "load-more-container " + button_class);
5872
5872
  $bBfCy$solidjsweb.insert(_el$2, () => $51b78ec2cb40f07e$export$f63fcc839cb0f734("click", () => {
5873
5873
  var _rows_or_empty_object;
@@ -6177,7 +6177,7 @@ function $554d31c9eaabf6ae$export$80039a49055269fb() {
6177
6177
  }
6178
6178
  const $e193cbc89f3a1c6f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
6179
6179
  function $e193cbc89f3a1c6f$export$af88b4929c2dc86() {
6180
- const img = $e193cbc89f3a1c6f$var$_tmpl$();
6180
+ const img = $bBfCy$solidjsweb.getNextElement($e193cbc89f3a1c6f$var$_tmpl$);
6181
6181
  return {
6182
6182
  left: [img],
6183
6183
  right: [img.cloneNode()]
@@ -6277,7 +6277,7 @@ function $6f926ca76dc3b69a$export$1d17a045bcc711b1(_ref) {
6277
6277
  }
6278
6278
  function $6f926ca76dc3b69a$export$a09282b33e69b43f(unique_name) {
6279
6279
  return (() => {
6280
- const _el$ = $6f926ca76dc3b69a$var$_tmpl$(),
6280
+ const _el$ = $bBfCy$solidjsweb.getNextElement($6f926ca76dc3b69a$var$_tmpl$),
6281
6281
  _el$2 = _el$.firstChild;
6282
6282
  $bBfCy$solidjsweb.setAttribute(_el$2, "name", "radio-".concat(unique_name));
6283
6283
  return _el$;
@@ -6460,8 +6460,8 @@ const $c051348670fb93e1$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<d
6460
6460
  function $c051348670fb93e1$export$93223e488e7ee078(options) {
6461
6461
  function constructor_plugin(_slider_options) {
6462
6462
  var _options$scroll_bar_c, _options$scroll_conta;
6463
- const scroll_bar = $c051348670fb93e1$var$_tmpl$();
6464
- const scroll_container = $c051348670fb93e1$var$_tmpl$2();
6463
+ const scroll_bar = $bBfCy$solidjsweb.getNextElement($c051348670fb93e1$var$_tmpl$);
6464
+ const scroll_container = $bBfCy$solidjsweb.getNextElement($c051348670fb93e1$var$_tmpl$2);
6465
6465
  if ((_options$scroll_bar_c = options.scroll_bar_classes) !== null && _options$scroll_bar_c !== void 0 && _options$scroll_bar_c.length) scroll_bar.classList.add(...options.scroll_bar_classes);
6466
6466
  if ((_options$scroll_conta = options.scroll_container_classes) !== null && _options$scroll_conta !== void 0 && _options$scroll_conta.length) scroll_container.classList.add(...options.scroll_container_classes);
6467
6467
  // Default styles always present
@@ -6519,7 +6519,7 @@ function $d46a5140a5630463$export$b36d2489a5a16728(_t) {
6519
6519
  }
6520
6520
  async function $d46a5140a5630463$export$49b950309ab787ad() {
6521
6521
  if ("scrollBehavior" in document.documentElement.style) return true;
6522
- const test_div = $d46a5140a5630463$var$_tmpl$();
6522
+ const test_div = $bBfCy$solidjsweb.getNextElement($d46a5140a5630463$var$_tmpl$);
6523
6523
  const body = await (0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_element("body");
6524
6524
  body.append(test_div);
6525
6525
  test_div.scrollLeft = 1;
@@ -8093,11 +8093,12 @@ function $102c3c26150518b7$export$4a3043e508dd72f0(_ref) {
8093
8093
  ...attributes
8094
8094
  } = _ref;
8095
8095
  const button = (() => {
8096
- const _el$ = $102c3c26150518b7$var$_tmpl$();
8096
+ const _el$ = $bBfCy$solidjsweb.getNextElement($102c3c26150518b7$var$_tmpl$);
8097
8097
  $bBfCy$solidjsweb.spread(_el$, $bBfCy$solidjsweb.mergeProps(attributes, {
8098
8098
  "type": "button"
8099
8099
  }), false, true);
8100
8100
  $bBfCy$solidjsweb.insert(_el$, children);
8101
+ $bBfCy$solidjsweb.runHydrationEvents();
8101
8102
  return _el$;
8102
8103
  })();
8103
8104
  button.classList.add("show-more");
@@ -8105,7 +8106,7 @@ function $102c3c26150518b7$export$4a3043e508dd72f0(_ref) {
8105
8106
  }
8106
8107
  const $b99c603a5341f0ae$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=slidein-backdrop>`),
8107
8108
  $b99c603a5341f0ae$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
8108
- $b99c603a5341f0ae$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict>`);
8109
+ $b99c603a5341f0ae$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=depict><!$><!/><!$><!/>`);
8109
8110
  async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
8110
8111
  let {
8111
8112
  title_: title_,
@@ -8117,14 +8118,15 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
8117
8118
  const open_promise = new Promise(r => close_ = r);
8118
8119
  const body = await (0, $03c157d68c9fcbac$export$b6ae1bc530f4c149).wait_for_element("body");
8119
8120
  const backdrop = (() => {
8120
- const _el$ = $b99c603a5341f0ae$var$_tmpl$();
8121
+ const _el$ = $bBfCy$solidjsweb.getNextElement($b99c603a5341f0ae$var$_tmpl$);
8121
8122
  $bBfCy$solidjsweb.addEventListener(_el$, "click", close_, true);
8123
+ $bBfCy$solidjsweb.runHydrationEvents();
8122
8124
  return _el$;
8123
8125
  })();
8124
8126
  const [exit_title_iterator, exitable_title_iterator] = $c0c977a0f691adf3$export$927664b47117acb0(title_);
8125
8127
  const closing_handlers = [exit_title_iterator];
8126
8128
  const slidein = (() => {
8127
- const _el$2 = $b99c603a5341f0ae$var$_tmpl$2(),
8129
+ const _el$2 = $bBfCy$solidjsweb.getNextElement($b99c603a5341f0ae$var$_tmpl$2),
8128
8130
  _el$3 = _el$2.firstChild,
8129
8131
  _el$4 = _el$3.firstChild,
8130
8132
  _el$5 = _el$4.nextSibling,
@@ -8133,12 +8135,17 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
8133
8135
  $bBfCy$solidjsweb.addEventListener(_el$5, "click", close_, true);
8134
8136
  $bBfCy$solidjsweb.insert(_el$5, CloseIcon);
8135
8137
  $bBfCy$solidjsweb.insert(_el$6, children);
8138
+ $bBfCy$solidjsweb.runHydrationEvents();
8136
8139
  return _el$2;
8137
8140
  })();
8138
8141
  const elements_in_container = (() => {
8139
- const _el$7 = $b99c603a5341f0ae$var$_tmpl$3();
8140
- $bBfCy$solidjsweb.insert(_el$7, backdrop, null);
8141
- $bBfCy$solidjsweb.insert(_el$7, slidein, null);
8142
+ const _el$7 = $bBfCy$solidjsweb.getNextElement($b99c603a5341f0ae$var$_tmpl$3),
8143
+ _el$8 = _el$7.firstChild,
8144
+ [_el$9, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$8.nextSibling),
8145
+ _el$10 = _el$9.nextSibling,
8146
+ [_el$11, _co$2] = $bBfCy$solidjsweb.getNextMarker(_el$10.nextSibling);
8147
+ $bBfCy$solidjsweb.insert(_el$7, backdrop, _el$9, _co$);
8148
+ $bBfCy$solidjsweb.insert(_el$7, slidein, _el$11, _co$2);
8142
8149
  return _el$7;
8143
8150
  })();
8144
8151
  body.append(elements_in_container);
@@ -8191,7 +8198,7 @@ async function $b99c603a5341f0ae$export$8a0e4d6f6abf7e90(_ref) {
8191
8198
  }
8192
8199
  $bBfCy$solidjsweb.delegateEvents(["click"]);
8193
8200
  const $468dbae10b24d59f$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=option-list>`),
8194
- $468dbae10b24d59f$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button type=button><span class=size>`),
8201
+ $468dbae10b24d59f$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button type=button><span class=size></span><!$><!/>`),
8195
8202
  $468dbae10b24d59f$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<span class=sold-out>`);
8196
8203
  async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
8197
8204
  let {
@@ -8210,7 +8217,7 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
8210
8217
  CloseIcon: CloseIcon,
8211
8218
  title_: title_,
8212
8219
  children: [(() => {
8213
- const _el$ = $468dbae10b24d59f$var$_tmpl$();
8220
+ const _el$ = $bBfCy$solidjsweb.getNextElement($468dbae10b24d59f$var$_tmpl$);
8214
8221
  $bBfCy$solidjsweb.insert(_el$, () => items_.map(_ref2 => {
8215
8222
  let {
8216
8223
  size_name_: size_name_,
@@ -8218,8 +8225,10 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
8218
8225
  id_: id_
8219
8226
  } = _ref2;
8220
8227
  const button = (() => {
8221
- const _el$2 = $468dbae10b24d59f$var$_tmpl$2(),
8222
- _el$3 = _el$2.firstChild;
8228
+ const _el$2 = $bBfCy$solidjsweb.getNextElement($468dbae10b24d59f$var$_tmpl$2),
8229
+ _el$3 = _el$2.firstChild,
8230
+ _el$4 = _el$3.nextSibling,
8231
+ [_el$5, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$4.nextSibling);
8223
8232
  _el$2.$$click = () => {
8224
8233
  size_selected(id_);
8225
8234
  close_();
@@ -8227,10 +8236,11 @@ async function $468dbae10b24d59f$export$c068ad5361be7646(_ref) {
8227
8236
  $bBfCy$solidjsweb.className(_el$2, "option" + (is_available_ ? " available" : ""));
8228
8237
  $bBfCy$solidjsweb.insert(_el$3, size_name_);
8229
8238
  $bBfCy$solidjsweb.insert(_el$2, !is_available_ && (() => {
8230
- const _el$4 = $468dbae10b24d59f$var$_tmpl$3();
8231
- $bBfCy$solidjsweb.insert(_el$4, () => $fbf41b4abc726dbe$export$7c081fdbc65b6a2a(exitable_oos_iterator));
8232
- return _el$4;
8233
- })(), null);
8239
+ const _el$6 = $bBfCy$solidjsweb.getNextElement($468dbae10b24d59f$var$_tmpl$3);
8240
+ $bBfCy$solidjsweb.insert(_el$6, () => $fbf41b4abc726dbe$export$7c081fdbc65b6a2a(exitable_oos_iterator));
8241
+ return _el$6;
8242
+ })(), _el$5, _co$);
8243
+ $bBfCy$solidjsweb.runHydrationEvents();
8234
8244
  return _el$2;
8235
8245
  })();
8236
8246
  if (!is_available_) button.disabled = true;
@@ -8262,10 +8272,11 @@ const $ba9b4cd7e24de87e$export$84712d0562a614b8 = _ref => {
8262
8272
  $ba9b4cd7e24de87e$var$inserted = true;
8263
8273
  }
8264
8274
  return (() => {
8265
- const _el$ = $ba9b4cd7e24de87e$var$_tmpl$();
8275
+ const _el$ = $bBfCy$solidjsweb.getNextElement($ba9b4cd7e24de87e$var$_tmpl$);
8266
8276
  $bBfCy$solidjsweb.className(_el$, "depict-placeholder".concat(extra_classes ? " " + extra_classes : ""));
8267
8277
  $bBfCy$solidjsweb.spread(_el$, attributes, false, false);
8268
8278
  $bBfCy$solidjsweb.effect(_$p => $bBfCy$solidjsweb.style(_el$, style ? style : "width:".concat(width, ";height:").concat(height, ";"), _$p));
8279
+ $bBfCy$solidjsweb.runHydrationEvents();
8269
8280
  return _el$;
8270
8281
  })();
8271
8282
  };
@@ -8278,25 +8289,27 @@ const $ba9b4cd7e24de87e$export$d613f5b6d0a331a8 = _ref2 => {
8278
8289
  style: "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%")
8279
8290
  }, attributes));
8280
8291
  };
8281
- const $d500491aef2925c7$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class="depict recommendation_container"><div class=grid>`),
8292
+ const $d500491aef2925c7$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class="depict recommendation_container"><!$><!/><div class=grid>`),
8282
8293
  $d500491aef2925c7$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<h4 class=recs_header>`);
8283
8294
  const $d500491aef2925c7$export$97f31f44c68c1d5 = function (title) {
8284
8295
  let surface_classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
8285
8296
  return $51b78ec2cb40f07e$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
8286
- const _el$ = $d500491aef2925c7$var$_tmpl$(),
8287
- _el$2 = _el$.firstChild;
8297
+ const _el$ = $bBfCy$solidjsweb.getNextElement($d500491aef2925c7$var$_tmpl$),
8298
+ _el$3 = _el$.firstChild,
8299
+ [_el$4, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$3.nextSibling),
8300
+ _el$2 = _el$4.nextSibling;
8288
8301
  $bBfCy$solidjsweb.insert(_el$, title && typeof title === "string" ? (() => {
8289
- const _el$3 = $d500491aef2925c7$var$_tmpl$2();
8290
- $bBfCy$solidjsweb.insert(_el$3, title);
8291
- return _el$3;
8292
- })() : title, _el$2);
8302
+ const _el$5 = $bBfCy$solidjsweb.getNextElement($d500491aef2925c7$var$_tmpl$2);
8303
+ $bBfCy$solidjsweb.insert(_el$5, title);
8304
+ return _el$5;
8305
+ })() : title, _el$4, _co$);
8293
8306
  return _el$;
8294
8307
  })());
8295
8308
  };
8296
8309
  const $98ca99ff2fa5a542$var$_tmpl$ = /*#__PURE__*/$bBfCy$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">`),
8297
8310
  $98ca99ff2fa5a542$var$_tmpl$2 = /*#__PURE__*/$bBfCy$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">`);
8298
- const $98ca99ff2fa5a542$export$32a55d57d151bc5a = () => $98ca99ff2fa5a542$var$_tmpl$();
8299
- const $98ca99ff2fa5a542$export$ddd70fdae1b350e6 = () => $98ca99ff2fa5a542$var$_tmpl$2();
8311
+ const $98ca99ff2fa5a542$export$32a55d57d151bc5a = () => $bBfCy$solidjsweb.getNextElement($98ca99ff2fa5a542$var$_tmpl$);
8312
+ const $98ca99ff2fa5a542$export$ddd70fdae1b350e6 = () => $bBfCy$solidjsweb.getNextElement($98ca99ff2fa5a542$var$_tmpl$2);
8300
8313
  const $57a111eb846a8d6a$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
8301
8314
  $57a111eb846a8d6a$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=color-picker role=form aria-label="Color picker">`);
8302
8315
  /**
@@ -8310,7 +8323,7 @@ function $57a111eb846a8d6a$var$ColorCircle(_ref) {
8310
8323
  onHoverUpdate: onHoverUpdate
8311
8324
  } = _ref;
8312
8325
  const button = (() => {
8313
- const _el$ = $57a111eb846a8d6a$var$_tmpl$(),
8326
+ const _el$ = $bBfCy$solidjsweb.getNextElement($57a111eb846a8d6a$var$_tmpl$),
8314
8327
  _el$2 = _el$.firstChild,
8315
8328
  _el$3 = _el$2.firstChild;
8316
8329
  _el$.$$click = e => onClick(e.currentTarget, color);
@@ -8327,6 +8340,7 @@ function $57a111eb846a8d6a$var$ColorCircle(_ref) {
8327
8340
  _v$2: undefined,
8328
8341
  _v$3: undefined
8329
8342
  });
8343
+ $bBfCy$solidjsweb.runHydrationEvents();
8330
8344
  return _el$;
8331
8345
  })();
8332
8346
  button.addEventListener("mouseenter", $3b52ccc10510b32a$export$b3bbfd758f11cfa9(() => onHoverUpdate(button, color, true)));
@@ -8399,7 +8413,7 @@ function $57a111eb846a8d6a$export$590326cc34f49e2d(_ref2) {
8399
8413
  if (initial_index > -1) setActiveIndex(initial_index);
8400
8414
  if (onlyCircles) return circles;
8401
8415
  return (() => {
8402
- const _el$4 = $57a111eb846a8d6a$var$_tmpl$2();
8416
+ const _el$4 = $bBfCy$solidjsweb.getNextElement($57a111eb846a8d6a$var$_tmpl$2);
8403
8417
  $bBfCy$solidjsweb.insert(_el$4, circles);
8404
8418
  return _el$4;
8405
8419
  })();
@@ -8435,12 +8449,12 @@ const $151f8676c5d42e80$export$237455ad7e59d4e5 = function () {
8435
8449
  } = _ref;
8436
8450
  if (Array.isArray(children) && children.length === 1) children = children[0];
8437
8451
  innerRef = (() => {
8438
- const _el$ = $151f8676c5d42e80$var$_tmpl$();
8452
+ const _el$ = $bBfCy$solidjsweb.getNextElement($151f8676c5d42e80$var$_tmpl$);
8439
8453
  $bBfCy$solidjsweb.insert(_el$, children);
8440
8454
  return _el$;
8441
8455
  })();
8442
8456
  outerRef = (() => {
8443
- const _el$2 = $151f8676c5d42e80$var$_tmpl$2();
8457
+ const _el$2 = $bBfCy$solidjsweb.getNextElement($151f8676c5d42e80$var$_tmpl$2);
8444
8458
  $bBfCy$solidjsweb.insert(_el$2, innerRef);
8445
8459
  return _el$2;
8446
8460
  })();
@@ -8586,8 +8600,9 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
8586
8600
  $7f95f77417d06249$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
8587
8601
  $46b94b232dc792af$export$8048b892d651b310(new Error("no image src provided: " + src));
8588
8602
  return (() => {
8589
- const _el$ = $b42b9f62e8b6cb2d$var$_tmpl$();
8603
+ const _el$ = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$);
8590
8604
  $bBfCy$solidjsweb.spread(_el$, image_options, false, false);
8605
+ $bBfCy$solidjsweb.runHydrationEvents();
8591
8606
  return _el$;
8592
8607
  })(); // we don't want everything to fail if someone misused this component
8593
8608
  }
@@ -8599,13 +8614,14 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
8599
8614
  const format = formats[i];
8600
8615
  const srcset = $b42b9f62e8b6cb2d$var$make_srcset(src, format, resolutions);
8601
8616
  sources.push((() => {
8602
- const _el$2 = $b42b9f62e8b6cb2d$var$_tmpl$2();
8617
+ const _el$2 = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$2);
8603
8618
  $bBfCy$solidjsweb.setAttribute(_el$2, "type", "image/".concat(format));
8604
8619
  $bBfCy$solidjsweb.spread(_el$2, set_dataset ? {
8605
8620
  "data-srcset": srcset
8606
8621
  } : {
8607
8622
  srcset: srcset
8608
8623
  }, false, false);
8624
+ $bBfCy$solidjsweb.runHydrationEvents();
8609
8625
  return _el$2;
8610
8626
  })());
8611
8627
  }
@@ -8615,8 +8631,9 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
8615
8631
  delete opts_without_src["src"];
8616
8632
  delete opts_without_src["srcset"];
8617
8633
  const the_image = (() => {
8618
- const _el$3 = $b42b9f62e8b6cb2d$var$_tmpl$();
8634
+ const _el$3 = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$);
8619
8635
  $bBfCy$solidjsweb.spread(_el$3, opts_without_src, false, false);
8636
+ $bBfCy$solidjsweb.runHydrationEvents();
8620
8637
  return _el$3;
8621
8638
  })(); // create image
8622
8639
  sources.push(the_image); // chrome seems to be the dumbest piece of cake that has ever existed and just load the first source?????
@@ -8626,7 +8643,7 @@ function $b42b9f62e8b6cb2d$export$a62825542f1bfcf5() {
8626
8643
  for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $46b94b232dc792af$export$8048b892d651b310));
8627
8644
  // embed all sources into a <picture> so that the browser understands they're "together"
8628
8645
  const picture = (() => {
8629
- const _el$4 = $b42b9f62e8b6cb2d$var$_tmpl$3();
8646
+ const _el$4 = $bBfCy$solidjsweb.getNextElement($b42b9f62e8b6cb2d$var$_tmpl$3);
8630
8647
  $bBfCy$solidjsweb.insert(_el$4, sources);
8631
8648
  return _el$4;
8632
8649
  })();
@@ -8661,7 +8678,7 @@ function $b42b9f62e8b6cb2d$var$optimized_img_url_generator(format, url, width) {
8661
8678
  }
8662
8679
  const $dfce76a4aeb41067$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div>`),
8663
8680
  $dfce76a4aeb41067$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<canvas class=depict-img-filler height=3000>`),
8664
- $dfce76a4aeb41067$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont>`);
8681
+ $dfce76a4aeb41067$var$_tmpl$3 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont></div><!$><!/>`);
8665
8682
  const $dfce76a4aeb41067$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
8666
8683
  // Add nolazy to placeholders to avoid errors with the stupid lazyfier
8667
8684
  const $dfce76a4aeb41067$var$add_nolazy_to_placeholder = type => type === "placeholder" ? "nolazy" : "";
@@ -8694,7 +8711,7 @@ function $dfce76a4aeb41067$var$Image(_ref2) {
8694
8711
  ...image_options
8695
8712
  } = _ref2;
8696
8713
  const div = (() => {
8697
- const _el$ = $dfce76a4aeb41067$var$_tmpl$();
8714
+ const _el$ = $bBfCy$solidjsweb.getNextElement($dfce76a4aeb41067$var$_tmpl$);
8698
8715
  $bBfCy$solidjsweb.effect(_$p => $bBfCy$solidjsweb.style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / aspect_ratio * 100, "%"), _$p));
8699
8716
  return _el$;
8700
8717
  })();
@@ -8722,15 +8739,17 @@ function $dfce76a4aeb41067$var$CompatibleImage(_ref3) {
8722
8739
  ...image_options
8723
8740
  } = _ref3;
8724
8741
  const canvas = (() => {
8725
- const _el$2 = $dfce76a4aeb41067$var$_tmpl$2();
8742
+ const _el$2 = $bBfCy$solidjsweb.getNextElement($dfce76a4aeb41067$var$_tmpl$2);
8726
8743
  $bBfCy$solidjsweb.setAttribute(_el$2, "width", 3000 * aspect_ratio);
8727
8744
  return _el$2;
8728
8745
  })();
8729
8746
  const sourceset_component = $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
8730
8747
  const IMG_tag = (_image_options$src2 = image_options.src) !== null && _image_options$src2 !== void 0 && _image_options$src2.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
8731
8748
  return (() => {
8732
- const _el$3 = $dfce76a4aeb41067$var$_tmpl$3(),
8733
- _el$4 = _el$3.firstChild;
8749
+ const _el$3 = $bBfCy$solidjsweb.getNextElement($dfce76a4aeb41067$var$_tmpl$3),
8750
+ _el$4 = _el$3.firstChild,
8751
+ _el$5 = _el$4.nextSibling,
8752
+ [_el$6, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$5.nextSibling);
8734
8753
  $bBfCy$solidjsweb.insert(_el$4, $bBfCy$solidjsweb.createComponent(IMG_tag, $bBfCy$solidjsweb.mergeProps({
8735
8754
  alt: alt
8736
8755
  }, remove_on_error ? {
@@ -8740,7 +8759,7 @@ function $dfce76a4aeb41067$var$CompatibleImage(_ref3) {
8740
8759
  return $51b78ec2cb40f07e$export$22a65337c1b43b1f(["depict-img-comp", image_options.class, $dfce76a4aeb41067$var$add_nolazy_to_placeholder(rendering_options === null || rendering_options === void 0 ? void 0 : rendering_options.type)]);
8741
8760
  }
8742
8761
  })));
8743
- $bBfCy$solidjsweb.insert(_el$3, canvas, null);
8762
+ $bBfCy$solidjsweb.insert(_el$3, canvas, _el$6, _co$);
8744
8763
  return _el$3;
8745
8764
  })();
8746
8765
  }
@@ -8764,7 +8783,7 @@ function $dfce76a4aeb41067$var$srcset_comp_from_map_or_new(rendering_options) {
8764
8783
  }
8765
8784
  var $be5deeed4683b89f$exports = {};
8766
8785
  $be5deeed4683b89f$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";
8767
- const $8928a1027461fba4$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=images-container><div class=main-image-container>`),
8786
+ const $8928a1027461fba4$var$_tmpl$ = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=images-container><!$><!/><div class=main-image-container>`),
8768
8787
  $8928a1027461fba4$var$_tmpl$2 = /*#__PURE__*/$bBfCy$solidjsweb.template(`<div class=second-image-container>`);
8769
8788
  // Saving bytez
8770
8789
  // Maybe? @Daniel
@@ -8912,13 +8931,15 @@ const $8928a1027461fba4$export$2369f6fc1c911576 = _ref => {
8912
8931
  });
8913
8932
  const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
8914
8933
  const images_container = (() => {
8915
- const _el$ = $8928a1027461fba4$var$_tmpl$(),
8916
- _el$2 = _el$.firstChild;
8934
+ const _el$ = $bBfCy$solidjsweb.getNextElement($8928a1027461fba4$var$_tmpl$),
8935
+ _el$3 = _el$.firstChild,
8936
+ [_el$4, _co$] = $bBfCy$solidjsweb.getNextMarker(_el$3.nextSibling),
8937
+ _el$2 = _el$4.nextSibling;
8917
8938
  $bBfCy$solidjsweb.insert(_el$, !no_second_img && (() => {
8918
- const _el$3 = $8928a1027461fba4$var$_tmpl$2();
8919
- $bBfCy$solidjsweb.insert(_el$3, second_image);
8920
- return _el$3;
8921
- })(), _el$2);
8939
+ const _el$5 = $bBfCy$solidjsweb.getNextElement($8928a1027461fba4$var$_tmpl$2);
8940
+ $bBfCy$solidjsweb.insert(_el$5, second_image);
8941
+ return _el$5;
8942
+ })(), _el$4, _co$);
8922
8943
  $bBfCy$solidjsweb.insert(_el$2, main_image);
8923
8944
  return _el$;
8924
8945
  })();
package/ES10/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.5";
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]`.