@gradial/aci 0.1.22 → 0.1.24
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/bin/aci-darwin-arm64 +0 -0
- package/dist/content/assets.js +1 -1
- package/dist/dev/content-watch.js +1 -1
- package/dist/next/asset-route.d.ts +0 -1
- package/dist/next/asset-route.js +5 -6
- package/dist/next/config.js +25 -1
- package/dist/next/content-watch.js +1 -2
- package/dist/next/middleware.d.ts +2 -2
- package/dist/next/middleware.js +42 -25
- package/dist/next/page.d.ts +6 -0
- package/dist/next/page.js +34 -4
- package/dist/next/preview-mode.js +6 -7
- package/dist/next/server.js +4 -20
- package/dist/preview/core.d.ts +0 -2
- package/dist/preview/core.js +1 -3
- package/dist/react/Media.d.ts +1 -1
- package/dist/react/Media.js +1 -1
- package/dist/react/VideoPlayer.d.ts +307 -6
- package/dist/react/VideoPlayer.js +19 -5
- package/dist/react/index.d.ts +1 -1
- package/dist/types/image.d.ts +2 -2
- package/dist/types/media.d.ts +3 -0
- package/dist/types/video.d.ts +14 -8
- package/dist/types/video.js +3 -0
- package/package.json +2 -3
- package/src/cli/compile-registry.mjs +68 -43
- package/src/cli/verify-next-cdn-routes.mjs +101 -0
- package/src/types/component.ts +55 -0
- package/src/types/config.ts +37 -0
- package/src/types/data.ts +47 -0
- package/src/types/image.ts +4 -3
- package/src/types/index.ts +11 -0
- package/src/types/layout.ts +29 -0
- package/src/types/link.ts +100 -0
- package/src/types/media.ts +34 -0
- package/src/types/page.ts +47 -0
- package/src/types/render-mode.ts +10 -0
- package/src/types/renderer.ts +83 -0
- package/src/types/rich-text.ts +64 -0
- package/src/types/video.ts +76 -0
- package/templates/astro/template/package.json.tmpl +4 -5
- package/templates/nextjs/template/package.json.tmpl +4 -5
- package/templates/nextjs/template/src/app/gradial/assets/[...path]/route.ts +4 -0
- package/templates/nextjs/template/src/app/gradial/assets/[releaseId]/[...path]/route.ts +0 -31
|
@@ -1,13 +1,314 @@
|
|
|
1
|
-
import { type VideoHTMLAttributes } from 'react';
|
|
1
|
+
import { type VideoHTMLAttributes, type IframeHTMLAttributes } from 'react';
|
|
2
2
|
import type { Video } from '../types/video.js';
|
|
3
3
|
export interface VideoPlayerProps extends Omit<VideoHTMLAttributes<HTMLVideoElement>, 'src' | 'poster' | 'width' | 'height'> {
|
|
4
4
|
video: Video;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Renders a Video as a <video> element.
|
|
7
|
+
* Renders a Video as a <video> or <iframe> element.
|
|
8
8
|
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* - Uses the src attribute on <video> when no source variants exist.
|
|
9
|
+
* - Video files (type: video/mp4, etc.) → <video> with poster, sources
|
|
10
|
+
* - External embeds (type: text/html, e.g. YouTube) → <iframe>
|
|
12
11
|
*/
|
|
13
|
-
export declare function VideoPlayer({ video, ...attrs }: VideoPlayerProps): import("react").DetailedReactHTMLElement<
|
|
12
|
+
export declare function VideoPlayer({ video, ...attrs }: VideoPlayerProps): import("react").DetailedReactHTMLElement<{
|
|
13
|
+
prefix?: string | undefined | undefined;
|
|
14
|
+
id?: string | undefined | undefined;
|
|
15
|
+
title: string;
|
|
16
|
+
rel?: string | undefined | undefined;
|
|
17
|
+
content?: string | undefined | undefined;
|
|
18
|
+
dir?: string | undefined | undefined;
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
className?: string | undefined | undefined;
|
|
21
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
22
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
23
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
24
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
25
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
26
|
+
accessKey?: string | undefined | undefined;
|
|
27
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
28
|
+
autoFocus?: boolean | undefined | undefined;
|
|
29
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
30
|
+
contextMenu?: string | undefined | undefined;
|
|
31
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
32
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
33
|
+
hidden?: boolean | undefined | undefined;
|
|
34
|
+
lang?: string | undefined | undefined;
|
|
35
|
+
nonce?: string | undefined | undefined;
|
|
36
|
+
slot?: string | undefined | undefined;
|
|
37
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
38
|
+
style?: import("react").CSSProperties | undefined;
|
|
39
|
+
tabIndex?: number | undefined | undefined;
|
|
40
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
41
|
+
radioGroup?: string | undefined | undefined;
|
|
42
|
+
role?: import("react").AriaRole | undefined;
|
|
43
|
+
about?: string | undefined | undefined;
|
|
44
|
+
datatype?: string | undefined | undefined;
|
|
45
|
+
inlist?: any;
|
|
46
|
+
property?: string | undefined | undefined;
|
|
47
|
+
resource?: string | undefined | undefined;
|
|
48
|
+
rev?: string | undefined | undefined;
|
|
49
|
+
typeof?: string | undefined | undefined;
|
|
50
|
+
vocab?: string | undefined | undefined;
|
|
51
|
+
autoCorrect?: string | undefined | undefined;
|
|
52
|
+
autoSave?: string | undefined | undefined;
|
|
53
|
+
color?: string | undefined | undefined;
|
|
54
|
+
itemProp?: string | undefined | undefined;
|
|
55
|
+
itemScope?: boolean | undefined | undefined;
|
|
56
|
+
itemType?: string | undefined | undefined;
|
|
57
|
+
itemID?: string | undefined | undefined;
|
|
58
|
+
itemRef?: string | undefined | undefined;
|
|
59
|
+
results?: number | undefined | undefined;
|
|
60
|
+
security?: string | undefined | undefined;
|
|
61
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
62
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
63
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
64
|
+
popoverTarget?: string | undefined | undefined;
|
|
65
|
+
inert?: boolean | undefined | undefined;
|
|
66
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
67
|
+
is?: string | undefined | undefined;
|
|
68
|
+
exportparts?: string | undefined | undefined;
|
|
69
|
+
part?: string | undefined | undefined;
|
|
70
|
+
tw?: string | undefined;
|
|
71
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
72
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
73
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
74
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
75
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
76
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
77
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
78
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
79
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
80
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
81
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
82
|
+
"aria-controls"?: string | undefined | undefined;
|
|
83
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
84
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
85
|
+
"aria-description"?: string | undefined | undefined;
|
|
86
|
+
"aria-details"?: string | undefined | undefined;
|
|
87
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
89
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
90
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
91
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
92
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
93
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
94
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
95
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
96
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
97
|
+
"aria-label"?: string | undefined | undefined;
|
|
98
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
99
|
+
"aria-level"?: number | undefined | undefined;
|
|
100
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
101
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
102
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
103
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
104
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
105
|
+
"aria-owns"?: string | undefined | undefined;
|
|
106
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
107
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
108
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
109
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
110
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
111
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
112
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
113
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
114
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
115
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
116
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
117
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
118
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
119
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
120
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
121
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
122
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
123
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
124
|
+
dangerouslySetInnerHTML?: {
|
|
125
|
+
__html: string | TrustedHTML;
|
|
126
|
+
} | undefined | undefined;
|
|
127
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
128
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
129
|
+
onCut?: import("react").ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
130
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
131
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
132
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
133
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
134
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
135
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
136
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
137
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
138
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
139
|
+
onFocus?: import("react").FocusEventHandler<HTMLVideoElement> | undefined;
|
|
140
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLVideoElement> | undefined;
|
|
141
|
+
onBlur?: import("react").FocusEventHandler<HTMLVideoElement> | undefined;
|
|
142
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLVideoElement> | undefined;
|
|
143
|
+
onChange?: import("react").ChangeEventHandler<HTMLVideoElement, Element> | undefined;
|
|
144
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLVideoElement, Element> | undefined;
|
|
145
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLVideoElement> | undefined;
|
|
146
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLVideoElement> | undefined;
|
|
147
|
+
onInput?: import("react").InputEventHandler<HTMLVideoElement> | undefined;
|
|
148
|
+
onInputCapture?: import("react").InputEventHandler<HTMLVideoElement> | undefined;
|
|
149
|
+
onReset?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
150
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
151
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLVideoElement> | undefined;
|
|
152
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLVideoElement> | undefined;
|
|
153
|
+
onInvalid?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
154
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
155
|
+
onLoad?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
156
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
157
|
+
onError?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
158
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
159
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
160
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
161
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
162
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
163
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
164
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
165
|
+
onAbort?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
166
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
167
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
168
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
169
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
170
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
171
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
172
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
173
|
+
onEmptied?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
174
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
175
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
176
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
177
|
+
onEnded?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
178
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
179
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
180
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
181
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
182
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
183
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
184
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
185
|
+
onPause?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
186
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
187
|
+
onPlay?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
188
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
189
|
+
onPlaying?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
190
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
191
|
+
onProgress?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
192
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
193
|
+
onRateChange?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
194
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
195
|
+
onSeeked?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
196
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
197
|
+
onSeeking?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
198
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
199
|
+
onStalled?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
200
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
201
|
+
onSuspend?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
202
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
203
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
204
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
205
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
206
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
207
|
+
onWaiting?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
208
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
209
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
210
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
211
|
+
onClick?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
212
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
213
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
214
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
215
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
216
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
217
|
+
onDrag?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
218
|
+
onDragCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
219
|
+
onDragEnd?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
220
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
221
|
+
onDragEnter?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
222
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
223
|
+
onDragExit?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
224
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
225
|
+
onDragLeave?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
226
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
227
|
+
onDragOver?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
228
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
229
|
+
onDragStart?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
230
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
231
|
+
onDrop?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
232
|
+
onDropCapture?: import("react").DragEventHandler<HTMLVideoElement> | undefined;
|
|
233
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
234
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
235
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
236
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
237
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
238
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
239
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
240
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
241
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
242
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
243
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
244
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLVideoElement> | undefined;
|
|
245
|
+
onSelect?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
246
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
247
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
248
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
249
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
250
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
251
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
252
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
253
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
254
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLVideoElement> | undefined;
|
|
255
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
256
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
257
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
258
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
259
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
260
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
261
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
262
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
263
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
264
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
265
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
266
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
267
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
268
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
269
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
270
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
271
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
272
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLVideoElement> | undefined;
|
|
273
|
+
onScroll?: import("react").UIEventHandler<HTMLVideoElement> | undefined;
|
|
274
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLVideoElement> | undefined;
|
|
275
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLVideoElement> | undefined;
|
|
276
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLVideoElement> | undefined;
|
|
277
|
+
onWheel?: import("react").WheelEventHandler<HTMLVideoElement> | undefined;
|
|
278
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLVideoElement> | undefined;
|
|
279
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
280
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
281
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
282
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
283
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
284
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
285
|
+
onToggle?: import("react").ToggleEventHandler<HTMLVideoElement> | undefined;
|
|
286
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLVideoElement> | undefined;
|
|
287
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
288
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
289
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
290
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
291
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
292
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
293
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
294
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
295
|
+
playsInline?: boolean | undefined | undefined;
|
|
296
|
+
disablePictureInPicture?: boolean | undefined | undefined;
|
|
297
|
+
disableRemotePlayback?: boolean | undefined | undefined;
|
|
298
|
+
onResize?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
299
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLVideoElement> | undefined;
|
|
300
|
+
autoPlay?: boolean | undefined | undefined;
|
|
301
|
+
controls?: boolean | undefined | undefined;
|
|
302
|
+
controlsList?: string | undefined | undefined;
|
|
303
|
+
loop?: boolean | undefined | undefined;
|
|
304
|
+
mediaGroup?: string | undefined | undefined;
|
|
305
|
+
muted?: boolean | undefined | undefined;
|
|
306
|
+
preload?: string | undefined | undefined;
|
|
307
|
+
src: string;
|
|
308
|
+
allow: string | undefined;
|
|
309
|
+
allowFullScreen: boolean | undefined;
|
|
310
|
+
referrerPolicy: IframeHTMLAttributes<HTMLIFrameElement>["referrerPolicy"];
|
|
311
|
+
width: number | undefined;
|
|
312
|
+
height: number | undefined;
|
|
313
|
+
loading: string;
|
|
314
|
+
}, HTMLElement> | import("react").DetailedReactHTMLElement<Record<string, unknown>, HTMLElement>;
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
import { primaryImageSource } from '../types/image.js';
|
|
3
|
+
function isEmbed(video) {
|
|
4
|
+
return video.type === 'text/html';
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
|
-
* Renders a Video as a <video> element.
|
|
7
|
+
* Renders a Video as a <video> or <iframe> element.
|
|
5
8
|
*
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* - Uses the src attribute on <video> when no source variants exist.
|
|
9
|
+
* - Video files (type: video/mp4, etc.) → <video> with poster, sources
|
|
10
|
+
* - External embeds (type: text/html, e.g. YouTube) → <iframe>
|
|
9
11
|
*/
|
|
10
12
|
export function VideoPlayer({ video, ...attrs }) {
|
|
13
|
+
if (isEmbed(video)) {
|
|
14
|
+
return createElement('iframe', {
|
|
15
|
+
src: video.src,
|
|
16
|
+
title: video.alt,
|
|
17
|
+
allow: video.allow,
|
|
18
|
+
allowFullScreen: video.allowFullScreen,
|
|
19
|
+
referrerPolicy: video.referrerPolicy,
|
|
20
|
+
width: video.width > 0 ? video.width : undefined,
|
|
21
|
+
height: video.height > 0 ? video.height : undefined,
|
|
22
|
+
loading: 'lazy',
|
|
23
|
+
...attrs,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
11
26
|
const posterSrc = video.poster ? primaryImageSource(video.poster).src : undefined;
|
|
12
27
|
const hasSources = video.sources && video.sources.length > 0;
|
|
13
28
|
const videoAttrs = {
|
|
@@ -16,7 +31,6 @@ export function VideoPlayer({ video, ...attrs }) {
|
|
|
16
31
|
height: video.height > 0 ? video.height : undefined,
|
|
17
32
|
...attrs,
|
|
18
33
|
};
|
|
19
|
-
// If no format variants, put src directly on <video>
|
|
20
34
|
if (!hasSources) {
|
|
21
35
|
videoAttrs.src = video.src;
|
|
22
36
|
}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -23,12 +23,12 @@ export declare function Image({ image, value, ...attrs }: ImageProps): import("r
|
|
|
23
23
|
title?: string | undefined | undefined;
|
|
24
24
|
rel?: string | undefined | undefined;
|
|
25
25
|
content?: string | undefined | undefined;
|
|
26
|
+
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
26
27
|
dir?: string | undefined | undefined;
|
|
27
28
|
children?: ReactNode;
|
|
28
29
|
className?: string | undefined | undefined;
|
|
29
30
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
30
31
|
fetchPriority?: "high" | "low" | "auto" | undefined | undefined;
|
|
31
|
-
referrerPolicy?: import("react").HTMLAttributeReferrerPolicy | undefined;
|
|
32
32
|
useMap?: string | undefined | undefined;
|
|
33
33
|
defaultChecked?: boolean | undefined | undefined;
|
|
34
34
|
defaultValue?: string | number | readonly string[] | undefined;
|
package/dist/types/image.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export interface ImageSource {
|
|
|
12
12
|
export interface Image {
|
|
13
13
|
/** Discriminator — always 'gradial.image'. */
|
|
14
14
|
$type: 'gradial.image';
|
|
15
|
-
/** DAM asset identifier. */
|
|
15
|
+
/** DAM asset identifier (or "static:<path>" for non-DAM assets). */
|
|
16
16
|
assetId: string;
|
|
17
|
-
/** DAM version identifier. */
|
|
17
|
+
/** DAM version identifier (or "static" for non-DAM assets). */
|
|
18
18
|
versionId: string;
|
|
19
19
|
/** Accessible description of the image content. */
|
|
20
20
|
alt: string;
|
package/dist/types/media.d.ts
CHANGED
|
@@ -41,6 +41,9 @@ export declare const AssetSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
41
41
|
type: z.ZodString;
|
|
42
42
|
}, z.core.$strip>>>;
|
|
43
43
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
45
|
+
referrerPolicy: z.ZodOptional<z.ZodString>;
|
|
46
|
+
allowFullScreen: z.ZodOptional<z.ZodBoolean>;
|
|
44
47
|
}, z.core.$strip>]>;
|
|
45
48
|
/** Runtime guard: value is a resolved asset. */
|
|
46
49
|
export declare function isAsset(value: unknown): value is Asset;
|
package/dist/types/video.d.ts
CHANGED
|
@@ -7,29 +7,32 @@ export interface VideoSource {
|
|
|
7
7
|
export interface Video {
|
|
8
8
|
/** Discriminator — always 'gradial.video'. */
|
|
9
9
|
$type: 'gradial.video';
|
|
10
|
-
/** DAM asset identifier. */
|
|
10
|
+
/** DAM asset identifier (or "static:<path>" for non-DAM assets). */
|
|
11
11
|
assetId: string;
|
|
12
|
-
/** DAM version identifier. */
|
|
12
|
+
/** DAM version identifier (or "static" for non-DAM assets). */
|
|
13
13
|
versionId: string;
|
|
14
14
|
/** Accessible description of the video content. */
|
|
15
15
|
alt: string;
|
|
16
|
-
/** Primary video URL (compiler-resolved). */
|
|
16
|
+
/** Primary video URL (compiler-resolved). For embeds, this is the iframe URL. */
|
|
17
17
|
src: string;
|
|
18
|
-
/**
|
|
18
|
+
/** MIME type (e.g. 'video/mp4'). 'text/html' for external embeds (YouTube, Vimeo). */
|
|
19
19
|
type: string;
|
|
20
20
|
/** Intrinsic width in pixels. */
|
|
21
21
|
width: number;
|
|
22
22
|
/** Intrinsic height in pixels. */
|
|
23
23
|
height: number;
|
|
24
|
-
/**
|
|
25
|
-
* Poster frame — a full Image with responsive srcset.
|
|
26
|
-
* The compiler extracts or generates this from the video asset.
|
|
27
|
-
*/
|
|
24
|
+
/** Poster frame — a full Image with responsive srcset. */
|
|
28
25
|
poster?: Image;
|
|
29
26
|
/** Format variants (e.g. mp4 + webm). Maps to <video><source> elements. */
|
|
30
27
|
sources?: VideoSource[];
|
|
31
28
|
/** Duration in seconds (if known). */
|
|
32
29
|
duration?: number;
|
|
30
|
+
/** iframe allow attribute (for embeds only). */
|
|
31
|
+
allow?: string;
|
|
32
|
+
/** iframe referrerPolicy (for embeds only). */
|
|
33
|
+
referrerPolicy?: string;
|
|
34
|
+
/** iframe allowFullScreen (for embeds only). */
|
|
35
|
+
allowFullScreen?: boolean;
|
|
33
36
|
}
|
|
34
37
|
export declare const VideoSourceSchema: z.ZodObject<{
|
|
35
38
|
src: z.ZodString;
|
|
@@ -61,4 +64,7 @@ export declare const VideoSchema: z.ZodObject<{
|
|
|
61
64
|
type: z.ZodString;
|
|
62
65
|
}, z.core.$strip>>>;
|
|
63
66
|
duration: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
allow: z.ZodOptional<z.ZodString>;
|
|
68
|
+
referrerPolicy: z.ZodOptional<z.ZodString>;
|
|
69
|
+
allowFullScreen: z.ZodOptional<z.ZodBoolean>;
|
|
64
70
|
}, z.core.$strip>;
|
package/dist/types/video.js
CHANGED
|
@@ -19,4 +19,7 @@ export const VideoSchema = z.object({
|
|
|
19
19
|
poster: ImageSchema.optional(),
|
|
20
20
|
sources: z.array(VideoSourceSchema).optional(),
|
|
21
21
|
duration: z.number().nonnegative().optional(),
|
|
22
|
+
allow: z.string().optional(),
|
|
23
|
+
referrerPolicy: z.string().optional(),
|
|
24
|
+
allowFullScreen: z.boolean().optional(),
|
|
22
25
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradial/aci",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"bin/aci.js",
|
|
10
10
|
"bin/aci-*",
|
|
11
11
|
"src/cli/*.mjs",
|
|
12
|
-
"src/types
|
|
13
|
-
"src/types/block-ref.ts",
|
|
12
|
+
"src/types/*.ts",
|
|
14
13
|
"templates/common",
|
|
15
14
|
"templates/nextjs",
|
|
16
15
|
"templates/astro",
|