fcr-ui-scene 1.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.
- package/lib/fcr-ui-kit/src/components/avatar/helper.d.ts +2 -0
- package/lib/fcr-ui-kit/src/components/avatar/index.d.ts +8 -0
- package/lib/fcr-ui-kit/src/components/button/index.d.ts +82 -0
- package/lib/fcr-ui-kit/src/components/checkbox/index.d.ts +12 -0
- package/lib/fcr-ui-kit/src/components/dialog/class-dialog.d.ts +51 -0
- package/lib/fcr-ui-kit/src/components/dialog/confirm-dialog.d.ts +70 -0
- package/lib/fcr-ui-kit/src/components/dialog/global-dialog.d.ts +11 -0
- package/lib/fcr-ui-kit/src/components/dialog/index.d.ts +68 -0
- package/lib/fcr-ui-kit/src/components/dropdown/index.d.ts +58 -0
- package/lib/fcr-ui-kit/src/components/input/index.d.ts +69 -0
- package/lib/fcr-ui-kit/src/components/input-number/index.d.ts +69 -0
- package/lib/fcr-ui-kit/src/components/pagination/index.d.ts +27 -0
- package/lib/fcr-ui-kit/src/components/popover/index.d.ts +47 -0
- package/lib/fcr-ui-kit/src/components/progress/index.d.ts +11 -0
- package/lib/fcr-ui-kit/src/components/radio/index.d.ts +21 -0
- package/lib/fcr-ui-kit/src/components/slider/index.d.ts +22 -0
- package/lib/fcr-ui-kit/src/components/sound-player/index.d.ts +6 -0
- package/lib/fcr-ui-kit/src/components/svg-img/clickable-icon.d.ts +25 -0
- package/lib/fcr-ui-kit/src/components/svg-img/index.d.ts +15 -0
- package/lib/fcr-ui-kit/src/components/svg-img/mic.d.ts +5 -0
- package/lib/fcr-ui-kit/src/components/svg-img/svg-dict.d.ts +12 -0
- package/lib/fcr-ui-kit/src/components/svg-img/type.d.ts +195 -0
- package/lib/fcr-ui-kit/src/components/svga-player/index.d.ts +15 -0
- package/lib/fcr-ui-kit/src/components/svga-player/svga-types.d.ts +1 -0
- package/lib/fcr-ui-kit/src/components/table/index.d.ts +9 -0
- package/lib/fcr-ui-kit/src/components/tabs/index.d.ts +14 -0
- package/lib/fcr-ui-kit/src/components/textarea/helper.d.ts +2 -0
- package/lib/fcr-ui-kit/src/components/textarea/index.d.ts +100 -0
- package/lib/fcr-ui-kit/src/components/toast/index.d.ts +122 -0
- package/lib/fcr-ui-kit/src/components/tooltip/dialog.d.ts +19 -0
- package/lib/fcr-ui-kit/src/components/tooltip/index.d.ts +89 -0
- package/lib/fcr-ui-kit/src/components/tooltip/info.d.ts +6 -0
- package/lib/fcr-ui-kit/src/components/volume/index.d.ts +8 -0
- package/lib/fcr-ui-kit/src/utils/click-anywhere.d.ts +1 -0
- package/lib/fcr-ui-kit/src/utils/hooks/animations.d.ts +14 -0
- package/lib/fcr-ui-kit/src/utils/hooks/use-click-anywhere.d.ts +2 -0
- package/lib/fcr-ui-kit/src/utils/tailwindcss.d.ts +3 -0
- package/lib/fcr-ui-scene/src/app.d.ts +5 -0
- package/lib/fcr-ui-scene/src/configs/base-theme.d.ts +391 -0
- package/lib/fcr-ui-scene/src/configs/base-ui.d.ts +12 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/chat/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/cloud/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/device/index.d.ts +9 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/index.d.ts +24 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/leave/index.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/participants/index.d.ts +5 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/raise-hands/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/record/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/screen-share/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/setting/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/toolbox/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/action-bar/whiteboard/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/ask-help-list.d.ts +10 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/broadcast-panel.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/create-panel.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/group-info-panel.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/group-panel.d.ts +5 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/group-status-panel.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/grouping.d.ts +15 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/search-panel.d.ts +5 -0
- package/lib/fcr-ui-scene/src/containers/breakout-room/wizard.d.ts +6 -0
- package/lib/fcr-ui-scene/src/containers/cloud/dialog-header.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/cloud/index.d.ts +6 -0
- package/lib/fcr-ui-scene/src/containers/cloud/personal.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/cloud/public.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/common/interact-labels.d.ts +6 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/basic-settings.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/beauty-filter.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/beauty-slider.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/device-select.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/index.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/mirror-toggle.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/video-portal.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/device-pretest/virtual-background.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/device-settings/audio-settings.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/device-settings/dialog-wrapper.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/device-settings/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/device-settings/video-settings.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/dialog/class-info.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/dialog/confirm.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/dialog/index.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/layout/cover-view.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/layout/gallery-view.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/layout/presentation-view.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/loading/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/participants/dialog.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/participants/index.d.ts +5 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/class-duration/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/fullscreen/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/index.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/layout-switch/index.d.ts +22 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/network/index.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/record-status/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/room-info/index.d.ts +4 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/share/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/status-bar/widgets/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/stream-window/context.d.ts +52 -0
- package/lib/fcr-ui-scene/src/containers/stream-window/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/video-player/index.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/video-player/players.d.ts +3 -0
- package/lib/fcr-ui-scene/src/containers/video-player/tools-overlay.d.ts +1 -0
- package/lib/fcr-ui-scene/src/containers/widget/break-out-room/index.d.ts +2 -0
- package/lib/fcr-ui-scene/src/containers/widget/draggable-wrapper/index.d.ts +7 -0
- package/lib/fcr-ui-scene/src/containers/widget/helpers.d.ts +40 -0
- package/lib/fcr-ui-scene/src/containers/widget/hooks.d.ts +21 -0
- package/lib/fcr-ui-scene/src/containers/widget/index.d.ts +7 -0
- package/lib/fcr-ui-scene/src/containers/widget/participants/index.d.ts +2 -0
- package/lib/fcr-ui-scene/src/extension/board.d.ts +73 -0
- package/lib/fcr-ui-scene/src/extension/edu-tool.d.ts +57 -0
- package/lib/fcr-ui-scene/src/extension/events.d.ts +91 -0
- package/lib/fcr-ui-scene/src/extension/type.d.ts +94 -0
- package/lib/fcr-ui-scene/src/index.d.ts +39 -0
- package/lib/fcr-ui-scene/src/preset.d.ts +1 -0
- package/lib/fcr-ui-scene/src/resources/translations/enUs.d.ts +393 -0
- package/lib/fcr-ui-scene/src/resources/translations/zhCn.d.ts +398 -0
- package/lib/fcr-ui-scene/src/scenarios/classroom.d.ts +2 -0
- package/lib/fcr-ui-scene/src/scenarios/layout/index.d.ts +2 -0
- package/lib/fcr-ui-scene/src/type.d.ts +347 -0
- package/lib/fcr-ui-scene/src/uistores/action-bar.d.ts +58 -0
- package/lib/fcr-ui-scene/src/uistores/base.d.ts +58 -0
- package/lib/fcr-ui-scene/src/uistores/breakout.d.ts +225 -0
- package/lib/fcr-ui-scene/src/uistores/cloud/helper.d.ts +26 -0
- package/lib/fcr-ui-scene/src/uistores/cloud/index.d.ts +51 -0
- package/lib/fcr-ui-scene/src/uistores/cloud/struct.d.ts +131 -0
- package/lib/fcr-ui-scene/src/uistores/context.d.ts +7 -0
- package/lib/fcr-ui-scene/src/uistores/device-setting.d.ts +219 -0
- package/lib/fcr-ui-scene/src/uistores/gallery-view.d.ts +16 -0
- package/lib/fcr-ui-scene/src/uistores/getters.d.ts +39 -0
- package/lib/fcr-ui-scene/src/uistores/index.d.ts +47 -0
- package/lib/fcr-ui-scene/src/uistores/layout.d.ts +64 -0
- package/lib/fcr-ui-scene/src/uistores/notification.d.ts +9 -0
- package/lib/fcr-ui-scene/src/uistores/participants.d.ts +48 -0
- package/lib/fcr-ui-scene/src/uistores/presentation-view.d.ts +24 -0
- package/lib/fcr-ui-scene/src/uistores/status-bar.d.ts +47 -0
- package/lib/fcr-ui-scene/src/uistores/stream.d.ts +48 -0
- package/lib/fcr-ui-scene/src/uistores/subscription/abstract.d.ts +45 -0
- package/lib/fcr-ui-scene/src/uistores/subscription/index.d.ts +13 -0
- package/lib/fcr-ui-scene/src/uistores/subscription/main-room.d.ts +14 -0
- package/lib/fcr-ui-scene/src/uistores/subscription/type.d.ts +10 -0
- package/lib/fcr-ui-scene/src/uistores/type.d.ts +86 -0
- package/lib/fcr-ui-scene/src/uistores/widget.d.ts +46 -0
- package/lib/fcr-ui-scene/src/utils/asset.d.ts +1 -0
- package/lib/fcr-ui-scene/src/utils/check.d.ts +7 -0
- package/lib/fcr-ui-scene/src/utils/clamp-bounds.d.ts +14 -0
- package/lib/fcr-ui-scene/src/utils/config-loader.d.ts +7 -0
- package/lib/fcr-ui-scene/src/utils/grid/index.d.ts +9 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-authorization.d.ts +5 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-device-switch.d.ts +29 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-drag-position.d.ts +21 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-network.d.ts +17 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-pin-stream.d.ts +4 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-rnd-position.d.ts +24 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-store.d.ts +1 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-video-renderable.d.ts +3 -0
- package/lib/fcr-ui-scene/src/utils/hooks/use-z-index.d.ts +8 -0
- package/lib/fcr-ui-scene/src/utils/index.d.ts +7 -0
- package/lib/fcr-ui-scene/src/utils/launch-options-holder.d.ts +10 -0
- package/lib/fcr-ui-scene/src/utils/rtc-extensions.d.ts +29 -0
- package/lib/fcr-ui-scene/src/utils/short-name.d.ts +1 -0
- package/lib/fcr-ui-scene/src/utils/stream/index.d.ts +3 -0
- package/lib/fcr-ui-scene/src/utils/stream/state-keeper.d.ts +18 -0
- package/lib/fcr-ui-scene/src/utils/stream/struct.d.ts +67 -0
- package/lib/fcr-ui-scene/src/utils/z-index-controller.d.ts +9 -0
- package/lib/fcr-ui-scene/tailwind.config.d.ts +1 -0
- package/lib/log.worker.bundle.worker.js.LICENSE.txt +1 -0
- package/lib/scene.bundle.js +2 -0
- package/lib/scene.bundle.js.LICENSE.txt +334 -0
- package/package.json +95 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SvgIconEnum } from '@components/svg-img';
|
|
3
|
+
import './index.css';
|
|
4
|
+
export declare const LayoutSwitchPopover: () => JSX.Element;
|
|
5
|
+
export declare const useLayoutMap: () => {
|
|
6
|
+
"list-on-top": {
|
|
7
|
+
label: string;
|
|
8
|
+
bigIcon: SvgIconEnum;
|
|
9
|
+
smallIcon: SvgIconEnum;
|
|
10
|
+
};
|
|
11
|
+
"list-on-right": {
|
|
12
|
+
label: string;
|
|
13
|
+
bigIcon: SvgIconEnum;
|
|
14
|
+
smallIcon: SvgIconEnum;
|
|
15
|
+
};
|
|
16
|
+
grid: {
|
|
17
|
+
label: string;
|
|
18
|
+
bigIcon: SvgIconEnum;
|
|
19
|
+
smallIcon: SvgIconEnum;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare const LayoutSwitch: () => JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Layout, StreamWindowPlacement } from '@ui-scene/uistores/type';
|
|
3
|
+
import { EduStreamUI } from '@ui-scene/utils/stream/struct';
|
|
4
|
+
import { AGRenderMode } from 'agora-rte-sdk';
|
|
5
|
+
export declare const StreamWindowContext: import("react").Context<{
|
|
6
|
+
topLabelAnimation: boolean;
|
|
7
|
+
bottomLabelAnimation: boolean;
|
|
8
|
+
labelSize: string;
|
|
9
|
+
streamPlayerVisible: boolean;
|
|
10
|
+
stream: EduStreamUI;
|
|
11
|
+
labelIconSize: number;
|
|
12
|
+
audioIconSize: number;
|
|
13
|
+
renderMode: AGRenderMode;
|
|
14
|
+
showMicrophoneIconOnUserLabel: boolean;
|
|
15
|
+
showMicrophoneIconOnBottomRight: boolean;
|
|
16
|
+
showNameOnBottomLeft: boolean;
|
|
17
|
+
showRoundedNamePlaceholder: boolean;
|
|
18
|
+
showHostLabel: boolean;
|
|
19
|
+
streamWindowBackgroundColorCls: string;
|
|
20
|
+
renderAtMainView: boolean;
|
|
21
|
+
renderAtListView: boolean;
|
|
22
|
+
isHostStream: boolean;
|
|
23
|
+
placement: StreamWindowPlacement;
|
|
24
|
+
videoBackgroundGray: boolean;
|
|
25
|
+
} | null>;
|
|
26
|
+
interface StreamWindowMouseContext {
|
|
27
|
+
mouseEnterWindow: boolean;
|
|
28
|
+
mouseEnterClass: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const StreamWindowMouseContext: import("react").Context<StreamWindowMouseContext | null>;
|
|
31
|
+
export declare const convertStreamUIStatus: (stream: EduStreamUI, placement: StreamWindowPlacement, layout: Layout, isGrid: boolean) => {
|
|
32
|
+
topLabelAnimation: boolean;
|
|
33
|
+
bottomLabelAnimation: boolean;
|
|
34
|
+
labelSize: string;
|
|
35
|
+
streamPlayerVisible: boolean;
|
|
36
|
+
stream: EduStreamUI;
|
|
37
|
+
labelIconSize: number;
|
|
38
|
+
audioIconSize: number;
|
|
39
|
+
renderMode: AGRenderMode;
|
|
40
|
+
showMicrophoneIconOnUserLabel: boolean;
|
|
41
|
+
showMicrophoneIconOnBottomRight: boolean;
|
|
42
|
+
showNameOnBottomLeft: boolean;
|
|
43
|
+
showRoundedNamePlaceholder: boolean;
|
|
44
|
+
showHostLabel: boolean;
|
|
45
|
+
streamWindowBackgroundColorCls: string;
|
|
46
|
+
renderAtMainView: boolean;
|
|
47
|
+
renderAtListView: boolean;
|
|
48
|
+
isHostStream: boolean;
|
|
49
|
+
placement: StreamWindowPlacement;
|
|
50
|
+
videoBackgroundGray: boolean;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FcrUISceneWidget } from 'agora-common-libs';
|
|
3
|
+
export declare const WidgetDraggableWrapper: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
widget: FcrUISceneWidget;
|
|
5
|
+
} & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Boundaries, Size } from '@ui-scene/utils/clamp-bounds';
|
|
2
|
+
export declare const WINDOW_TITLE_HEIGHT = 28;
|
|
3
|
+
export declare const WINDOW_ASPECT_RATIO: number;
|
|
4
|
+
export declare const VIDEO_ROW_CLASSNAME = "fcr-layout-content-video-list-row";
|
|
5
|
+
export declare const LAYOUT_CONTENT_CLASSNAME = "fcr-layout-content-main-view";
|
|
6
|
+
export declare const WINDOW_REMAIN_SIZE: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const WINDOW_REMAIN_POSITION: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const RND_BOUNDS = "parent";
|
|
15
|
+
export declare const isHorizontalLayout: () => boolean;
|
|
16
|
+
export declare const getMaxSizeInContainer: (containerSize: Size) => {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const resizeHandleStyleOverride: {
|
|
21
|
+
zIndex: number;
|
|
22
|
+
};
|
|
23
|
+
export declare const getContentAreaSize: () => {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
top: number;
|
|
27
|
+
left: number;
|
|
28
|
+
};
|
|
29
|
+
export declare const getDefaultBounds: (containerBoundaries: Boundaries, defaultWidth?: number, defaultHeight?: number) => {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const getFittedBounds: (containerBoundaries: Boundaries) => {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Rnd } from 'react-rnd';
|
|
3
|
+
export declare const useFitted: ({ defaultFullscreen, rndInstance, defaultRect, }: {
|
|
4
|
+
defaultRect?: {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
} | undefined;
|
|
8
|
+
defaultFullscreen?: boolean | undefined;
|
|
9
|
+
rndInstance: React.RefObject<Rnd | null>;
|
|
10
|
+
}) => {
|
|
11
|
+
fitted: boolean;
|
|
12
|
+
onFit: (fitted: boolean) => void;
|
|
13
|
+
setFitted: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
14
|
+
getBounds: () => {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
saveCurrentSizeAndPosition: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.css';
|
|
3
|
+
import { FcrUISceneWidget } from 'agora-common-libs';
|
|
4
|
+
export declare const WidgetContainer: () => JSX.Element;
|
|
5
|
+
export declare const Widget: React.ForwardRefExoticComponent<{
|
|
6
|
+
widget: FcrUISceneWidget;
|
|
7
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AgoraWidgetController } from 'agora-edu-core';
|
|
2
|
+
import { Logger } from 'agora-rte-sdk';
|
|
3
|
+
import { BoardConnectionState, BoardMountState, FcrBoardMaterialWindowConfig, FcrBoardShape, FcrBoardTool } from './type';
|
|
4
|
+
import { BoardH5WindowConfig, BoardMediaWindowConfig } from '@ui-scene/uistores/type';
|
|
5
|
+
export declare class Board {
|
|
6
|
+
logger: Logger;
|
|
7
|
+
private _controller?;
|
|
8
|
+
private _disposers;
|
|
9
|
+
grantedUsers: Set<string>;
|
|
10
|
+
connState: BoardConnectionState;
|
|
11
|
+
mountState: BoardMountState;
|
|
12
|
+
undoSteps: number;
|
|
13
|
+
redoSteps: number;
|
|
14
|
+
pageIndex: number;
|
|
15
|
+
pageCount: number;
|
|
16
|
+
strokeColor: {
|
|
17
|
+
r: number;
|
|
18
|
+
g: number;
|
|
19
|
+
b: number;
|
|
20
|
+
};
|
|
21
|
+
strokeWidth: number;
|
|
22
|
+
selectedTool?: FcrBoardTool | undefined;
|
|
23
|
+
selectedShape?: FcrBoardShape;
|
|
24
|
+
openedCoursewareIds: string[];
|
|
25
|
+
get connected(): boolean;
|
|
26
|
+
get mounted(): boolean;
|
|
27
|
+
get granted(): boolean;
|
|
28
|
+
isCoursewareOpened(resourceUuid: string): boolean;
|
|
29
|
+
enable(): void;
|
|
30
|
+
disable(): void;
|
|
31
|
+
addPage(): void;
|
|
32
|
+
removePage(): void;
|
|
33
|
+
gotoPage(index: number): void;
|
|
34
|
+
undo(): void;
|
|
35
|
+
redo(): void;
|
|
36
|
+
clean(): void;
|
|
37
|
+
openMaterialResourceWindow(resource: FcrBoardMaterialWindowConfig): void;
|
|
38
|
+
openMediaResourceWindow(resource: BoardMediaWindowConfig): void;
|
|
39
|
+
openH5ResourceWindow(resource: BoardH5WindowConfig): void;
|
|
40
|
+
putImageResource(url: string, pos?: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
}): void;
|
|
46
|
+
putImageResourceIntoWindow(src: string): void;
|
|
47
|
+
selectTool(tool: FcrBoardTool): void;
|
|
48
|
+
drawShape(shape: FcrBoardShape): void;
|
|
49
|
+
grantPrivilege(userUuid: string, granted: boolean): void;
|
|
50
|
+
changeStrokeWidth(strokeWidth: number): void;
|
|
51
|
+
changeStrokeColor(color: {
|
|
52
|
+
r: number;
|
|
53
|
+
g: number;
|
|
54
|
+
b: number;
|
|
55
|
+
}): void;
|
|
56
|
+
loadAttributes(): void;
|
|
57
|
+
saveAttributes(): void;
|
|
58
|
+
getSnapshotImageList(): void;
|
|
59
|
+
setDelay(delay: number): void;
|
|
60
|
+
hasPrivilege(): boolean;
|
|
61
|
+
install(controller: AgoraWidgetController): void;
|
|
62
|
+
uninstall(): void;
|
|
63
|
+
private _handleOpenedCoursewareListChanged;
|
|
64
|
+
private _handleRequestGrantedList;
|
|
65
|
+
private _handleRedoStepsChanged;
|
|
66
|
+
private _handleUndoStepsChanged;
|
|
67
|
+
private _handlePageInfoChanged;
|
|
68
|
+
private _handleGrantedUpdate;
|
|
69
|
+
private _handleSnapshotImageReceived;
|
|
70
|
+
private _handleConnStateChanged;
|
|
71
|
+
private _handleMountStateChanged;
|
|
72
|
+
private _sendBoardCommandMessage;
|
|
73
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AgoraWidgetController } from 'agora-edu-core';
|
|
2
|
+
import { Logger } from 'agora-rte-sdk';
|
|
3
|
+
import { SvgIconEnum } from '@components/svg-img';
|
|
4
|
+
import { StreamMediaPlayerOpenParams, WebviewOpenParams } from '@ui-scene/uistores/type';
|
|
5
|
+
import { FcrUISceneWidget } from 'agora-common-libs';
|
|
6
|
+
import { AgoraIMMessageBase, CabinetToolItem } from './type';
|
|
7
|
+
export declare class EduTool {
|
|
8
|
+
logger: Logger;
|
|
9
|
+
private _controller?;
|
|
10
|
+
private _disposers;
|
|
11
|
+
private _stateListener;
|
|
12
|
+
private _registeredCabinetToolItems;
|
|
13
|
+
private _visibleStateMap;
|
|
14
|
+
private _minimizedStateMap;
|
|
15
|
+
lastUnreadMessage: AgoraIMMessageBase | null;
|
|
16
|
+
get minimizedWidgetIcons(): ({
|
|
17
|
+
key: string;
|
|
18
|
+
icon: SvgIconEnum;
|
|
19
|
+
tooltip: string | undefined;
|
|
20
|
+
widgetId: string | undefined;
|
|
21
|
+
minimizedIcon: SvgIconEnum;
|
|
22
|
+
extra: unknown;
|
|
23
|
+
}[] | {
|
|
24
|
+
icon: SvgIconEnum;
|
|
25
|
+
widgetId: string;
|
|
26
|
+
tooltip: string | undefined;
|
|
27
|
+
extra: unknown;
|
|
28
|
+
})[];
|
|
29
|
+
get registeredCabinetToolItems(): CabinetToolItem[];
|
|
30
|
+
isWidgetVisible: (widgetId: string) => boolean;
|
|
31
|
+
isWidgetMinimized: (widgetId: string) => boolean;
|
|
32
|
+
setMinimizedState(params: {
|
|
33
|
+
minimized: boolean;
|
|
34
|
+
widgetId: string;
|
|
35
|
+
minimizedProperties: FcrUISceneWidget['minimizedProperties'];
|
|
36
|
+
}): void;
|
|
37
|
+
private _handleMinimizedStateChange;
|
|
38
|
+
private _handleVisibleStateChange;
|
|
39
|
+
private _deleteMinimizedState;
|
|
40
|
+
private _handleWidgetDestroy;
|
|
41
|
+
setWidgetVisible(widgetId: string, visible: boolean): void;
|
|
42
|
+
sendWidgetVisible(widgetId: string, visible: boolean): void;
|
|
43
|
+
sendWidgetPrivateChat(widgetId: string, userId: string): void;
|
|
44
|
+
refreshWidget(widgetId: string): void;
|
|
45
|
+
openWebview(params: WebviewOpenParams): void;
|
|
46
|
+
openMediaStreamPlayer(params: StreamMediaPlayerOpenParams): void;
|
|
47
|
+
updateWidgetDialogBoundaries(widgetId: string, params: {
|
|
48
|
+
width: string | number;
|
|
49
|
+
height: string | number;
|
|
50
|
+
}): void;
|
|
51
|
+
private _handleRegisterCabinetTool;
|
|
52
|
+
private _handleUnregisterCabinetTool;
|
|
53
|
+
private _handleChatUnreadMessageUpdate;
|
|
54
|
+
install(controller: AgoraWidgetController): void;
|
|
55
|
+
uninstall(): void;
|
|
56
|
+
private _sendMessage;
|
|
57
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 此文件包含 SDK 中支持的事件,如果发现下列事件中与 SDK 中定义的事件有差异,则当前库与 SDK 版本不匹配
|
|
3
|
+
*
|
|
4
|
+
* This file includes events that should be supported by SDK,
|
|
5
|
+
* if below events have difference with events in SDK, it's considerd there's a version mismatch between this lib and SDK
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* 此类事件从教室发出,在Widget中监听
|
|
9
|
+
*/
|
|
10
|
+
/** @en
|
|
11
|
+
* Events that come from SDK toward widget
|
|
12
|
+
*/
|
|
13
|
+
export declare enum AgoraExtensionRoomEvent {
|
|
14
|
+
/** 白板 */
|
|
15
|
+
BoardSelectTool = "board-select-tool",
|
|
16
|
+
BoardAddPage = "board-add-page",
|
|
17
|
+
BoardRemovePage = "board-remove-page",
|
|
18
|
+
BoardGotoPage = "board-goto-page",
|
|
19
|
+
BoardUndo = "board-undo",
|
|
20
|
+
BoardRedo = "board-redo",
|
|
21
|
+
BoardClean = "board-clean",
|
|
22
|
+
BoardPutImageResource = "board-put-image-resource",
|
|
23
|
+
BoardPutImageResourceIntoWindow = "board-put-image-resource-into-window",
|
|
24
|
+
BoardOpenMaterialResourceWindow = "board-open-material-resource-window",
|
|
25
|
+
BoardOpenMediaResourceWindow = "board-open-media-resource-window",
|
|
26
|
+
BoardOpenH5ResourceWindow = "board-open-h5-resource-window",
|
|
27
|
+
BoardDrawShape = "board-draw-shape",
|
|
28
|
+
BoardGrantPrivilege = "board-grant-privilege",
|
|
29
|
+
BoardChangeStrokeWidth = "board-change-stroke-width",
|
|
30
|
+
BoardChangeStrokeColor = "board-change-stroke-color",
|
|
31
|
+
BoardSaveAttributes = "board-save-attributes",
|
|
32
|
+
BoardLoadAttributes = "board-load-attributes",
|
|
33
|
+
BoardGetSnapshotImageList = "board-get-snapshot-image-list",
|
|
34
|
+
BoardSetDelay = "board-set-delay",
|
|
35
|
+
BoardSetAnimationOptions = "board-set-animation-options",
|
|
36
|
+
ToggleBoard = "toggle-board",
|
|
37
|
+
OpenWebview = "open-webview",
|
|
38
|
+
OpenStreamMediaPlayer = "open-stream-media-player",
|
|
39
|
+
ResponseGrantedList = "response-granted-list",
|
|
40
|
+
OrientationStatesChanged = "orientation-changed",
|
|
41
|
+
MobileLandscapeToolBarVisibleChanged = "mobile-landscape-tool-bar-visible-changed",
|
|
42
|
+
OpenChatDialog = "open-chat-dialog",
|
|
43
|
+
CloseChatDialog = "close-chat-dialog",
|
|
44
|
+
SetMinimize = "set-minimize",
|
|
45
|
+
VisibleChanged = "visible-changed",
|
|
46
|
+
LayoutChanged = "layout-changed",
|
|
47
|
+
Refresh = "refresh",
|
|
48
|
+
PrivateChat = "PrivateChat",
|
|
49
|
+
WidgetDialogBoundariesChanged = "widget-dialog-boundaries-changed",
|
|
50
|
+
SetFullscreen = "set-fullscreen"
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 此事件从Widget发出,在教室内监听
|
|
54
|
+
*/
|
|
55
|
+
/** @en
|
|
56
|
+
* Events that come from widget toward SDK
|
|
57
|
+
*/
|
|
58
|
+
export declare enum AgoraExtensionWidgetEvent {
|
|
59
|
+
/** 白板 */
|
|
60
|
+
BoardConnStateChanged = "board-connection-state-changed",
|
|
61
|
+
BoardMountStateChanged = "board-mount-state-changed",
|
|
62
|
+
BoardMemberStateChanged = "board-member-state-changed",
|
|
63
|
+
BoardPageInfoChanged = "board-page-info-changed",
|
|
64
|
+
BoardRedoStepsChanged = "board-redo-steps-changed",
|
|
65
|
+
BoardUndoStepsChanged = "board-undo-steps-changed",
|
|
66
|
+
BoardGrantedUsersUpdated = "board-granted-users-updated",
|
|
67
|
+
BoardSnapshotImageReceived = "board-snapshot-image-received",
|
|
68
|
+
BoardDragOver = "board-drag-over",
|
|
69
|
+
BoardDrop = "board-drop",
|
|
70
|
+
BoardOpenedCoursewareListChanged = "board-opened-courseware-list-changed",
|
|
71
|
+
WidgetBecomeActive = "widget-become-active",
|
|
72
|
+
WidgetBecomeInactive = "widget-become-inactive",
|
|
73
|
+
RegisterCabinetTool = "register-cabinet-tool",
|
|
74
|
+
UnregisterCabinetTool = "unregister-cabinet-tool",
|
|
75
|
+
RequestGrantedList = "request-granted-list",
|
|
76
|
+
RequestOrientationStates = "request-orientation",
|
|
77
|
+
QuitForceLandscape = "quit-force-landscape",
|
|
78
|
+
AddSingletonToast = "add-singleton-toast",
|
|
79
|
+
PollActiveStateChanged = "poll-active-state-changed",
|
|
80
|
+
RequestMobileLandscapeToolBarVisible = "request-mobile-landscape-tool-bar-visible",
|
|
81
|
+
ChatDialogVisibleChanged = "chat-dialog-visible-changed",
|
|
82
|
+
ChatUnreadMessageUpdate = "chat-unread-message-update",
|
|
83
|
+
WidgetCreated = "widget-created",
|
|
84
|
+
WidgetDestroyed = "widget-destroyed",
|
|
85
|
+
SetVisible = "set-visible",
|
|
86
|
+
SetMinimize = "set-minimize",
|
|
87
|
+
SetFullscreen = "set-fullscreen",
|
|
88
|
+
UpdateSize = "update-size",
|
|
89
|
+
UpdatePosition = "update-position",
|
|
90
|
+
CountdownTimerStateChanged = "countdown-timer-state-changed"
|
|
91
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { SvgIconEnum } from '@components/svg-img';
|
|
2
|
+
import { EduRoleTypeEnum } from 'agora-edu-core';
|
|
3
|
+
export declare enum BoardConnectionState {
|
|
4
|
+
Disconnected = 0,
|
|
5
|
+
Connecting = 1,
|
|
6
|
+
Connected = 2,
|
|
7
|
+
Reconnecting = 3,
|
|
8
|
+
Disconnecting = 4
|
|
9
|
+
}
|
|
10
|
+
export declare enum BoardMountState {
|
|
11
|
+
NotMounted = 0,
|
|
12
|
+
Mounted = 1
|
|
13
|
+
}
|
|
14
|
+
export declare enum FcrBoardTool {
|
|
15
|
+
Selector = 1,
|
|
16
|
+
LaserPointer = 2,
|
|
17
|
+
Eraser = 3,
|
|
18
|
+
Clicker = 4,
|
|
19
|
+
Hand = 5,
|
|
20
|
+
Text = 6
|
|
21
|
+
}
|
|
22
|
+
export declare enum FcrBoardShape {
|
|
23
|
+
Curve = 1,
|
|
24
|
+
Straight = 2,
|
|
25
|
+
Arrow = 3,
|
|
26
|
+
Rectangle = 4,
|
|
27
|
+
Triangle = 5,
|
|
28
|
+
Rhombus = 6,
|
|
29
|
+
Pentagram = 7,
|
|
30
|
+
Ellipse = 8
|
|
31
|
+
}
|
|
32
|
+
export declare type FcrBoardMaterialWindowConfig<T = unknown> = {
|
|
33
|
+
resourceUuid: string;
|
|
34
|
+
urlPrefix: string;
|
|
35
|
+
title: string;
|
|
36
|
+
pageList: T[];
|
|
37
|
+
taskUuid: string;
|
|
38
|
+
resourceHasAnimation: boolean;
|
|
39
|
+
};
|
|
40
|
+
export declare const chatroomWidgetId = "easemobIM";
|
|
41
|
+
export declare type CabinetToolItem = {
|
|
42
|
+
name: string;
|
|
43
|
+
id: string;
|
|
44
|
+
iconType: SvgIconEnum;
|
|
45
|
+
};
|
|
46
|
+
export declare enum AgoraIMMessageType {
|
|
47
|
+
Text = "text",
|
|
48
|
+
Image = "image",
|
|
49
|
+
Custom = "custom"
|
|
50
|
+
}
|
|
51
|
+
export declare class AgoraIMMessageBase<B = unknown, E extends AgoraIMMessageExt = AgoraIMMessageExt> {
|
|
52
|
+
id: string;
|
|
53
|
+
from?: string;
|
|
54
|
+
to?: string;
|
|
55
|
+
type?: AgoraIMMessageType;
|
|
56
|
+
body?: B;
|
|
57
|
+
ext?: E;
|
|
58
|
+
ts?: number;
|
|
59
|
+
receiverList?: AgoraIMUserInfo[];
|
|
60
|
+
constructor(params: AgoraIMMessageBase<B, E>);
|
|
61
|
+
}
|
|
62
|
+
export declare class AgoraIMTextMessage extends AgoraIMMessageBase {
|
|
63
|
+
msg: string;
|
|
64
|
+
constructor(params: AgoraIMTextMessage);
|
|
65
|
+
}
|
|
66
|
+
export interface AgoraIMMessageExt {
|
|
67
|
+
nickName: string;
|
|
68
|
+
roomUuid: string;
|
|
69
|
+
role: EduRoleTypeEnum;
|
|
70
|
+
avatarUrl: string;
|
|
71
|
+
muteMember?: string;
|
|
72
|
+
muteNickName?: string;
|
|
73
|
+
receiverList: AgoraIMUserInfo[];
|
|
74
|
+
}
|
|
75
|
+
export interface AgoraIMUserInfoExt {
|
|
76
|
+
role: EduRoleTypeEnum;
|
|
77
|
+
userUuid: string;
|
|
78
|
+
}
|
|
79
|
+
export interface AgoraIMUserInfo<E extends AgoraIMUserInfoExt = AgoraIMUserInfoExt> {
|
|
80
|
+
userId: string;
|
|
81
|
+
nickName: string;
|
|
82
|
+
avatarUrl: string;
|
|
83
|
+
ext: E;
|
|
84
|
+
}
|
|
85
|
+
export declare class AgoraIMImageMessage<E extends AgoraIMMessageExt = AgoraIMMessageExt> extends AgoraIMMessageBase<unknown, E> {
|
|
86
|
+
url?: string;
|
|
87
|
+
file?: File;
|
|
88
|
+
width?: number;
|
|
89
|
+
height?: number;
|
|
90
|
+
onFileUploadError?(): void;
|
|
91
|
+
onFileUploadProgress?(e: unknown): void;
|
|
92
|
+
onFileUploadComplete?(): void;
|
|
93
|
+
constructor(params: AgoraIMImageMessage<E>);
|
|
94
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import './preset';
|
|
2
|
+
import { LaunchOptions } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* Scene SDK
|
|
5
|
+
*/
|
|
6
|
+
export declare class FcrUIScene {
|
|
7
|
+
/**
|
|
8
|
+
* 启动入口
|
|
9
|
+
* @param dom 教室挂载节点
|
|
10
|
+
* @param launchOption 教室启动参数
|
|
11
|
+
* @param callbackSuccess 教室启动成功回调
|
|
12
|
+
* @param callbackFailure 教室启动失败回调
|
|
13
|
+
* @param callbackDestroy 教室销毁回调
|
|
14
|
+
* @returns 卸载函数
|
|
15
|
+
*/
|
|
16
|
+
/** @en
|
|
17
|
+
* Entry point of FcrUIScene, which is used to create an online classroom app and render at the specified dom.
|
|
18
|
+
* @param dom dom to mount classroom UI
|
|
19
|
+
* @param launchOption options to launch a classroom
|
|
20
|
+
* @param callbackSuccess callback fired when joined the room successfully
|
|
21
|
+
* @param callbackFailure callback fired when failed to join the room
|
|
22
|
+
* @param callbackDestroy callback fired when quitted the room
|
|
23
|
+
* @returns unmount function
|
|
24
|
+
*/
|
|
25
|
+
static launch(dom: HTMLElement, launchOptions: LaunchOptions, callbackSuccess?: () => void, callbackFailure?: (err: Error) => void, callbackDestroy?: (type: number) => void): () => void;
|
|
26
|
+
/**
|
|
27
|
+
* 设置参数
|
|
28
|
+
* @param params
|
|
29
|
+
*/
|
|
30
|
+
/** @en
|
|
31
|
+
* Sets parameters for SDK
|
|
32
|
+
* @param params
|
|
33
|
+
*/
|
|
34
|
+
static setParameters(params: string): void;
|
|
35
|
+
private static _convertRegion;
|
|
36
|
+
private static _convertMediaOptions;
|
|
37
|
+
static _setRecordReady(): void;
|
|
38
|
+
}
|
|
39
|
+
export * from './type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@ui-kit-utils/preflight.css';
|