@jacktea/img-viewer-vue 0.1.3
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/LICENSE +25 -0
- package/README.md +68 -0
- package/dist/ImgViewer.vue.d.ts +68 -0
- package/dist/ImgViewer.vue.d.ts.map +1 -0
- package/dist/img-viewer-vue.js +1 -0
- package/dist/img-viewer-vue.umd.cjs +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
This license applies to original source code in this repository, excluding
|
|
2
|
+
third-party components and generated codec binaries listed in
|
|
3
|
+
`THIRD_PARTY_NOTICES.md`.
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2026 zhuzhigang
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @jacktea/img-viewer-vue
|
|
2
|
+
|
|
3
|
+
基于 `@jacktea/img-viewer` 封装的 Vue 3 图片预览组件。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @jacktea/img-viewer-vue @jacktea/img-viewer
|
|
9
|
+
# 或者
|
|
10
|
+
pnpm add @jacktea/img-viewer-vue @jacktea/img-viewer
|
|
11
|
+
# 或者
|
|
12
|
+
yarn add @jacktea/img-viewer-vue @jacktea/img-viewer
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
> **注意:** 该包依赖于核心包 `@jacktea/img-viewer`,请确保同时安装。
|
|
16
|
+
|
|
17
|
+
## 注册与样式
|
|
18
|
+
|
|
19
|
+
在你的入口文件(例如 `main.ts`)引入组件和样式:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { createApp } from 'vue';
|
|
23
|
+
import App from './App.vue';
|
|
24
|
+
|
|
25
|
+
// 引入核心样式
|
|
26
|
+
import '@jacktea/img-viewer/dist/style.css';
|
|
27
|
+
|
|
28
|
+
const app = createApp(App);
|
|
29
|
+
app.mount('#app');
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 局部使用
|
|
33
|
+
|
|
34
|
+
```vue
|
|
35
|
+
<template>
|
|
36
|
+
<div>
|
|
37
|
+
<h1>图片预览演示</h1>
|
|
38
|
+
<ImgViewerVue
|
|
39
|
+
src="https://example.com/path/to/your/image.jpg"
|
|
40
|
+
class="my-viewer"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
import { ImgViewerVue } from '@jacktea/img-viewer-vue';
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
.my-viewer {
|
|
51
|
+
width: 800px;
|
|
52
|
+
height: 600px;
|
|
53
|
+
border: 1px solid #ccc;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Props 属性
|
|
59
|
+
|
|
60
|
+
| Prop | 类型 | 描述 |
|
|
61
|
+
| :--- | :--- | :--- |
|
|
62
|
+
| `src` | `string` (必须) | 想要预览的图片 URL |
|
|
63
|
+
|
|
64
|
+
支持传入 `class`, `style` 等常规 Vue 熟悉绑定。
|
|
65
|
+
|
|
66
|
+
## 许可证
|
|
67
|
+
|
|
68
|
+
MIT
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import '@jacktea/img-viewer';
|
|
2
|
+
import type { ImageSource, ViewMode, ImgViewerElement, DecoderType } from '@jacktea/img-viewer';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** 图片来源列表 */
|
|
5
|
+
sources?: ImageSource[];
|
|
6
|
+
/** 预览模式 */
|
|
7
|
+
mode?: ViewMode;
|
|
8
|
+
/** 只读 */
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
/** 自动播放 */
|
|
11
|
+
autoPlay?: boolean;
|
|
12
|
+
/** 自动播放间隔 (ms) */
|
|
13
|
+
interval?: number;
|
|
14
|
+
/** 解码模式 */
|
|
15
|
+
decodeType?: DecoderType;
|
|
16
|
+
/** rgba16 失败时是否回退到 rgba8 */
|
|
17
|
+
decodeFallback?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: import("vue").DefineComponent<Props, {
|
|
20
|
+
/** 获取底层 Web Component 实例 */
|
|
21
|
+
getElement: () => ImgViewerElement | undefined;
|
|
22
|
+
/** 打开图片 */
|
|
23
|
+
open: (sources: ImageSource[]) => Promise<void> | undefined;
|
|
24
|
+
/** 打开文件选择器 */
|
|
25
|
+
openFileDialog: () => void | undefined;
|
|
26
|
+
/** 设置模式 */
|
|
27
|
+
setMode: (mode: ViewMode) => void | undefined;
|
|
28
|
+
/** 下载当前图片 */
|
|
29
|
+
downloadCurrent: () => void | undefined;
|
|
30
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
31
|
+
"image-load": (detail: {
|
|
32
|
+
index: number;
|
|
33
|
+
}) => any;
|
|
34
|
+
"image-error": (detail: {
|
|
35
|
+
index: number;
|
|
36
|
+
error: Error;
|
|
37
|
+
}) => any;
|
|
38
|
+
"image-change": (detail: {
|
|
39
|
+
index: number;
|
|
40
|
+
}) => any;
|
|
41
|
+
"mode-change": (detail: {
|
|
42
|
+
mode: ViewMode;
|
|
43
|
+
}) => any;
|
|
44
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
45
|
+
"onImage-load"?: ((detail: {
|
|
46
|
+
index: number;
|
|
47
|
+
}) => any) | undefined;
|
|
48
|
+
"onImage-error"?: ((detail: {
|
|
49
|
+
index: number;
|
|
50
|
+
error: Error;
|
|
51
|
+
}) => any) | undefined;
|
|
52
|
+
"onImage-change"?: ((detail: {
|
|
53
|
+
index: number;
|
|
54
|
+
}) => any) | undefined;
|
|
55
|
+
"onMode-change"?: ((detail: {
|
|
56
|
+
mode: ViewMode;
|
|
57
|
+
}) => any) | undefined;
|
|
58
|
+
}>, {
|
|
59
|
+
sources: ImageSource[];
|
|
60
|
+
mode: ViewMode;
|
|
61
|
+
readonly: boolean;
|
|
62
|
+
autoPlay: boolean;
|
|
63
|
+
interval: number;
|
|
64
|
+
decodeType: DecoderType;
|
|
65
|
+
decodeFallback: boolean;
|
|
66
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
|
+
export default _default;
|
|
68
|
+
//# sourceMappingURL=ImgViewer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImgViewer.vue.d.ts","sourceRoot":"","sources":["../src/ImgViewer.vue"],"names":[],"mappings":"AAqGA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEhG,UAAU,KAAK;IACb,aAAa;IACb,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,WAAW;IACX,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS;IACT,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW;IACX,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;IAwDC,4BAA4B;;IAE5B,WAAW;oBACK,WAAW,EAAE;IAC7B,cAAc;;IAEd,WAAW;oBACK,QAAQ;IACxB,aAAa;;;;eAlDmB,MAAM;;;eACL,MAAM;eAAS,KAAK;;;eACnB,MAAM;;;cACR,QAAQ;;;;eAHR,MAAM;;;eACL,MAAM;eAAS,KAAK;;;eACnB,MAAM;;;cACR,QAAQ;;;aA9B9B,WAAW,EAAE;UAEhB,QAAQ;cAEJ,OAAO;cAEP,OAAO;cAEP,MAAM;gBAEJ,WAAW;oBAEP,OAAO;;AAwI1B,wBASG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x349280=_0x6d23;(function(_0x2513b7,_0x1f554f){var _0x29ec0f=_0x6d23,_0xb419d2=_0x2513b7();while(!![]){try{var _0x54b499=parseInt(_0x29ec0f(0x6e))/0x1+parseInt(_0x29ec0f(0x81))/0x2+-parseInt(_0x29ec0f(0x76))/0x3+parseInt(_0x29ec0f(0x84))/0x4*(-parseInt(_0x29ec0f(0x6d))/0x5)+-parseInt(_0x29ec0f(0x73))/0x6*(-parseInt(_0x29ec0f(0x87))/0x7)+-parseInt(_0x29ec0f(0x72))/0x8*(-parseInt(_0x29ec0f(0x88))/0x9)+parseInt(_0x29ec0f(0x80))/0xa*(-parseInt(_0x29ec0f(0x70))/0xb);if(_0x54b499===_0x1f554f)break;else _0xb419d2['push'](_0xb419d2['shift']());}catch(_0x555d2a){_0xb419d2['push'](_0xb419d2['shift']());}}}(_0x2c00,0xbb86f));import{defineComponent as _0x5306a7,ref as _0x4e0f94,watch as _0x1931b1,onMounted as _0x77adfe,onBeforeUnmount as _0x4a519e,openBlock as _0x331105,createElementBlock as _0x43023d}from'vue';import{configureNativeWasm as _0x1be5e4,getNativeWasmOptions as _0x39a771,resetNativeWasmOptions as _0x271e18}from'@jacktea/img-viewer';const v=['mode','readonly','auto-play',_0x349280(0x71),_0x349280(0x7c),_0x349280(0x7e)],y=_0x5306a7({'__name':'ImgViewer','props':{'sources':{'default':void 0x0},'mode':{'default':_0x349280(0x6b)},'readonly':{'type':Boolean,'default':!0x1},'autoPlay':{'type':Boolean,'default':!0x1},'interval':{'default':0xbb8},'decodeType':{'default':'auto'},'decodeFallback':{'type':Boolean,'default':!0x0}},'emits':[_0x349280(0x74),_0x349280(0x7b),_0x349280(0x78),_0x349280(0x83)],'setup'(_0x2be13a,{expose:_0x1435a1,emit:_0x28bba9}){var _0x3143f7=_0x349280;const _0x525cac=_0x2be13a,_0x18a923=_0x28bba9,_0x3e02dc=_0x4e0f94();return _0x1931b1(()=>_0x525cac[_0x3143f7(0x6f)],_0xa6e0e6=>{var _0x282b10=_0x3143f7;_0xa6e0e6&&_0xa6e0e6['length']>0x0&&_0x3e02dc['value']&&_0x3e02dc['value'][_0x282b10(0x89)](_0xa6e0e6);},{'deep':!0x0}),_0x77adfe(()=>{var _0x334bec=_0x3143f7;const _0x121f40=_0x3e02dc[_0x334bec(0x77)];_0x121f40&&(_0x121f40['addEventListener'](_0x334bec(0x74),_0x44f97d=>_0x18a923('image-load',_0x44f97d[_0x334bec(0x79)])),_0x121f40[_0x334bec(0x75)]('image-error',_0x4fd53f=>_0x18a923(_0x334bec(0x7b),_0x4fd53f[_0x334bec(0x79)])),_0x121f40[_0x334bec(0x75)](_0x334bec(0x78),_0x417e0b=>_0x18a923(_0x334bec(0x78),_0x417e0b[_0x334bec(0x79)])),_0x121f40[_0x334bec(0x75)](_0x334bec(0x83),_0x37d3cc=>_0x18a923(_0x334bec(0x83),_0x37d3cc[_0x334bec(0x79)])),_0x525cac['sources']&&_0x525cac[_0x334bec(0x6f)][_0x334bec(0x6c)]>0x0&&_0x121f40[_0x334bec(0x89)](_0x525cac[_0x334bec(0x6f)]));}),_0x4a519e(()=>{var _0x489bfb;(_0x489bfb=_0x3e02dc['value'])==null||_0x489bfb['destroy']();}),_0x1435a1({'getElement':()=>_0x3e02dc[_0x3143f7(0x77)],'open':_0x42eae4=>{var _0xb7c28e=_0x3143f7,_0x230cd0;return(_0x230cd0=_0x3e02dc[_0xb7c28e(0x77)])==null?void 0x0:_0x230cd0['open'](_0x42eae4);},'openFileDialog':()=>{var _0x539fd4=_0x3143f7,_0x4ac2b2;return(_0x4ac2b2=_0x3e02dc[_0x539fd4(0x77)])==null?void 0x0:_0x4ac2b2[_0x539fd4(0x7f)]();},'setMode':_0x5c9e2b=>{var _0x2ae2d4=_0x3143f7,_0xc703ed;return(_0xc703ed=_0x3e02dc[_0x2ae2d4(0x77)])==null?void 0x0:_0xc703ed[_0x2ae2d4(0x82)](_0x5c9e2b);},'downloadCurrent':()=>{var _0x2b13cd=_0x3143f7,_0x2ad974;return(_0x2ad974=_0x3e02dc[_0x2b13cd(0x77)])==null?void 0x0:_0x2ad974[_0x2b13cd(0x7d)]();}}),(_0x5e10f1,_0x1f73c5)=>(_0x331105(),_0x43023d('img-viewer',{'ref_key':_0x3143f7(0x85),'ref':_0x3e02dc,'mode':_0x2be13a['mode'],'readonly':_0x2be13a[_0x3143f7(0x7a)],'auto-play':_0x2be13a[_0x3143f7(0x86)],'interval':_0x2be13a[_0x3143f7(0x71)],'decode-type':_0x2be13a['decodeType'],'decode-fallback':_0x2be13a['decodeFallback']},null,0x8,v));}});function _0x6d23(_0xc0cad7,_0x4b35eb){_0xc0cad7=_0xc0cad7-0x6b;var _0x2c0012=_0x2c00();var _0x6d2339=_0x2c0012[_0xc0cad7];return _0x6d2339;}function _0x2c00(){var _0xb2ead0=['viewerRef','autoPlay','357FoYAXj','320418MiRaZH','open','single','length','305770UtTrIW','1484657vWCnuP','sources','8483761QMiMyp','interval','184NAZfRE','6450kTnBPz','image-load','addEventListener','2044908REvAPp','value','image-change','detail','readonly','image-error','decode-type','downloadCurrent','decode-fallback','openFileDialog','20EWHHlm','1390150CeDgKk','setMode','mode-change','4cmmkJU'];_0x2c00=function(){return _0xb2ead0;};return _0x2c00();}export{y as ImgViewer,_0x1be5e4 as configureNativeWasm,_0x39a771 as getNativeWasmOptions,_0x271e18 as resetNativeWasmOptions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x140487,_0xdd8c53){var _0x5af63a=_0xe5f7,_0x485e4a=_0x140487();while(!![]){try{var _0x47dd2a=parseInt(_0x5af63a(0xf2))/0x1+-parseInt(_0x5af63a(0xf1))/0x2*(parseInt(_0x5af63a(0xe2))/0x3)+parseInt(_0x5af63a(0xec))/0x4+parseInt(_0x5af63a(0xee))/0x5+parseInt(_0x5af63a(0xe7))/0x6*(parseInt(_0x5af63a(0xf0))/0x7)+-parseInt(_0x5af63a(0x100))/0x8*(parseInt(_0x5af63a(0xe3))/0x9)+-parseInt(_0x5af63a(0xef))/0xa;if(_0x47dd2a===_0xdd8c53)break;else _0x485e4a['push'](_0x485e4a['shift']());}catch(_0x4dae18){_0x485e4a['push'](_0x485e4a['shift']());}}}(_0x581b,0x5b21d),function(_0x4515d8,_0x23ab02){var _0x133cde=_0xe5f7;typeof exports==_0x133cde(0xfa)&&typeof module<'u'?_0x23ab02(exports,require(_0x133cde(0x10f)),require(_0x133cde(0x103))):typeof define==_0x133cde(0x102)&&define[_0x133cde(0xf6)]?define(['exports',_0x133cde(0x10f),_0x133cde(0x103)],_0x23ab02):(_0x4515d8=typeof globalThis<'u'?globalThis:_0x4515d8||self,_0x23ab02(_0x4515d8[_0x133cde(0xe8)]={},_0x4515d8['Vue'],_0x4515d8[_0x133cde(0xf9)]));}(this,function(_0x557f8a,_0x226b19,_0x524dca){'use strict';var _0x2c1cfa=_0xe5f7;const _0x384029=[_0x2c1cfa(0xf8),'readonly','auto-play',_0x2c1cfa(0x110),_0x2c1cfa(0x106),_0x2c1cfa(0xff)],_0x54d0a6=_0x226b19[_0x2c1cfa(0xed)]({'__name':_0x2c1cfa(0xf9),'props':{'sources':{'default':void 0x0},'mode':{'default':_0x2c1cfa(0x101)},'readonly':{'type':Boolean,'default':!0x1},'autoPlay':{'type':Boolean,'default':!0x1},'interval':{'default':0xbb8},'decodeType':{'default':_0x2c1cfa(0x10a)},'decodeFallback':{'type':Boolean,'default':!0x0}},'emits':[_0x2c1cfa(0xfb),'image-error','image-change','mode-change'],'setup'(_0x30e224,{expose:_0x16b74a,emit:_0x460a80}){var _0x49dc09=_0x2c1cfa;const _0x23d474=_0x30e224,_0x5ab229=_0x460a80,_0x4105e7=_0x226b19['ref']();return _0x226b19[_0x49dc09(0xf5)](()=>_0x23d474[_0x49dc09(0xe4)],_0x1384fb=>{var _0x9ee430=_0x49dc09;_0x1384fb&&_0x1384fb['length']>0x0&&_0x4105e7[_0x9ee430(0xfc)]&&_0x4105e7[_0x9ee430(0xfc)][_0x9ee430(0xfe)](_0x1384fb);},{'deep':!0x0}),_0x226b19[_0x49dc09(0x104)](()=>{var _0x3324f3=_0x49dc09;const _0x2f530e=_0x4105e7[_0x3324f3(0xfc)];_0x2f530e&&(_0x2f530e[_0x3324f3(0x10e)](_0x3324f3(0xfb),_0x5480b9=>_0x5ab229(_0x3324f3(0xfb),_0x5480b9['detail'])),_0x2f530e['addEventListener'](_0x3324f3(0x109),_0x4593d5=>_0x5ab229(_0x3324f3(0x109),_0x4593d5[_0x3324f3(0xe5)])),_0x2f530e[_0x3324f3(0x10e)](_0x3324f3(0x113),_0x9c2c46=>_0x5ab229(_0x3324f3(0x113),_0x9c2c46[_0x3324f3(0xe5)])),_0x2f530e['addEventListener']('mode-change',_0x438cf9=>_0x5ab229(_0x3324f3(0xf4),_0x438cf9[_0x3324f3(0xe5)])),_0x23d474[_0x3324f3(0xe4)]&&_0x23d474[_0x3324f3(0xe4)][_0x3324f3(0xe6)]>0x0&&_0x2f530e[_0x3324f3(0xfe)](_0x23d474[_0x3324f3(0xe4)]));}),_0x226b19[_0x49dc09(0xfd)](()=>{var _0x3960d6;(_0x3960d6=_0x4105e7['value'])==null||_0x3960d6['destroy']();}),_0x16b74a({'getElement':()=>_0x4105e7['value'],'open':_0x4f10ec=>{var _0x21e796=_0x49dc09,_0x442be2;return(_0x442be2=_0x4105e7[_0x21e796(0xfc)])==null?void 0x0:_0x442be2[_0x21e796(0xfe)](_0x4f10ec);},'openFileDialog':()=>{var _0x23169d=_0x49dc09,_0x3abacc;return(_0x3abacc=_0x4105e7[_0x23169d(0xfc)])==null?void 0x0:_0x3abacc[_0x23169d(0xeb)]();},'setMode':_0x581f77=>{var _0xe8ad3f=_0x49dc09,_0x41c09e;return(_0x41c09e=_0x4105e7[_0xe8ad3f(0xfc)])==null?void 0x0:_0x41c09e[_0xe8ad3f(0x105)](_0x581f77);},'downloadCurrent':()=>{var _0x56d902=_0x49dc09,_0x4876eb;return(_0x4876eb=_0x4105e7[_0x56d902(0xfc)])==null?void 0x0:_0x4876eb[_0x56d902(0xe9)]();}}),(_0x27d31c,_0x32bb8b)=>(_0x226b19['openBlock'](),_0x226b19['createElementBlock']('img-viewer',{'ref_key':_0x49dc09(0x107),'ref':_0x4105e7,'mode':_0x30e224['mode'],'readonly':_0x30e224[_0x49dc09(0x108)],'auto-play':_0x30e224['autoPlay'],'interval':_0x30e224[_0x49dc09(0x110)],'decode-type':_0x30e224[_0x49dc09(0xea)],'decode-fallback':_0x30e224[_0x49dc09(0x10c)]},null,0x8,_0x384029));}});Object[_0x2c1cfa(0x10b)](_0x557f8a,_0x2c1cfa(0x111),{'enumerable':!0x0,'get':()=>_0x524dca[_0x2c1cfa(0x111)]}),Object[_0x2c1cfa(0x10b)](_0x557f8a,_0x2c1cfa(0xf3),{'enumerable':!0x0,'get':()=>_0x524dca[_0x2c1cfa(0xf3)]}),Object[_0x2c1cfa(0x10b)](_0x557f8a,_0x2c1cfa(0x10d),{'enumerable':!0x0,'get':()=>_0x524dca['resetNativeWasmOptions']}),_0x557f8a[_0x2c1cfa(0xf9)]=_0x54d0a6,Object['defineProperty'](_0x557f8a,Symbol[_0x2c1cfa(0xf7)],{'value':_0x2c1cfa(0x112)});}));function _0xe5f7(_0xaddc75,_0x9b685){_0xaddc75=_0xaddc75-0xe2;var _0x581b51=_0x581b();var _0xe5f7b2=_0x581b51[_0xaddc75];return _0xe5f7b2;}function _0x581b(){var _0x4218b8=['readonly','image-error','auto','defineProperty','decodeFallback','resetNativeWasmOptions','addEventListener','vue','interval','configureNativeWasm','Module','image-change','39gamLiz','9rfgrmn','sources','detail','length','15672ODJBtk','ImgViewerVue','downloadCurrent','decodeType','openFileDialog','593592DHULgD','defineComponent','2050110JHkyoJ','6710660NFqRUv','1736GgRgvX','108ISEUiZ','454946pBpDLO','getNativeWasmOptions','mode-change','watch','amd','toStringTag','mode','ImgViewer','object','image-load','value','onBeforeUnmount','open','decode-fallback','4928776JMAdXr','single','function','@jacktea/img-viewer','onMounted','setMode','decode-type','viewerRef'];_0x581b=function(){return _0x4218b8;};return _0x581b();}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ImgViewer } from './ImgViewer.vue';
|
|
2
|
+
export { configureNativeWasm, getNativeWasmOptions, resetNativeWasmOptions } from '@jacktea/img-viewer';
|
|
3
|
+
export type { NativeWasmCodec, NativeWasmOptions } from '@jacktea/img-viewer';
|
|
4
|
+
export type { ImageSource, ViewMode, ViewerConfig, TransformState, MagnifierConfig, LoadedImage } from '@jacktea/img-viewer';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACxG,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jacktea/img-viewer-vue",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/img-viewer-vue.umd.cjs",
|
|
7
|
+
"module": "dist/img-viewer-vue.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/img-viewer-vue.js",
|
|
12
|
+
"require": "./dist/img-viewer-vue.umd.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@jacktea/img-viewer": "0.1.3"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"vue": "^3.3.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"vue": "^3.5.0",
|
|
27
|
+
"vue-tsc": "^2.2.0",
|
|
28
|
+
"@vitejs/plugin-vue": "^5.2.0"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "vite build && vue-tsc --emitDeclarationOnly --outDir dist"
|
|
32
|
+
}
|
|
33
|
+
}
|