@lingxia/elements 0.14.0 → 0.16.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/dist/index.d.ts +3 -2
- package/dist/index.js +1 -0
- package/dist/inline-native/commit.d.ts +39 -0
- package/dist/inline-native/commit.js +94 -0
- package/dist/inline-native/elements.d.ts +104 -0
- package/dist/inline-native/elements.js +749 -0
- package/dist/inline-native/errors.d.ts +8 -0
- package/dist/inline-native/errors.js +23 -0
- package/dist/inline-native/events.d.ts +10 -0
- package/dist/inline-native/events.js +16 -0
- package/dist/inline-native/geometry.d.ts +78 -0
- package/dist/inline-native/geometry.js +40 -0
- package/dist/inline-native/identity.d.ts +28 -0
- package/dist/inline-native/identity.js +51 -0
- package/dist/inline-native/index.d.ts +14 -0
- package/dist/inline-native/index.js +19 -0
- package/dist/inline-native/layout.d.ts +2 -0
- package/dist/inline-native/layout.js +58 -0
- package/dist/inline-native/lease.d.ts +13 -0
- package/dist/inline-native/lease.js +31 -0
- package/dist/inline-native/runtime.d.ts +64 -0
- package/dist/inline-native/runtime.js +119 -0
- package/dist/inline-native/schema.d.ts +111 -0
- package/dist/inline-native/schema.js +210 -0
- package/dist/inline-native/structure.d.ts +22 -0
- package/dist/inline-native/structure.js +706 -0
- package/dist/inline-native/style.d.ts +7 -0
- package/dist/inline-native/style.js +119 -0
- package/dist/inline-native/types.d.ts +82 -0
- package/dist/inline-native/types.js +7 -0
- package/dist/inline-native/unwrap.d.ts +10 -0
- package/dist/inline-native/unwrap.js +32 -0
- package/dist/inline-native/video.d.ts +65 -0
- package/dist/inline-native/video.js +69 -0
- package/dist/native_component_wrapper_shared.d.ts +3 -2
- package/dist/native_component_wrapper_shared.js +6 -3
- package/dist/nativecomponent.d.ts +1 -1
- package/dist/nativecomponent.js +8 -11
- package/dist/navigator.d.ts +2 -2
- package/dist/navigator.js +5 -5
- package/dist/picker.js +12 -4
- package/dist/video-events.d.ts +2 -0
- package/dist/video-events.js +18 -0
- package/dist/video.d.ts +98 -79
- package/dist/video.js +182 -757
- package/package.json +2 -1
- package/src/index.ts +58 -1
- package/src/inline-native/commit.ts +141 -0
- package/src/inline-native/elements.ts +829 -0
- package/src/inline-native/errors.ts +35 -0
- package/src/inline-native/events.ts +31 -0
- package/src/inline-native/geometry.ts +86 -0
- package/src/inline-native/identity.ts +102 -0
- package/src/inline-native/index.ts +103 -0
- package/src/inline-native/layout.ts +58 -0
- package/src/inline-native/lease.ts +48 -0
- package/src/inline-native/runtime.ts +185 -0
- package/src/inline-native/schema.ts +247 -0
- package/src/inline-native/structure.ts +823 -0
- package/src/inline-native/style.ts +111 -0
- package/src/inline-native/types.ts +105 -0
- package/src/inline-native/unwrap.ts +34 -0
- package/src/inline-native/video.ts +125 -0
- package/src/native_component_wrapper_shared.ts +8 -6
- package/src/nativecomponent.ts +8 -13
- package/src/navigator.ts +9 -9
- package/src/picker.ts +13 -4
- package/src/video-events.ts +16 -0
- package/src/video.ts +245 -839
package/dist/video.d.ts
CHANGED
|
@@ -2,7 +2,60 @@ export type LxVideoQuality = {
|
|
|
2
2
|
label: string;
|
|
3
3
|
url?: string;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
export interface LxVideoEventPayloads {
|
|
6
|
+
onPlayRequest: Record<string, never>;
|
|
7
|
+
onPlay: Record<string, never>;
|
|
8
|
+
onPlaying: Record<string, never>;
|
|
9
|
+
onPause: Record<string, never>;
|
|
10
|
+
onStop: Record<string, never>;
|
|
11
|
+
onEnded: Record<string, never>;
|
|
12
|
+
onWaiting: Record<string, never>;
|
|
13
|
+
onTimeUpdate: {
|
|
14
|
+
currentTime: number;
|
|
15
|
+
duration?: number;
|
|
16
|
+
};
|
|
17
|
+
onError: {
|
|
18
|
+
code: string;
|
|
19
|
+
message: string;
|
|
20
|
+
recoverable?: boolean;
|
|
21
|
+
};
|
|
22
|
+
onLoadedMetadata: {
|
|
23
|
+
duration: number;
|
|
24
|
+
width?: number;
|
|
25
|
+
height?: number;
|
|
26
|
+
};
|
|
27
|
+
onFullscreenChange: {
|
|
28
|
+
fullscreen: boolean;
|
|
29
|
+
direction?: string;
|
|
30
|
+
};
|
|
31
|
+
onQualityChange: {
|
|
32
|
+
quality: string;
|
|
33
|
+
url?: string;
|
|
34
|
+
};
|
|
35
|
+
onRateChange: {
|
|
36
|
+
rate: number;
|
|
37
|
+
};
|
|
38
|
+
onVolumeChange: {
|
|
39
|
+
volume: number;
|
|
40
|
+
muted?: boolean;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface LxVideoEventHandlers {
|
|
44
|
+
onPlayRequest?: (payload: LxVideoEventPayloads["onPlayRequest"]) => void;
|
|
45
|
+
onPlay?: (payload: LxVideoEventPayloads["onPlay"]) => void;
|
|
46
|
+
onPlaying?: (payload: LxVideoEventPayloads["onPlaying"]) => void;
|
|
47
|
+
onPause?: (payload: LxVideoEventPayloads["onPause"]) => void;
|
|
48
|
+
onStop?: (payload: LxVideoEventPayloads["onStop"]) => void;
|
|
49
|
+
onEnded?: (payload: LxVideoEventPayloads["onEnded"]) => void;
|
|
50
|
+
onWaiting?: (payload: LxVideoEventPayloads["onWaiting"]) => void;
|
|
51
|
+
onTimeUpdate?: (payload: LxVideoEventPayloads["onTimeUpdate"]) => void;
|
|
52
|
+
onError?: (payload: LxVideoEventPayloads["onError"]) => void;
|
|
53
|
+
onLoadedMetadata?: (payload: LxVideoEventPayloads["onLoadedMetadata"]) => void;
|
|
54
|
+
onFullscreenChange?: (payload: LxVideoEventPayloads["onFullscreenChange"]) => void;
|
|
55
|
+
onQualityChange?: (payload: LxVideoEventPayloads["onQualityChange"]) => void;
|
|
56
|
+
onRateChange?: (payload: LxVideoEventPayloads["onRateChange"]) => void;
|
|
57
|
+
onVolumeChange?: (payload: LxVideoEventPayloads["onVolumeChange"]) => void;
|
|
58
|
+
}
|
|
6
59
|
export type LxVideoAttributes = {
|
|
7
60
|
id?: string;
|
|
8
61
|
src?: string;
|
|
@@ -19,21 +72,22 @@ export type LxVideoAttributes = {
|
|
|
19
72
|
qualities?: LxVideoQuality[];
|
|
20
73
|
playbackRates?: number[];
|
|
21
74
|
className?: string;
|
|
22
|
-
style?:
|
|
23
|
-
ref?:
|
|
24
|
-
onPlayRequest?:
|
|
25
|
-
onPlay?:
|
|
26
|
-
onPlaying?:
|
|
27
|
-
onPause?:
|
|
28
|
-
onStop?:
|
|
29
|
-
onEnded?:
|
|
30
|
-
onTimeUpdate?:
|
|
31
|
-
onError?:
|
|
32
|
-
onLoadedMetadata?:
|
|
33
|
-
onFullscreenChange?:
|
|
34
|
-
onWaiting?:
|
|
35
|
-
onQualityChange?:
|
|
36
|
-
onRateChange?:
|
|
75
|
+
style?: unknown;
|
|
76
|
+
ref?: unknown;
|
|
77
|
+
onPlayRequest?: (event: CustomEvent<LxVideoEventPayloads["onPlayRequest"]>) => void;
|
|
78
|
+
onPlay?: (event: CustomEvent<LxVideoEventPayloads["onPlay"]>) => void;
|
|
79
|
+
onPlaying?: (event: CustomEvent<LxVideoEventPayloads["onPlaying"]>) => void;
|
|
80
|
+
onPause?: (event: CustomEvent<LxVideoEventPayloads["onPause"]>) => void;
|
|
81
|
+
onStop?: (event: CustomEvent<LxVideoEventPayloads["onStop"]>) => void;
|
|
82
|
+
onEnded?: (event: CustomEvent<LxVideoEventPayloads["onEnded"]>) => void;
|
|
83
|
+
onTimeUpdate?: (event: CustomEvent<LxVideoEventPayloads["onTimeUpdate"]>) => void;
|
|
84
|
+
onError?: (event: CustomEvent<LxVideoEventPayloads["onError"]>) => void;
|
|
85
|
+
onLoadedMetadata?: (event: CustomEvent<LxVideoEventPayloads["onLoadedMetadata"]>) => void;
|
|
86
|
+
onFullscreenChange?: (event: CustomEvent<LxVideoEventPayloads["onFullscreenChange"]>) => void;
|
|
87
|
+
onWaiting?: (event: CustomEvent<LxVideoEventPayloads["onWaiting"]>) => void;
|
|
88
|
+
onQualityChange?: (event: CustomEvent<LxVideoEventPayloads["onQualityChange"]>) => void;
|
|
89
|
+
onRateChange?: (event: CustomEvent<LxVideoEventPayloads["onRateChange"]>) => void;
|
|
90
|
+
onVolumeChange?: (event: CustomEvent<LxVideoEventPayloads["onVolumeChange"]>) => void;
|
|
37
91
|
pageBindings?: Record<string, string>;
|
|
38
92
|
};
|
|
39
93
|
declare global {
|
|
@@ -43,99 +97,64 @@ declare global {
|
|
|
43
97
|
}
|
|
44
98
|
}
|
|
45
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* The DOM leaf for an inline-native video.
|
|
102
|
+
*
|
|
103
|
+
* Rendering, geometry and lifecycle are owned by the nearest LxNativeRoot.
|
|
104
|
+
* A bare lx-video is invalid and deliberately has no legacy overlay path.
|
|
105
|
+
*/
|
|
46
106
|
export declare class LxVideoElement extends HTMLElement {
|
|
47
107
|
static get observedAttributes(): string[];
|
|
48
108
|
private componentId;
|
|
49
|
-
private
|
|
50
|
-
private updateState;
|
|
109
|
+
private islandPlaybackIdle;
|
|
51
110
|
private unregister?;
|
|
52
|
-
private
|
|
53
|
-
private winSettleFrame;
|
|
54
|
-
private pendingLayoutFrame;
|
|
55
|
-
private boundUpdatePosition;
|
|
56
|
-
private _handlers;
|
|
57
|
-
private harmonyEmbed?;
|
|
58
|
-
private lastHarmonyProps?;
|
|
59
|
-
private pendingHarmonyProps?;
|
|
60
|
-
private pendingHarmonyRetryTimer;
|
|
61
|
-
private pendingHarmonyRetryCount;
|
|
62
|
-
private iOSBootstrapFrame;
|
|
63
|
-
private iOSBootstrapRemaining;
|
|
64
|
-
private iOSHelper?;
|
|
65
|
-
private removeLayoutInvalidationListener?;
|
|
66
|
-
private forceHarmonyEmbedRecreate;
|
|
67
|
-
private attrObserver?;
|
|
68
|
-
private resizeEventListener;
|
|
69
|
-
private iOSScrollEventListener;
|
|
70
|
-
private scrollSettleFrame;
|
|
71
|
-
private containerScrollListener;
|
|
111
|
+
private handlers;
|
|
72
112
|
private rawHandlers;
|
|
73
|
-
private
|
|
74
|
-
private parseRotateValue;
|
|
75
|
-
private parseObjectFitValue;
|
|
113
|
+
private bindings;
|
|
76
114
|
set pageBindings(bindings: Record<string, string>);
|
|
77
115
|
get pageBindings(): Record<string, string>;
|
|
116
|
+
get pageFuncBindings(): Record<string, string>;
|
|
117
|
+
get pageFuncBindingsJson(): string;
|
|
78
118
|
set src(value: string | null | undefined);
|
|
79
119
|
get src(): string | null;
|
|
80
|
-
private dataAttrToDatasetKey;
|
|
81
|
-
private collectDataset;
|
|
82
|
-
private upgradeProperty;
|
|
83
120
|
set contentRotate(value: unknown);
|
|
84
121
|
get contentRotate(): 0 | 90 | 180 | 270 | undefined;
|
|
85
122
|
connectedCallback(): void;
|
|
86
123
|
disconnectedCallback(): void;
|
|
87
124
|
attributeChangedCallback(name: string): void;
|
|
125
|
+
private registerEventBridge;
|
|
126
|
+
private requestRootCompile;
|
|
127
|
+
private upgradeProperty;
|
|
128
|
+
private parseRotateValue;
|
|
129
|
+
private parseObjectFitValue;
|
|
88
130
|
private isEventListener;
|
|
89
131
|
private setEventHandler;
|
|
90
132
|
private getEventHandler;
|
|
91
|
-
set onplayrequest(
|
|
133
|
+
set onplayrequest(value: EventListener);
|
|
92
134
|
get onplayrequest(): EventListener;
|
|
93
|
-
set onplay(
|
|
135
|
+
set onplay(value: EventListener);
|
|
94
136
|
get onplay(): EventListener;
|
|
95
|
-
set onplaying(
|
|
137
|
+
set onplaying(value: EventListener);
|
|
96
138
|
get onplaying(): EventListener;
|
|
97
|
-
set onpause(
|
|
139
|
+
set onpause(value: EventListener);
|
|
98
140
|
get onpause(): EventListener;
|
|
99
|
-
set onstop(
|
|
141
|
+
set onstop(value: EventListener);
|
|
100
142
|
get onstop(): EventListener;
|
|
101
|
-
set onended(
|
|
143
|
+
set onended(value: EventListener);
|
|
102
144
|
get onended(): EventListener;
|
|
103
|
-
set ontimeupdate(
|
|
145
|
+
set ontimeupdate(value: EventListener);
|
|
104
146
|
get ontimeupdate(): EventListener;
|
|
105
|
-
set onloadedmetadata(
|
|
147
|
+
set onloadedmetadata(value: EventListener);
|
|
106
148
|
get onloadedmetadata(): EventListener;
|
|
107
|
-
set onfullscreenchange(
|
|
149
|
+
set onfullscreenchange(value: EventListener);
|
|
108
150
|
get onfullscreenchange(): EventListener;
|
|
109
|
-
set onwaiting(
|
|
151
|
+
set onwaiting(value: EventListener);
|
|
110
152
|
get onwaiting(): EventListener;
|
|
111
|
-
set onqualitychange(
|
|
153
|
+
set onqualitychange(value: EventListener);
|
|
112
154
|
get onqualitychange(): EventListener;
|
|
113
|
-
set onratechange(
|
|
155
|
+
set onratechange(value: EventListener);
|
|
114
156
|
get onratechange(): EventListener;
|
|
115
157
|
private ensurePlaceholderStyle;
|
|
116
158
|
private syncPosterPlaceholder;
|
|
117
|
-
private collectProps;
|
|
118
|
-
private shouldRefreshForAttribute;
|
|
119
|
-
private startAttrObserver;
|
|
120
|
-
private stopAttrObserver;
|
|
121
|
-
private measureForNative;
|
|
122
|
-
private mountOrUpdate;
|
|
123
|
-
private updatePosition;
|
|
124
|
-
/**
|
|
125
|
-
* Start tracking component size changes.
|
|
126
|
-
*/
|
|
127
|
-
private startTracking;
|
|
128
|
-
private stopTracking;
|
|
129
|
-
private startSizeObserver;
|
|
130
|
-
private stopSizeObserver;
|
|
131
|
-
private scheduleMountRetry;
|
|
132
|
-
private scheduleWindowsMountSettle;
|
|
133
|
-
private scheduleIOSBootstrapFrames;
|
|
134
|
-
private mountOrUpdateHarmony;
|
|
135
|
-
private ensureHarmonyEmbed;
|
|
136
|
-
private encodeHarmonyProps;
|
|
137
|
-
private pushHarmonyPropsUpdate;
|
|
138
|
-
private scheduleHarmonyPropsRetry;
|
|
139
159
|
}
|
|
140
160
|
export declare function registerVideoComponent(): void;
|
|
141
|
-
export {};
|