@exponential_app/eui-solid 0.2.0 → 0.3.0

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.js CHANGED
@@ -1131,7 +1131,7 @@ function createMediaSrc(host, src, kind = `image`) {
1131
1131
  const source = createMediaSource(host, src, kind);
1132
1132
  return () => source().url;
1133
1133
  }
1134
- var _tmpl$$k = /* @__PURE__ */ template(`<div class=xui-Markdown-image role=img>`), _tmpl$2$j = /* @__PURE__ */ template(`<p class=xui-Markdown-paragraph>`), _tmpl$3$h = /* @__PURE__ */ template(`<img alt>`), _tmpl$4$f = /* @__PURE__ */ template(`<span class=xui-Markdown-imageAlt>`), _tmpl$5$e = /* @__PURE__ */ template(`<a class=xui-Markdown-link target=_blank rel=noreferrer>`), _tmpl$6$c = /* @__PURE__ */ template(`<code class=xui-Markdown-code>`), _tmpl$7$b = /* @__PURE__ */ template(`<strong>`), _tmpl$8$a = /* @__PURE__ */ template(`<em>`), _tmpl$9$a = /* @__PURE__ */ template(`<del>`), _tmpl$0$7 = /* @__PURE__ */ template(`<span class=xui-Markdown-link data-denied>`), _tmpl$1$5 = /* @__PURE__ */ template(`<li class=xui-Markdown-listItem>`), _tmpl$10$5 = /* @__PURE__ */ template(`<input type=checkbox readonly>`), _tmpl$11$5 = /* @__PURE__ */ template(`<ol>`), _tmpl$12$3 = /* @__PURE__ */ template(`<ul>`), _tmpl$13$3 = /* @__PURE__ */ template(`<pre class=xui-Markdown-codeBlock><code>`), _tmpl$14$2 = /* @__PURE__ */ template(`<blockquote class=xui-Markdown-quote>`), _tmpl$15$2 = /* @__PURE__ */ template(`<table class=xui-Markdown-table><thead><tr></tr></thead><tbody>`), _tmpl$16$2 = /* @__PURE__ */ template(`<th>`), _tmpl$17$2 = /* @__PURE__ */ template(`<tr>`), _tmpl$18$1 = /* @__PURE__ */ template(`<td>`), _tmpl$19$1 = /* @__PURE__ */ template(`<hr>`), _tmpl$20$1 = /* @__PURE__ */ template(`<div>`);
1134
+ var _tmpl$$k = /* @__PURE__ */ template(`<div class=xui-Markdown-image role=img>`), _tmpl$2$j = /* @__PURE__ */ template(`<p class=xui-Markdown-paragraph>`), _tmpl$3$h = /* @__PURE__ */ template(`<img alt>`), _tmpl$4$f = /* @__PURE__ */ template(`<span class=xui-Markdown-imageAlt>`), _tmpl$5$e = /* @__PURE__ */ template(`<a class=xui-Markdown-link target=_blank rel=noreferrer>`), _tmpl$6$c = /* @__PURE__ */ template(`<code class=xui-Markdown-code>`), _tmpl$7$b = /* @__PURE__ */ template(`<strong>`), _tmpl$8$a = /* @__PURE__ */ template(`<em>`), _tmpl$9$a = /* @__PURE__ */ template(`<del>`), _tmpl$0$7 = /* @__PURE__ */ template(`<span class=xui-Markdown-link data-denied>`), _tmpl$1$6 = /* @__PURE__ */ template(`<li class=xui-Markdown-listItem>`), _tmpl$10$6 = /* @__PURE__ */ template(`<input type=checkbox readonly>`), _tmpl$11$5 = /* @__PURE__ */ template(`<ol>`), _tmpl$12$3 = /* @__PURE__ */ template(`<ul>`), _tmpl$13$3 = /* @__PURE__ */ template(`<pre class=xui-Markdown-codeBlock><code>`), _tmpl$14$2 = /* @__PURE__ */ template(`<blockquote class=xui-Markdown-quote>`), _tmpl$15$2 = /* @__PURE__ */ template(`<table class=xui-Markdown-table><thead><tr></tr></thead><tbody>`), _tmpl$16$2 = /* @__PURE__ */ template(`<th>`), _tmpl$17$2 = /* @__PURE__ */ template(`<tr>`), _tmpl$18$1 = /* @__PURE__ */ template(`<td>`), _tmpl$19$1 = /* @__PURE__ */ template(`<hr>`), _tmpl$20$1 = /* @__PURE__ */ template(`<div>`);
1135
1135
  function MarkdownImage(props) {
1136
1136
  const media = createMediaSource(() => props.host, () => props.src);
1137
1137
  return createComponent(Show, {
@@ -1225,11 +1225,11 @@ function inline(nodes, host) {
1225
1225
  }
1226
1226
  function renderList(list, host) {
1227
1227
  const items = list.items.map((item) => (() => {
1228
- var _el$1 = _tmpl$1$5();
1228
+ var _el$1 = _tmpl$1$6();
1229
1229
  insert(_el$1, (() => {
1230
1230
  var _c$2 = memo(() => item.task === void 0);
1231
1231
  return () => _c$2() ? null : (() => {
1232
- var _el$10 = _tmpl$10$5();
1232
+ var _el$10 = _tmpl$10$6();
1233
1233
  effect(() => setAttribute(_el$10, "checked", item.task ? `` : void 0));
1234
1234
  effect(() => _el$10.checked = item.task);
1235
1235
  return _el$10;
@@ -1792,7 +1792,7 @@ const NATIVES_ACTIONS = {
1792
1792
  Link: LinkNative,
1793
1793
  Toggle: ToggleNative
1794
1794
  };
1795
- var _tmpl$$h = /* @__PURE__ */ template(`<svg><path fill-rule=evenodd stroke=var(--xui-color-background) stroke-width=1></svg>`, false, true, false), _tmpl$2$g = /* @__PURE__ */ template(`<svg><text></svg>`, false, true, false), _tmpl$3$f = /* @__PURE__ */ template(`<svg><g><path fill=none stroke-linejoin=round stroke-linecap=round></svg>`, false, true, false), _tmpl$4$d = /* @__PURE__ */ template(`<svg><path opacity=0.18></svg>`, false, true, false), _tmpl$5$d = /* @__PURE__ */ template(`<svg><circle></svg>`, false, true, false), _tmpl$6$b = /* @__PURE__ */ template(`<svg><rect></svg>`, false, true, false), _tmpl$7$a = /* @__PURE__ */ template(`<div>`), _tmpl$8$9 = /* @__PURE__ */ template(`<strong>`), _tmpl$9$9 = /* @__PURE__ */ template(`<span class=xui-chart-tip-row><i>`), _tmpl$0$6 = /* @__PURE__ */ template(`<span>`), _tmpl$1$4 = /* @__PURE__ */ template(`<svg><g></svg>`, false, true, false), _tmpl$10$4 = /* @__PURE__ */ template(`<svg><rect class=xui-chart-band fill=currentColor opacity=0.06></svg>`, false, true, false), _tmpl$11$4 = /* @__PURE__ */ template(`<svg><text text-anchor=middle></svg>`, false, true, false), _tmpl$12$2 = /* @__PURE__ */ template(`<svg><text x=0 y=0 text-anchor=middle></svg>`, false, true, false), _tmpl$13$2 = /* @__PURE__ */ template(`<svg><g><line stroke=currentColor stroke-width=1 opacity=0.6 shape-rendering=crispEdges></svg>`, false, true, false), _tmpl$14$1 = /* @__PURE__ */ template(`<caption>`), _tmpl$15$1 = /* @__PURE__ */ template(`<table class=xui-sr-only><thead><tr><th scope=col></th></tr></thead><tbody>`), _tmpl$16$1 = /* @__PURE__ */ template(`<div><div class=xui-chart-plot><svg role=img class=xui-chart-svg>`), _tmpl$17$1 = /* @__PURE__ */ template(`<svg><line></svg>`, false, true, false), _tmpl$18 = /* @__PURE__ */ template(`<svg><text dominant-baseline=middle></svg>`, false, true, false), _tmpl$19 = /* @__PURE__ */ template(`<span><i>`), _tmpl$20 = /* @__PURE__ */ template(`<th scope=col>`), _tmpl$21 = /* @__PURE__ */ template(`<tr><th scope=row>`), _tmpl$22 = /* @__PURE__ */ template(`<td>`);
1795
+ var _tmpl$$h = /* @__PURE__ */ template(`<svg><path fill-rule=evenodd stroke=var(--xui-color-background) stroke-width=1></svg>`, false, true, false), _tmpl$2$g = /* @__PURE__ */ template(`<svg><text></svg>`, false, true, false), _tmpl$3$f = /* @__PURE__ */ template(`<svg><g><path fill=none stroke-linejoin=round stroke-linecap=round></svg>`, false, true, false), _tmpl$4$d = /* @__PURE__ */ template(`<svg><path opacity=0.18></svg>`, false, true, false), _tmpl$5$d = /* @__PURE__ */ template(`<svg><circle></svg>`, false, true, false), _tmpl$6$b = /* @__PURE__ */ template(`<svg><rect></svg>`, false, true, false), _tmpl$7$a = /* @__PURE__ */ template(`<div>`), _tmpl$8$9 = /* @__PURE__ */ template(`<strong>`), _tmpl$9$9 = /* @__PURE__ */ template(`<span class=xui-chart-tip-row><i>`), _tmpl$0$6 = /* @__PURE__ */ template(`<span>`), _tmpl$1$5 = /* @__PURE__ */ template(`<svg><g></svg>`, false, true, false), _tmpl$10$5 = /* @__PURE__ */ template(`<svg><rect class=xui-chart-band fill=currentColor opacity=0.06></svg>`, false, true, false), _tmpl$11$4 = /* @__PURE__ */ template(`<svg><text text-anchor=middle></svg>`, false, true, false), _tmpl$12$2 = /* @__PURE__ */ template(`<svg><text x=0 y=0 text-anchor=middle></svg>`, false, true, false), _tmpl$13$2 = /* @__PURE__ */ template(`<svg><g><line stroke=currentColor stroke-width=1 opacity=0.6 shape-rendering=crispEdges></svg>`, false, true, false), _tmpl$14$1 = /* @__PURE__ */ template(`<caption>`), _tmpl$15$1 = /* @__PURE__ */ template(`<table class=xui-sr-only><thead><tr><th scope=col></th></tr></thead><tbody>`), _tmpl$16$1 = /* @__PURE__ */ template(`<div><div class=xui-chart-plot><svg role=img class=xui-chart-svg>`), _tmpl$17$1 = /* @__PURE__ */ template(`<svg><line></svg>`, false, true, false), _tmpl$18 = /* @__PURE__ */ template(`<svg><text dominant-baseline=middle></svg>`, false, true, false), _tmpl$19 = /* @__PURE__ */ template(`<span><i>`), _tmpl$20 = /* @__PURE__ */ template(`<th scope=col>`), _tmpl$21 = /* @__PURE__ */ template(`<tr><th scope=row>`), _tmpl$22 = /* @__PURE__ */ template(`<td>`);
1796
1796
  const colorVar = (i, tone) => tokenVar(seriesColor(i, tone)) ?? `currentColor`;
1797
1797
  const AXIS_FONT = 11;
1798
1798
  function ChartNative(props) {
@@ -2239,7 +2239,7 @@ function ChartNative(props) {
2239
2239
  return showGrid();
2240
2240
  },
2241
2241
  get children() {
2242
- var _el$16 = _tmpl$1$4();
2242
+ var _el$16 = _tmpl$1$5();
2243
2243
  spread(_el$16, mergeProps(() => part(`grid`), {
2244
2244
  "stroke": "currentColor",
2245
2245
  "stroke-width": 1,
@@ -2275,7 +2275,7 @@ function ChartNative(props) {
2275
2275
  return memo(() => !!(!round() && active() !== null))() && !sparkline();
2276
2276
  },
2277
2277
  get children() {
2278
- var _el$17 = _tmpl$10$4();
2278
+ var _el$17 = _tmpl$10$5();
2279
2279
  effect((_p$) => {
2280
2280
  var _v$21 = geo().rtl ? geo().width - geo().pad.l - geo().slot * (active() + 1) : geo().pad.l + geo().slot * active(), _v$22 = geo().pad.t, _v$23 = geo().slot, _v$24 = geo().innerH;
2281
2281
  _v$21 !== _p$.e && setAttribute(_el$17, "x", _p$.e = _v$21);
@@ -2893,7 +2893,7 @@ function searchMatches(item, query) {
2893
2893
  const needle = query.trim().toLowerCase();
2894
2894
  return needle === `` || str(item.label).toLowerCase().includes(needle) || str(item.identifier).toLowerCase().includes(needle);
2895
2895
  }
2896
- var _tmpl$$f = /* @__PURE__ */ template(`<div role=listbox class=xui-ChipInput-suggestions>`), _tmpl$2$f = /* @__PURE__ */ template(`<div><div><ul class=xui-chip-list></ul><input>`), _tmpl$3$e = /* @__PURE__ */ template(`<button type=button tabindex=-1>`), _tmpl$4$c = /* @__PURE__ */ template(`<li><span>`), _tmpl$5$c = /* @__PURE__ */ template(`<div role=option class=xui-ChipInput-suggestion>`), _tmpl$6$a = /* @__PURE__ */ template(`<span>`), _tmpl$7$9 = /* @__PURE__ */ template(`<ul class=xui-file-list>`), _tmpl$8$8 = /* @__PURE__ */ template(`<div>`), _tmpl$9$8 = /* @__PURE__ */ template(`<div><div><span></span><span></span><span></span><input type=file class=xui-sr-only tabindex=-1>`), _tmpl$0$5 = /* @__PURE__ */ template(`<button type=button>`), _tmpl$1$3 = /* @__PURE__ */ template(`<li><span></span><span>`), _tmpl$10$3 = /* @__PURE__ */ template(`<a target=_blank rel=noreferrer>`), _tmpl$11$3 = /* @__PURE__ */ template(`<span class=xui-field-error>`);
2896
+ var _tmpl$$f = /* @__PURE__ */ template(`<div role=listbox class=xui-ChipInput-suggestions>`), _tmpl$2$f = /* @__PURE__ */ template(`<div><div><ul class=xui-chip-list></ul><input>`), _tmpl$3$e = /* @__PURE__ */ template(`<button type=button tabindex=-1>`), _tmpl$4$c = /* @__PURE__ */ template(`<li><span>`), _tmpl$5$c = /* @__PURE__ */ template(`<div role=option class=xui-ChipInput-suggestion>`), _tmpl$6$a = /* @__PURE__ */ template(`<span>`), _tmpl$7$9 = /* @__PURE__ */ template(`<ul class=xui-file-list>`), _tmpl$8$8 = /* @__PURE__ */ template(`<div>`), _tmpl$9$8 = /* @__PURE__ */ template(`<div><div><span></span><span></span><span></span><input type=file class=xui-sr-only tabindex=-1>`), _tmpl$0$5 = /* @__PURE__ */ template(`<button type=button>`), _tmpl$1$4 = /* @__PURE__ */ template(`<li><span></span><span>`), _tmpl$10$4 = /* @__PURE__ */ template(`<a target=_blank rel=noreferrer>`), _tmpl$11$3 = /* @__PURE__ */ template(`<span class=xui-field-error>`);
2897
2897
  function ChipInputNative(props) {
2898
2898
  const part = parts(props);
2899
2899
  const ctx = useSurfaceContext();
@@ -3332,7 +3332,7 @@ function FileUploadNative(props) {
3332
3332
  children: (file, i) => {
3333
3333
  const href = () => linkHref(ctx.host, file.url);
3334
3334
  return (() => {
3335
- var _el$17 = _tmpl$1$3(), _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
3335
+ var _el$17 = _tmpl$1$4(), _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
3336
3336
  spread(_el$17, mergeProps(() => part.at(`file`, i())), false, true);
3337
3337
  spread(_el$18, mergeProps(() => part.at(`fileIcon`, i())), false, true);
3338
3338
  insert(_el$18, createComponent(BuiltinIcon, {
@@ -3342,7 +3342,7 @@ function FileUploadNative(props) {
3342
3342
  insert(_el$19, (() => {
3343
3343
  var _c$ = memo(() => !!href());
3344
3344
  return () => _c$() ? (() => {
3345
- var _el$22 = _tmpl$10$3();
3345
+ var _el$22 = _tmpl$10$4();
3346
3346
  insert(_el$22, () => file.name);
3347
3347
  effect(() => setAttribute(_el$22, "href", href()));
3348
3348
  return _el$22;
@@ -5184,7 +5184,7 @@ function createHostOwnedValue(options) {
5184
5184
  commit: () => c.commit()
5185
5185
  };
5186
5186
  }
5187
- var _tmpl$$a = /* @__PURE__ */ template(`<textarea>`), _tmpl$2$a = /* @__PURE__ */ template(`<div>`), _tmpl$3$9 = /* @__PURE__ */ template(`<input>`), _tmpl$4$7 = /* @__PURE__ */ template(`<div><div><button type=button></button><input><button type=button>`), _tmpl$5$7 = /* @__PURE__ */ template(`<span>`), _tmpl$6$6 = /* @__PURE__ */ template(`<span data-state=checked>`), _tmpl$7$5 = /* @__PURE__ */ template(`<div><button type=button role=checkbox value=on></button><div class=xui-field-text>`), _tmpl$8$5 = /* @__PURE__ */ template(`<div><div></div><button type=button role=switch value=on><span>`), _tmpl$9$5 = /* @__PURE__ */ template(`<div><div role=radiogroup>`), _tmpl$0$3 = /* @__PURE__ */ template(`<label class=xui-radio-row><button type=button role=radio data-radix-collection-item></button><span>`), _tmpl$1$2 = /* @__PURE__ */ template(`<div><div><span></span></div><span data-orientation=horizontal class=xui-slider-root><span data-orientation=horizontal><span data-orientation=horizontal></span></span><span><span role=slider aria-orientation=horizontal data-orientation=horizontal tabindex=0 data-radix-collection-item style>`), _tmpl$10$2 = /* @__PURE__ */ template(`<div><textarea></textarea><div class=xui-composer-bar><button type=button>`), _tmpl$11$2 = /* @__PURE__ */ template(`<button type=button>`);
5187
+ var _tmpl$$a = /* @__PURE__ */ template(`<textarea>`), _tmpl$2$a = /* @__PURE__ */ template(`<div>`), _tmpl$3$9 = /* @__PURE__ */ template(`<input>`), _tmpl$4$7 = /* @__PURE__ */ template(`<div><div><button type=button></button><input><button type=button>`), _tmpl$5$7 = /* @__PURE__ */ template(`<span>`), _tmpl$6$6 = /* @__PURE__ */ template(`<span data-state=checked>`), _tmpl$7$5 = /* @__PURE__ */ template(`<div><button type=button role=checkbox value=on></button><div class=xui-field-text>`), _tmpl$8$5 = /* @__PURE__ */ template(`<div><div></div><button type=button role=switch value=on><span>`), _tmpl$9$5 = /* @__PURE__ */ template(`<div><div role=radiogroup>`), _tmpl$0$3 = /* @__PURE__ */ template(`<label class=xui-radio-row><button type=button role=radio data-radix-collection-item></button><span>`), _tmpl$1$3 = /* @__PURE__ */ template(`<div><div><span></span></div><span data-orientation=horizontal class=xui-slider-root><span data-orientation=horizontal><span data-orientation=horizontal></span></span><span><span role=slider aria-orientation=horizontal data-orientation=horizontal tabindex=0 data-radix-collection-item style>`), _tmpl$10$3 = /* @__PURE__ */ template(`<div><textarea></textarea><div class=xui-composer-bar><button type=button>`), _tmpl$11$2 = /* @__PURE__ */ template(`<button type=button>`);
5188
5188
  function createInputSender(props, prop) {
5189
5189
  const ctx = useSurfaceContext();
5190
5190
  const path = createMemo(() => boundPath(props.node.props, prop, props.scope));
@@ -6197,7 +6197,7 @@ function SliderNative(props) {
6197
6197
  return s;
6198
6198
  };
6199
6199
  return (() => {
6200
- var _el$22 = _tmpl$1$2(), _el$23 = _el$22.firstChild, _el$24 = _el$23.firstChild, _el$25 = _el$23.nextSibling, _el$26 = _el$25.firstChild, _el$27 = _el$26.firstChild, _el$28 = _el$26.nextSibling, _el$29 = _el$28.firstChild;
6200
+ var _el$22 = _tmpl$1$3(), _el$23 = _el$22.firstChild, _el$24 = _el$23.firstChild, _el$25 = _el$23.nextSibling, _el$26 = _el$25.firstChild, _el$27 = _el$26.firstChild, _el$28 = _el$26.nextSibling, _el$29 = _el$28.firstChild;
6201
6201
  spread(_el$22, mergeProps(() => props.rootProps), false, true);
6202
6202
  spread(_el$23, mergeProps(() => part(`header`), {
6203
6203
  get ["class"]() {
@@ -6351,7 +6351,7 @@ function ComposerNative(props) {
6351
6351
  const placeholder = () => str(props.props.placeholder);
6352
6352
  const submitLabel = () => str(props.props.submitLabel) || ctx.t(`send`);
6353
6353
  return (() => {
6354
- var _el$30 = _tmpl$10$2(), _el$31 = _el$30.firstChild, _el$32 = _el$31.nextSibling, _el$33 = _el$32.firstChild;
6354
+ var _el$30 = _tmpl$10$3(), _el$31 = _el$30.firstChild, _el$32 = _el$31.nextSibling, _el$33 = _el$32.firstChild;
6355
6355
  spread(_el$30, mergeProps(() => props.rootProps, {
6356
6356
  get ["data-busy"]() {
6357
6357
  return busy() ? `true` : void 0;
@@ -6435,7 +6435,7 @@ const NATIVES_INPUTS = {
6435
6435
  Composer: ComposerNative
6436
6436
  };
6437
6437
  delegateEvents(["keydown", "pointerdown", "pointermove", "pointerup"]);
6438
- var _tmpl$$9 = /* @__PURE__ */ template(`<svg class=xui-media-sizer aria-hidden=true height=1>`), _tmpl$2$9 = /* @__PURE__ */ template(`<img decoding=async>`, true, false, false), _tmpl$3$8 = /* @__PURE__ */ template(`<div>`), _tmpl$4$6 = /* @__PURE__ */ template(`<div><video>`), _tmpl$5$6 = /* @__PURE__ */ template(`<span>`), _tmpl$6$5 = /* @__PURE__ */ template(`<div><audio>`), _tmpl$7$4 = /* @__PURE__ */ template(`<img>`), _tmpl$8$4 = /* @__PURE__ */ template(`<div><button type=button></button><button type=button>`), _tmpl$9$4 = /* @__PURE__ */ template(`<div><div class=xui-carousel-track aria-live=polite>`), _tmpl$0$2 = /* @__PURE__ */ template(`<button type=button>`);
6438
+ var _tmpl$$9 = /* @__PURE__ */ template(`<svg class=xui-media-sizer aria-hidden=true height=1>`), _tmpl$2$9 = /* @__PURE__ */ template(`<img decoding=async>`, true, false, false), _tmpl$3$8 = /* @__PURE__ */ template(`<div>`), _tmpl$4$6 = /* @__PURE__ */ template(`<div><video>`), _tmpl$5$6 = /* @__PURE__ */ template(`<span>`), _tmpl$6$5 = /* @__PURE__ */ template(`<div><audio>`), _tmpl$7$4 = /* @__PURE__ */ template(`<img>`), _tmpl$8$4 = /* @__PURE__ */ template(`<img class=xui-carousel-thumb alt aria-hidden=true loading=lazy decoding=async>`, true, false, false), _tmpl$9$4 = /* @__PURE__ */ template(`<button type=button>`), _tmpl$0$2 = /* @__PURE__ */ template(`<div class=xui-carousel-track aria-live=polite>`), _tmpl$1$2 = /* @__PURE__ */ template(`<div class=xui-carousel-stage><span>`), _tmpl$10$2 = /* @__PURE__ */ template(`<div><button type=button></button><button type=button>`);
6439
6439
  function MediaSizer() {
6440
6440
  return (() => {
6441
6441
  var _el$ = _tmpl$$9();
@@ -6698,6 +6698,37 @@ function AvatarNative(props) {
6698
6698
  return _el$0;
6699
6699
  })();
6700
6700
  }
6701
+ function CarouselThumbnail(props) {
6702
+ const ctx = useSurfaceContext();
6703
+ const url = createMediaSrc(() => ctx.host, () => props.src);
6704
+ return (() => {
6705
+ var _el$11 = _tmpl$9$4();
6706
+ spread(_el$11, mergeProps(() => props.attrs, {
6707
+ get ["aria-label"]() {
6708
+ return props.label;
6709
+ },
6710
+ get ["aria-current"]() {
6711
+ return props.current ? `true` : void 0;
6712
+ },
6713
+ get ["data-current"]() {
6714
+ return props.current ? `true` : void 0;
6715
+ },
6716
+ "onClick": () => props.onPress()
6717
+ }), false, true);
6718
+ insert(_el$11, createComponent(Show, {
6719
+ get when() {
6720
+ return memo(() => !!props.src)() && url();
6721
+ },
6722
+ get children() {
6723
+ var _el$12 = _tmpl$8$4();
6724
+ setAttribute(_el$12, "draggable", false);
6725
+ effect(() => setAttribute(_el$12, "src", url()));
6726
+ return _el$12;
6727
+ }
6728
+ }));
6729
+ return _el$11;
6730
+ })();
6731
+ }
6701
6732
  function CarouselNative(props) {
6702
6733
  const ctx = useSurfaceContext();
6703
6734
  const part = parts(props);
@@ -6750,23 +6781,26 @@ function CarouselNative(props) {
6750
6781
  page: i + 1,
6751
6782
  total: pages().length
6752
6783
  });
6753
- return (() => {
6754
- var _el$11 = _tmpl$9$4(), _el$12 = _el$11.firstChild;
6755
- spread(_el$11, mergeProps(() => props.rootProps, {
6756
- "role": "region",
6757
- get ["aria-roledescription"]() {
6758
- return ctx.t(`carousel`);
6759
- },
6760
- "onKeyDown": (e) => {
6761
- const rtl = ctx.direction === `rtl`;
6762
- if (e.key === `ArrowRight`) go(page() + (rtl ? -1 : 1));
6763
- else if (e.key === `ArrowLeft`) go(page() + (rtl ? 1 : -1));
6764
- }
6765
- }), false, true);
6766
- _el$12.addEventListener("scroll", onScroll);
6784
+ const counter = () => many() && bool(props.props.counter);
6785
+ const thumbnails = createMemo(() => many() && Array.isArray(props.props.thumbnails) ? props.props.thumbnails : null);
6786
+ let strip;
6787
+ createEffect(() => {
6788
+ const p = page();
6789
+ thumbnails();
6790
+ const el = strip;
6791
+ const thumb = el?.children[p];
6792
+ if (!el || !thumb) return;
6793
+ const a = el.getBoundingClientRect();
6794
+ const b = thumb.getBoundingClientRect();
6795
+ const delta = b.left < a.left ? b.left - a.left : b.right > a.right ? b.right - a.right : 0;
6796
+ if (delta !== 0) el.scrollLeft += delta;
6797
+ });
6798
+ const trackView = (() => {
6799
+ var _el$13 = _tmpl$0$2();
6800
+ _el$13.addEventListener("scroll", onScroll);
6767
6801
  var _ref$ = track;
6768
- typeof _ref$ === "function" ? use(_ref$, _el$12) : track = _el$12;
6769
- insert(_el$12, createComponent(For, {
6802
+ typeof _ref$ === "function" ? use(_ref$, _el$13) : track = _el$13;
6803
+ insert(_el$13, createComponent(For, {
6770
6804
  get each() {
6771
6805
  return ids();
6772
6806
  },
@@ -6781,9 +6815,9 @@ function CarouselNative(props) {
6781
6815
  return a;
6782
6816
  };
6783
6817
  return (() => {
6784
- var _el$17 = _tmpl$3$8();
6785
- use((el) => createRenderEffect(() => el.toggleAttribute(`inert`, !active())), _el$17);
6786
- spread(_el$17, mergeProps(attrs, {
6818
+ var _el$14 = _tmpl$3$8();
6819
+ use((el) => createRenderEffect(() => el.toggleAttribute(`inert`, !active())), _el$14);
6820
+ spread(_el$14, mergeProps(attrs, {
6787
6821
  "role": "group",
6788
6822
  get ["aria-roledescription"]() {
6789
6823
  return ctx.t(`slide`);
@@ -6798,23 +6832,96 @@ function CarouselNative(props) {
6798
6832
  return active() ? void 0 : ``;
6799
6833
  }
6800
6834
  }), false, true);
6801
- insert(_el$17, createComponent(NodeView, {
6835
+ insert(_el$14, createComponent(NodeView, {
6802
6836
  get node() {
6803
6837
  return entry().node;
6804
6838
  }
6805
6839
  }));
6806
- return _el$17;
6840
+ return _el$14;
6807
6841
  })();
6808
6842
  }
6809
6843
  }));
6810
- insert(_el$11, createComponent(Show, {
6844
+ return _el$13;
6845
+ })();
6846
+ return (() => {
6847
+ var _el$15 = _tmpl$3$8();
6848
+ spread(_el$15, mergeProps(() => props.rootProps, {
6849
+ "role": "region",
6850
+ get ["aria-roledescription"]() {
6851
+ return ctx.t(`carousel`);
6852
+ },
6853
+ "onKeyDown": (e) => {
6854
+ const rtl = ctx.direction === `rtl`;
6855
+ if (e.key === `ArrowRight`) go(page() + (rtl ? -1 : 1));
6856
+ else if (e.key === `ArrowLeft`) go(page() + (rtl ? 1 : -1));
6857
+ }
6858
+ }), false, true);
6859
+ insert(_el$15, createComponent(Show, {
6860
+ get when() {
6861
+ return counter();
6862
+ },
6863
+ fallback: trackView,
6864
+ get children() {
6865
+ var _el$16 = _tmpl$1$2(), _el$17 = _el$16.firstChild;
6866
+ insert(_el$16, trackView, _el$17);
6867
+ spread(_el$17, mergeProps(() => part(`counter`), {
6868
+ "aria-hidden": "true"
6869
+ }), false, true);
6870
+ insert(_el$17, () => ctx.t(`pageCounter`, {
6871
+ page: page() + 1,
6872
+ total: pages().length
6873
+ }));
6874
+ return _el$16;
6875
+ }
6876
+ }), null);
6877
+ insert(_el$15, createComponent(Show, {
6878
+ get when() {
6879
+ return thumbnails();
6880
+ },
6881
+ children: (urls) => (() => {
6882
+ var _el$22 = _tmpl$3$8();
6883
+ var _ref$2 = strip;
6884
+ typeof _ref$2 === "function" ? use(_ref$2, _el$22) : strip = _el$22;
6885
+ spread(_el$22, mergeProps(() => part(`thumbnails`)), false, true);
6886
+ insert(_el$22, createComponent(For, {
6887
+ get each() {
6888
+ return ids();
6889
+ },
6890
+ children: (id) => {
6891
+ const index = () => byId().get(id)?.index ?? 0;
6892
+ const current = () => index() === page();
6893
+ const src = () => {
6894
+ const u = urls()[index()];
6895
+ return typeof u === `string` ? u : ``;
6896
+ };
6897
+ return createComponent(CarouselThumbnail, {
6898
+ get attrs() {
6899
+ return part.at(`thumbnail`, index(), current() && `selected`);
6900
+ },
6901
+ get src() {
6902
+ return src();
6903
+ },
6904
+ get current() {
6905
+ return current();
6906
+ },
6907
+ get label() {
6908
+ return pageOf(index());
6909
+ },
6910
+ onPress: () => go(index())
6911
+ });
6912
+ }
6913
+ }));
6914
+ return _el$22;
6915
+ })()
6916
+ }), null);
6917
+ insert(_el$15, createComponent(Show, {
6811
6918
  get when() {
6812
6919
  return many();
6813
6920
  },
6814
6921
  get children() {
6815
- var _el$13 = _tmpl$8$4(), _el$14 = _el$13.firstChild, _el$16 = _el$14.nextSibling;
6816
- spread(_el$13, mergeProps(() => withClass(part(`controls`), `xui-carousel-controls`)), false, true);
6817
- spread(_el$14, mergeProps(() => withClass(part(`previous`), `xui-carousel-nav`), {
6922
+ var _el$18 = _tmpl$10$2(), _el$19 = _el$18.firstChild, _el$21 = _el$19.nextSibling;
6923
+ spread(_el$18, mergeProps(() => withClass(part(`controls`), `xui-carousel-controls`)), false, true);
6924
+ spread(_el$19, mergeProps(() => withClass(part(`previous`), `xui-carousel-nav`), {
6818
6925
  get ["aria-label"]() {
6819
6926
  return ctx.t(`previous`);
6820
6927
  },
@@ -6823,21 +6930,21 @@ function CarouselNative(props) {
6823
6930
  },
6824
6931
  "onClick": () => go(page() - 1)
6825
6932
  }), false, true);
6826
- insert(_el$14, createComponent(BuiltinIcon, {
6933
+ insert(_el$19, createComponent(BuiltinIcon, {
6827
6934
  slot: "Carousel.previous"
6828
6935
  }));
6829
- insert(_el$13, createComponent(Show, {
6936
+ insert(_el$18, createComponent(Show, {
6830
6937
  get when() {
6831
6938
  return props.props.indicators !== false;
6832
6939
  },
6833
6940
  get children() {
6834
- var _el$15 = _tmpl$3$8();
6835
- spread(_el$15, mergeProps(() => part(`indicator`), {
6941
+ var _el$20 = _tmpl$3$8();
6942
+ spread(_el$20, mergeProps(() => part(`indicator`), {
6836
6943
  "class": "xui-carousel-dots",
6837
6944
  "data-xui-part": "Carousel/indicators",
6838
6945
  "role": "tablist"
6839
6946
  }), false, true);
6840
- insert(_el$15, createComponent(For, {
6947
+ insert(_el$20, createComponent(For, {
6841
6948
  get each() {
6842
6949
  return ids();
6843
6950
  },
@@ -6851,8 +6958,8 @@ function CarouselNative(props) {
6851
6958
  return a;
6852
6959
  };
6853
6960
  return (() => {
6854
- var _el$18 = _tmpl$0$2();
6855
- spread(_el$18, mergeProps(attrs, {
6961
+ var _el$23 = _tmpl$9$4();
6962
+ spread(_el$23, mergeProps(attrs, {
6856
6963
  "role": "tab",
6857
6964
  get ["aria-selected"]() {
6858
6965
  return index() === page();
@@ -6862,14 +6969,14 @@ function CarouselNative(props) {
6862
6969
  },
6863
6970
  "onClick": () => go(index())
6864
6971
  }), false, false);
6865
- return _el$18;
6972
+ return _el$23;
6866
6973
  })();
6867
6974
  }
6868
6975
  }));
6869
- return _el$15;
6976
+ return _el$20;
6870
6977
  }
6871
- }), _el$16);
6872
- spread(_el$16, mergeProps(() => withClass(part(`next`), `xui-carousel-nav`), {
6978
+ }), _el$21);
6979
+ spread(_el$21, mergeProps(() => withClass(part(`next`), `xui-carousel-nav`), {
6873
6980
  get ["aria-label"]() {
6874
6981
  return ctx.t(`next`);
6875
6982
  },
@@ -6878,13 +6985,13 @@ function CarouselNative(props) {
6878
6985
  },
6879
6986
  "onClick": () => go(page() + 1)
6880
6987
  }), false, true);
6881
- insert(_el$16, createComponent(BuiltinIcon, {
6988
+ insert(_el$21, createComponent(BuiltinIcon, {
6882
6989
  slot: "Carousel.next"
6883
6990
  }));
6884
- return _el$13;
6991
+ return _el$18;
6885
6992
  }
6886
6993
  }), null);
6887
- return _el$11;
6994
+ return _el$15;
6888
6995
  })();
6889
6996
  }
6890
6997
  const NATIVES_MEDIA = {