vistaview 0.10.15 → 0.10.16

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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- import { VistaParamsNeo, VistaInterface } from './vistaview';
2
+ import { VistaParamsNeo, VistaInterface, VistaOpt } from './vistaview';
3
3
  export declare function useVistaView(options: VistaParamsNeo): VistaInterface;
4
- export interface VistaViewProps extends VistaParamsNeo {
4
+ export interface VistaViewProps extends VistaOpt {
5
5
  children: ReactNode;
6
6
  className?: string;
7
7
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAuBpE;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,2GA6BrB,CAAC"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5E,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAuBpE;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,2GA6BrB,CAAC"}
package/dist/react.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsx as p } from "react/jsx-runtime";
3
- import { forwardRef as I, useRef as s, useId as w, useImperativeHandle as g, useEffect as d, useCallback as t } from "react";
4
- import { vistaView as m } from "./vistaview.js";
2
+ import { jsx as v } from "react/jsx-runtime";
3
+ import { forwardRef as I, useRef as s, useId as w, useImperativeHandle as g, useEffect as a, useCallback as t } from "react";
4
+ import { vistaView as d } from "./vistaview.js";
5
5
  function z(c) {
6
6
  const r = s(null);
7
- return d(() => (r.current = m(c), () => {
7
+ return a(() => (r.current = d(c), () => {
8
8
  var e;
9
9
  (e = r.current) == null || e.destroy(), r.current = null;
10
10
  }), []), {
@@ -51,18 +51,18 @@ function z(c) {
51
51
  };
52
52
  }
53
53
  const R = I(
54
- ({ children: c, className: r, id: e, selector: n = "> a", ...l }, f) => {
55
- const i = s(null), u = s(null), v = w(), o = e || `vvw-gallery-${v.replace(/:/g, "")}`;
56
- return g(f, () => u.current, []), d(() => {
57
- if (i.current)
58
- return u.current = m({
59
- ...l,
60
- elements: l.elements || `#${o} ${n}`
54
+ ({ children: c, className: r, id: e, selector: n = "> a", ...f }, m) => {
55
+ const l = s(null), u = s(null), p = w(), o = e || `vvw-gallery-${p.replace(/:/g, "")}`;
56
+ return g(m, () => u.current, []), a(() => {
57
+ if (l.current)
58
+ return u.current = d({
59
+ ...f,
60
+ elements: `#${o} ${n}`
61
61
  }), () => {
62
- var a;
63
- (a = u.current) == null || a.destroy(), u.current = null;
62
+ var i;
63
+ (i = u.current) == null || i.destroy(), u.current = null;
64
64
  };
65
- }, [o, n]), /* @__PURE__ */ p("div", { ref: i, id: o, className: r, children: c });
65
+ }, [o, n]), /* @__PURE__ */ v("div", { ref: l, id: o, className: r, children: c });
66
66
  }
67
67
  );
68
68
  export {
package/dist/solid.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { VistaParamsNeo, VistaInterface } from './vistaview';
1
+ import { VistaParamsNeo, VistaInterface, VistaOpt } from './vistaview';
2
2
  export declare function useVistaView(options: VistaParamsNeo): VistaInterface;
3
- export interface VistaViewOptions extends VistaParamsNeo {
3
+ export interface VistaViewOptions extends VistaOpt {
4
4
  id?: string;
5
5
  selector?: string;
6
6
  ref?: (instance: VistaInterface) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"solid.d.ts","sourceRoot":"","sources":["../src/solid.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAmBpE;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,QAuB9E"}
1
+ {"version":3,"file":"solid.d.ts","sourceRoot":"","sources":["../src/solid.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5E,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAmBpE;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,QAmB9E"}
package/dist/solid.js CHANGED
@@ -1,11 +1,11 @@
1
- import { onCleanup as l, onMount as p } from "solid-js";
2
- import { vistaView as v } from "./vistaview.js";
3
- function y(r) {
4
- const o = v(r);
5
- return l(() => {
1
+ import { onCleanup as d, onMount as p } from "solid-js";
2
+ import { vistaView as u } from "./vistaview.js";
3
+ function y(t) {
4
+ const o = u(t);
5
+ return d(() => {
6
6
  o == null || o.destroy();
7
7
  }), {
8
- open: (e = 0) => o == null ? void 0 : o.open(e),
8
+ open: (r = 0) => o == null ? void 0 : o.open(r),
9
9
  close: () => (o == null ? void 0 : o.close()) ?? Promise.resolve(),
10
10
  reset: () => o == null ? void 0 : o.reset(),
11
11
  next: () => o == null ? void 0 : o.next(),
@@ -13,19 +13,19 @@ function y(r) {
13
13
  zoomIn: () => o == null ? void 0 : o.zoomIn(),
14
14
  zoomOut: () => o == null ? void 0 : o.zoomOut(),
15
15
  getCurrentIndex: () => (o == null ? void 0 : o.getCurrentIndex()) ?? -1,
16
- view: (e) => o == null ? void 0 : o.view(e),
16
+ view: (r) => o == null ? void 0 : o.view(r),
17
17
  destroy: () => o == null ? void 0 : o.destroy()
18
18
  };
19
19
  }
20
- function g(r, o) {
21
- const { selector: e = "> a", ref: d, ...u } = o, m = o.id || r.id || `vvw-gallery-${Math.random().toString(36).substr(2, 9)}`;
22
- r.id || (r.id = m), p(() => {
23
- const t = v({
24
- ...u,
25
- elements: u.elements || `#${m} ${e}`
20
+ function g(t, o) {
21
+ const { selector: r = "> a", ref: l, ...v } = o, m = o.id || `vvw-gallery-${Math.random().toString(36).slice(2)}`;
22
+ t.id = m, p(() => {
23
+ const e = u({
24
+ ...v,
25
+ elements: `#${m} ${r}`
26
26
  });
27
- d && t && d(t), l(() => {
28
- t == null || t.destroy();
27
+ l && e && l(e), d(() => {
28
+ e == null || e.destroy();
29
29
  });
30
30
  });
31
31
  }
package/dist/svelte.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { VistaParamsNeo, VistaInterface } from './vistaview';
1
+ import { VistaParamsNeo, VistaInterface, VistaOpt } from './vistaview';
2
2
  export declare function useVistaView(options: VistaParamsNeo): VistaInterface;
3
- export interface VistaViewProps extends VistaParamsNeo {
3
+ export interface VistaViewProps extends VistaOpt {
4
4
  id?: string;
5
5
  class?: string;
6
6
  selector?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../src/svelte.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAmBpE;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc;;EA+BxE"}
1
+ {"version":3,"file":"svelte.d.ts","sourceRoot":"","sources":["../src/svelte.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAmBpE;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,cAAc,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc;;EA0BxE"}
package/dist/svelte.js CHANGED
@@ -1,8 +1,8 @@
1
- import { onDestroy as v, onMount as y } from "svelte";
2
- import { vistaView as d } from "./vistaview.js";
1
+ import { onDestroy as y, onMount as f } from "svelte";
2
+ import { vistaView as u } from "./vistaview.js";
3
3
  function w(e) {
4
- const o = d(e);
5
- return v(() => {
4
+ const o = u(e);
5
+ return y(() => {
6
6
  o == null || o.destroy();
7
7
  }), {
8
8
  open: (r = 0) => o == null ? void 0 : o.open(r),
@@ -19,16 +19,16 @@ function w(e) {
19
19
  }
20
20
  function x(e, o) {
21
21
  let r = null;
22
- const { selector: m = "> a", ref: t, ...l } = o, u = o.id || e.id || `vvw-gallery-${Math.random().toString(36).substr(2, 9)}`;
23
- e.id || (e.id = u);
24
- function f() {
25
- r = d({
26
- ...l,
27
- elements: l.elements || `#${u} ${m}`
22
+ const { selector: d = "> a", ref: t, ...m } = o, l = o.id || `vvw-gallery-${Math.random().toString(36).slice(2)}`;
23
+ e.id = l;
24
+ function v() {
25
+ r = u({
26
+ ...m,
27
+ elements: `#${l} ${d}`
28
28
  }), t && r && Object.assign(t, r);
29
29
  }
30
- return y(() => {
31
- f();
30
+ return f(() => {
31
+ v();
32
32
  }), {
33
33
  destroy() {
34
34
  r == null || r.destroy(), r = null;
package/dist/vue.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { PropType } from 'vue';
2
- import { VistaParamsNeo, VistaInterface } from './vistaview';
2
+ import { VistaParamsNeo, VistaInterface, VistaOpt } from './vistaview';
3
3
  export declare function useVistaView(options: VistaParamsNeo): VistaInterface;
4
- export interface VistaViewProps extends VistaParamsNeo {
4
+ export interface VistaViewProps extends VistaOpt {
5
5
  id?: string;
6
6
  class?: string;
7
7
  selector?: string;
package/dist/vue.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../src/vue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAErF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAwBpE;AAED,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS;;;;;;;;gBAUG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;;;;;;;;;;;;;gBAAtC,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;;;;;;;4EA0C7D,CAAC"}
1
+ {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../src/vue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAErF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5E,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc,CAwBpE;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS;;;;;;;;gBAUG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;;;;;;;;;;;;;gBAAtC,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;;;;;;;4EA0C7D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vistaview",
3
- "version": "0.10.15",
3
+ "version": "0.10.16",
4
4
  "description": "A lightweight, zero-dependency image lightbox library with smooth animations and touch support",
5
5
  "keywords": [
6
6
  "image",