@topvisor/ui 1.0.26-1 → 1.0.26-2

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.
@@ -0,0 +1 @@
1
+ .top-rive{width:100%;height:100%;flex-grow:1}
@@ -0,0 +1,3 @@
1
+ import { ComponentCustomProps } from 'vue';
2
+ import { default as Rive } from './rive/rive.vue';
3
+ export declare const TopRive: typeof Rive & ComponentCustomProps;
@@ -0,0 +1,4 @@
1
+ import { MaybeRefOrGetter, ComputedRef } from 'vue';
2
+ import { Item } from '../../project/selectorCompetitors/selectorCompetitors';
3
+ import { Competitor } from '../../project/selectorCompetitors/types/competitor';
4
+ export declare const useItemsFromCompetitors: (competitors: MaybeRefOrGetter<Competitor[]>, projectId: MaybeRefOrGetter<number>) => ComputedRef<Item[]>;
@@ -0,0 +1,11 @@
1
+ import { Rive } from '@rive-app/canvas-lite';
2
+ import { Props } from './types';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
+ declare const _default: DefineComponent<Props, {
5
+ riveInstance: Rive | undefined;
6
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {
7
+ autoplay: boolean;
8
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
9
+ el: HTMLCanvasElement;
10
+ }, HTMLCanvasElement>;
11
+ export default _default;
File without changes
@@ -0,0 +1,7 @@
1
+ import { RiveParameters } from '@rive-app/canvas-lite';
2
+ export interface Props extends Omit<RiveParameters, 'canvas' | 'file'> {
3
+ /**
4
+ * Описание всех полей см. тут: https://rive.app/docs/runtimes/web/rive-parameters
5
+ */
6
+ src: RiveParameters['src'];
7
+ }
@@ -0,0 +1,2 @@
1
+ define(["require","exports","vue","@rive-app/canvas-lite","../require/css.amd!../assets/extra.css"],function(f,p,e,b){"use strict";if(typeof e>"u")var e=window.Vue;function y(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}return r.default=a,Object.freeze(r)}const m=e.defineComponent({__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},onLoad:{},onLoadError:{},onPlay:{},onPause:{},onStop:{},onLoop:{},onStateChange:{},onAdvance:{},assetLoader:{},onload:{},onloaderror:{},onplay:{},onpause:{},onstop:{},onloop:{},onstatechange:{}},setup(a,{expose:r}){let n;const o=a,l=e.ref(),s={riveInstance:void 0};return e.watch([l,o],async()=>{var d;n||(n=await new Promise((u,i)=>f(["@rive-app/canvas-lite"],c=>u(y(c)),i)));const t=l.value;if(!t)return;(d=s.riveInstance)==null||d.cleanup();const v={...o,canvas:t,onLoad:u=>{var i,c;(i=o.onLoad)==null||i.call(o,u),(c=s.riveInstance)==null||c.resizeDrawingSurfaceToCanvas()}};s.riveInstance=new n.Rive(v)}),e.onUnmounted(()=>{var t;(t=s.riveInstance)==null||t.cleanup()}),r(s),(t,v)=>(e.openBlock(),e.createElementBlock("canvas",{ref_key:"el",ref:l,class:"top-rive"},null,512))}});p.TopRive=m,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
2
+ //# sourceMappingURL=extra.amd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extra.amd.js","sources":["../../src/components/extra/extra.ts","../../src/components/extra/rive/rive.vue"],"sourcesContent":["import type { ComponentCustomProps } from 'vue';\n\nimport Rive from './rive/rive.vue';\n\nexport const TopRive = Rive as typeof Rive & ComponentCustomProps;\n","<script setup lang=\"ts\">\nimport { Rive } from '@rive-app/canvas-lite';\nimport type { RiveParameters } from '@rive-app/canvas-lite';\n\nimport type { Props } from './types';\nimport { onUnmounted, ref, watch } from 'vue';\n\nlet rive: typeof import('@rive-app/canvas-lite');\n\nconst props = withDefaults(defineProps<Props>(), {\n\tautoplay: true,\n});\n\nconst el = ref<HTMLCanvasElement>();\n\nconst topRive = {\n\triveInstance: undefined as Rive | undefined,\n};\n\nwatch([el, props], async () => {\n\tif (!rive) rive = await import('@rive-app/canvas-lite');\n\n\tconst canvas = el.value;\n\tif (!canvas) return;\n\n\ttopRive.riveInstance?.cleanup();\n\n\tconst options: RiveParameters = {\n\t\t...props,\n\t\tcanvas,\n\t\tonLoad: (e) => {\n\t\t\tprops.onLoad?.(e);\n\n\t\t\ttopRive.riveInstance?.resizeDrawingSurfaceToCanvas();\n\t\t},\n\t};\n\n\ttopRive.riveInstance = new rive.Rive(options);\n});\n\nonUnmounted(() => {\n\ttopRive.riveInstance?.cleanup();\n});\n\ndefineExpose(topRive);\n</script>\n\n<template>\n\t<canvas ref=\"el\" class=\"top-rive\"></canvas>\n</template>\n\n<style>\n.top-rive {\n\twidth: 100%;\n\theight: 100%;\n\tflex-grow: 1;\n}\n</style>\n"],"names":["TopRive","rive","el","vue","canvas","_a","topRive","props","e","_b"],"mappings":"ibAIO,MAAAA,mjBCGP,IAAAC,YAMAC,EAAAC,EAAA,IAAA,KAEgB,aAAA,wHAOf,MAAAC,EAAAF,EAAA,oBAGAG,EAAAC,EAAA,eAAA,MAAAD,EAAA,mBAEgC,GAAAE,EAC5B,OAAAH,EACH,OAAAI,GAAA,UAECH,EAAAE,EAAA,SAAA,MAAAF,EAAA,KAAAE,EAAAC,IAEAC,EAAAH,EAAA,eAAA,MAAAG,EAAA,8BAAmD,+BAIT,CAAA,4BAI5CJ,EAAAC,EAAA,eAAA,MAAAD,EAAA,SAA8B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from '../components/extra/extra'
2
+ export {}
package/extra/extra.js ADDED
@@ -0,0 +1,72 @@
1
+ import { Core as v } from "../core/app.js";
2
+ import { defineComponent as m, ref as f, watch as y, onUnmounted as B, createElementBlock as C, openBlock as L } from "vue";
3
+ import "@rive-app/canvas-lite";
4
+ const d = ["../assets/extra.css"].map((a) => import.meta.resolve(a));
5
+ v.insertCSSLinkToPage(d, !0);
6
+ const S = /* @__PURE__ */ m({
7
+ __name: "rive",
8
+ props: {
9
+ src: {},
10
+ buffer: {},
11
+ riveFile: {},
12
+ artboard: {},
13
+ animations: {},
14
+ stateMachines: {},
15
+ layout: {},
16
+ autoplay: { type: Boolean, default: !0 },
17
+ useOffscreenRenderer: { type: Boolean },
18
+ enableRiveAssetCDN: { type: Boolean },
19
+ shouldDisableRiveListeners: { type: Boolean },
20
+ isTouchScrollEnabled: { type: Boolean },
21
+ automaticallyHandleEvents: { type: Boolean },
22
+ onLoad: {},
23
+ onLoadError: {},
24
+ onPlay: {},
25
+ onPause: {},
26
+ onStop: {},
27
+ onLoop: {},
28
+ onStateChange: {},
29
+ onAdvance: {},
30
+ assetLoader: {},
31
+ onload: {},
32
+ onloaderror: {},
33
+ onplay: {},
34
+ onpause: {},
35
+ onstop: {},
36
+ onloop: {},
37
+ onstatechange: {}
38
+ },
39
+ setup(a, { expose: p }) {
40
+ let t;
41
+ const o = a, r = f(), n = {
42
+ riveInstance: void 0
43
+ };
44
+ return y([r, o], async () => {
45
+ var i;
46
+ t || (t = await import("@rive-app/canvas-lite"));
47
+ const e = r.value;
48
+ if (!e) return;
49
+ (i = n.riveInstance) == null || i.cleanup();
50
+ const s = {
51
+ ...o,
52
+ canvas: e,
53
+ onLoad: (u) => {
54
+ var l, c;
55
+ (l = o.onLoad) == null || l.call(o, u), (c = n.riveInstance) == null || c.resizeDrawingSurfaceToCanvas();
56
+ }
57
+ };
58
+ n.riveInstance = new t.Rive(s);
59
+ }), B(() => {
60
+ var e;
61
+ (e = n.riveInstance) == null || e.cleanup();
62
+ }), p(n), (e, s) => (L(), C("canvas", {
63
+ ref_key: "el",
64
+ ref: r,
65
+ class: "top-rive"
66
+ }, null, 512));
67
+ }
68
+ }), b = S;
69
+ export {
70
+ b as TopRive
71
+ };
72
+ //# sourceMappingURL=extra.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extra.js","sources":["../../src/components/extra/rive/rive.vue","../../src/components/extra/extra.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { Rive } from '@rive-app/canvas-lite';\nimport type { RiveParameters } from '@rive-app/canvas-lite';\n\nimport type { Props } from './types';\nimport { onUnmounted, ref, watch } from 'vue';\n\nlet rive: typeof import('@rive-app/canvas-lite');\n\nconst props = withDefaults(defineProps<Props>(), {\n\tautoplay: true,\n});\n\nconst el = ref<HTMLCanvasElement>();\n\nconst topRive = {\n\triveInstance: undefined as Rive | undefined,\n};\n\nwatch([el, props], async () => {\n\tif (!rive) rive = await import('@rive-app/canvas-lite');\n\n\tconst canvas = el.value;\n\tif (!canvas) return;\n\n\ttopRive.riveInstance?.cleanup();\n\n\tconst options: RiveParameters = {\n\t\t...props,\n\t\tcanvas,\n\t\tonLoad: (e) => {\n\t\t\tprops.onLoad?.(e);\n\n\t\t\ttopRive.riveInstance?.resizeDrawingSurfaceToCanvas();\n\t\t},\n\t};\n\n\ttopRive.riveInstance = new rive.Rive(options);\n});\n\nonUnmounted(() => {\n\ttopRive.riveInstance?.cleanup();\n});\n\ndefineExpose(topRive);\n</script>\n\n<template>\n\t<canvas ref=\"el\" class=\"top-rive\"></canvas>\n</template>\n\n<style>\n.top-rive {\n\twidth: 100%;\n\theight: 100%;\n\tflex-grow: 1;\n}\n</style>\n","import type { ComponentCustomProps } from 'vue';\n\nimport Rive from './rive/rive.vue';\n\nexport const TopRive = Rive as typeof Rive & ComponentCustomProps;\n"],"names":["rive","props","__props","el","ref","topRive","watch","canvas","_a","options","e","_b","onUnmounted","__expose","TopRive","_sfc_main"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,QAAAA;AAEA,UAAAC,IAAAC,GAIAC,IAAAC,EAAA,GAEAC,IAAA;AAAA,MAAgB,cAAA;AAAA,IACD;AAGf,WAAAC,EAAA,CAAAH,GAAAF,CAAA,GAAA,YAAA;;AACC,MAAAD,MAAAA,IAAA,MAAA,OAAA,uBAAA;AAEA,YAAAO,IAAAJ,EAAA;AACA,UAAA,CAAAI,EAAA;AAEA,OAAAC,IAAAH,EAAA,iBAAA,QAAAG,EAAA;AAEA,YAAAC,IAAA;AAAA,QAAgC,GAAAR;AAAA,QAC5B,QAAAM;AAAA,QACH,QAAA,CAAAG,MAAA;;AAEC,WAAAF,IAAAP,EAAA,WAAA,QAAAO,EAAA,KAAAP,GAAAS,KAEAC,IAAAN,EAAA,iBAAA,QAAAM,EAAA;AAAA,QAAmD;AAAA,MACpD;AAGD,MAAAN,EAAA,eAAA,IAAAL,EAAA,KAAAS,CAAA;AAAA,IAA4C,CAAA,GAG7CG,EAAA,MAAA;;AACC,OAAAJ,IAAAH,EAAA,iBAAA,QAAAG,EAAA;AAAA,IAA8B,CAAA,GAG/BK,EAAAR,CAAA;;;;;;ICxCOS,IAAAC;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topvisor/ui",
3
3
  "private": false,
4
- "version": "1.0.26-1",
4
+ "version": "1.0.26-2",
5
5
  "type": "module",
6
6
  "description": "Topvisor UI-kit Vue",
7
7
  "author": "Topvisor",