@lingxia/vue 0.12.0 → 0.14.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.
Files changed (2) hide show
  1. package/dist/types.d.ts +75 -3
  2. package/package.json +4 -4
package/dist/types.d.ts CHANGED
@@ -1,13 +1,85 @@
1
1
  import type { CSSProperties } from 'vue';
2
- import type { LxMediaSwiperAttributes, LxVideoAttributes } from '@lingxia/elements';
3
2
  import type { LxNavigatorEvent, NavigatorEnvVersion, NavigatorOpenType, NavigatorQuery, NavigatorTarget } from '@lingxia/elements';
4
- export interface LxVideoProps extends Omit<LxVideoAttributes, 'ref' | 'className' | 'style'> {
3
+ export interface LxVideoProps {
4
+ id?: string;
5
+ src?: string;
6
+ poster?: string;
7
+ objectFit?: 'cover' | 'contain' | 'fill' | 'fit';
8
+ contentRotate?: 0 | 90 | 180 | 270;
9
+ autoplay?: boolean;
10
+ loop?: boolean;
11
+ muted?: boolean;
12
+ controls?: boolean;
13
+ progressBar?: boolean;
14
+ live?: boolean;
15
+ volume?: string | number;
16
+ qualities?: Array<{
17
+ label: string;
18
+ url?: string;
19
+ }>;
20
+ playbackRates?: number[];
5
21
  class?: string;
6
22
  style?: CSSProperties;
23
+ onPlayRequest?: (event: Event) => void;
24
+ onPlay?: (event: Event) => void;
25
+ onPlaying?: (event: Event) => void;
26
+ onPause?: (event: Event) => void;
27
+ onStop?: (event: Event) => void;
28
+ onEnded?: (event: Event) => void;
29
+ onTimeUpdate?: (event: Event) => void;
30
+ onError?: (event: Event) => void;
31
+ onLoadedMetadata?: (event: Event) => void;
32
+ onFullscreenChange?: (event: Event) => void;
33
+ onWaiting?: (event: Event) => void;
34
+ onQualityChange?: (event: Event) => void;
35
+ onRateChange?: (event: Event) => void;
36
+ pageBindings?: Record<string, string>;
7
37
  }
8
- export interface LxMediaSwiperProps extends Omit<LxMediaSwiperAttributes, 'ref' | 'className' | 'style'> {
38
+ type LxMediaSwiperItem = {
39
+ id?: string;
40
+ type: 'image';
41
+ src: string;
42
+ } | {
43
+ id?: string;
44
+ type: 'video';
45
+ src: string;
46
+ poster?: string;
47
+ controls?: boolean;
48
+ muted?: boolean;
49
+ };
50
+ export interface LxMediaSwiperProps {
51
+ id?: string;
52
+ items?: LxMediaSwiperItem[];
53
+ index?: number;
54
+ initialIndex?: number;
55
+ loop?: boolean;
56
+ autoplay?: boolean;
57
+ interval?: number;
58
+ animation?: 'slide' | 'none';
59
+ animationDuration?: number;
60
+ direction?: 'horizontal' | 'vertical';
61
+ contentRotate?: 0 | 90 | 180 | 270;
62
+ objectFit?: 'cover' | 'contain' | 'fill' | 'fit';
63
+ controls?: boolean;
64
+ muted?: boolean;
65
+ dots?: boolean | {
66
+ color?: string;
67
+ activeColor?: string;
68
+ };
69
+ swipeEnabled?: boolean;
70
+ peek?: number | {
71
+ previous?: number;
72
+ next?: number;
73
+ };
9
74
  class?: string;
10
75
  style?: CSSProperties;
76
+ onChange?: (event: Event) => void;
77
+ onTransitionEnd?: (event: Event) => void;
78
+ onEndReached?: (event: Event) => void;
79
+ onTap?: (event: Event) => void;
80
+ onVideoEnded?: (event: Event) => void;
81
+ onError?: (event: Event) => void;
82
+ pageBindings?: Record<string, string>;
11
83
  }
12
84
  export interface LxPickerProps {
13
85
  columns?: string[][] | [string[], Record<string, string[]>];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxia/vue",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "private": false,
5
5
  "description": "LingXia Vue runtime and components for lxapp pages",
6
6
  "type": "module",
@@ -19,9 +19,9 @@
19
19
  "prepublishOnly": "npm run build"
20
20
  },
21
21
  "dependencies": {
22
- "@lingxia/bridge": "~0.12.0",
23
- "@lingxia/elements": "~0.12.0",
24
- "@lingxia/page-runtime": "~0.12.0"
22
+ "@lingxia/bridge": "~0.14.0",
23
+ "@lingxia/elements": "~0.14.0",
24
+ "@lingxia/page-runtime": "~0.14.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": ">=3.5.0"