@elicecontents/content-ui 1.1.2 → 1.1.3
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/AIAvatar-NYAGMJJ3.png +0 -0
- package/dist/index.cjs +12468 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +12415 -0
- package/dist/index.js.map +1 -0
- package/dist/types/breakpoints/breakpoints.d.ts +1 -1
- package/dist/types/components/AI-feedback/AIFeedback.d.ts +2 -2
- package/dist/types/components/AIDTTypography/AIDTTypography.d.ts +15 -4
- package/dist/types/components/Modal/Modal.d.ts +1 -1
- package/dist/types/components/badge/Badge.d.ts +1 -1
- package/dist/types/components/base-input/BaseInput.d.ts +1 -1
- package/dist/types/components/button/Button.d.ts +2 -2
- package/dist/types/components/chat/Chat.d.ts +14 -4
- package/dist/types/components/chat/TypingIndicator.d.ts +1 -1
- package/dist/types/components/dialog/Dialog.d.ts +2 -2
- package/dist/types/components/dotted-pagination/DottedPagination.d.ts +1 -0
- package/dist/types/components/header-title/HeaderTitle.d.ts +1 -1
- package/dist/types/components/html-viewer/HtmlViewer.d.ts +9 -0
- package/dist/types/components/html-viewer/HtmlViewerContent.d.ts +6 -0
- package/dist/types/components/html-viewer/HtmlViewerContext.d.ts +13 -0
- package/dist/types/components/html-viewer/HtmlViewerHighlightLayer.d.ts +8 -0
- package/dist/types/components/html-viewer/HtmlViewerMemoMenu.d.ts +8 -0
- package/dist/types/components/html-viewer/HtmlViewerToolbar.d.ts +1 -0
- package/dist/types/components/html-viewer/HtmlViewerTypes.d.ts +106 -0
- package/dist/types/components/html-viewer/hooks/useAnchorResolver.d.ts +13 -0
- package/dist/types/components/html-viewer/hooks/useAnnotationStorage.d.ts +9 -0
- package/dist/types/components/html-viewer/hooks/useGestureStateMachine.d.ts +16 -0
- package/dist/types/components/html-viewer/hooks/useHighlightRects.d.ts +2 -0
- package/dist/types/components/html-viewer/hooks/useIntersectionVisibility.d.ts +8 -0
- package/dist/types/components/html-viewer/index.d.ts +2 -0
- package/dist/types/components/icon-button/IconButton.d.ts +2 -2
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/layout/Footer/LayoutFooterPaging.d.ts +2 -2
- package/dist/types/components/layout/Footer/LayoutFooterSubmit.d.ts +2 -1
- package/dist/types/components/layout/Header/LayoutHeaderSubTitle.d.ts +2 -2
- package/dist/types/components/layout/Header/LayoutHeaderTitle.d.ts +2 -2
- package/dist/types/components/layout/Layout.d.ts +6 -8
- package/dist/types/components/layout/index.d.ts +10 -16
- package/dist/types/components/pagination-button/PaginationButton.d.ts +1 -1
- package/dist/types/components/recorder/Recorder.d.ts +3 -3
- package/dist/types/components/recorder-chat/RecorderChat.d.ts +1 -1
- package/dist/types/components/recorder-chat/TypingIndicator.d.ts +1 -1
- package/dist/types/components/recorder-step/RecorderContext.d.ts +2 -1
- package/dist/types/components/recorder-step/RecorderStep.d.ts +3 -3
- package/dist/types/components/selection/Selection.d.ts +2 -2
- package/dist/types/components/sound-visualizer/SoundVisualizer.d.ts +1 -1
- package/dist/types/components/subtitle-button/SubtitleButton.d.ts +2 -2
- package/dist/types/components/table/ColInfoTable.d.ts +1 -1
- package/dist/types/components/table/RowInfoTable.d.ts +1 -1
- package/dist/types/components/table/Table.d.ts +1 -1
- package/dist/types/components/textarea/Textarea.d.ts +9 -3
- package/dist/types/components/tooltip/Tooltip.d.ts +7 -3
- package/dist/types/components/video/VideoPlayer.d.ts +1 -1
- package/dist/types/components/video/VideoV2.d.ts +3 -1
- package/dist/types/components/video/VideoV3.d.ts +37 -0
- package/dist/types/components/video/index.d.ts +2 -0
- package/dist/types/hooks/useAIDTMediaQuery.d.ts +5 -1
- package/dist/types/icons/MoreColumn.d.ts +1 -1
- package/dist/types/icons/QuestionBubble.d.ts +1 -1
- package/dist/types/icons/ReadyRecord.d.ts +1 -1
- package/dist/types/icons/RecordPause.d.ts +1 -1
- package/dist/types/icons/RecordPlay.d.ts +1 -1
- package/dist/types/icons/Recording.d.ts +1 -1
- package/dist/types/icons/ScrollMoreIcon.d.ts +1 -1
- package/dist/types/icons/SearchIcon.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/palettes/_typing.d.ts +1 -1
- package/dist/types/palettes/eliceDefault.d.ts +1 -1
- package/dist/types/palettes/type1.d.ts +1 -1
- package/dist/types/palettes/type2.d.ts +1 -1
- package/dist/types/theme/AIDTTheme.d.ts +1 -1
- package/dist/types/theme/_base.d.ts +1 -1
- package/dist/types/theme/createAIDTTheme.d.ts +2 -3
- package/dist/types/theme/createEliceThemeOverride.d.ts +5 -3
- package/dist/types/theme/transitions.d.ts +1 -1
- package/dist/types/tokens/breakpoints/breakpoints.d.ts +2 -2
- package/dist/types/tokens/colors/_typing.d.ts +1 -1
- package/dist/types/tokens/colors/bluepurple.d.ts +1 -1
- package/dist/types/tokens/colors/bluesky.d.ts +1 -1
- package/dist/types/tokens/colors/common.d.ts +1 -1
- package/dist/types/tokens/colors/gray.d.ts +1 -1
- package/dist/types/tokens/colors/green.d.ts +1 -1
- package/dist/types/tokens/colors/mint.d.ts +1 -1
- package/dist/types/tokens/colors/orange.d.ts +1 -1
- package/dist/types/tokens/colors/pink.d.ts +1 -1
- package/dist/types/tokens/colors/purple.d.ts +1 -1
- package/dist/types/tokens/colors/yellow.d.ts +1 -1
- package/dist/types/types/theme-augmentation.d.ts +14 -1
- package/dist/types/types/theme.types.d.ts +4 -2
- package/dist/types/typography/TypographyType.d.ts +798 -42
- package/dist/types/typography/index.d.ts +1 -0
- package/dist/types/typography/typography.d.ts +393 -45
- package/dist/types/typography/typographyFontFamily.d.ts +1 -0
- package/package.json +21 -17
- package/dist/cjs/index.js +0 -797
- package/dist/cjs/index.js.map +0 -1
- package/dist/es/index.js +0 -17963
- package/dist/es/index.js.map +0 -1
- package/dist/utils-B-OwYxKc.js +0 -2
- package/dist/utils-B-OwYxKc.js.map +0 -1
- package/dist/utils-C6l9edAI.mjs +0 -33
- package/dist/utils-C6l9edAI.mjs.map +0 -1
- package/dist/video-BVmBZcCY.mjs +0 -29748
- package/dist/video-BVmBZcCY.mjs.map +0 -1
- package/dist/video-De6bH9lK.js +0 -213
- package/dist/video-De6bH9lK.js.map +0 -1
- package/dist/video-utils-CSAdDJJN.js +0 -9
- package/dist/video-utils-CSAdDJJN.js.map +0 -1
- package/dist/video-utils-DfKS4cGg.mjs +0 -5735
- package/dist/video-utils-DfKS4cGg.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { EliceTooltipProps } from '../tooltip';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EliceTooltipProps } from '../tooltip';
|
|
3
3
|
export type EliceAIFeedbackProps = Omit<EliceTooltipProps, 'children'> & {
|
|
4
4
|
CustomAvatar?: React.ReactNode;
|
|
5
5
|
};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BaseTypographyVariant, ContentTypographyVariant } from '../../typography/TypographyType';
|
|
3
|
+
import type { TypographyProps } from '@mui/material';
|
|
4
|
+
import type { TypographyFontFamilyType } from '../../typography';
|
|
5
|
+
interface AIDTTypographyBaseProps extends Omit<TypographyProps, 'variant'> {
|
|
5
6
|
fontFamily?: TypographyFontFamilyType;
|
|
6
7
|
fontWeight?: number;
|
|
7
8
|
fontSize?: string;
|
|
8
9
|
lineHeight?: number;
|
|
9
10
|
}
|
|
11
|
+
/** typographyType: 'Content' | 'ContentClamp' 일 때만 title1, title2, body3, subtitle3, clampH1 등 Content 전용 variant 사용 가능 */
|
|
12
|
+
interface AIDTTypographyPropsWithContent extends AIDTTypographyBaseProps {
|
|
13
|
+
typographyType: 'Content' | 'ContentClamp';
|
|
14
|
+
variant?: ContentTypographyVariant;
|
|
15
|
+
}
|
|
16
|
+
interface AIDTTypographyPropsWithBase extends AIDTTypographyBaseProps {
|
|
17
|
+
typographyType?: 'Default' | 'Fluid' | 'Clamp';
|
|
18
|
+
variant?: BaseTypographyVariant;
|
|
19
|
+
}
|
|
20
|
+
type AIDTTypographyProps = AIDTTypographyPropsWithContent | AIDTTypographyPropsWithBase;
|
|
10
21
|
declare const AIDTTypography: React.FC<AIDTTypographyProps>;
|
|
11
22
|
export default AIDTTypography;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ButtonProps } from '@mui/material';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonProps } from '@mui/material';
|
|
3
3
|
export interface EliceButtonProps extends ButtonProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
variant?: 'contained' | 'outlined' | 'text';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { RecorderType } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { RecorderType } from "../recorder-step/RecorderStep";
|
|
3
3
|
export type EliceMessageItem = {
|
|
4
4
|
role: "system" | "user" | "assistant";
|
|
5
5
|
content: string;
|
|
@@ -27,6 +27,11 @@ export interface EliceChatProps {
|
|
|
27
27
|
isRecordDisabled?: boolean;
|
|
28
28
|
isResetDisabled?: boolean;
|
|
29
29
|
maxRows?: number;
|
|
30
|
+
iconButtonColor?: string;
|
|
31
|
+
recordButtonColor?: string;
|
|
32
|
+
resetButtonColor?: string;
|
|
33
|
+
sendButtonColor?: string;
|
|
34
|
+
inputFontSize?: string;
|
|
30
35
|
}
|
|
31
36
|
declare const EliceChat: {
|
|
32
37
|
(props: React.ComponentProps<typeof EliceChatContainer>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -41,7 +46,7 @@ declare const EliceChat: {
|
|
|
41
46
|
CustomAssistantAvatar: React.ReactNode;
|
|
42
47
|
CustomUserAvatar: React.ReactNode;
|
|
43
48
|
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
InputArea({ placeHolder, value, isDisabled, onChange, onSend, onReset, onRecord, onTranscribingChange, isOnlyRecord, isResetDisabled, isRecordDisabled, maxRows }: {
|
|
49
|
+
InputArea({ placeHolder, value, isDisabled, onChange, onSend, onReset, onRecord, onTranscribingChange, isOnlyRecord, isResetDisabled, isRecordDisabled, maxRows, iconButtonColor, recordButtonColor, resetButtonColor, sendButtonColor, inputFontSize, }: {
|
|
45
50
|
placeHolder: string;
|
|
46
51
|
value: string;
|
|
47
52
|
isDisabled: boolean;
|
|
@@ -57,7 +62,12 @@ declare const EliceChat: {
|
|
|
57
62
|
isResetDisabled: boolean;
|
|
58
63
|
isRecordDisabled: boolean;
|
|
59
64
|
maxRows: number;
|
|
65
|
+
iconButtonColor?: string;
|
|
66
|
+
recordButtonColor?: string;
|
|
67
|
+
resetButtonColor?: string;
|
|
68
|
+
sendButtonColor?: string;
|
|
69
|
+
inputFontSize?: string;
|
|
60
70
|
}): import("react/jsx-runtime").JSX.Element;
|
|
61
71
|
};
|
|
62
|
-
declare const EliceChatContainer: ({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, setAudioFile, onTransform, isLoadingMessage, CustomAssistantAvatar, CustomUserAvatar, isDisabled, backgroundImage, height, recorderType, isOnlyRecord, isResetDisabled, isRecordDisabled, maxRows, }: EliceChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
declare const EliceChatContainer: ({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, setAudioFile, onTransform, isLoadingMessage, CustomAssistantAvatar, CustomUserAvatar, isDisabled, backgroundImage, height, recorderType, isOnlyRecord, isResetDisabled, isRecordDisabled, maxRows, iconButtonColor, recordButtonColor, resetButtonColor, sendButtonColor, inputFontSize, }: EliceChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
73
|
export default EliceChat;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { DialogProps } from '@mui/material';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DialogProps } from '@mui/material';
|
|
3
3
|
export interface EliceDialogProps extends Omit<DialogProps, 'open' | 'onClose' | 'title' | 'content'> {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
onClose?: () => void;
|
|
@@ -3,6 +3,7 @@ export interface DottedPaginationProps {
|
|
|
3
3
|
totalPage?: number;
|
|
4
4
|
onPrev?: VoidFunction;
|
|
5
5
|
onNext?: VoidFunction;
|
|
6
|
+
DotColor?: string;
|
|
6
7
|
}
|
|
7
8
|
declare const EliceDottedPagination: (props: DottedPaginationProps) => import("react/jsx-runtime").JSX.Element | "Total page is at most 10";
|
|
8
9
|
export default EliceDottedPagination;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EliceHtmlViewerProps } from './HtmlViewerTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Cross-platform HTML viewer with highlight & memo annotations.
|
|
4
|
+
*
|
|
5
|
+
* @security The `content` prop must be pre-sanitized by the caller before
|
|
6
|
+
* passing to this component. No internal HTML sanitization is performed.
|
|
7
|
+
*/
|
|
8
|
+
declare const EliceHtmlViewer: ({ content, documentId, defaultMode, annotations, onAnnotationCreate, onAnnotationUpdate, onAnnotationDelete, colors, sx, }: EliceHtmlViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default EliceHtmlViewer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dispatch } from 'react';
|
|
3
|
+
import type { EliceHtmlViewerProps, HtmlViewerAction, HtmlViewerState } from './HtmlViewerTypes';
|
|
4
|
+
interface HtmlViewerContextType {
|
|
5
|
+
state: HtmlViewerState;
|
|
6
|
+
dispatch: Dispatch<HtmlViewerAction>;
|
|
7
|
+
}
|
|
8
|
+
type ProviderProps = Pick<EliceHtmlViewerProps, 'defaultMode' | 'annotations' | 'onAnnotationCreate' | 'onAnnotationUpdate' | 'onAnnotationDelete'> & {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare const HtmlViewerProvider: ({ children, defaultMode, annotations: controlledAnnotations, onAnnotationCreate, onAnnotationUpdate, onAnnotationDelete, }: ProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const useHtmlViewer: () => HtmlViewerContextType;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HtmlViewerHighlightLayerProps {
|
|
3
|
+
contentRef: React.RefObject<HTMLDivElement>;
|
|
4
|
+
geometryRootRef: React.RefObject<HTMLDivElement>;
|
|
5
|
+
scrollHeight: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const HtmlViewerHighlightLayer: ({ contentRef, geometryRootRef, scrollHeight, }: HtmlViewerHighlightLayerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HtmlViewerMemoMenuProps {
|
|
3
|
+
contentRef: React.RefObject<HTMLDivElement>;
|
|
4
|
+
documentId: string;
|
|
5
|
+
colors?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const HtmlViewerMemoMenu: ({ contentRef, documentId, colors, }: HtmlViewerMemoMenuProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HtmlViewerToolbar: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
2
|
+
export type ViewerMode = 'read' | 'highlight';
|
|
3
|
+
/**
|
|
4
|
+
* Quote-based anchor for DOM-change-resilient annotation restoration.
|
|
5
|
+
* prefix/suffix provide fuzzy-match fallback when domPath fails.
|
|
6
|
+
*/
|
|
7
|
+
export interface TextAnchor {
|
|
8
|
+
exact: string;
|
|
9
|
+
prefix?: string;
|
|
10
|
+
suffix?: string;
|
|
11
|
+
startPath?: string;
|
|
12
|
+
endPath?: string;
|
|
13
|
+
domPath?: string;
|
|
14
|
+
startOffset?: number;
|
|
15
|
+
endOffset?: number;
|
|
16
|
+
hintBlockIndex?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface Annotation {
|
|
19
|
+
id: string;
|
|
20
|
+
documentId: string;
|
|
21
|
+
anchor: TextAnchor;
|
|
22
|
+
color: string;
|
|
23
|
+
memo?: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
status?: 'active' | 'detached';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @security The `content` prop must be pre-sanitized by the caller.
|
|
29
|
+
* This component does NOT sanitize HTML internally.
|
|
30
|
+
* Pass empty string to render a placeholder instead of raw HTML.
|
|
31
|
+
*/
|
|
32
|
+
export interface EliceHtmlViewerProps {
|
|
33
|
+
/** Pre-sanitized HTML string. @security Caller must sanitize before passing. */
|
|
34
|
+
content: string;
|
|
35
|
+
documentId: string;
|
|
36
|
+
defaultMode?: ViewerMode;
|
|
37
|
+
onAnnotationCreate?: (annotation: Annotation) => void;
|
|
38
|
+
onAnnotationUpdate?: (annotation: Annotation) => void;
|
|
39
|
+
onAnnotationDelete?: (id: string) => void;
|
|
40
|
+
/** Controlled annotations. When provided, internal storage is bypassed. */
|
|
41
|
+
annotations?: Annotation[];
|
|
42
|
+
colors?: string[];
|
|
43
|
+
sx?: SxProps<Theme>;
|
|
44
|
+
}
|
|
45
|
+
export interface HighlightRect {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
annotationId: string;
|
|
51
|
+
color: string;
|
|
52
|
+
}
|
|
53
|
+
export type GestureState = {
|
|
54
|
+
kind: 'idle';
|
|
55
|
+
} | {
|
|
56
|
+
kind: 'pressing';
|
|
57
|
+
startX: number;
|
|
58
|
+
startY: number;
|
|
59
|
+
startTime: number;
|
|
60
|
+
pointerType: string;
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'longPressArmed';
|
|
63
|
+
startX: number;
|
|
64
|
+
startY: number;
|
|
65
|
+
} | {
|
|
66
|
+
kind: 'selecting';
|
|
67
|
+
anchorRange: Range;
|
|
68
|
+
} | {
|
|
69
|
+
kind: 'scrolling';
|
|
70
|
+
};
|
|
71
|
+
export interface MenuPosition {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
}
|
|
75
|
+
export interface HtmlViewerState {
|
|
76
|
+
mode: ViewerMode;
|
|
77
|
+
annotations: Annotation[];
|
|
78
|
+
activeAnnotationId: string | null;
|
|
79
|
+
pendingRange: Range | null;
|
|
80
|
+
menuPosition: MenuPosition | null;
|
|
81
|
+
}
|
|
82
|
+
export type HtmlViewerAction = {
|
|
83
|
+
type: 'SET_MODE';
|
|
84
|
+
payload: ViewerMode;
|
|
85
|
+
} | {
|
|
86
|
+
type: 'ADD_ANNOTATION';
|
|
87
|
+
payload: Annotation;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'UPDATE_ANNOTATION';
|
|
90
|
+
payload: Annotation;
|
|
91
|
+
} | {
|
|
92
|
+
type: 'DELETE_ANNOTATION';
|
|
93
|
+
payload: string;
|
|
94
|
+
} | {
|
|
95
|
+
type: 'SET_ACTIVE_ANNOTATION';
|
|
96
|
+
payload: string | null;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'SET_PENDING_RANGE';
|
|
99
|
+
payload: Range | null;
|
|
100
|
+
} | {
|
|
101
|
+
type: 'SET_MENU_POSITION';
|
|
102
|
+
payload: MenuPosition | null;
|
|
103
|
+
} | {
|
|
104
|
+
type: 'SYNC_ANNOTATIONS';
|
|
105
|
+
payload: Annotation[];
|
|
106
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TextAnchor } from '../HtmlViewerTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a TextAnchor from a DOM Range for later restoration.
|
|
4
|
+
*/
|
|
5
|
+
export declare function saveAnchor(range: Range, contentRoot: HTMLElement): TextAnchor;
|
|
6
|
+
/**
|
|
7
|
+
* Restores a DOM Range from a TextAnchor.
|
|
8
|
+
* Returns null if the anchor cannot be resolved (annotation becomes 'detached').
|
|
9
|
+
*
|
|
10
|
+
* Strategy A: domPath + offset
|
|
11
|
+
* Strategy B (fallback): full-text fuzzy match using exact + prefix + suffix
|
|
12
|
+
*/
|
|
13
|
+
export declare function restoreRange(anchor: TextAnchor, contentRoot: HTMLElement): Range | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Annotation } from '../HtmlViewerTypes';
|
|
2
|
+
export interface UseAnnotationStorageReturn {
|
|
3
|
+
annotations: Annotation[];
|
|
4
|
+
addAnnotation: (partial: Omit<Annotation, 'id' | 'createdAt' | 'status'>) => Annotation;
|
|
5
|
+
updateAnnotation: (annotation: Annotation) => void;
|
|
6
|
+
deleteAnnotation: (id: string) => void;
|
|
7
|
+
generateId: () => string;
|
|
8
|
+
}
|
|
9
|
+
export declare function useAnnotationStorage(documentId: string): UseAnnotationStorageReturn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Dispatch } from 'react';
|
|
2
|
+
import type { HtmlViewerAction } from '../HtmlViewerTypes';
|
|
3
|
+
interface UseGestureStateMachineOptions {
|
|
4
|
+
dispatch: Dispatch<HtmlViewerAction>;
|
|
5
|
+
isHighlightMode: () => boolean;
|
|
6
|
+
contentRef: React.RefObject<HTMLElement>;
|
|
7
|
+
surfaceRef: React.RefObject<HTMLElement>;
|
|
8
|
+
}
|
|
9
|
+
interface GestureHandlers {
|
|
10
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
11
|
+
onPointerMove: (e: React.PointerEvent) => void;
|
|
12
|
+
onPointerUp: (e: React.PointerEvent) => void;
|
|
13
|
+
onPointerCancel: (e: React.PointerEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function useGestureStateMachine({ dispatch, isHighlightMode, contentRef, surfaceRef, }: UseGestureStateMachineOptions): GestureHandlers;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HighlightRect } from '../HtmlViewerTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks the visible Y range of a container and returns only the
|
|
4
|
+
* HighlightRects that overlap with the visible area.
|
|
5
|
+
*
|
|
6
|
+
* Falls back to returning all rects when viewport data is unavailable.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useIntersectionVisibility(rects: HighlightRect[], geometryRootRef: React.RefObject<HTMLDivElement>): HighlightRect[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IconButtonProps } from '@mui/material';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type IconButtonProps } from '@mui/material';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
3
|
export interface EliceIconButtonProps extends IconButtonProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
backgroundColor?: string;
|
|
@@ -10,7 +10,8 @@ export interface LayoutFooterSubmitProps {
|
|
|
10
10
|
submitButtonColor?: string;
|
|
11
11
|
rollbackButtonColor?: string;
|
|
12
12
|
submitTextColor?: string;
|
|
13
|
+
buttonSize?: 'small' | 'medium' | 'large';
|
|
13
14
|
rollbackTextColor?: string;
|
|
14
15
|
}
|
|
15
|
-
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, submitButtonColor, rollbackButtonColor, submitTextColor, rollbackTextColor, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, buttonSize, onRollback, submitButtonColor, rollbackButtonColor, submitTextColor, rollbackTextColor, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default LayoutFooterSubmit;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SxProps, Theme } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
3
3
|
export interface LayoutHeaderSubTitleProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
sx?: SxProps<Theme>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SxProps, Theme } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
3
3
|
export interface LayoutHeaderTitleProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
titleComponent?: React.ReactNode;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BoxProps, StackProps, SxProps, Theme, TypographyProps } from
|
|
3
|
-
import { LayoutHeaderTitleProps, LayoutHeaderSubTitleProps } from './Header';
|
|
4
|
-
import { LayoutFooterPagingProps, LayoutFooterSubmitProps } from './Footer';
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BoxProps, StackProps, SxProps, Theme, TypographyProps } from "@mui/material";
|
|
5
3
|
export interface EliceLayoutProps {
|
|
6
4
|
children: React.ReactNode;
|
|
7
5
|
backgroundImage?: string;
|
|
@@ -39,8 +37,8 @@ export declare const HeaderContainer: ({ children, sx }: {
|
|
|
39
37
|
children: React.ReactNode;
|
|
40
38
|
sx?: SxProps<Theme>;
|
|
41
39
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export declare const HeaderTitle: ({ children, titleComponent, sx }: LayoutHeaderTitleProps) => JSX.Element;
|
|
43
|
-
export declare const HeaderSubTitle: ({ children, sx }: LayoutHeaderSubTitleProps) => JSX.Element;
|
|
40
|
+
export declare const HeaderTitle: ({ children, titleComponent, sx }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
41
|
+
export declare const HeaderSubTitle: ({ children, sx }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
44
42
|
export declare const ContentContainer: ({ children, sx, scrollbarPostion }: {
|
|
45
43
|
children: React.ReactNode;
|
|
46
44
|
sx?: SxProps<Theme>;
|
|
@@ -62,6 +60,6 @@ export declare const FooterContainer: ({ children, sx }: {
|
|
|
62
60
|
children: React.ReactNode;
|
|
63
61
|
sx?: SxProps<Theme>;
|
|
64
62
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
-
export declare const FooterPaging: React.FC<
|
|
66
|
-
export declare const FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, submitButtonColor, rollbackButtonColor, submitTextColor, rollbackTextColor, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare const FooterPaging: React.FC<import("./Footer").LayoutFooterPagingProps>;
|
|
64
|
+
export declare const FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, buttonSize, onRollback, submitButtonColor, rollbackButtonColor, submitTextColor, rollbackTextColor, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
67
65
|
export {};
|
|
@@ -1,39 +1,33 @@
|
|
|
1
|
-
import { EliceLayoutProps } from './Layout';
|
|
2
|
-
import { SxProps } from '@mui/system';
|
|
3
|
-
import { Theme } from '@mui/material';
|
|
4
|
-
import { LayoutHeaderTitleProps, LayoutHeaderSubTitleProps } from './Header';
|
|
5
|
-
import { FC } from 'react';
|
|
6
|
-
import { LayoutFooterPagingProps, LayoutFooterSubmitProps } from './Footer';
|
|
7
1
|
export { Layout, HeaderContainer, HeaderSubTitle, ContentContainer, Content, FooterContainer, FooterPaging, FooterSubmit, Box, Stack, Typography, } from './Layout';
|
|
8
|
-
export declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage, enableScrollTracking, sx }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
|
+
export declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage, enableScrollTracking, sx }: import("./Layout").EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
3
|
HeaderContainer: ({ children, sx }: {
|
|
10
4
|
children: React.ReactNode;
|
|
11
|
-
sx?: SxProps<Theme>;
|
|
5
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
12
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
HeaderTitle: ({ children, titleComponent, sx }: LayoutHeaderTitleProps) => JSX.Element;
|
|
14
|
-
HeaderSubTitle: ({ children, sx }: LayoutHeaderSubTitleProps) => JSX.Element;
|
|
7
|
+
HeaderTitle: ({ children, titleComponent, sx }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
8
|
+
HeaderSubTitle: ({ children, sx }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
15
9
|
Subtitle: ({ children, alignment, justifyContent, sx }: {
|
|
16
10
|
children: React.ReactNode;
|
|
17
11
|
alignment?: "center" | "right" | "left";
|
|
18
12
|
justifyContent?: string;
|
|
19
|
-
sx?: SxProps<Theme>;
|
|
13
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
20
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
15
|
ContentContainer: ({ children, sx, scrollbarPostion }: {
|
|
22
16
|
children: React.ReactNode;
|
|
23
|
-
sx?: SxProps<Theme>;
|
|
17
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
24
18
|
scrollbarPostion?: number;
|
|
25
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
20
|
Content: ({ children, alignment, justifyContent, sx, }: {
|
|
27
21
|
children: React.ReactNode;
|
|
28
22
|
alignment?: "center" | "right" | "left";
|
|
29
23
|
justifyContent?: string;
|
|
30
|
-
sx?: SxProps<Theme>;
|
|
24
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
31
25
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
26
|
FooterContainer: ({ children, sx }: {
|
|
33
27
|
children: React.ReactNode;
|
|
34
|
-
sx?: SxProps<Theme>;
|
|
28
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme>;
|
|
35
29
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
FooterPaging: FC<LayoutFooterPagingProps>;
|
|
37
|
-
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, submitButtonColor, rollbackButtonColor, submitTextColor, rollbackTextColor, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
FooterPaging: import("react").FC<import("./Footer").LayoutFooterPagingProps>;
|
|
31
|
+
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, buttonSize, onRollback, submitButtonColor, rollbackButtonColor, submitTextColor, rollbackTextColor, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
32
|
};
|
|
39
33
|
export type { EliceLayoutProps } from './Layout';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SoundVisualizerVariant } from '
|
|
2
|
-
import { SxProps } from '@mui/material';
|
|
3
|
-
import { AudioStep } from './recorderStore';
|
|
1
|
+
import type { SoundVisualizerVariant } from '@elicecontents/content-ui';
|
|
2
|
+
import type { SxProps } from '@mui/material';
|
|
3
|
+
import type { AudioStep } from './recorderStore';
|
|
4
4
|
export type RecorderStep = 'ready' | 'recording' | 'pause' | 'waiting';
|
|
5
5
|
export type RecorderType = 'pause' | 'waiting' | 'unsubmit' | null;
|
|
6
6
|
export interface EliceRecorderStepProps {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dispatch } from 'react';
|
|
2
3
|
export type AudioStep = 'ready' | 'recording' | 'pause' | 'waiting' | '';
|
|
3
4
|
export type StepFlowType = 'basic' | 'pauseable' | 'oneClick' | 'recordOnly' | 'instantRecord';
|
|
4
5
|
interface RecorderState {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AudioStep } from './RecorderContext';
|
|
2
|
-
import { SoundVisualizerVariant } from '
|
|
3
|
-
import { SxProps } from '@mui/material';
|
|
1
|
+
import { type AudioStep } from './RecorderContext';
|
|
2
|
+
import type { SoundVisualizerVariant } from '@elicecontents/content-ui';
|
|
3
|
+
import type { SxProps } from '@mui/material';
|
|
4
4
|
export type RecorderStep = 'ready' | 'recording' | 'pause' | 'waiting';
|
|
5
5
|
export type RecorderType = 'needPause' | 'needWaiting' | 'allNeed' | 'notNeed';
|
|
6
6
|
export interface EliceRecorderStepProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToggleButtonGroupProps } from '@mui/material';
|
|
2
|
-
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
1
|
+
import type { ToggleButtonGroupProps } from '@mui/material';
|
|
2
|
+
import type { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
3
3
|
export interface EliceSelectionProps extends ToggleButtonGroupProps {
|
|
4
4
|
type: 'checkbox' | 'radio';
|
|
5
5
|
options: {
|