react-native-richify 1.0.1 → 1.0.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/lib/commonjs/components/OverlayText.d.js +6 -0
- package/lib/commonjs/components/OverlayText.d.js.map +1 -0
- package/lib/commonjs/components/OverlayText.js +51 -0
- package/lib/commonjs/components/OverlayText.js.map +1 -0
- package/lib/commonjs/components/RichTextInput.d.js +6 -0
- package/lib/commonjs/components/RichTextInput.d.js.map +1 -0
- package/lib/commonjs/components/RichTextInput.js +163 -0
- package/lib/commonjs/components/RichTextInput.js.map +1 -0
- package/lib/commonjs/components/Toolbar.d.js +6 -0
- package/lib/commonjs/components/Toolbar.d.js.map +1 -0
- package/lib/commonjs/components/Toolbar.js +96 -0
- package/lib/commonjs/components/Toolbar.js.map +1 -0
- package/lib/commonjs/components/ToolbarButton.d.js +6 -0
- package/lib/commonjs/components/ToolbarButton.d.js.map +1 -0
- package/lib/commonjs/components/ToolbarButton.js +63 -0
- package/lib/commonjs/components/ToolbarButton.js.map +1 -0
- package/lib/commonjs/constants/defaultStyles.d.js +6 -0
- package/lib/commonjs/constants/defaultStyles.d.js.map +1 -0
- package/lib/commonjs/constants/defaultStyles.js +172 -0
- package/lib/commonjs/constants/defaultStyles.js.map +1 -0
- package/lib/commonjs/context/RichTextContext.d.js +6 -0
- package/lib/commonjs/context/RichTextContext.d.js.map +1 -0
- package/lib/commonjs/context/RichTextContext.js +61 -0
- package/lib/commonjs/context/RichTextContext.js.map +1 -0
- package/lib/commonjs/hooks/useFormatting.d.js +6 -0
- package/lib/commonjs/hooks/useFormatting.d.js.map +1 -0
- package/lib/commonjs/hooks/useFormatting.js +82 -0
- package/lib/commonjs/hooks/useFormatting.js.map +1 -0
- package/lib/commonjs/hooks/useRichText.d.js +6 -0
- package/lib/commonjs/hooks/useRichText.d.js.map +1 -0
- package/lib/commonjs/hooks/useRichText.js +142 -0
- package/lib/commonjs/hooks/useRichText.js.map +1 -0
- package/lib/commonjs/hooks/useSelection.d.js +6 -0
- package/lib/commonjs/hooks/useSelection.d.js.map +1 -0
- package/lib/commonjs/hooks/useSelection.js +39 -0
- package/lib/commonjs/hooks/useSelection.js.map +1 -0
- package/lib/commonjs/index.d.js +186 -0
- package/lib/commonjs/index.d.js.map +1 -0
- package/lib/commonjs/index.js +186 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types/index.d.js +6 -0
- package/lib/commonjs/types/index.d.js.map +1 -0
- package/lib/commonjs/types/index.js +6 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/utils/formatter.d.js +13 -0
- package/lib/commonjs/utils/formatter.d.js.map +1 -0
- package/lib/commonjs/utils/formatter.js +229 -0
- package/lib/commonjs/utils/formatter.js.map +1 -0
- package/lib/commonjs/utils/parser.d.js +6 -0
- package/lib/commonjs/utils/parser.d.js.map +1 -0
- package/lib/commonjs/utils/parser.js +221 -0
- package/lib/commonjs/utils/parser.js.map +1 -0
- package/lib/commonjs/utils/styleMapper.d.js +6 -0
- package/lib/commonjs/utils/styleMapper.d.js.map +1 -0
- package/lib/commonjs/utils/styleMapper.js +87 -0
- package/lib/commonjs/utils/styleMapper.js.map +1 -0
- package/lib/module/components/OverlayText.d.js +4 -0
- package/lib/module/components/OverlayText.d.js.map +1 -0
- package/lib/module/components/OverlayText.js +47 -0
- package/lib/module/components/OverlayText.js.map +1 -0
- package/lib/module/components/RichTextInput.d.js +4 -0
- package/lib/module/components/RichTextInput.d.js.map +1 -0
- package/lib/module/components/RichTextInput.js +158 -0
- package/lib/module/components/RichTextInput.js.map +1 -0
- package/lib/module/components/Toolbar.d.js +4 -0
- package/lib/module/components/Toolbar.d.js.map +1 -0
- package/lib/module/components/Toolbar.js +92 -0
- package/lib/module/components/Toolbar.js.map +1 -0
- package/lib/module/components/ToolbarButton.d.js +4 -0
- package/lib/module/components/ToolbarButton.d.js.map +1 -0
- package/lib/module/components/ToolbarButton.js +59 -0
- package/lib/module/components/ToolbarButton.js.map +1 -0
- package/lib/module/constants/defaultStyles.d.js +4 -0
- package/lib/module/constants/defaultStyles.d.js.map +1 -0
- package/lib/module/constants/defaultStyles.js +168 -0
- package/lib/module/constants/defaultStyles.js.map +1 -0
- package/lib/module/context/RichTextContext.d.js +4 -0
- package/lib/module/context/RichTextContext.d.js.map +1 -0
- package/lib/module/context/RichTextContext.js +55 -0
- package/lib/module/context/RichTextContext.js.map +1 -0
- package/lib/module/hooks/useFormatting.d.js +11 -0
- package/lib/module/hooks/useFormatting.d.js.map +1 -0
- package/lib/module/hooks/useFormatting.js +78 -0
- package/lib/module/hooks/useFormatting.js.map +1 -0
- package/lib/module/hooks/useRichText.d.js +4 -0
- package/lib/module/hooks/useRichText.d.js.map +1 -0
- package/lib/module/hooks/useRichText.js +138 -0
- package/lib/module/hooks/useRichText.js.map +1 -0
- package/lib/module/hooks/useSelection.d.js +4 -0
- package/lib/module/hooks/useSelection.d.js.map +1 -0
- package/lib/module/hooks/useSelection.js +35 -0
- package/lib/module/hooks/useSelection.js.map +1 -0
- package/lib/module/index.d.js +15 -0
- package/lib/module/index.d.js.map +1 -0
- package/lib/module/index.js +25 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/types/index.d.js +4 -0
- package/lib/module/types/index.d.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/utils/formatter.d.js +30 -0
- package/lib/module/utils/formatter.d.js.map +1 -0
- package/lib/module/utils/formatter.js +217 -0
- package/lib/module/utils/formatter.js.map +1 -0
- package/lib/module/utils/parser.d.js +4 -0
- package/lib/module/utils/parser.d.js.map +1 -0
- package/lib/module/utils/parser.js +211 -0
- package/lib/module/utils/parser.js.map +1 -0
- package/lib/module/utils/styleMapper.d.js +4 -0
- package/lib/module/utils/styleMapper.d.js.map +1 -0
- package/lib/module/utils/styleMapper.js +82 -0
- package/lib/module/utils/styleMapper.js.map +1 -0
- package/lib/typescript/src/components/OverlayText.d.ts +11 -0
- package/lib/typescript/src/components/OverlayText.d.ts.map +1 -0
- package/lib/typescript/src/components/RichTextInput.d.ts +21 -0
- package/lib/typescript/src/components/RichTextInput.d.ts.map +1 -0
- package/lib/typescript/src/components/Toolbar.d.ts +13 -0
- package/lib/typescript/src/components/Toolbar.d.ts.map +1 -0
- package/lib/typescript/src/components/ToolbarButton.d.ts +8 -0
- package/lib/typescript/src/components/ToolbarButton.d.ts.map +1 -0
- package/lib/typescript/src/constants/defaultStyles.d.ts +46 -0
- package/lib/typescript/src/constants/defaultStyles.d.ts.map +1 -0
- package/lib/typescript/src/context/RichTextContext.d.ts +31 -0
- package/lib/typescript/src/context/RichTextContext.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useFormatting.d.ts +26 -0
- package/lib/typescript/src/hooks/useFormatting.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useRichText.d.ts +17 -0
- package/lib/typescript/src/hooks/useRichText.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSelection.d.ts +14 -0
- package/lib/typescript/src/hooks/useSelection.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +16 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +257 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatter.d.ts +29 -0
- package/lib/typescript/src/utils/formatter.d.ts.map +1 -0
- package/lib/typescript/src/utils/parser.d.ts +46 -0
- package/lib/typescript/src/utils/parser.d.ts.map +1 -0
- package/lib/typescript/src/utils/styleMapper.d.ts +16 -0
- package/lib/typescript/src/utils/styleMapper.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/OverlayText.tsx +11 -3
- package/src/components/RichTextInput.tsx +11 -5
- package/src/components/Toolbar.d.ts +1 -1
- package/src/components/Toolbar.tsx +5 -5
- package/src/components/ToolbarButton.d.ts +1 -1
- package/src/constants/defaultStyles.d.ts +1 -1
- package/src/hooks/useRichText.ts +11 -4
- package/src/index.d.ts +1 -1
- package/src/index.ts +2 -0
- package/src/types/index.d.ts +22 -10
- package/src/types/index.ts +24 -10
- package/src/utils/formatter.d.ts +2 -2
- package/src/utils/formatter.ts +4 -4
- package/src/utils/parser.d.ts +1 -1
- package/src/utils/parser.ts +2 -2
- package/src/utils/styleMapper.d.ts +1 -1
- package/src/utils/styleMapper.ts +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/OverlayText.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
const resolvedBaseTextStyle = baseTextStyle ?? resolvedTheme.baseTextStyle ?? _defaultStyles.DEFAULT_THEME.baseTextStyle;
|
|
28
|
+
const overlayTheme = {
|
|
29
|
+
...resolvedTheme,
|
|
30
|
+
baseTextStyle: resolvedBaseTextStyle
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
33
|
+
style: overlayStyle,
|
|
34
|
+
pointerEvents: "none",
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
36
|
+
style: resolvedBaseTextStyle,
|
|
37
|
+
children: segments.map((segment, index) => {
|
|
38
|
+
if (segment.text.length === 0 && segments.length > 1) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const textStyle = (0, _styleMapper.segmentToTextStyle)(segment, overlayTheme);
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
43
|
+
style: textStyle,
|
|
44
|
+
children: segment.text
|
|
45
|
+
}, `${index}-${segment.text.slice(0, 8)}`);
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
OverlayText.displayName = 'OverlayText';
|
|
51
|
+
//# sourceMappingURL=OverlayText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","resolvedBaseTextStyle","overlayTheme","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,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AEhBG,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;AAED1B,WAAW,CAAC2B,WAAW,GAAG,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/RichTextInput.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,163 @@
|
|
|
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("./OverlayText");
|
|
13
|
+
var _Toolbar = require("./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.baseTextStyle ?? _defaultStyles.DEFAULT_THEME.baseTextStyle, resolvedTheme.inputStyle ?? _defaultStyles.DEFAULT_THEME.inputStyle, textInputProps?.style, styles.hiddenInputText];
|
|
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
|
+
underlineColorAndroid: "transparent",
|
|
136
|
+
selectionColor: resolvedTheme.colors?.cursor ?? _defaultStyles.DEFAULT_THEME.colors?.cursor,
|
|
137
|
+
textAlignVertical: "top",
|
|
138
|
+
scrollEnabled: typeof maxHeight === 'number'
|
|
139
|
+
})]
|
|
140
|
+
}), toolbarPosition === 'bottom' && toolbarComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
141
|
+
style: toolbarBorderStyle,
|
|
142
|
+
children: toolbarComponent
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
exports.RichTextInput = RichTextInput;
|
|
147
|
+
RichTextInput.displayName = 'RichTextInput';
|
|
148
|
+
const styles = _reactNative.StyleSheet.create({
|
|
149
|
+
inputArea: {
|
|
150
|
+
position: 'relative'
|
|
151
|
+
},
|
|
152
|
+
textInput: {
|
|
153
|
+
position: 'relative',
|
|
154
|
+
zIndex: 1
|
|
155
|
+
},
|
|
156
|
+
hiddenInputText: {
|
|
157
|
+
// Keep the editable layer invisible while preserving the caret.
|
|
158
|
+
color: 'transparent',
|
|
159
|
+
backgroundColor: 'transparent',
|
|
160
|
+
textShadowColor: 'transparent'
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
//# sourceMappingURL=RichTextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","baseTextStyle","style","hiddenInputText","toolbarComponent","jsx","Toolbar","items","toolbarBorderStyle","borderBottomWidth","borderBottomColor","colors","toolbarBorder","borderTopWidth","borderTopColor","jsxs","View","children","OverlayText","TextInput","value","handleTextChange","placeholderTextColor","underlineColorAndroid","selectionColor","cursor","textAlignVertical","scrollEnabled","exports","displayName","StyleSheet","create","position","zIndex","color","backgroundColor","textShadowColor"],"sourceRoot":"../../../src","sources":["components/RichTextInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA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SAAS,EAAE;IACTmC,QAAQ,EAAE;EACZ,CAAC;EACDhC,SAAS,EAAE;IACTgC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE;EACV,CAAC;EACD9B,eAAe,EAAE;IACf;IACA+B,KAAK,EAAE,aAAa;IACpBC,eAAe,EAAE,aAAa;IAC9BC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/Toolbar.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Toolbar = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _defaultStyles = require("../constants/defaultStyles");
|
|
10
|
+
var _ToolbarButton = require("./ToolbarButton");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
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); }
|
|
13
|
+
/**
|
|
14
|
+
* Formatting toolbar for the rich text editor.
|
|
15
|
+
*
|
|
16
|
+
* Supports:
|
|
17
|
+
* - Default toolbar items (bold, italic, underline, etc.)
|
|
18
|
+
* - Custom toolbar items via the `items` prop
|
|
19
|
+
* - Fully custom rendering via `renderToolbar`
|
|
20
|
+
* - Horizontal scrolling for overflow
|
|
21
|
+
*/
|
|
22
|
+
const Toolbar = exports.Toolbar = /*#__PURE__*/_react.default.memo(({
|
|
23
|
+
actions,
|
|
24
|
+
state,
|
|
25
|
+
items,
|
|
26
|
+
theme,
|
|
27
|
+
visible = true,
|
|
28
|
+
renderToolbar
|
|
29
|
+
}) => {
|
|
30
|
+
const resolvedTheme = theme ?? _defaultStyles.DEFAULT_THEME;
|
|
31
|
+
const toolbarItems = items ?? _defaultStyles.DEFAULT_TOOLBAR_ITEMS;
|
|
32
|
+
|
|
33
|
+
// Compute active state for each item
|
|
34
|
+
const enrichedItems = (0, _react.useMemo)(() => {
|
|
35
|
+
const selectionStyle = actions.getSelectionStyle();
|
|
36
|
+
return toolbarItems.map(item => {
|
|
37
|
+
let isActive = false;
|
|
38
|
+
if (item.format) {
|
|
39
|
+
isActive = actions.isFormatActive(item.format);
|
|
40
|
+
}
|
|
41
|
+
if (item.heading) {
|
|
42
|
+
isActive = selectionStyle.heading === item.heading;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
...item,
|
|
46
|
+
active: item.active ?? isActive
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
}, [actions, toolbarItems]);
|
|
50
|
+
|
|
51
|
+
// Custom render
|
|
52
|
+
if (renderToolbar) {
|
|
53
|
+
return renderToolbar({
|
|
54
|
+
items: enrichedItems,
|
|
55
|
+
state,
|
|
56
|
+
actions
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (!visible) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const toolbarStyle = [resolvedTheme.toolbarStyle ?? _defaultStyles.DEFAULT_THEME.toolbarStyle];
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
64
|
+
style: toolbarStyle,
|
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
66
|
+
horizontal: true,
|
|
67
|
+
showsHorizontalScrollIndicator: false,
|
|
68
|
+
keyboardShouldPersistTaps: "always",
|
|
69
|
+
contentContainerStyle: styles.scrollContent,
|
|
70
|
+
children: enrichedItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolbarButton.ToolbarButton, {
|
|
71
|
+
label: item.label,
|
|
72
|
+
active: !!item.active,
|
|
73
|
+
theme: resolvedTheme,
|
|
74
|
+
renderButton: item.renderButton,
|
|
75
|
+
onPress: () => {
|
|
76
|
+
if (item.onPress) {
|
|
77
|
+
item.onPress();
|
|
78
|
+
} else if (item.format) {
|
|
79
|
+
actions.toggleFormat(item.format);
|
|
80
|
+
} else if (item.heading) {
|
|
81
|
+
actions.setHeading(item.heading);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, item.id))
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
Toolbar.displayName = 'Toolbar';
|
|
89
|
+
const styles = _reactNative.StyleSheet.create({
|
|
90
|
+
scrollContent: {
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
gap: 2
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_defaultStyles","_ToolbarButton","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Toolbar","exports","React","memo","actions","state","items","theme","visible","renderToolbar","resolvedTheme","DEFAULT_THEME","toolbarItems","DEFAULT_TOOLBAR_ITEMS","enrichedItems","useMemo","selectionStyle","getSelectionStyle","map","item","isActive","format","isFormatActive","heading","active","toolbarStyle","jsx","View","style","children","ScrollView","horizontal","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","contentContainerStyle","styles","scrollContent","ToolbarButton","label","renderButton","onPress","toggleFormat","setHeading","id","displayName","StyleSheet","create","flexDirection","alignItems","gap"],"sourceRoot":"../../../src","sources":["components/Toolbar.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAAgD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,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,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAA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../src","sources":["components/ToolbarButton.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ToolbarButton = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _defaultStyles = require("../constants/defaultStyles");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* A single toolbar button that toggles a formatting option.
|
|
14
|
+
* Supports custom rendering via the `renderButton` prop.
|
|
15
|
+
*/
|
|
16
|
+
const ToolbarButton = exports.ToolbarButton = /*#__PURE__*/_react.default.memo(({
|
|
17
|
+
label,
|
|
18
|
+
active,
|
|
19
|
+
onPress,
|
|
20
|
+
theme,
|
|
21
|
+
renderButton
|
|
22
|
+
}) => {
|
|
23
|
+
// Custom render
|
|
24
|
+
if (renderButton) {
|
|
25
|
+
return renderButton({
|
|
26
|
+
active,
|
|
27
|
+
onPress,
|
|
28
|
+
label
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const resolvedTheme = theme ?? _defaultStyles.DEFAULT_THEME;
|
|
32
|
+
const buttonStyle = [resolvedTheme.toolbarButtonStyle ?? _defaultStyles.DEFAULT_THEME.toolbarButtonStyle, active && (resolvedTheme.toolbarButtonActiveStyle ?? _defaultStyles.DEFAULT_THEME.toolbarButtonActiveStyle)];
|
|
33
|
+
const textStyle = [resolvedTheme.toolbarButtonTextStyle ?? _defaultStyles.DEFAULT_THEME.toolbarButtonTextStyle, active && (resolvedTheme.toolbarButtonActiveTextStyle ?? _defaultStyles.DEFAULT_THEME.toolbarButtonActiveTextStyle),
|
|
34
|
+
// Make italic button actually italic, bold button actually bold, etc.
|
|
35
|
+
label === 'I' && styles.italicLabel, label === 'U' && styles.underlineLabel, label === 'S' && styles.strikethroughLabel];
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
37
|
+
style: buttonStyle,
|
|
38
|
+
onPress: onPress,
|
|
39
|
+
activeOpacity: 0.7,
|
|
40
|
+
accessibilityRole: "button",
|
|
41
|
+
accessibilityLabel: `Format ${label}`,
|
|
42
|
+
accessibilityState: {
|
|
43
|
+
selected: active
|
|
44
|
+
},
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
46
|
+
style: textStyle,
|
|
47
|
+
children: label
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
ToolbarButton.displayName = 'ToolbarButton';
|
|
52
|
+
const styles = _reactNative.StyleSheet.create({
|
|
53
|
+
italicLabel: {
|
|
54
|
+
fontStyle: 'italic'
|
|
55
|
+
},
|
|
56
|
+
underlineLabel: {
|
|
57
|
+
textDecorationLine: 'underline'
|
|
58
|
+
},
|
|
59
|
+
strikethroughLabel: {
|
|
60
|
+
textDecorationLine: 'line-through'
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=ToolbarButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_defaultStyles","_jsxRuntime","e","__esModule","default","ToolbarButton","exports","React","memo","label","active","onPress","theme","renderButton","resolvedTheme","DEFAULT_THEME","buttonStyle","toolbarButtonStyle","toolbarButtonActiveStyle","textStyle","toolbarButtonTextStyle","toolbarButtonActiveTextStyle","styles","italicLabel","underlineLabel","strikethroughLabel","jsx","TouchableOpacity","style","activeOpacity","accessibilityRole","accessibilityLabel","accessibilityState","selected","children","Text","displayName","StyleSheet","create","fontStyle","textDecorationLine"],"sourceRoot":"../../../src","sources":["components/ToolbarButton.tsx"],"mappings":";;;;;;AAAA,IA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C,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAE,UAAUtB,KAAK,EAAG;IACtCuB,kBAAkB,EAAE;MAAEC,QAAQ,EAAEvB;IAAO,CAAE;IAAAwB,QAAA,eAEzC,IAAAjC,WAAA,CAAAyB,GAAA,EAAC3B,YAAA,CAAAoC,IAAI;MAACP,KAAK,EAAET,SAAU;MAAAe,QAAA,EAAEzB;IAAK,CAAO;EAAC,CACtB,CAAC;AAEvB,CACF,CAAC;AAEDJ,aAAa,CAAC+B,WAAW,GAAG,eAAe;AAE3C,MAAMd,MAAM,GAAGe,uBAAU,CAACC,MAAM,CAAC;EAC/Bf,WAAW,EAAE;IACXgB,SAAS,EAAE;EACb,CAAC;EACDf,cAAc,EAAE;IACdgB,kBAAkB,EAAE;EACtB,CAAC;EACDf,kBAAkB,EAAE;IAClBe,kBAAkB,EAAE;EACtB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["constants/defaultStyles.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HEADING_FONT_SIZES = exports.EMPTY_FORMAT_STYLE = exports.DEFAULT_TOOLBAR_ITEMS = exports.DEFAULT_THEME = exports.DEFAULT_COLORS = exports.DEFAULT_BASE_TEXT_STYLE = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Default color palette used throughout the editor.
|
|
9
|
+
*/
|
|
10
|
+
const DEFAULT_COLORS = exports.DEFAULT_COLORS = {
|
|
11
|
+
primary: '#6366F1',
|
|
12
|
+
background: '#FFFFFF',
|
|
13
|
+
text: '#1F2937',
|
|
14
|
+
placeholder: '#9CA3AF',
|
|
15
|
+
toolbarBackground: '#F9FAFB',
|
|
16
|
+
toolbarBorder: '#E5E7EB',
|
|
17
|
+
cursor: '#6366F1',
|
|
18
|
+
activeButtonBg: '#EEF2FF',
|
|
19
|
+
codeBackground: '#F3F4F6'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Font size presets for heading levels.
|
|
24
|
+
*/
|
|
25
|
+
const HEADING_FONT_SIZES = exports.HEADING_FONT_SIZES = {
|
|
26
|
+
h1: 32,
|
|
27
|
+
h2: 24,
|
|
28
|
+
h3: 20,
|
|
29
|
+
none: 16
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Default base text style applied to all segments.
|
|
34
|
+
*/
|
|
35
|
+
const DEFAULT_BASE_TEXT_STYLE = exports.DEFAULT_BASE_TEXT_STYLE = {
|
|
36
|
+
fontSize: 16,
|
|
37
|
+
lineHeight: 24,
|
|
38
|
+
color: DEFAULT_COLORS.text,
|
|
39
|
+
fontFamily: undefined // Uses system default
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Empty format style — no formatting applied.
|
|
44
|
+
*/
|
|
45
|
+
const EMPTY_FORMAT_STYLE = exports.EMPTY_FORMAT_STYLE = {
|
|
46
|
+
bold: false,
|
|
47
|
+
italic: false,
|
|
48
|
+
underline: false,
|
|
49
|
+
strikethrough: false,
|
|
50
|
+
code: false,
|
|
51
|
+
color: undefined,
|
|
52
|
+
backgroundColor: undefined,
|
|
53
|
+
fontSize: undefined,
|
|
54
|
+
heading: undefined
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Default theme configuration.
|
|
59
|
+
*/
|
|
60
|
+
const DEFAULT_THEME = exports.DEFAULT_THEME = {
|
|
61
|
+
containerStyle: {
|
|
62
|
+
borderWidth: 1,
|
|
63
|
+
borderColor: DEFAULT_COLORS.toolbarBorder,
|
|
64
|
+
borderRadius: 12,
|
|
65
|
+
backgroundColor: DEFAULT_COLORS.background,
|
|
66
|
+
overflow: 'hidden'
|
|
67
|
+
},
|
|
68
|
+
inputStyle: {
|
|
69
|
+
fontSize: DEFAULT_BASE_TEXT_STYLE.fontSize,
|
|
70
|
+
lineHeight: DEFAULT_BASE_TEXT_STYLE.lineHeight,
|
|
71
|
+
color: 'transparent',
|
|
72
|
+
paddingHorizontal: 16,
|
|
73
|
+
paddingVertical: 12,
|
|
74
|
+
textAlignVertical: 'top'
|
|
75
|
+
},
|
|
76
|
+
overlayContainerStyle: {
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
top: 0,
|
|
79
|
+
left: 0,
|
|
80
|
+
right: 0,
|
|
81
|
+
bottom: 0,
|
|
82
|
+
paddingHorizontal: 16,
|
|
83
|
+
paddingVertical: 12
|
|
84
|
+
},
|
|
85
|
+
baseTextStyle: {
|
|
86
|
+
fontSize: DEFAULT_BASE_TEXT_STYLE.fontSize,
|
|
87
|
+
lineHeight: DEFAULT_BASE_TEXT_STYLE.lineHeight,
|
|
88
|
+
color: DEFAULT_COLORS.text
|
|
89
|
+
},
|
|
90
|
+
toolbarStyle: {
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
paddingHorizontal: 8,
|
|
94
|
+
paddingVertical: 6,
|
|
95
|
+
backgroundColor: DEFAULT_COLORS.toolbarBackground,
|
|
96
|
+
borderColor: DEFAULT_COLORS.toolbarBorder,
|
|
97
|
+
gap: 2
|
|
98
|
+
},
|
|
99
|
+
toolbarButtonStyle: {
|
|
100
|
+
paddingHorizontal: 10,
|
|
101
|
+
paddingVertical: 6,
|
|
102
|
+
borderRadius: 6,
|
|
103
|
+
minWidth: 36,
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
justifyContent: 'center'
|
|
106
|
+
},
|
|
107
|
+
toolbarButtonActiveStyle: {
|
|
108
|
+
backgroundColor: DEFAULT_COLORS.activeButtonBg
|
|
109
|
+
},
|
|
110
|
+
toolbarButtonTextStyle: {
|
|
111
|
+
fontSize: 15,
|
|
112
|
+
fontWeight: '600',
|
|
113
|
+
color: DEFAULT_COLORS.text
|
|
114
|
+
},
|
|
115
|
+
toolbarButtonActiveTextStyle: {
|
|
116
|
+
color: DEFAULT_COLORS.primary
|
|
117
|
+
},
|
|
118
|
+
codeStyle: {
|
|
119
|
+
fontFamily: 'monospace',
|
|
120
|
+
backgroundColor: DEFAULT_COLORS.codeBackground,
|
|
121
|
+
paddingHorizontal: 4,
|
|
122
|
+
borderRadius: 4,
|
|
123
|
+
fontSize: 14
|
|
124
|
+
},
|
|
125
|
+
colors: {
|
|
126
|
+
primary: DEFAULT_COLORS.primary,
|
|
127
|
+
background: DEFAULT_COLORS.background,
|
|
128
|
+
text: DEFAULT_COLORS.text,
|
|
129
|
+
placeholder: DEFAULT_COLORS.placeholder,
|
|
130
|
+
toolbarBackground: DEFAULT_COLORS.toolbarBackground,
|
|
131
|
+
toolbarBorder: DEFAULT_COLORS.toolbarBorder,
|
|
132
|
+
cursor: DEFAULT_COLORS.cursor
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Default toolbar items for the built-in toolbar.
|
|
138
|
+
*/
|
|
139
|
+
const DEFAULT_TOOLBAR_ITEMS = exports.DEFAULT_TOOLBAR_ITEMS = [{
|
|
140
|
+
id: 'bold',
|
|
141
|
+
label: 'B',
|
|
142
|
+
format: 'bold'
|
|
143
|
+
}, {
|
|
144
|
+
id: 'italic',
|
|
145
|
+
label: 'I',
|
|
146
|
+
format: 'italic'
|
|
147
|
+
}, {
|
|
148
|
+
id: 'underline',
|
|
149
|
+
label: 'U',
|
|
150
|
+
format: 'underline'
|
|
151
|
+
}, {
|
|
152
|
+
id: 'strikethrough',
|
|
153
|
+
label: 'S',
|
|
154
|
+
format: 'strikethrough'
|
|
155
|
+
}, {
|
|
156
|
+
id: 'code',
|
|
157
|
+
label: '<>',
|
|
158
|
+
format: 'code'
|
|
159
|
+
}, {
|
|
160
|
+
id: 'h1',
|
|
161
|
+
label: 'H1',
|
|
162
|
+
heading: 'h1'
|
|
163
|
+
}, {
|
|
164
|
+
id: 'h2',
|
|
165
|
+
label: 'H2',
|
|
166
|
+
heading: 'h2'
|
|
167
|
+
}, {
|
|
168
|
+
id: 'h3',
|
|
169
|
+
label: 'H3',
|
|
170
|
+
heading: 'h3'
|
|
171
|
+
}];
|
|
172
|
+
//# sourceMappingURL=defaultStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_COLORS","exports","primary","background","text","placeholder","toolbarBackground","toolbarBorder","cursor","activeButtonBg","codeBackground","HEADING_FONT_SIZES","h1","h2","h3","none","DEFAULT_BASE_TEXT_STYLE","fontSize","lineHeight","color","fontFamily","undefined","EMPTY_FORMAT_STYLE","bold","italic","underline","strikethrough","code","backgroundColor","heading","DEFAULT_THEME","containerStyle","borderWidth","borderColor","borderRadius","overflow","inputStyle","paddingHorizontal","paddingVertical","textAlignVertical","overlayContainerStyle","position","top","left","right","bottom","baseTextStyle","toolbarStyle","flexDirection","alignItems","gap","toolbarButtonStyle","minWidth","justifyContent","toolbarButtonActiveStyle","toolbarButtonTextStyle","fontWeight","toolbarButtonActiveTextStyle","codeStyle","colors","DEFAULT_TOOLBAR_ITEMS","id","label","format"],"sourceRoot":"../../../src","sources":["constants/defaultStyles.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5BE,OAAO,EAAE,SAAS;EAClBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,WAAW,EAAE,SAAS;EACtBC,iBAAiB,EAAE,SAAS;EAC5BC,aAAa,EAAE,SAAS;EACxBC,MAAM,EAAE,SAAS;EACjBC,cAAc,EAAE,SAAS;EACzBC,cAAc,EAAE;AAClB,CAAU;;AAEV;AACA;AACA;AACO,MAAMC,kBAAkB,GAAAV,OAAA,CAAAU,kBAAA,GAAG;EAChCC,EAAE,EAAE,EAAE;EACNC,EAAE,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