@weing-dev/ui-kit-primitive 0.1.2 → 0.3.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/README.md +9 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -3
- package/dist/components/Avatar/Avatar.d.ts +2 -2
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +5 -5
- package/dist/components/Button/Button.d.ts +4 -4
- package/dist/components/Button/button.augment.d.ts +17 -0
- package/dist/components/Calendar/Calendar.d.ts +6 -6
- package/dist/components/Cascader/Cascader.d.ts +4 -4
- package/dist/components/Chips/Chips.d.ts +2 -2
- package/dist/components/Comment/Comment.d.ts +2 -2
- package/dist/components/Editor/Editor.context.d.ts +2 -0
- package/dist/components/Editor/Editor.d.ts +17 -1
- package/dist/components/Editor/constants/editor.constants.d.ts +73 -24
- package/dist/components/Form/CheckBox/CheckBox.d.ts +4 -4
- package/dist/components/Form/Dropdown/Dropdown.d.ts +4 -4
- package/dist/components/Form/OTPInput/OTPInput.d.ts +2 -2
- package/dist/components/Form/Radio/Radio.d.ts +4 -4
- package/dist/components/Form/Switch/Switch.d.ts +3 -3
- package/dist/components/Form/TextArea/TextArea.d.ts +6 -6
- package/dist/components/Form/TextInput/TextInput.d.ts +5 -5
- package/dist/components/GlobalStyle/GlobalStyle.d.ts +2 -0
- package/dist/components/HelperText/HelperText.d.ts +3 -2
- package/dist/components/Icon/Icon.constant.d.ts +6 -0
- package/dist/components/Icon/Icon.d.ts +12 -9
- package/dist/components/Icon/context/icon.context.d.ts +5 -0
- package/dist/components/Icon/context/icon.provider.d.ts +8 -0
- package/dist/components/Icon/context/icon.store.d.ts +16 -0
- package/dist/components/Icon/context/index.d.ts +3 -0
- package/dist/components/Icon/icon.augment.d.ts +17 -0
- package/dist/components/Icons/BackButton.d.ts +3 -0
- package/dist/components/Icons/FullScreen.d.ts +3 -0
- package/dist/components/Icons/FullScreenClose.d.ts +3 -0
- package/dist/components/Icons/Pause.d.ts +3 -0
- package/dist/components/Icons/PictureQuality.d.ts +3 -0
- package/dist/components/Icons/Pip.d.ts +3 -0
- package/dist/components/Icons/PipExit.d.ts +3 -0
- package/dist/components/Icons/Play.d.ts +3 -0
- package/dist/components/Icons/PlaybackSpeed.d.ts +3 -0
- package/dist/components/Icons/Share.d.ts +3 -0
- package/dist/components/Icons/SubtitleFilled.d.ts +3 -0
- package/dist/components/Icons/SubtitleOutlined.d.ts +3 -0
- package/dist/components/Icons/VolumeOff.d.ts +3 -0
- package/dist/components/Icons/VolumeUp.d.ts +3 -0
- package/dist/components/Icons/index.d.ts +14 -0
- package/dist/components/LNB/LNB.d.ts +4 -4
- package/dist/components/Label/Label.d.ts +2 -2
- package/dist/components/List/List.d.ts +3 -3
- package/dist/components/Pagination/Pagination.d.ts +5 -5
- package/dist/components/Tab/Tab.d.ts +5 -5
- package/dist/components/Table/Table.d.ts +6 -6
- package/dist/components/TimeInput/TimeInput.d.ts +8 -8
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +125 -0
- package/dist/components/VideoPlayer/VideoPlayer.utils.d.ts +45 -0
- package/dist/components/VideoPlayer/components/Error/Error.d.ts +15 -0
- package/dist/components/VideoPlayer/components/Error/index.d.ts +1 -0
- package/dist/components/VideoPlayer/components/Frame/Frame.d.ts +6 -0
- package/dist/components/VideoPlayer/components/Frame/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Loading/Loading.d.ts +11 -0
- package/dist/components/VideoPlayer/components/Loading/index.d.ts +1 -0
- package/dist/components/VideoPlayer/components/Player/Player.d.ts +6 -0
- package/dist/components/VideoPlayer/components/Player/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Thumbnail/Thumbnail.d.ts +8 -0
- package/dist/components/VideoPlayer/components/Thumbnail/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/VideoOverlay/VideoOverlay.d.ts +35 -0
- package/dist/components/VideoPlayer/components/VideoOverlay/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Widgets/Button/Button.d.ts +13 -0
- package/dist/components/VideoPlayer/components/Widgets/Button/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Widgets/ProgressBar/ProgressBar.d.ts +18 -0
- package/dist/components/VideoPlayer/components/Widgets/ProgressBar/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Widgets/SpeedControl/SpeedControl.d.ts +21 -0
- package/dist/components/VideoPlayer/components/Widgets/SpeedControl/index.d.ts +1 -0
- package/dist/components/VideoPlayer/components/Widgets/Time/Time.d.ts +15 -0
- package/dist/components/VideoPlayer/components/Widgets/Time/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Widgets/VolumeControl/VolumeControl.d.ts +34 -0
- package/dist/components/VideoPlayer/components/Widgets/VolumeControl/index.d.ts +2 -0
- package/dist/components/VideoPlayer/components/Widgets/index.d.ts +29 -0
- package/dist/components/VideoPlayer/components/index.d.ts +10 -0
- package/dist/components/VideoPlayer/context/index.d.ts +4 -0
- package/dist/components/VideoPlayer/context/videoPlayer.context.d.ts +15 -0
- package/dist/components/VideoPlayer/context/videoPlayer.provider.d.ts +3 -0
- package/dist/components/VideoPlayer/context/videoPlayer.store.d.ts +27 -0
- package/dist/components/VideoPlayer/context/videoPlayer.types.d.ts +351 -0
- package/dist/components/VideoPlayer/index.d.ts +18 -0
- package/dist/components/VideoPlayer/videoPlayer.constants.d.ts +55 -0
- package/dist/entry/augmentations.d.ts +4 -0
- package/dist/entry/components.d.ts +90 -0
- package/dist/entry/types.d.ts +36 -0
- package/dist/{index-BL3MWQXq.js → index-CsNmTnCb.js} +29 -38
- package/dist/index.css +2 -2
- package/dist/index.d.ts +3 -47
- package/dist/index.js +14884 -12979
- package/dist/index.umd.cjs +51 -15
- package/dist/static/icon/PictureQuality.svg +5 -0
- package/dist/static/icon/back_button.svg +8 -0
- package/dist/static/icon/full_screen.svg +3 -0
- package/dist/static/icon/full_screen_close.svg +1 -0
- package/dist/static/icon/pause.svg +1 -0
- package/dist/static/icon/pip.svg +8 -0
- package/dist/static/icon/pip_exit.svg +8 -0
- package/dist/static/icon/play.svg +3 -0
- package/dist/static/icon/playback_speed.svg +5 -0
- package/dist/static/icon/share.svg +1 -0
- package/dist/static/icon/subtitle_filled.svg +1 -0
- package/dist/static/icon/subtitle_outlined.svg +1 -0
- package/dist/static/icon/volume_off.svg +1 -0
- package/dist/static/icon/volume_up.svg +1 -0
- package/package.json +20 -19
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const VIDEO_PLAYER_DEFAULTS: {
|
|
2
|
+
readonly layout: {
|
|
3
|
+
readonly width: "100%";
|
|
4
|
+
readonly height: "400px";
|
|
5
|
+
readonly maxWidth: "1200px";
|
|
6
|
+
};
|
|
7
|
+
readonly overlay: {
|
|
8
|
+
readonly autoHide: true;
|
|
9
|
+
readonly autoHideDelayMs: 1000;
|
|
10
|
+
};
|
|
11
|
+
readonly volume: {
|
|
12
|
+
readonly persist: true;
|
|
13
|
+
readonly storageKey: "videoPlayerVolume";
|
|
14
|
+
readonly fallback: 1;
|
|
15
|
+
};
|
|
16
|
+
readonly speed: {
|
|
17
|
+
readonly options: readonly [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
18
|
+
readonly defaultRate: 1;
|
|
19
|
+
};
|
|
20
|
+
readonly texts: {
|
|
21
|
+
readonly loading: "비디오를 로딩 중입니다...";
|
|
22
|
+
readonly errorTitle: "비디오를 재생할 수 없습니다";
|
|
23
|
+
readonly errorDescription: "비디오 파일을 확인해주세요.";
|
|
24
|
+
readonly errorRetry: "다시 시도";
|
|
25
|
+
};
|
|
26
|
+
readonly aria: {
|
|
27
|
+
readonly progress: "비디오 진행률";
|
|
28
|
+
readonly play: "재생";
|
|
29
|
+
readonly pause: "일시정지";
|
|
30
|
+
readonly fullscreenEnter: "전체화면";
|
|
31
|
+
readonly fullscreenExit: "전체화면 종료";
|
|
32
|
+
readonly pictureInPictureEnter: "Picture-in-Picture";
|
|
33
|
+
readonly pictureInPictureExit: "Picture-in-Picture 종료";
|
|
34
|
+
readonly speed: "재생 속도 조절";
|
|
35
|
+
readonly mute: "음소거";
|
|
36
|
+
readonly unmute: "음소거 해제";
|
|
37
|
+
readonly captionOn: "자막 켜기";
|
|
38
|
+
readonly captionOff: "자막 끄기";
|
|
39
|
+
readonly back: "뒤로가기";
|
|
40
|
+
readonly share: "공유";
|
|
41
|
+
};
|
|
42
|
+
readonly icons: {
|
|
43
|
+
readonly play: "Play";
|
|
44
|
+
readonly pause: "Pause";
|
|
45
|
+
readonly back: "BackButton";
|
|
46
|
+
readonly share: "Share";
|
|
47
|
+
readonly volumeOn: "VolumeUp";
|
|
48
|
+
readonly volumeOff: "VolumeOff";
|
|
49
|
+
readonly caption: "SubtitleFilled";
|
|
50
|
+
readonly fullscreenEnter: "FullScreen";
|
|
51
|
+
readonly fullscreenExit: "FullScreenClose";
|
|
52
|
+
readonly pictureInPictureEnter: "Pip";
|
|
53
|
+
readonly pictureInPictureExit: "PipExit";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Button */
|
|
2
|
+
export { default as Button } from '../components/Button/Button';
|
|
3
|
+
/** Comment */
|
|
4
|
+
export { default as Comment } from '../components/Comment/Comment';
|
|
5
|
+
/** Icon */
|
|
6
|
+
export { Icon } from '../components/Icon/Icon';
|
|
7
|
+
export { IconProvider } from '../components/Icon/context';
|
|
8
|
+
/** HelperText */
|
|
9
|
+
export { default as HelperText } from '../components/HelperText/HelperText';
|
|
10
|
+
/** Divider */
|
|
11
|
+
export { default as Divider } from '../components/Divider/Divider';
|
|
12
|
+
/** Accordion */
|
|
13
|
+
export { default as Accordion } from '../components/Accordion/Accordion';
|
|
14
|
+
/** Breadcrumb */
|
|
15
|
+
export { default as Breadcrumb } from '../components/Breadcrumb/Breadcrumb';
|
|
16
|
+
/** Slider */
|
|
17
|
+
export { default as Slider } from '../components/Slider/Slider';
|
|
18
|
+
/** Stepper */
|
|
19
|
+
export { default as Stepper } from '../components/Stepper/Stepper';
|
|
20
|
+
/** Badge */
|
|
21
|
+
export { default as Badge } from '../components/Badge/Badge';
|
|
22
|
+
/** Avatar */
|
|
23
|
+
export { default as Avatar } from '../components/Avatar/Avatar';
|
|
24
|
+
/** ScrollSpy */
|
|
25
|
+
export { default as ScrollSpy } from '../components/ScrollSpy/ScrollSpy';
|
|
26
|
+
/** Cascader */
|
|
27
|
+
export { default as Cascader } from '../components/Cascader/Cascader';
|
|
28
|
+
/** CheckBox */
|
|
29
|
+
export { default as CheckBox } from '../components/Form/CheckBox/CheckBox';
|
|
30
|
+
/** Tab */
|
|
31
|
+
export { default as Tab } from '../components/Tab/Tab';
|
|
32
|
+
/** Dropdown */
|
|
33
|
+
export { default as Dropdown } from '../components/Form/Dropdown/Dropdown';
|
|
34
|
+
/** OTPInput */
|
|
35
|
+
export { default as OTPInput } from '../components/Form/OTPInput/OTPInput';
|
|
36
|
+
/** Switch */
|
|
37
|
+
export { default as Switch } from '../components/Form/Switch/Switch';
|
|
38
|
+
/** Radio */
|
|
39
|
+
export { default as Radio } from '../components/Form/Radio/Radio';
|
|
40
|
+
/** TextInput */
|
|
41
|
+
export { default as TextInput } from '../components/Form/TextInput/TextInput';
|
|
42
|
+
/** TextArea */
|
|
43
|
+
export { default as TextArea } from '../components/Form/TextArea/TextArea';
|
|
44
|
+
/** LazyImage */
|
|
45
|
+
export { default as LazyImage } from '../components/LazyImage/LazyImage';
|
|
46
|
+
/** Calendar */
|
|
47
|
+
export { default as Calendar } from '../components/Calendar/Calendar';
|
|
48
|
+
export { CalendarContext } from '../components/Calendar/Calendar.context';
|
|
49
|
+
/** Chart */
|
|
50
|
+
export { default as Chart } from '../components/Chart/Chart';
|
|
51
|
+
/** Quill Editor */
|
|
52
|
+
export { default as Editor } from '../components/Editor/Editor';
|
|
53
|
+
/** Table */
|
|
54
|
+
export { default as Table } from '../components/Table/Table';
|
|
55
|
+
/** Weekly Calendar */
|
|
56
|
+
export { default as WeeklyCalendar } from '../components/WeeklyCalendar/WeeklyCalendar';
|
|
57
|
+
export { WeeklyCalendarContext } from '../components/WeeklyCalendar/WeeklyCalendar.context';
|
|
58
|
+
/** MobilePicker */
|
|
59
|
+
export { default as MobilePicker } from '../components/MobilePicker/MobilePicker';
|
|
60
|
+
/** LNB */
|
|
61
|
+
export { default as LNB } from '../components/LNB/LNB';
|
|
62
|
+
export { makeNavigation } from '../components/LNB/makeNavigation';
|
|
63
|
+
/** Pagination */
|
|
64
|
+
export { default as Pagination } from '../components/Pagination/Pagination';
|
|
65
|
+
/** BarCode */
|
|
66
|
+
export { default as BarCode } from '../components/BarCode/BarCode';
|
|
67
|
+
/** QRCode */
|
|
68
|
+
export { default as QRCode } from '../components/QRCode/QRCode';
|
|
69
|
+
/** Chips */
|
|
70
|
+
export { default as Chips } from '../components/Chips/Chips';
|
|
71
|
+
/** Label */
|
|
72
|
+
export { default as Label } from '../components/Label/Label';
|
|
73
|
+
/** ScrollCalendar */
|
|
74
|
+
export { default as ScrollCalendar } from '../components/ScrollCalendar/ScrollCalendar';
|
|
75
|
+
export { ScrollCalendarContext } from '../components/ScrollCalendar/ScrollCalendar.context';
|
|
76
|
+
/** Sheet */
|
|
77
|
+
export { default as Sheet } from '../components/Sheet/Sheet';
|
|
78
|
+
/** Modal */
|
|
79
|
+
export { default as Modal } from '../components/Modal/Modal';
|
|
80
|
+
/** Popup */
|
|
81
|
+
export { default as Popup } from '../components/Popup/Popup';
|
|
82
|
+
/** TimeInput */
|
|
83
|
+
export { default as TimeInput } from '../components/TimeInput/TimeInput';
|
|
84
|
+
/** List */
|
|
85
|
+
export { default as List } from '../components/List/List';
|
|
86
|
+
/** Thumbnail */
|
|
87
|
+
export { default as Thumbnail } from '../components/Thumbnail/Thumbnail';
|
|
88
|
+
/** VideoPlayer */
|
|
89
|
+
export { VideoPlayer, VIDEO_PLAYER_DEFAULTS, convertSrtToVtt, getHtmlVideoElementFromVideoJs, isSrtSubtitleSource, parseWebVttToCues, videeoPlayerConvertSrtToVtt, videeoPlayerParseWebVttToCues, VideeoPlayerConvertSrtToVtt, VideeoPlayerParseWebVttToCues, } from '../components/VideoPlayer';
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** 타입 export만 모읍니다. (type-only export) */
|
|
2
|
+
/** Table */
|
|
3
|
+
export type { TableRootProps } from '../components/Table/Table';
|
|
4
|
+
/** LNB */
|
|
5
|
+
export type { Navigation } from '../components/LNB/LNB';
|
|
6
|
+
/** Badge */
|
|
7
|
+
export type { BadgeRootProps, BadgeRenderProps, } from '../components/Badge/Badge';
|
|
8
|
+
/** QRCode */
|
|
9
|
+
export type { QRCodeRef } from '../components/QRCode/QRCode';
|
|
10
|
+
/** BarCode */
|
|
11
|
+
export type { BarcodeActions } from '../components/BarCode/BarCode';
|
|
12
|
+
/** Stepper */
|
|
13
|
+
export type { StepperProviderProps } from '../components/Stepper/Stepper';
|
|
14
|
+
/** Sheet */
|
|
15
|
+
export type { SheetRootProps } from '../components/Sheet/Sheet';
|
|
16
|
+
/** Popup */
|
|
17
|
+
export type { PopupRootProps } from '../components/Popup/Popup';
|
|
18
|
+
/** Thumbnail */
|
|
19
|
+
export type { ThumbnailRootProps } from '../components/Thumbnail/Thumbnail';
|
|
20
|
+
/** Calendar */
|
|
21
|
+
export type { CalendarContextType } from '../components/Calendar/Calendar.context';
|
|
22
|
+
/** ScrollCalendar */
|
|
23
|
+
export type { ScrollCalendarContextType } from '../components/ScrollCalendar/ScrollCalendar.context';
|
|
24
|
+
/** Cascader */
|
|
25
|
+
export type { CascaderOption } from '../components/Cascader/Cascader.context';
|
|
26
|
+
/** WeeklyCalendar */
|
|
27
|
+
export type { WeeklyCalendarContextType, EventItemAsProps, EventItemPopperAsProps, } from '../components/WeeklyCalendar/WeeklyCalendar.context';
|
|
28
|
+
/** VideoPlayer */
|
|
29
|
+
export type { IVideoPlayer, VideoPlayerProps, VideoPlayerRootProps, VideoPlayerControls, VideoPlayerTexts, VideoPlayerAria, VideoPlayerIcons, VideeoPlayerControls, VideeoPlayerTexts, VideeoPlayerAria, VideeoPlayerIcons, VideoPlayerEvents, VideoPlayerStoreApi, VideoPlayerImageComponent, VideoPlayerImageProps, VideoPlayerStore, VideoPlayerState, VideoPlayerActions, VideoPlayerStoreConfig, VideoPlayerExternalController, VideoJsPlayer, VideoPlayerProviderProps, VttCue, VideeoPlayerVttCue, } from '../components/VideoPlayer';
|
|
30
|
+
/** Icon */
|
|
31
|
+
export type { IconProviderProps, IconRegistry, } from '../components/Icon/context';
|
|
32
|
+
/** Editor */
|
|
33
|
+
export type { EditorContextValue, CustomImageUploadHandler, UploadedImageInfo, } from '../components/Editor/Editor.context';
|
|
34
|
+
export type { EditorProps, CustomFont, CustomFontSource, } from '../components/Editor/Editor';
|
|
35
|
+
export type { ToolbarOptions, ToolbarGroup, ToolbarItem, ToolbarSimpleFormat, ToolbarComplexFormat, ToolbarSizeValue, } from '../components/Editor/constants/editor.constants';
|
|
36
|
+
export {};
|
|
@@ -8,7 +8,10 @@ class p {
|
|
|
8
8
|
n(this, "quill");
|
|
9
9
|
n(this, "img", null);
|
|
10
10
|
n(this, "box", null);
|
|
11
|
-
n(this, "startPos", {
|
|
11
|
+
n(this, "startPos", {
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0
|
|
14
|
+
});
|
|
12
15
|
n(this, "startSize", {
|
|
13
16
|
width: 0,
|
|
14
17
|
height: 0
|
|
@@ -26,7 +29,10 @@ class p {
|
|
|
26
29
|
n(this, "initResize", (e) => {
|
|
27
30
|
if (typeof document > "u" || (e.preventDefault(), !this.img || !this.box)) return;
|
|
28
31
|
const t = e.target;
|
|
29
|
-
this.currentHandle = t.dataset.corner || "se", this.startPos = {
|
|
32
|
+
this.currentHandle = t.dataset.corner || "se", this.startPos = {
|
|
33
|
+
x: e.clientX,
|
|
34
|
+
y: e.clientY
|
|
35
|
+
}, this.startSize = {
|
|
30
36
|
width: this.img.width,
|
|
31
37
|
height: this.img.height
|
|
32
38
|
}, document.addEventListener("mousemove", this.performResize), document.addEventListener("mouseup", this.stopResize);
|
|
@@ -82,20 +88,12 @@ class p {
|
|
|
82
88
|
const e = a.find(this.img);
|
|
83
89
|
if (e && e.parent && e.domNode) {
|
|
84
90
|
if (e === this.quill) {
|
|
85
|
-
console.error(
|
|
86
|
-
"Quill.find returned the Quill instance itself, not a Blot for image",
|
|
87
|
-
this.img
|
|
88
|
-
);
|
|
91
|
+
console.error("Quill.find returned the Quill instance itself, not a Blot for image", this.img);
|
|
89
92
|
return;
|
|
90
93
|
}
|
|
91
94
|
try {
|
|
92
95
|
const t = this.quill.getIndex(e);
|
|
93
|
-
this.quill.deleteText(t, 1), this.quill.insertEmbed(
|
|
94
|
-
t,
|
|
95
|
-
"image",
|
|
96
|
-
this.img.getAttribute("src") || "",
|
|
97
|
-
"user"
|
|
98
|
-
);
|
|
96
|
+
this.quill.deleteText(t, 1), this.quill.insertEmbed(t, "image", this.img.getAttribute("src") || "", "user");
|
|
99
97
|
const s = {
|
|
100
98
|
width: this.img.style.width,
|
|
101
99
|
height: this.img.style.height
|
|
@@ -105,11 +103,7 @@ class p {
|
|
|
105
103
|
console.error("Error processing blot in saveToDelta:", t, e);
|
|
106
104
|
}
|
|
107
105
|
} else
|
|
108
|
-
console.error(
|
|
109
|
-
"Could not find a valid blot for image (missing parent or domNode)",
|
|
110
|
-
this.img,
|
|
111
|
-
e
|
|
112
|
-
);
|
|
106
|
+
console.error("Could not find a valid blot for image (missing parent or domNode)", this.img, e);
|
|
113
107
|
}
|
|
114
108
|
}
|
|
115
109
|
const g = 50, x = 50, b = 1200, y = 1200;
|
|
@@ -118,14 +112,23 @@ class w {
|
|
|
118
112
|
n(this, "quill");
|
|
119
113
|
n(this, "media", null);
|
|
120
114
|
n(this, "box", null);
|
|
121
|
-
n(this, "startPos", {
|
|
122
|
-
|
|
115
|
+
n(this, "startPos", {
|
|
116
|
+
x: 0,
|
|
117
|
+
y: 0
|
|
118
|
+
});
|
|
119
|
+
n(this, "startSize", {
|
|
120
|
+
width: 0,
|
|
121
|
+
height: 0
|
|
122
|
+
});
|
|
123
123
|
n(this, "currentHandle", null);
|
|
124
124
|
n(this, "aspectRatio", 1);
|
|
125
125
|
n(this, "initResize", (e) => {
|
|
126
126
|
if (typeof document > "u" || (e.preventDefault(), !this.media || !this.box)) return;
|
|
127
127
|
const t = e.target;
|
|
128
|
-
this.currentHandle = t.dataset.corner || "se", this.startPos = {
|
|
128
|
+
this.currentHandle = t.dataset.corner || "se", this.startPos = {
|
|
129
|
+
x: e.clientX,
|
|
130
|
+
y: e.clientY
|
|
131
|
+
}, this.startSize = {
|
|
129
132
|
width: this.media.clientWidth,
|
|
130
133
|
height: this.media.clientHeight
|
|
131
134
|
}, document.addEventListener("mousemove", this.performResize), document.addEventListener("mouseup", this.stopResize);
|
|
@@ -218,32 +221,20 @@ class w {
|
|
|
218
221
|
const e = a.find(this.media);
|
|
219
222
|
if (e && e.parent && e.domNode) {
|
|
220
223
|
if (e === this.quill) {
|
|
221
|
-
console.error(
|
|
222
|
-
"Quill.find returned the Quill instance itself, not a Blot for media",
|
|
223
|
-
this.media
|
|
224
|
-
);
|
|
224
|
+
console.error("Quill.find returned the Quill instance itself, not a Blot for media", this.media);
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
try {
|
|
228
228
|
const t = this.quill.getIndex(e), s = this.media.getAttribute("src") || "", i = this.media.tagName.toLowerCase();
|
|
229
|
-
this.quill.deleteText(t, 1), i === "img" ? this.quill.insertEmbed(t, "image", s, "user") : (i === "video" || i === "iframe") && this.quill.insertEmbed(t, "video", s, "user"), this.quill.formatText(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
width: this.media.style.width,
|
|
234
|
-
height: this.media.style.height
|
|
235
|
-
},
|
|
236
|
-
"user"
|
|
237
|
-
);
|
|
229
|
+
this.quill.deleteText(t, 1), i === "img" ? this.quill.insertEmbed(t, "image", s, "user") : (i === "video" || i === "iframe") && this.quill.insertEmbed(t, "video", s, "user"), this.quill.formatText(t, 1, {
|
|
230
|
+
width: this.media.style.width,
|
|
231
|
+
height: this.media.style.height
|
|
232
|
+
}, "user");
|
|
238
233
|
} catch (t) {
|
|
239
234
|
console.error("Error processing blot in saveToDelta:", t, e);
|
|
240
235
|
}
|
|
241
236
|
} else
|
|
242
|
-
console.error(
|
|
243
|
-
"Could not find a valid blot for media (missing parent or domNode)",
|
|
244
|
-
this.media,
|
|
245
|
-
e
|
|
246
|
-
);
|
|
237
|
+
console.error("Could not find a valid blot for media (missing parent or domNode)", this.media, e);
|
|
247
238
|
}
|
|
248
239
|
}
|
|
249
240
|
const R = {
|