vistaview 0.10.18 → 0.10.19

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/react.js CHANGED
@@ -1,12 +1,10 @@
1
1
  "use client";
2
- import { t as v, u as I, s as g, i as w } from "./web-D29dUeNW.js";
3
- import { useRef as l, useEffect as a, useCallback as t, useId as y, useImperativeHandle as x } from "react";
4
- import { vistaView as m } from "./vistaview.js";
5
- import { mergeProps as V } from "solid-js";
6
- var $ = /* @__PURE__ */ v("<div>");
7
- function P(o) {
8
- const r = l(null);
9
- return a(() => (r.current = m(o), () => {
2
+ import { jsx as v } from "react/jsx-runtime";
3
+ import { useRef as s, useEffect as a, useCallback as t, useId as I, useImperativeHandle as g } from "react";
4
+ import { vistaView as d } from "./vistaview.js";
5
+ function V(c) {
6
+ const r = s(null);
7
+ return a(() => (r.current = d(c), () => {
10
8
  var e;
11
9
  (e = r.current) == null || e.destroy(), r.current = null;
12
10
  }), []), {
@@ -52,32 +50,20 @@ function P(o) {
52
50
  }, [])
53
51
  };
54
52
  }
55
- function _({
56
- children: o,
57
- selector: r = "> a",
58
- options: e,
59
- id: n,
60
- ref: p,
61
- ...d
62
- }) {
63
- const i = l(null), s = l(null), f = y(), c = n || `vvw-gallery-${f.replace(/:/g, "")}`;
64
- return x(p, () => s.current, []), a(() => {
53
+ function z({ children: c, selector: r = "> a", options: e, id: n, ref: m, ...f }) {
54
+ const i = s(null), u = s(null), p = I(), o = n || `vvw-gallery-${p.replace(/:/g, "")}`;
55
+ return g(m, () => u.current, []), a(() => {
65
56
  if (i.current)
66
- return s.current = m({
57
+ return u.current = d({
67
58
  ...e,
68
- elements: `#${c} ${r}`
59
+ elements: `#${o} ${r}`
69
60
  }), () => {
70
- var u;
71
- (u = s.current) == null || u.destroy(), s.current = null;
61
+ var l;
62
+ (l = u.current) == null || l.destroy(), u.current = null;
72
63
  };
73
- }, [c, r]), (() => {
74
- var u = $();
75
- return I(i, u), g(u, V(d, {
76
- id: c
77
- }), !1), w(u, o), u;
78
- })();
64
+ }, [o, r]), /* @__PURE__ */ v("div", { ref: i, ...f, id: o, children: c });
79
65
  }
80
66
  export {
81
- _ as VistaView,
82
- P as useVistaView
67
+ z as VistaView,
68
+ V as useVistaView
83
69
  };
package/dist/solid.js CHANGED
@@ -1,53 +1,493 @@
1
- import { t as y, u as I, s as x, i as V } from "./web-D29dUeNW.js";
2
- import { onCleanup as m, createSignal as $, onMount as z, mergeProps as C } from "solid-js";
3
- import { vistaView as p } from "./vistaview.js";
4
- var a = /* @__PURE__ */ y("<div>");
5
- function P(t) {
6
- const r = p(t);
7
- return m(() => {
8
- r == null || r.destroy();
1
+ import { untrack as L, createRenderEffect as g, sharedConfig as h, onCleanup as N, createSignal as M, onMount as x, mergeProps as k } from "solid-js";
2
+ import { vistaView as O } from "./vistaview.js";
3
+ const R = [
4
+ "allowfullscreen",
5
+ "async",
6
+ "alpha",
7
+ "autofocus",
8
+ "autoplay",
9
+ "checked",
10
+ "controls",
11
+ "default",
12
+ "disabled",
13
+ "formnovalidate",
14
+ "hidden",
15
+ "indeterminate",
16
+ "inert",
17
+ "ismap",
18
+ "loop",
19
+ "multiple",
20
+ "muted",
21
+ "nomodule",
22
+ "novalidate",
23
+ "open",
24
+ "playsinline",
25
+ "readonly",
26
+ "required",
27
+ "reversed",
28
+ "seamless",
29
+ "selected",
30
+ "adauctionheaders",
31
+ "browsingtopics",
32
+ "credentialless",
33
+ "defaultchecked",
34
+ "defaultmuted",
35
+ "defaultselected",
36
+ "defer",
37
+ "disablepictureinpicture",
38
+ "disableremoteplayback",
39
+ "preservespitch",
40
+ "shadowrootclonable",
41
+ "shadowrootcustomelementregistry",
42
+ "shadowrootdelegatesfocus",
43
+ "shadowrootserializable",
44
+ "sharedstoragewritable"
45
+ ], V = /* @__PURE__ */ new Set([
46
+ "className",
47
+ "value",
48
+ "readOnly",
49
+ "noValidate",
50
+ "formNoValidate",
51
+ "isMap",
52
+ "noModule",
53
+ "playsInline",
54
+ "adAuctionHeaders",
55
+ "allowFullscreen",
56
+ "browsingTopics",
57
+ "defaultChecked",
58
+ "defaultMuted",
59
+ "defaultSelected",
60
+ "disablePictureInPicture",
61
+ "disableRemotePlayback",
62
+ "preservesPitch",
63
+ "shadowRootClonable",
64
+ "shadowRootCustomElementRegistry",
65
+ "shadowRootDelegatesFocus",
66
+ "shadowRootSerializable",
67
+ "sharedStorageWritable",
68
+ ...R
69
+ ]), D = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), j = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
70
+ className: "class",
71
+ htmlFor: "for"
72
+ }), B = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
73
+ class: "className",
74
+ novalidate: {
75
+ $: "noValidate",
76
+ FORM: 1
77
+ },
78
+ formnovalidate: {
79
+ $: "formNoValidate",
80
+ BUTTON: 1,
81
+ INPUT: 1
82
+ },
83
+ ismap: {
84
+ $: "isMap",
85
+ IMG: 1
86
+ },
87
+ nomodule: {
88
+ $: "noModule",
89
+ SCRIPT: 1
90
+ },
91
+ playsinline: {
92
+ $: "playsInline",
93
+ VIDEO: 1
94
+ },
95
+ readonly: {
96
+ $: "readOnly",
97
+ INPUT: 1,
98
+ TEXTAREA: 1
99
+ },
100
+ adauctionheaders: {
101
+ $: "adAuctionHeaders",
102
+ IFRAME: 1
103
+ },
104
+ allowfullscreen: {
105
+ $: "allowFullscreen",
106
+ IFRAME: 1
107
+ },
108
+ browsingtopics: {
109
+ $: "browsingTopics",
110
+ IMG: 1
111
+ },
112
+ defaultchecked: {
113
+ $: "defaultChecked",
114
+ INPUT: 1
115
+ },
116
+ defaultmuted: {
117
+ $: "defaultMuted",
118
+ AUDIO: 1,
119
+ VIDEO: 1
120
+ },
121
+ defaultselected: {
122
+ $: "defaultSelected",
123
+ OPTION: 1
124
+ },
125
+ disablepictureinpicture: {
126
+ $: "disablePictureInPicture",
127
+ VIDEO: 1
128
+ },
129
+ disableremoteplayback: {
130
+ $: "disableRemotePlayback",
131
+ AUDIO: 1,
132
+ VIDEO: 1
133
+ },
134
+ preservespitch: {
135
+ $: "preservesPitch",
136
+ AUDIO: 1,
137
+ VIDEO: 1
138
+ },
139
+ shadowrootclonable: {
140
+ $: "shadowRootClonable",
141
+ TEMPLATE: 1
142
+ },
143
+ shadowrootdelegatesfocus: {
144
+ $: "shadowRootDelegatesFocus",
145
+ TEMPLATE: 1
146
+ },
147
+ shadowrootserializable: {
148
+ $: "shadowRootSerializable",
149
+ TEMPLATE: 1
150
+ },
151
+ sharedstoragewritable: {
152
+ $: "sharedStorageWritable",
153
+ IFRAME: 1,
154
+ IMG: 1
155
+ }
156
+ });
157
+ function F(i, e) {
158
+ const t = B[i];
159
+ return typeof t == "object" ? t[e] ? t.$ : void 0 : t;
160
+ }
161
+ const _ = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
162
+ function U(i, e, t) {
163
+ let l = t.length, n = e.length, o = l, f = 0, s = 0, r = e[n - 1].nextSibling, c = null;
164
+ for (; f < n || s < o; ) {
165
+ if (e[f] === t[s]) {
166
+ f++, s++;
167
+ continue;
168
+ }
169
+ for (; e[n - 1] === t[o - 1]; )
170
+ n--, o--;
171
+ if (n === f) {
172
+ const a = o < l ? s ? t[s - 1].nextSibling : t[o - s] : r;
173
+ for (; s < o; ) i.insertBefore(t[s++], a);
174
+ } else if (o === s)
175
+ for (; f < n; )
176
+ (!c || !c.has(e[f])) && e[f].remove(), f++;
177
+ else if (e[f] === t[o - 1] && t[s] === e[n - 1]) {
178
+ const a = e[--n].nextSibling;
179
+ i.insertBefore(t[s++], e[f++].nextSibling), i.insertBefore(t[--o], a), e[n] = t[o];
180
+ } else {
181
+ if (!c) {
182
+ c = /* @__PURE__ */ new Map();
183
+ let d = s;
184
+ for (; d < o; ) c.set(t[d], d++);
185
+ }
186
+ const a = c.get(e[f]);
187
+ if (a != null)
188
+ if (s < a && a < o) {
189
+ let d = f, u = 1, y;
190
+ for (; ++d < n && d < o && !((y = c.get(e[d])) == null || y !== a + u); )
191
+ u++;
192
+ if (u > a - s) {
193
+ const $ = e[f];
194
+ for (; s < a; ) i.insertBefore(t[s++], $);
195
+ } else i.replaceChild(t[s++], e[f++]);
196
+ } else f++;
197
+ else e[f++].remove();
198
+ }
199
+ }
200
+ }
201
+ const T = "_$DX_DELEGATE";
202
+ function H(i, e, t, l) {
203
+ let n;
204
+ const o = () => {
205
+ const s = document.createElement("template");
206
+ return s.innerHTML = i, s.content.firstChild;
207
+ }, f = () => (n || (n = o())).cloneNode(!0);
208
+ return f.cloneNode = f, f;
209
+ }
210
+ function G(i, e = window.document) {
211
+ const t = e[T] || (e[T] = /* @__PURE__ */ new Set());
212
+ for (let l = 0, n = i.length; l < n; l++) {
213
+ const o = i[l];
214
+ t.has(o) || (t.add(o), e.addEventListener(o, Z));
215
+ }
216
+ }
217
+ function A(i, e, t) {
218
+ m(i) || (t == null ? i.removeAttribute(e) : i.setAttribute(e, t));
219
+ }
220
+ function z(i, e, t) {
221
+ m(i) || (t ? i.setAttribute(e, "") : i.removeAttribute(e));
222
+ }
223
+ function K(i, e) {
224
+ m(i) || (e == null ? i.removeAttribute("class") : i.className = e);
225
+ }
226
+ function p(i, e, t, l) {
227
+ if (l)
228
+ Array.isArray(t) ? (i[`$$${e}`] = t[0], i[`$$${e}Data`] = t[1]) : i[`$$${e}`] = t;
229
+ else if (Array.isArray(t)) {
230
+ const n = t[0];
231
+ i.addEventListener(e, t[0] = (o) => n.call(i, t[1], o));
232
+ } else i.addEventListener(e, t, typeof t != "function" && t);
233
+ }
234
+ function q(i, e, t = {}) {
235
+ const l = Object.keys(e || {}), n = Object.keys(t);
236
+ let o, f;
237
+ for (o = 0, f = n.length; o < f; o++) {
238
+ const s = n[o];
239
+ !s || s === "undefined" || e[s] || (C(i, s, !1), delete t[s]);
240
+ }
241
+ for (o = 0, f = l.length; o < f; o++) {
242
+ const s = l[o], r = !!e[s];
243
+ !s || s === "undefined" || t[s] === r || !r || (C(i, s, !0), t[s] = r);
244
+ }
245
+ return t;
246
+ }
247
+ function W(i, e, t) {
248
+ if (!e) return t ? A(i, "style") : e;
249
+ const l = i.style;
250
+ if (typeof e == "string") return l.cssText = e;
251
+ typeof t == "string" && (l.cssText = t = void 0), t || (t = {}), e || (e = {});
252
+ let n, o;
253
+ for (o in t)
254
+ e[o] == null && l.removeProperty(o), delete t[o];
255
+ for (o in e)
256
+ n = e[o], n !== t[o] && (l.setProperty(o, n), t[o] = n);
257
+ return t;
258
+ }
259
+ function X(i, e = {}, t, l) {
260
+ const n = {};
261
+ return g(() => typeof e.ref == "function" && S(e.ref, i)), g(() => J(i, e, t, !0, n, !0)), n;
262
+ }
263
+ function S(i, e, t) {
264
+ return L(() => i(e, t));
265
+ }
266
+ function Y(i, e, t, l) {
267
+ if (typeof e != "function") return w(i, e, l, t);
268
+ g((n) => w(i, e(), n, t), l);
269
+ }
270
+ function J(i, e, t, l, n = {}, o = !1) {
271
+ e || (e = {});
272
+ for (const f in n)
273
+ if (!(f in e)) {
274
+ if (f === "children") continue;
275
+ n[f] = I(i, f, null, n[f], t, o, e);
276
+ }
277
+ for (const f in e) {
278
+ if (f === "children")
279
+ continue;
280
+ const s = e[f];
281
+ n[f] = I(i, f, s, n[f], t, o, e);
282
+ }
283
+ }
284
+ function m(i) {
285
+ return !!h.context && !h.done && (!i || i.isConnected);
286
+ }
287
+ function Q(i) {
288
+ return i.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase());
289
+ }
290
+ function C(i, e, t) {
291
+ const l = e.trim().split(/\s+/);
292
+ for (let n = 0, o = l.length; n < o; n++) i.classList.toggle(l[n], t);
293
+ }
294
+ function I(i, e, t, l, n, o, f) {
295
+ let s, r, c, a, d;
296
+ if (e === "style") return W(i, t, l);
297
+ if (e === "classList") return q(i, t, l);
298
+ if (t === l) return l;
299
+ if (e === "ref")
300
+ o || t(i);
301
+ else if (e.slice(0, 3) === "on:") {
302
+ const u = e.slice(3);
303
+ l && i.removeEventListener(u, l, typeof l != "function" && l), t && i.addEventListener(u, t, typeof t != "function" && t);
304
+ } else if (e.slice(0, 10) === "oncapture:") {
305
+ const u = e.slice(10);
306
+ l && i.removeEventListener(u, l, !0), t && i.addEventListener(u, t, !0);
307
+ } else if (e.slice(0, 2) === "on") {
308
+ const u = e.slice(2).toLowerCase(), y = _.has(u);
309
+ if (!y && l) {
310
+ const $ = Array.isArray(l) ? l[0] : l;
311
+ i.removeEventListener(u, $);
312
+ }
313
+ (y || t) && (p(i, u, t, y), y && G([u]));
314
+ } else if (e.slice(0, 5) === "attr:")
315
+ A(i, e.slice(5), t);
316
+ else if (e.slice(0, 5) === "bool:")
317
+ z(i, e.slice(5), t);
318
+ else if ((d = e.slice(0, 5) === "prop:") || (c = D.has(e)) || (a = F(e, i.tagName)) || (r = V.has(e)) || (s = i.nodeName.includes("-") || "is" in f)) {
319
+ if (d)
320
+ e = e.slice(5), r = !0;
321
+ else if (m(i)) return t;
322
+ e === "class" || e === "className" ? K(i, t) : s && !r && !c ? i[Q(e)] = t : i[a || e] = t;
323
+ } else
324
+ A(i, j[e] || e, t);
325
+ return t;
326
+ }
327
+ function Z(i) {
328
+ if (h.registry && h.events && h.events.find(([r, c]) => c === i))
329
+ return;
330
+ let e = i.target;
331
+ const t = `$$${i.type}`, l = i.target, n = i.currentTarget, o = (r) => Object.defineProperty(i, "target", {
332
+ configurable: !0,
333
+ value: r
334
+ }), f = () => {
335
+ const r = e[t];
336
+ if (r && !e.disabled) {
337
+ const c = e[`${t}Data`];
338
+ if (c !== void 0 ? r.call(e, c, i) : r.call(e, i), i.cancelBubble) return;
339
+ }
340
+ return e.host && typeof e.host != "string" && !e.host._$host && e.contains(i.target) && o(e.host), !0;
341
+ }, s = () => {
342
+ for (; f() && (e = e._$host || e.parentNode || e.host); ) ;
343
+ };
344
+ if (Object.defineProperty(i, "currentTarget", {
345
+ configurable: !0,
346
+ get() {
347
+ return e || document;
348
+ }
349
+ }), h.registry && !h.done && (h.done = _$HY.done = !0), i.composedPath) {
350
+ const r = i.composedPath();
351
+ o(r[0]);
352
+ for (let c = 0; c < r.length - 2 && (e = r[c], !!f()); c++) {
353
+ if (e._$host) {
354
+ e = e._$host, s();
355
+ break;
356
+ }
357
+ if (e.parentNode === n)
358
+ break;
359
+ }
360
+ } else s();
361
+ o(l);
362
+ }
363
+ function w(i, e, t, l, n) {
364
+ const o = m(i);
365
+ if (o) {
366
+ !t && (t = [...i.childNodes]);
367
+ let s = [];
368
+ for (let r = 0; r < t.length; r++) {
369
+ const c = t[r];
370
+ c.nodeType === 8 && c.data.slice(0, 2) === "!$" ? c.remove() : s.push(c);
371
+ }
372
+ t = s;
373
+ }
374
+ for (; typeof t == "function"; ) t = t();
375
+ if (e === t) return t;
376
+ const f = typeof e;
377
+ if (i = i, f === "string" || f === "number") {
378
+ if (o || f === "number" && (e = e.toString(), e === t))
379
+ return t;
380
+ t !== "" && typeof t == "string" ? t = i.firstChild.data = e : t = i.textContent = e;
381
+ } else if (e == null || f === "boolean") {
382
+ if (o) return t;
383
+ t = b(i, t, l);
384
+ } else {
385
+ if (f === "function")
386
+ return g(() => {
387
+ let s = e();
388
+ for (; typeof s == "function"; ) s = s();
389
+ t = w(i, s, t, l);
390
+ }), () => t;
391
+ if (Array.isArray(e)) {
392
+ const s = [], r = t && Array.isArray(t);
393
+ if (E(s, e, t, n))
394
+ return g(() => t = w(i, s, t, l, !0)), () => t;
395
+ if (o)
396
+ return s.length ? t = [...i.childNodes] : t;
397
+ s.length === 0 ? t = b(i, t, l) : r ? t.length === 0 ? P(i, s, l) : U(i, t, s) : (t && b(i), P(i, s)), t = s;
398
+ } else if (e.nodeType) {
399
+ if (o && e.parentNode) return t = e;
400
+ Array.isArray(t) ? b(i, t, null, e) : t == null || t === "" || !i.firstChild ? i.appendChild(e) : i.replaceChild(e, i.firstChild), t = e;
401
+ }
402
+ }
403
+ return t;
404
+ }
405
+ function E(i, e, t, l) {
406
+ let n = !1;
407
+ for (let o = 0, f = e.length; o < f; o++) {
408
+ let s = e[o], r = t && t[i.length], c;
409
+ if (!(s == null || s === !0 || s === !1)) if ((c = typeof s) == "object" && s.nodeType)
410
+ i.push(s);
411
+ else if (Array.isArray(s))
412
+ n = E(i, s, r) || n;
413
+ else if (c === "function")
414
+ if (l) {
415
+ for (; typeof s == "function"; ) s = s();
416
+ n = E(i, Array.isArray(s) ? s : [s], Array.isArray(r) ? r : [r]) || n;
417
+ } else
418
+ i.push(s), n = !0;
419
+ else {
420
+ const a = String(s);
421
+ r && r.nodeType === 3 && r.data === a ? i.push(r) : i.push(document.createTextNode(a));
422
+ }
423
+ }
424
+ return n;
425
+ }
426
+ function P(i, e, t = null) {
427
+ for (let l = 0, n = e.length; l < n; l++) i.insertBefore(e[l], t);
428
+ }
429
+ function b(i, e, t, l) {
430
+ if (t === void 0) return i.textContent = "";
431
+ const n = l || document.createTextNode("");
432
+ if (e.length) {
433
+ let o = !1;
434
+ for (let f = e.length - 1; f >= 0; f--) {
435
+ const s = e[f];
436
+ if (n !== s) {
437
+ const r = s.parentNode === i;
438
+ !o && !f ? r ? i.replaceChild(n, s) : i.insertBefore(n, t) : r && s.remove();
439
+ } else o = !0;
440
+ }
441
+ } else i.insertBefore(n, t);
442
+ return [n];
443
+ }
444
+ var v = /* @__PURE__ */ H("<div>");
445
+ function ie(i) {
446
+ const e = O(i);
447
+ return N(() => {
448
+ e == null || e.destroy();
9
449
  }), {
10
- open: (e = 0) => r == null ? void 0 : r.open(e),
11
- close: () => (r == null ? void 0 : r.close()) ?? Promise.resolve(),
12
- reset: () => r == null ? void 0 : r.reset(),
13
- next: () => r == null ? void 0 : r.next(),
14
- prev: () => r == null ? void 0 : r.prev(),
15
- zoomIn: () => r == null ? void 0 : r.zoomIn(),
16
- zoomOut: () => r == null ? void 0 : r.zoomOut(),
17
- getCurrentIndex: () => (r == null ? void 0 : r.getCurrentIndex()) ?? -1,
18
- view: (e) => r == null ? void 0 : r.view(e),
19
- destroy: () => r == null ? void 0 : r.destroy()
450
+ open: (t = 0) => e == null ? void 0 : e.open(t),
451
+ close: () => (e == null ? void 0 : e.close()) ?? Promise.resolve(),
452
+ reset: () => e == null ? void 0 : e.reset(),
453
+ next: () => e == null ? void 0 : e.next(),
454
+ prev: () => e == null ? void 0 : e.prev(),
455
+ zoomIn: () => e == null ? void 0 : e.zoomIn(),
456
+ zoomOut: () => e == null ? void 0 : e.zoomOut(),
457
+ getCurrentIndex: () => (e == null ? void 0 : e.getCurrentIndex()) ?? -1,
458
+ view: (t) => e == null ? void 0 : e.view(t),
459
+ destroy: () => e == null ? void 0 : e.destroy()
20
460
  };
21
461
  }
22
- function S(t) {
23
- const [r, e] = $(null);
24
- let s;
462
+ function se(i) {
463
+ const [e, t] = M(null);
464
+ let l;
25
465
  const {
26
- selector: d = "> a",
27
- options: v,
28
- ref: l,
29
- id: f,
30
- children: g,
31
- ...i
32
- } = t, u = f || `vvw-gallery-${Math.random().toString(36).substr(2, 9)}`;
33
- return z(() => {
34
- if (!s) return;
35
- const o = p({
36
- ...v,
37
- elements: `#${u} ${d}`
466
+ selector: n = "> a",
467
+ options: o,
468
+ ref: f,
469
+ id: s,
470
+ children: r,
471
+ ...c
472
+ } = i, a = s || `vvw-gallery-${Math.random().toString(36).substr(2, 9)}`;
473
+ return x(() => {
474
+ if (!l) return;
475
+ const d = O({
476
+ ...o,
477
+ elements: `#${a} ${n}`
38
478
  });
39
- o && (e(o), l == null || l(o));
40
- }), m(() => {
41
- var o;
42
- (o = r()) == null || o.destroy();
479
+ d && (t(d), f == null || f(d));
480
+ }), N(() => {
481
+ var d;
482
+ (d = e()) == null || d.destroy();
43
483
  }), (() => {
44
- var o = a();
45
- return I((w) => s = w, o), x(o, C(i, {
46
- id: u
47
- }), !1), V(o, g), o;
484
+ var d = v();
485
+ return S((u) => l = u, d), X(d, k(c, {
486
+ id: a
487
+ }), !1), Y(d, r), d;
48
488
  })();
49
489
  }
50
490
  export {
51
- S as VistaView,
52
- P as useVistaView
491
+ se as VistaView,
492
+ ie as useVistaView
53
493
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vistaview",
3
- "version": "0.10.18",
3
+ "version": "0.10.19",
4
4
  "description": "A lightweight, zero-dependency image lightbox library with smooth animations and touch support",
5
5
  "keywords": [
6
6
  "image",
@@ -1,448 +0,0 @@
1
- import { untrack as I, createRenderEffect as g, sharedConfig as h } from "solid-js";
2
- const L = [
3
- "allowfullscreen",
4
- "async",
5
- "alpha",
6
- "autofocus",
7
- "autoplay",
8
- "checked",
9
- "controls",
10
- "default",
11
- "disabled",
12
- "formnovalidate",
13
- "hidden",
14
- "indeterminate",
15
- "inert",
16
- "ismap",
17
- "loop",
18
- "multiple",
19
- "muted",
20
- "nomodule",
21
- "novalidate",
22
- "open",
23
- "playsinline",
24
- "readonly",
25
- "required",
26
- "reversed",
27
- "seamless",
28
- "selected",
29
- "adauctionheaders",
30
- "browsingtopics",
31
- "credentialless",
32
- "defaultchecked",
33
- "defaultmuted",
34
- "defaultselected",
35
- "defer",
36
- "disablepictureinpicture",
37
- "disableremoteplayback",
38
- "preservespitch",
39
- "shadowrootclonable",
40
- "shadowrootcustomelementregistry",
41
- "shadowrootdelegatesfocus",
42
- "shadowrootserializable",
43
- "sharedstoragewritable"
44
- ], O = /* @__PURE__ */ new Set([
45
- "className",
46
- "value",
47
- "readOnly",
48
- "noValidate",
49
- "formNoValidate",
50
- "isMap",
51
- "noModule",
52
- "playsInline",
53
- "adAuctionHeaders",
54
- "allowFullscreen",
55
- "browsingTopics",
56
- "defaultChecked",
57
- "defaultMuted",
58
- "defaultSelected",
59
- "disablePictureInPicture",
60
- "disableRemotePlayback",
61
- "preservesPitch",
62
- "shadowRootClonable",
63
- "shadowRootCustomElementRegistry",
64
- "shadowRootDelegatesFocus",
65
- "shadowRootSerializable",
66
- "sharedStorageWritable",
67
- ...L
68
- ]), S = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), M = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
69
- className: "class",
70
- htmlFor: "for"
71
- }), k = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
72
- class: "className",
73
- novalidate: {
74
- $: "noValidate",
75
- FORM: 1
76
- },
77
- formnovalidate: {
78
- $: "formNoValidate",
79
- BUTTON: 1,
80
- INPUT: 1
81
- },
82
- ismap: {
83
- $: "isMap",
84
- IMG: 1
85
- },
86
- nomodule: {
87
- $: "noModule",
88
- SCRIPT: 1
89
- },
90
- playsinline: {
91
- $: "playsInline",
92
- VIDEO: 1
93
- },
94
- readonly: {
95
- $: "readOnly",
96
- INPUT: 1,
97
- TEXTAREA: 1
98
- },
99
- adauctionheaders: {
100
- $: "adAuctionHeaders",
101
- IFRAME: 1
102
- },
103
- allowfullscreen: {
104
- $: "allowFullscreen",
105
- IFRAME: 1
106
- },
107
- browsingtopics: {
108
- $: "browsingTopics",
109
- IMG: 1
110
- },
111
- defaultchecked: {
112
- $: "defaultChecked",
113
- INPUT: 1
114
- },
115
- defaultmuted: {
116
- $: "defaultMuted",
117
- AUDIO: 1,
118
- VIDEO: 1
119
- },
120
- defaultselected: {
121
- $: "defaultSelected",
122
- OPTION: 1
123
- },
124
- disablepictureinpicture: {
125
- $: "disablePictureInPicture",
126
- VIDEO: 1
127
- },
128
- disableremoteplayback: {
129
- $: "disableRemotePlayback",
130
- AUDIO: 1,
131
- VIDEO: 1
132
- },
133
- preservespitch: {
134
- $: "preservesPitch",
135
- AUDIO: 1,
136
- VIDEO: 1
137
- },
138
- shadowrootclonable: {
139
- $: "shadowRootClonable",
140
- TEMPLATE: 1
141
- },
142
- shadowrootdelegatesfocus: {
143
- $: "shadowRootDelegatesFocus",
144
- TEMPLATE: 1
145
- },
146
- shadowrootserializable: {
147
- $: "shadowRootSerializable",
148
- TEMPLATE: 1
149
- },
150
- sharedstoragewritable: {
151
- $: "sharedStorageWritable",
152
- IFRAME: 1,
153
- IMG: 1
154
- }
155
- });
156
- function x(i, e) {
157
- const t = k[i];
158
- return typeof t == "object" ? t[e] ? t.$ : void 0 : t;
159
- }
160
- const R = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
161
- function D(i, e, t) {
162
- let l = t.length, o = e.length, n = l, f = 0, s = 0, c = e[o - 1].nextSibling, r = null;
163
- for (; f < o || s < n; ) {
164
- if (e[f] === t[s]) {
165
- f++, s++;
166
- continue;
167
- }
168
- for (; e[o - 1] === t[n - 1]; )
169
- o--, n--;
170
- if (o === f) {
171
- const a = n < l ? s ? t[s - 1].nextSibling : t[n - s] : c;
172
- for (; s < n; ) i.insertBefore(t[s++], a);
173
- } else if (n === s)
174
- for (; f < o; )
175
- (!r || !r.has(e[f])) && e[f].remove(), f++;
176
- else if (e[f] === t[n - 1] && t[s] === e[o - 1]) {
177
- const a = e[--o].nextSibling;
178
- i.insertBefore(t[s++], e[f++].nextSibling), i.insertBefore(t[--n], a), e[o] = t[n];
179
- } else {
180
- if (!r) {
181
- r = /* @__PURE__ */ new Map();
182
- let u = s;
183
- for (; u < n; ) r.set(t[u], u++);
184
- }
185
- const a = r.get(e[f]);
186
- if (a != null)
187
- if (s < a && a < n) {
188
- let u = f, d = 1, y;
189
- for (; ++u < o && u < n && !((y = r.get(e[u])) == null || y !== a + d); )
190
- d++;
191
- if (d > a - s) {
192
- const A = e[f];
193
- for (; s < a; ) i.insertBefore(t[s++], A);
194
- } else i.replaceChild(t[s++], e[f++]);
195
- } else f++;
196
- else e[f++].remove();
197
- }
198
- }
199
- }
200
- const T = "_$DX_DELEGATE";
201
- function X(i, e, t, l) {
202
- let o;
203
- const n = () => {
204
- const s = document.createElement("template");
205
- return s.innerHTML = i, s.content.firstChild;
206
- }, f = () => (o || (o = n())).cloneNode(!0);
207
- return f.cloneNode = f, f;
208
- }
209
- function V(i, e = window.document) {
210
- const t = e[T] || (e[T] = /* @__PURE__ */ new Set());
211
- for (let l = 0, o = i.length; l < o; l++) {
212
- const n = i[l];
213
- t.has(n) || (t.add(n), e.addEventListener(n, q));
214
- }
215
- }
216
- function $(i, e, t) {
217
- b(i) || (t == null ? i.removeAttribute(e) : i.setAttribute(e, t));
218
- }
219
- function j(i, e, t) {
220
- b(i) || (t ? i.setAttribute(e, "") : i.removeAttribute(e));
221
- }
222
- function B(i, e) {
223
- b(i) || (e == null ? i.removeAttribute("class") : i.className = e);
224
- }
225
- function F(i, e, t, l) {
226
- if (l)
227
- Array.isArray(t) ? (i[`$$${e}`] = t[0], i[`$$${e}Data`] = t[1]) : i[`$$${e}`] = t;
228
- else if (Array.isArray(t)) {
229
- const o = t[0];
230
- i.addEventListener(e, t[0] = (n) => o.call(i, t[1], n));
231
- } else i.addEventListener(e, t, typeof t != "function" && t);
232
- }
233
- function U(i, e, t = {}) {
234
- const l = Object.keys(e || {}), o = Object.keys(t);
235
- let n, f;
236
- for (n = 0, f = o.length; n < f; n++) {
237
- const s = o[n];
238
- !s || s === "undefined" || e[s] || (C(i, s, !1), delete t[s]);
239
- }
240
- for (n = 0, f = l.length; n < f; n++) {
241
- const s = l[n], c = !!e[s];
242
- !s || s === "undefined" || t[s] === c || !c || (C(i, s, !0), t[s] = c);
243
- }
244
- return t;
245
- }
246
- function _(i, e, t) {
247
- if (!e) return t ? $(i, "style") : e;
248
- const l = i.style;
249
- if (typeof e == "string") return l.cssText = e;
250
- typeof t == "string" && (l.cssText = t = void 0), t || (t = {}), e || (e = {});
251
- let o, n;
252
- for (n in t)
253
- e[n] == null && l.removeProperty(n), delete t[n];
254
- for (n in e)
255
- o = e[n], o !== t[n] && (l.setProperty(n, o), t[n] = o);
256
- return t;
257
- }
258
- function Y(i, e = {}, t, l) {
259
- const o = {};
260
- return g(() => typeof e.ref == "function" && H(e.ref, i)), g(() => G(i, e, t, !0, o, !0)), o;
261
- }
262
- function H(i, e, t) {
263
- return I(() => i(e, t));
264
- }
265
- function z(i, e, t, l) {
266
- if (typeof e != "function") return w(i, e, l, t);
267
- g((o) => w(i, e(), o, t), l);
268
- }
269
- function G(i, e, t, l, o = {}, n = !1) {
270
- e || (e = {});
271
- for (const f in o)
272
- if (!(f in e)) {
273
- if (f === "children") continue;
274
- o[f] = P(i, f, null, o[f], t, n, e);
275
- }
276
- for (const f in e) {
277
- if (f === "children")
278
- continue;
279
- const s = e[f];
280
- o[f] = P(i, f, s, o[f], t, n, e);
281
- }
282
- }
283
- function b(i) {
284
- return !!h.context && !h.done && (!i || i.isConnected);
285
- }
286
- function K(i) {
287
- return i.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase());
288
- }
289
- function C(i, e, t) {
290
- const l = e.trim().split(/\s+/);
291
- for (let o = 0, n = l.length; o < n; o++) i.classList.toggle(l[o], t);
292
- }
293
- function P(i, e, t, l, o, n, f) {
294
- let s, c, r, a, u;
295
- if (e === "style") return _(i, t, l);
296
- if (e === "classList") return U(i, t, l);
297
- if (t === l) return l;
298
- if (e === "ref")
299
- n || t(i);
300
- else if (e.slice(0, 3) === "on:") {
301
- const d = e.slice(3);
302
- l && i.removeEventListener(d, l, typeof l != "function" && l), t && i.addEventListener(d, t, typeof t != "function" && t);
303
- } else if (e.slice(0, 10) === "oncapture:") {
304
- const d = e.slice(10);
305
- l && i.removeEventListener(d, l, !0), t && i.addEventListener(d, t, !0);
306
- } else if (e.slice(0, 2) === "on") {
307
- const d = e.slice(2).toLowerCase(), y = R.has(d);
308
- if (!y && l) {
309
- const A = Array.isArray(l) ? l[0] : l;
310
- i.removeEventListener(d, A);
311
- }
312
- (y || t) && (F(i, d, t, y), y && V([d]));
313
- } else if (e.slice(0, 5) === "attr:")
314
- $(i, e.slice(5), t);
315
- else if (e.slice(0, 5) === "bool:")
316
- j(i, e.slice(5), t);
317
- else if ((u = e.slice(0, 5) === "prop:") || (r = S.has(e)) || (a = x(e, i.tagName)) || (c = O.has(e)) || (s = i.nodeName.includes("-") || "is" in f)) {
318
- if (u)
319
- e = e.slice(5), c = !0;
320
- else if (b(i)) return t;
321
- e === "class" || e === "className" ? B(i, t) : s && !c && !r ? i[K(e)] = t : i[a || e] = t;
322
- } else
323
- $(i, M[e] || e, t);
324
- return t;
325
- }
326
- function q(i) {
327
- if (h.registry && h.events && h.events.find(([c, r]) => r === i))
328
- return;
329
- let e = i.target;
330
- const t = `$$${i.type}`, l = i.target, o = i.currentTarget, n = (c) => Object.defineProperty(i, "target", {
331
- configurable: !0,
332
- value: c
333
- }), f = () => {
334
- const c = e[t];
335
- if (c && !e.disabled) {
336
- const r = e[`${t}Data`];
337
- if (r !== void 0 ? c.call(e, r, i) : c.call(e, i), i.cancelBubble) return;
338
- }
339
- return e.host && typeof e.host != "string" && !e.host._$host && e.contains(i.target) && n(e.host), !0;
340
- }, s = () => {
341
- for (; f() && (e = e._$host || e.parentNode || e.host); ) ;
342
- };
343
- if (Object.defineProperty(i, "currentTarget", {
344
- configurable: !0,
345
- get() {
346
- return e || document;
347
- }
348
- }), h.registry && !h.done && (h.done = _$HY.done = !0), i.composedPath) {
349
- const c = i.composedPath();
350
- n(c[0]);
351
- for (let r = 0; r < c.length - 2 && (e = c[r], !!f()); r++) {
352
- if (e._$host) {
353
- e = e._$host, s();
354
- break;
355
- }
356
- if (e.parentNode === o)
357
- break;
358
- }
359
- } else s();
360
- n(l);
361
- }
362
- function w(i, e, t, l, o) {
363
- const n = b(i);
364
- if (n) {
365
- !t && (t = [...i.childNodes]);
366
- let s = [];
367
- for (let c = 0; c < t.length; c++) {
368
- const r = t[c];
369
- r.nodeType === 8 && r.data.slice(0, 2) === "!$" ? r.remove() : s.push(r);
370
- }
371
- t = s;
372
- }
373
- for (; typeof t == "function"; ) t = t();
374
- if (e === t) return t;
375
- const f = typeof e;
376
- if (i = i, f === "string" || f === "number") {
377
- if (n || f === "number" && (e = e.toString(), e === t))
378
- return t;
379
- t !== "" && typeof t == "string" ? t = i.firstChild.data = e : t = i.textContent = e;
380
- } else if (e == null || f === "boolean") {
381
- if (n) return t;
382
- t = m(i, t, l);
383
- } else {
384
- if (f === "function")
385
- return g(() => {
386
- let s = e();
387
- for (; typeof s == "function"; ) s = s();
388
- t = w(i, s, t, l);
389
- }), () => t;
390
- if (Array.isArray(e)) {
391
- const s = [], c = t && Array.isArray(t);
392
- if (E(s, e, t, o))
393
- return g(() => t = w(i, s, t, l, !0)), () => t;
394
- if (n)
395
- return s.length ? t = [...i.childNodes] : t;
396
- s.length === 0 ? t = m(i, t, l) : c ? t.length === 0 ? N(i, s, l) : D(i, t, s) : (t && m(i), N(i, s)), t = s;
397
- } else if (e.nodeType) {
398
- if (n && e.parentNode) return t = e;
399
- Array.isArray(t) ? m(i, t, null, e) : t == null || t === "" || !i.firstChild ? i.appendChild(e) : i.replaceChild(e, i.firstChild), t = e;
400
- }
401
- }
402
- return t;
403
- }
404
- function E(i, e, t, l) {
405
- let o = !1;
406
- for (let n = 0, f = e.length; n < f; n++) {
407
- let s = e[n], c = t && t[i.length], r;
408
- if (!(s == null || s === !0 || s === !1)) if ((r = typeof s) == "object" && s.nodeType)
409
- i.push(s);
410
- else if (Array.isArray(s))
411
- o = E(i, s, c) || o;
412
- else if (r === "function")
413
- if (l) {
414
- for (; typeof s == "function"; ) s = s();
415
- o = E(i, Array.isArray(s) ? s : [s], Array.isArray(c) ? c : [c]) || o;
416
- } else
417
- i.push(s), o = !0;
418
- else {
419
- const a = String(s);
420
- c && c.nodeType === 3 && c.data === a ? i.push(c) : i.push(document.createTextNode(a));
421
- }
422
- }
423
- return o;
424
- }
425
- function N(i, e, t = null) {
426
- for (let l = 0, o = e.length; l < o; l++) i.insertBefore(e[l], t);
427
- }
428
- function m(i, e, t, l) {
429
- if (t === void 0) return i.textContent = "";
430
- const o = l || document.createTextNode("");
431
- if (e.length) {
432
- let n = !1;
433
- for (let f = e.length - 1; f >= 0; f--) {
434
- const s = e[f];
435
- if (o !== s) {
436
- const c = s.parentNode === i;
437
- !n && !f ? c ? i.replaceChild(o, s) : i.insertBefore(o, t) : c && s.remove();
438
- } else n = !0;
439
- }
440
- } else i.insertBefore(o, t);
441
- return [o];
442
- }
443
- export {
444
- z as i,
445
- Y as s,
446
- X as t,
447
- H as u
448
- };