@topvisor/ui 1.6.3 → 1.6.4
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/extra/extra.amd.js +1 -1
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js +6 -0
- package/extra/extra.js.map +1 -1
- package/package.json +2 -2
package/extra/extra.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},n(e)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=n(r),o=0;o<a.length;o++)a[o]!=="default"&&__createBinding(i,r,a[o]);return __setModuleDefault(i,r),i}})();define([`require`,`exports`,`vue`,`../require/css.amd!../assets/extra.css`],function(e,t,r){"use strict";if(i===void 0)var i=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.TopRive=void 0,t.TopRive=(0,r.defineComponent)({__name:`rive`,props:{src:{},buffer:{},riveFile:{},artboard:{},stateMachine:{},animations:{},stateMachines:{},layout:{},autoplay:{type:Boolean,default:!0},useOffscreenRenderer:{type:Boolean},tabIndex:{},focusOptions:{},enableRiveAssetCDN:{type:Boolean},semanticsMode:{},semanticsOptions:{},shouldDisableRiveListeners:{type:Boolean},isTouchScrollEnabled:{type:Boolean},automaticallyHandleEvents:{type:Boolean},autoBind:{type:Boolean},dispatchPointerExit:{type:Boolean},enableMultiTouch:{type:Boolean},drawingOptions:{},enableGPUCanvas:{type:Boolean},enablePerfMarks:{type:Boolean},onLoad:{},onLoadError:{},onPlay:{},onPause:{},onStop:{},onLoop:{},onStateChange:{},onAdvance:{},assetLoader:{},onload:{},onloaderror:{},onplay:{},onpause:{},onstop:{},onloop:{},onstatechange:{}},setup(t,{expose:i}){let a,o=t,s=(0,r.ref)(),c={riveInstance:void 0};return(0,r.watch)([s,o],async()=>{a||=await new Promise((t,n)=>{e([`@rive-app/canvas-lite`],t,n)}).then(__importStar);let t=s.value;if(!t)return;c.riveInstance?.cleanup();let r={...o,canvas:t,onLoad:e=>{o.onLoad?.(e),c.riveInstance?.resizeDrawingSurfaceToCanvas()}};c.riveInstance=new a.Rive(r)}),(0,r.onUnmounted)(()=>{c.riveInstance?.cleanup()}),i(c),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`canvas`,{ref_key:`el`,ref:s,class:`top-rive`},null,512))}})});
|
|
1
|
+
var __createBinding=this&&this.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),__importStar=this&&this.__importStar||(function(){var n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},n(e)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=n(r),o=0;o<a.length;o++)a[o]!=="default"&&__createBinding(i,r,a[o]);return __setModuleDefault(i,r),i}})();define([`require`,`exports`,`vue`,`../require/css.amd!../assets/extra.css`],function(e,t,r){"use strict";if(i===void 0)var i=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.TopRive=void 0,t.TopRive=(0,r.defineComponent)({__name:`rive`,props:{src:{},buffer:{},riveFile:{},artboard:{},stateMachine:{},animations:{},stateMachines:{},layout:{},autoplay:{type:Boolean,default:!0},useOffscreenRenderer:{type:Boolean},enableInkbleed:{type:Boolean},tabIndex:{},focusOptions:{},gamepadOptions:{},enableRiveAssetCDN:{type:Boolean},deferDecoding:{type:Boolean},semanticsMode:{},semanticsOptions:{},shouldDisableRiveListeners:{type:Boolean},shouldDisableGamepad:{type:Boolean},isTouchScrollEnabled:{type:Boolean},automaticallyHandleEvents:{type:Boolean},autoBind:{type:Boolean},dispatchPointerExit:{type:Boolean},enableMultiTouch:{type:Boolean},drawingOptions:{},enableSettling:{type:Boolean},enableGPUCanvas:{type:Boolean},useReplayWorker:{type:Boolean},enablePerfMarks:{type:Boolean},onLoad:{},onLoadError:{},onPlay:{},onPause:{},onStop:{},onLoop:{},onStateChange:{},onAdvance:{},assetLoader:{},onload:{},onloaderror:{},onplay:{},onpause:{},onstop:{},onloop:{},onstatechange:{}},setup(t,{expose:i}){let a,o=t,s=(0,r.ref)(),c={riveInstance:void 0};return(0,r.watch)([s,o],async()=>{a||=await new Promise((t,n)=>{e([`@rive-app/canvas-lite`],t,n)}).then(__importStar);let t=s.value;if(!t)return;c.riveInstance?.cleanup();let r={...o,canvas:t,onLoad:e=>{o.onLoad?.(e),c.riveInstance?.resizeDrawingSurfaceToCanvas()}};c.riveInstance=new a.Rive(r)}),(0,r.onUnmounted)(()=>{c.riveInstance?.cleanup()}),i(c),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`canvas`,{ref_key:`el`,ref:s,class:`top-rive`},null,512))}})});
|
|
2
2
|
//# sourceMappingURL=extra.amd.js.map
|
package/extra/extra.amd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["extra/extra.js","../../src/components/extra/rive/rive.vue"],"names":["k2","k","desc","m","o","v","\"default\"","ownKeys","ar","mod","result","i","vue","exports","vue_1","
|
|
1
|
+
{"version":3,"sources":["extra/extra.js","../../src/components/extra/rive/rive.vue"],"names":["k2","k","desc","m","o","v","\"default\"","ownKeys","ar","mod","result","i","vue","exports","vue_1","props","topRive","el","onUnmounted","_createElementBlock","s","c","l","u","require","resolve_1","reject_1","e","t"],"mappings":"AAAA,IAAI,gBAAmB,MAAQ,KAAK,kBAAqB,OAAO,QAAU,SAAS,EAAG,EAAG,EAAG,EAAI,CACxFA,IAAO,SAAW,EAAKC,GAC3B,IAAIC,EAAO,OAAO,yBAAyBC,EAAGF,CAAC,GAC3C,CAACC,IAAS,QAASA,EAAO,CAACC,EAAE,WAAaD,EAAK,UAAYA,EAAK,iBAClE,EAAO,CAAE,WAAY,GAAM,IAAK,UAAW,CAAE,OAAOC,EAAEF,EAAI,CAAE,GAE9D,OAAO,eAAeG,EAAGJ,EAAIE,CAAI,CACrC,IAAM,SAAS,EAAG,EAAG,EAAG,EAAI,CACpBF,IAAO,SAAW,EAAKC,GAC3B,EAAED,GAAMG,EAAEF,EACd,IACI,mBAAsB,MAAQ,KAAK,qBAAwB,OAAO,QAAU,SAAS,EAAG,EAAG,CAC3F,OAAO,eAAeG,EAAG,UAAW,CAAE,WAAY,GAAM,MAAOC,CAAE,CAAC,CACtE,GAAK,SAAS,EAAG,EAAG,CAChB,EAAEC,QAAaD,CACnB,GACI,aAAgB,MAAQ,KAAK,eAAkB,UAAY,CAC3D,IAAIE,EAAU,SAAS,EAAG,CAMtB,MALA,GAAU,OAAO,qBAAuB,SAAU,EAAG,CACjD,IAAIC,EAAK,CAAC,EACV,IAAK,IAAIP,KAAKG,EAAO,OAAO,UAAU,eAAe,KAAKA,EAAGH,CAAC,IAAG,EAAGO,EAAG,QAAUP,GACjF,OAAOO,CACX,EACOD,EAAQH,CAAC,CACpB,EACA,OAAO,SAAU,EAAK,CAClB,GAAIK,GAAOA,EAAI,WAAY,OAAOA,EAClC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sourcesContent":["var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\ndefine([\"require\", \"exports\", \"vue\"], function (require, exports, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.TopRive = void 0;\n // src/components/extra/rive/rive.vue\n var o = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"rive\",\n props: {\n src: {},\n buffer: {},\n riveFile: {},\n artboard: {},\n stateMachine: {},\n animations: {},\n stateMachines: {},\n layout: {},\n autoplay: {\n type: Boolean,\n default: !0\n },\n useOffscreenRenderer: { type: Boolean },\n enableInkbleed: { type: Boolean },\n tabIndex: {},\n focusOptions: {},\n gamepadOptions: {},\n enableRiveAssetCDN: { type: Boolean },\n deferDecoding: { type: Boolean },\n semanticsMode: {},\n semanticsOptions: {},\n shouldDisableRiveListeners: { type: Boolean },\n shouldDisableGamepad: { type: Boolean },\n isTouchScrollEnabled: { type: Boolean },\n automaticallyHandleEvents: { type: Boolean },\n autoBind: { type: Boolean },\n dispatchPointerExit: { type: Boolean },\n enableMultiTouch: { type: Boolean },\n drawingOptions: {},\n enableSettling: { type: Boolean },\n enableGPUCanvas: { type: Boolean },\n useReplayWorker: { type: Boolean },\n enablePerfMarks: { type: Boolean },\n onLoad: {},\n onLoadError: {},\n onPlay: {},\n onPause: {},\n onStop: {},\n onLoop: {},\n onStateChange: {},\n onAdvance: {},\n assetLoader: {},\n onload: {},\n onloaderror: {},\n onplay: {},\n onpause: {},\n onstop: {},\n onloop: {},\n onstatechange: {}\n },\n setup(t, { expose: o }) {\n let s, c = t, l = (0, vue_1.ref)(), u = { riveInstance: void 0 };\n return (0, vue_1.watch)([l, c], async () => {\n s ||= await new Promise((resolve_1, reject_1) => { require([\"@rive-app/canvas-lite\"], resolve_1, reject_1); }).then(__importStar);\n let e = l.value;\n if (!e)\n return;\n u.riveInstance?.cleanup();\n let t = {\n ...c,\n canvas: e,\n onLoad: (e) => {\n c.onLoad?.(e), u.riveInstance?.resizeDrawingSurfaceToCanvas();\n }\n };\n u.riveInstance = new s.Rive(t);\n }), (0, vue_1.onUnmounted)(() => {\n u.riveInstance?.cleanup();\n }), o(u), (t, n) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"canvas\", {\n ref_key: \"el\",\n ref: l,\n class: \"top-rive\"\n }, null, 512));\n }\n });\n exports.TopRive = o;\n});\n//# sourceMappingURL=extra.js.map\n","<script setup lang=\"ts\">\nimport { onUnmounted, ref, watch } from 'vue';\nimport type { Rive, RiveParameters } from '@rive-app/canvas-lite';\nimport type { Props } from './types';\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"]}
|
package/extra/extra.js
CHANGED
|
@@ -23,19 +23,25 @@ var o = /* @__PURE__ */ t({
|
|
|
23
23
|
default: !0
|
|
24
24
|
},
|
|
25
25
|
useOffscreenRenderer: { type: Boolean },
|
|
26
|
+
enableInkbleed: { type: Boolean },
|
|
26
27
|
tabIndex: {},
|
|
27
28
|
focusOptions: {},
|
|
29
|
+
gamepadOptions: {},
|
|
28
30
|
enableRiveAssetCDN: { type: Boolean },
|
|
31
|
+
deferDecoding: { type: Boolean },
|
|
29
32
|
semanticsMode: {},
|
|
30
33
|
semanticsOptions: {},
|
|
31
34
|
shouldDisableRiveListeners: { type: Boolean },
|
|
35
|
+
shouldDisableGamepad: { type: Boolean },
|
|
32
36
|
isTouchScrollEnabled: { type: Boolean },
|
|
33
37
|
automaticallyHandleEvents: { type: Boolean },
|
|
34
38
|
autoBind: { type: Boolean },
|
|
35
39
|
dispatchPointerExit: { type: Boolean },
|
|
36
40
|
enableMultiTouch: { type: Boolean },
|
|
37
41
|
drawingOptions: {},
|
|
42
|
+
enableSettling: { type: Boolean },
|
|
38
43
|
enableGPUCanvas: { type: Boolean },
|
|
44
|
+
useReplayWorker: { type: Boolean },
|
|
39
45
|
enablePerfMarks: { type: Boolean },
|
|
40
46
|
onLoad: {},
|
|
41
47
|
onLoadError: {},
|
package/extra/extra.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extra.js","names":["_openBlock","_createElementBlock","rive_default","defineComponent","__expose","rive","props","__props","el","ref","topRive","watch","canvas","options","onUnmounted","openBlock","createElementBlock"],"sources":["../../src/components/extra/rive/rive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onUnmounted, ref, watch } from 'vue';\nimport type { Rive, RiveParameters } from '@rive-app/canvas-lite';\nimport type { Props } from './types';\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"],"mappings":"
|
|
1
|
+
{"version":3,"file":"extra.js","names":["_openBlock","_createElementBlock","rive_default","defineComponent","__expose","rive","props","__props","el","ref","topRive","watch","canvas","options","onUnmounted","openBlock","createElementBlock"],"sources":["../../src/components/extra/rive/rive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { onUnmounted, ref, watch } from 'vue';\nimport type { Rive, RiveParameters } from '@rive-app/canvas-lite';\nimport type { Props } from './types';\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKA,IAAIK,GAEEC,IAAQC,GAIRC,IAAKC,EAAuB,GAE5BC,IAAU,EACf,cAAc,KAAA,EACf;E,OAEAC,EAAM,CAACH,GAAIF,CAAK,GAAG,YAAY;GAC9B,AAAWD,MAAO,MAAM,OAAO;GAE/B,IAAMO,IAASJ,EAAG;GAClB,IAAI,CAACI,GAAQ;GAEb,EAAQ,cAAc,QAAQ;GAE9B,IAAMC,IAA0B;IAC/B,GAAGP;IACH;IACA,SAAS,MAAM;KAGd,AAFAA,EAAM,SAAS,CAAC,GAEhBI,EAAQ,cAAc,6BAA6B;IACpD;GACD;GAEA,EAAQ,eAAe,IAAIL,EAAK,KAAKQ,CAAO;EAC7C,CAAC,GAEDC,QAAkB;GACjB,EAAQ,cAAc,QAAQ;EAC/B,CAAC,GAEDV,EAAaM,CAAO,I,UAInBV,EAAA,GAAAC,EAA2C,UAAA;GAA/B,SAAA;GAAJ,KAAIO;GAAK,OAAM"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topvisor/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Topvisor UI-kit Vue",
|
|
7
7
|
"author": "Topvisor",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@faker-js/faker": "^10.6.0",
|
|
28
28
|
"@monaco-editor/loader": "^1.7.0",
|
|
29
|
-
"@rive-app/canvas-lite": "^2.
|
|
29
|
+
"@rive-app/canvas-lite": "^2.52.0",
|
|
30
30
|
"pinia": "^3.0.4",
|
|
31
31
|
"topvisor-openapi": "github:topvisor/topvisor-openapi",
|
|
32
32
|
"vue": "^3.5.46"
|