@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.
@@ -0,0 +1,16 @@
1
+
2
+ yarn run v1.22.22
3
+ $ vue-tsc -b && vite build
4
+ vite v5.4.1 building for production...
5
+ transforming (1) index.ts✓ 9 modules transformed.
6
+ rendering chunks (1)...
7
+ [vite:dts] Start generate declaration files...
8
+ computing gzip size (0)...[vite:dts] Start rollup declaration files...
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
+ [vite:dts] Declaration files built in 3207ms.
12
+ 
13
+ computing gzip size (1)...dist/index.js 322.23 kB │ gzip: 80.75 kB
14
+ rendering chunks (1)...computing gzip size (1)...dist/index.umd.cjs 222.23 kB │ gzip: 69.99 kB
15
+ ✓ built in 3.61s
16
+ ✨ Done in 5.58s.
@@ -0,0 +1,4 @@
1
+
2
+ yarn run v1.22.22
3
+ $ eslint . --ext ts --max-warnings 0
4
+ ✨ Done in 1.84s.
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/)**
@@ -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 { }