@car-cutter/vue-webplayer 0.3.0
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/.turbo/turbo-build.log +16 -0
- package/.turbo/turbo-lint.log +4 -0
- package/README.md +11 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +8264 -0
- package/dist/index.umd.cjs +48 -0
- package/index.ts +23 -0
- package/package.json +30 -0
- package/src/WebPlayer.vue +83 -0
- package/tsconfig.app.json +8 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +5 -0
- package/vite.config.ts +52 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
[2K[1G[1myarn run v1.22.22[22m
|
|
3
|
+
[2K[1G[2m$ vue-tsc -b && vite build[22m
|
|
4
|
+
[36mvite v5.4.1 [32mbuilding for production...[36m[39m
|
|
5
|
+
[2K[1Gtransforming (1) [2mindex.ts[22m[2K[1G[32m✓[39m 9 modules transformed.
|
|
6
|
+
[2K[1Grendering chunks (1)...[2K[1G[32m
|
|
7
|
+
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
8
|
+
[2K[1Gcomputing gzip size (0)...[32m[36m[vite:dts][32m Start rollup declaration files...[39m
|
|
9
|
+
Analysis will use the bundled TypeScript version 5.4.2
|
|
10
|
+
*** The target project appears to use TypeScript 5.5.4 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
11
|
+
[32m[36m[vite:dts][32m Declaration files built in 3207ms.
|
|
12
|
+
[39m
|
|
13
|
+
[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.js [39m[1m[2m322.23 kB[22m[1m[22m[2m │ gzip: 80.75 kB[22m
|
|
14
|
+
[2K[1Grendering chunks (1)...[2K[1G[2K[1Gcomputing gzip size (1)...[2K[1G[2mdist/[22m[36mindex.umd.cjs [39m[1m[2m222.23 kB[22m[1m[22m[2m │ gzip: 69.99 kB[22m
|
|
15
|
+
[32m✓ built in 3.61s[39m
|
|
16
|
+
[2K[1G✨ Done in 5.58s.
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Vue WebPlayer
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
1. Install package: `npm install @car-cutter/vue-webplayer`
|
|
6
|
+
2. Import: `import { WebPlayer } from "@car-cutter/vue-webplayer"`
|
|
7
|
+
3. Use: `<WebPlayer :compositionUrl="url" />`
|
|
8
|
+
|
|
9
|
+
### Next Steps
|
|
10
|
+
|
|
11
|
+
For more customisation, take a look at the **[Online Documentation](https://carcutter.github.io/cars-webplayer-js/)**
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { DefineComponent } from 'vue';
|
|
3
|
+
import { ExtractPropTypes } from 'vue';
|
|
4
|
+
import { PropType } from 'vue';
|
|
5
|
+
import { PublicProps } from 'vue';
|
|
6
|
+
|
|
7
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
|
|
9
|
+
declare type __VLS_TypePropsToOption<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: PropType<T[K]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export declare const DEFAULT_EVENT_PREFIX = "cc-webplayer:";
|
|
19
|
+
|
|
20
|
+
export declare const EVENT_COMPOSITION_LOAD_ERROR = "composition-load-error";
|
|
21
|
+
|
|
22
|
+
export declare const EVENT_COMPOSITION_LOADED = "composition-loaded";
|
|
23
|
+
|
|
24
|
+
export declare const EVENT_COMPOSITION_LOADING = "composition-loading";
|
|
25
|
+
|
|
26
|
+
export declare const EVENT_EXTEND_MODE_OFF = "extend-mode-off";
|
|
27
|
+
|
|
28
|
+
export declare const EVENT_EXTEND_MODE_ON = "extend-mode-on";
|
|
29
|
+
|
|
30
|
+
export declare const EVENT_GALLERY_CLOSE = "gallery-close";
|
|
31
|
+
|
|
32
|
+
export declare const EVENT_GALLERY_OPEN = "gallery-open";
|
|
33
|
+
|
|
34
|
+
export declare const EVENT_HOTSPOTS_OFF = "hotspots-off";
|
|
35
|
+
|
|
36
|
+
export declare const EVENT_HOTSPOTS_ON = "hotspots-on";
|
|
37
|
+
|
|
38
|
+
declare type ImageLoadStrategy = "quality" | "speed";
|
|
39
|
+
|
|
40
|
+
export declare const WEB_PLAYER_ICON_WC_TAG = "cc-webplayer-icon";
|
|
41
|
+
|
|
42
|
+
export declare const WEB_PLAYER_WC_TAG = "cc-webplayer";
|
|
43
|
+
|
|
44
|
+
export declare const WebPlayer: DefineComponent<__VLS_TypePropsToOption<WebPlayerProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
45
|
+
compositionLoading: () => void;
|
|
46
|
+
compositionLoaded: () => void;
|
|
47
|
+
compositionLoadError: () => void;
|
|
48
|
+
extendModeOn: () => void;
|
|
49
|
+
extendModeOff: () => void;
|
|
50
|
+
hotspotsOn: () => void;
|
|
51
|
+
hotspotsOff: () => void;
|
|
52
|
+
galleryOpen: () => void;
|
|
53
|
+
galleryClose: () => void;
|
|
54
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_TypePropsToOption<WebPlayerProps>>> & {
|
|
55
|
+
onCompositionLoading?: (() => any) | undefined;
|
|
56
|
+
onCompositionLoaded?: (() => any) | undefined;
|
|
57
|
+
onCompositionLoadError?: (() => any) | undefined;
|
|
58
|
+
onExtendModeOn?: (() => any) | undefined;
|
|
59
|
+
onExtendModeOff?: (() => any) | undefined;
|
|
60
|
+
onHotspotsOn?: (() => any) | undefined;
|
|
61
|
+
onHotspotsOff?: (() => any) | undefined;
|
|
62
|
+
onGalleryOpen?: (() => any) | undefined;
|
|
63
|
+
onGalleryClose?: (() => any) | undefined;
|
|
64
|
+
}, {}, {}>;
|
|
65
|
+
|
|
66
|
+
export declare type WebPlayerEvents = {
|
|
67
|
+
compositionLoading: [];
|
|
68
|
+
compositionLoaded: [];
|
|
69
|
+
compositionLoadError: [];
|
|
70
|
+
extendModeOn: [];
|
|
71
|
+
extendModeOff: [];
|
|
72
|
+
hotspotsOn: [];
|
|
73
|
+
hotspotsOff: [];
|
|
74
|
+
galleryOpen: [];
|
|
75
|
+
galleryClose: [];
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export declare type WebPlayerProps = {
|
|
79
|
+
compositionUrl: string;
|
|
80
|
+
flatten?: boolean;
|
|
81
|
+
infiniteCarrousel?: boolean;
|
|
82
|
+
permanentGallery?: boolean;
|
|
83
|
+
imageLoadStrategy?: ImageLoadStrategy;
|
|
84
|
+
minImageWidth?: number;
|
|
85
|
+
maxImageWidth?: number;
|
|
86
|
+
preventFullScreen?: boolean;
|
|
87
|
+
eventPrefix?: string;
|
|
88
|
+
reverse360?: boolean;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export { }
|