@m3ui-vue/m3ui-vue 1.2.2 → 1.3.1
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/API.md +3010 -376
- package/dist/MButton-Bl_BSUep.js +172 -0
- package/dist/MButton-Bl_BSUep.js.map +1 -0
- package/dist/MDialog-D_Yik8ou.js +173 -0
- package/dist/MDialog-D_Yik8ou.js.map +1 -0
- package/dist/MIconButton-DoNotQ9v.js +282 -0
- package/dist/MIconButton-DoNotQ9v.js.map +1 -0
- package/dist/MListItem-BxifHJdU.js +824 -0
- package/dist/MListItem-BxifHJdU.js.map +1 -0
- package/dist/MLoadingIndicator-BxbFhSX6.js +115 -0
- package/dist/MLoadingIndicator-BxbFhSX6.js.map +1 -0
- package/dist/MMenuItem-Bih0h4-n.js +604 -0
- package/dist/MMenuItem-Bih0h4-n.js.map +1 -0
- package/dist/MProgressBar-BCoruxA-.js +184 -0
- package/dist/MProgressBar-BCoruxA-.js.map +1 -0
- package/dist/MSeekBar-BeN9QcB3.js +435 -0
- package/dist/MSeekBar-BeN9QcB3.js.map +1 -0
- package/dist/MSegmentedButton-DL9JtJFX.js +65 -0
- package/dist/MSegmentedButton-DL9JtJFX.js.map +1 -0
- package/dist/MSlider-BVSbJlGS.js +691 -0
- package/dist/MSlider-BVSbJlGS.js.map +1 -0
- package/dist/MSpinner-C2SUnWk4.js +65 -0
- package/dist/MSpinner-C2SUnWk4.js.map +1 -0
- package/dist/MTextField-CEkWSZ2v.js +296 -0
- package/dist/MTextField-CEkWSZ2v.js.map +1 -0
- package/dist/MTooltip-CodJGEO-.js +756 -0
- package/dist/MTooltip-CodJGEO-.js.map +1 -0
- package/dist/_storageKeys-CYXsUBwK.js +18 -0
- package/dist/_storageKeys-CYXsUBwK.js.map +1 -0
- package/dist/_useEscapeStack-CjndQhqg.js +19 -0
- package/dist/_useEscapeStack-CjndQhqg.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/chart.js +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +115 -0
- package/dist/components/MBadge.vue.d.ts +1 -1
- package/dist/components/MBottomSheetScaffold.vue.d.ts +1 -1
- package/dist/components/MBox.vue.d.ts +1 -1
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MConfirmDialog.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MDataTable.vue.d.ts +2 -2
- package/dist/components/MDialog.vue.d.ts +2 -2
- package/dist/components/MDivider.vue.d.ts +1 -1
- package/dist/components/MDragHandle.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +150 -0
- package/dist/components/MDrawLayers.vue.d.ts +3 -0
- package/dist/components/MDrawToolbar.vue.d.ts +34 -0
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +2 -2
- package/dist/components/MFabMenu.vue.d.ts +2 -2
- package/dist/components/MFixed.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +248 -0
- package/dist/components/MFloorPlanInspector.vue.d.ts +56 -0
- package/dist/components/MFloorPlanToolbar.vue.d.ts +51 -0
- package/dist/components/MFlow.vue.d.ts +318 -0
- package/dist/components/MFlowControls.vue.d.ts +33 -0
- package/dist/components/MFlowHandle.vue.d.ts +16 -0
- package/dist/components/MFlowMinimap.vue.d.ts +22 -0
- package/dist/components/MFlowNode.vue.d.ts +35 -0
- package/dist/components/MGantt.vue.d.ts +141 -0
- package/dist/components/MGanttControls.vue.d.ts +32 -0
- package/dist/components/MIconButton.vue.d.ts +3 -1
- package/dist/components/MImageCropper.vue.d.ts +110 -0
- package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MList.vue.d.ts +1 -1
- package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
- package/dist/components/MMapControl.vue.d.ts +1 -1
- package/dist/components/MMapSearch.vue.d.ts +1 -1
- package/dist/components/MMaskField.vue.d.ts +12 -1
- package/dist/components/MMenu.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +11 -2
- package/dist/components/MPdfViewer.vue.d.ts +174 -0
- package/dist/components/MPullToRefresh.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +149 -0
- package/dist/components/MScheduler.vue.d.ts +3 -3
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +1 -1
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSlider.vue.d.ts +2 -2
- package/dist/components/MSparkline.vue.d.ts +1 -1
- package/dist/components/MSplitter.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTable.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +12 -1
- package/dist/components/MTextField.vue.d.ts +13 -2
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTree.vue.d.ts +2 -2
- package/dist/components/MVideoPlayer.vue.d.ts +253 -0
- package/dist/components/MVirtualTable.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MFlowEdge.vue.d.ts +9 -0
- package/dist/components/_MFlowEdgeLabel.vue.d.ts +9 -0
- package/dist/components/_MFlowNodeShell.vue.d.ts +9 -0
- package/dist/components/_MPdfPage.vue.d.ts +76 -0
- package/dist/components/_MTimeBackground.vue.d.ts +14 -0
- package/dist/components/_MTimeHeader.vue.d.ts +20 -0
- package/dist/composables/_flowPanel.d.ts +2 -0
- package/dist/composables/_flowSlot.d.ts +5 -0
- package/dist/composables/_ganttTime.d.ts +41 -0
- package/dist/composables/_useTimeAxis.d.ts +90 -0
- package/dist/composables/drawGeometry.d.ts +119 -0
- package/dist/composables/flowFormats.d.ts +79 -0
- package/dist/composables/flowLayout.d.ts +45 -0
- package/dist/composables/flowPaths.d.ts +53 -0
- package/dist/composables/ganttFormats.d.ts +52 -0
- package/dist/composables/ganttSchedule.d.ts +99 -0
- package/dist/composables/useDrawing.d.ts +44 -0
- package/dist/composables/useFloorPlan.d.ts +58 -0
- package/dist/composables/useFlow.d.ts +266 -0
- package/dist/composables/useGantt.d.ts +87 -0
- package/dist/composables/useLocale.d.ts +204 -0
- package/dist/composables/useMediaPlayer.d.ts +101 -0
- package/dist/composables/usePdf.d.ts +119 -0
- package/dist/composables/useResourceTimeline.d.ts +70 -0
- package/dist/draw.d.ts +7 -0
- package/dist/draw.js +1702 -0
- package/dist/draw.js.map +1 -0
- package/dist/flow.d.ts +14 -0
- package/dist/flow.js +3547 -0
- package/dist/flow.js.map +1 -0
- package/dist/flowPaths-CUc6X373.js +161 -0
- package/dist/flowPaths-CUc6X373.js.map +1 -0
- package/dist/gantt.d.ts +12 -0
- package/dist/gantt.js +3575 -0
- package/dist/gantt.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/locales/index.js +1435 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +8248 -7637
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +113 -108
- package/dist/map.js.map +1 -1
- package/dist/media.d.ts +5 -0
- package/dist/media.js +1311 -0
- package/dist/media.js.map +1 -0
- package/dist/pdf.d.ts +4 -0
- package/dist/pdf.js +1871 -0
- package/dist/pdf.js.map +1 -0
- package/dist/rich-text-editor.js +28 -26
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useLocale-JYxDDeXC.js → useLocale-CaWwi-b6.js} +206 -2
- package/dist/useLocale-CaWwi-b6.js.map +1 -0
- package/dist/{useThemeTokens-y0HZpyhL.js → useThemeTokens-DQQcaWbE.js} +40 -54
- package/dist/useThemeTokens-DQQcaWbE.js.map +1 -0
- package/package.json +29 -5
- package/src/__tests__/MAudioPlayer.test.ts +75 -0
- package/src/__tests__/MDrawCanvas.test.ts +118 -0
- package/src/__tests__/MFloorPlan.test.ts +299 -0
- package/src/__tests__/MFlow.test.ts +590 -0
- package/src/__tests__/MGantt.test.ts +130 -0
- package/src/__tests__/MImageCropper.test.ts +89 -0
- package/src/__tests__/MPdfViewer.test.ts +235 -0
- package/src/__tests__/MResourceTimeline.test.ts +102 -0
- package/src/__tests__/MVideoPlayer.test.ts +201 -0
- package/src/__tests__/drawGeometry.test.ts +58 -0
- package/src/__tests__/fieldExpose.test.ts +30 -0
- package/src/__tests__/flowFormats.test.ts +185 -0
- package/src/__tests__/flowLayout.test.ts +113 -0
- package/src/__tests__/ganttFormats.test.ts +76 -0
- package/src/__tests__/ganttSchedule.test.ts +136 -0
- package/src/__tests__/pdfMock.ts +83 -0
- package/src/__tests__/useMediaPlayer.test.ts +182 -0
- package/src/__tests__/usePdf.test.ts +102 -0
- package/src/components/MAudioPlayer.vue +319 -0
- package/src/components/MDrawCanvas.vue +819 -0
- package/src/components/MDrawLayers.vue +114 -0
- package/src/components/MDrawToolbar.vue +171 -0
- package/src/components/MFloorPlan.vue +1080 -0
- package/src/components/MFloorPlanInspector.vue +169 -0
- package/src/components/MFloorPlanToolbar.vue +128 -0
- package/src/components/MFlow.vue +2060 -0
- package/src/components/MFlowControls.vue +110 -0
- package/src/components/MFlowHandle.vue +60 -0
- package/src/components/MFlowMinimap.vue +134 -0
- package/src/components/MFlowNode.vue +98 -0
- package/src/components/MGantt.vue +1609 -0
- package/src/components/MGanttControls.vue +77 -0
- package/src/components/MIconButton.vue +3 -1
- package/src/components/MImageCropper.vue +507 -0
- package/src/components/MMaskField.vue +13 -0
- package/src/components/MNumberField.vue +13 -0
- package/src/components/MPdfViewer.vue +1270 -0
- package/src/components/MResourceTimeline.vue +1020 -0
- package/src/components/MTagInput.vue +13 -0
- package/src/components/MTextField.vue +16 -0
- package/src/components/MVideoPlayer.vue +839 -0
- package/src/components/_MFlowEdge.vue +100 -0
- package/src/components/_MFlowEdgeLabel.vue +56 -0
- package/src/components/_MFlowNodeShell.vue +111 -0
- package/src/components/_MPdfPage.vue +456 -0
- package/src/components/_MTimeBackground.vue +16 -0
- package/src/components/_MTimeHeader.vue +31 -0
- package/src/composables/_flowPanel.ts +13 -0
- package/src/composables/_flowSlot.ts +6 -0
- package/src/composables/_ganttTime.ts +200 -0
- package/src/composables/_useTimeAxis.ts +224 -0
- package/src/composables/drawGeometry.ts +405 -0
- package/src/composables/flowFormats.ts +916 -0
- package/src/composables/flowLayout.ts +297 -0
- package/src/composables/flowPaths.ts +239 -0
- package/src/composables/ganttFormats.ts +366 -0
- package/src/composables/ganttSchedule.ts +403 -0
- package/src/composables/useDrawing.ts +53 -0
- package/src/composables/useFloorPlan.ts +73 -0
- package/src/composables/useFlow.ts +250 -0
- package/src/composables/useGantt.ts +92 -0
- package/src/composables/useLocale.ts +410 -0
- package/src/composables/useMediaPlayer.ts +406 -0
- package/src/composables/usePdf.ts +456 -0
- package/src/composables/useResourceTimeline.ts +76 -0
- package/src/draw.ts +25 -0
- package/src/flow.ts +26 -0
- package/src/gantt.ts +12 -0
- package/src/index.ts +9 -0
- package/src/locales/de.ts +204 -0
- package/src/locales/es.ts +204 -0
- package/src/locales/fr.ts +204 -0
- package/src/locales/ja.ts +204 -0
- package/src/locales/ko.ts +204 -0
- package/src/locales/pt.ts +204 -0
- package/src/locales/zh.ts +204 -0
- package/src/media.ts +5 -0
- package/src/pdf.ts +15 -0
- package/dist/MMenuItem-D4Gx_l3F.js +0 -929
- package/dist/MMenuItem-D4Gx_l3F.js.map +0 -1
- package/dist/MSlider-Dx_S3vJ9.js +0 -1506
- package/dist/MSlider-Dx_S3vJ9.js.map +0 -1
- package/dist/MTextField-Bz8JIsnl.js +0 -633
- package/dist/MTextField-Bz8JIsnl.js.map +0 -1
- package/dist/useLocale-JYxDDeXC.js.map +0 -1
- package/dist/useThemeTokens-y0HZpyhL.js.map +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { type SeekBarChapter } from './MSeekBar.vue';
|
|
2
|
+
import type { MediaPlayer } from '../composables/useMediaPlayer';
|
|
3
|
+
export interface VideoSource {
|
|
4
|
+
src: string;
|
|
5
|
+
/** MIME type, e.g. `video/webm` or `application/vnd.apple.mpegurl` (HLS) */
|
|
6
|
+
type?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface VideoTrack {
|
|
9
|
+
/** WebVTT file */
|
|
10
|
+
src: string;
|
|
11
|
+
/** Language code, e.g. `es` */
|
|
12
|
+
srclang: string;
|
|
13
|
+
/** Shown in the subtitles menu */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Shown from the start */
|
|
16
|
+
default?: boolean;
|
|
17
|
+
/** Default `subtitles` */
|
|
18
|
+
kind?: 'subtitles' | 'captions';
|
|
19
|
+
}
|
|
20
|
+
/** The bits of hls.js the player uses, so the library doesn't depend on it */
|
|
21
|
+
export interface HlsLike {
|
|
22
|
+
loadSource(src: string): void;
|
|
23
|
+
attachMedia(el: HTMLMediaElement): void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
on(event: string, fn: (...args: any[]) => void): void;
|
|
26
|
+
levels: {
|
|
27
|
+
height?: number;
|
|
28
|
+
bitrate?: number;
|
|
29
|
+
}[];
|
|
30
|
+
currentLevel: number;
|
|
31
|
+
}
|
|
32
|
+
export interface HlsModule {
|
|
33
|
+
default: {
|
|
34
|
+
new (config?: Record<string, unknown>): HlsLike;
|
|
35
|
+
isSupported(): boolean;
|
|
36
|
+
Events: Record<string, string>;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** What the control slots receive */
|
|
40
|
+
export interface VideoPlayerSlotProps {
|
|
41
|
+
player: MediaPlayer;
|
|
42
|
+
/** The controls are showing (slots usually fade with them) */
|
|
43
|
+
shown: boolean;
|
|
44
|
+
fullscreen: boolean;
|
|
45
|
+
/** The player is narrower than 480px (a phone in portrait) */
|
|
46
|
+
compact: boolean;
|
|
47
|
+
}
|
|
48
|
+
declare const _default: typeof __VLS_export;
|
|
49
|
+
export default _default;
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
51
|
+
/** Video URL */
|
|
52
|
+
src?: string;
|
|
53
|
+
/** Several formats of the video; the browser plays the first it can */
|
|
54
|
+
sources?: VideoSource[];
|
|
55
|
+
/** Image shown before playing */
|
|
56
|
+
poster?: string;
|
|
57
|
+
/** Subtitle tracks (WebVTT) */
|
|
58
|
+
tracks?: VideoTrack[];
|
|
59
|
+
/** Chapters, drawn on the seek bar */
|
|
60
|
+
chapters?: SeekBarChapter[];
|
|
61
|
+
/** Shown at the top in full screen, and on the lock screen while playing */
|
|
62
|
+
title?: string;
|
|
63
|
+
/** Length in seconds, for `#media` content (with a `<video>` it comes from the file) */
|
|
64
|
+
duration?: number;
|
|
65
|
+
/** Drive this player instead of one of its own (from `useMediaPlayer()`, kept outside to survive page changes). Read once */
|
|
66
|
+
player?: MediaPlayer;
|
|
67
|
+
/** Playing (v-model) */
|
|
68
|
+
playing?: boolean;
|
|
69
|
+
/** Position in seconds (v-model) */
|
|
70
|
+
currentTime?: number;
|
|
71
|
+
/** Playback speed (v-model) */
|
|
72
|
+
rate?: number;
|
|
73
|
+
/** Volume, 0 to 1 (v-model) */
|
|
74
|
+
volume?: number;
|
|
75
|
+
/** Muted (v-model) */
|
|
76
|
+
muted?: boolean;
|
|
77
|
+
/** Starts playing when mounted; muted if the browser blocks sound before a user gesture */
|
|
78
|
+
autoplay?: boolean;
|
|
79
|
+
/** Starts over at the end */
|
|
80
|
+
loop?: boolean;
|
|
81
|
+
/** Shows the controls. Off: just the video and its gestures */
|
|
82
|
+
controls?: boolean;
|
|
83
|
+
/** Adds previous and next buttons (emits `previous`); with only one of the two, the other shows disabled */
|
|
84
|
+
hasPrevious?: boolean;
|
|
85
|
+
/** Adds previous and next buttons (emits `next`); with only one of the two, the other shows disabled */
|
|
86
|
+
hasNext?: boolean;
|
|
87
|
+
/** Seconds the skip buttons, J/L and double taps move */
|
|
88
|
+
seekStep?: number;
|
|
89
|
+
/** Speeds offered in the settings menu */
|
|
90
|
+
speeds?: number[];
|
|
91
|
+
/** Box ratio, as CSS `aspect-ratio`; `auto` follows the video */
|
|
92
|
+
aspectRatio?: string;
|
|
93
|
+
/** How the video fills the box */
|
|
94
|
+
fit?: "contain" | "cover";
|
|
95
|
+
/** Milliseconds without activity before the controls hide while playing */
|
|
96
|
+
hideDelay?: number;
|
|
97
|
+
/** Played part of the seek bar: an M3 role or any CSS color */
|
|
98
|
+
color?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The video's CORS mode. Subtitles from another origin need `anonymous` (and a video host that allows it, as
|
|
101
|
+
* the `<track>` is fetched in the video's mode)
|
|
102
|
+
*/
|
|
103
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
104
|
+
/** Loads hls.js for `.m3u8` where the browser can't play HLS: `() => import("hls.js")` */
|
|
105
|
+
hls?: () => Promise<HlsModule>;
|
|
106
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
107
|
+
error: (args_0: MediaError | null) => any;
|
|
108
|
+
previous: () => any;
|
|
109
|
+
next: () => any;
|
|
110
|
+
ended: () => any;
|
|
111
|
+
fullscreen: (args_0: boolean) => any;
|
|
112
|
+
"update:playing": (args_0: boolean) => any;
|
|
113
|
+
"update:currentTime": (args_0: number) => any;
|
|
114
|
+
"update:rate": (args_0: number) => any;
|
|
115
|
+
"update:volume": (args_0: number) => any;
|
|
116
|
+
"update:muted": (args_0: boolean) => any;
|
|
117
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
118
|
+
/** Video URL */
|
|
119
|
+
src?: string;
|
|
120
|
+
/** Several formats of the video; the browser plays the first it can */
|
|
121
|
+
sources?: VideoSource[];
|
|
122
|
+
/** Image shown before playing */
|
|
123
|
+
poster?: string;
|
|
124
|
+
/** Subtitle tracks (WebVTT) */
|
|
125
|
+
tracks?: VideoTrack[];
|
|
126
|
+
/** Chapters, drawn on the seek bar */
|
|
127
|
+
chapters?: SeekBarChapter[];
|
|
128
|
+
/** Shown at the top in full screen, and on the lock screen while playing */
|
|
129
|
+
title?: string;
|
|
130
|
+
/** Length in seconds, for `#media` content (with a `<video>` it comes from the file) */
|
|
131
|
+
duration?: number;
|
|
132
|
+
/** Drive this player instead of one of its own (from `useMediaPlayer()`, kept outside to survive page changes). Read once */
|
|
133
|
+
player?: MediaPlayer;
|
|
134
|
+
/** Playing (v-model) */
|
|
135
|
+
playing?: boolean;
|
|
136
|
+
/** Position in seconds (v-model) */
|
|
137
|
+
currentTime?: number;
|
|
138
|
+
/** Playback speed (v-model) */
|
|
139
|
+
rate?: number;
|
|
140
|
+
/** Volume, 0 to 1 (v-model) */
|
|
141
|
+
volume?: number;
|
|
142
|
+
/** Muted (v-model) */
|
|
143
|
+
muted?: boolean;
|
|
144
|
+
/** Starts playing when mounted; muted if the browser blocks sound before a user gesture */
|
|
145
|
+
autoplay?: boolean;
|
|
146
|
+
/** Starts over at the end */
|
|
147
|
+
loop?: boolean;
|
|
148
|
+
/** Shows the controls. Off: just the video and its gestures */
|
|
149
|
+
controls?: boolean;
|
|
150
|
+
/** Adds previous and next buttons (emits `previous`); with only one of the two, the other shows disabled */
|
|
151
|
+
hasPrevious?: boolean;
|
|
152
|
+
/** Adds previous and next buttons (emits `next`); with only one of the two, the other shows disabled */
|
|
153
|
+
hasNext?: boolean;
|
|
154
|
+
/** Seconds the skip buttons, J/L and double taps move */
|
|
155
|
+
seekStep?: number;
|
|
156
|
+
/** Speeds offered in the settings menu */
|
|
157
|
+
speeds?: number[];
|
|
158
|
+
/** Box ratio, as CSS `aspect-ratio`; `auto` follows the video */
|
|
159
|
+
aspectRatio?: string;
|
|
160
|
+
/** How the video fills the box */
|
|
161
|
+
fit?: "contain" | "cover";
|
|
162
|
+
/** Milliseconds without activity before the controls hide while playing */
|
|
163
|
+
hideDelay?: number;
|
|
164
|
+
/** Played part of the seek bar: an M3 role or any CSS color */
|
|
165
|
+
color?: string;
|
|
166
|
+
/**
|
|
167
|
+
* The video's CORS mode. Subtitles from another origin need `anonymous` (and a video host that allows it, as
|
|
168
|
+
* the `<track>` is fetched in the video's mode)
|
|
169
|
+
*/
|
|
170
|
+
crossorigin?: "anonymous" | "use-credentials";
|
|
171
|
+
/** Loads hls.js for `.m3u8` where the browser can't play HLS: `() => import("hls.js")` */
|
|
172
|
+
hls?: () => Promise<HlsModule>;
|
|
173
|
+
}> & Readonly<{
|
|
174
|
+
onError?: ((args_0: MediaError | null) => any) | undefined;
|
|
175
|
+
onPrevious?: (() => any) | undefined;
|
|
176
|
+
onNext?: (() => any) | undefined;
|
|
177
|
+
onEnded?: (() => any) | undefined;
|
|
178
|
+
onFullscreen?: ((args_0: boolean) => any) | undefined;
|
|
179
|
+
"onUpdate:playing"?: ((args_0: boolean) => any) | undefined;
|
|
180
|
+
"onUpdate:currentTime"?: ((args_0: number) => any) | undefined;
|
|
181
|
+
"onUpdate:rate"?: ((args_0: number) => any) | undefined;
|
|
182
|
+
"onUpdate:volume"?: ((args_0: number) => any) | undefined;
|
|
183
|
+
"onUpdate:muted"?: ((args_0: boolean) => any) | undefined;
|
|
184
|
+
}>, {
|
|
185
|
+
color: string;
|
|
186
|
+
aspectRatio: string;
|
|
187
|
+
playing: boolean;
|
|
188
|
+
fit: "contain" | "cover";
|
|
189
|
+
rate: number;
|
|
190
|
+
controls: boolean;
|
|
191
|
+
loop: boolean;
|
|
192
|
+
autoplay: boolean;
|
|
193
|
+
currentTime: number;
|
|
194
|
+
volume: number;
|
|
195
|
+
muted: boolean;
|
|
196
|
+
hasPrevious: boolean;
|
|
197
|
+
hasNext: boolean;
|
|
198
|
+
seekStep: number;
|
|
199
|
+
speeds: number[];
|
|
200
|
+
hideDelay: number;
|
|
201
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
202
|
+
media?: (props: {
|
|
203
|
+
time: number;
|
|
204
|
+
playing: boolean;
|
|
205
|
+
rate: number;
|
|
206
|
+
duration: number;
|
|
207
|
+
}) => any;
|
|
208
|
+
} & {
|
|
209
|
+
error?: (props: {
|
|
210
|
+
error: MediaError;
|
|
211
|
+
}) => any;
|
|
212
|
+
} & {
|
|
213
|
+
end?: (props: {
|
|
214
|
+
player: MediaPlayer;
|
|
215
|
+
replay: () => Promise<void>;
|
|
216
|
+
}) => any;
|
|
217
|
+
} & {
|
|
218
|
+
top?: (props: {
|
|
219
|
+
player: MediaPlayer;
|
|
220
|
+
/** The controls are showing (slots usually fade with them) */
|
|
221
|
+
shown: boolean;
|
|
222
|
+
fullscreen: boolean;
|
|
223
|
+
/** The player is narrower than 480px (a phone in portrait) */
|
|
224
|
+
compact: boolean;
|
|
225
|
+
}) => any;
|
|
226
|
+
} & {
|
|
227
|
+
center?: (props: {
|
|
228
|
+
player: MediaPlayer;
|
|
229
|
+
/** The controls are showing (slots usually fade with them) */
|
|
230
|
+
shown: boolean;
|
|
231
|
+
fullscreen: boolean;
|
|
232
|
+
/** The player is narrower than 480px (a phone in portrait) */
|
|
233
|
+
compact: boolean;
|
|
234
|
+
}) => any;
|
|
235
|
+
} & {
|
|
236
|
+
bottom?: (props: {
|
|
237
|
+
player: MediaPlayer;
|
|
238
|
+
/** The controls are showing (slots usually fade with them) */
|
|
239
|
+
shown: boolean;
|
|
240
|
+
fullscreen: boolean;
|
|
241
|
+
/** The player is narrower than 480px (a phone in portrait) */
|
|
242
|
+
compact: boolean;
|
|
243
|
+
}) => any;
|
|
244
|
+
} & {
|
|
245
|
+
settings?: (props: {
|
|
246
|
+
player: MediaPlayer;
|
|
247
|
+
}) => any;
|
|
248
|
+
}>;
|
|
249
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
250
|
+
new (): {
|
|
251
|
+
$slots: S;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
@@ -32,8 +32,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
32
32
|
onRowClick?: ((args_0: Record<string, any>) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
maxHeight: string;
|
|
35
|
-
rowKey: string;
|
|
36
35
|
rowHeight: number;
|
|
36
|
+
rowKey: string;
|
|
37
37
|
overscan: number;
|
|
38
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -115,13 +115,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
115
115
|
minHeight: number;
|
|
116
116
|
x: number;
|
|
117
117
|
y: number;
|
|
118
|
+
snap: boolean;
|
|
118
119
|
closable: boolean;
|
|
120
|
+
draggable: boolean;
|
|
121
|
+
resizable: boolean;
|
|
119
122
|
minimizable: boolean;
|
|
120
123
|
maximizable: boolean;
|
|
121
|
-
draggable: boolean;
|
|
122
124
|
minWidth: number;
|
|
123
|
-
snap: boolean;
|
|
124
|
-
resizable: boolean;
|
|
125
125
|
offscreen: boolean;
|
|
126
126
|
resetPosition: boolean;
|
|
127
127
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Slot } from 'vue';
|
|
2
|
+
import { type FlowEdge } from '../composables/useFlow';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
edge: FlowEdge;
|
|
5
|
+
render?: Slot;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Slot } from 'vue';
|
|
2
|
+
import { type FlowEdge } from '../composables/useFlow';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
edge: FlowEdge;
|
|
5
|
+
render?: Slot;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Slot } from 'vue';
|
|
2
|
+
import { type FlowNode } from '../composables/useFlow';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
node: FlowNode;
|
|
5
|
+
render?: Slot;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { PdfState } from '../composables/usePdf';
|
|
2
|
+
import type { PdfAnnotation, PdfTool } from './MPdfViewer.vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
pdf: PdfState;
|
|
5
|
+
page: number;
|
|
6
|
+
scale: number;
|
|
7
|
+
/** Extra rotation from the viewer, on top of the page's own */
|
|
8
|
+
rotation: number;
|
|
9
|
+
/** Near the viewport: render the canvas and the layers */
|
|
10
|
+
active: boolean;
|
|
11
|
+
/** Search hits on this page, as offsets in its text; `current` is the focused one */
|
|
12
|
+
hits: {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
current: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
annotations: PdfAnnotation[];
|
|
18
|
+
tool: PdfTool;
|
|
19
|
+
color: string;
|
|
20
|
+
inkWidth: number;
|
|
21
|
+
selectedId: string | null;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
24
|
+
root: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
25
|
+
currentHit: import("vue").ShallowRef<HTMLElement | null, HTMLElement | null>;
|
|
26
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
link: (args_0: {
|
|
28
|
+
url?: string;
|
|
29
|
+
dest?: unknown;
|
|
30
|
+
}) => any;
|
|
31
|
+
select: (args_0: {
|
|
32
|
+
id: string;
|
|
33
|
+
anchor: DOMRect;
|
|
34
|
+
} | null) => any;
|
|
35
|
+
add: (args_0: PdfAnnotation) => any;
|
|
36
|
+
erase: (args_0: string) => any;
|
|
37
|
+
rendered: (args_0: number) => any;
|
|
38
|
+
"erase-start": () => any;
|
|
39
|
+
"erase-at": (args_0: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
r: number;
|
|
43
|
+
}) => any;
|
|
44
|
+
"text-selection": (args_0: {
|
|
45
|
+
page: number;
|
|
46
|
+
rects: [number, number, number, number][];
|
|
47
|
+
quote: string;
|
|
48
|
+
anchor: DOMRect;
|
|
49
|
+
} | null) => any;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
51
|
+
onLink?: ((args_0: {
|
|
52
|
+
url?: string;
|
|
53
|
+
dest?: unknown;
|
|
54
|
+
}) => any) | undefined;
|
|
55
|
+
onSelect?: ((args_0: {
|
|
56
|
+
id: string;
|
|
57
|
+
anchor: DOMRect;
|
|
58
|
+
} | null) => any) | undefined;
|
|
59
|
+
onAdd?: ((args_0: PdfAnnotation) => any) | undefined;
|
|
60
|
+
onErase?: ((args_0: string) => any) | undefined;
|
|
61
|
+
onRendered?: ((args_0: number) => any) | undefined;
|
|
62
|
+
"onErase-start"?: (() => any) | undefined;
|
|
63
|
+
"onErase-at"?: ((args_0: {
|
|
64
|
+
x: number;
|
|
65
|
+
y: number;
|
|
66
|
+
r: number;
|
|
67
|
+
}) => any) | undefined;
|
|
68
|
+
"onText-selection"?: ((args_0: {
|
|
69
|
+
page: number;
|
|
70
|
+
rects: [number, number, number, number][];
|
|
71
|
+
quote: string;
|
|
72
|
+
anchor: DOMRect;
|
|
73
|
+
} | null) => any) | undefined;
|
|
74
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
75
|
+
declare const _default: typeof __VLS_export;
|
|
76
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
offTimes: {
|
|
3
|
+
x: number;
|
|
4
|
+
w: number;
|
|
5
|
+
}[];
|
|
6
|
+
cells: {
|
|
7
|
+
key: number;
|
|
8
|
+
x: number;
|
|
9
|
+
}[];
|
|
10
|
+
todayX: number | null;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
width: number;
|
|
3
|
+
topCells: {
|
|
4
|
+
key: number;
|
|
5
|
+
x: number;
|
|
6
|
+
w: number;
|
|
7
|
+
label: string;
|
|
8
|
+
labelX: number;
|
|
9
|
+
}[];
|
|
10
|
+
bottomCells: {
|
|
11
|
+
key: number;
|
|
12
|
+
x: number;
|
|
13
|
+
w: number;
|
|
14
|
+
label: string;
|
|
15
|
+
}[];
|
|
16
|
+
todayX: number | null;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const HOUR = 3600000;
|
|
2
|
+
export declare const DAY = 86400000;
|
|
3
|
+
export type TimeUnit = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
4
|
+
export declare const UNITS: TimeUnit[];
|
|
5
|
+
export declare function isDateOnly(s: string | undefined | null): boolean;
|
|
6
|
+
/** Epoch ms of a date string (NaN when it isn't one) */
|
|
7
|
+
export declare function parseDate(s: string | undefined | null): number;
|
|
8
|
+
/** A date string, local: `YYYY-MM-DD` or `YYYY-MM-DDTHH:mm` (with seconds when there are some) */
|
|
9
|
+
export declare function formatDate(ms: number, dateOnly: boolean): string;
|
|
10
|
+
export declare function startOfDay(ms: number): number;
|
|
11
|
+
/** Adds whole days in local time (a DST change doesn't shift the hour) */
|
|
12
|
+
export declare function addDays(ms: number, n: number): number;
|
|
13
|
+
/** Whole local days from a to b (rounded, so DST doesn't matter) */
|
|
14
|
+
export declare function daysBetween(a: number, b: number): number;
|
|
15
|
+
/** The start of the unit that holds `ms` */
|
|
16
|
+
export declare function floorUnit(ms: number, unit: TimeUnit, weekStartsOn?: number): number;
|
|
17
|
+
/** The start of the next unit after the one that starts at `ms` (`step` hours at a time for hours) */
|
|
18
|
+
export declare function nextUnit(ms: number, unit: TimeUnit, step?: number): number;
|
|
19
|
+
/** Rounds to the nearest step: minutes for sub-day steps, else whole days (local midnights) */
|
|
20
|
+
export declare function snapTime(ms: number, stepMinutes: number): number;
|
|
21
|
+
/** The named zoom levels: px per day each starts at */
|
|
22
|
+
export declare const SCALE_PX_PER_DAY: Record<TimeUnit, number>;
|
|
23
|
+
/**
|
|
24
|
+
* The header's two rows for a zoom: the finest unit whose cells still fit a label, and the one above it. Hours come
|
|
25
|
+
* in steps of 2, 3, 6 or 12 when single ones don't fit, before giving way to days
|
|
26
|
+
*/
|
|
27
|
+
export declare function unitsFor(pxPerDay: number): {
|
|
28
|
+
bottom: TimeUnit;
|
|
29
|
+
top: TimeUnit | null;
|
|
30
|
+
step: number;
|
|
31
|
+
};
|
|
32
|
+
/** The named scale closest to a zoom */
|
|
33
|
+
export declare function nearestScale(pxPerDay: number): TimeUnit;
|
|
34
|
+
/** Units starting from before `from` until past `to` (hours `step` at a time, from midnight) */
|
|
35
|
+
export declare function unitStarts(from: number, to: number, unit: TimeUnit, weekStartsOn?: number, step?: number, max?: number): number[];
|
|
36
|
+
/** A header cell's label */
|
|
37
|
+
export declare function unitLabel(ms: number, unit: TimeUnit, width: number, lang: string | undefined, quarter: string, top?: boolean): string;
|
|
38
|
+
/** Snap step (minutes) that suits a zoom, for tasks given as datetimes */
|
|
39
|
+
export declare function defaultSnap(pxPerDay: number): number;
|
|
40
|
+
/** Whether a day is a working one */
|
|
41
|
+
export declare function isWorkingDay(ms: number, workingDays: readonly number[], holidays: ReadonlySet<string>): boolean;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import { type TimeUnit } from './_ganttTime';
|
|
3
|
+
export interface TimeAxisOptions {
|
|
4
|
+
scroller: Ref<HTMLElement | undefined>;
|
|
5
|
+
listWidth: ComputedRef<number>;
|
|
6
|
+
headerHeight: number;
|
|
7
|
+
/** Earliest and latest ms the content spans */
|
|
8
|
+
extent: ComputedRef<{
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
}>;
|
|
12
|
+
scale: () => TimeUnit;
|
|
13
|
+
pxPerDay: () => number | undefined;
|
|
14
|
+
minPxPerDay: () => number;
|
|
15
|
+
maxPxPerDay: () => number;
|
|
16
|
+
weekStartsOn: () => 0 | 1;
|
|
17
|
+
lang: ComputedRef<string | undefined>;
|
|
18
|
+
quarterLabel: () => string;
|
|
19
|
+
today: () => string | null | undefined;
|
|
20
|
+
calendar: () => {
|
|
21
|
+
workingDays?: number[];
|
|
22
|
+
holidays?: string[];
|
|
23
|
+
} | undefined;
|
|
24
|
+
/** Working hours shaded as such on hour scales, e.g. [9, 18] */
|
|
25
|
+
workHours?: () => [number, number] | undefined;
|
|
26
|
+
onScale: (s: TimeUnit) => void;
|
|
27
|
+
/** A pinch began: drop whatever drag was going on */
|
|
28
|
+
onPinch?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export declare function useTimeAxis(o: TimeAxisOptions): {
|
|
31
|
+
ppd: Ref<number, number>;
|
|
32
|
+
scaleNow: ComputedRef<TimeUnit>;
|
|
33
|
+
view: Ref<{
|
|
34
|
+
left: number;
|
|
35
|
+
top: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
}, {
|
|
39
|
+
left: number;
|
|
40
|
+
top: number;
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
} | {
|
|
44
|
+
left: number;
|
|
45
|
+
top: number;
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
}>;
|
|
49
|
+
timelineView: ComputedRef<number>;
|
|
50
|
+
origin: Ref<number, number>;
|
|
51
|
+
timelineWidth: ComputedRef<number>;
|
|
52
|
+
todayMs: ComputedRef<number | null>;
|
|
53
|
+
xOf: (ms: number) => number;
|
|
54
|
+
timeAt: (x: number) => number;
|
|
55
|
+
zoomTo: (target: number, anchor?: number, animate?: boolean) => void;
|
|
56
|
+
zoomIn: () => void;
|
|
57
|
+
zoomOut: () => void;
|
|
58
|
+
setScale: (s: TimeUnit) => void;
|
|
59
|
+
scrollToDate: (date?: string, opts?: {
|
|
60
|
+
align?: "start" | "center";
|
|
61
|
+
animate?: boolean;
|
|
62
|
+
}) => void;
|
|
63
|
+
units: ComputedRef<{
|
|
64
|
+
bottom: TimeUnit;
|
|
65
|
+
top: TimeUnit | null;
|
|
66
|
+
step: number;
|
|
67
|
+
}>;
|
|
68
|
+
topCells: ComputedRef<{
|
|
69
|
+
labelX: number;
|
|
70
|
+
key: number;
|
|
71
|
+
x: number;
|
|
72
|
+
w: number;
|
|
73
|
+
label: string;
|
|
74
|
+
}[]>;
|
|
75
|
+
bottomCells: ComputedRef<{
|
|
76
|
+
key: number;
|
|
77
|
+
x: number;
|
|
78
|
+
w: number;
|
|
79
|
+
label: string;
|
|
80
|
+
}[]>;
|
|
81
|
+
offTimes: ComputedRef<{
|
|
82
|
+
x: number;
|
|
83
|
+
w: number;
|
|
84
|
+
}[]>;
|
|
85
|
+
onTouchStart: (e: TouchEvent) => void;
|
|
86
|
+
pinchMove: (e: TouchEvent) => boolean;
|
|
87
|
+
onTouchEnd: (e: TouchEvent) => void;
|
|
88
|
+
pinching: () => boolean;
|
|
89
|
+
readView: () => void;
|
|
90
|
+
};
|