react-native-richify 1.0.0 → 1.0.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/package.json +11 -10
- package/src/components/OverlayText.d.ts +1 -1
- package/src/components/OverlayText.tsx +3 -3
- package/src/components/RichTextInput.d.ts +1 -1
- package/src/components/RichTextInput.tsx +6 -6
- package/src/components/Toolbar.tsx +3 -3
- package/src/components/ToolbarButton.tsx +7 -7
- package/src/constants/defaultStyles.ts +1 -1
- package/src/context/RichTextContext.d.ts +2 -2
- package/src/context/RichTextContext.tsx +3 -3
- package/src/hooks/useFormatting.d.ts +2 -2
- package/src/hooks/useFormatting.ts +2 -2
- package/src/hooks/useRichText.d.ts +1 -1
- package/src/hooks/useRichText.ts +5 -5
- package/src/hooks/useSelection.d.ts +1 -1
- package/src/hooks/useSelection.ts +1 -1
- package/src/index.d.ts +15 -15
- package/src/index.ts +15 -15
- package/lib/commonjs/components/OverlayText.d.js +0 -6
- package/lib/commonjs/components/OverlayText.d.js.map +0 -1
- package/lib/commonjs/components/OverlayText.js +0 -45
- package/lib/commonjs/components/OverlayText.js.map +0 -1
- package/lib/commonjs/components/RichTextInput.d.js +0 -6
- package/lib/commonjs/components/RichTextInput.d.js.map +0 -1
- package/lib/commonjs/components/RichTextInput.js +0 -160
- package/lib/commonjs/components/RichTextInput.js.map +0 -1
- package/lib/commonjs/components/Toolbar.d.js +0 -6
- package/lib/commonjs/components/Toolbar.d.js.map +0 -1
- package/lib/commonjs/components/Toolbar.js +0 -99
- package/lib/commonjs/components/Toolbar.js.map +0 -1
- package/lib/commonjs/components/ToolbarButton.d.js +0 -6
- package/lib/commonjs/components/ToolbarButton.d.js.map +0 -1
- package/lib/commonjs/components/ToolbarButton.js +0 -63
- package/lib/commonjs/components/ToolbarButton.js.map +0 -1
- package/lib/commonjs/constants/defaultStyles.d.js +0 -6
- package/lib/commonjs/constants/defaultStyles.d.js.map +0 -1
- package/lib/commonjs/constants/defaultStyles.js +0 -172
- package/lib/commonjs/constants/defaultStyles.js.map +0 -1
- package/lib/commonjs/context/RichTextContext.d.js +0 -6
- package/lib/commonjs/context/RichTextContext.d.js.map +0 -1
- package/lib/commonjs/context/RichTextContext.js +0 -61
- package/lib/commonjs/context/RichTextContext.js.map +0 -1
- package/lib/commonjs/hooks/useFormatting.d.js +0 -6
- package/lib/commonjs/hooks/useFormatting.d.js.map +0 -1
- package/lib/commonjs/hooks/useFormatting.js +0 -82
- package/lib/commonjs/hooks/useFormatting.js.map +0 -1
- package/lib/commonjs/hooks/useRichText.d.js +0 -6
- package/lib/commonjs/hooks/useRichText.d.js.map +0 -1
- package/lib/commonjs/hooks/useRichText.js +0 -136
- package/lib/commonjs/hooks/useRichText.js.map +0 -1
- package/lib/commonjs/hooks/useSelection.d.js +0 -6
- package/lib/commonjs/hooks/useSelection.d.js.map +0 -1
- package/lib/commonjs/hooks/useSelection.js +0 -39
- package/lib/commonjs/hooks/useSelection.js.map +0 -1
- package/lib/commonjs/index.d.js +0 -186
- package/lib/commonjs/index.d.js.map +0 -1
- package/lib/commonjs/index.js +0 -186
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/types/index.d.js +0 -6
- package/lib/commonjs/types/index.d.js.map +0 -1
- package/lib/commonjs/types/index.js +0 -6
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/utils/formatter.d.js +0 -13
- package/lib/commonjs/utils/formatter.d.js.map +0 -1
- package/lib/commonjs/utils/formatter.js +0 -229
- package/lib/commonjs/utils/formatter.js.map +0 -1
- package/lib/commonjs/utils/parser.d.js +0 -6
- package/lib/commonjs/utils/parser.d.js.map +0 -1
- package/lib/commonjs/utils/parser.js +0 -221
- package/lib/commonjs/utils/parser.js.map +0 -1
- package/lib/commonjs/utils/styleMapper.d.js +0 -6
- package/lib/commonjs/utils/styleMapper.d.js.map +0 -1
- package/lib/commonjs/utils/styleMapper.js +0 -87
- package/lib/commonjs/utils/styleMapper.js.map +0 -1
- package/lib/module/components/OverlayText.d.js +0 -4
- package/lib/module/components/OverlayText.d.js.map +0 -1
- package/lib/module/components/OverlayText.js +0 -41
- package/lib/module/components/OverlayText.js.map +0 -1
- package/lib/module/components/RichTextInput.d.js +0 -4
- package/lib/module/components/RichTextInput.d.js.map +0 -1
- package/lib/module/components/RichTextInput.js +0 -155
- package/lib/module/components/RichTextInput.js.map +0 -1
- package/lib/module/components/Toolbar.d.js +0 -4
- package/lib/module/components/Toolbar.d.js.map +0 -1
- package/lib/module/components/Toolbar.js +0 -95
- package/lib/module/components/Toolbar.js.map +0 -1
- package/lib/module/components/ToolbarButton.d.js +0 -4
- package/lib/module/components/ToolbarButton.d.js.map +0 -1
- package/lib/module/components/ToolbarButton.js +0 -59
- package/lib/module/components/ToolbarButton.js.map +0 -1
- package/lib/module/constants/defaultStyles.d.js +0 -4
- package/lib/module/constants/defaultStyles.d.js.map +0 -1
- package/lib/module/constants/defaultStyles.js +0 -168
- package/lib/module/constants/defaultStyles.js.map +0 -1
- package/lib/module/context/RichTextContext.d.js +0 -4
- package/lib/module/context/RichTextContext.d.js.map +0 -1
- package/lib/module/context/RichTextContext.js +0 -55
- package/lib/module/context/RichTextContext.js.map +0 -1
- package/lib/module/hooks/useFormatting.d.js +0 -11
- package/lib/module/hooks/useFormatting.d.js.map +0 -1
- package/lib/module/hooks/useFormatting.js +0 -78
- package/lib/module/hooks/useFormatting.js.map +0 -1
- package/lib/module/hooks/useRichText.d.js +0 -4
- package/lib/module/hooks/useRichText.d.js.map +0 -1
- package/lib/module/hooks/useRichText.js +0 -132
- package/lib/module/hooks/useRichText.js.map +0 -1
- package/lib/module/hooks/useSelection.d.js +0 -4
- package/lib/module/hooks/useSelection.d.js.map +0 -1
- package/lib/module/hooks/useSelection.js +0 -35
- package/lib/module/hooks/useSelection.js.map +0 -1
- package/lib/module/index.d.js +0 -15
- package/lib/module/index.d.js.map +0 -1
- package/lib/module/index.js +0 -25
- package/lib/module/index.js.map +0 -1
- package/lib/module/types/index.d.js +0 -4
- package/lib/module/types/index.d.js.map +0 -1
- package/lib/module/types/index.js +0 -4
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/utils/formatter.d.js +0 -30
- package/lib/module/utils/formatter.d.js.map +0 -1
- package/lib/module/utils/formatter.js +0 -217
- package/lib/module/utils/formatter.js.map +0 -1
- package/lib/module/utils/parser.d.js +0 -4
- package/lib/module/utils/parser.d.js.map +0 -1
- package/lib/module/utils/parser.js +0 -211
- package/lib/module/utils/parser.js.map +0 -1
- package/lib/module/utils/styleMapper.d.js +0 -4
- package/lib/module/utils/styleMapper.d.js.map +0 -1
- package/lib/module/utils/styleMapper.js +0 -82
- package/lib/module/utils/styleMapper.js.map +0 -1
- package/lib/typescript/src/components/OverlayText.d.ts +0 -11
- package/lib/typescript/src/components/OverlayText.d.ts.map +0 -1
- package/lib/typescript/src/components/RichTextInput.d.ts +0 -21
- package/lib/typescript/src/components/RichTextInput.d.ts.map +0 -1
- package/lib/typescript/src/components/Toolbar.d.ts +0 -13
- package/lib/typescript/src/components/Toolbar.d.ts.map +0 -1
- package/lib/typescript/src/components/ToolbarButton.d.ts +0 -8
- package/lib/typescript/src/components/ToolbarButton.d.ts.map +0 -1
- package/lib/typescript/src/constants/defaultStyles.d.ts +0 -46
- package/lib/typescript/src/constants/defaultStyles.d.ts.map +0 -1
- package/lib/typescript/src/context/RichTextContext.d.ts +0 -31
- package/lib/typescript/src/context/RichTextContext.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useFormatting.d.ts +0 -26
- package/lib/typescript/src/hooks/useFormatting.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useRichText.d.ts +0 -17
- package/lib/typescript/src/hooks/useRichText.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useSelection.d.ts +0 -14
- package/lib/typescript/src/hooks/useSelection.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -16
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/types/index.d.ts +0 -245
- package/lib/typescript/src/types/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/formatter.d.ts +0 -29
- package/lib/typescript/src/utils/formatter.d.ts.map +0 -1
- package/lib/typescript/src/utils/parser.d.ts +0 -46
- package/lib/typescript/src/utils/parser.d.ts.map +0 -1
- package/lib/typescript/src/utils/styleMapper.d.ts +0 -16
- package/lib/typescript/src/utils/styleMapper.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-richify",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A production-grade, fully customizable React Native Rich Text Input using the Overlay Technique — no WebView required.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test:watch": "jest --watch",
|
|
21
21
|
"test:coverage": "jest --coverage",
|
|
22
22
|
"lint": "tsc --noEmit",
|
|
23
|
-
"prepare": "
|
|
23
|
+
"prepare": "husky",
|
|
24
24
|
"release": "npm publish"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
@@ -50,17 +50,18 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@react-native/babel-preset": "^0.84.1",
|
|
52
52
|
"@testing-library/jest-native": "^5.4.3",
|
|
53
|
-
"@testing-library/react-native": "
|
|
53
|
+
"@testing-library/react-native": "^13.3.3",
|
|
54
54
|
"@types/jest": "^29.5.12",
|
|
55
|
-
"@types/react": "
|
|
55
|
+
"@types/react": "^19.2.14",
|
|
56
56
|
"babel-jest": "^30.3.0",
|
|
57
57
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
58
|
+
"husky": "^9.1.7",
|
|
58
59
|
"jest": "^29.7.0",
|
|
59
|
-
"react": "
|
|
60
|
-
"react-native": "
|
|
61
|
-
"react-native-builder-bob": "
|
|
62
|
-
"react-test-renderer": "
|
|
63
|
-
"typescript": "
|
|
60
|
+
"react": "^19.2.4",
|
|
61
|
+
"react-native": "^0.84.1",
|
|
62
|
+
"react-native-builder-bob": "^0.41.0",
|
|
63
|
+
"react-test-renderer": "^19.2.4",
|
|
64
|
+
"typescript": "^6.0.2"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"react": ">=19.0.0",
|
|
@@ -80,4 +81,4 @@
|
|
|
80
81
|
]
|
|
81
82
|
]
|
|
82
83
|
}
|
|
83
|
-
}
|
|
84
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, View } from 'react-native';
|
|
3
|
-
import type { OverlayTextProps } from '
|
|
4
|
-
import { segmentToTextStyle } from '
|
|
5
|
-
import { DEFAULT_THEME } from '
|
|
3
|
+
import type { OverlayTextProps } from '../types';
|
|
4
|
+
import { segmentToTextStyle } from '../utils/styleMapper';
|
|
5
|
+
import { DEFAULT_THEME } from '../constants/defaultStyles';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* OverlayText renders the styled text segments as a `<Text>` component tree.
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
type NativeSyntheticEvent,
|
|
7
7
|
type TextInputSelectionChangeEventData,
|
|
8
8
|
} from 'react-native';
|
|
9
|
-
import type { RichTextInputProps } from '
|
|
10
|
-
import { DEFAULT_THEME } from '
|
|
11
|
-
import { segmentsToPlainText } from '
|
|
12
|
-
import { useRichText } from '
|
|
13
|
-
import { OverlayText } from '
|
|
14
|
-
import { Toolbar } from '
|
|
9
|
+
import type { RichTextInputProps } from '../types';
|
|
10
|
+
import { DEFAULT_THEME } from '../constants/defaultStyles';
|
|
11
|
+
import { segmentsToPlainText } from '../utils/parser';
|
|
12
|
+
import { useRichText } from '../hooks/useRichText';
|
|
13
|
+
import { OverlayText } from './OverlayText';
|
|
14
|
+
import { Toolbar } from './Toolbar';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* RichTextInput — The main rich text editor component.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { View, ScrollView, StyleSheet } from 'react-native';
|
|
3
|
-
import type { ToolbarProps, ToolbarItem } from '
|
|
4
|
-
import { DEFAULT_THEME, DEFAULT_TOOLBAR_ITEMS } from '
|
|
5
|
-
import { ToolbarButton } from '
|
|
3
|
+
import type { ToolbarProps, ToolbarItem } from '../types';
|
|
4
|
+
import { DEFAULT_THEME, DEFAULT_TOOLBAR_ITEMS } from '../constants/defaultStyles';
|
|
5
|
+
import { ToolbarButton } from './ToolbarButton';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Formatting toolbar for the rich text editor.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TouchableOpacity, Text, StyleSheet } from 'react-native';
|
|
3
|
-
import type { ToolbarButtonProps } from '
|
|
4
|
-
import { DEFAULT_THEME } from '
|
|
3
|
+
import type { ToolbarButtonProps } from '../types';
|
|
4
|
+
import { DEFAULT_THEME } from '../constants/defaultStyles';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A single toolbar button that toggles a formatting option.
|
|
@@ -19,16 +19,16 @@ export const ToolbarButton: React.FC<ToolbarButtonProps> = React.memo(
|
|
|
19
19
|
const buttonStyle = [
|
|
20
20
|
resolvedTheme.toolbarButtonStyle ?? DEFAULT_THEME.toolbarButtonStyle,
|
|
21
21
|
active &&
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
(resolvedTheme.toolbarButtonActiveStyle ??
|
|
23
|
+
DEFAULT_THEME.toolbarButtonActiveStyle),
|
|
24
24
|
];
|
|
25
25
|
|
|
26
26
|
const textStyle = [
|
|
27
27
|
resolvedTheme.toolbarButtonTextStyle ??
|
|
28
|
-
|
|
28
|
+
DEFAULT_THEME.toolbarButtonTextStyle,
|
|
29
29
|
active &&
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
(resolvedTheme.toolbarButtonActiveTextStyle ??
|
|
31
|
+
DEFAULT_THEME.toolbarButtonActiveTextStyle),
|
|
32
32
|
// Make italic button actually italic, bold button actually bold, etc.
|
|
33
33
|
label === 'I' && styles.italicLabel,
|
|
34
34
|
label === 'U' && styles.underlineLabel,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { UseRichTextReturn } from '
|
|
3
|
-
import { type UseRichTextOptions } from '
|
|
2
|
+
import type { UseRichTextReturn } from '../types';
|
|
3
|
+
import { type UseRichTextOptions } from '../hooks/useRichText';
|
|
4
4
|
export interface RichTextProviderProps extends UseRichTextOptions {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { createContext, useContext } from 'react';
|
|
2
|
-
import type { RichTextState, RichTextActions, UseRichTextReturn } from '
|
|
3
|
-
import { useRichText, type UseRichTextOptions } from '
|
|
2
|
+
import type { RichTextState, RichTextActions, UseRichTextReturn } from '../types';
|
|
3
|
+
import { useRichText, type UseRichTextOptions } from '../hooks/useRichText';
|
|
4
4
|
|
|
5
5
|
// ─── Context ─────────────────────────────────────────────────────────────────
|
|
6
6
|
|
|
@@ -56,7 +56,7 @@ export function useRichTextContext(): UseRichTextReturn {
|
|
|
56
56
|
if (!context) {
|
|
57
57
|
throw new Error(
|
|
58
58
|
'useRichTextContext must be used within a <RichTextProvider>. ' +
|
|
59
|
-
|
|
59
|
+
'Wrap your component tree with <RichTextProvider> to use this hook.',
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
return context;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StyledSegment, FormatType, FormatStyle, HeadingLevel, SelectionRange } from '
|
|
1
|
+
import type { StyledSegment, FormatType, FormatStyle, HeadingLevel, SelectionRange } from '../types';
|
|
2
2
|
interface UseFormattingOptions {
|
|
3
3
|
segments: StyledSegment[];
|
|
4
4
|
selection: SelectionRange;
|
|
@@ -22,4 +22,4 @@ export declare function useFormatting({ segments, selection, activeStyles, onSeg
|
|
|
22
22
|
isFormatActive: (format: FormatType) => boolean;
|
|
23
23
|
currentSelectionStyle: () => FormatStyle;
|
|
24
24
|
};
|
|
25
|
-
export {};
|
|
25
|
+
export { };
|
|
@@ -5,14 +5,14 @@ import type {
|
|
|
5
5
|
FormatStyle,
|
|
6
6
|
HeadingLevel,
|
|
7
7
|
SelectionRange,
|
|
8
|
-
} from '
|
|
8
|
+
} from '../types';
|
|
9
9
|
import {
|
|
10
10
|
toggleFormatOnSelection,
|
|
11
11
|
setStyleOnSelection,
|
|
12
12
|
setHeadingOnLine,
|
|
13
13
|
isFormatActiveInSelection,
|
|
14
14
|
getSelectionStyle,
|
|
15
|
-
} from '
|
|
15
|
+
} from '../utils/formatter';
|
|
16
16
|
|
|
17
17
|
interface UseFormattingOptions {
|
|
18
18
|
segments: StyledSegment[];
|
package/src/hooks/useRichText.ts
CHANGED
|
@@ -8,16 +8,16 @@ import type {
|
|
|
8
8
|
RichTextState,
|
|
9
9
|
RichTextActions,
|
|
10
10
|
UseRichTextReturn,
|
|
11
|
-
} from '
|
|
12
|
-
import { EMPTY_FORMAT_STYLE } from '
|
|
11
|
+
} from '../types';
|
|
12
|
+
import { EMPTY_FORMAT_STYLE } from '../constants/defaultStyles';
|
|
13
13
|
import {
|
|
14
14
|
createSegment,
|
|
15
15
|
segmentsToPlainText,
|
|
16
16
|
reconcileTextChange,
|
|
17
17
|
findPositionInSegments,
|
|
18
|
-
} from '
|
|
19
|
-
import { useSelection } from '
|
|
20
|
-
import { useFormatting } from '
|
|
18
|
+
} from '../utils/parser';
|
|
19
|
+
import { useSelection } from '../hooks/useSelection';
|
|
20
|
+
import { useFormatting } from '../hooks/useFormatting';
|
|
21
21
|
|
|
22
22
|
export interface UseRichTextOptions {
|
|
23
23
|
/** Initial segments to populate the editor with. */
|
package/src/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { RichTextInput } from '
|
|
2
|
-
export { OverlayText } from '
|
|
3
|
-
export { Toolbar } from '
|
|
4
|
-
export { ToolbarButton } from '
|
|
5
|
-
export { useRichText } from '
|
|
6
|
-
export type { UseRichTextOptions } from '
|
|
7
|
-
export { useSelection } from '
|
|
8
|
-
export { useFormatting } from '
|
|
9
|
-
export { RichTextProvider, useRichTextContext, } from '
|
|
10
|
-
export type { RichTextProviderProps } from '
|
|
11
|
-
export { createSegment, segmentsToPlainText, getTotalLength, mergeAdjacentSegments, reconcileTextChange, } from '
|
|
12
|
-
export { toggleFormatOnSelection, setStyleOnSelection, setHeadingOnLine, isFormatActiveInSelection, getSelectionStyle, } from '
|
|
13
|
-
export { formatStyleToTextStyle, segmentToTextStyle, segmentsToTextStyles, } from '
|
|
14
|
-
export { DEFAULT_COLORS, DEFAULT_THEME, DEFAULT_TOOLBAR_ITEMS, DEFAULT_BASE_TEXT_STYLE, HEADING_FONT_SIZES, EMPTY_FORMAT_STYLE, } from '
|
|
15
|
-
export type { FormatType, HeadingLevel, ListType, FormatStyle, StyledSegment, SelectionRange, RichTextState, RichTextActions, UseRichTextReturn, RichTextTheme, ToolbarItem, OverlayTextProps, ToolbarButtonProps, ToolbarProps, RichTextInputProps, } from '
|
|
1
|
+
export { RichTextInput } from './components/RichTextInput';
|
|
2
|
+
export { OverlayText } from './components/OverlayText';
|
|
3
|
+
export { Toolbar } from './components/Toolbar';
|
|
4
|
+
export { ToolbarButton } from './components/ToolbarButton';
|
|
5
|
+
export { useRichText } from './hooks/useRichText';
|
|
6
|
+
export type { UseRichTextOptions } from './hooks/useRichText';
|
|
7
|
+
export { useSelection } from './hooks/useSelection';
|
|
8
|
+
export { useFormatting } from './hooks/useFormatting';
|
|
9
|
+
export { RichTextProvider, useRichTextContext, } from './context/RichTextContext';
|
|
10
|
+
export type { RichTextProviderProps } from './context/RichTextContext';
|
|
11
|
+
export { createSegment, segmentsToPlainText, getTotalLength, mergeAdjacentSegments, reconcileTextChange, } from './utils/parser';
|
|
12
|
+
export { toggleFormatOnSelection, setStyleOnSelection, setHeadingOnLine, isFormatActiveInSelection, getSelectionStyle, } from './utils/formatter';
|
|
13
|
+
export { formatStyleToTextStyle, segmentToTextStyle, segmentsToTextStyles, } from './utils/styleMapper';
|
|
14
|
+
export { DEFAULT_COLORS, DEFAULT_THEME, DEFAULT_TOOLBAR_ITEMS, DEFAULT_BASE_TEXT_STYLE, HEADING_FONT_SIZES, EMPTY_FORMAT_STYLE, } from './constants/defaultStyles';
|
|
15
|
+
export type { FormatType, HeadingLevel, ListType, FormatStyle, StyledSegment, SelectionRange, RichTextState, RichTextActions, UseRichTextReturn, RichTextTheme, ToolbarItem, OverlayTextProps, ToolbarButtonProps, ToolbarProps, RichTextInputProps, } from './types';
|
package/src/index.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// ─── Components ──────────────────────────────────────────────────────────────
|
|
2
|
-
export { RichTextInput } from '
|
|
3
|
-
export { OverlayText } from '
|
|
4
|
-
export { Toolbar } from '
|
|
5
|
-
export { ToolbarButton } from '
|
|
2
|
+
export { RichTextInput } from './components/RichTextInput';
|
|
3
|
+
export { OverlayText } from './components/OverlayText';
|
|
4
|
+
export { Toolbar } from './components/Toolbar';
|
|
5
|
+
export { ToolbarButton } from './components/ToolbarButton';
|
|
6
6
|
|
|
7
7
|
// ─── Hooks ───────────────────────────────────────────────────────────────────
|
|
8
|
-
export { useRichText } from '
|
|
9
|
-
export type { UseRichTextOptions } from '
|
|
10
|
-
export { useSelection } from '
|
|
11
|
-
export { useFormatting } from '
|
|
8
|
+
export { useRichText } from './hooks/useRichText';
|
|
9
|
+
export type { UseRichTextOptions } from './hooks/useRichText';
|
|
10
|
+
export { useSelection } from './hooks/useSelection';
|
|
11
|
+
export { useFormatting } from './hooks/useFormatting';
|
|
12
12
|
|
|
13
13
|
// ─── Context ─────────────────────────────────────────────────────────────────
|
|
14
14
|
export {
|
|
15
15
|
RichTextProvider,
|
|
16
16
|
useRichTextContext,
|
|
17
|
-
} from '
|
|
18
|
-
export type { RichTextProviderProps } from '
|
|
17
|
+
} from './context/RichTextContext';
|
|
18
|
+
export type { RichTextProviderProps } from './context/RichTextContext';
|
|
19
19
|
|
|
20
20
|
// ─── Utilities ───────────────────────────────────────────────────────────────
|
|
21
21
|
export {
|
|
@@ -24,19 +24,19 @@ export {
|
|
|
24
24
|
getTotalLength,
|
|
25
25
|
mergeAdjacentSegments,
|
|
26
26
|
reconcileTextChange,
|
|
27
|
-
} from '
|
|
27
|
+
} from './utils/parser';
|
|
28
28
|
export {
|
|
29
29
|
toggleFormatOnSelection,
|
|
30
30
|
setStyleOnSelection,
|
|
31
31
|
setHeadingOnLine,
|
|
32
32
|
isFormatActiveInSelection,
|
|
33
33
|
getSelectionStyle,
|
|
34
|
-
} from '
|
|
34
|
+
} from './utils/formatter';
|
|
35
35
|
export {
|
|
36
36
|
formatStyleToTextStyle,
|
|
37
37
|
segmentToTextStyle,
|
|
38
38
|
segmentsToTextStyles,
|
|
39
|
-
} from '
|
|
39
|
+
} from './utils/styleMapper';
|
|
40
40
|
|
|
41
41
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
42
42
|
export {
|
|
@@ -46,7 +46,7 @@ export {
|
|
|
46
46
|
DEFAULT_BASE_TEXT_STYLE,
|
|
47
47
|
HEADING_FONT_SIZES,
|
|
48
48
|
EMPTY_FORMAT_STYLE,
|
|
49
|
-
} from '
|
|
49
|
+
} from './constants/defaultStyles';
|
|
50
50
|
|
|
51
51
|
// ─── Types ───────────────────────────────────────────────────────────────────
|
|
52
52
|
export type {
|
|
@@ -65,4 +65,4 @@ export type {
|
|
|
65
65
|
ToolbarButtonProps,
|
|
66
66
|
ToolbarProps,
|
|
67
67
|
RichTextInputProps,
|
|
68
|
-
} from '
|
|
68
|
+
} from './types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["components/OverlayText.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.OverlayText = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _styleMapper = require("@/utils/styleMapper");
|
|
10
|
-
var _defaultStyles = require("@/constants/defaultStyles");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
/**
|
|
14
|
-
* OverlayText renders the styled text segments as a `<Text>` component tree.
|
|
15
|
-
*
|
|
16
|
-
* This component is positioned behind the transparent TextInput to create
|
|
17
|
-
* the overlay effect — the user types into the TextInput while seeing
|
|
18
|
-
* the formatted rendering from this component.
|
|
19
|
-
*/
|
|
20
|
-
const OverlayText = exports.OverlayText = /*#__PURE__*/_react.default.memo(({
|
|
21
|
-
segments,
|
|
22
|
-
baseTextStyle,
|
|
23
|
-
theme
|
|
24
|
-
}) => {
|
|
25
|
-
const resolvedTheme = theme ?? _defaultStyles.DEFAULT_THEME;
|
|
26
|
-
const overlayStyle = resolvedTheme.overlayContainerStyle ?? _defaultStyles.DEFAULT_THEME.overlayContainerStyle;
|
|
27
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
28
|
-
style: overlayStyle,
|
|
29
|
-
pointerEvents: "none",
|
|
30
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
31
|
-
children: segments.map((segment, index) => {
|
|
32
|
-
if (segment.text.length === 0 && segments.length > 1) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
const textStyle = (0, _styleMapper.segmentToTextStyle)(segment, resolvedTheme);
|
|
36
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
37
|
-
style: [baseTextStyle, textStyle],
|
|
38
|
-
children: segment.text
|
|
39
|
-
}, `${index}-${segment.text.slice(0, 8)}`);
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
OverlayText.displayName = 'OverlayText';
|
|
45
|
-
//# sourceMappingURL=OverlayText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_styleMapper","_defaultStyles","_jsxRuntime","e","__esModule","default","OverlayText","exports","React","memo","segments","baseTextStyle","theme","resolvedTheme","DEFAULT_THEME","overlayStyle","overlayContainerStyle","jsx","View","style","pointerEvents","children","Text","map","segment","index","text","length","textStyle","segmentToTextStyle","slice","displayName"],"sourceRoot":"..\\..\\..\\src","sources":["components/OverlayText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA0D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,WAAuC,GAAAC,OAAA,CAAAD,WAAA,gBAAGE,cAAK,CAACC,IAAI,CAC/D,CAAC;EAAEC,QAAQ;EAAEC,aAAa;EAAEC;AAAM,CAAC,KAAK;EACtC,MAAMC,aAAa,GAAGD,KAAK,IAAIE,4BAAa;EAC5C,MAAMC,YAAY,GAChBF,aAAa,CAACG,qBAAqB,IACnCF,4BAAa,CAACE,qBAAqB;EAErC,oBACE,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IAACC,KAAK,EAAEJ,YAAa;IAACK,aAAa,EAAC,MAAM;IAAAC,QAAA,eAC7C,IAAAnB,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAuB,IAAI;MAAAD,QAAA,EACFX,QAAQ,CAACa,GAAG,CAAC,CAACC,OAAO,EAAEC,KAAK,KAAK;QAChC,IAAID,OAAO,CAACE,IAAI,CAACC,MAAM,KAAK,CAAC,IAAIjB,QAAQ,CAACiB,MAAM,GAAG,CAAC,EAAE;UACpD,OAAO,IAAI;QACb;QAEA,MAAMC,SAAS,GAAG,IAAAC,+BAAkB,EAACL,OAAO,EAAEX,aAAa,CAAC;QAE5D,oBACE,IAAAX,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAuB,IAAI;UAEHH,KAAK,EAAE,CAACR,aAAa,EAAEiB,SAAS,CAAE;UAAAP,QAAA,EAEjCG,OAAO,CAACE;QAAI,GAHR,GAAGD,KAAK,IAAID,OAAO,CAACE,IAAI,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAIrC,CAAC;MAEX,CAAC;IAAC,CACE;EAAC,CACH,CAAC;AAEX,CACF,CAAC;AAEDxB,WAAW,CAACyB,WAAW,GAAG,aAAa","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["components/RichTextInput.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RichTextInput = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _defaultStyles = require("@/constants/defaultStyles");
|
|
10
|
-
var _parser = require("@/utils/parser");
|
|
11
|
-
var _useRichText = require("@/hooks/useRichText");
|
|
12
|
-
var _OverlayText = require("@/components/OverlayText");
|
|
13
|
-
var _Toolbar = require("@/components/Toolbar");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
16
|
-
/**
|
|
17
|
-
* RichTextInput — The main rich text editor component.
|
|
18
|
-
*
|
|
19
|
-
* Uses the Overlay Technique:
|
|
20
|
-
* - A transparent `TextInput` on top captures user input and selection
|
|
21
|
-
* - A styled `<Text>` layer behind it renders the formatted content
|
|
22
|
-
* - Both share identical font metrics for pixel-perfect alignment
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <RichTextInput
|
|
27
|
-
* placeholder="Start typing..."
|
|
28
|
-
* showToolbar
|
|
29
|
-
* onChangeSegments={(segments) => console.log(segments)}
|
|
30
|
-
* />
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
const RichTextInput = ({
|
|
34
|
-
initialSegments,
|
|
35
|
-
onChangeSegments,
|
|
36
|
-
onChangeText,
|
|
37
|
-
placeholder = 'Start typing...',
|
|
38
|
-
editable = true,
|
|
39
|
-
maxLength,
|
|
40
|
-
showToolbar = true,
|
|
41
|
-
toolbarPosition = 'top',
|
|
42
|
-
toolbarItems,
|
|
43
|
-
theme,
|
|
44
|
-
multiline = true,
|
|
45
|
-
minHeight = 120,
|
|
46
|
-
maxHeight,
|
|
47
|
-
autoFocus = false,
|
|
48
|
-
textInputProps,
|
|
49
|
-
renderToolbar,
|
|
50
|
-
onReady
|
|
51
|
-
}) => {
|
|
52
|
-
const resolvedTheme = theme ?? _defaultStyles.DEFAULT_THEME;
|
|
53
|
-
const {
|
|
54
|
-
state,
|
|
55
|
-
actions
|
|
56
|
-
} = (0, _useRichText.useRichText)({
|
|
57
|
-
initialSegments,
|
|
58
|
-
onChangeSegments,
|
|
59
|
-
onChangeText
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// Expose actions via onReady callback
|
|
63
|
-
(0, _react.useEffect)(() => {
|
|
64
|
-
onReady?.(actions);
|
|
65
|
-
}, [onReady, actions]);
|
|
66
|
-
|
|
67
|
-
// Build plain text for the TextInput value
|
|
68
|
-
const plainText = (0, _parser.segmentsToPlainText)(state.segments);
|
|
69
|
-
|
|
70
|
-
// Handle selection change from TextInput
|
|
71
|
-
const onSelectionChange = (0, _react.useCallback)(e => {
|
|
72
|
-
const {
|
|
73
|
-
start,
|
|
74
|
-
end
|
|
75
|
-
} = e.nativeEvent.selection;
|
|
76
|
-
actions.handleSelectionChange({
|
|
77
|
-
start,
|
|
78
|
-
end
|
|
79
|
-
});
|
|
80
|
-
}, [actions]);
|
|
81
|
-
|
|
82
|
-
// Container style
|
|
83
|
-
const containerStyle = [resolvedTheme.containerStyle ?? _defaultStyles.DEFAULT_THEME.containerStyle];
|
|
84
|
-
|
|
85
|
-
// Input area style
|
|
86
|
-
const inputAreaStyle = [styles.inputArea, {
|
|
87
|
-
minHeight
|
|
88
|
-
}, maxHeight ? {
|
|
89
|
-
maxHeight
|
|
90
|
-
} : undefined];
|
|
91
|
-
|
|
92
|
-
// Input style
|
|
93
|
-
const inputStyle = [styles.textInput, resolvedTheme.inputStyle ?? _defaultStyles.DEFAULT_THEME.inputStyle];
|
|
94
|
-
|
|
95
|
-
// Toolbar component
|
|
96
|
-
const toolbarComponent = showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Toolbar.Toolbar, {
|
|
97
|
-
actions: actions,
|
|
98
|
-
state: state,
|
|
99
|
-
items: toolbarItems,
|
|
100
|
-
theme: resolvedTheme,
|
|
101
|
-
renderToolbar: renderToolbar
|
|
102
|
-
}) : null;
|
|
103
|
-
|
|
104
|
-
// Toolbar border
|
|
105
|
-
const toolbarBorderStyle = toolbarPosition === 'top' ? {
|
|
106
|
-
borderBottomWidth: 1,
|
|
107
|
-
borderBottomColor: resolvedTheme.colors?.toolbarBorder ?? _defaultStyles.DEFAULT_THEME.colors?.toolbarBorder
|
|
108
|
-
} : {
|
|
109
|
-
borderTopWidth: 1,
|
|
110
|
-
borderTopColor: resolvedTheme.colors?.toolbarBorder ?? _defaultStyles.DEFAULT_THEME.colors?.toolbarBorder
|
|
111
|
-
};
|
|
112
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
113
|
-
style: containerStyle,
|
|
114
|
-
children: [toolbarPosition === 'top' && toolbarComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
115
|
-
style: toolbarBorderStyle,
|
|
116
|
-
children: toolbarComponent
|
|
117
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
118
|
-
style: inputAreaStyle,
|
|
119
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OverlayText.OverlayText, {
|
|
120
|
-
segments: state.segments,
|
|
121
|
-
baseTextStyle: resolvedTheme.baseTextStyle,
|
|
122
|
-
theme: resolvedTheme
|
|
123
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
124
|
-
...textInputProps,
|
|
125
|
-
style: inputStyle,
|
|
126
|
-
value: plainText,
|
|
127
|
-
onChangeText: actions.handleTextChange,
|
|
128
|
-
onSelectionChange: onSelectionChange,
|
|
129
|
-
multiline: multiline,
|
|
130
|
-
placeholder: placeholder,
|
|
131
|
-
placeholderTextColor: resolvedTheme.colors?.placeholder ?? _defaultStyles.DEFAULT_THEME.colors?.placeholder,
|
|
132
|
-
editable: editable,
|
|
133
|
-
maxLength: maxLength,
|
|
134
|
-
autoFocus: autoFocus,
|
|
135
|
-
selectionColor: resolvedTheme.colors?.cursor ?? _defaultStyles.DEFAULT_THEME.colors?.cursor,
|
|
136
|
-
textAlignVertical: "top",
|
|
137
|
-
scrollEnabled: true
|
|
138
|
-
})]
|
|
139
|
-
}), toolbarPosition === 'bottom' && toolbarComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
140
|
-
style: toolbarBorderStyle,
|
|
141
|
-
children: toolbarComponent
|
|
142
|
-
})]
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
exports.RichTextInput = RichTextInput;
|
|
146
|
-
RichTextInput.displayName = 'RichTextInput';
|
|
147
|
-
const styles = _reactNative.StyleSheet.create({
|
|
148
|
-
inputArea: {
|
|
149
|
-
position: 'relative'
|
|
150
|
-
},
|
|
151
|
-
textInput: {
|
|
152
|
-
// The TextInput must be transparent so the overlay text shows through.
|
|
153
|
-
// Only the caret/cursor and selection highlight are visible.
|
|
154
|
-
color: 'transparent',
|
|
155
|
-
// Ensure it matches the overlay text positioning exactly.
|
|
156
|
-
position: 'relative',
|
|
157
|
-
zIndex: 1
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
//# sourceMappingURL=RichTextInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_defaultStyles","_parser","_useRichText","_OverlayText","_Toolbar","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RichTextInput","initialSegments","onChangeSegments","onChangeText","placeholder","editable","maxLength","showToolbar","toolbarPosition","toolbarItems","theme","multiline","minHeight","maxHeight","autoFocus","textInputProps","renderToolbar","onReady","resolvedTheme","DEFAULT_THEME","state","actions","useRichText","useEffect","plainText","segmentsToPlainText","segments","onSelectionChange","useCallback","start","end","nativeEvent","selection","handleSelectionChange","containerStyle","inputAreaStyle","styles","inputArea","undefined","inputStyle","textInput","toolbarComponent","jsx","Toolbar","items","toolbarBorderStyle","borderBottomWidth","borderBottomColor","colors","toolbarBorder","borderTopWidth","borderTopColor","jsxs","View","style","children","OverlayText","baseTextStyle","TextInput","value","handleTextChange","placeholderTextColor","selectionColor","cursor","textAlignVertical","scrollEnabled","exports","displayName","StyleSheet","create","position","color","zIndex"],"sourceRoot":"..\\..\\..\\src","sources":["components/RichTextInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAA+C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM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