UNPKG

@topvisor/ui

Version:

Topvisor UI-kit Vue

75 lines (72 loc) 1.98 kB
import { Core as _autoloadCSSCore } from '../core/app.js'; const fileNames = ['../assets/extra.css'].map(fileName => import.meta.resolve(fileName)); _autoloadCSSCore.insertCSSLinkToPage(fileNames, true); import { defineComponent as v, ref as d, watch as f, onUnmounted as y, createElementBlock as m, openBlock as B } from "vue"; const L = /* @__PURE__ */ v({ __name: "rive", props: { src: {}, buffer: {}, riveFile: {}, artboard: {}, animations: {}, stateMachines: {}, layout: {}, autoplay: { type: Boolean, default: !0 }, useOffscreenRenderer: { type: Boolean }, enableRiveAssetCDN: { type: Boolean }, shouldDisableRiveListeners: { type: Boolean }, isTouchScrollEnabled: { type: Boolean }, automaticallyHandleEvents: { type: Boolean }, autoBind: { type: Boolean }, onLoad: {}, onLoadError: {}, onPlay: {}, onPause: {}, onStop: {}, onLoop: {}, onStateChange: {}, onAdvance: {}, assetLoader: {}, onload: {}, onloaderror: {}, onplay: {}, onpause: {}, onstop: {}, onloop: {}, onstatechange: {} }, setup(i, { expose: p }) { let a; const o = i, t = d(), n = { riveInstance: void 0 }; return f([t, o], async () => { var s; a || (a = await import("@rive-app/canvas-lite")); const e = t.value; if (!e) return; (s = n.riveInstance) == null || s.cleanup(); const r = { ...o, canvas: e, onLoad: (u) => { var l, c; (l = o.onLoad) == null || l.call(o, u), (c = n.riveInstance) == null || c.resizeDrawingSurfaceToCanvas(); } }; n.riveInstance = new a.Rive(r); }), y(() => { var e; (e = n.riveInstance) == null || e.cleanup(); }), p(n), (e, r) => (B(), m("canvas", { ref_key: "el", ref: t, class: "top-rive" }, null, 512)); } }); export { L as TopRive }; //# sourceMappingURL=extra.js.map