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
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useRichText = useRichText;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _defaultStyles = require("@/constants/defaultStyles");
|
|
9
|
-
var _parser = require("@/utils/parser");
|
|
10
|
-
var _useSelection = require("@/hooks/useSelection");
|
|
11
|
-
var _useFormatting = require("@/hooks/useFormatting");
|
|
12
|
-
/**
|
|
13
|
-
* Main hook for the rich text editor.
|
|
14
|
-
*
|
|
15
|
-
* Manages the complete editor state (segments, selection, active styles)
|
|
16
|
-
* and exposes all actions needed to build a rich text UI.
|
|
17
|
-
*/
|
|
18
|
-
function useRichText(options = {}) {
|
|
19
|
-
const {
|
|
20
|
-
initialSegments,
|
|
21
|
-
onChangeSegments,
|
|
22
|
-
onChangeText
|
|
23
|
-
} = options;
|
|
24
|
-
|
|
25
|
-
// ─── State ───────────────────────────────────────────────────────────────
|
|
26
|
-
|
|
27
|
-
const [segments, setSegments] = (0, _react.useState)(() => {
|
|
28
|
-
if (initialSegments && initialSegments.length > 0) {
|
|
29
|
-
return initialSegments;
|
|
30
|
-
}
|
|
31
|
-
return [(0, _parser.createSegment)('')];
|
|
32
|
-
});
|
|
33
|
-
const [activeStyles, setActiveStyles] = (0, _react.useState)({
|
|
34
|
-
..._defaultStyles.EMPTY_FORMAT_STYLE
|
|
35
|
-
});
|
|
36
|
-
const {
|
|
37
|
-
selection,
|
|
38
|
-
handleSelectionChange
|
|
39
|
-
} = (0, _useSelection.useSelection)();
|
|
40
|
-
|
|
41
|
-
// Refs for stable access in callbacks
|
|
42
|
-
const segmentsRef = (0, _react.useRef)(segments);
|
|
43
|
-
segmentsRef.current = segments;
|
|
44
|
-
const activeStylesRef = (0, _react.useRef)(activeStyles);
|
|
45
|
-
activeStylesRef.current = activeStyles;
|
|
46
|
-
|
|
47
|
-
// ─── Segment Change Handler ──────────────────────────────────────────────
|
|
48
|
-
|
|
49
|
-
const updateSegments = (0, _react.useCallback)(newSegments => {
|
|
50
|
-
setSegments(newSegments);
|
|
51
|
-
onChangeSegments?.(newSegments);
|
|
52
|
-
onChangeText?.((0, _parser.segmentsToPlainText)(newSegments));
|
|
53
|
-
}, [onChangeSegments, onChangeText]);
|
|
54
|
-
|
|
55
|
-
// ─── Formatting ──────────────────────────────────────────────────────────
|
|
56
|
-
|
|
57
|
-
const formatting = (0, _useFormatting.useFormatting)({
|
|
58
|
-
segments,
|
|
59
|
-
selection,
|
|
60
|
-
activeStyles,
|
|
61
|
-
onSegmentsChange: updateSegments,
|
|
62
|
-
onActiveStylesChange: setActiveStyles
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// ─── Text Change Handler ─────────────────────────────────────────────────
|
|
66
|
-
|
|
67
|
-
const handleTextChange = (0, _react.useCallback)(newText => {
|
|
68
|
-
const currentSegments = segmentsRef.current;
|
|
69
|
-
const currentActiveStyles = activeStylesRef.current;
|
|
70
|
-
const newSegments = (0, _parser.reconcileTextChange)(currentSegments, newText, currentActiveStyles);
|
|
71
|
-
updateSegments(newSegments);
|
|
72
|
-
}, [updateSegments]);
|
|
73
|
-
|
|
74
|
-
// ─── Selection Change Handler ────────────────────────────────────────────
|
|
75
|
-
|
|
76
|
-
const onSelectionChange = (0, _react.useCallback)(newSelection => {
|
|
77
|
-
handleSelectionChange(newSelection);
|
|
78
|
-
|
|
79
|
-
// Update active styles based on cursor position
|
|
80
|
-
if (newSelection.start === newSelection.end) {
|
|
81
|
-
const pos = (0, _parser.findPositionInSegments)(segmentsRef.current, newSelection.start);
|
|
82
|
-
if (segmentsRef.current.length > 0) {
|
|
83
|
-
const seg = segmentsRef.current[pos.segmentIndex];
|
|
84
|
-
setActiveStyles({
|
|
85
|
-
...seg.styles
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, [handleSelectionChange]);
|
|
90
|
-
|
|
91
|
-
// ─── Export / Import ─────────────────────────────────────────────────────
|
|
92
|
-
|
|
93
|
-
const getPlainText = (0, _react.useCallback)(() => {
|
|
94
|
-
return (0, _parser.segmentsToPlainText)(segmentsRef.current);
|
|
95
|
-
}, []);
|
|
96
|
-
const exportJSON = (0, _react.useCallback)(() => {
|
|
97
|
-
return JSON.parse(JSON.stringify(segmentsRef.current));
|
|
98
|
-
}, []);
|
|
99
|
-
const importJSON = (0, _react.useCallback)(newSegments => {
|
|
100
|
-
const safeSegments = newSegments.length > 0 ? newSegments : [(0, _parser.createSegment)('')];
|
|
101
|
-
updateSegments(safeSegments);
|
|
102
|
-
}, [updateSegments]);
|
|
103
|
-
const clear = (0, _react.useCallback)(() => {
|
|
104
|
-
updateSegments([(0, _parser.createSegment)('')]);
|
|
105
|
-
setActiveStyles({
|
|
106
|
-
..._defaultStyles.EMPTY_FORMAT_STYLE
|
|
107
|
-
});
|
|
108
|
-
}, [updateSegments]);
|
|
109
|
-
|
|
110
|
-
// ─── Build Return Value ──────────────────────────────────────────────────
|
|
111
|
-
|
|
112
|
-
const state = {
|
|
113
|
-
segments,
|
|
114
|
-
selection,
|
|
115
|
-
activeStyles
|
|
116
|
-
};
|
|
117
|
-
const actions = {
|
|
118
|
-
toggleFormat: formatting.toggleFormat,
|
|
119
|
-
setStyleProperty: formatting.setStyleProperty,
|
|
120
|
-
setHeading: formatting.setHeading,
|
|
121
|
-
setColor: formatting.setColor,
|
|
122
|
-
setBackgroundColor: formatting.setBackgroundColor,
|
|
123
|
-
setFontSize: formatting.setFontSize,
|
|
124
|
-
handleTextChange,
|
|
125
|
-
handleSelectionChange: onSelectionChange,
|
|
126
|
-
getPlainText,
|
|
127
|
-
exportJSON,
|
|
128
|
-
importJSON,
|
|
129
|
-
clear
|
|
130
|
-
};
|
|
131
|
-
return {
|
|
132
|
-
state,
|
|
133
|
-
actions
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
//# sourceMappingURL=useRichText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_defaultStyles","_parser","_useSelection","_useFormatting","useRichText","options","initialSegments","onChangeSegments","onChangeText","segments","setSegments","useState","length","createSegment","activeStyles","setActiveStyles","EMPTY_FORMAT_STYLE","selection","handleSelectionChange","useSelection","segmentsRef","useRef","current","activeStylesRef","updateSegments","useCallback","newSegments","segmentsToPlainText","formatting","useFormatting","onSegmentsChange","onActiveStylesChange","handleTextChange","newText","currentSegments","currentActiveStyles","reconcileTextChange","onSelectionChange","newSelection","start","end","pos","findPositionInSegments","seg","segmentIndex","styles","getPlainText","exportJSON","JSON","parse","stringify","importJSON","safeSegments","clear","state","actions","toggleFormat","setStyleProperty","setHeading","setColor","setBackgroundColor","setFontSize"],"sourceRoot":"..\\..\\..\\src","sources":["hooks/useRichText.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["hooks/useSelection.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useSelection = useSelection;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
/**
|
|
9
|
-
* Hook for tracking TextInput selection state.
|
|
10
|
-
*
|
|
11
|
-
* Returns the current selection and a handler to update it.
|
|
12
|
-
*/
|
|
13
|
-
function useSelection(initialSelection) {
|
|
14
|
-
const [selection, setSelection] = (0, _react.useState)(initialSelection ?? {
|
|
15
|
-
start: 0,
|
|
16
|
-
end: 0
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// Use a ref to avoid stale closures in callbacks
|
|
20
|
-
const selectionRef = (0, _react.useRef)(selection);
|
|
21
|
-
selectionRef.current = selection;
|
|
22
|
-
const handleSelectionChange = (0, _react.useCallback)(newSelection => {
|
|
23
|
-
setSelection(newSelection);
|
|
24
|
-
}, []);
|
|
25
|
-
const getSelection = (0, _react.useCallback)(() => {
|
|
26
|
-
return selectionRef.current;
|
|
27
|
-
}, []);
|
|
28
|
-
const hasSelection = (0, _react.useCallback)(() => {
|
|
29
|
-
return selectionRef.current.start !== selectionRef.current.end;
|
|
30
|
-
}, []);
|
|
31
|
-
return {
|
|
32
|
-
selection,
|
|
33
|
-
setSelection,
|
|
34
|
-
handleSelectionChange,
|
|
35
|
-
getSelection,
|
|
36
|
-
hasSelection
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=useSelection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","useSelection","initialSelection","selection","setSelection","useState","start","end","selectionRef","useRef","current","handleSelectionChange","useCallback","newSelection","getSelection","hasSelection"],"sourceRoot":"..\\..\\..\\src","sources":["hooks/useSelection.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAACC,gBAAiC,EAAE;EAC9D,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAC,eAAQ,EACxCH,gBAAgB,IAAI;IAAEI,KAAK,EAAE,CAAC;IAAEC,GAAG,EAAE;EAAE,CACzC,CAAC;;EAED;EACA,MAAMC,YAAY,GAAG,IAAAC,aAAM,EAACN,SAAS,CAAC;EACtCK,YAAY,CAACE,OAAO,GAAGP,SAAS;EAEhC,MAAMQ,qBAAqB,GAAG,IAAAC,kBAAW,EACtCC,YAA4B,IAAK;IAChCT,YAAY,CAACS,YAAY,CAAC;EAC5B,CAAC,EACD,EACF,CAAC;EAED,MAAMC,YAAY,GAAG,IAAAF,kBAAW,EAAC,MAAsB;IACrD,OAAOJ,YAAY,CAACE,OAAO;EAC7B,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMK,YAAY,GAAG,IAAAH,kBAAW,EAAC,MAAe;IAC9C,OAAOJ,YAAY,CAACE,OAAO,CAACJ,KAAK,KAAKE,YAAY,CAACE,OAAO,CAACH,GAAG;EAChE,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLJ,SAAS;IACTC,YAAY;IACZO,qBAAqB;IACrBG,YAAY;IACZC;EACF,CAAC;AACH","ignoreList":[]}
|
package/lib/commonjs/index.d.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "DEFAULT_BASE_TEXT_STYLE", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _defaultStyles.DEFAULT_BASE_TEXT_STYLE;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "DEFAULT_COLORS", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _defaultStyles.DEFAULT_COLORS;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "DEFAULT_THEME", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _defaultStyles.DEFAULT_THEME;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "DEFAULT_TOOLBAR_ITEMS", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _defaultStyles.DEFAULT_TOOLBAR_ITEMS;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "EMPTY_FORMAT_STYLE", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _defaultStyles.EMPTY_FORMAT_STYLE;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "HEADING_FONT_SIZES", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _defaultStyles.HEADING_FONT_SIZES;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "OverlayText", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _OverlayText.OverlayText;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "RichTextInput", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _RichTextInput.RichTextInput;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "RichTextProvider", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _RichTextContext.RichTextProvider;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "Toolbar", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _Toolbar.Toolbar;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "ToolbarButton", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _ToolbarButton.ToolbarButton;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "createSegment", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _parser.createSegment;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "formatStyleToTextStyle", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _styleMapper.formatStyleToTextStyle;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "getSelectionStyle", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _formatter.getSelectionStyle;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "getTotalLength", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _parser.getTotalLength;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "isFormatActiveInSelection", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _formatter.isFormatActiveInSelection;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "mergeAdjacentSegments", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _parser.mergeAdjacentSegments;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "reconcileTextChange", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _parser.reconcileTextChange;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "segmentToTextStyle", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return _styleMapper.segmentToTextStyle;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "segmentsToPlainText", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _parser.segmentsToPlainText;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "segmentsToTextStyles", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
-
return _styleMapper.segmentsToTextStyles;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(exports, "setHeadingOnLine", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
-
return _formatter.setHeadingOnLine;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(exports, "setStyleOnSelection", {
|
|
139
|
-
enumerable: true,
|
|
140
|
-
get: function () {
|
|
141
|
-
return _formatter.setStyleOnSelection;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
Object.defineProperty(exports, "toggleFormatOnSelection", {
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
-
return _formatter.toggleFormatOnSelection;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "useFormatting", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return _useFormatting.useFormatting;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(exports, "useRichText", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
get: function () {
|
|
159
|
-
return _useRichText.useRichText;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
Object.defineProperty(exports, "useRichTextContext", {
|
|
163
|
-
enumerable: true,
|
|
164
|
-
get: function () {
|
|
165
|
-
return _RichTextContext.useRichTextContext;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
Object.defineProperty(exports, "useSelection", {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
-
return _useSelection.useSelection;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
var _RichTextInput = require("@/components/RichTextInput");
|
|
175
|
-
var _OverlayText = require("@/components/OverlayText");
|
|
176
|
-
var _Toolbar = require("@/components/Toolbar");
|
|
177
|
-
var _ToolbarButton = require("@/components/ToolbarButton");
|
|
178
|
-
var _useRichText = require("@/hooks/useRichText");
|
|
179
|
-
var _useSelection = require("@/hooks/useSelection");
|
|
180
|
-
var _useFormatting = require("@/hooks/useFormatting");
|
|
181
|
-
var _RichTextContext = require("@/context/RichTextContext");
|
|
182
|
-
var _parser = require("@/utils/parser");
|
|
183
|
-
var _formatter = require("@/utils/formatter");
|
|
184
|
-
var _styleMapper = require("@/utils/styleMapper");
|
|
185
|
-
var _defaultStyles = require("@/constants/defaultStyles");
|
|
186
|
-
//# sourceMappingURL=index.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_RichTextInput","require","_OverlayText","_Toolbar","_ToolbarButton","_useRichText","_useSelection","_useFormatting","_RichTextContext","_parser","_formatter","_styleMapper","_defaultStyles"],"sourceRoot":"..\\..\\src","sources":["index.d.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAEA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAX,OAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "DEFAULT_BASE_TEXT_STYLE", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _defaultStyles.DEFAULT_BASE_TEXT_STYLE;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "DEFAULT_COLORS", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _defaultStyles.DEFAULT_COLORS;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "DEFAULT_THEME", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _defaultStyles.DEFAULT_THEME;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "DEFAULT_TOOLBAR_ITEMS", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _defaultStyles.DEFAULT_TOOLBAR_ITEMS;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "EMPTY_FORMAT_STYLE", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _defaultStyles.EMPTY_FORMAT_STYLE;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "HEADING_FONT_SIZES", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _defaultStyles.HEADING_FONT_SIZES;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "OverlayText", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _OverlayText.OverlayText;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "RichTextInput", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _RichTextInput.RichTextInput;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "RichTextProvider", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _RichTextContext.RichTextProvider;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "Toolbar", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _Toolbar.Toolbar;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "ToolbarButton", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _ToolbarButton.ToolbarButton;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "createSegment", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _parser.createSegment;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "formatStyleToTextStyle", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _styleMapper.formatStyleToTextStyle;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "getSelectionStyle", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _formatter.getSelectionStyle;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "getTotalLength", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _parser.getTotalLength;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "isFormatActiveInSelection", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _formatter.isFormatActiveInSelection;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "mergeAdjacentSegments", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _parser.mergeAdjacentSegments;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "reconcileTextChange", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _parser.reconcileTextChange;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
Object.defineProperty(exports, "segmentToTextStyle", {
|
|
115
|
-
enumerable: true,
|
|
116
|
-
get: function () {
|
|
117
|
-
return _styleMapper.segmentToTextStyle;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(exports, "segmentsToPlainText", {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _parser.segmentsToPlainText;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
Object.defineProperty(exports, "segmentsToTextStyles", {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
get: function () {
|
|
129
|
-
return _styleMapper.segmentsToTextStyles;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
Object.defineProperty(exports, "setHeadingOnLine", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function () {
|
|
135
|
-
return _formatter.setHeadingOnLine;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
Object.defineProperty(exports, "setStyleOnSelection", {
|
|
139
|
-
enumerable: true,
|
|
140
|
-
get: function () {
|
|
141
|
-
return _formatter.setStyleOnSelection;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
Object.defineProperty(exports, "toggleFormatOnSelection", {
|
|
145
|
-
enumerable: true,
|
|
146
|
-
get: function () {
|
|
147
|
-
return _formatter.toggleFormatOnSelection;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
Object.defineProperty(exports, "useFormatting", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return _useFormatting.useFormatting;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(exports, "useRichText", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
get: function () {
|
|
159
|
-
return _useRichText.useRichText;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
Object.defineProperty(exports, "useRichTextContext", {
|
|
163
|
-
enumerable: true,
|
|
164
|
-
get: function () {
|
|
165
|
-
return _RichTextContext.useRichTextContext;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
Object.defineProperty(exports, "useSelection", {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
-
return _useSelection.useSelection;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
var _RichTextInput = require("@/components/RichTextInput");
|
|
175
|
-
var _OverlayText = require("@/components/OverlayText");
|
|
176
|
-
var _Toolbar = require("@/components/Toolbar");
|
|
177
|
-
var _ToolbarButton = require("@/components/ToolbarButton");
|
|
178
|
-
var _useRichText = require("@/hooks/useRichText");
|
|
179
|
-
var _useSelection = require("@/hooks/useSelection");
|
|
180
|
-
var _useFormatting = require("@/hooks/useFormatting");
|
|
181
|
-
var _RichTextContext = require("@/context/RichTextContext");
|
|
182
|
-
var _parser = require("@/utils/parser");
|
|
183
|
-
var _formatter = require("@/utils/formatter");
|
|
184
|
-
var _styleMapper = require("@/utils/styleMapper");
|
|
185
|
-
var _defaultStyles = require("@/constants/defaultStyles");
|
|
186
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_RichTextInput","require","_OverlayText","_Toolbar","_ToolbarButton","_useRichText","_useSelection","_useFormatting","_RichTextContext","_parser","_formatter","_styleMapper","_defaultStyles"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAGA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAGA,IAAAO,gBAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AAOA,IAAAS,UAAA,GAAAT,OAAA;AAOA,IAAAU,YAAA,GAAAV,OAAA;AAOA,IAAAW,cAAA,GAAAX,OAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "createSegment", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _parser.createSegment;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _parser = require("@/utils/parser");
|
|
13
|
-
//# sourceMappingURL=formatter.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_parser","require"],"sourceRoot":"..\\..\\..\\src","sources":["utils/formatter.d.ts"],"mappings":";;;;;;;;;;;AA2BA,IAAAA,OAAA,GAAAC,OAAA","ignoreList":[]}
|