@nexxtmove/ui 1.54.0 → 2.0.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.
@@ -96,8 +96,8 @@ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorFontSizePro
96
96
  modelValue?: EditorFontSizeValue | null;
97
97
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
98
98
  "update:modelValue": (value: "text-xs" | "text-4xl" | "text-3xl" | "text-2xl" | "text-xl" | "text-lg" | "text-base" | "text-sm" | "text-5xl" | "text-6xl" | "text-7xl" | "text-8xl" | "text-9xl" | null) => any;
99
- reset: () => any;
100
99
  pointerup: (event: PointerEvent) => any;
100
+ reset: () => any;
101
101
  }, string, import('vue').PublicProps, Readonly<NexxtEditorFontSizeProps & {
102
102
  /**
103
103
  * The chosen size, as the Tailwind class to apply. `null` -- also what an unset model is -- is no
@@ -112,6 +112,6 @@ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorFontSizePro
112
112
  modelValue?: EditorFontSizeValue | null;
113
113
  }> & Readonly<{
114
114
  "onUpdate:modelValue"?: ((value: "text-xs" | "text-4xl" | "text-3xl" | "text-2xl" | "text-xl" | "text-lg" | "text-base" | "text-sm" | "text-5xl" | "text-6xl" | "text-7xl" | "text-8xl" | "text-9xl" | null) => any) | undefined;
115
- onReset?: (() => any) | undefined;
116
115
  onPointerup?: ((event: PointerEvent) => any) | undefined;
116
+ onReset?: (() => any) | undefined;
117
117
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -86,11 +86,11 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
86
86
  "onUpdate:search"?: ((value: string) => any) | undefined;
87
87
  }>, {
88
88
  width: number | string;
89
+ height: number | string;
89
90
  preview: boolean;
90
91
  collapsible: boolean;
91
92
  groups: NexxtPickerGroupData[];
92
93
  busy: boolean;
93
- height: number | string;
94
94
  searchable: boolean;
95
95
  hidePreviewBelow: number;
96
96
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * `full`: the bar; `toggle`: a round play/pause button in the corner, in the same style, with a
3
+ * mute button to its left on hover, focus or a tap.
4
+ */
5
+ export type NexxtVideoControlsVariant = 'full' | 'toggle';
6
+ /** Overridable copy. Every key is optional; the Dutch defaults are merged per key. */
7
+ export interface NexxtVideoControlsMessages {
8
+ /** Name of the bar; gets the video's name. Defaults to `'Videobediening: {name}'`, or `'Videobediening'` without one. */
9
+ group?: (name: string) => string;
10
+ /** Defaults to `'Afspelen'`. */
11
+ play?: string;
12
+ /** Defaults to `'Pauzeren'`. */
13
+ pause?: string;
14
+ /** The play button after the end. Defaults to `'Opnieuw afspelen'`. */
15
+ replay?: string;
16
+ /** Name of the timeline slider. Defaults to `'Tijdlijn'`. */
17
+ timeline?: string;
18
+ /** Spoken value of the timeline. Defaults to `'{current} van {duration}'`, e.g. `'0:12 van 0:42'`. */
19
+ timeValue?: (current: string, duration: string) => string;
20
+ /** Spoken value of the timeline before the duration is known. Defaults to `'Duur nog onbekend'`. */
21
+ durationUnknown?: string;
22
+ /** Defaults to `'Geluid uit'`. */
23
+ mute?: string;
24
+ /** Defaults to `'Geluid aan'`. */
25
+ unmute?: string;
26
+ /** Name of the volume slider. Defaults to `'Volume'`. */
27
+ volume?: string;
28
+ /** Spoken value of the volume slider. Defaults to `'{percent} procent'`. */
29
+ volumeValue?: (percent: number) => string;
30
+ /** Spoken value of the volume slider while muted. Defaults to `'Gedempt'`. */
31
+ muted?: string;
32
+ /** Defaults to `'Volledig scherm'`. */
33
+ enterFullscreen?: string;
34
+ /** Defaults to `'Volledig scherm sluiten'`. */
35
+ exitFullscreen?: string;
36
+ }
37
+ export interface NexxtVideoControlsProps {
38
+ /**
39
+ * The video to control. Its state is read from its media events and written to it directly,
40
+ * so a parent listening to the same video always agrees. The controls position themselves
41
+ * absolutely: the video's parent needs `position: relative`.
42
+ */
43
+ target: HTMLVideoElement | null;
44
+ /**
45
+ * What goes full screen: the video's root, so these controls come along. Without it there is
46
+ * no full-screen button. Where the root cannot go full screen (iPhone Safari) the video's own
47
+ * native player opens instead.
48
+ */
49
+ fullscreenTarget?: HTMLElement | null;
50
+ /**
51
+ * `full`: the bar; `toggle`: a 32px play/pause button in the corner, with mute to its left on
52
+ * hover, focus or a tap. Both hide while playing by the same rules. Defaults to `full`.
53
+ */
54
+ variant?: NexxtVideoControlsVariant;
55
+ /** The video's name, for the name of the bar (or of the toggle's buttons). */
56
+ name?: string;
57
+ /** Hide the bar (or the toggle) after inactivity while the video plays. Off keeps it on show. Defaults to `true`. */
58
+ autoHide?: boolean;
59
+ /** Inactivity before the bar hides, in milliseconds. Defaults to `2500`. */
60
+ hideDelay?: number;
61
+ /** Copy of the buttons and sliders. Defaults are Dutch and are merged per key. */
62
+ messages?: NexxtVideoControlsMessages;
63
+ }
64
+ declare const _default: typeof __VLS_export;
65
+ export default _default;
66
+ declare const __VLS_export: import('vue').DefineComponent<NexxtVideoControlsProps, {
67
+ focus: (options?: FocusOptions & {
68
+ focusVisible?: boolean;
69
+ }) => void;
70
+ show: () => void;
71
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
72
+ "visibility-change": (visible: boolean) => any;
73
+ "fullscreen-change": (fullscreen: boolean) => any;
74
+ }, string, import('vue').PublicProps, Readonly<NexxtVideoControlsProps> & Readonly<{
75
+ "onVisibility-change"?: ((visible: boolean) => any) | undefined;
76
+ "onFullscreen-change"?: ((fullscreen: boolean) => any) | undefined;
77
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,24 +1,43 @@
1
- type __VLS_Props = {
1
+ import { NexxtVideoControlsMessages } from '../VideoControls/VideoControls.vue';
2
+ /**
3
+ * `full`: the NexxtVideoControls bar; `toggle`: only its round play/pause button;
4
+ * `none`: nothing visible, and a click on the video is left to the parent.
5
+ */
6
+ export type NexxtVideoPlayerControls = 'full' | 'toggle' | 'none';
7
+ /**
8
+ * Overridable copy: the player's own keys plus every key of NexxtVideoControlsMessages, which
9
+ * are passed on to the controls. Every key is optional; the Dutch defaults are merged per key.
10
+ */
11
+ export interface NexxtVideoPlayerMessages extends NexxtVideoControlsMessages {
12
+ /** Shown when the video cannot be loaded. Defaults to `'De video kan niet worden geladen'`. */
13
+ error?: string;
14
+ /** Accessible name of the video when no `name` is given. Defaults to `'Video'`. */
15
+ video?: string;
16
+ }
17
+ export interface NexxtVideoPlayerProps {
18
+ /** URL of the video. */
2
19
  src: string;
20
+ /**
21
+ * Image shown before the video plays. With a poster nothing is preloaded (`preload="none"`);
22
+ * without one only the metadata is, so the first frame and the duration are there.
23
+ */
24
+ poster?: string;
25
+ /** The video's name: its accessible name and the name of the controls. */
26
+ name?: string;
27
+ /** Start playing on mount. Browsers only allow that without sound, so pair it with `muted`. */
3
28
  autoplay?: boolean;
29
+ /** Start without sound. Applied before an autoplay starts. */
4
30
  muted?: boolean;
5
- showControls?: boolean;
31
+ /** Start again at the end. */
6
32
  loop?: boolean;
7
- labels?: {
8
- error?: string;
9
- play?: string;
10
- pause?: string;
11
- mute?: string;
12
- unmute?: string;
13
- enterFullscreen?: string;
14
- exitFullscreen?: string;
15
- seek?: string;
16
- video?: string;
17
- };
18
- };
19
- declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
20
- playing: import('vue').ShallowRef<boolean>;
21
- muted: import('vue').ShallowRef<boolean>;
22
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
+ /** Which controls to show. Defaults to `full`. */
34
+ controls?: NexxtVideoPlayerControls;
35
+ /** Copy of the player and its controls. Defaults are Dutch and are merged per key. */
36
+ messages?: NexxtVideoPlayerMessages;
37
+ }
23
38
  declare const _default: typeof __VLS_export;
24
39
  export default _default;
40
+ declare const __VLS_export: import('vue').DefineComponent<NexxtVideoPlayerProps, {
41
+ playing: import('vue').WritableComputedRef<boolean, boolean>;
42
+ muted: import('vue').WritableComputedRef<boolean, boolean>;
43
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NexxtVideoPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export type { EnergyLabelLetter } from './components/atoms/EnergyLabel/EnergyLab
6
6
  export type { IconType, NexxtIconName } from './components/atoms/Icon/Icon.vue';
7
7
  export type { CustomIconName } from './components/atoms/Icon/customIcons';
8
8
  export type { NexxtTabItem } from './components/molecules/Tabs/Tabs.vue';
9
+ export type { NexxtVideoControlsMessages, NexxtVideoControlsProps, NexxtVideoControlsVariant, } from './components/organisms/VideoControls/VideoControls.vue';
10
+ export type { NexxtVideoPlayerControls, NexxtVideoPlayerMessages, NexxtVideoPlayerProps, } from './components/organisms/VideoPlayer/VideoPlayer.vue';
9
11
  export type { NexxtComboboxGroup } from './components/organisms/ComboboxPanel/combobox-types';
10
12
  export type { NexxtPageCardProps, NexxtPageCardSlots, } from './components/molecules/PageCard/PageCard.vue';
11
13
  export type { NexxtPageMockupType } from './components/molecules/PageMockup/PageMockup.vue';
@@ -162,4 +164,5 @@ export { default as NexxtToaster } from './components/organisms/Toaster/Toaster.
162
164
  export { default as NexxtToggleGroup } from './components/molecules/ToggleGroup/ToggleGroup.vue';
163
165
  export { default as NexxtTooltip } from './components/atoms/Tooltip/Tooltip.vue';
164
166
  export { default as NexxtTree } from './components/molecules/Tree/Tree.vue';
167
+ export { default as NexxtVideoControls } from './components/organisms/VideoControls/VideoControls.vue';
165
168
  export { default as NexxtVideoPlayer } from './components/organisms/VideoPlayer/VideoPlayer.vue';