react-native-richify 1.0.0

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.
Files changed (172) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +231 -0
  3. package/lib/commonjs/components/OverlayText.d.js +6 -0
  4. package/lib/commonjs/components/OverlayText.d.js.map +1 -0
  5. package/lib/commonjs/components/OverlayText.js +45 -0
  6. package/lib/commonjs/components/OverlayText.js.map +1 -0
  7. package/lib/commonjs/components/RichTextInput.d.js +6 -0
  8. package/lib/commonjs/components/RichTextInput.d.js.map +1 -0
  9. package/lib/commonjs/components/RichTextInput.js +160 -0
  10. package/lib/commonjs/components/RichTextInput.js.map +1 -0
  11. package/lib/commonjs/components/Toolbar.d.js +6 -0
  12. package/lib/commonjs/components/Toolbar.d.js.map +1 -0
  13. package/lib/commonjs/components/Toolbar.js +99 -0
  14. package/lib/commonjs/components/Toolbar.js.map +1 -0
  15. package/lib/commonjs/components/ToolbarButton.d.js +6 -0
  16. package/lib/commonjs/components/ToolbarButton.d.js.map +1 -0
  17. package/lib/commonjs/components/ToolbarButton.js +63 -0
  18. package/lib/commonjs/components/ToolbarButton.js.map +1 -0
  19. package/lib/commonjs/constants/defaultStyles.d.js +6 -0
  20. package/lib/commonjs/constants/defaultStyles.d.js.map +1 -0
  21. package/lib/commonjs/constants/defaultStyles.js +172 -0
  22. package/lib/commonjs/constants/defaultStyles.js.map +1 -0
  23. package/lib/commonjs/context/RichTextContext.d.js +6 -0
  24. package/lib/commonjs/context/RichTextContext.d.js.map +1 -0
  25. package/lib/commonjs/context/RichTextContext.js +61 -0
  26. package/lib/commonjs/context/RichTextContext.js.map +1 -0
  27. package/lib/commonjs/hooks/useFormatting.d.js +6 -0
  28. package/lib/commonjs/hooks/useFormatting.d.js.map +1 -0
  29. package/lib/commonjs/hooks/useFormatting.js +82 -0
  30. package/lib/commonjs/hooks/useFormatting.js.map +1 -0
  31. package/lib/commonjs/hooks/useRichText.d.js +6 -0
  32. package/lib/commonjs/hooks/useRichText.d.js.map +1 -0
  33. package/lib/commonjs/hooks/useRichText.js +136 -0
  34. package/lib/commonjs/hooks/useRichText.js.map +1 -0
  35. package/lib/commonjs/hooks/useSelection.d.js +6 -0
  36. package/lib/commonjs/hooks/useSelection.d.js.map +1 -0
  37. package/lib/commonjs/hooks/useSelection.js +39 -0
  38. package/lib/commonjs/hooks/useSelection.js.map +1 -0
  39. package/lib/commonjs/index.d.js +186 -0
  40. package/lib/commonjs/index.d.js.map +1 -0
  41. package/lib/commonjs/index.js +186 -0
  42. package/lib/commonjs/index.js.map +1 -0
  43. package/lib/commonjs/package.json +1 -0
  44. package/lib/commonjs/types/index.d.js +6 -0
  45. package/lib/commonjs/types/index.d.js.map +1 -0
  46. package/lib/commonjs/types/index.js +6 -0
  47. package/lib/commonjs/types/index.js.map +1 -0
  48. package/lib/commonjs/utils/formatter.d.js +13 -0
  49. package/lib/commonjs/utils/formatter.d.js.map +1 -0
  50. package/lib/commonjs/utils/formatter.js +229 -0
  51. package/lib/commonjs/utils/formatter.js.map +1 -0
  52. package/lib/commonjs/utils/parser.d.js +6 -0
  53. package/lib/commonjs/utils/parser.d.js.map +1 -0
  54. package/lib/commonjs/utils/parser.js +221 -0
  55. package/lib/commonjs/utils/parser.js.map +1 -0
  56. package/lib/commonjs/utils/styleMapper.d.js +6 -0
  57. package/lib/commonjs/utils/styleMapper.d.js.map +1 -0
  58. package/lib/commonjs/utils/styleMapper.js +87 -0
  59. package/lib/commonjs/utils/styleMapper.js.map +1 -0
  60. package/lib/module/components/OverlayText.d.js +4 -0
  61. package/lib/module/components/OverlayText.d.js.map +1 -0
  62. package/lib/module/components/OverlayText.js +41 -0
  63. package/lib/module/components/OverlayText.js.map +1 -0
  64. package/lib/module/components/RichTextInput.d.js +4 -0
  65. package/lib/module/components/RichTextInput.d.js.map +1 -0
  66. package/lib/module/components/RichTextInput.js +155 -0
  67. package/lib/module/components/RichTextInput.js.map +1 -0
  68. package/lib/module/components/Toolbar.d.js +4 -0
  69. package/lib/module/components/Toolbar.d.js.map +1 -0
  70. package/lib/module/components/Toolbar.js +95 -0
  71. package/lib/module/components/Toolbar.js.map +1 -0
  72. package/lib/module/components/ToolbarButton.d.js +4 -0
  73. package/lib/module/components/ToolbarButton.d.js.map +1 -0
  74. package/lib/module/components/ToolbarButton.js +59 -0
  75. package/lib/module/components/ToolbarButton.js.map +1 -0
  76. package/lib/module/constants/defaultStyles.d.js +4 -0
  77. package/lib/module/constants/defaultStyles.d.js.map +1 -0
  78. package/lib/module/constants/defaultStyles.js +168 -0
  79. package/lib/module/constants/defaultStyles.js.map +1 -0
  80. package/lib/module/context/RichTextContext.d.js +4 -0
  81. package/lib/module/context/RichTextContext.d.js.map +1 -0
  82. package/lib/module/context/RichTextContext.js +55 -0
  83. package/lib/module/context/RichTextContext.js.map +1 -0
  84. package/lib/module/hooks/useFormatting.d.js +11 -0
  85. package/lib/module/hooks/useFormatting.d.js.map +1 -0
  86. package/lib/module/hooks/useFormatting.js +78 -0
  87. package/lib/module/hooks/useFormatting.js.map +1 -0
  88. package/lib/module/hooks/useRichText.d.js +4 -0
  89. package/lib/module/hooks/useRichText.d.js.map +1 -0
  90. package/lib/module/hooks/useRichText.js +132 -0
  91. package/lib/module/hooks/useRichText.js.map +1 -0
  92. package/lib/module/hooks/useSelection.d.js +4 -0
  93. package/lib/module/hooks/useSelection.d.js.map +1 -0
  94. package/lib/module/hooks/useSelection.js +35 -0
  95. package/lib/module/hooks/useSelection.js.map +1 -0
  96. package/lib/module/index.d.js +15 -0
  97. package/lib/module/index.d.js.map +1 -0
  98. package/lib/module/index.js +25 -0
  99. package/lib/module/index.js.map +1 -0
  100. package/lib/module/types/index.d.js +4 -0
  101. package/lib/module/types/index.d.js.map +1 -0
  102. package/lib/module/types/index.js +4 -0
  103. package/lib/module/types/index.js.map +1 -0
  104. package/lib/module/utils/formatter.d.js +30 -0
  105. package/lib/module/utils/formatter.d.js.map +1 -0
  106. package/lib/module/utils/formatter.js +217 -0
  107. package/lib/module/utils/formatter.js.map +1 -0
  108. package/lib/module/utils/parser.d.js +4 -0
  109. package/lib/module/utils/parser.d.js.map +1 -0
  110. package/lib/module/utils/parser.js +211 -0
  111. package/lib/module/utils/parser.js.map +1 -0
  112. package/lib/module/utils/styleMapper.d.js +4 -0
  113. package/lib/module/utils/styleMapper.d.js.map +1 -0
  114. package/lib/module/utils/styleMapper.js +82 -0
  115. package/lib/module/utils/styleMapper.js.map +1 -0
  116. package/lib/typescript/src/components/OverlayText.d.ts +11 -0
  117. package/lib/typescript/src/components/OverlayText.d.ts.map +1 -0
  118. package/lib/typescript/src/components/RichTextInput.d.ts +21 -0
  119. package/lib/typescript/src/components/RichTextInput.d.ts.map +1 -0
  120. package/lib/typescript/src/components/Toolbar.d.ts +13 -0
  121. package/lib/typescript/src/components/Toolbar.d.ts.map +1 -0
  122. package/lib/typescript/src/components/ToolbarButton.d.ts +8 -0
  123. package/lib/typescript/src/components/ToolbarButton.d.ts.map +1 -0
  124. package/lib/typescript/src/constants/defaultStyles.d.ts +46 -0
  125. package/lib/typescript/src/constants/defaultStyles.d.ts.map +1 -0
  126. package/lib/typescript/src/context/RichTextContext.d.ts +31 -0
  127. package/lib/typescript/src/context/RichTextContext.d.ts.map +1 -0
  128. package/lib/typescript/src/hooks/useFormatting.d.ts +26 -0
  129. package/lib/typescript/src/hooks/useFormatting.d.ts.map +1 -0
  130. package/lib/typescript/src/hooks/useRichText.d.ts +17 -0
  131. package/lib/typescript/src/hooks/useRichText.d.ts.map +1 -0
  132. package/lib/typescript/src/hooks/useSelection.d.ts +14 -0
  133. package/lib/typescript/src/hooks/useSelection.d.ts.map +1 -0
  134. package/lib/typescript/src/index.d.ts +16 -0
  135. package/lib/typescript/src/index.d.ts.map +1 -0
  136. package/lib/typescript/src/types/index.d.ts +245 -0
  137. package/lib/typescript/src/types/index.d.ts.map +1 -0
  138. package/lib/typescript/src/utils/formatter.d.ts +29 -0
  139. package/lib/typescript/src/utils/formatter.d.ts.map +1 -0
  140. package/lib/typescript/src/utils/parser.d.ts +46 -0
  141. package/lib/typescript/src/utils/parser.d.ts.map +1 -0
  142. package/lib/typescript/src/utils/styleMapper.d.ts +16 -0
  143. package/lib/typescript/src/utils/styleMapper.d.ts.map +1 -0
  144. package/package.json +83 -0
  145. package/src/components/OverlayText.d.ts +10 -0
  146. package/src/components/OverlayText.tsx +46 -0
  147. package/src/components/RichTextInput.d.ts +20 -0
  148. package/src/components/RichTextInput.tsx +174 -0
  149. package/src/components/Toolbar.d.ts +12 -0
  150. package/src/components/Toolbar.tsx +100 -0
  151. package/src/components/ToolbarButton.d.ts +7 -0
  152. package/src/components/ToolbarButton.tsx +65 -0
  153. package/src/constants/defaultStyles.d.ts +45 -0
  154. package/src/constants/defaultStyles.ts +144 -0
  155. package/src/context/RichTextContext.d.ts +30 -0
  156. package/src/context/RichTextContext.tsx +63 -0
  157. package/src/hooks/useFormatting.d.ts +25 -0
  158. package/src/hooks/useFormatting.ts +135 -0
  159. package/src/hooks/useRichText.d.ts +16 -0
  160. package/src/hooks/useRichText.ts +171 -0
  161. package/src/hooks/useSelection.d.ts +13 -0
  162. package/src/hooks/useSelection.ts +40 -0
  163. package/src/index.d.ts +15 -0
  164. package/src/index.ts +68 -0
  165. package/src/types/index.d.ts +244 -0
  166. package/src/types/index.ts +295 -0
  167. package/src/utils/formatter.d.ts +28 -0
  168. package/src/utils/formatter.ts +276 -0
  169. package/src/utils/parser.d.ts +45 -0
  170. package/src/utils/parser.ts +252 -0
  171. package/src/utils/styleMapper.d.ts +15 -0
  172. package/src/utils/styleMapper.ts +92 -0
@@ -0,0 +1,186 @@
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
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,186 @@
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
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.d.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_parser","require"],"sourceRoot":"..\\..\\..\\src","sources":["utils/formatter.d.ts"],"mappings":";;;;;;;;;;;AA2BA,IAAAA,OAAA,GAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,229 @@
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
+ exports.getSelectionStyle = getSelectionStyle;
13
+ exports.isFormatActiveInSelection = isFormatActiveInSelection;
14
+ exports.setHeadingOnLine = setHeadingOnLine;
15
+ exports.setStyleOnSelection = setStyleOnSelection;
16
+ exports.toggleFormatOnSelection = toggleFormatOnSelection;
17
+ var _parser = require("@/utils/parser");
18
+ var _defaultStyles = require("@/constants/defaultStyles");
19
+ /**
20
+ * Toggle an inline format (bold, italic, etc.) on the selected range.
21
+ *
22
+ * If the entire selection already has the format, it is removed.
23
+ * Otherwise, it is applied to the entire selection.
24
+ *
25
+ * Returns the new segments array.
26
+ */
27
+ function toggleFormatOnSelection(segments, selection, format) {
28
+ if (selection.start === selection.end) {
29
+ // No selection — return unchanged (active styles handle this case)
30
+ return segments;
31
+ }
32
+ const {
33
+ start,
34
+ end
35
+ } = normalizeSelection(selection);
36
+
37
+ // Extract the selected segments to check current state
38
+ const selectedSegments = extractSegmentsInRange(segments, start, end);
39
+ const allHaveFormat = selectedSegments.every(s => !!s.styles[format]);
40
+
41
+ // Apply or remove the format
42
+ return applyStyleToRange(segments, start, end, {
43
+ [format]: !allHaveFormat
44
+ });
45
+ }
46
+
47
+ /**
48
+ * Set a specific style property on the selected range.
49
+ */
50
+ function setStyleOnSelection(segments, selection, key, value) {
51
+ if (selection.start === selection.end) {
52
+ return segments;
53
+ }
54
+ const {
55
+ start,
56
+ end
57
+ } = normalizeSelection(selection);
58
+ return applyStyleToRange(segments, start, end, {
59
+ [key]: value
60
+ });
61
+ }
62
+
63
+ /**
64
+ * Apply a heading level to the line containing the cursor/selection.
65
+ */
66
+ function setHeadingOnLine(segments, selection, level) {
67
+ const plainText = (0, _parser.segmentsToPlainText)(segments);
68
+ const {
69
+ lineStart,
70
+ lineEnd
71
+ } = getLineRange(plainText, selection.start);
72
+ const headingStyle = {
73
+ heading: level,
74
+ fontSize: _defaultStyles.HEADING_FONT_SIZES[level],
75
+ bold: level !== 'none' ? true : undefined
76
+ };
77
+ return applyStyleToRange(segments, lineStart, lineEnd, headingStyle);
78
+ }
79
+
80
+ /**
81
+ * Checks whether the given format is active across the entire selection.
82
+ */
83
+ function isFormatActiveInSelection(segments, selection, format) {
84
+ if (selection.start === selection.end) {
85
+ return false;
86
+ }
87
+ const {
88
+ start,
89
+ end
90
+ } = normalizeSelection(selection);
91
+ const selected = extractSegmentsInRange(segments, start, end);
92
+ return selected.length > 0 && selected.every(s => !!s.styles[format]);
93
+ }
94
+
95
+ /**
96
+ * Gets the format style that is common across the entire selection.
97
+ * For properties where segments disagree, the value is undefined.
98
+ */
99
+ function getSelectionStyle(segments, selection) {
100
+ if (selection.start === selection.end) {
101
+ // Return style at cursor position
102
+ const pos = (0, _parser.findPositionInSegments)(segments, selection.start);
103
+ if (segments.length > 0) {
104
+ return {
105
+ ...segments[pos.segmentIndex].styles
106
+ };
107
+ }
108
+ return {};
109
+ }
110
+ const {
111
+ start,
112
+ end
113
+ } = normalizeSelection(selection);
114
+ const selected = extractSegmentsInRange(segments, start, end);
115
+ if (selected.length === 0) return {};
116
+ const result = {
117
+ ...selected[0].styles
118
+ };
119
+ for (let i = 1; i < selected.length; i++) {
120
+ const s = selected[i].styles;
121
+ if (result.bold !== undefined && result.bold !== !!s.bold) result.bold = undefined;
122
+ if (result.italic !== undefined && result.italic !== !!s.italic) result.italic = undefined;
123
+ if (result.underline !== undefined && result.underline !== !!s.underline) result.underline = undefined;
124
+ if (result.strikethrough !== undefined && result.strikethrough !== !!s.strikethrough) result.strikethrough = undefined;
125
+ if (result.code !== undefined && result.code !== !!s.code) result.code = undefined;
126
+ if (result.color !== s.color) result.color = undefined;
127
+ if (result.backgroundColor !== s.backgroundColor) result.backgroundColor = undefined;
128
+ if (result.fontSize !== s.fontSize) result.fontSize = undefined;
129
+ if (result.heading !== s.heading) result.heading = undefined;
130
+ }
131
+ return result;
132
+ }
133
+
134
+ // ─── Internal Helpers ────────────────────────────────────────────────────────
135
+
136
+ /**
137
+ * Normalize selection so start <= end.
138
+ */
139
+ function normalizeSelection(selection) {
140
+ return {
141
+ start: Math.min(selection.start, selection.end),
142
+ end: Math.max(selection.start, selection.end)
143
+ };
144
+ }
145
+
146
+ /**
147
+ * Extract the text segments that fall within [start, end) of the global text.
148
+ */
149
+ function extractSegmentsInRange(segments, start, end) {
150
+ const result = [];
151
+ let pos = 0;
152
+ for (const seg of segments) {
153
+ const segStart = pos;
154
+ const segEnd = pos + seg.text.length;
155
+ if (segEnd <= start) {
156
+ pos = segEnd;
157
+ continue;
158
+ }
159
+ if (segStart >= end) {
160
+ break;
161
+ }
162
+
163
+ // This segment overlaps with [start, end)
164
+ const overlapStart = Math.max(segStart, start);
165
+ const overlapEnd = Math.min(segEnd, end);
166
+ result.push((0, _parser.createSegment)(seg.text.slice(overlapStart - segStart, overlapEnd - segStart), seg.styles));
167
+ pos = segEnd;
168
+ }
169
+ return result;
170
+ }
171
+
172
+ /**
173
+ * Apply a partial style to a character range within the segments array.
174
+ * Splits segments at boundaries and applies the style delta to all segments in range.
175
+ */
176
+ function applyStyleToRange(segments, start, end, styleDelta) {
177
+ const result = [];
178
+ let pos = 0;
179
+ for (const seg of segments) {
180
+ const segStart = pos;
181
+ const segEnd = pos + seg.text.length;
182
+ if (segEnd <= start || segStart >= end) {
183
+ // Outside the range — keep as-is
184
+ result.push((0, _parser.createSegment)(seg.text, seg.styles));
185
+ } else {
186
+ // Overlaps with range — may need to split
187
+ if (segStart < start) {
188
+ // Portion before the range
189
+ result.push((0, _parser.createSegment)(seg.text.slice(0, start - segStart), seg.styles));
190
+ }
191
+
192
+ // The overlapping portion — apply style delta
193
+ const overlapStart = Math.max(segStart, start);
194
+ const overlapEnd = Math.min(segEnd, end);
195
+ const newStyles = {
196
+ ...seg.styles,
197
+ ...styleDelta
198
+ };
199
+ result.push((0, _parser.createSegment)(seg.text.slice(overlapStart - segStart, overlapEnd - segStart), newStyles));
200
+ if (segEnd > end) {
201
+ // Portion after the range
202
+ result.push((0, _parser.createSegment)(seg.text.slice(end - segStart), seg.styles));
203
+ }
204
+ }
205
+ pos = segEnd;
206
+ }
207
+ return (0, _parser.mergeAdjacentSegments)(result);
208
+ }
209
+
210
+ /**
211
+ * Get the line start and end positions for the line containing the given position.
212
+ */
213
+ function getLineRange(text, position) {
214
+ let lineStart = position;
215
+ while (lineStart > 0 && text[lineStart - 1] !== '\n') {
216
+ lineStart--;
217
+ }
218
+ let lineEnd = position;
219
+ while (lineEnd < text.length && text[lineEnd] !== '\n') {
220
+ lineEnd++;
221
+ }
222
+ return {
223
+ lineStart,
224
+ lineEnd
225
+ };
226
+ }
227
+
228
+ // Re-export for convenience
229
+ //# sourceMappingURL=formatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_parser","require","_defaultStyles","toggleFormatOnSelection","segments","selection","format","start","end","normalizeSelection","selectedSegments","extractSegmentsInRange","allHaveFormat","every","s","styles","applyStyleToRange","setStyleOnSelection","key","value","setHeadingOnLine","level","plainText","segmentsToPlainText","lineStart","lineEnd","getLineRange","headingStyle","heading","fontSize","HEADING_FONT_SIZES","bold","undefined","isFormatActiveInSelection","selected","length","getSelectionStyle","pos","findPositionInSegments","segmentIndex","result","i","italic","underline","strikethrough","code","color","backgroundColor","Math","min","max","seg","segStart","segEnd","text","overlapStart","overlapEnd","push","createSegment","slice","styleDelta","newStyles","mergeAdjacentSegments","position"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L=parser.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["utils/parser.d.ts"],"mappings":"","ignoreList":[]}