@elicecontents/content-ui 1.1.2 → 1.1.3-rc.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/AIAvatar-NYAGMJJ3.png +0 -0
- package/dist/index.cjs +12803 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +12748 -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/fluid/EliceBox.d.ts +3 -0
- package/dist/types/components/fluid/EliceFluidLayout.d.ts +46 -0
- package/dist/types/components/fluid/EliceStack.d.ts +3 -0
- package/dist/types/components/fluid/EliceTypography.d.ts +2 -0
- package/dist/types/components/fluid/constants.d.ts +9 -0
- package/dist/types/components/fluid/index.d.ts +7 -0
- package/dist/types/components/fluid/types.d.ts +15 -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 +2 -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 +9 -28
- 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,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
3
|
+
import type { FluidStep } from './types';
|
|
4
|
+
export interface EliceFluidLayoutProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
step?: FluidStep;
|
|
7
|
+
backgroundImage?: string;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
onPrev?: () => void;
|
|
10
|
+
onNext?: () => void;
|
|
11
|
+
allowPrev?: boolean;
|
|
12
|
+
allowNext?: boolean;
|
|
13
|
+
onlyPage?: boolean;
|
|
14
|
+
enableScrollTracking?: boolean;
|
|
15
|
+
sx?: SxProps<Theme>;
|
|
16
|
+
innerSx?: SxProps<Theme>;
|
|
17
|
+
}
|
|
18
|
+
type Alignment = 'left' | 'center' | 'right';
|
|
19
|
+
export declare const EliceFluidLayout: (({ children, step, backgroundImage, backgroundColor, enableScrollTracking, sx, innerSx, }: EliceFluidLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
|
+
HeaderContainer: ({ children, sx }: {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
sx?: SxProps<Theme>;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
ContentContainer: ({ children, sx, scrollbarPosition, }: {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
sx?: SxProps<Theme>;
|
|
27
|
+
scrollbarPosition?: number;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
Content: ({ children, alignment, justifyContent, sx, }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
alignment?: Alignment;
|
|
32
|
+
justifyContent?: string;
|
|
33
|
+
sx?: SxProps<Theme>;
|
|
34
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
Subtitle: ({ children, alignment, justifyContent, sx, }: {
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
alignment?: Alignment;
|
|
38
|
+
justifyContent?: string;
|
|
39
|
+
sx?: SxProps<Theme>;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
FooterContainer: ({ children, sx }: {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
sx?: SxProps<Theme>;
|
|
44
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const STEP_CSS_VARIABLES: {
|
|
2
|
+
readonly '--step--1': "clamp(18px, 15.508px + 0.2595vw + 0.0865vh, 28.8px)";
|
|
3
|
+
readonly '--step-0': "clamp(16.4px, 11.877px + 0.471vw + 0.157vh, 36px)";
|
|
4
|
+
readonly '--step-1': "clamp(14.5px, 7.462px + 0.7335vw + 0.2445vh, 45px)";
|
|
5
|
+
readonly '--step-2': "clamp(12.1px, 1.969px + 1.05525vw + 0.35175vh, 56px)";
|
|
6
|
+
readonly '--step-3': "clamp(9px, -5.077px + 1.46625vw + 0.48875vh, 70px)";
|
|
7
|
+
readonly '--step-4': "clamp(5px, -14.385px + 2.019vw + 0.673vh, 89px)";
|
|
8
|
+
};
|
|
9
|
+
export declare const DEFAULT_FONT_SIZE_MAP: Record<string, string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { EliceBox } from './EliceBox';
|
|
2
|
+
export { EliceStack } from './EliceStack';
|
|
3
|
+
export { EliceTypography } from './EliceTypography';
|
|
4
|
+
export { EliceFluidLayout } from './EliceFluidLayout';
|
|
5
|
+
export { STEP_CSS_VARIABLES, DEFAULT_FONT_SIZE_MAP } from './constants';
|
|
6
|
+
export type { FluidStep, FluidStepProps, EliceBoxProps, EliceStackProps, EliceTypographyProps, FontSizeMap, } from './types';
|
|
7
|
+
export type { EliceFluidLayoutProps } from './EliceFluidLayout';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BoxProps, StackProps, TypographyProps } from '@mui/material';
|
|
2
|
+
export type FluidStep = -1 | 0 | 1 | 2 | 3;
|
|
3
|
+
export interface FluidStepProps<T extends React.ElementType> {
|
|
4
|
+
/** true일 때 STEP_CSS_VARIABLES를 컴포넌트에 직접 주입 (theme 없이 독립 사용) */
|
|
5
|
+
root?: boolean;
|
|
6
|
+
step?: FluidStep;
|
|
7
|
+
component?: T;
|
|
8
|
+
}
|
|
9
|
+
export type EliceBoxProps<T extends React.ElementType> = BoxProps<T> & FluidStepProps<T>;
|
|
10
|
+
export type EliceStackProps<T extends React.ElementType> = StackProps<T> & FluidStepProps<T>;
|
|
11
|
+
export type FontSizeMap = Partial<Record<string, string>>;
|
|
12
|
+
export type EliceTypographyProps = TypographyProps & Omit<FluidStepProps<React.ElementType>, 'component'> & {
|
|
13
|
+
/** variant별 font-size 배율 override (DEFAULT_FONT_SIZE_MAP과 merge) */
|
|
14
|
+
fontSizeMap?: FontSizeMap;
|
|
15
|
+
};
|
|
@@ -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;
|
|
@@ -27,3 +27,5 @@ export * from './sound-visualizer';
|
|
|
27
27
|
export { EliceRecorderStep } from './recorder-step';
|
|
28
28
|
export type { EliceRecorderStepProps } from './recorder-step';
|
|
29
29
|
export { RecorderProvider } from './recorder-step';
|
|
30
|
+
export * from './html-viewer';
|
|
31
|
+
export * from './fluid';
|
|
@@ -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 {
|
|
3
|
-
import { LayoutHeaderTitleProps, LayoutHeaderSubTitleProps } from './Header';
|
|
4
|
-
import { LayoutFooterPagingProps, LayoutFooterSubmitProps } from './Footer';
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material";
|
|
5
3
|
export interface EliceLayoutProps {
|
|
6
4
|
children: React.ReactNode;
|
|
7
5
|
backgroundImage?: string;
|
|
@@ -15,32 +13,16 @@ export interface EliceLayoutProps {
|
|
|
15
13
|
sx?: SxProps<Theme>;
|
|
16
14
|
}
|
|
17
15
|
type Alignment = "left" | "center" | "right";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
type EliceBoxProps<T extends React.ElementType> = BoxProps<T> & EliceStepProps<T>;
|
|
23
|
-
type EliceStackProps<T extends React.ElementType> = StackProps<T> & EliceStepProps<T>;
|
|
24
|
-
type EliceTypographyProps = TypographyProps & Omit<EliceStepProps<React.ElementType>, 'component'>;
|
|
25
|
-
/**
|
|
26
|
-
* @summary Alpha of Design System. Wrapper of MUI Box
|
|
27
|
-
* */
|
|
28
|
-
export declare const Box: React.ForwardRefExoticComponent<Omit<EliceBoxProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
|
|
29
|
-
/**
|
|
30
|
-
* @summary Alpha of Design System. Wrapper of MUI Stack
|
|
31
|
-
* */
|
|
32
|
-
export declare const Stack: React.ForwardRefExoticComponent<Omit<EliceStackProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
|
|
33
|
-
/**
|
|
34
|
-
* @summary Alpha of Design System. Wrapper of MUI Typography
|
|
35
|
-
* */
|
|
36
|
-
export declare function Typography({ step, sx, ...props }: EliceTypographyProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { EliceBox as Box } from '../fluid/EliceBox';
|
|
17
|
+
export { EliceStack as Stack } from '../fluid/EliceStack';
|
|
18
|
+
export { EliceTypography as Typography } from '../fluid/EliceTypography';
|
|
37
19
|
export declare const Layout: ({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage, enableScrollTracking, sx }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
20
|
export declare const HeaderContainer: ({ children, sx }: {
|
|
39
21
|
children: React.ReactNode;
|
|
40
22
|
sx?: SxProps<Theme>;
|
|
41
23
|
}) => 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;
|
|
24
|
+
export declare const HeaderTitle: ({ children, titleComponent, sx }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
25
|
+
export declare const HeaderSubTitle: ({ children, sx }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
44
26
|
export declare const ContentContainer: ({ children, sx, scrollbarPostion }: {
|
|
45
27
|
children: React.ReactNode;
|
|
46
28
|
sx?: SxProps<Theme>;
|
|
@@ -62,6 +44,5 @@ export declare const FooterContainer: ({ children, sx }: {
|
|
|
62
44
|
children: React.ReactNode;
|
|
63
45
|
sx?: SxProps<Theme>;
|
|
64
46
|
}) => 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;
|
|
67
|
-
export {};
|
|
47
|
+
export declare const FooterPaging: React.FC<import("./Footer").LayoutFooterPagingProps>;
|
|
48
|
+
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;
|