@tachui/primitives 0.8.16 → 0.8.17

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.
@@ -1,29 +1,66 @@
1
- import { withModifiers as f, ComponentWithCSSClasses as z, processElementOverride as H, createSignal as b, useLifecycle as $, registerComponentWithLifecycleHooks as M, h as m, createEffect as v, ConcatenatedComponent as O, text as W, isSignal as S } from "@tachui/core";
2
- import { isSignal as Y, isComputed as D } from "@tachui/core/reactive";
3
- import { aspectRatio as A } from "@tachui/modifiers";
4
- var F = Object.defineProperty, V = (e, t, s) => t in e ? F(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, u = (e, t, s) => V(e, typeof t != "symbol" ? t + "" : t, s);
5
- function x(e) {
1
+ import { withModifiers as f, ComponentWithCSSClasses as V, processElementOverride as D, createSignal as E, useLifecycle as F, registerComponentWithLifecycleHooks as k, h as v, createEffect as y, ConcatenatedComponent as A, sanitizeSVG as N, text as Y, isSignal as b } from "@tachui/core";
2
+ import { isSignal as x, isComputed as z } from "@tachui/core/reactive";
3
+ import { aspectRatio as $ } from "@tachui/modifiers";
4
+ var B = Object.defineProperty, j = (e, t, s) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, m = (e, t, s) => j(e, typeof t != "symbol" ? t + "" : t, s);
5
+ const M = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
6
+ function H(e) {
6
7
  return typeof e == "object" && e !== null && typeof e.resolve == "function";
7
8
  }
8
- function k(e) {
9
- return e && (x(e) ? e.resolve() : e);
9
+ function G(e) {
10
+ return e && (H(e) ? e.resolve() : e);
10
11
  }
11
- class B extends z {
12
+ function R(e) {
13
+ if (e !== void 0)
14
+ return x(e) || z(e) ? e() : e;
15
+ }
16
+ function X(e) {
17
+ if (e)
18
+ return H(e) ? e.resolve() : x(e) || z(e) ? e() : e;
19
+ }
20
+ function q(e) {
21
+ if (process.env.NODE_ENV === "production") return;
22
+ const t = [];
23
+ e.loadingStrategy !== void 0 && t.push("loadingStrategy"), e.decoding !== void 0 && t.push("decoding"), e.fetchPriority !== void 0 && t.push("fetchPriority"), e.crossOrigin !== void 0 && t.push("crossOrigin"), e.contentMode !== void 0 && t.push("contentMode"), e.resizeMode !== void 0 && t.push("resizeMode"), t.length > 0 && console.warn(
24
+ `Image(template): unsupported props ignored: ${t.join(", ")}`
25
+ );
26
+ }
27
+ async function U(e, t) {
28
+ if (M.has(e))
29
+ return M.get(e);
30
+ if (L.has(e))
31
+ return L.get(e);
32
+ const s = fetch(e).then(async (o) => {
33
+ if (!o.ok)
34
+ throw new Error(`Failed to load SVG: ${o.status}`);
35
+ const i = await o.text(), r = t ? t(i) : N(i);
36
+ if (!r || !/<svg[\s>]/i.test(r))
37
+ throw new Error("Sanitized SVG missing root <svg>");
38
+ return M.set(e, r), r;
39
+ }).finally(() => {
40
+ L.delete(e);
41
+ });
42
+ return L.set(e, s), s;
43
+ }
44
+ class J extends V {
12
45
  constructor(t) {
13
- super(), this.props = t, u(this, "type", "component"), u(this, "id"), u(this, "mounted", !1), u(this, "cleanup", []), u(this, "effectiveTag"), u(this, "validationResult"), u(this, "loadingStateSignal"), u(this, "setLoadingState"), this.id = `image-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
14
- const s = H("Image", "img", this.props.element);
46
+ super(), this.props = t, m(this, "type", "component"), m(this, "id"), m(this, "mounted", !1), m(this, "cleanup", []), m(this, "effectiveTag"), m(this, "validationResult"), m(this, "loadingStateSignal"), m(this, "setLoadingState"), this.id = `image-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
47
+ const s = D("Image", "img", this.props.element);
15
48
  if (this.effectiveTag = s.tag, this.validationResult = s.validation, this.props.loadingState)
16
- this.loadingStateSignal = this.props.loadingState, this.setLoadingState = (i) => {
49
+ this.loadingStateSignal = this.props.loadingState, this.setLoadingState = (o) => {
17
50
  };
18
51
  else {
19
- const i = this.props.src ? "idle" : "error", [o, r] = b(i);
20
- this.loadingStateSignal = o, this.setLoadingState = r;
52
+ const o = this.props.src ? "idle" : "error", [i, r] = E(o);
53
+ this.loadingStateSignal = i, this.setLoadingState = r;
21
54
  }
22
- $(this, {
23
- onDOMReady: (i, o) => {
24
- o instanceof HTMLImageElement && this.setupLoadingStateReactivityForDOMElement(o);
55
+ F(this, {
56
+ onDOMReady: (o, i) => {
57
+ if ((this.props.renderingMode ?? "original") === "template" && i instanceof HTMLSpanElement) {
58
+ this.setupTemplateModeReactivityForDOMElement(i);
59
+ return;
60
+ }
61
+ i instanceof HTMLImageElement && this.setupLoadingStateReactivityForDOMElement(i);
25
62
  }
26
- }), M(this);
63
+ }), k(this);
27
64
  }
28
65
  /**
29
66
  * Set loading state and notify callback
@@ -38,7 +75,7 @@ class B extends z {
38
75
  const t = this.loadingStateSignal();
39
76
  if (t === "loading" && this.props.placeholder) {
40
77
  if (typeof this.props.placeholder == "string")
41
- return [m("img", {
78
+ return [v("img", {
42
79
  class: "tachui-image-placeholder",
43
80
  src: this.props.placeholder,
44
81
  alt: "Loading..."
@@ -48,7 +85,7 @@ class B extends z {
48
85
  }
49
86
  if (t === "error" && this.props.errorPlaceholder) {
50
87
  if (typeof this.props.errorPlaceholder == "string")
51
- return [m("img", {
88
+ return [v("img", {
52
89
  class: "tachui-image-error",
53
90
  src: this.props.errorPlaceholder,
54
91
  alt: "Error loading image"
@@ -56,17 +93,30 @@ class B extends z {
56
93
  if (this.props.errorPlaceholder && typeof this.props.errorPlaceholder == "object")
57
94
  return this.props.errorPlaceholder.render();
58
95
  }
59
- const s = k(this.props.src), i = ["tachui-image"], o = this.createClassString(this.props, i), r = m(this.effectiveTag, {
60
- className: o,
61
- src: s,
62
- // Pass resolved src for initial render
63
- alt: this.props.alt,
64
- // Pass reactive alt directly
65
- loading: this.props.loadingStrategy || "lazy",
66
- crossorigin: this.props.crossOrigin,
67
- decoding: this.props.decoding || "async",
68
- fetchpriority: this.props.fetchPriority
69
- });
96
+ const s = ["tachui-image"], o = this.createClassString(this.props, s), i = this.props.renderingMode ?? "original";
97
+ let r;
98
+ if (i === "template") {
99
+ q(this.props);
100
+ const n = R(this.props.alt), p = !!R(this.props.decorative) || n === "";
101
+ r = v("span", {
102
+ className: `${o} tachui-image-template`,
103
+ role: "img",
104
+ ...p ? { "aria-hidden": "true" } : { "aria-label": n || this.props.accessibilityLabel || "Image" }
105
+ });
106
+ } else {
107
+ const n = G(this.props.src);
108
+ r = v(this.effectiveTag, {
109
+ className: o,
110
+ src: n,
111
+ // Pass resolved src for initial render
112
+ alt: this.props.alt,
113
+ // Pass reactive alt directly
114
+ loading: this.props.loadingStrategy || "lazy",
115
+ crossorigin: this.props.crossOrigin,
116
+ decoding: this.props.decoding || "async",
117
+ fetchpriority: this.props.fetchPriority
118
+ });
119
+ }
70
120
  return r.componentMetadata = {
71
121
  id: this.id,
72
122
  type: "Image",
@@ -79,41 +129,70 @@ class B extends z {
79
129
  * Set up ImageAsset reactivity for a real DOM element (called from onDOMReady)
80
130
  */
81
131
  setupImageAssetReactivityForDOMElement(t, s) {
82
- const i = v(() => {
83
- const o = t.resolve();
84
- this.props.onLoadStart?.(), this.setLoadingStateWithCallback("loading"), s.src = o;
132
+ const o = y(() => {
133
+ const i = t.resolve();
134
+ this.props.onLoadStart?.(), this.setLoadingStateWithCallback("loading"), s.src = i;
135
+ });
136
+ this.cleanup.push(() => o.dispose());
137
+ }
138
+ setupTemplateModeReactivityForDOMElement(t) {
139
+ let s = 0;
140
+ const o = y(() => {
141
+ const r = R(this.props.alt) ?? this.props.accessibilityLabel, n = !!R(this.props.decorative) || r === "";
142
+ t.setAttribute("role", "img"), n ? (t.setAttribute("aria-hidden", "true"), t.removeAttribute("aria-label")) : (t.removeAttribute("aria-hidden"), t.setAttribute("aria-label", r || "Image"));
143
+ });
144
+ this.cleanup.push(() => o.dispose());
145
+ const i = y(() => {
146
+ const r = X(this.props.src), n = ++s;
147
+ if (!r) {
148
+ t.innerHTML = "", this.setLoadingStateWithCallback("error"), this.props.onError?.(new Event("error"));
149
+ return;
150
+ }
151
+ this.props.onLoadStart?.(), this.setLoadingStateWithCallback("loading"), U(r, this.props.customSanitizer).then((p) => {
152
+ if (n !== s)
153
+ return;
154
+ t.innerHTML = p;
155
+ const u = t.querySelector("svg");
156
+ if (!(u instanceof SVGElement))
157
+ throw new Error("No <svg> root after template injection");
158
+ u.setAttribute("aria-hidden", "true"), u.setAttribute("focusable", "false"), u.setAttribute("width", "100%"), u.setAttribute("height", "100%"), this.setLoadingStateWithCallback("loaded"), this.props.onLoad?.(new Event("load"));
159
+ }).catch((p) => {
160
+ n === s && (this.setLoadingStateWithCallback("error"), this.props.onError?.(new Event("error")));
161
+ });
162
+ });
163
+ this.cleanup.push(() => {
164
+ i.dispose(), s = Number.POSITIVE_INFINITY;
85
165
  });
86
- this.cleanup.push(() => i.dispose());
87
166
  }
88
167
  setupLoadingStateReactivityForDOMElement(t) {
89
168
  const s = (n) => {
90
169
  this.setLoadingStateWithCallback("loaded"), this.props.onLoad?.(n);
91
- }, i = (n) => {
170
+ }, o = (n) => {
92
171
  this.setLoadingStateWithCallback("error"), this.props.onError?.(n);
93
172
  };
94
- t.addEventListener("load", s), t.addEventListener("error", i), this.cleanup.push(() => {
95
- t.removeEventListener("load", s), t.removeEventListener("error", i);
173
+ t.addEventListener("load", s), t.addEventListener("error", o), this.cleanup.push(() => {
174
+ t.removeEventListener("load", s), t.removeEventListener("error", o);
96
175
  });
97
- const o = (n) => {
176
+ const i = (n) => {
98
177
  if (!n) {
99
178
  t.src = "", this.setLoadingStateWithCallback("error");
100
179
  return;
101
180
  }
102
181
  this.props.onLoadStart?.(), this.setLoadingStateWithCallback("loading"), t.src = n;
103
182
  };
104
- if (x(this.props.src)) {
183
+ if (H(this.props.src)) {
105
184
  this.setupImageAssetReactivityForDOMElement(this.props.src, t);
106
185
  return;
107
186
  }
108
187
  const r = this.props.src;
109
- if (Y(r) || D(r)) {
110
- const n = v(() => {
111
- o(r());
188
+ if (x(r) || z(r)) {
189
+ const n = y(() => {
190
+ i(r());
112
191
  });
113
192
  this.cleanup.push(() => n.dispose());
114
193
  return;
115
194
  }
116
- o(
195
+ i(
117
196
  typeof this.props.src == "string" ? this.props.src : void 0
118
197
  );
119
198
  }
@@ -124,16 +203,16 @@ class B extends z {
124
203
  * Concatenate this image with another concatenatable component
125
204
  */
126
205
  concat(t) {
127
- const s = this.toSegment(), i = t.toSegment(), o = {
128
- totalSegments: t instanceof O ? t.segments.length + 1 : 2,
129
- accessibilityRole: t instanceof O ? this.mergeAccessibilityRoles(
206
+ const s = this.toSegment(), o = t.toSegment(), i = {
207
+ totalSegments: t instanceof A ? t.segments.length + 1 : 2,
208
+ accessibilityRole: t instanceof A ? this.mergeAccessibilityRoles(
130
209
  "group",
131
210
  t.metadata.accessibilityRole
132
211
  ) : this.determineAccessibilityRole(t),
133
212
  semanticStructure: "inline"
134
213
  // Images are typically inline in concatenation
135
214
  };
136
- return new O([s, i], o);
215
+ return new A([s, o], i);
137
216
  }
138
217
  /**
139
218
  * Convert this image to a segment for concatenation
@@ -183,44 +262,44 @@ class B extends z {
183
262
  }
184
263
  }
185
264
  function P(e, t = {}) {
186
- const s = { ...t, src: e }, i = new B(s), o = f(i), r = (n) => {
265
+ const s = { ...t, src: e }, o = new J(s), i = f(o), r = (n) => {
187
266
  if (n && Array.isArray(n.modifiers))
188
267
  return n;
189
268
  if (n?._modifiableComponent && Array.isArray(n._modifiableComponent.modifiers))
190
269
  return n._modifiableComponent;
191
- if (Array.isArray(o?.modifiers))
192
- return o;
193
- if (o?._modifiableComponent && Array.isArray(o._modifiableComponent.modifiers))
194
- return o._modifiableComponent;
270
+ if (Array.isArray(i?.modifiers))
271
+ return i;
272
+ if (i?._modifiableComponent && Array.isArray(i._modifiableComponent.modifiers))
273
+ return i._modifiableComponent;
195
274
  throw new Error("Image shorthand target is not modifiable");
196
275
  };
197
- return o.scaledToFit = function() {
198
- return r(this).modifiers.push(A(void 0, "fit")), o;
199
- }, o.scaledToFill = function() {
200
- return r(this).modifiers.push(A(void 0, "fill")), o;
201
- }, o;
276
+ return i.scaledToFit = function() {
277
+ return r(this).modifiers.push($(void 0, "fit")), i;
278
+ }, i.scaledToFill = function() {
279
+ return r(this).modifiers.push($(void 0, "fill")), i;
280
+ }, i;
202
281
  }
203
- const Q = {
282
+ const nt = {
204
283
  idle: "idle",
205
284
  loading: "loading",
206
285
  loaded: "loaded",
207
286
  error: "error"
208
- }, tt = {
287
+ }, lt = {
209
288
  fit: "fit",
210
289
  fill: "fill",
211
290
  stretch: "stretch",
212
291
  center: "center",
213
292
  scaleDown: "scaleDown"
214
- }, et = {
293
+ }, at = {
215
294
  /**
216
295
  * Create a responsive image with multiple sources
217
296
  */
218
297
  responsive(e, t, s = {}) {
219
- const i = e.map((o) => {
220
- const r = [o.src];
221
- return o.width && r.push(`${o.width}w`), r.join(" ");
298
+ const o = e.map((i) => {
299
+ const r = [i.src];
300
+ return i.width && r.push(`${i.width}w`), r.join(" ");
222
301
  }).join(", ");
223
- return P(t, { ...s, srcSet: i });
302
+ return P(t, { ...s, srcSet: o });
224
303
  },
225
304
  /**
226
305
  * Create an image with progressive loading
@@ -242,23 +321,23 @@ const Q = {
242
321
  });
243
322
  }
244
323
  };
245
- var N = Object.defineProperty, X = (e, t, s) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, T = (e, t, s) => X(e, typeof t != "symbol" ? t + "" : t, s);
246
- class g {
247
- constructor(t, s, i, o = {}) {
248
- this.props = t, this.tag = s, this.content = i, this.attributes = o, T(this, "type", "component"), T(this, "id"), T(this, "mounted", !1), T(this, "cleanup", []), this.id = `element-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
324
+ var K = Object.defineProperty, Z = (e, t, s) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, I = (e, t, s) => Z(e, typeof t != "symbol" ? t + "" : t, s);
325
+ class S {
326
+ constructor(t, s, o, i = {}) {
327
+ this.props = t, this.tag = s, this.content = o, this.attributes = i, I(this, "type", "component"), I(this, "id"), I(this, "mounted", !1), I(this, "cleanup", []), this.id = `element-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
249
328
  }
250
329
  render() {
251
330
  return [
252
- m(this.tag, this.attributes, this.content ? W(this.content) : "")
331
+ v(this.tag, this.attributes, this.content ? Y(this.content) : "")
253
332
  ];
254
333
  }
255
334
  }
256
- const y = {
335
+ const w = {
257
336
  /**
258
337
  * Create a div element with modifier support
259
338
  */
260
339
  div: (e = {}) => {
261
- const t = new g(
340
+ const t = new S(
262
341
  e,
263
342
  "div",
264
343
  e.children ? String(e.children) : void 0
@@ -269,7 +348,7 @@ const y = {
269
348
  * Create a span element with modifier support
270
349
  */
271
350
  span: (e = {}) => {
272
- const t = new g(
351
+ const t = new S(
273
352
  e,
274
353
  "span",
275
354
  e.children ? String(e.children) : void 0
@@ -280,7 +359,7 @@ const y = {
280
359
  * Create an anchor element with modifier support
281
360
  */
282
361
  a: (e = {}) => {
283
- const t = new g(
362
+ const t = new S(
284
363
  e,
285
364
  "a",
286
365
  e.children ? String(e.children) : void 0,
@@ -295,7 +374,7 @@ const y = {
295
374
  * Create a paragraph element with modifier support
296
375
  */
297
376
  p: (e = {}) => {
298
- const t = new g(
377
+ const t = new S(
299
378
  e,
300
379
  "p",
301
380
  e.children ? String(e.children) : void 0
@@ -309,7 +388,7 @@ const y = {
309
388
  * use the main Button component instead.
310
389
  */
311
390
  button: (e = {}) => {
312
- const t = new g(
391
+ const t = new S(
313
392
  e,
314
393
  "button",
315
394
  e.children ? String(e.children) : void 0,
@@ -323,13 +402,13 @@ const y = {
323
402
  * Create an input element with modifier support
324
403
  */
325
404
  input: (e = {}) => {
326
- const t = new g(e, "input", void 0, {
405
+ const t = new S(e, "input", void 0, {
327
406
  type: e.type || "text",
328
407
  value: e.value || "",
329
408
  placeholder: e.placeholder || "",
330
409
  oninput: (s) => {
331
- const i = s.target;
332
- e.onChange?.(i.value);
410
+ const o = s.target;
411
+ e.onChange?.(o.value);
333
412
  }
334
413
  });
335
414
  return f(t);
@@ -341,7 +420,7 @@ const y = {
341
420
  * use the main Image component instead.
342
421
  */
343
422
  img: (e) => {
344
- const t = new g(e, "img", void 0, {
423
+ const t = new S(e, "img", void 0, {
345
424
  src: e.src,
346
425
  alt: e.alt || "",
347
426
  width: e.width,
@@ -353,20 +432,20 @@ const y = {
353
432
  * Create a heading element with modifier support
354
433
  */
355
434
  heading: (e) => (t = {}) => {
356
- const s = new g(
435
+ const s = new S(
357
436
  t,
358
437
  `h${e}`,
359
438
  t.children ? String(t.children) : void 0
360
439
  );
361
440
  return f(s);
362
441
  }
363
- }, st = y.heading(1), ot = y.heading(2), it = y.heading(3), nt = y.heading(4), rt = y.heading(5), lt = y.heading(6);
364
- var j = Object.defineProperty, U = (e, t, s) => t in e ? j(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, l = (e, t, s) => U(e, typeof t != "symbol" ? t + "" : t, s);
365
- class q {
442
+ }, ct = w.heading(1), ht = w.heading(2), dt = w.heading(3), pt = w.heading(4), ft = w.heading(5), ut = w.heading(6);
443
+ var Q = Object.defineProperty, tt = (e, t, s) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, l = (e, t, s) => tt(e, typeof t != "symbol" ? t + "" : t, s);
444
+ class et {
366
445
  constructor(t) {
367
446
  this.props = t, l(this, "type", "component"), l(this, "id"), l(this, "mounted", !1), l(this, "cleanup", []), l(this, "scrollElement", null), l(this, "contentOffsetSignal"), l(this, "setContentOffset"), l(this, "contentSizeSignal"), l(this, "setContentSize"), l(this, "setIsScrolling"), l(this, "pullToRefreshStateSignal"), l(this, "setPullToRefreshState"), l(this, "scrollEventThrottle"), l(this, "lastScrollTime", 0), l(this, "scrollVelocity", { x: 0, y: 0 }), l(this, "lastScrollOffset", { x: 0, y: 0 }), l(this, "pullStartY", 0), l(this, "isPulling", !1), l(this, "handleScroll", (h) => {
368
447
  if (!this.scrollElement) return;
369
- const p = performance.now(), a = p - this.lastScrollTime;
448
+ const g = performance.now(), a = g - this.lastScrollTime;
370
449
  if (a < this.scrollEventThrottle) return;
371
450
  const d = {
372
451
  x: this.scrollElement.scrollLeft,
@@ -376,7 +455,7 @@ class q {
376
455
  width: this.scrollElement.scrollWidth,
377
456
  height: this.scrollElement.scrollHeight
378
457
  });
379
- const c = this.detectScrollEdges(), w = {
458
+ const c = this.detectScrollEdges(), T = {
380
459
  offset: d,
381
460
  velocity: this.scrollVelocity,
382
461
  contentSize: {
@@ -389,7 +468,7 @@ class q {
389
468
  },
390
469
  edges: c
391
470
  };
392
- this.props.onScroll && this.props.onScroll(w), c.top && this.props.onReachTop && this.props.onReachTop(), c.bottom && this.props.onReachBottom && this.props.onReachBottom(), c.left && this.props.onReachLeft && this.props.onReachLeft(), c.right && this.props.onReachRight && this.props.onReachRight(), this.lastScrollOffset = d, this.lastScrollTime = p;
471
+ this.props.onScroll && this.props.onScroll(T), c.top && this.props.onReachTop && this.props.onReachTop(), c.bottom && this.props.onReachBottom && this.props.onReachBottom(), c.left && this.props.onReachLeft && this.props.onReachLeft(), c.right && this.props.onReachRight && this.props.onReachRight(), this.lastScrollOffset = d, this.lastScrollTime = g;
393
472
  }), l(this, "handleScrollStart", () => {
394
473
  this.setIsScrolling(!0), this.props.onScrollBegin && this.props.onScrollBegin();
395
474
  }), l(this, "handleScrollEnd", () => {
@@ -406,8 +485,8 @@ class q {
406
485
  this.setPullToRefreshState("refreshing");
407
486
  try {
408
487
  await this.props.refreshControl.onRefresh();
409
- } catch (p) {
410
- console.error("Pull to refresh error:", p);
488
+ } catch (g) {
489
+ console.error("Pull to refresh error:", g);
411
490
  } finally {
412
491
  this.setPullToRefreshState("idle");
413
492
  }
@@ -415,29 +494,29 @@ class q {
415
494
  this.setPullToRefreshState("idle");
416
495
  this.isPulling = !1;
417
496
  }), this.id = `scrollview-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, this.scrollEventThrottle = t.scrollEventThrottle || 16;
418
- const [s, i] = b(
497
+ const [s, o] = E(
419
498
  { x: 0, y: 0 }
420
499
  );
421
- this.contentOffsetSignal = s, this.setContentOffset = i;
422
- const [o, r] = b({
500
+ this.contentOffsetSignal = s, this.setContentOffset = o;
501
+ const [i, r] = E({
423
502
  width: 0,
424
503
  height: 0
425
504
  });
426
- this.contentSizeSignal = o, this.setContentSize = r;
427
- const [, n] = b(!1);
505
+ this.contentSizeSignal = i, this.setContentSize = r;
506
+ const [, n] = E(!1);
428
507
  this.setIsScrolling = n;
429
- const [E, R] = b("idle");
430
- if (this.pullToRefreshStateSignal = E, this.setPullToRefreshState = R, t.contentOffset && S(t.contentOffset)) {
508
+ const [p, u] = E("idle");
509
+ if (this.pullToRefreshStateSignal = p, this.setPullToRefreshState = u, t.contentOffset && b(t.contentOffset)) {
431
510
  this.setContentOffset(t.contentOffset());
432
- const h = v(() => {
433
- t.contentOffset && S(t.contentOffset) && this.setContentOffset(t.contentOffset());
511
+ const h = y(() => {
512
+ t.contentOffset && b(t.contentOffset) && this.setContentOffset(t.contentOffset());
434
513
  });
435
514
  this.cleanup.push(() => h.dispose());
436
515
  }
437
- if (t.contentSize && S(t.contentSize)) {
516
+ if (t.contentSize && b(t.contentSize)) {
438
517
  this.setContentSize(t.contentSize());
439
- const h = v(() => {
440
- t.contentSize && S(t.contentSize) && this.setContentSize(t.contentSize());
518
+ const h = y(() => {
519
+ t.contentSize && b(t.contentSize) && this.setContentSize(t.contentSize());
441
520
  });
442
521
  this.cleanup.push(() => h.dispose());
443
522
  }
@@ -446,10 +525,10 @@ class q {
446
525
  * Calculate scroll velocity
447
526
  */
448
527
  calculateVelocity(t, s) {
449
- const i = t.x - this.lastScrollOffset.x, o = t.y - this.lastScrollOffset.y;
528
+ const o = t.x - this.lastScrollOffset.x, i = t.y - this.lastScrollOffset.y;
450
529
  return {
451
- x: s > 0 ? i / s : 0,
452
- y: s > 0 ? o / s : 0
530
+ x: s > 0 ? o / s : 0,
531
+ y: s > 0 ? i / s : 0
453
532
  };
454
533
  }
455
534
  /**
@@ -461,16 +540,16 @@ class q {
461
540
  const {
462
541
  scrollTop: t,
463
542
  scrollLeft: s,
464
- scrollHeight: i,
465
- scrollWidth: o,
543
+ scrollHeight: o,
544
+ scrollWidth: i,
466
545
  clientHeight: r,
467
546
  clientWidth: n
468
547
  } = this.scrollElement;
469
548
  return {
470
549
  top: t <= 0,
471
- bottom: t + r >= i - 1,
550
+ bottom: t + r >= o - 1,
472
551
  left: s <= 0,
473
- right: s + n >= o - 1
552
+ right: s + n >= i - 1
474
553
  };
475
554
  }
476
555
  /**
@@ -478,14 +557,14 @@ class q {
478
557
  */
479
558
  setupScrollHandlers(t) {
480
559
  let s;
481
- const i = () => {
560
+ const o = () => {
482
561
  clearTimeout(s), this.handleScrollStart();
483
- }, o = () => {
562
+ }, i = () => {
484
563
  clearTimeout(s), s = setTimeout(() => {
485
564
  this.handleScrollEnd();
486
565
  }, 150);
487
566
  }, r = (n) => {
488
- i(), this.handleScroll(n), o();
567
+ o(), this.handleScroll(n), i();
489
568
  };
490
569
  t.addEventListener("scroll", r, { passive: !0 }), t.addEventListener("touchstart", this.handleTouchStart, {
491
570
  passive: !0
@@ -525,19 +604,19 @@ class q {
525
604
  * Apply additional scroll view styling (position and overflow already set in initial render)
526
605
  */
527
606
  applyScrollViewStyles(t) {
528
- const { showsScrollIndicator: s = !0, bounces: i = !0 } = this.props;
607
+ const { showsScrollIndicator: s = !0, bounces: o = !0 } = this.props;
529
608
  if (!s) {
530
609
  t.style.scrollbarWidth = "none", t.style.msOverflowStyle = "none";
531
- const o = document.createElement("style");
532
- o.textContent = `
610
+ const i = document.createElement("style");
611
+ i.textContent = `
533
612
  #${t.id}::-webkit-scrollbar {
534
613
  display: none;
535
614
  }
536
- `, document.head.appendChild(o), this.cleanup.push(() => {
537
- document.head.removeChild(o);
615
+ `, document.head.appendChild(i), this.cleanup.push(() => {
616
+ document.head.removeChild(i);
538
617
  });
539
618
  }
540
- i ? t.style.webkitOverflowScrolling = "touch" : t.style.overscrollBehavior = "none", t.style.scrollBehavior = "smooth";
619
+ o ? t.style.webkitOverflowScrolling = "touch" : t.style.overscrollBehavior = "none", t.style.scrollBehavior = "smooth";
541
620
  }
542
621
  /**
543
622
  * Apply content insets
@@ -545,8 +624,8 @@ class q {
545
624
  applyContentInsets(t) {
546
625
  const { contentInset: s } = this.props;
547
626
  if (s) {
548
- const { top: i = 0, bottom: o = 0, left: r = 0, right: n = 0 } = s;
549
- t.style.padding = `${i}px ${n}px ${o}px ${r}px`;
627
+ const { top: o = 0, bottom: i = 0, left: r = 0, right: n = 0 } = s;
628
+ t.style.padding = `${o}px ${n}px ${i}px ${r}px`;
550
629
  }
551
630
  }
552
631
  /**
@@ -555,28 +634,28 @@ class q {
555
634
  createPullToRefreshIndicator() {
556
635
  if (!this.props.refreshControl?.enabled) return null;
557
636
  const t = this.pullToRefreshStateSignal(), s = this.props.refreshControl.tintColor || "#007AFF";
558
- let i = "";
637
+ let o = "";
559
638
  switch (t) {
560
639
  case "pulling":
561
- i = "↓ Pull to refresh";
640
+ o = "↓ Pull to refresh";
562
641
  break;
563
642
  case "ready":
564
- i = "↑ Release to refresh";
643
+ o = "↑ Release to refresh";
565
644
  break;
566
645
  case "refreshing":
567
- i = "⟳ Refreshing...";
646
+ o = "⟳ Refreshing...";
568
647
  break;
569
648
  default:
570
- i = "";
649
+ o = "";
571
650
  }
572
- return i ? {
651
+ return o ? {
573
652
  type: "component",
574
653
  id: `${this.id}-refresh`,
575
654
  mounted: !1,
576
655
  cleanup: [],
577
656
  props: {},
578
657
  render: () => [
579
- m(
658
+ v(
580
659
  "div",
581
660
  {
582
661
  style: {
@@ -596,7 +675,7 @@ class q {
596
675
  opacity: t === "idle" ? 0 : 1
597
676
  }
598
677
  },
599
- i
678
+ o
600
679
  )
601
680
  ]
602
681
  } : null;
@@ -606,8 +685,8 @@ class q {
606
685
  */
607
686
  scrollTo(t, s = "smooth") {
608
687
  if (!this.scrollElement) return;
609
- const i = { behavior: s };
610
- t.x !== void 0 && (i.left = t.x), t.y !== void 0 && (i.top = t.y), this.scrollElement.scrollTo(i);
688
+ const o = { behavior: s };
689
+ t.x !== void 0 && (o.left = t.x), t.y !== void 0 && (o.top = t.y), this.scrollElement.scrollTo(o);
611
690
  }
612
691
  /**
613
692
  * Scroll to top
@@ -632,13 +711,13 @@ class q {
632
711
  */
633
712
  render() {
634
713
  const { children: t = [], scrollEnabled: s = !0 } = this.props;
635
- let i = [];
636
- const o = t;
637
- if (typeof o == "function") {
638
- const a = o();
639
- i = Array.isArray(a) ? a : [];
640
- } else Array.isArray(t) && (i = t);
641
- const r = m(
714
+ let o = [];
715
+ const i = t;
716
+ if (typeof i == "function") {
717
+ const a = i();
718
+ o = Array.isArray(a) ? a : [];
719
+ } else Array.isArray(t) && (o = t);
720
+ const r = v(
642
721
  "div",
643
722
  {
644
723
  class: "tachui-scrollview-content",
@@ -647,14 +726,14 @@ class q {
647
726
  minWidth: "100%"
648
727
  }
649
728
  },
650
- ...i.flatMap((a) => a.render())
651
- ), n = this.createPullToRefreshIndicator(), E = [];
729
+ ...o.flatMap((a) => a.render())
730
+ ), n = this.createPullToRefreshIndicator(), p = [];
652
731
  if (n) {
653
732
  const a = n.render(), d = Array.isArray(a) ? a : [a];
654
- E.push(...d.filter((c) => c));
733
+ p.push(...d.filter((c) => c));
655
734
  }
656
- E.push(r);
657
- const { direction: R = "vertical" } = this.props, h = this.getOverflowStyles(R), p = m(
735
+ p.push(r);
736
+ const { direction: u = "vertical" } = this.props, h = this.getOverflowStyles(u), g = v(
658
737
  "div",
659
738
  {
660
739
  id: this.id,
@@ -666,46 +745,46 @@ class q {
666
745
  ...h
667
746
  }
668
747
  },
669
- ...E
748
+ ...p
670
749
  );
671
- if (p.element) {
672
- const a = p.element;
750
+ if (g.element) {
751
+ const a = g.element;
673
752
  this.scrollElement = a, this.applyScrollViewStyles(a), this.setupScrollHandlers(a), r.element && this.applyContentInsets(r.element);
674
753
  const d = () => {
675
- const c = S(s) ? s() : s;
754
+ const c = b(s) ? s() : s;
676
755
  a.style.overflow = c ? "auto" : "hidden", a.style.pointerEvents = c ? "auto" : "none";
677
756
  };
678
- if (S(s)) {
679
- const c = v(d);
757
+ if (b(s)) {
758
+ const c = y(d);
680
759
  this.cleanup.push(() => c.dispose());
681
760
  } else
682
761
  d();
683
- if (typeof o == "function") {
684
- const c = v(() => {
685
- const w = o(), _ = (Array.isArray(w) ? w : []).flatMap((C) => C.render());
762
+ if (typeof i == "function") {
763
+ const c = y(() => {
764
+ const T = i(), W = (Array.isArray(T) ? T : []).flatMap((C) => C.render());
686
765
  if (r.element) {
687
766
  const C = r.element;
688
- C.innerHTML = "", _.forEach((L) => {
689
- L && L.element && C.appendChild(L.element);
767
+ C.innerHTML = "", W.forEach((O) => {
768
+ O && O.element && C.appendChild(O.element);
690
769
  });
691
770
  }
692
771
  });
693
772
  this.cleanup.push(() => c.dispose());
694
773
  }
695
774
  }
696
- return [p];
775
+ return [g];
697
776
  }
698
777
  }
699
- function I(e = {}) {
700
- const t = new q(e);
778
+ function _(e = {}) {
779
+ const t = new et(e);
701
780
  return f(t);
702
781
  }
703
- const at = {
782
+ const gt = {
704
783
  /**
705
784
  * Create a scroll view with pull to refresh
706
785
  */
707
786
  withRefresh(e, t, s = {}) {
708
- return I({
787
+ return _({
709
788
  children: e,
710
789
  refreshControl: {
711
790
  enabled: !0,
@@ -718,7 +797,7 @@ const at = {
718
797
  * Create a horizontal scroll view
719
798
  */
720
799
  horizontal(e, t = {}) {
721
- return I({
800
+ return _({
722
801
  ...t,
723
802
  children: e,
724
803
  direction: "horizontal"
@@ -728,7 +807,7 @@ const at = {
728
807
  * Create a paged scroll view
729
808
  */
730
809
  paged(e, t = {}) {
731
- return I({
810
+ return _({
732
811
  ...t,
733
812
  children: e,
734
813
  pagingEnabled: !0
@@ -736,19 +815,19 @@ const at = {
736
815
  }
737
816
  };
738
817
  export {
739
- B as E,
740
- y as H,
818
+ J as E,
819
+ w as H,
741
820
  P as I,
742
- I as S,
743
- Q as a,
744
- tt as b,
745
- et as c,
746
- st as d,
747
- ot as e,
748
- it as f,
749
- nt as g,
750
- rt as h,
751
- lt as i,
752
- q as j,
753
- at as k
821
+ _ as S,
822
+ nt as a,
823
+ lt as b,
824
+ at as c,
825
+ ct as d,
826
+ ht as e,
827
+ dt as f,
828
+ pt as g,
829
+ ft as h,
830
+ ut as i,
831
+ et as j,
832
+ gt as k
754
833
  };
@@ -15,6 +15,7 @@ import { type ElementOverrideProps } from '@tachui/core';
15
15
  import { ComponentWithCSSClasses, type CSSClassesProps } from '@tachui/core';
16
16
  type ImageAssetLike = ImageAsset | ImageAssetProxy;
17
17
  type ImageSource = string | Signal<string> | ImageAssetLike;
18
+ type ImageRenderingMode = 'original' | 'template';
18
19
  /**
19
20
  * Image loading state
20
21
  */
@@ -33,6 +34,9 @@ export type ImageResizeMode = 'cover' | 'contain' | 'fill' | 'none';
33
34
  export type ImageLoadingStrategy = 'eager' | 'lazy';
34
35
  export interface ImageProps extends ComponentProps, ElementOverrideProps, CSSClassesProps {
35
36
  src?: ImageSource;
37
+ renderingMode?: ImageRenderingMode;
38
+ decorative?: boolean | Signal<boolean>;
39
+ customSanitizer?: (markup: string) => string;
36
40
  srcSet?: string | Signal<string>;
37
41
  alt?: string | Signal<string>;
38
42
  width?: number | string | Signal<number | string>;
@@ -86,6 +90,7 @@ export declare class EnhancedImage extends ComponentWithCSSClasses implements Co
86
90
  * Set up ImageAsset reactivity for a real DOM element (called from onDOMReady)
87
91
  */
88
92
  private setupImageAssetReactivityForDOMElement;
93
+ private setupTemplateModeReactivityForDOMElement;
89
94
  private setupLoadingStateReactivityForDOMElement;
90
95
  /**
91
96
  * Concatenate this image with another concatenatable component
@@ -133,6 +138,7 @@ export interface ImageWithShorthands extends ModifiableComponentWithModifiers<Im
133
138
  scaledToFill(): ImageWithShorthands;
134
139
  }
135
140
  export declare function Image(src: ImageSource, props?: Omit<ImageProps, 'src'>): ImageWithShorthands;
141
+ export declare function __resetImageTemplateCacheForTests(): void;
136
142
  /**
137
143
  * Image loading states for external use
138
144
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/display/Image.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,gCAAgC,EACjC,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAI1D,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAA0B,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAA;AAG5E,KAAK,cAAc,GAAG,UAAU,GAAG,eAAe,CAAA;AAClD,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,cAAc,CAAA;AAE3D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEvE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,CAAA;AAEf;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAA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AC3D;IAQD;;OAEG;yBAEI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,kBACZ,MAAM,UACf,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,aAAa,CAAC,GAC7C,mBAAmB,CAAC,UAAU,CAAC,GAAG;QACnC,QAAQ,EAAE,eAAe,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAA;KAC3D;CAMF,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { E as e, H as t, T as o, a as H, b as l, c as n } from "../Text-WpP4H9se.js";
2
- import { E as c, j as g, d as m, e as i, f as T, g as d, h as x, i as I, H as S, I as h, b as E, a as p, c as f, S as w, k as y } from "../ScrollView-CtvxVuuS.js";
2
+ import { E as c, j as g, d as m, e as i, f as T, g as d, h as x, i as I, H as S, I as h, b as E, a as p, c as f, S as w, k as y } from "../ScrollView-D9G6WDwr.js";
3
3
  export {
4
4
  c as EnhancedImage,
5
5
  g as EnhancedScrollView,
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Divider as b, DividerComponent as P, DividerStyles as I, DividerUtils as y, HStack as j, Spacer as S, SpacerComponent as A, VStack as L, ZStack as C, defaultDividerTheme as V } from "./layout/index.js";
2
2
  import { E as O, H as E, T as $, a as F, b as q, c as U } from "./Text-WpP4H9se.js";
3
- import { E as N, j as _, d as W, e as R, f as M, g as G, h as K, i as Z, H as z, I as J, b as Q, a as X, c as Y, S as ee, k as te } from "./ScrollView-CtvxVuuS.js";
3
+ import { E as N, j as _, d as W, e as R, f as M, g as G, h as K, i as Z, H as z, I as J, b as Q, a as X, c as Y, S as ee, k as te } from "./ScrollView-D9G6WDwr.js";
4
4
  import { B as ne, a as ie, E as re, h as ae, c as se, L as ce, b as le, P as pe, i as de, j as ge, T as ue, e as me, f as he, g as fe, d as ve } from "./Picker-CpERkpVp.js";
5
5
  import { B as xe, a as ke, b as Be, c as Te, d as be, e as Pe, f as Ie } from "./BasicInput-BHfrSdoi.js";
6
6
  import { withModifiers as je } from "@tachui/core";
@@ -425,7 +425,7 @@ const w = {
425
425
  }
426
426
  console.groupEnd();
427
427
  }
428
- }, h = "@tachui/primitives", f = "0.8.16", x = h, k = f;
428
+ }, h = "@tachui/primitives", f = "0.8.17", x = h, k = f;
429
429
  export {
430
430
  xe as BasicForm,
431
431
  ke as BasicFormImplementation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachui/primitives",
3
- "version": "0.8.16",
3
+ "version": "0.8.17",
4
4
  "description": "Basic UI components for tachUI framework",
5
5
  "homepage": "https://tachui.dev/",
6
6
  "type": "module",
@@ -33,8 +33,8 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@tachui/core": "0.8.16",
37
- "@tachui/modifiers": "0.8.16"
36
+ "@tachui/core": "0.8.17",
37
+ "@tachui/modifiers": "0.8.17"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^20.0.0",