@baishuyun/ui-mobile 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AMap/index.js +1 -1
- package/dist/ActionSheet/index.js +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/Editor/{Editor-DacCT187.js → Editor-BdDwoeu2.js} +642 -470
- package/dist/Editor/index.js +2 -2
- package/dist/Gantt/index.js +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Popup/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/vendors/{version-CTRMhnVV.js → version-BqVAUWsV.js} +1 -1
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ import { useEventListener as h } from "ahooks";
|
|
|
8
8
|
import { LexicalComposer as g } from "@lexical/react/LexicalComposer";
|
|
9
9
|
import { $createLinkNode as _, $isLinkNode as v, $toggleLink as y, AutoLinkNode as b, LinkNode as x } from "@lexical/link";
|
|
10
10
|
import { $isListItemNode as S, $isListNode as C, INSERT_ORDERED_LIST_COMMAND as w, INSERT_UNORDERED_LIST_COMMAND as T, ListItemNode as E, ListNode as D, REMOVE_LIST_COMMAND as O } from "@lexical/list";
|
|
11
|
-
import { $createCodeHighlightNode as k, $isCodeHighlightNode as A, $isCodeNode as j, $plainifyCodeContent as ee, CodeHighlightNode as M, CodeNode as
|
|
12
|
-
import { $createHeadingNode as
|
|
13
|
-
import { $findCellNode as
|
|
14
|
-
import { $applyNodeReplacement as
|
|
11
|
+
import { $createCodeHighlightNode as k, $isCodeHighlightNode as A, $isCodeNode as j, $plainifyCodeContent as ee, CodeHighlightNode as M, CodeNode as N, registerCodeIndentation as te } from "@lexical/code-core";
|
|
12
|
+
import { $createHeadingNode as ne, $isHeadingNode as re, HeadingNode as ie } from "@lexical/rich-text";
|
|
13
|
+
import { $findCellNode as ae, $isTableCellNode as oe, $isTableNode as P, $isTableRowNode as se, TableCellNode as ce, TableNode as le, TableRowNode as ue, registerTableCellUnmergeTransform as de, registerTablePlugin as fe, registerTableSelectionObserver as pe, setScrollableTablesActive as me } from "@lexical/table";
|
|
14
|
+
import { $applyNodeReplacement as he, $createLineBreakNode as ge, $createParagraphNode as _e, $createTabNode as ve, $createTextNode as ye, $getNodeByKey as F, $getRoot as I, $getSelection as L, $insertNodes as be, $isElementNode as xe, $isLineBreakNode as Se, $isRangeSelection as R, $isRootOrShadowRoot as Ce, $isTabNode as we, $isTextNode as Te, $nodesOfType as Ee, $onUpdate as De, $setSelection as Oe, BLUR_COMMAND as ke, COMMAND_PRIORITY_HIGH as Ae, COMMAND_PRIORITY_LOW as je, DROP_COMMAND as Me, DecoratorNode as Ne, FOCUS_COMMAND as Pe, FORMAT_ELEMENT_COMMAND as Fe, FORMAT_TEXT_COMMAND as Ie, HISTORY_MERGE_TAG as Le, INDENT_CONTENT_COMMAND as Re, KEY_ENTER_COMMAND as ze, KEY_TAB_COMMAND as Be, OUTDENT_CONTENT_COMMAND as Ve, PASTE_COMMAND as He, PASTE_TAG as Ue, TextNode as We, isHTMLElement as Ge, mergeRegister as Ke } from "lexical";
|
|
15
15
|
import { ContentEditable as qe } from "@lexical/react/LexicalContentEditable";
|
|
16
16
|
import { HistoryPlugin as Je } from "@lexical/react/LexicalHistoryPlugin";
|
|
17
17
|
import { LinkPlugin as Ye } from "@lexical/react/LexicalLinkPlugin";
|
|
@@ -132,93 +132,93 @@ var st = [
|
|
|
132
132
|
"bmp",
|
|
133
133
|
"tif"
|
|
134
134
|
], ht = mt.map((e) => `.${e}`).join(","), gt = "calc(100dvh - 104px)", V = {
|
|
135
|
-
"bsy-mobile-editor": "_bsy-mobile-
|
|
136
|
-
"bsy-mobile-editor__label": "_bsy-mobile-
|
|
137
|
-
"bsy-mobile-editor__label-text": "_bsy-mobile-editor__label-
|
|
138
|
-
"bsy-mobile-editor__header": "_bsy-mobile-
|
|
139
|
-
"bsy-mobile-editor__title": "_bsy-mobile-
|
|
140
|
-
"bsy-mobile-editor__close": "_bsy-mobile-
|
|
141
|
-
"bsy-mobile-editor__content": "_bsy-mobile-
|
|
142
|
-
"bsy-mobile-editor__editable": "_bsy-mobile-
|
|
143
|
-
"bsy-mobile-editor__image-shell": "_bsy-mobile-editor__image-
|
|
144
|
-
"bsy-mobile-editor__image": "_bsy-mobile-
|
|
145
|
-
"bsy-mobile-editor__image-mask": "_bsy-mobile-editor__image-
|
|
146
|
-
"bsy-mobile-editor__image-progress": "_bsy-mobile-editor__image-
|
|
147
|
-
"bsy-mobile-editor__image-progress--spin": "_bsy-mobile-editor__image-progress--
|
|
148
|
-
"bsy-mobile-editor-progress-spin": "_bsy-mobile-editor-progress-
|
|
149
|
-
"bsy-mobile-editor__toolbar": "_bsy-mobile-
|
|
150
|
-
"bsy-mobile-editor__toolbar-scroller": "_bsy-mobile-editor__toolbar-
|
|
151
|
-
"bsy-mobile-editor__toolbar-track": "_bsy-mobile-editor__toolbar-
|
|
152
|
-
"bsy-mobile-editor__toolbar-thumb": "_bsy-mobile-editor__toolbar-
|
|
153
|
-
"bsy-mobile-editor__toolbar-group": "_bsy-mobile-editor__toolbar-
|
|
154
|
-
"bsy-mobile-editor__toolbar-divider": "_bsy-mobile-editor__toolbar-
|
|
155
|
-
"bsy-mobile-editor__tool": "_bsy-mobile-
|
|
156
|
-
"bsy-mobile-editor__tool--active": "_bsy-mobile-editor__tool--
|
|
157
|
-
"bsy-mobile-editor__tool--select": "_bsy-mobile-editor__tool--
|
|
158
|
-
"bsy-mobile-editor__tool--select-align": "_bsy-mobile-editor__tool--select-
|
|
159
|
-
"bsy-mobile-editor__tool-caret": "_bsy-mobile-editor__tool-
|
|
160
|
-
"bsy-mobile-editor__tool-caret--open": "_bsy-mobile-editor__tool-caret--
|
|
161
|
-
"bsy-mobile-editor__ai-icon": "_bsy-mobile-editor__ai-
|
|
162
|
-
"bsy-mobile-editor__tool-text": "_bsy-mobile-editor__tool-
|
|
163
|
-
"bsy-mobile-editor__color": "_bsy-mobile-
|
|
164
|
-
"bsy-mobile-editor__color--custom": "_bsy-mobile-editor__color--
|
|
165
|
-
"bsy-mobile-editor__color-header": "_bsy-mobile-editor__color-
|
|
166
|
-
"bsy-mobile-editor__color-header-title": "_bsy-mobile-editor__color-header-
|
|
167
|
-
"bsy-mobile-editor__color-header-back": "_bsy-mobile-editor__color-header-
|
|
168
|
-
"bsy-mobile-editor__color-grid": "_bsy-mobile-editor__color-
|
|
169
|
-
"bsy-mobile-editor__color-swatch": "_bsy-mobile-editor__color-
|
|
170
|
-
"bsy-mobile-editor__color-none": "_bsy-mobile-editor__color-
|
|
171
|
-
"bsy-mobile-editor__color-custom-item": "_bsy-mobile-editor__color-custom-
|
|
172
|
-
"bsy-mobile-editor__color-swatch--selected": "_bsy-mobile-editor__color-swatch--
|
|
173
|
-
"bsy-mobile-editor__color-none--selected": "_bsy-mobile-editor__color-none--
|
|
174
|
-
"bsy-mobile-editor__color-custom-item--selected": "_bsy-mobile-editor__color-custom-item--
|
|
175
|
-
"bsy-mobile-editor__color-swatch-fill": "_bsy-mobile-editor__color-swatch-
|
|
176
|
-
"bsy-mobile-editor__color-bar": "_bsy-mobile-editor__color-
|
|
177
|
-
"bsy-mobile-editor__color-custom-trigger": "_bsy-mobile-editor__color-custom-
|
|
178
|
-
"bsy-mobile-editor__color-custom-trigger--active": "_bsy-mobile-editor__color-custom-trigger--
|
|
179
|
-
"bsy-mobile-editor__color-custom-trigger--preview": "_bsy-mobile-editor__color-custom-trigger--
|
|
180
|
-
"bsy-mobile-editor__color-custom-list": "_bsy-mobile-editor__color-custom-
|
|
181
|
-
"bsy-mobile-editor__color-mixer": "_bsy-mobile-editor__color-
|
|
182
|
-
"bsy-mobile-editor__color-spectrum": "_bsy-mobile-editor__color-
|
|
183
|
-
"bsy-mobile-editor__color-spectrum-canvas": "_bsy-mobile-editor__color-spectrum-
|
|
184
|
-
"bsy-mobile-editor__color-thumb": "_bsy-mobile-editor__color-
|
|
185
|
-
"bsy-mobile-editor__sheet": "_bsy-mobile-
|
|
186
|
-
"bsy-mobile-editor__sheet-body": "_bsy-mobile-editor__sheet-
|
|
187
|
-
"bsy-mobile-editor__sheet-body--stack": "_bsy-mobile-editor__sheet-body--
|
|
188
|
-
"bsy-mobile-editor__sheet-field": "_bsy-mobile-editor__sheet-
|
|
189
|
-
"bsy-mobile-editor__sheet-label": "_bsy-mobile-editor__sheet-
|
|
190
|
-
"bsy-mobile-editor__sheet-note": "_bsy-mobile-editor__sheet-
|
|
191
|
-
"bsy-mobile-editor__sheet-note--hint": "_bsy-mobile-editor__sheet-note--
|
|
192
|
-
"bsy-mobile-editor__sheet-error": "_bsy-mobile-editor__sheet-
|
|
193
|
-
"bsy-mobile-editor__sheet-bar": "_bsy-mobile-editor__sheet-
|
|
194
|
-
"bsy-mobile-editor__sheet-ok": "_bsy-mobile-editor__sheet-
|
|
195
|
-
"bsy-mobile-editor__check": "_bsy-mobile-
|
|
196
|
-
"bsy-mobile-editor__check-input": "_bsy-mobile-editor__check-
|
|
197
|
-
"bsy-mobile-editor__check-box": "_bsy-mobile-editor__check-
|
|
198
|
-
"bsy-mobile-editor__ai": "_bsy-mobile-
|
|
199
|
-
"bsy-mobile-editor__ai-body": "_bsy-mobile-editor__ai-
|
|
200
|
-
"bsy-mobile-editor__ai-section": "_bsy-mobile-editor__ai-
|
|
201
|
-
"bsy-mobile-editor__ai-section-head": "_bsy-mobile-editor__ai-section-
|
|
202
|
-
"bsy-mobile-editor__ai-section-scroll": "_bsy-mobile-editor__ai-section-
|
|
203
|
-
"bsy-mobile-editor__ai-label": "_bsy-mobile-editor__ai-
|
|
204
|
-
"bsy-mobile-editor__ai-label--after": "_bsy-mobile-editor__ai-label--
|
|
205
|
-
"bsy-mobile-editor__ai-label--before": "_bsy-mobile-editor__ai-label--
|
|
206
|
-
"bsy-mobile-editor__ai-dot": "_bsy-mobile-editor__ai-
|
|
207
|
-
"bsy-mobile-editor__ai-split": "_bsy-mobile-editor__ai-
|
|
208
|
-
"bsy-mobile-editor__ai-preset": "_bsy-mobile-editor__ai-
|
|
209
|
-
"bsy-mobile-editor__ai-think-pin": "_bsy-mobile-editor__ai-think-
|
|
210
|
-
"bsy-mobile-editor__ai-think-head": "_bsy-mobile-editor__ai-think-
|
|
211
|
-
"bsy-mobile-editor__ai-think-label": "_bsy-mobile-editor__ai-think-
|
|
212
|
-
"bsy-mobile-editor__ai-think-label--shimmer": "_bsy-mobile-editor__ai-think-label--
|
|
213
|
-
"bsy-mobile-ai-think-shimmer": "_bsy-mobile-ai-think-
|
|
214
|
-
"bsy-mobile-editor__ai-think-arrow": "_bsy-mobile-editor__ai-think-
|
|
215
|
-
"bsy-mobile-editor__ai-think-arrow--open": "_bsy-mobile-editor__ai-think-arrow--
|
|
216
|
-
"bsy-mobile-editor__ai-think-icon": "_bsy-mobile-editor__ai-think-
|
|
217
|
-
"bsy-mobile-ai-think": "_bsy-mobile-ai-
|
|
218
|
-
"bsy-mobile-editor__ai-think-body": "_bsy-mobile-editor__ai-think-
|
|
219
|
-
"bsy-mobile-editor__ai-error": "_bsy-mobile-editor__ai-
|
|
220
|
-
"bsy-mobile-editor__ai-footer": "_bsy-mobile-editor__ai-
|
|
221
|
-
"bsy-mobile-editor__ai-footer-ok": "_bsy-mobile-editor__ai-footer-
|
|
135
|
+
"bsy-mobile-editor": "_bsy-mobile-editor_1eri1_2",
|
|
136
|
+
"bsy-mobile-editor__label": "_bsy-mobile-editor__label_1eri1_15",
|
|
137
|
+
"bsy-mobile-editor__label-text": "_bsy-mobile-editor__label-text_1eri1_20",
|
|
138
|
+
"bsy-mobile-editor__header": "_bsy-mobile-editor__header_1eri1_29",
|
|
139
|
+
"bsy-mobile-editor__title": "_bsy-mobile-editor__title_1eri1_39",
|
|
140
|
+
"bsy-mobile-editor__close": "_bsy-mobile-editor__close_1eri1_49",
|
|
141
|
+
"bsy-mobile-editor__content": "_bsy-mobile-editor__content_1eri1_63",
|
|
142
|
+
"bsy-mobile-editor__editable": "_bsy-mobile-editor__editable_1eri1_73",
|
|
143
|
+
"bsy-mobile-editor__image-shell": "_bsy-mobile-editor__image-shell_1eri1_228",
|
|
144
|
+
"bsy-mobile-editor__image": "_bsy-mobile-editor__image_1eri1_228",
|
|
145
|
+
"bsy-mobile-editor__image-mask": "_bsy-mobile-editor__image-mask_1eri1_250",
|
|
146
|
+
"bsy-mobile-editor__image-progress": "_bsy-mobile-editor__image-progress_1eri1_259",
|
|
147
|
+
"bsy-mobile-editor__image-progress--spin": "_bsy-mobile-editor__image-progress--spin_1eri1_262",
|
|
148
|
+
"bsy-mobile-editor-progress-spin": "_bsy-mobile-editor-progress-spin_1eri1_1",
|
|
149
|
+
"bsy-mobile-editor__toolbar": "_bsy-mobile-editor__toolbar_1eri1_265",
|
|
150
|
+
"bsy-mobile-editor__toolbar-scroller": "_bsy-mobile-editor__toolbar-scroller_1eri1_280",
|
|
151
|
+
"bsy-mobile-editor__toolbar-track": "_bsy-mobile-editor__toolbar-track_1eri1_297",
|
|
152
|
+
"bsy-mobile-editor__toolbar-thumb": "_bsy-mobile-editor__toolbar-thumb_1eri1_309",
|
|
153
|
+
"bsy-mobile-editor__toolbar-group": "_bsy-mobile-editor__toolbar-group_1eri1_314",
|
|
154
|
+
"bsy-mobile-editor__toolbar-divider": "_bsy-mobile-editor__toolbar-divider_1eri1_320",
|
|
155
|
+
"bsy-mobile-editor__tool": "_bsy-mobile-editor__tool_1eri1_265",
|
|
156
|
+
"bsy-mobile-editor__tool--active": "_bsy-mobile-editor__tool--active_1eri1_341",
|
|
157
|
+
"bsy-mobile-editor__tool--select": "_bsy-mobile-editor__tool--select_1eri1_348",
|
|
158
|
+
"bsy-mobile-editor__tool--select-align": "_bsy-mobile-editor__tool--select-align_1eri1_353",
|
|
159
|
+
"bsy-mobile-editor__tool-caret": "_bsy-mobile-editor__tool-caret_1eri1_356",
|
|
160
|
+
"bsy-mobile-editor__tool-caret--open": "_bsy-mobile-editor__tool-caret--open_1eri1_359",
|
|
161
|
+
"bsy-mobile-editor__ai-icon": "_bsy-mobile-editor__ai-icon_1eri1_362",
|
|
162
|
+
"bsy-mobile-editor__tool-text": "_bsy-mobile-editor__tool-text_1eri1_367",
|
|
163
|
+
"bsy-mobile-editor__color": "_bsy-mobile-editor__color_1eri1_372",
|
|
164
|
+
"bsy-mobile-editor__color--custom": "_bsy-mobile-editor__color--custom_1eri1_380",
|
|
165
|
+
"bsy-mobile-editor__color-header": "_bsy-mobile-editor__color-header_1eri1_383",
|
|
166
|
+
"bsy-mobile-editor__color-header-title": "_bsy-mobile-editor__color-header-title_1eri1_392",
|
|
167
|
+
"bsy-mobile-editor__color-header-back": "_bsy-mobile-editor__color-header-back_1eri1_405",
|
|
168
|
+
"bsy-mobile-editor__color-grid": "_bsy-mobile-editor__color-grid_1eri1_419",
|
|
169
|
+
"bsy-mobile-editor__color-swatch": "_bsy-mobile-editor__color-swatch_1eri1_426",
|
|
170
|
+
"bsy-mobile-editor__color-none": "_bsy-mobile-editor__color-none_1eri1_426",
|
|
171
|
+
"bsy-mobile-editor__color-custom-item": "_bsy-mobile-editor__color-custom-item_1eri1_426",
|
|
172
|
+
"bsy-mobile-editor__color-swatch--selected": "_bsy-mobile-editor__color-swatch--selected_1eri1_442",
|
|
173
|
+
"bsy-mobile-editor__color-none--selected": "_bsy-mobile-editor__color-none--selected_1eri1_442",
|
|
174
|
+
"bsy-mobile-editor__color-custom-item--selected": "_bsy-mobile-editor__color-custom-item--selected_1eri1_442",
|
|
175
|
+
"bsy-mobile-editor__color-swatch-fill": "_bsy-mobile-editor__color-swatch-fill_1eri1_456",
|
|
176
|
+
"bsy-mobile-editor__color-bar": "_bsy-mobile-editor__color-bar_1eri1_463",
|
|
177
|
+
"bsy-mobile-editor__color-custom-trigger": "_bsy-mobile-editor__color-custom-trigger_1eri1_469",
|
|
178
|
+
"bsy-mobile-editor__color-custom-trigger--active": "_bsy-mobile-editor__color-custom-trigger--active_1eri1_487",
|
|
179
|
+
"bsy-mobile-editor__color-custom-trigger--preview": "_bsy-mobile-editor__color-custom-trigger--preview_1eri1_492",
|
|
180
|
+
"bsy-mobile-editor__color-custom-list": "_bsy-mobile-editor__color-custom-list_1eri1_507",
|
|
181
|
+
"bsy-mobile-editor__color-mixer": "_bsy-mobile-editor__color-mixer_1eri1_527",
|
|
182
|
+
"bsy-mobile-editor__color-spectrum": "_bsy-mobile-editor__color-spectrum_1eri1_530",
|
|
183
|
+
"bsy-mobile-editor__color-spectrum-canvas": "_bsy-mobile-editor__color-spectrum-canvas_1eri1_538",
|
|
184
|
+
"bsy-mobile-editor__color-thumb": "_bsy-mobile-editor__color-thumb_1eri1_545",
|
|
185
|
+
"bsy-mobile-editor__sheet": "_bsy-mobile-editor__sheet_1eri1_555",
|
|
186
|
+
"bsy-mobile-editor__sheet-body": "_bsy-mobile-editor__sheet-body_1eri1_561",
|
|
187
|
+
"bsy-mobile-editor__sheet-body--stack": "_bsy-mobile-editor__sheet-body--stack_1eri1_566",
|
|
188
|
+
"bsy-mobile-editor__sheet-field": "_bsy-mobile-editor__sheet-field_1eri1_571",
|
|
189
|
+
"bsy-mobile-editor__sheet-label": "_bsy-mobile-editor__sheet-label_1eri1_576",
|
|
190
|
+
"bsy-mobile-editor__sheet-note": "_bsy-mobile-editor__sheet-note_1eri1_582",
|
|
191
|
+
"bsy-mobile-editor__sheet-note--hint": "_bsy-mobile-editor__sheet-note--hint_1eri1_588",
|
|
192
|
+
"bsy-mobile-editor__sheet-error": "_bsy-mobile-editor__sheet-error_1eri1_591",
|
|
193
|
+
"bsy-mobile-editor__sheet-bar": "_bsy-mobile-editor__sheet-bar_1eri1_611",
|
|
194
|
+
"bsy-mobile-editor__sheet-ok": "_bsy-mobile-editor__sheet-ok_1eri1_632",
|
|
195
|
+
"bsy-mobile-editor__check": "_bsy-mobile-editor__check_1eri1_637",
|
|
196
|
+
"bsy-mobile-editor__check-input": "_bsy-mobile-editor__check-input_1eri1_649",
|
|
197
|
+
"bsy-mobile-editor__check-box": "_bsy-mobile-editor__check-box_1eri1_656",
|
|
198
|
+
"bsy-mobile-editor__ai": "_bsy-mobile-editor__ai_1eri1_362",
|
|
199
|
+
"bsy-mobile-editor__ai-body": "_bsy-mobile-editor__ai-body_1eri1_678",
|
|
200
|
+
"bsy-mobile-editor__ai-section": "_bsy-mobile-editor__ai-section_1eri1_686",
|
|
201
|
+
"bsy-mobile-editor__ai-section-head": "_bsy-mobile-editor__ai-section-head_1eri1_694",
|
|
202
|
+
"bsy-mobile-editor__ai-section-scroll": "_bsy-mobile-editor__ai-section-scroll_1eri1_702",
|
|
203
|
+
"bsy-mobile-editor__ai-label": "_bsy-mobile-editor__ai-label_1eri1_709",
|
|
204
|
+
"bsy-mobile-editor__ai-label--after": "_bsy-mobile-editor__ai-label--after_1eri1_721",
|
|
205
|
+
"bsy-mobile-editor__ai-label--before": "_bsy-mobile-editor__ai-label--before_1eri1_725",
|
|
206
|
+
"bsy-mobile-editor__ai-dot": "_bsy-mobile-editor__ai-dot_1eri1_729",
|
|
207
|
+
"bsy-mobile-editor__ai-split": "_bsy-mobile-editor__ai-split_1eri1_736",
|
|
208
|
+
"bsy-mobile-editor__ai-preset": "_bsy-mobile-editor__ai-preset_1eri1_742",
|
|
209
|
+
"bsy-mobile-editor__ai-think-pin": "_bsy-mobile-editor__ai-think-pin_1eri1_762",
|
|
210
|
+
"bsy-mobile-editor__ai-think-head": "_bsy-mobile-editor__ai-think-head_1eri1_766",
|
|
211
|
+
"bsy-mobile-editor__ai-think-label": "_bsy-mobile-editor__ai-think-label_1eri1_783",
|
|
212
|
+
"bsy-mobile-editor__ai-think-label--shimmer": "_bsy-mobile-editor__ai-think-label--shimmer_1eri1_787",
|
|
213
|
+
"bsy-mobile-ai-think-shimmer": "_bsy-mobile-ai-think-shimmer_1eri1_1",
|
|
214
|
+
"bsy-mobile-editor__ai-think-arrow": "_bsy-mobile-editor__ai-think-arrow_1eri1_798",
|
|
215
|
+
"bsy-mobile-editor__ai-think-arrow--open": "_bsy-mobile-editor__ai-think-arrow--open_1eri1_805",
|
|
216
|
+
"bsy-mobile-editor__ai-think-icon": "_bsy-mobile-editor__ai-think-icon_1eri1_808",
|
|
217
|
+
"bsy-mobile-ai-think": "_bsy-mobile-ai-think_1eri1_1",
|
|
218
|
+
"bsy-mobile-editor__ai-think-body": "_bsy-mobile-editor__ai-think-body_1eri1_820",
|
|
219
|
+
"bsy-mobile-editor__ai-error": "_bsy-mobile-editor__ai-error_1eri1_829",
|
|
220
|
+
"bsy-mobile-editor__ai-footer": "_bsy-mobile-editor__ai-footer_1eri1_834",
|
|
221
|
+
"bsy-mobile-editor__ai-footer-ok": "_bsy-mobile-editor__ai-footer-ok_1eri1_856"
|
|
222
222
|
}, _t = {
|
|
223
223
|
typeset: [
|
|
224
224
|
"你是一名专业的 HTML 文档排版引擎。输入已是 HTML 片段。",
|
|
@@ -256,7 +256,7 @@ var st = [
|
|
|
256
256
|
" - 需要扫读的关键词:给 span 加 background-color 浅底。对:<span style=\"background-color:#fff4cd\">关键词</span>。错:<p style=\"background-color:#f0f6ff\">整段</p>。",
|
|
257
257
|
" - 背景色只能写在 span 上(短语级),禁止写在 p / h1-h3 / ul / ol / li。",
|
|
258
258
|
" - 段落/标题缩进只用 padding-inline-start,且必须是 40px 的倍数(与编辑器「增加缩进」一致)。",
|
|
259
|
-
" -
|
|
259
|
+
" - 列表不要写 ul/ol/li 的 padding;标记槽由编辑器按字号处理。",
|
|
260
260
|
" - 颜色用任意合法 CSS 色值即可(#RGB、#RRGGBB、rgb())。同一篇里主色不超过 2 种强调色,正文保持深色可读。",
|
|
261
261
|
" - span 仅可用于 color / font-size / background-color。",
|
|
262
262
|
" - p / h1-h3 仅可用于 text-align / padding-inline-start。",
|
|
@@ -324,18 +324,38 @@ var st = [
|
|
|
324
324
|
t.style.removeProperty("background-color"), t.style.removeProperty("background"), t.getAttribute("style")?.trim() || t.removeAttribute("style");
|
|
325
325
|
}
|
|
326
326
|
return t.innerHTML;
|
|
327
|
-
}, Mt = [
|
|
327
|
+
}, Mt = "--listitem-marker-font-size", Nt = `max(24px, calc(var(${Mt}, 1em) * 1.25))`, Pt = new Set([
|
|
328
|
+
"U",
|
|
329
|
+
"I",
|
|
330
|
+
"EM",
|
|
331
|
+
"B",
|
|
332
|
+
"STRONG"
|
|
333
|
+
]), Ft = (e) => e.startsWith("--listitem-marker-"), It = (e) => {
|
|
334
|
+
let t = e.style.fontSize;
|
|
335
|
+
if (t) for (let n = e.parentElement; n; n = n.parentElement) Pt.has(n.tagName) && !n.style.fontSize && (n.style.fontSize = t), n.tagName === "LI" && !n.classList.contains("editor-nested-listitem") && !n.style.getPropertyValue(Mt) && n.style.setProperty(Mt, t);
|
|
336
|
+
}, Lt = (e, t, n, r) => {
|
|
337
|
+
if (!e) return;
|
|
338
|
+
let i = e.shadowRoot ?? e.attachShadow({ mode: "open" }), a = document.createElement("div");
|
|
339
|
+
a.className = "bsy-editor-html-preview__body", a.innerHTML = n(t);
|
|
340
|
+
for (let e of Array.from(a.querySelectorAll("table"))) {
|
|
341
|
+
if (e.parentElement?.classList.contains("editor-table-scrollable-wrapper")) continue;
|
|
342
|
+
let t = document.createElement("div");
|
|
343
|
+
t.className = "editor-table-scrollable-wrapper", e.replaceWith(t), t.append(e);
|
|
344
|
+
}
|
|
345
|
+
let o = document.createElement("style");
|
|
346
|
+
o.textContent = r, i.replaceChildren(o, a);
|
|
347
|
+
}, Rt = [
|
|
328
348
|
"color",
|
|
329
349
|
"background-color",
|
|
330
350
|
"font-size",
|
|
331
351
|
"font-family",
|
|
332
352
|
"font-weight",
|
|
333
353
|
"text-decoration"
|
|
334
|
-
],
|
|
354
|
+
], zt = (e) => {
|
|
335
355
|
let t = e.body.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, td, th");
|
|
336
356
|
for (let n of Array.from(t)) {
|
|
337
357
|
let t = n, r = [];
|
|
338
|
-
for (let e of
|
|
358
|
+
for (let e of Rt) {
|
|
339
359
|
let n = t.style.getPropertyValue(e);
|
|
340
360
|
n && (r.push(`${e}: ${n}`), t.style.removeProperty(e));
|
|
341
361
|
}
|
|
@@ -353,34 +373,34 @@ var st = [
|
|
|
353
373
|
}
|
|
354
374
|
}
|
|
355
375
|
}
|
|
356
|
-
},
|
|
376
|
+
}, Bt = (e, t) => {
|
|
357
377
|
let n = I();
|
|
358
378
|
if (n.clear(), t.trim()) {
|
|
359
379
|
let r = new DOMParser().parseFromString(t, "text/html");
|
|
360
|
-
|
|
380
|
+
zt(r);
|
|
361
381
|
let i = tt(e, r);
|
|
362
382
|
if (i.length) {
|
|
363
383
|
n.select(), be(i), Oe(null);
|
|
364
384
|
return;
|
|
365
385
|
}
|
|
366
386
|
}
|
|
367
|
-
let r =
|
|
387
|
+
let r = _e();
|
|
368
388
|
n.append(r), Oe(null);
|
|
369
|
-
},
|
|
389
|
+
}, Vt = (e) => {
|
|
370
390
|
if (e) {
|
|
371
391
|
I().selectStart();
|
|
372
392
|
return;
|
|
373
393
|
}
|
|
374
394
|
Oe(null);
|
|
375
|
-
},
|
|
395
|
+
}, Ht = (e) => {
|
|
376
396
|
e && Oe(e.clone());
|
|
377
|
-
},
|
|
397
|
+
}, Ut = () => {
|
|
378
398
|
L() === null && I().selectStart();
|
|
379
399
|
}, H = (e) => {
|
|
380
400
|
e.isEditable() || e.setEditable(!0), e.update(() => {
|
|
381
|
-
|
|
401
|
+
Ut();
|
|
382
402
|
}), e.focus(void 0, { defaultSelection: "rootStart" });
|
|
383
|
-
},
|
|
403
|
+
}, Wt = (e, t) => !t.trim() && (e === "<p><br></p>" || e === "<p></p>" || e === "" || /^<p>\s*<br>\s*<\/p>$/.test(e)), Gt = /* @__PURE__ */ "p.br.strong.em.b.i.u.s.span.sub.sup.ul.ol.li.a.img.pre.code.table.thead.tbody.tr.td.th.h1.h2.h3.h4.h5.h6".split("."), Kt = [
|
|
384
404
|
"href",
|
|
385
405
|
"src",
|
|
386
406
|
"alt",
|
|
@@ -396,12 +416,12 @@ var st = [
|
|
|
396
416
|
"style",
|
|
397
417
|
"width",
|
|
398
418
|
"height"
|
|
399
|
-
],
|
|
419
|
+
], qt = new Set(/* @__PURE__ */ "color.background-color.font-size.font-family.font-weight.font-style.text-decoration.text-align.max-width.display.vertical-align.width.height.border.margin.margin-inline-start.padding.padding-inline-start.line-height.list-style-type.list-style-position.list-style.border-collapse.table-layout.overflow-x.white-space.position.top.bottom.tab-size.border-radius.box-sizing.min-width.min-height.cursor".split(".")), Jt = /^(?:(?:(?:f|ht)tps?|mailto|blob):|data:image\/[a-z0-9.+-]+[;,].*|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i, Yt = new Set([
|
|
400
420
|
"pre",
|
|
401
421
|
"code",
|
|
402
422
|
"td",
|
|
403
423
|
"th"
|
|
404
|
-
]),
|
|
424
|
+
]), Xt = new Set(["pre", "code"]), Zt = new Set(["sup", "sub"]), Qt = (e, t) => Ft(e) ? t === "li" : qt.has(e) ? e === "padding-inline-start" ? !0 : e === "padding" || e.startsWith("padding-") ? Yt.has(t) : e === "border-radius" ? Xt.has(t) : e === "position" || e === "top" || e === "bottom" ? Zt.has(t) : !0 : !1, $t = (e, t) => e.split(";").map((e) => e.trim()).filter(Boolean).map((e) => {
|
|
405
425
|
let n = e.indexOf(":");
|
|
406
426
|
if (n === -1) return null;
|
|
407
427
|
let r = e.slice(0, n).trim().toLowerCase(), i = e.slice(n + 1).trim();
|
|
@@ -409,30 +429,30 @@ var st = [
|
|
|
409
429
|
if (/url\s*\(/i.test(i)) return null;
|
|
410
430
|
r = "background-color";
|
|
411
431
|
}
|
|
412
|
-
return !
|
|
413
|
-
}).filter((e) => e !== null).join("; "),
|
|
414
|
-
|
|
432
|
+
return !Qt(r, t) || /expression|javascript:|url\s*\(\s*['"]?\s*javascript/i.test(i) ? null : `${r}: ${i}`;
|
|
433
|
+
}).filter((e) => e !== null).join("; "), en = !1, tn = () => {
|
|
434
|
+
en ||= (nt.addHook("uponSanitizeAttribute", (e, t) => {
|
|
415
435
|
if (t.attrName === "href" && /^data:/i.test(t.attrValue)) {
|
|
416
436
|
t.keepAttr = !1;
|
|
417
437
|
return;
|
|
418
438
|
}
|
|
419
|
-
t.attrName === "style" && (t.attrValue =
|
|
439
|
+
t.attrName === "style" && (t.attrValue = $t(t.attrValue, e.nodeName.toLowerCase()), t.attrValue || (t.keepAttr = !1));
|
|
420
440
|
}), !0);
|
|
421
|
-
}, U = (e) => e ? (
|
|
422
|
-
ALLOWED_TAGS:
|
|
423
|
-
ALLOWED_ATTR:
|
|
441
|
+
}, U = (e) => e ? (tn(), nt.sanitize(e, {
|
|
442
|
+
ALLOWED_TAGS: Gt,
|
|
443
|
+
ALLOWED_ATTR: Kt,
|
|
424
444
|
ALLOW_DATA_ATTR: !1,
|
|
425
445
|
ADD_ATTR: [
|
|
426
446
|
"data-language",
|
|
427
447
|
"data-id",
|
|
428
448
|
"data-src"
|
|
429
449
|
],
|
|
430
|
-
ALLOWED_URI_REGEXP:
|
|
450
|
+
ALLOWED_URI_REGEXP: Jt
|
|
431
451
|
})) : "", W = {
|
|
432
452
|
margin: "0.6em 0 0.4em",
|
|
433
453
|
"font-weight": "600",
|
|
434
454
|
"line-height": "1.35"
|
|
435
|
-
},
|
|
455
|
+
}, nn = {
|
|
436
456
|
h1: {
|
|
437
457
|
...W,
|
|
438
458
|
"font-size": "2em"
|
|
@@ -457,24 +477,26 @@ var st = [
|
|
|
457
477
|
...W,
|
|
458
478
|
"font-size": "0.875em"
|
|
459
479
|
}
|
|
460
|
-
},
|
|
480
|
+
}, rn = {
|
|
461
481
|
color: "#0269ff",
|
|
462
482
|
cursor: "pointer"
|
|
463
|
-
},
|
|
483
|
+
}, an = {
|
|
464
484
|
margin: "0",
|
|
465
|
-
"padding-inline-start": "
|
|
485
|
+
"padding-inline-start": "0",
|
|
466
486
|
"list-style-position": "outside"
|
|
467
|
-
},
|
|
487
|
+
}, on = [
|
|
468
488
|
"disc",
|
|
469
489
|
"circle",
|
|
470
490
|
"square"
|
|
471
|
-
],
|
|
491
|
+
], sn = {
|
|
472
492
|
margin: "0",
|
|
493
|
+
"margin-inline-start": Nt,
|
|
473
494
|
"list-style": "inherit"
|
|
474
|
-
},
|
|
495
|
+
}, cn = {
|
|
475
496
|
margin: "0",
|
|
497
|
+
"margin-inline-start": "0",
|
|
476
498
|
"list-style-type": "none"
|
|
477
|
-
},
|
|
499
|
+
}, ln = {
|
|
478
500
|
display: "block",
|
|
479
501
|
"box-sizing": "border-box",
|
|
480
502
|
"max-width": "100%",
|
|
@@ -489,23 +511,23 @@ var st = [
|
|
|
489
511
|
"border-radius": "4px",
|
|
490
512
|
"background-color": "rgb(240, 242, 245)",
|
|
491
513
|
color: "#1f2328"
|
|
492
|
-
},
|
|
514
|
+
}, un = {
|
|
493
515
|
"border-collapse": "collapse",
|
|
494
516
|
"table-layout": "fixed",
|
|
495
517
|
width: "100%",
|
|
496
518
|
"overflow-x": "auto",
|
|
497
519
|
margin: "8px 0"
|
|
498
|
-
},
|
|
520
|
+
}, dn = {
|
|
499
521
|
"box-sizing": "border-box",
|
|
500
522
|
"min-width": "75px",
|
|
501
523
|
"min-height": "32px",
|
|
502
524
|
padding: "4px 8px",
|
|
503
525
|
border: "1px solid #d9d9d9",
|
|
504
526
|
"vertical-align": "top"
|
|
505
|
-
},
|
|
527
|
+
}, fn = {
|
|
506
528
|
"font-weight": "600",
|
|
507
529
|
"background-color": "#f2f3f5"
|
|
508
|
-
},
|
|
530
|
+
}, pn = {
|
|
509
531
|
display: "inline-block",
|
|
510
532
|
position: "static",
|
|
511
533
|
top: "auto",
|
|
@@ -514,38 +536,39 @@ var st = [
|
|
|
514
536
|
"line-height": "1"
|
|
515
537
|
}, G = (e, t) => {
|
|
516
538
|
for (let [n, r] of Object.entries(t)) e.style.getPropertyValue(n) || e.style.setProperty(n, r);
|
|
517
|
-
},
|
|
539
|
+
}, mn = (e) => {
|
|
518
540
|
let t = 0, n = e;
|
|
519
541
|
for (; n;) n.tagName === "UL" && (t += 1), n = n.parentElement;
|
|
520
542
|
return t;
|
|
521
|
-
},
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
543
|
+
}, hn = (e) => {
|
|
544
|
+
let t = [...e.querySelectorAll("*")].filter((e) => e instanceof HTMLElement);
|
|
545
|
+
for (let e of t) It(e);
|
|
546
|
+
for (let e of t) {
|
|
547
|
+
let t = e.tagName.toLowerCase(), n = nn[t];
|
|
548
|
+
if (n && G(e, n), t === "a" && G(e, rn), t === "ul") {
|
|
549
|
+
let t = Math.min(Math.max(mn(e), 1), on.length);
|
|
550
|
+
G(e, {
|
|
551
|
+
...an,
|
|
552
|
+
"list-style-type": on[t - 1]
|
|
530
553
|
});
|
|
531
554
|
}
|
|
532
|
-
|
|
533
|
-
...
|
|
555
|
+
t === "ol" && G(e, {
|
|
556
|
+
...an,
|
|
534
557
|
"list-style-type": "decimal"
|
|
535
|
-
}),
|
|
536
|
-
...
|
|
537
|
-
"vertical-align":
|
|
538
|
-
}),
|
|
539
|
-
for (let
|
|
540
|
-
|
|
558
|
+
}), t === "li" && G(e, e.classList.contains("editor-nested-listitem") ? cn : sn), t === "pre" && G(e, ln), (t === "sup" || t === "sub") && G(e, {
|
|
559
|
+
...pn,
|
|
560
|
+
"vertical-align": t === "sup" ? "super" : "sub"
|
|
561
|
+
}), t === "table" && G(e, un), (t === "td" || t === "th") && (G(e, dn), (t === "th" || e.classList.contains("editor-table-cell-header")) && G(e, fn)), e.classList.contains("editor-text-underline-strikethrough") ? G(e, { "text-decoration": "underline line-through" }) : e.classList.contains("editor-text-underline") ? G(e, { "text-decoration": "underline" }) : e.classList.contains("editor-text-strikethrough") && G(e, { "text-decoration": "line-through" });
|
|
562
|
+
for (let t of Array.from(e.classList)) t.startsWith("editor-") && e.classList.remove(t);
|
|
563
|
+
e.classList.length === 0 && e.removeAttribute("class");
|
|
541
564
|
}
|
|
542
|
-
},
|
|
565
|
+
}, gn = (e) => {
|
|
543
566
|
let t = e.parentNode;
|
|
544
567
|
if (t) {
|
|
545
568
|
for (; e.firstChild;) t.insertBefore(e.firstChild, e);
|
|
546
569
|
t.removeChild(e);
|
|
547
570
|
}
|
|
548
|
-
},
|
|
571
|
+
}, _n = (e) => {
|
|
549
572
|
let t = !0;
|
|
550
573
|
for (; t;) {
|
|
551
574
|
t = !1;
|
|
@@ -553,21 +576,21 @@ var st = [
|
|
|
553
576
|
if (n.attributes.length > 0) continue;
|
|
554
577
|
let e = n.tagName.toLowerCase();
|
|
555
578
|
if (e === "span") {
|
|
556
|
-
|
|
579
|
+
gn(n), t = !0;
|
|
557
580
|
continue;
|
|
558
581
|
}
|
|
559
582
|
if (n.childElementCount !== 1 || n.childNodes.length !== 1) continue;
|
|
560
583
|
let r = n.firstElementChild;
|
|
561
|
-
(e === "b" && r?.tagName === "STRONG" || e === "i" && r?.tagName === "EM") && (
|
|
584
|
+
(e === "b" && r?.tagName === "STRONG" || e === "i" && r?.tagName === "EM") && (gn(n), t = !0);
|
|
562
585
|
}
|
|
563
586
|
}
|
|
564
|
-
},
|
|
587
|
+
}, vn = (e) => {
|
|
565
588
|
if (!e.trim()) return e;
|
|
566
589
|
let t = new DOMParser().parseFromString(e, "text/html");
|
|
567
|
-
|
|
590
|
+
hn(t.body), _n(t.body);
|
|
568
591
|
for (let e of Array.from(t.body.querySelectorAll("pre"))) e.textContent?.trim() || e.remove();
|
|
569
592
|
return t.body.innerHTML;
|
|
570
|
-
},
|
|
593
|
+
}, yn = (e) => e ? new DOMParser().parseFromString(e, "text/html").body.textContent ?? "" : "", bn = (e) => e.includes("<!--bsy-block-->") ? e.split(St).map((e) => e.trim()) : [e], xn = (e) => e.split(St).join("").trim().length > 0, Sn = (e, t) => {
|
|
571
594
|
let n = e.map(() => "");
|
|
572
595
|
if (e.length === 0) return n;
|
|
573
596
|
let r = [], i = [];
|
|
@@ -580,7 +603,7 @@ var st = [
|
|
|
580
603
|
for (; u < s && d < c;) a[u] === o[d] ? (f = r[u], n[f] += o[d], u += 1, d += 1) : l[u + 1][d] >= l[u][d + 1] ? (f = r[u], u += 1) : (n[f] += o[d], d += 1);
|
|
581
604
|
for (; d < c;) n[n.length - 1] += o[d], d += 1;
|
|
582
605
|
return n;
|
|
583
|
-
},
|
|
606
|
+
}, Cn = new Set([
|
|
584
607
|
"TABLE",
|
|
585
608
|
"THEAD",
|
|
586
609
|
"TBODY",
|
|
@@ -589,7 +612,7 @@ var st = [
|
|
|
589
612
|
"TH",
|
|
590
613
|
"IMG",
|
|
591
614
|
"BR"
|
|
592
|
-
]),
|
|
615
|
+
]), wn = (e) => {
|
|
593
616
|
let t = [], n = (e) => {
|
|
594
617
|
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
595
618
|
if (e.tagName === "PRE") return;
|
|
@@ -599,25 +622,25 @@ var st = [
|
|
|
599
622
|
e.nodeType === Node.TEXT_NODE && t.push(e);
|
|
600
623
|
};
|
|
601
624
|
return n(e), t;
|
|
602
|
-
},
|
|
625
|
+
}, Tn = (e, t) => {
|
|
603
626
|
let n = e;
|
|
604
|
-
for (; n && n !== t && !
|
|
627
|
+
for (; n && n !== t && !Cn.has(n.tagName) && !(n.textContent ?? "").trim() && !n.querySelector("img, table, br");) {
|
|
605
628
|
let e = n.parentElement;
|
|
606
629
|
n.remove(), n = e;
|
|
607
630
|
}
|
|
608
|
-
},
|
|
631
|
+
}, En = (e) => {
|
|
609
632
|
let t = e.tagName;
|
|
610
633
|
return t === "IMG" || t === "TABLE" || t === "PRE";
|
|
611
|
-
},
|
|
634
|
+
}, Dn = (e) => {
|
|
612
635
|
let t = Tt(e);
|
|
613
|
-
return t ? Array.from(t.children).filter((e) => !
|
|
614
|
-
},
|
|
615
|
-
let n =
|
|
636
|
+
return t ? Array.from(t.children).filter((e) => !En(e)).map((e) => e.textContent ?? "") : [];
|
|
637
|
+
}, On = (e) => e.includes("<!--bsy-block-->") ? e : yn(e) || e, kn = (e, t) => {
|
|
638
|
+
let n = wn(e);
|
|
616
639
|
if (n.length === 0) {
|
|
617
640
|
t && (e.querySelector("br")?.remove(), e.append(e.ownerDocument.createTextNode(t)));
|
|
618
641
|
return;
|
|
619
642
|
}
|
|
620
|
-
let r =
|
|
643
|
+
let r = Sn(n.map((e) => e.textContent ?? ""), t);
|
|
621
644
|
for (let t = 0; t < n.length; t++) {
|
|
622
645
|
let i = r[t], a = n[t];
|
|
623
646
|
if (i) {
|
|
@@ -625,51 +648,51 @@ var st = [
|
|
|
625
648
|
continue;
|
|
626
649
|
}
|
|
627
650
|
let o = a.parentElement;
|
|
628
|
-
a.remove(),
|
|
651
|
+
a.remove(), Tn(o, e);
|
|
629
652
|
}
|
|
630
|
-
},
|
|
631
|
-
let n =
|
|
632
|
-
if (!
|
|
653
|
+
}, An = (e, t) => {
|
|
654
|
+
let n = On(t);
|
|
655
|
+
if (!xn(n) || !e.trim()) return "";
|
|
633
656
|
let r = Tt(e);
|
|
634
657
|
if (!r) return "";
|
|
635
|
-
let i = Array.from(r.children).filter((e) => !
|
|
658
|
+
let i = Array.from(r.children).filter((e) => !En(e));
|
|
636
659
|
if (i.length === 0) return "";
|
|
637
|
-
let a =
|
|
638
|
-
for (let e = 0; e < i.length; e++)
|
|
660
|
+
let a = bn(n), o = a.length === i.length ? a : Sn(i.map((e) => e.textContent ?? ""), a.join(""));
|
|
661
|
+
for (let e = 0; e < i.length; e++) kn(i[e], o[e] ?? "");
|
|
639
662
|
return r.innerHTML;
|
|
640
|
-
},
|
|
663
|
+
}, jn = (e, t) => {
|
|
641
664
|
let n = "";
|
|
642
665
|
e.getEditorState().read(() => {
|
|
643
|
-
n =
|
|
666
|
+
n = vn(U(et(e, null)));
|
|
644
667
|
}, { editor: e });
|
|
645
|
-
let r = U(
|
|
646
|
-
return !r.trim() ||
|
|
647
|
-
|
|
668
|
+
let r = U(An(n, t));
|
|
669
|
+
return !r.trim() || Wt(r, yn(r)) ? !1 : (e.update(() => {
|
|
670
|
+
Bt(e, r), Vt(!0);
|
|
648
671
|
}, { discrete: !0 }), !0);
|
|
649
|
-
},
|
|
672
|
+
}, Mn = /^\uFEFF/, Nn = /^ {0,3}`{1,3}[A-Za-z]*$/, Pn = /^( {0,3})([^`<]*?)```[ \t]*([A-Za-z0-9_-]*)[ \t]*(.*)$/, Fn = /^ {0,3}```[ \t]*$/, In = /<\/?[a-zA-Z]/, Ln = /<[a-zA-Z!]/, Rn = (e) => Ln.test(e), zn = (e) => In.test(e), Bn = (e) => e.replace(Mn, "").replace(/\r\n/g, "\n"), Vn = (e) => {
|
|
650
673
|
let t = e.replace(/\n+$/, ""), n = t.lastIndexOf("\n"), r = n === -1 ? t : t.slice(n + 1);
|
|
651
|
-
return
|
|
674
|
+
return Nn.test(r) ? {
|
|
652
675
|
text: n === -1 ? "" : t.slice(0, n),
|
|
653
676
|
withheld: !0
|
|
654
677
|
} : {
|
|
655
678
|
text: e,
|
|
656
679
|
withheld: !1
|
|
657
680
|
};
|
|
658
|
-
},
|
|
659
|
-
let t =
|
|
681
|
+
}, Hn = (e) => {
|
|
682
|
+
let t = Pn.exec(e);
|
|
660
683
|
return t ? { sameLineBody: t[4] ?? "" } : null;
|
|
661
|
-
},
|
|
684
|
+
}, Un = (e) => {
|
|
662
685
|
let t = e.replace(/[ \t]*```[ \t]*$/, "");
|
|
663
686
|
return t === e ? e : t;
|
|
664
|
-
},
|
|
687
|
+
}, Wn = (e) => Rn(e) ? e.replace(/^\n/, "") : "", Gn = (e) => {
|
|
665
688
|
let t = e.split("\n"), n = [], r = 0;
|
|
666
689
|
for (; r < t.length;) {
|
|
667
|
-
let e = t[r], i =
|
|
690
|
+
let e = t[r], i = Hn(e);
|
|
668
691
|
if (i) {
|
|
669
692
|
let e = i.sameLineBody;
|
|
670
|
-
if (e !==
|
|
671
|
-
e =
|
|
672
|
-
let i =
|
|
693
|
+
if (e !== Un(e)) {
|
|
694
|
+
e = Un(e);
|
|
695
|
+
let i = Wn(t.slice(r + 1).join("\n"));
|
|
673
696
|
return [
|
|
674
697
|
...n,
|
|
675
698
|
e,
|
|
@@ -677,61 +700,61 @@ var st = [
|
|
|
677
700
|
].filter(Boolean).join("\n");
|
|
678
701
|
}
|
|
679
702
|
let a = [];
|
|
680
|
-
for (e && a.push(e), r += 1; r < t.length && !
|
|
681
|
-
let o = r < t.length ?
|
|
703
|
+
for (e && a.push(e), r += 1; r < t.length && !Fn.test(t[r]);) a.push(t[r]), r += 1;
|
|
704
|
+
let o = r < t.length ? Wn(t.slice(r + 1).join("\n")) : "";
|
|
682
705
|
return [
|
|
683
706
|
...n,
|
|
684
707
|
a.join("\n"),
|
|
685
708
|
o
|
|
686
709
|
].filter(Boolean).join("\n");
|
|
687
710
|
}
|
|
688
|
-
if (
|
|
689
|
-
|
|
711
|
+
if (zn(e)) return Kn([...n, ...t.slice(r)].join("\n"));
|
|
712
|
+
Rn(e) && n.push(e), r += 1;
|
|
690
713
|
}
|
|
691
714
|
return n.length ? n.join("\n") : null;
|
|
692
|
-
},
|
|
715
|
+
}, Kn = (e) => {
|
|
693
716
|
let t = e.split("\n");
|
|
694
717
|
if (!t.length) return e;
|
|
695
|
-
let n =
|
|
696
|
-
return n && !
|
|
697
|
-
},
|
|
718
|
+
let n = Hn(t[0]);
|
|
719
|
+
return n && !zn(t[0].slice(0, t[0].indexOf("```"))) && (t.shift(), n.sameLineBody && t.unshift(Un(n.sameLineBody))), t.length && Fn.test(t[t.length - 1] ?? "") && t.pop(), t.join("\n");
|
|
720
|
+
}, qn = (e) => {
|
|
698
721
|
if (!e) return {
|
|
699
722
|
html: "",
|
|
700
723
|
pending: !1
|
|
701
724
|
};
|
|
702
|
-
let { text: t, withheld: n } =
|
|
725
|
+
let { text: t, withheld: n } = Vn(Bn(e));
|
|
703
726
|
if (!t.trim()) return {
|
|
704
727
|
html: "",
|
|
705
|
-
pending: n ||
|
|
728
|
+
pending: n || Nn.test(Bn(e).trim())
|
|
706
729
|
};
|
|
707
|
-
let r =
|
|
730
|
+
let r = Gn(t) ?? t, i = Gn(r);
|
|
708
731
|
i !== null && i !== r && (r = i);
|
|
709
732
|
let a = r.trim();
|
|
710
|
-
return
|
|
733
|
+
return Rn(a) ? {
|
|
711
734
|
html: a,
|
|
712
735
|
pending: !1
|
|
713
736
|
} : {
|
|
714
737
|
html: "",
|
|
715
738
|
pending: !0
|
|
716
739
|
};
|
|
717
|
-
},
|
|
718
|
-
let { html: n } =
|
|
740
|
+
}, Jn = (e, t) => {
|
|
741
|
+
let { html: n } = qn(e);
|
|
719
742
|
return n ? jt(Ot(n, t)) : "";
|
|
720
743
|
};
|
|
721
744
|
//#endregion
|
|
722
745
|
//#region src/components/Editor/utils/applyAiTypeset.ts
|
|
723
|
-
function
|
|
724
|
-
let r = U(
|
|
725
|
-
return !r.trim() ||
|
|
726
|
-
|
|
746
|
+
function Yn(e, t, n) {
|
|
747
|
+
let r = U(Jn(t, n));
|
|
748
|
+
return !r.trim() || Wt(r, "") ? { applied: !1 } : (e.update(() => {
|
|
749
|
+
Bt(e, r), Vt(!0);
|
|
727
750
|
}, { discrete: !0 }), { applied: !0 });
|
|
728
751
|
}
|
|
729
752
|
//#endregion
|
|
730
753
|
//#region src/components/Editor/utils/readEditorAiSnapshot.ts
|
|
731
|
-
var
|
|
754
|
+
var Xn = (e) => {
|
|
732
755
|
let t = "", n = "", r = "";
|
|
733
756
|
e.getEditorState().read(() => {
|
|
734
|
-
n = I().getTextContent(), t =
|
|
757
|
+
n = I().getTextContent(), t = vn(U(et(e, null))), r = Dn(t).join(`\n\n${St}\n\n`);
|
|
735
758
|
}, { editor: e });
|
|
736
759
|
let i = xt(t);
|
|
737
760
|
return {
|
|
@@ -741,7 +764,7 @@ var Wn = (e) => {
|
|
|
741
764
|
htmlWithoutCode: i.html,
|
|
742
765
|
codeBlocks: i.blocks
|
|
743
766
|
};
|
|
744
|
-
},
|
|
767
|
+
}, Zn = ({ editor: e, ai: t }) => {
|
|
745
768
|
let n = u(t);
|
|
746
769
|
n.current = t;
|
|
747
770
|
let [r, i] = d(null), [a, o] = d({
|
|
@@ -751,14 +774,14 @@ var Wn = (e) => {
|
|
|
751
774
|
htmlWithoutCode: "",
|
|
752
775
|
codeBlocks: []
|
|
753
776
|
}), [s, c] = d("quick"), l = () => {
|
|
754
|
-
let t =
|
|
777
|
+
let t = Xn(e);
|
|
755
778
|
o(t), i("typeset"), n.current?.typeset?.({
|
|
756
779
|
html: t.htmlWithoutCode,
|
|
757
780
|
text: t.text,
|
|
758
781
|
prompt: vt
|
|
759
782
|
});
|
|
760
783
|
}, f = (t) => {
|
|
761
|
-
let r =
|
|
784
|
+
let r = Xn(e);
|
|
762
785
|
o(r), c(t), i("polish"), n.current?.stop?.(), n.current?.polish?.({
|
|
763
786
|
text: r.polishText,
|
|
764
787
|
preset: t,
|
|
@@ -776,11 +799,11 @@ var Wn = (e) => {
|
|
|
776
799
|
close: p,
|
|
777
800
|
apply: () => {
|
|
778
801
|
let t = n.current?.text ?? "";
|
|
779
|
-
r === "typeset" ?
|
|
802
|
+
r === "typeset" ? Yn(e, t, a.codeBlocks) : r === "polish" && jn(e, t), p();
|
|
780
803
|
}
|
|
781
804
|
};
|
|
782
|
-
},
|
|
783
|
-
let a = o(
|
|
805
|
+
}, Qn = i({}), K = 36, $n = 14, er = 2 * Math.PI * $n, tr = ({ nodeKey: e, src: t, altText: n, dataId: r, dataSrc: i }) => {
|
|
806
|
+
let a = o(Qn), s = e in a, c = a[e];
|
|
784
807
|
return /* @__PURE__ */ m("span", {
|
|
785
808
|
className: V["bsy-mobile-editor__image"],
|
|
786
809
|
children: [/* @__PURE__ */ p("img", {
|
|
@@ -804,26 +827,26 @@ var Wn = (e) => {
|
|
|
804
827
|
children: [/* @__PURE__ */ p("circle", {
|
|
805
828
|
cx: K / 2,
|
|
806
829
|
cy: K / 2,
|
|
807
|
-
r:
|
|
830
|
+
r: $n,
|
|
808
831
|
fill: "none",
|
|
809
832
|
stroke: "rgba(255,255,255,0.35)",
|
|
810
833
|
strokeWidth: "3"
|
|
811
834
|
}), /* @__PURE__ */ p("circle", {
|
|
812
835
|
cx: K / 2,
|
|
813
836
|
cy: K / 2,
|
|
814
|
-
r:
|
|
837
|
+
r: $n,
|
|
815
838
|
fill: "none",
|
|
816
839
|
stroke: "#fff",
|
|
817
840
|
strokeWidth: "3",
|
|
818
841
|
strokeLinecap: "round",
|
|
819
|
-
strokeDasharray: c === void 0 ? `${
|
|
820
|
-
strokeDashoffset: c === void 0 ? 0 :
|
|
842
|
+
strokeDasharray: c === void 0 ? `${er * .25} ${er}` : er,
|
|
843
|
+
strokeDashoffset: c === void 0 ? 0 : er * (1 - c / 100),
|
|
821
844
|
transform: `rotate(-90 ${K / 2} ${K / 2})`
|
|
822
845
|
})]
|
|
823
846
|
})
|
|
824
847
|
}) : null]
|
|
825
848
|
});
|
|
826
|
-
},
|
|
849
|
+
}, nr = class e extends Ne {
|
|
827
850
|
__src;
|
|
828
851
|
__altText;
|
|
829
852
|
__width;
|
|
@@ -863,13 +886,13 @@ var Wn = (e) => {
|
|
|
863
886
|
}
|
|
864
887
|
static importDOM() {
|
|
865
888
|
return { img: () => ({
|
|
866
|
-
conversion:
|
|
889
|
+
conversion: ar,
|
|
867
890
|
priority: 0
|
|
868
891
|
}) };
|
|
869
892
|
}
|
|
870
893
|
static importJSON(e) {
|
|
871
894
|
let { src: t, altText: n, width: r, height: i, dataId: a, dataSrc: o } = e;
|
|
872
|
-
return
|
|
895
|
+
return ir({
|
|
873
896
|
src: t,
|
|
874
897
|
altText: n,
|
|
875
898
|
width: r,
|
|
@@ -894,7 +917,7 @@ var Wn = (e) => {
|
|
|
894
917
|
return !0;
|
|
895
918
|
}
|
|
896
919
|
decorate() {
|
|
897
|
-
return /* @__PURE__ */ p(
|
|
920
|
+
return /* @__PURE__ */ p(tr, {
|
|
898
921
|
nodeKey: this.getKey(),
|
|
899
922
|
src: this.__src,
|
|
900
923
|
altText: this.__altText,
|
|
@@ -902,7 +925,7 @@ var Wn = (e) => {
|
|
|
902
925
|
dataSrc: this.__dataSrc
|
|
903
926
|
});
|
|
904
927
|
}
|
|
905
|
-
},
|
|
928
|
+
}, rr = (e) => e instanceof nr, ir = ({ src: e, altText: t, width: n, height: r, dataId: i, dataSrc: a, key: o }) => new nr(e, t, n, r, o, i, a), ar = (e) => {
|
|
906
929
|
if (!(e instanceof HTMLImageElement)) return null;
|
|
907
930
|
let { src: t, alt: n, style: r } = e, i, a;
|
|
908
931
|
if (r.width) {
|
|
@@ -913,7 +936,7 @@ var Wn = (e) => {
|
|
|
913
936
|
let e = parseInt(r.height, 10);
|
|
914
937
|
Number.isNaN(e) || (a = e);
|
|
915
938
|
}
|
|
916
|
-
return i === void 0 && e.width && (i = e.width), a === void 0 && e.height && (a = e.height), { node:
|
|
939
|
+
return i === void 0 && e.width && (i = e.width), a === void 0 && e.height && (a = e.height), { node: ir({
|
|
917
940
|
src: t,
|
|
918
941
|
altText: n,
|
|
919
942
|
width: i,
|
|
@@ -921,7 +944,7 @@ var Wn = (e) => {
|
|
|
921
944
|
dataId: e.getAttribute("data-id") || void 0,
|
|
922
945
|
dataSrc: e.getAttribute("data-src") || void 0
|
|
923
946
|
}) };
|
|
924
|
-
},
|
|
947
|
+
}, or = (e) => mt.includes(e.name.split(".").pop()?.toLowerCase() ?? ""), sr = (e) => or(e) ? e.size > 5242880 ? "size" : null : "type", cr = ({ editor: e, upload: t, savedSelectionRef: n, attachmentsBySrc: r }) => {
|
|
925
948
|
let i = u(null), o = u(null), c = u(!0), [l, f] = d({}), p = a(() => {
|
|
926
949
|
o.current?.abort(), o.current = null;
|
|
927
950
|
}, []);
|
|
@@ -931,8 +954,8 @@ var Wn = (e) => {
|
|
|
931
954
|
let m = a((t, r, i) => {
|
|
932
955
|
let a = "";
|
|
933
956
|
return e.update(() => {
|
|
934
|
-
|
|
935
|
-
let e =
|
|
957
|
+
Ht(n.current), L() === null && I().selectEnd();
|
|
958
|
+
let e = ir({
|
|
936
959
|
src: t,
|
|
937
960
|
altText: r,
|
|
938
961
|
dataSrc: i
|
|
@@ -947,7 +970,7 @@ var Wn = (e) => {
|
|
|
947
970
|
insertImage: m,
|
|
948
971
|
onFileChange: a(async (n) => {
|
|
949
972
|
let i = n.target.files?.[0];
|
|
950
|
-
if (n.target.value = "", !i ||
|
|
973
|
+
if (n.target.value = "", !i || sr(i)) return;
|
|
951
974
|
p();
|
|
952
975
|
let a = new AbortController();
|
|
953
976
|
if (o.current = a, !t?.customRequest) {
|
|
@@ -1002,7 +1025,7 @@ var Wn = (e) => {
|
|
|
1002
1025
|
}
|
|
1003
1026
|
e.update(() => {
|
|
1004
1027
|
let e = F(l);
|
|
1005
|
-
|
|
1028
|
+
rr(e) && (e.setSrc(o), s && e.setDataId(s));
|
|
1006
1029
|
}), d(!0);
|
|
1007
1030
|
} catch {
|
|
1008
1031
|
d(!1);
|
|
@@ -1016,7 +1039,7 @@ var Wn = (e) => {
|
|
|
1016
1039
|
]),
|
|
1017
1040
|
abortUpload: p
|
|
1018
1041
|
};
|
|
1019
|
-
},
|
|
1042
|
+
}, lr = ({ editor: e, savedSelectionRef: t, captureSelection: n }) => {
|
|
1020
1043
|
let [r, i] = d(null);
|
|
1021
1044
|
return {
|
|
1022
1045
|
linkForm: r,
|
|
@@ -1043,7 +1066,7 @@ var Wn = (e) => {
|
|
|
1043
1066
|
if (!r) return;
|
|
1044
1067
|
let a = r.startsWith("@") || /^https?:\/\//.test(r) ? r : `http://${r}`;
|
|
1045
1068
|
e.update(() => {
|
|
1046
|
-
|
|
1069
|
+
Ht(t.current);
|
|
1047
1070
|
let e = L(), r = n.newBlank ? {
|
|
1048
1071
|
target: "_blank",
|
|
1049
1072
|
rel: "noopener noreferrer",
|
|
@@ -1062,7 +1085,7 @@ var Wn = (e) => {
|
|
|
1062
1085
|
let i = I(), o = i.getLastChild();
|
|
1063
1086
|
if (xe(o)) o.append(t);
|
|
1064
1087
|
else {
|
|
1065
|
-
let e =
|
|
1088
|
+
let e = _e();
|
|
1066
1089
|
e.append(t), i.append(e);
|
|
1067
1090
|
}
|
|
1068
1091
|
}
|
|
@@ -1070,14 +1093,14 @@ var Wn = (e) => {
|
|
|
1070
1093
|
},
|
|
1071
1094
|
closeLink: () => i(null)
|
|
1072
1095
|
};
|
|
1073
|
-
},
|
|
1096
|
+
}, ur = ({ editor: e, value: t, onChange: n, attachmentsBySrc: r }) => {
|
|
1074
1097
|
let i = u(null), o = u(n);
|
|
1075
1098
|
o.current = n;
|
|
1076
1099
|
let c = a((t) => {
|
|
1077
1100
|
t.read(() => {
|
|
1078
|
-
let n = I().getTextContent(), a =
|
|
1101
|
+
let n = I().getTextContent(), a = vn(U(et(e, null))), s = Wt(a, n) ? null : a;
|
|
1079
1102
|
i.current = s;
|
|
1080
|
-
let c = Ee(
|
|
1103
|
+
let c = Ee(nr).map((e) => r.get(e.getSrc())).filter((e) => e !== void 0);
|
|
1081
1104
|
o.current({
|
|
1082
1105
|
text: n,
|
|
1083
1106
|
html: s,
|
|
@@ -1087,7 +1110,7 @@ var Wn = (e) => {
|
|
|
1087
1110
|
}, [r, e]);
|
|
1088
1111
|
return s(() => {
|
|
1089
1112
|
t === void 0 || t === i.current || (i.current = t ?? null, e.update(() => {
|
|
1090
|
-
|
|
1113
|
+
Bt(e, t?.trim() ? U(t) : ""), Vt(!!e.getRootElement()?.contains(document.activeElement));
|
|
1091
1114
|
}, { onUpdate: () => {
|
|
1092
1115
|
e.getRootElement() || c(e.getEditorState());
|
|
1093
1116
|
} }));
|
|
@@ -1096,11 +1119,11 @@ var Wn = (e) => {
|
|
|
1096
1119
|
c,
|
|
1097
1120
|
t
|
|
1098
1121
|
]), c;
|
|
1099
|
-
},
|
|
1122
|
+
}, dr = 250, fr = () => {
|
|
1100
1123
|
let [e] = z(), t = u(0);
|
|
1101
1124
|
return s(() => e.registerCommand(ze, (e) => {
|
|
1102
1125
|
let n = Date.now(), r = n - t.current;
|
|
1103
|
-
if (t.current = n, r <= 0 || r >=
|
|
1126
|
+
if (t.current = n, r <= 0 || r >= dr) return !1;
|
|
1104
1127
|
let i = L();
|
|
1105
1128
|
if (!R(i) || !i.isCollapsed()) return !1;
|
|
1106
1129
|
let a = i.anchor.getNode();
|
|
@@ -1108,7 +1131,7 @@ var Wn = (e) => {
|
|
|
1108
1131
|
let o = a.getTopLevelElement();
|
|
1109
1132
|
if (!o || o.getTextContent().trim() !== "") return !1;
|
|
1110
1133
|
i.setFormat(0);
|
|
1111
|
-
let s =
|
|
1134
|
+
let s = _e();
|
|
1112
1135
|
at(i, {
|
|
1113
1136
|
"background-color": "",
|
|
1114
1137
|
color: "",
|
|
@@ -1120,18 +1143,18 @@ var Wn = (e) => {
|
|
|
1120
1143
|
let c = s.getPreviousSibling();
|
|
1121
1144
|
return c?.getTextContent().trim() === "" && c.remove(), e?.preventDefault(), !0;
|
|
1122
1145
|
}, je), [e]), null;
|
|
1123
|
-
},
|
|
1146
|
+
}, pr = (e, t) => e.split(";").map((e) => e.trim()).filter((e) => e && e.split(":")[0].trim().toLowerCase() !== t).join("; "), mr = () => {
|
|
1124
1147
|
let [e] = z();
|
|
1125
|
-
return s(() => e.registerNodeTransform(
|
|
1148
|
+
return s(() => e.registerNodeTransform(ie, (e) => {
|
|
1126
1149
|
let t = e.getTag();
|
|
1127
1150
|
if (t === "h4" || t === "h5" || t === "h6") {
|
|
1128
|
-
e.replace(
|
|
1151
|
+
e.replace(_e(), !0);
|
|
1129
1152
|
return;
|
|
1130
1153
|
}
|
|
1131
1154
|
for (let t of e.getAllTextNodes()) {
|
|
1132
1155
|
let e = t.getStyle();
|
|
1133
1156
|
if (!e) continue;
|
|
1134
|
-
let n =
|
|
1157
|
+
let n = pr(e, "font-size");
|
|
1135
1158
|
n !== e && t.setStyle(n);
|
|
1136
1159
|
}
|
|
1137
1160
|
}), [e]), null;
|
|
@@ -1173,12 +1196,12 @@ var Wn = (e) => {
|
|
|
1173
1196
|
};
|
|
1174
1197
|
}
|
|
1175
1198
|
static importJSON(e) {
|
|
1176
|
-
return
|
|
1199
|
+
return hr().updateFromJSON(e);
|
|
1177
1200
|
}
|
|
1178
1201
|
isSimpleText() {
|
|
1179
1202
|
return this.__type === "extended-text" && this.__mode === 0;
|
|
1180
1203
|
}
|
|
1181
|
-
},
|
|
1204
|
+
}, hr = (e = "") => he(new q(e)), J = (e) => (t) => {
|
|
1182
1205
|
let n = e?.(t);
|
|
1183
1206
|
if (!n) return null;
|
|
1184
1207
|
let r = n.conversion(t);
|
|
@@ -1202,26 +1225,26 @@ var Wn = (e) => {
|
|
|
1202
1225
|
return n;
|
|
1203
1226
|
}
|
|
1204
1227
|
};
|
|
1205
|
-
},
|
|
1228
|
+
}, gr = () => {
|
|
1206
1229
|
let [e] = z();
|
|
1207
1230
|
return s(() => e.registerNodeTransform(q, (e) => {
|
|
1208
1231
|
if (!B(e, v)) return;
|
|
1209
1232
|
let t = e.getStyle();
|
|
1210
1233
|
if (!t) return;
|
|
1211
|
-
let n =
|
|
1234
|
+
let n = pr(t, "color");
|
|
1212
1235
|
n !== t && e.setStyle(n);
|
|
1213
1236
|
}), [e]), null;
|
|
1214
|
-
},
|
|
1237
|
+
}, _r = /<img\b|<picture\b/i, vr = () => {
|
|
1215
1238
|
let [e] = z();
|
|
1216
1239
|
return s(() => {
|
|
1217
1240
|
let t = (t) => {
|
|
1218
1241
|
let n = "clipboardData" in t ? t.clipboardData : "dataTransfer" in t ? t.dataTransfer : null;
|
|
1219
1242
|
if (!n || n.getData("application/x-lexical-editor") || n.getData("application/x-lexical-drag")) return !1;
|
|
1220
1243
|
let r = n.getData("text/html");
|
|
1221
|
-
if (!(Array.from(n.files).some((e) => e.type.startsWith("image/")) || Array.from(n.items).some((e) => e.type.startsWith("image/")) ||
|
|
1244
|
+
if (!(Array.from(n.files).some((e) => e.type.startsWith("image/")) || Array.from(n.items).some((e) => e.type.startsWith("image/")) || _r.test(r))) return !1;
|
|
1222
1245
|
t.preventDefault();
|
|
1223
1246
|
let i = n.getData("text/plain");
|
|
1224
|
-
return !
|
|
1247
|
+
return !_r.test(r) && !i || e.update(() => {
|
|
1225
1248
|
let t = L();
|
|
1226
1249
|
if (t === null) return;
|
|
1227
1250
|
let n = r ? new DOMParser().parseFromString(r, "text/html") : null;
|
|
@@ -1237,18 +1260,18 @@ var Wn = (e) => {
|
|
|
1237
1260
|
};
|
|
1238
1261
|
return rt(e.registerCommand(He, t, Ae), e.registerCommand(Me, t, Ae));
|
|
1239
1262
|
}, [e]), null;
|
|
1240
|
-
},
|
|
1263
|
+
}, yr = "data:image/png;base64,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", br = "data:image/png;base64,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", xr = (e, t, n) => Math.min(n, Math.max(t, e)), Y = (e) => xr(e, 0, 1), X = (e) => {
|
|
1241
1264
|
let t = e.trim().toLowerCase();
|
|
1242
1265
|
if (t === "" || t === "transparent") return !0;
|
|
1243
1266
|
let n = t.match(/^rgba\([^,]+,[^,]+,[^,]+,\s*([.\d]+)\s*\)$/);
|
|
1244
1267
|
return n !== null && Number(n[1]) === 0;
|
|
1245
|
-
},
|
|
1268
|
+
}, Sr = (e) => {
|
|
1246
1269
|
let t = e.trim().replace(/^#/, "");
|
|
1247
1270
|
return /^[0-9a-fA-F]{3}$/.test(t) ? `#${t[0]}${t[0]}${t[1]}${t[1]}${t[2]}${t[2]}`.toLowerCase() : /^[0-9a-fA-F]{6}$/.test(t) ? `#${t.toLowerCase()}` : null;
|
|
1248
|
-
},
|
|
1271
|
+
}, Cr = (e) => {
|
|
1249
1272
|
let t = e.trim();
|
|
1250
1273
|
if (X(t)) return null;
|
|
1251
|
-
let n =
|
|
1274
|
+
let n = Sr(t);
|
|
1252
1275
|
if (n) return {
|
|
1253
1276
|
r: Number.parseInt(n.slice(1, 3), 16),
|
|
1254
1277
|
g: Number.parseInt(n.slice(3, 5), 16),
|
|
@@ -1260,59 +1283,59 @@ var Wn = (e) => {
|
|
|
1260
1283
|
g: Number(r[2]),
|
|
1261
1284
|
b: Number(r[3])
|
|
1262
1285
|
} : null;
|
|
1263
|
-
},
|
|
1286
|
+
}, wr = ({ r: e, g: t, b: n }) => `#${[
|
|
1264
1287
|
e,
|
|
1265
1288
|
t,
|
|
1266
1289
|
n
|
|
1267
|
-
].map((e) =>
|
|
1290
|
+
].map((e) => xr(Math.round(e), 0, 255).toString(16).padStart(2, "0")).join("")}`, Tr = (e, t) => {
|
|
1268
1291
|
if (X(e) && X(t)) return !0;
|
|
1269
|
-
let n =
|
|
1292
|
+
let n = Cr(e), r = Cr(t);
|
|
1270
1293
|
return !!(n && r && n.r === r.r && n.g === r.g && n.b === r.b);
|
|
1271
|
-
},
|
|
1294
|
+
}, Er = (e) => {
|
|
1272
1295
|
let t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.max(t, n, r), a = Math.min(t, n, r), o = (i + a) / 2, s = i - a, c = 0;
|
|
1273
1296
|
return s !== 0 && (c = i === t ? ((n - r) / s + (n < r ? 6 : 0)) * 60 : i === n ? ((r - t) / s + 2) * 60 : ((t - n) / s + 4) * 60), {
|
|
1274
1297
|
h: c,
|
|
1275
1298
|
s: s === 0 ? 0 : s / (1 - Math.abs(2 * o - 1)),
|
|
1276
1299
|
l: o
|
|
1277
1300
|
};
|
|
1278
|
-
},
|
|
1301
|
+
}, Dr = ({ h: e, s: t, l: n }) => {
|
|
1279
1302
|
let r = (e % 360 + 360) % 360, i = (1 - Math.abs(2 * n - 1)) * t, a = i * (1 - Math.abs(r / 60 % 2 - 1)), o = n - i / 2, s = 0, c = 0, l = 0;
|
|
1280
1303
|
return r < 60 ? (s = i, c = a) : r < 120 ? (s = a, c = i) : r < 180 ? (c = i, l = a) : r < 240 ? (c = a, l = i) : r < 300 ? (s = a, l = i) : (s = i, l = a), {
|
|
1281
1304
|
r: Math.round((s + o) * 255),
|
|
1282
1305
|
g: Math.round((c + o) * 255),
|
|
1283
1306
|
b: Math.round((l + o) * 255)
|
|
1284
1307
|
};
|
|
1285
|
-
},
|
|
1308
|
+
}, Or = (e) => wr(Dr(e)), kr = (e, t) => ({
|
|
1286
1309
|
h: Y(e) * 360,
|
|
1287
1310
|
s: 1,
|
|
1288
1311
|
l: Y(1 - t)
|
|
1289
|
-
}),
|
|
1312
|
+
}), Ar = (e) => ({
|
|
1290
1313
|
x: Y((e.h % 360 + 360) % 360 / 360),
|
|
1291
1314
|
y: Y(1 - e.l)
|
|
1292
|
-
}),
|
|
1315
|
+
}), jr = (e, t, n) => ({
|
|
1293
1316
|
x: Y(n.width === 0 ? 0 : (e - n.left) / n.width),
|
|
1294
1317
|
y: Y(n.height === 0 ? 0 : (t - n.top) / n.height)
|
|
1295
|
-
}),
|
|
1296
|
-
let r =
|
|
1318
|
+
}), Mr = (e, t, n = Infinity) => {
|
|
1319
|
+
let r = Cr(t);
|
|
1297
1320
|
if (!r) return e;
|
|
1298
|
-
let i =
|
|
1299
|
-
return [i, ...e.filter((e) => !
|
|
1300
|
-
},
|
|
1321
|
+
let i = wr(r);
|
|
1322
|
+
return [i, ...e.filter((e) => !Tr(e, i))].slice(0, n);
|
|
1323
|
+
}, Nr = (e, t = 24, n = 8) => Math.max(0, Math.floor((e + n) / (t + n))), Pr = (e, t) => {
|
|
1301
1324
|
let n = t % 11;
|
|
1302
1325
|
return Math.floor(t / 11) === 2 ? e[22] ?? e[t] : e[n] ?? e[t];
|
|
1303
|
-
}, Z = (...e) => e.filter(Boolean).join(" "),
|
|
1304
|
-
let t =
|
|
1326
|
+
}, Z = (...e) => e.filter(Boolean).join(" "), Fr = (e) => {
|
|
1327
|
+
let t = Cr(e) ?? {
|
|
1305
1328
|
r: 0,
|
|
1306
1329
|
g: 94,
|
|
1307
1330
|
b: 239
|
|
1308
1331
|
};
|
|
1309
1332
|
return {
|
|
1310
|
-
color:
|
|
1311
|
-
point:
|
|
1333
|
+
color: wr(t),
|
|
1334
|
+
point: Ar(Er(t))
|
|
1312
1335
|
};
|
|
1313
|
-
},
|
|
1314
|
-
let { t: l } = e(), [f, h] = d("presets"), [g, _] = d(() =>
|
|
1315
|
-
_(
|
|
1336
|
+
}, Ir = ({ mode: t, currentColor: r, customColors: i, onApply: a, onCustomDraftChange: o, onCustomConfirm: c }) => {
|
|
1337
|
+
let { t: l } = e(), [f, h] = d("presets"), [g, _] = d(() => Fr(r)), [v, y] = d(!1), [b, x] = d(null), S = u(null), C = u(null), w = u(null), T = (e = r) => {
|
|
1338
|
+
_(Fr(e)), y(!1), o(null), h("custom");
|
|
1316
1339
|
};
|
|
1317
1340
|
s(() => {
|
|
1318
1341
|
if (f !== "custom" || typeof ResizeObserver > "u") return;
|
|
@@ -1341,7 +1364,7 @@ var Wn = (e) => {
|
|
|
1341
1364
|
if (!e) return;
|
|
1342
1365
|
let t = () => {
|
|
1343
1366
|
let t = e.getBoundingClientRect().width;
|
|
1344
|
-
t > 0 && x(
|
|
1367
|
+
t > 0 && x(Nr(t));
|
|
1345
1368
|
};
|
|
1346
1369
|
if (t(), typeof ResizeObserver > "u") return;
|
|
1347
1370
|
let n = new ResizeObserver(t);
|
|
@@ -1350,7 +1373,7 @@ var Wn = (e) => {
|
|
|
1350
1373
|
let E = (e) => {
|
|
1351
1374
|
let t = S.current;
|
|
1352
1375
|
if (!t) return;
|
|
1353
|
-
let { x: n, y: r } =
|
|
1376
|
+
let { x: n, y: r } = jr(e.clientX, e.clientY, t.getBoundingClientRect()), i = Or(kr(n, r));
|
|
1354
1377
|
_({
|
|
1355
1378
|
color: i,
|
|
1356
1379
|
point: {
|
|
@@ -1389,7 +1412,7 @@ var Wn = (e) => {
|
|
|
1389
1412
|
role: "listbox",
|
|
1390
1413
|
"aria-label": l("editor.customColors"),
|
|
1391
1414
|
children: i.slice(0, b ?? i.length).map((e) => {
|
|
1392
|
-
let t =
|
|
1415
|
+
let t = Tr(r, e);
|
|
1393
1416
|
return /* @__PURE__ */ p("button", {
|
|
1394
1417
|
type: "button",
|
|
1395
1418
|
role: "option",
|
|
@@ -1467,7 +1490,7 @@ var Wn = (e) => {
|
|
|
1467
1490
|
role: "listbox",
|
|
1468
1491
|
"aria-label": l("editor.presetColors"),
|
|
1469
1492
|
children: ut.map((e, t) => {
|
|
1470
|
-
let n =
|
|
1493
|
+
let n = Tr(r, e);
|
|
1471
1494
|
return /* @__PURE__ */ p("button", {
|
|
1472
1495
|
type: "button",
|
|
1473
1496
|
role: "option",
|
|
@@ -1476,7 +1499,7 @@ var Wn = (e) => {
|
|
|
1476
1499
|
className: Z(V["bsy-mobile-editor__color-swatch"], n && V["bsy-mobile-editor__color-swatch--selected"]),
|
|
1477
1500
|
style: {
|
|
1478
1501
|
"--swatch-color": e,
|
|
1479
|
-
"--swatch-ring":
|
|
1502
|
+
"--swatch-ring": Pr(ut, t)
|
|
1480
1503
|
},
|
|
1481
1504
|
onClick: () => a(e),
|
|
1482
1505
|
children: /* @__PURE__ */ p("span", { className: V["bsy-mobile-editor__color-swatch-fill"] })
|
|
@@ -1486,19 +1509,19 @@ var Wn = (e) => {
|
|
|
1486
1509
|
A
|
|
1487
1510
|
]
|
|
1488
1511
|
});
|
|
1489
|
-
},
|
|
1512
|
+
}, Lr = (e, t) => {
|
|
1490
1513
|
H(e), e.update(() => {
|
|
1491
|
-
ot(L(), () => t === "paragraph" ?
|
|
1514
|
+
ot(L(), () => t === "paragraph" ? _e() : ne(t));
|
|
1492
1515
|
});
|
|
1493
|
-
},
|
|
1516
|
+
}, Rr = (e, t, n) => {
|
|
1494
1517
|
H(e), e.update(() => {
|
|
1495
|
-
|
|
1518
|
+
Ht(n), Ut();
|
|
1496
1519
|
let e = L();
|
|
1497
1520
|
e && at(e, t);
|
|
1498
1521
|
});
|
|
1499
|
-
},
|
|
1522
|
+
}, zr = ({ sheet: i, onClose: a, onTypeset: o, onPolishMenu: s, onPickPreset: c, onPicture: l, savedSelectionRef: h, committedColors: g, onColorCommit: _, canTypeset: v, canPolish: y }) => {
|
|
1500
1523
|
let [b] = z(), { t: x } = e(), [S, C] = d([]), w = u(null), T = i === "fontColor" || i === "fill" ? i : null, E = T === "fill" ? g.fill : T === "fontColor" ? g.fontColor : ct, D = (e, t = !1, n = !0) => {
|
|
1501
|
-
T && (n && (w.current = null),
|
|
1524
|
+
T && (n && (w.current = null), Rr(b, { [T === "fill" ? "background-color" : "color"]: e }, h.current), _(T, e), t && !X(e) && C((t) => Mr(t, e)), n && a());
|
|
1502
1525
|
}, O = (e) => {
|
|
1503
1526
|
w.current = null, D(e, !0, !1);
|
|
1504
1527
|
};
|
|
@@ -1561,7 +1584,7 @@ var Wn = (e) => {
|
|
|
1561
1584
|
text: x("editor.heading3")
|
|
1562
1585
|
}
|
|
1563
1586
|
],
|
|
1564
|
-
onAction: (e) =>
|
|
1587
|
+
onAction: (e) => Lr(b, e.key)
|
|
1565
1588
|
}),
|
|
1566
1589
|
/* @__PURE__ */ p(r, {
|
|
1567
1590
|
mode: "menu",
|
|
@@ -1572,7 +1595,7 @@ var Wn = (e) => {
|
|
|
1572
1595
|
key: e.value,
|
|
1573
1596
|
text: e.label
|
|
1574
1597
|
})),
|
|
1575
|
-
onAction: (e) =>
|
|
1598
|
+
onAction: (e) => Rr(b, { "font-size": e.key })
|
|
1576
1599
|
}),
|
|
1577
1600
|
/* @__PURE__ */ p(t, {
|
|
1578
1601
|
open: T !== null,
|
|
@@ -1581,7 +1604,7 @@ var Wn = (e) => {
|
|
|
1581
1604
|
e && O(e), a();
|
|
1582
1605
|
},
|
|
1583
1606
|
position: "bottom",
|
|
1584
|
-
children: T ? /* @__PURE__ */ p(
|
|
1607
|
+
children: T ? /* @__PURE__ */ p(Ir, {
|
|
1585
1608
|
mode: T,
|
|
1586
1609
|
currentColor: E,
|
|
1587
1610
|
customColors: S,
|
|
@@ -1601,7 +1624,7 @@ var Wn = (e) => {
|
|
|
1601
1624
|
text: x("editor.aiTypeset"),
|
|
1602
1625
|
disabled: !v,
|
|
1603
1626
|
icon: /* @__PURE__ */ p("img", {
|
|
1604
|
-
src:
|
|
1627
|
+
src: yr,
|
|
1605
1628
|
alt: "",
|
|
1606
1629
|
width: 16,
|
|
1607
1630
|
height: 16,
|
|
@@ -1613,7 +1636,7 @@ var Wn = (e) => {
|
|
|
1613
1636
|
text: x("editor.aiPolish"),
|
|
1614
1637
|
disabled: !y,
|
|
1615
1638
|
icon: /* @__PURE__ */ p("img", {
|
|
1616
|
-
src:
|
|
1639
|
+
src: br,
|
|
1617
1640
|
alt: "",
|
|
1618
1641
|
width: 16,
|
|
1619
1642
|
height: 16,
|
|
@@ -1663,7 +1686,7 @@ var Wn = (e) => {
|
|
|
1663
1686
|
onAction: (e) => l(e.key)
|
|
1664
1687
|
})
|
|
1665
1688
|
] });
|
|
1666
|
-
},
|
|
1689
|
+
}, Br = ({ open: r, title: i, bodyClassName: a, onClose: o, onConfirm: s, children: c }) => {
|
|
1667
1690
|
let { t: l } = e();
|
|
1668
1691
|
return /* @__PURE__ */ p(t, {
|
|
1669
1692
|
open: r,
|
|
@@ -1708,11 +1731,11 @@ var Wn = (e) => {
|
|
|
1708
1731
|
]
|
|
1709
1732
|
})
|
|
1710
1733
|
});
|
|
1711
|
-
},
|
|
1734
|
+
}, Vr = ({ open: t, seed: r, onClose: i, onConfirm: a }) => {
|
|
1712
1735
|
let { t: o } = e(), [c, l] = d(""), [u, f] = d(""), [h, g] = d(!0);
|
|
1713
1736
|
return s(() => {
|
|
1714
1737
|
!t || !r || (l(r.url), f(r.text), g(r.newBlank));
|
|
1715
|
-
}, [t, r]), /* @__PURE__ */ m(
|
|
1738
|
+
}, [t, r]), /* @__PURE__ */ m(Br, {
|
|
1716
1739
|
open: t,
|
|
1717
1740
|
title: o("editor.link"),
|
|
1718
1741
|
bodyClassName: V["bsy-mobile-editor__sheet-body--stack"],
|
|
@@ -1774,13 +1797,13 @@ var Wn = (e) => {
|
|
|
1774
1797
|
})
|
|
1775
1798
|
]
|
|
1776
1799
|
});
|
|
1777
|
-
},
|
|
1800
|
+
}, Hr = /^https?:\/\/.+/i, Ur = ({ open: t, onClose: n, onConfirm: r }) => {
|
|
1778
1801
|
let { t: i } = e(), [o, c] = d(""), [l, u] = d(null), f = a((e) => {
|
|
1779
1802
|
e?.focus();
|
|
1780
1803
|
}, []);
|
|
1781
1804
|
return s(() => {
|
|
1782
1805
|
t && (c(""), u(null));
|
|
1783
|
-
}, [t]), /* @__PURE__ */ p(
|
|
1806
|
+
}, [t]), /* @__PURE__ */ p(Br, {
|
|
1784
1807
|
open: t,
|
|
1785
1808
|
title: i("editor.imageUrl"),
|
|
1786
1809
|
onClose: n,
|
|
@@ -1790,7 +1813,7 @@ var Wn = (e) => {
|
|
|
1790
1813
|
u(i("editor.imageUrlRequired"));
|
|
1791
1814
|
return;
|
|
1792
1815
|
}
|
|
1793
|
-
if (!
|
|
1816
|
+
if (!Hr.test(e)) {
|
|
1794
1817
|
u(i("editor.imageUrlInvalid"));
|
|
1795
1818
|
return;
|
|
1796
1819
|
}
|
|
@@ -1823,26 +1846,175 @@ var Wn = (e) => {
|
|
|
1823
1846
|
]
|
|
1824
1847
|
})
|
|
1825
1848
|
});
|
|
1826
|
-
},
|
|
1849
|
+
}, Wr = `
|
|
1850
|
+
:host {
|
|
1851
|
+
all: initial;
|
|
1852
|
+
display: block;
|
|
1853
|
+
width: 100%;
|
|
1854
|
+
max-width: 100%;
|
|
1855
|
+
min-width: 0;
|
|
1856
|
+
}
|
|
1857
|
+
.bsy-editor-html-preview__body {
|
|
1858
|
+
color: #030303;
|
|
1859
|
+
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
|
|
1860
|
+
font-size: 15px;
|
|
1861
|
+
line-height: 1.6;
|
|
1862
|
+
word-break: break-word;
|
|
1863
|
+
}
|
|
1864
|
+
.bsy-editor-html-preview__body p {
|
|
1865
|
+
margin: 0;
|
|
1866
|
+
}
|
|
1867
|
+
.bsy-editor-html-preview__body .editor-text-bold {
|
|
1868
|
+
font-weight: 700;
|
|
1869
|
+
}
|
|
1870
|
+
.bsy-editor-html-preview__body .editor-text-italic {
|
|
1871
|
+
font-style: italic;
|
|
1872
|
+
}
|
|
1873
|
+
.bsy-editor-html-preview__body .editor-text-underline {
|
|
1874
|
+
text-decoration: underline;
|
|
1875
|
+
}
|
|
1876
|
+
.bsy-editor-html-preview__body .editor-text-strikethrough {
|
|
1877
|
+
text-decoration: line-through;
|
|
1878
|
+
}
|
|
1879
|
+
.bsy-editor-html-preview__body .editor-text-underline-strikethrough {
|
|
1880
|
+
text-decoration: underline line-through;
|
|
1881
|
+
}
|
|
1882
|
+
.bsy-editor-html-preview__body sup,
|
|
1883
|
+
.bsy-editor-html-preview__body sub {
|
|
1884
|
+
display: inline-block;
|
|
1885
|
+
position: static;
|
|
1886
|
+
top: auto;
|
|
1887
|
+
bottom: auto;
|
|
1888
|
+
font-size: 0.75em;
|
|
1889
|
+
line-height: 1;
|
|
1890
|
+
}
|
|
1891
|
+
.bsy-editor-html-preview__body sup {
|
|
1892
|
+
vertical-align: super;
|
|
1893
|
+
}
|
|
1894
|
+
.bsy-editor-html-preview__body sub {
|
|
1895
|
+
vertical-align: sub;
|
|
1896
|
+
}
|
|
1897
|
+
.bsy-editor-html-preview__body .editor-heading-h1,
|
|
1898
|
+
.bsy-editor-html-preview__body .editor-heading-h2,
|
|
1899
|
+
.bsy-editor-html-preview__body .editor-heading-h3 {
|
|
1900
|
+
margin: 0.6em 0 0.4em;
|
|
1901
|
+
font-weight: 600;
|
|
1902
|
+
line-height: 1.35;
|
|
1903
|
+
}
|
|
1904
|
+
.bsy-editor-html-preview__body .editor-heading-h1 {
|
|
1905
|
+
font-size: 2em;
|
|
1906
|
+
}
|
|
1907
|
+
.bsy-editor-html-preview__body .editor-heading-h2 {
|
|
1908
|
+
font-size: 1.5em;
|
|
1909
|
+
}
|
|
1910
|
+
.bsy-editor-html-preview__body .editor-heading-h3 {
|
|
1911
|
+
font-size: 1.25em;
|
|
1912
|
+
}
|
|
1913
|
+
.bsy-editor-html-preview__body ul,
|
|
1914
|
+
.bsy-editor-html-preview__body ol,
|
|
1915
|
+
.bsy-editor-html-preview__body .editor-list-ul,
|
|
1916
|
+
.bsy-editor-html-preview__body .editor-list-ol {
|
|
1917
|
+
margin: 0;
|
|
1918
|
+
padding-inline-start: 0;
|
|
1919
|
+
list-style-position: outside;
|
|
1920
|
+
}
|
|
1921
|
+
.bsy-editor-html-preview__body .editor-list-ul {
|
|
1922
|
+
list-style-type: disc;
|
|
1923
|
+
}
|
|
1924
|
+
.bsy-editor-html-preview__body .editor-list-ol {
|
|
1925
|
+
list-style-type: decimal;
|
|
1926
|
+
}
|
|
1927
|
+
.bsy-editor-html-preview__body li,
|
|
1928
|
+
.bsy-editor-html-preview__body .editor-listitem {
|
|
1929
|
+
margin: 0;
|
|
1930
|
+
margin-inline-start: ${Nt};
|
|
1931
|
+
list-style: inherit;
|
|
1932
|
+
}
|
|
1933
|
+
.bsy-editor-html-preview__body .editor-nested-listitem {
|
|
1934
|
+
margin-inline-start: 0;
|
|
1935
|
+
list-style-type: none;
|
|
1936
|
+
}
|
|
1937
|
+
.bsy-editor-html-preview__body li::marker,
|
|
1938
|
+
.bsy-editor-html-preview__body .editor-listitem::marker {
|
|
1939
|
+
color: var(--listitem-marker-color);
|
|
1940
|
+
background-color: var(--listitem-marker-background-color);
|
|
1941
|
+
font-family: var(--listitem-marker-font-family);
|
|
1942
|
+
font-size: var(--listitem-marker-font-size);
|
|
1943
|
+
}
|
|
1944
|
+
.bsy-editor-html-preview__body .editor-list-ul .editor-list-ul {
|
|
1945
|
+
list-style-type: circle;
|
|
1946
|
+
}
|
|
1947
|
+
.bsy-editor-html-preview__body .editor-list-ul .editor-list-ul .editor-list-ul {
|
|
1948
|
+
list-style-type: square;
|
|
1949
|
+
}
|
|
1950
|
+
.bsy-editor-html-preview__body .editor-link,
|
|
1951
|
+
.bsy-editor-html-preview__body .editor-link:link,
|
|
1952
|
+
.bsy-editor-html-preview__body .editor-link:visited,
|
|
1953
|
+
.bsy-editor-html-preview__body .editor-link:hover,
|
|
1954
|
+
.bsy-editor-html-preview__body .editor-link:active,
|
|
1955
|
+
.bsy-editor-html-preview__body .editor-link:focus {
|
|
1956
|
+
color: #0269ff;
|
|
1957
|
+
cursor: pointer;
|
|
1958
|
+
}
|
|
1959
|
+
.bsy-editor-html-preview__body .editor-link * {
|
|
1960
|
+
color: #0269ff !important;
|
|
1961
|
+
}
|
|
1962
|
+
.bsy-editor-html-preview__body pre {
|
|
1963
|
+
display: block;
|
|
1964
|
+
box-sizing: border-box;
|
|
1965
|
+
max-width: 100%;
|
|
1966
|
+
margin: 8px 0;
|
|
1967
|
+
padding: 8px 12px;
|
|
1968
|
+
overflow-x: auto;
|
|
1969
|
+
border-radius: 4px;
|
|
1970
|
+
background: rgb(240, 242, 245);
|
|
1971
|
+
color: #1f2328;
|
|
1972
|
+
font-family: Menlo, Consolas, Monaco, monospace;
|
|
1973
|
+
font-size: 13px;
|
|
1974
|
+
line-height: 1.53;
|
|
1975
|
+
tab-size: 2;
|
|
1976
|
+
white-space: pre;
|
|
1977
|
+
}
|
|
1978
|
+
.bsy-editor-html-preview__body .editor-table-scrollable-wrapper {
|
|
1979
|
+
max-width: 100%;
|
|
1980
|
+
margin: 8px 0;
|
|
1981
|
+
overflow-x: auto;
|
|
1982
|
+
-webkit-overflow-scrolling: touch;
|
|
1983
|
+
}
|
|
1984
|
+
.bsy-editor-html-preview__body table {
|
|
1985
|
+
width: max-content;
|
|
1986
|
+
min-width: 100%;
|
|
1987
|
+
margin: 0;
|
|
1988
|
+
border-collapse: collapse;
|
|
1989
|
+
table-layout: fixed;
|
|
1990
|
+
}
|
|
1991
|
+
.bsy-editor-html-preview__body td,
|
|
1992
|
+
.bsy-editor-html-preview__body th {
|
|
1993
|
+
box-sizing: border-box;
|
|
1994
|
+
min-width: 75px;
|
|
1995
|
+
min-height: 32px;
|
|
1996
|
+
padding: 4px 8px;
|
|
1997
|
+
border: 1px solid #d9d9d9;
|
|
1998
|
+
vertical-align: top;
|
|
1999
|
+
}
|
|
2000
|
+
.bsy-editor-html-preview__body th {
|
|
2001
|
+
background: #f2f3f5;
|
|
2002
|
+
font-weight: 600;
|
|
2003
|
+
}
|
|
2004
|
+
.bsy-editor-html-preview__body img {
|
|
2005
|
+
max-width: 100%;
|
|
2006
|
+
height: auto;
|
|
2007
|
+
vertical-align: baseline;
|
|
2008
|
+
}
|
|
2009
|
+
`, Gr = ({ html: e }) => {
|
|
1827
2010
|
let t = u(null);
|
|
1828
2011
|
return l(() => {
|
|
1829
|
-
|
|
1830
|
-
if (!n) return;
|
|
1831
|
-
let r = n.shadowRoot ?? n.attachShadow({ mode: "open" }), i = document.createElement("div");
|
|
1832
|
-
i.className = "bsy-editor-html-preview__body", i.innerHTML = U(e);
|
|
1833
|
-
for (let e of Array.from(i.querySelectorAll("table"))) {
|
|
1834
|
-
if (e.parentElement?.classList.contains("editor-table-scrollable-wrapper")) continue;
|
|
1835
|
-
let t = document.createElement("div");
|
|
1836
|
-
t.className = "editor-table-scrollable-wrapper", e.replaceWith(t), t.append(e);
|
|
1837
|
-
}
|
|
1838
|
-
r.replaceChildren();
|
|
1839
|
-
let a = document.createElement("style");
|
|
1840
|
-
a.textContent = Rr, r.append(a, i);
|
|
2012
|
+
Lt(t.current, e, U, Wr);
|
|
1841
2013
|
}, [e]), /* @__PURE__ */ p("div", {
|
|
1842
2014
|
ref: t,
|
|
1843
2015
|
className: "bsy-editor-html-preview"
|
|
1844
2016
|
});
|
|
1845
|
-
},
|
|
2017
|
+
}, Kr = () => {
|
|
1846
2018
|
let e = `${c().replace(/:/g, "")}g`;
|
|
1847
2019
|
return /* @__PURE__ */ p("span", {
|
|
1848
2020
|
className: V["bsy-mobile-editor__ai-think-icon"],
|
|
@@ -1881,7 +2053,7 @@ var Wn = (e) => {
|
|
|
1881
2053
|
}) })]
|
|
1882
2054
|
})
|
|
1883
2055
|
});
|
|
1884
|
-
},
|
|
2056
|
+
}, qr = (t, n) => {
|
|
1885
2057
|
let { t: r } = e(), i = t.status === "loading" && !n, [a, o] = d(!0), [c, l] = d(0), f = u(Date.now()), p = u(null), m = t.reasoning ?? "";
|
|
1886
2058
|
return s(() => {
|
|
1887
2059
|
if (!i) {
|
|
@@ -1901,12 +2073,12 @@ var Wn = (e) => {
|
|
|
1901
2073
|
reasoning: m,
|
|
1902
2074
|
toggle: () => o((e) => !e)
|
|
1903
2075
|
};
|
|
1904
|
-
},
|
|
2076
|
+
}, Jr = ({ model: e }) => /* @__PURE__ */ m("button", {
|
|
1905
2077
|
type: "button",
|
|
1906
2078
|
className: V["bsy-mobile-editor__ai-think-head"],
|
|
1907
2079
|
disabled: e.thinking,
|
|
1908
2080
|
onClick: e.toggle,
|
|
1909
|
-
children: [e.thinking ? /* @__PURE__ */ p(
|
|
2081
|
+
children: [e.thinking ? /* @__PURE__ */ p(Kr, {}) : /* @__PURE__ */ p(n, {
|
|
1910
2082
|
name: "arrow-down",
|
|
1911
2083
|
size: 12,
|
|
1912
2084
|
className: [V["bsy-mobile-editor__ai-think-arrow"], e.open ? V["bsy-mobile-editor__ai-think-arrow--open"] : ""].filter(Boolean).join(" ")
|
|
@@ -1914,10 +2086,10 @@ var Wn = (e) => {
|
|
|
1914
2086
|
className: e.thinking ? `${V["bsy-mobile-editor__ai-think-label"]} ${V["bsy-mobile-editor__ai-think-label--shimmer"]}` : V["bsy-mobile-editor__ai-think-label"],
|
|
1915
2087
|
children: e.label
|
|
1916
2088
|
})]
|
|
1917
|
-
}),
|
|
2089
|
+
}), Yr = ({ model: e }) => !e.visible || !e.open || !e.reasoning ? null : /* @__PURE__ */ p("div", {
|
|
1918
2090
|
className: V["bsy-mobile-editor__ai-think-body"],
|
|
1919
2091
|
children: e.reasoning
|
|
1920
|
-
}),
|
|
2092
|
+
}), Xr = ({ enabled: e, status: t, revision: n, compute: r }) => {
|
|
1921
2093
|
let [i, a] = d(""), o = u(r);
|
|
1922
2094
|
o.current = r;
|
|
1923
2095
|
let c = u(null);
|
|
@@ -1944,7 +2116,7 @@ var Wn = (e) => {
|
|
|
1944
2116
|
]), s(() => () => {
|
|
1945
2117
|
c.current !== null && cancelAnimationFrame(c.current);
|
|
1946
2118
|
}, []), i;
|
|
1947
|
-
},
|
|
2119
|
+
}, Zr = 32, Qr = .25, $r = 2, ei = ({ viewportRef: e, enabled: t, revision: n }) => {
|
|
1948
2120
|
let r = u(!0), i = u(!1), o = u(0), c = a(() => e.current ?? void 0, [e]), l = a(() => {
|
|
1949
2121
|
o.current = 0;
|
|
1950
2122
|
let t = e.current;
|
|
@@ -1954,7 +2126,7 @@ var Wn = (e) => {
|
|
|
1954
2126
|
t.scrollTop = n;
|
|
1955
2127
|
return;
|
|
1956
2128
|
}
|
|
1957
|
-
t.scrollTop += Math.max(i *
|
|
2129
|
+
t.scrollTop += Math.max(i * Qr, Math.min(i, $r)), o.current = requestAnimationFrame(l);
|
|
1958
2130
|
}, [e]), d = a(() => {
|
|
1959
2131
|
!o.current && r.current && (o.current = requestAnimationFrame(l));
|
|
1960
2132
|
}, [l]);
|
|
@@ -1981,7 +2153,7 @@ var Wn = (e) => {
|
|
|
1981
2153
|
let f = () => {
|
|
1982
2154
|
let t = e.current;
|
|
1983
2155
|
if (!t) return;
|
|
1984
|
-
let n = t.scrollHeight - t.clientHeight - t.scrollTop <=
|
|
2156
|
+
let n = t.scrollHeight - t.clientHeight - t.scrollTop <= Zr;
|
|
1985
2157
|
i.current ? (i.current = !1, r.current = n, !n && o.current && (cancelAnimationFrame(o.current), o.current = 0)) : n && (r.current = !0);
|
|
1986
2158
|
}, p = () => {
|
|
1987
2159
|
i.current = !0;
|
|
@@ -1999,16 +2171,16 @@ var Wn = (e) => {
|
|
|
1999
2171
|
passive: !0,
|
|
2000
2172
|
enable: t
|
|
2001
2173
|
}), { onScroll: f };
|
|
2002
|
-
},
|
|
2003
|
-
let { t: v } = e(), y = u(null), [b, x] = d(!1), S = c?.status ?? "idle", C = c?.text ?? "", w =
|
|
2174
|
+
}, ti = ({ open: i, mode: a, originalHtml: o, codeBlocks: s = [], ai: c, polishPreset: l, onClose: h, onApply: g, onPickPreset: _ }) => {
|
|
2175
|
+
let { t: v } = e(), y = u(null), [b, x] = d(!1), S = c?.status ?? "idle", C = c?.text ?? "", w = Xr({
|
|
2004
2176
|
enabled: i && !!a,
|
|
2005
2177
|
status: S,
|
|
2006
2178
|
revision: C,
|
|
2007
|
-
compute: () => a === "polish" ? U(
|
|
2008
|
-
}), T = !!w.trim(), E =
|
|
2179
|
+
compute: () => a === "polish" ? U(An(o, C)) : Jn(C, s)
|
|
2180
|
+
}), T = !!w.trim(), E = qr({
|
|
2009
2181
|
status: S,
|
|
2010
2182
|
reasoning: c?.reasoning
|
|
2011
|
-
}, T), D =
|
|
2183
|
+
}, T), D = ei({
|
|
2012
2184
|
viewportRef: y,
|
|
2013
2185
|
enabled: i && S === "loading",
|
|
2014
2186
|
revision: `${c?.reasoning ?? ""}\0${w}`
|
|
@@ -2061,7 +2233,7 @@ var Wn = (e) => {
|
|
|
2061
2233
|
}),
|
|
2062
2234
|
E.visible ? /* @__PURE__ */ p("div", {
|
|
2063
2235
|
className: V["bsy-mobile-editor__ai-think-pin"],
|
|
2064
|
-
children: /* @__PURE__ */ p(
|
|
2236
|
+
children: /* @__PURE__ */ p(Jr, { model: E })
|
|
2065
2237
|
}) : null,
|
|
2066
2238
|
/* @__PURE__ */ p("div", {
|
|
2067
2239
|
ref: y,
|
|
@@ -2070,7 +2242,7 @@ var Wn = (e) => {
|
|
|
2070
2242
|
children: S === "error" ? /* @__PURE__ */ p("p", {
|
|
2071
2243
|
className: V["bsy-mobile-editor__ai-error"],
|
|
2072
2244
|
children: c?.errorMessage || v("editor.aiError")
|
|
2073
|
-
}) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2245
|
+
}) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Yr, { model: E }), T ? /* @__PURE__ */ p(Gr, { html: w }) : null] })
|
|
2074
2246
|
})
|
|
2075
2247
|
]
|
|
2076
2248
|
}),
|
|
@@ -2085,7 +2257,7 @@ var Wn = (e) => {
|
|
|
2085
2257
|
})
|
|
2086
2258
|
}), /* @__PURE__ */ p("div", {
|
|
2087
2259
|
className: V["bsy-mobile-editor__ai-section-scroll"],
|
|
2088
|
-
children: /* @__PURE__ */ p(
|
|
2260
|
+
children: /* @__PURE__ */ p(Gr, { html: o })
|
|
2089
2261
|
})]
|
|
2090
2262
|
})
|
|
2091
2263
|
]
|
|
@@ -2117,28 +2289,28 @@ var Wn = (e) => {
|
|
|
2117
2289
|
onAction: (e) => _(e.key)
|
|
2118
2290
|
}) : null]
|
|
2119
2291
|
});
|
|
2120
|
-
},
|
|
2292
|
+
}, ni = "M896 860.48V960H128v-99.52h768zM578.944 128l251.648 655.936h-115.2l-59.904-164.48H379.904L320 784H204.8L456.384 128h122.56z m-58.944 115.776h-3.712L412.16 531.2h211.072L520 243.84z", ri = "M766.4 744.32c43.712 0 79.36-36.224 79.36-80.512 0-53.504-79.36-140.8-79.36-140.8s-79.36 87.296-79.36 140.8c0 44.288 35.648 80.512 79.36 80.512z m-377.088-44.16c7.04 7.168 18.56 7.168 25.6 0l256.064-256c7.104-7.04 7.104-18.56 0-25.6l-256-256a16.32 16.32 0 0 0-1.92-1.664L334.72 82.688a9.088 9.088 0 0 0-12.8 0l-48 48a9.088 9.088 0 0 0 0 12.8l67.2 67.2-207.808 207.936c-7.04 7.04-7.04 18.56 0 25.6l255.936 256z m12.864-448.576L581.12 430.528H223.36L402.24 251.52z m501.824 564.416H120a8 8 0 0 0-8 8v80c0 4.416 3.584 8 8 8h784a8 8 0 0 0 8-8v-80a8 8 0 0 0-8-8z", ii = 860.48, ai = 99.52, oi = /rgba\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0(?:\.0+)?\s*\)/, si = {
|
|
2121
2293
|
fontColor: {
|
|
2122
|
-
path:
|
|
2123
|
-
clipHeight:
|
|
2294
|
+
path: ni,
|
|
2295
|
+
clipHeight: ii,
|
|
2124
2296
|
x: 128,
|
|
2125
2297
|
width: 768,
|
|
2126
2298
|
rx: 0
|
|
2127
2299
|
},
|
|
2128
2300
|
fill: {
|
|
2129
|
-
path:
|
|
2301
|
+
path: ri,
|
|
2130
2302
|
clipHeight: 816,
|
|
2131
2303
|
x: 112,
|
|
2132
2304
|
width: 800,
|
|
2133
2305
|
rx: 8
|
|
2134
2306
|
}
|
|
2135
|
-
},
|
|
2307
|
+
}, ci = (e, t) => {
|
|
2136
2308
|
let n = t.trim().toLowerCase();
|
|
2137
|
-
if (e === "fill") return !n || n === "transparent" ||
|
|
2309
|
+
if (e === "fill") return !n || n === "transparent" || oi.test(n);
|
|
2138
2310
|
let r = n.replace(/\s+/g, "");
|
|
2139
2311
|
return r === "#000" || r === "#000000" || r === "black" || r === "rgb(0,0,0)" || r === "rgba(0,0,0,1)" || r === "rgba(0,0,0,1.0)";
|
|
2140
|
-
},
|
|
2141
|
-
let r = `${c().replace(/:/g, "")}clip`, i =
|
|
2312
|
+
}, li = ({ variant: e, barColor: t, size: n }) => {
|
|
2313
|
+
let r = `${c().replace(/:/g, "")}clip`, i = si[e];
|
|
2142
2314
|
return /* @__PURE__ */ m("svg", {
|
|
2143
2315
|
width: n,
|
|
2144
2316
|
height: n,
|
|
@@ -2161,15 +2333,15 @@ var Wn = (e) => {
|
|
|
2161
2333
|
}),
|
|
2162
2334
|
/* @__PURE__ */ p("rect", {
|
|
2163
2335
|
x: i.x,
|
|
2164
|
-
y:
|
|
2336
|
+
y: ii,
|
|
2165
2337
|
width: i.width,
|
|
2166
|
-
height:
|
|
2338
|
+
height: ai,
|
|
2167
2339
|
rx: i.rx,
|
|
2168
|
-
fill:
|
|
2340
|
+
fill: ci(e, t) ? "currentColor" : t
|
|
2169
2341
|
})
|
|
2170
2342
|
]
|
|
2171
2343
|
});
|
|
2172
|
-
},
|
|
2344
|
+
}, ui = {
|
|
2173
2345
|
bold: !1,
|
|
2174
2346
|
italic: !1,
|
|
2175
2347
|
underline: !1,
|
|
@@ -2182,9 +2354,9 @@ var Wn = (e) => {
|
|
|
2182
2354
|
headingTag: !1,
|
|
2183
2355
|
hasRangeSelection: !1,
|
|
2184
2356
|
hasEditorText: !1
|
|
2185
|
-
},
|
|
2357
|
+
}, di = (e) => e === "center" || e === "right" || e === "left" ? e : e === "end" ? "right" : "left", fi = (e) => {
|
|
2186
2358
|
let t = !!I().getTextContent().trim(), n = {
|
|
2187
|
-
...
|
|
2359
|
+
...ui,
|
|
2188
2360
|
hasEditorText: t
|
|
2189
2361
|
};
|
|
2190
2362
|
if (!e) return n;
|
|
@@ -2204,7 +2376,7 @@ var Wn = (e) => {
|
|
|
2204
2376
|
l = t === "number" || t === "bullet" ? t : !1;
|
|
2205
2377
|
}
|
|
2206
2378
|
}
|
|
2207
|
-
let d = B(o,
|
|
2379
|
+
let d = B(o, re), f = re(d) ? d.getTag() : void 0;
|
|
2208
2380
|
return {
|
|
2209
2381
|
bold: r.hasFormat("bold"),
|
|
2210
2382
|
italic: r.hasFormat("italic"),
|
|
@@ -2212,28 +2384,28 @@ var Wn = (e) => {
|
|
|
2212
2384
|
strikethrough: r.hasFormat("strikethrough"),
|
|
2213
2385
|
fontColor: i,
|
|
2214
2386
|
backgroundColor: a,
|
|
2215
|
-
align:
|
|
2387
|
+
align: di(xe(s) ? s.getFormatType() : ""),
|
|
2216
2388
|
listType: l,
|
|
2217
2389
|
canOutdent: u > 0 || l !== !1,
|
|
2218
2390
|
headingTag: f === "h1" || f === "h2" || f === "h3" ? f : !1,
|
|
2219
2391
|
hasRangeSelection: !0,
|
|
2220
2392
|
hasEditorText: t
|
|
2221
2393
|
};
|
|
2222
|
-
},
|
|
2394
|
+
}, pi = (e, t) => {
|
|
2223
2395
|
e.isEditable() || e.setEditable(!0), e.update(() => {
|
|
2224
|
-
|
|
2396
|
+
Ut(), t(fi(!0));
|
|
2225
2397
|
}), e.focus(void 0, { defaultSelection: "rootStart" });
|
|
2226
|
-
},
|
|
2227
|
-
let t =
|
|
2228
|
-
return
|
|
2398
|
+
}, mi = (e) => {
|
|
2399
|
+
let t = ui;
|
|
2400
|
+
return pi(e, (e) => {
|
|
2229
2401
|
t = e;
|
|
2230
2402
|
}), t;
|
|
2231
|
-
},
|
|
2403
|
+
}, hi = (...e) => e.filter(Boolean).join(" "), gi = (e) => e.buttons.map((e) => ({
|
|
2232
2404
|
name: typeof e == "string" ? e : e.name,
|
|
2233
2405
|
disabled: typeof e != "string" && !!e.props?.disabled
|
|
2234
|
-
})), Q = 24,
|
|
2406
|
+
})), Q = 24, _i = 20, $ = ({ active: e, disabled: t, expanded: n, label: r, select: i, selectAlign: a, onClick: o, children: s }) => /* @__PURE__ */ p("button", {
|
|
2235
2407
|
type: "button",
|
|
2236
|
-
className:
|
|
2408
|
+
className: hi(V["bsy-mobile-editor__tool"], i && V["bsy-mobile-editor__tool--select"], a && V["bsy-mobile-editor__tool--select-align"], e && V["bsy-mobile-editor__tool--active"]),
|
|
2237
2409
|
"aria-label": r,
|
|
2238
2410
|
"aria-pressed": e,
|
|
2239
2411
|
"aria-expanded": i ? !!n : void 0,
|
|
@@ -2241,11 +2413,11 @@ var Wn = (e) => {
|
|
|
2241
2413
|
onMouseDown: (e) => e.preventDefault(),
|
|
2242
2414
|
onClick: o,
|
|
2243
2415
|
children: s
|
|
2244
|
-
}),
|
|
2416
|
+
}), vi = ({ open: e }) => /* @__PURE__ */ p(n, {
|
|
2245
2417
|
name: "arrow-down",
|
|
2246
|
-
size:
|
|
2247
|
-
className:
|
|
2248
|
-
}),
|
|
2418
|
+
size: _i,
|
|
2419
|
+
className: hi(V["bsy-mobile-editor__tool-caret"], e && V["bsy-mobile-editor__tool-caret--open"])
|
|
2420
|
+
}), yi = ({ config: t, formats: r, colorValues: i, openSheet: a, onOpenSheet: o, onOpenLink: c }) => {
|
|
2249
2421
|
let [l] = z(), { t: d } = e(), f = u(null), h = u(null), g = u(null), _ = () => {
|
|
2250
2422
|
let e = f.current, t = h.current, n = g.current;
|
|
2251
2423
|
if (!e || !t || !n) return;
|
|
@@ -2336,7 +2508,7 @@ var Wn = (e) => {
|
|
|
2336
2508
|
disabled: t,
|
|
2337
2509
|
label: d("editor.bulletList"),
|
|
2338
2510
|
onClick: () => {
|
|
2339
|
-
let e =
|
|
2511
|
+
let e = mi(l);
|
|
2340
2512
|
l.dispatchCommand(e.listType === "bullet" ? O : T, void 0);
|
|
2341
2513
|
},
|
|
2342
2514
|
children: /* @__PURE__ */ p(n, {
|
|
@@ -2349,7 +2521,7 @@ var Wn = (e) => {
|
|
|
2349
2521
|
disabled: t,
|
|
2350
2522
|
label: d("editor.numberList"),
|
|
2351
2523
|
onClick: () => {
|
|
2352
|
-
let e =
|
|
2524
|
+
let e = mi(l);
|
|
2353
2525
|
l.dispatchCommand(e.listType === "number" ? O : w, void 0);
|
|
2354
2526
|
},
|
|
2355
2527
|
children: /* @__PURE__ */ p(n, {
|
|
@@ -2368,7 +2540,7 @@ var Wn = (e) => {
|
|
|
2368
2540
|
children: [/* @__PURE__ */ p(n, {
|
|
2369
2541
|
name: r.align === "center" ? "paragraphmiddle" : r.align === "right" ? "paragraphright" : "paragraph",
|
|
2370
2542
|
size: Q
|
|
2371
|
-
}), /* @__PURE__ */ p(
|
|
2543
|
+
}), /* @__PURE__ */ p(vi, { open: a === "align" })]
|
|
2372
2544
|
}, e);
|
|
2373
2545
|
case "heading": return /* @__PURE__ */ m($, {
|
|
2374
2546
|
select: !0,
|
|
@@ -2381,7 +2553,7 @@ var Wn = (e) => {
|
|
|
2381
2553
|
children: [/* @__PURE__ */ p("span", {
|
|
2382
2554
|
className: V["bsy-mobile-editor__tool-text"],
|
|
2383
2555
|
children: r.headingTag ? r.headingTag.toUpperCase() : d("editor.paragraph")
|
|
2384
|
-
}), /* @__PURE__ */ p(
|
|
2556
|
+
}), /* @__PURE__ */ p(vi, { open: a === "heading" })]
|
|
2385
2557
|
}, e);
|
|
2386
2558
|
case "fontSize": return /* @__PURE__ */ p($, {
|
|
2387
2559
|
active: a === "fontSize",
|
|
@@ -2398,7 +2570,7 @@ var Wn = (e) => {
|
|
|
2398
2570
|
disabled: t,
|
|
2399
2571
|
label: d("editor.fontColor"),
|
|
2400
2572
|
onClick: () => o("fontColor"),
|
|
2401
|
-
children: /* @__PURE__ */ p(
|
|
2573
|
+
children: /* @__PURE__ */ p(li, {
|
|
2402
2574
|
variant: "fontColor",
|
|
2403
2575
|
barColor: i.fontColor,
|
|
2404
2576
|
size: Q
|
|
@@ -2409,7 +2581,7 @@ var Wn = (e) => {
|
|
|
2409
2581
|
disabled: t,
|
|
2410
2582
|
label: d("editor.fill"),
|
|
2411
2583
|
onClick: () => o("fill"),
|
|
2412
|
-
children: /* @__PURE__ */ p(
|
|
2584
|
+
children: /* @__PURE__ */ p(li, {
|
|
2413
2585
|
variant: "fill",
|
|
2414
2586
|
barColor: i.fill,
|
|
2415
2587
|
size: Q
|
|
@@ -2425,7 +2597,7 @@ var Wn = (e) => {
|
|
|
2425
2597
|
children: [/* @__PURE__ */ p(n, {
|
|
2426
2598
|
name: "picture",
|
|
2427
2599
|
size: Q
|
|
2428
|
-
}), /* @__PURE__ */ p(
|
|
2600
|
+
}), /* @__PURE__ */ p(vi, { open: a === "picture" })]
|
|
2429
2601
|
}, e);
|
|
2430
2602
|
case "link": return /* @__PURE__ */ p($, {
|
|
2431
2603
|
disabled: t,
|
|
@@ -2446,13 +2618,13 @@ var Wn = (e) => {
|
|
|
2446
2618
|
label: d("editor.ai"),
|
|
2447
2619
|
onClick: () => o("ai"),
|
|
2448
2620
|
children: [/* @__PURE__ */ p("img", {
|
|
2449
|
-
src:
|
|
2621
|
+
src: yr,
|
|
2450
2622
|
alt: "",
|
|
2451
2623
|
width: Q,
|
|
2452
2624
|
height: Q,
|
|
2453
2625
|
className: V["bsy-mobile-editor__ai-icon"],
|
|
2454
2626
|
draggable: !1
|
|
2455
|
-
}), /* @__PURE__ */ p(
|
|
2627
|
+
}), /* @__PURE__ */ p(vi, { open: n })]
|
|
2456
2628
|
}, e);
|
|
2457
2629
|
}
|
|
2458
2630
|
default: return null;
|
|
@@ -2465,7 +2637,7 @@ var Wn = (e) => {
|
|
|
2465
2637
|
className: V["bsy-mobile-editor__toolbar-scroller"],
|
|
2466
2638
|
onScroll: _,
|
|
2467
2639
|
children: t.map((e, t) => {
|
|
2468
|
-
let n =
|
|
2640
|
+
let n = gi(e);
|
|
2469
2641
|
return n.length ? /* @__PURE__ */ m("div", {
|
|
2470
2642
|
className: V["bsy-mobile-editor__toolbar-group"],
|
|
2471
2643
|
children: [t > 0 ? /* @__PURE__ */ p("span", { className: V["bsy-mobile-editor__toolbar-divider"] }) : null, n.map(v)]
|
|
@@ -2482,19 +2654,19 @@ var Wn = (e) => {
|
|
|
2482
2654
|
})
|
|
2483
2655
|
})]
|
|
2484
2656
|
});
|
|
2485
|
-
},
|
|
2657
|
+
}, bi = () => {
|
|
2486
2658
|
let [e] = z(), [t, n] = d(!1);
|
|
2487
2659
|
return s(() => rt(e.registerCommand(Pe, () => (n(!0), !1), je), e.registerCommand(ke, () => (n(!1), !1), je)), [e]), t;
|
|
2488
|
-
},
|
|
2489
|
-
let [e] = z(), t =
|
|
2660
|
+
}, xi = () => {
|
|
2661
|
+
let [e] = z(), t = bi(), [n, r] = d(ui);
|
|
2490
2662
|
return s(() => (e.getEditorState().read(() => {
|
|
2491
|
-
r(
|
|
2663
|
+
r(fi(t));
|
|
2492
2664
|
}, { editor: e }), e.registerUpdateListener(({ editorState: n }) => {
|
|
2493
2665
|
n.read(() => {
|
|
2494
|
-
r(
|
|
2666
|
+
r(fi(t));
|
|
2495
2667
|
}, { editor: e });
|
|
2496
2668
|
})), [e, t]), n;
|
|
2497
|
-
},
|
|
2669
|
+
}, Si = "plaintext", Ci = "github-light", wi = new Set([
|
|
2498
2670
|
"plaintext",
|
|
2499
2671
|
"css",
|
|
2500
2672
|
"html",
|
|
@@ -2516,7 +2688,7 @@ var Wn = (e) => {
|
|
|
2516
2688
|
"bash",
|
|
2517
2689
|
"lua",
|
|
2518
2690
|
"markdown"
|
|
2519
|
-
]),
|
|
2691
|
+
]), Ti = (e) => e && wi.has(e) ? e : Si, Ei = {
|
|
2520
2692
|
css: () => import("@shikijs/langs/css"),
|
|
2521
2693
|
html: () => import("@shikijs/langs/html"),
|
|
2522
2694
|
xml: () => import("@shikijs/langs/xml"),
|
|
@@ -2537,41 +2709,41 @@ var Wn = (e) => {
|
|
|
2537
2709
|
bash: () => import("@shikijs/langs/shellscript"),
|
|
2538
2710
|
lua: () => import("@shikijs/langs/lua"),
|
|
2539
2711
|
markdown: () => import("@shikijs/langs/markdown")
|
|
2540
|
-
},
|
|
2712
|
+
}, Di = (e) => e === "bash" ? "shellscript" : e, Oi = (e) => e in Ei, ki = null, Ai = null, ji = /* @__PURE__ */ new Map(), Mi = () => (ki ||= Promise.all([import("@shikijs/core"), import("@shikijs/engine-javascript")]).then(([{ createHighlighterCoreSync: e }, { createJavaScriptRegexEngine: t }]) => e({
|
|
2541
2713
|
engine: t(),
|
|
2542
2714
|
langs: [],
|
|
2543
2715
|
themes: []
|
|
2544
2716
|
})).catch((e) => {
|
|
2545
|
-
throw
|
|
2546
|
-
}),
|
|
2547
|
-
let t =
|
|
2548
|
-
return t || (t =
|
|
2549
|
-
let n =
|
|
2717
|
+
throw ki = null, e;
|
|
2718
|
+
}), ki), Ni = (e, t) => Oi(t) && e.getLoadedLanguages().includes(Di(t)), Pi = (e) => {
|
|
2719
|
+
let t = ji.get(e);
|
|
2720
|
+
return t || (t = Mi().then(async (t) => {
|
|
2721
|
+
let n = Di(e);
|
|
2550
2722
|
if (!t.getLoadedLanguages().includes(n)) {
|
|
2551
|
-
let n = await
|
|
2723
|
+
let n = await Ei[e]();
|
|
2552
2724
|
await t.loadLanguage(n.default);
|
|
2553
2725
|
}
|
|
2554
2726
|
return t;
|
|
2555
2727
|
}).catch((t) => {
|
|
2556
|
-
throw
|
|
2557
|
-
}),
|
|
2558
|
-
},
|
|
2728
|
+
throw ji.delete(e), t;
|
|
2729
|
+
}), ji.set(e, t)), t;
|
|
2730
|
+
}, Fi = () => (Ai ||= Mi().then(async (e) => {
|
|
2559
2731
|
if (!e.getLoadedThemes().includes("github-light")) {
|
|
2560
2732
|
let t = await import("@shikijs/themes/github-light");
|
|
2561
2733
|
await e.loadTheme(t.default);
|
|
2562
2734
|
}
|
|
2563
2735
|
return e;
|
|
2564
2736
|
}).catch((e) => {
|
|
2565
|
-
throw
|
|
2566
|
-
}),
|
|
2737
|
+
throw Ai = null, e;
|
|
2738
|
+
}), Ai), Ii = (e, t, n) => {
|
|
2567
2739
|
let r = e.getTextContent();
|
|
2568
|
-
if (e.getStyle() && e.setStyle(""), !n || !
|
|
2740
|
+
if (e.getStyle() && e.setStyle(""), !n || !Ni(n, t)) return ee(r);
|
|
2569
2741
|
let i = n.codeToTokens(r, {
|
|
2570
|
-
lang:
|
|
2571
|
-
theme:
|
|
2742
|
+
lang: Di(t),
|
|
2743
|
+
theme: Ci
|
|
2572
2744
|
}).tokens, a = [];
|
|
2573
2745
|
return i.forEach((e, t) => {
|
|
2574
|
-
t && a.push(
|
|
2746
|
+
t && a.push(ge()), e.forEach((e) => {
|
|
2575
2747
|
e.content.split(" ").forEach((t, n) => {
|
|
2576
2748
|
if (n && a.push(ve()), !t) return;
|
|
2577
2749
|
let r = k(t), i = typeof e.htmlStyle == "string" ? e.htmlStyle : e.htmlStyle ? Object.entries(e.htmlStyle).map(([e, t]) => `${e}:${t}`).join(";") : e.color ? `color: ${e.color}` : "";
|
|
@@ -2579,7 +2751,7 @@ var Wn = (e) => {
|
|
|
2579
2751
|
});
|
|
2580
2752
|
});
|
|
2581
2753
|
}), a;
|
|
2582
|
-
},
|
|
2754
|
+
}, Li = (e, t) => {
|
|
2583
2755
|
let n = F(e);
|
|
2584
2756
|
if (!j(n) || !n.isAttached()) return;
|
|
2585
2757
|
let r = L();
|
|
@@ -2608,22 +2780,22 @@ var Wn = (e) => {
|
|
|
2608
2780
|
return !1;
|
|
2609
2781
|
});
|
|
2610
2782
|
}
|
|
2611
|
-
},
|
|
2783
|
+
}, Ri = (e, t) => A(e) && A(t) && e.__text === t.__text && e.__highlightType === t.__highlightType && e.__style === t.__style || we(e) && we(t) || Se(e) && Se(t), zi = (e, t) => {
|
|
2612
2784
|
let n = 0;
|
|
2613
|
-
for (; n < e.length &&
|
|
2785
|
+
for (; n < e.length && Ri(e[n], t[n]);) n++;
|
|
2614
2786
|
let r = 0, i = Math.min(e.length, t.length) - n;
|
|
2615
|
-
for (; r < i &&
|
|
2787
|
+
for (; r < i && Ri(e[e.length - r - 1], t[t.length - r - 1]);) r++;
|
|
2616
2788
|
return {
|
|
2617
2789
|
from: n,
|
|
2618
2790
|
to: e.length - r,
|
|
2619
2791
|
replacement: t.slice(n, t.length - r)
|
|
2620
2792
|
};
|
|
2621
|
-
},
|
|
2622
|
-
let a = i.getKey(), o =
|
|
2793
|
+
}, Bi = (e, t, n, r, i) => {
|
|
2794
|
+
let a = i.getKey(), o = Ti(i.getLanguage());
|
|
2623
2795
|
if (i.getLanguage() !== o && i.setLanguage(o), o === "plaintext") i.getIsSyntaxHighlightSupported() && i.setIsSyntaxHighlightSupported(!1);
|
|
2624
2796
|
else {
|
|
2625
|
-
i.getTheme() !== "github-light" && i.setTheme(
|
|
2626
|
-
let s = t ? t.getLoadedThemes().includes("github-light") ?
|
|
2797
|
+
i.getTheme() !== "github-light" && i.setTheme(Ci);
|
|
2798
|
+
let s = t ? t.getLoadedThemes().includes("github-light") ? Oi(o) && !Ni(t, o) ? Pi(o) : null : Fi() : Mi();
|
|
2627
2799
|
if (s) {
|
|
2628
2800
|
i.getIsSyntaxHighlightSupported() && i.setIsSyntaxHighlightSupported(!1), n.pendingKeys.add(a), n.loading !== s && (n.loading = s, s.then((t) => {
|
|
2629
2801
|
r(t);
|
|
@@ -2638,46 +2810,46 @@ var Wn = (e) => {
|
|
|
2638
2810
|
}
|
|
2639
2811
|
n.nodesCurrentlyHighlighting.has(a) || (n.nodesCurrentlyHighlighting.add(a), n.didTransform || (n.didTransform = !0, De(() => {
|
|
2640
2812
|
n.didTransform = !1, n.nodesCurrentlyHighlighting.clear();
|
|
2641
|
-
})),
|
|
2813
|
+
})), Li(a, () => {
|
|
2642
2814
|
let e = F(a);
|
|
2643
2815
|
if (!j(e) || !e.isAttached()) return !1;
|
|
2644
|
-
let n =
|
|
2816
|
+
let n = Ii(e, Ti(e.getLanguage()), t), { from: r, to: i, replacement: o } = zi(e.getChildren(), n);
|
|
2645
2817
|
return r === i && o.length === 0 ? !1 : (e.splice(r, i - r, o), !0);
|
|
2646
2818
|
}));
|
|
2647
|
-
},
|
|
2819
|
+
}, Vi = () => {
|
|
2648
2820
|
let [e] = z();
|
|
2649
2821
|
return s(() => {
|
|
2650
|
-
if (!e.hasNodes([
|
|
2822
|
+
if (!e.hasNodes([N, M])) throw Error("CodeHighlightPlugin: code nodes are not registered");
|
|
2651
2823
|
let t = null, n = {
|
|
2652
2824
|
didTransform: !1,
|
|
2653
2825
|
nodesCurrentlyHighlighting: /* @__PURE__ */ new Set(),
|
|
2654
2826
|
pendingKeys: /* @__PURE__ */ new Set(),
|
|
2655
2827
|
loading: null
|
|
2656
|
-
}, r = (r) =>
|
|
2828
|
+
}, r = (r) => Bi(e, t, n, (e) => {
|
|
2657
2829
|
t = e;
|
|
2658
2830
|
}, r), i = (e) => {
|
|
2659
2831
|
let t = e.getParent();
|
|
2660
2832
|
j(t) ? r(t) : A(e) && e.replace(ye(e.__text));
|
|
2661
2833
|
};
|
|
2662
|
-
return Ke(
|
|
2834
|
+
return Ke(te(e), e.registerNodeTransform(N, r), e.registerNodeTransform(We, i), e.registerNodeTransform(M, i));
|
|
2663
2835
|
}, [e]), null;
|
|
2664
|
-
},
|
|
2836
|
+
}, Hi = () => {
|
|
2665
2837
|
let [e] = z();
|
|
2666
|
-
return s(() => (
|
|
2838
|
+
return s(() => (me(e, !0), rt(fe(e), pe(e, !1), de(e), e.registerNodeTransform(ce, (e) => {
|
|
2667
2839
|
e.getBackgroundColor() !== null && e.setBackgroundColor(null);
|
|
2668
2840
|
}), e.registerCommand(Be, (e) => {
|
|
2669
2841
|
let t = L();
|
|
2670
2842
|
if (!R(t) || !t.isCollapsed()) return !1;
|
|
2671
|
-
let n =
|
|
2843
|
+
let n = ae(t.anchor.getNode());
|
|
2672
2844
|
if (n === null) return !1;
|
|
2673
2845
|
let r = e.shiftKey ? "previous" : "next", i = r === "next" ? "getNextSibling" : "getPreviousSibling", a = r === "next" ? "getFirstChild" : "getLastChild", o = n[i](), s = null;
|
|
2674
|
-
if (
|
|
2846
|
+
if (oe(o)) s = o;
|
|
2675
2847
|
else {
|
|
2676
|
-
let e = B(n,
|
|
2848
|
+
let e = B(n, se);
|
|
2677
2849
|
if (e !== null) for (let t = e[i](); t !== null; t = t[i]()) {
|
|
2678
|
-
if (!
|
|
2850
|
+
if (!se(t)) continue;
|
|
2679
2851
|
let e = t[a]();
|
|
2680
|
-
if (
|
|
2852
|
+
if (oe(e)) {
|
|
2681
2853
|
s = e;
|
|
2682
2854
|
break;
|
|
2683
2855
|
}
|
|
@@ -2687,13 +2859,13 @@ var Wn = (e) => {
|
|
|
2687
2859
|
let e = s.getFirstDescendant();
|
|
2688
2860
|
e ? e.selectStart() : s.selectStart();
|
|
2689
2861
|
} else {
|
|
2690
|
-
let e = B(n,
|
|
2862
|
+
let e = B(n, P);
|
|
2691
2863
|
e && (r === "next" ? e.selectNext() : e.selectPrevious());
|
|
2692
2864
|
}
|
|
2693
2865
|
return !0;
|
|
2694
2866
|
}, Ae))), [e]), null;
|
|
2695
|
-
},
|
|
2696
|
-
let [f] = z(), { t: h } = e(), g =
|
|
2867
|
+
}, Ui = ({ value: n, onChange: r, open: i, onOpenChange: a, toolbar: o, upload: c, ai: l }) => {
|
|
2868
|
+
let [f] = z(), { t: h } = e(), g = xi(), [_, v] = d(!1), y = i ?? _, b = (e) => {
|
|
2697
2869
|
a?.(e), i === void 0 && v(e);
|
|
2698
2870
|
}, [x, S] = d(null), [C, w] = d(() => ({
|
|
2699
2871
|
fontColor: g.fontColor,
|
|
@@ -2702,24 +2874,24 @@ var Wn = (e) => {
|
|
|
2702
2874
|
f.getEditorState().read(() => {
|
|
2703
2875
|
O.current = L()?.clone() ?? null;
|
|
2704
2876
|
});
|
|
2705
|
-
}, { linkForm: A, openLink: j, confirmLink: ee, closeLink: M } =
|
|
2877
|
+
}, { linkForm: A, openLink: j, confirmLink: ee, closeLink: M } = lr({
|
|
2706
2878
|
editor: f,
|
|
2707
2879
|
savedSelectionRef: O,
|
|
2708
2880
|
captureSelection: k
|
|
2709
|
-
}), [
|
|
2881
|
+
}), [N] = d(() => /* @__PURE__ */ new Map()), { fileInputRef: te, uploadProgress: ne, insertImage: re, onFileChange: ie, abortUpload: ae } = cr({
|
|
2710
2882
|
editor: f,
|
|
2711
2883
|
upload: c,
|
|
2712
2884
|
savedSelectionRef: O,
|
|
2713
|
-
attachmentsBySrc:
|
|
2714
|
-
}),
|
|
2885
|
+
attachmentsBySrc: N
|
|
2886
|
+
}), oe = ur({
|
|
2715
2887
|
editor: f,
|
|
2716
2888
|
value: n,
|
|
2717
2889
|
onChange: r,
|
|
2718
|
-
attachmentsBySrc:
|
|
2719
|
-
}),
|
|
2890
|
+
attachmentsBySrc: N
|
|
2891
|
+
}), P = Zn({
|
|
2720
2892
|
editor: f,
|
|
2721
2893
|
ai: l
|
|
2722
|
-
}), [
|
|
2894
|
+
}), [se, ce] = d(0), le = o?.config ?? pt;
|
|
2723
2895
|
s(() => {
|
|
2724
2896
|
!g.hasRangeSelection || !g.hasEditorText || w({
|
|
2725
2897
|
fontColor: g.fontColor,
|
|
@@ -2731,43 +2903,43 @@ var Wn = (e) => {
|
|
|
2731
2903
|
g.hasEditorText,
|
|
2732
2904
|
g.hasRangeSelection
|
|
2733
2905
|
]);
|
|
2734
|
-
let
|
|
2735
|
-
|
|
2906
|
+
let ue = () => {
|
|
2907
|
+
ae(), P.close(), S(null), M(), D(!1), b(!1);
|
|
2736
2908
|
};
|
|
2737
2909
|
s(() => {
|
|
2738
2910
|
if (!y) return;
|
|
2739
2911
|
let e = window.visualViewport;
|
|
2740
2912
|
if (!e) return;
|
|
2741
2913
|
let t = () => {
|
|
2742
|
-
|
|
2914
|
+
ce(Math.max(0, window.innerHeight - e.height - e.offsetTop));
|
|
2743
2915
|
};
|
|
2744
2916
|
return e.addEventListener("resize", t), e.addEventListener("scroll", t), t(), () => {
|
|
2745
2917
|
e.removeEventListener("resize", t), e.removeEventListener("scroll", t);
|
|
2746
2918
|
};
|
|
2747
2919
|
}, [y]), s(() => {
|
|
2748
|
-
y ||
|
|
2749
|
-
}, [
|
|
2920
|
+
y || ae();
|
|
2921
|
+
}, [ae, y]), s(() => {
|
|
2750
2922
|
if (y) return f.setEditable(!0), f.registerRootListener((e) => {
|
|
2751
2923
|
e && f.focus(void 0, { defaultSelection: "rootEnd" });
|
|
2752
2924
|
});
|
|
2753
2925
|
}, [y, f]);
|
|
2754
|
-
let
|
|
2755
|
-
T.current = !0, S(null),
|
|
2756
|
-
},
|
|
2757
|
-
x === "aiPreset" && (T.current = !0), S(null),
|
|
2926
|
+
let de = () => {
|
|
2927
|
+
T.current = !0, S(null), P.startTypeset();
|
|
2928
|
+
}, fe = (e) => {
|
|
2929
|
+
x === "aiPreset" && (T.current = !0), S(null), P.startPolish(e);
|
|
2758
2930
|
};
|
|
2759
2931
|
return /* @__PURE__ */ p(t, {
|
|
2760
2932
|
open: y,
|
|
2761
|
-
onClose:
|
|
2933
|
+
onClose: ue,
|
|
2762
2934
|
position: "bottom",
|
|
2763
2935
|
closeOnClickOverlay: !0,
|
|
2764
|
-
children: /* @__PURE__ */ p(
|
|
2765
|
-
value:
|
|
2936
|
+
children: /* @__PURE__ */ p(Qn.Provider, {
|
|
2937
|
+
value: ne,
|
|
2766
2938
|
children: /* @__PURE__ */ m("div", {
|
|
2767
2939
|
className: V["bsy-mobile-editor"],
|
|
2768
2940
|
style: {
|
|
2769
2941
|
height: 300,
|
|
2770
|
-
transform:
|
|
2942
|
+
transform: se ? `translate3d(0, -${se}px, 0)` : void 0
|
|
2771
2943
|
},
|
|
2772
2944
|
children: [
|
|
2773
2945
|
/* @__PURE__ */ p("div", {
|
|
@@ -2785,8 +2957,8 @@ var Wn = (e) => {
|
|
|
2785
2957
|
ErrorBoundary: $e
|
|
2786
2958
|
})
|
|
2787
2959
|
}),
|
|
2788
|
-
|
|
2789
|
-
config:
|
|
2960
|
+
le.length > 0 ? /* @__PURE__ */ p(yi, {
|
|
2961
|
+
config: le,
|
|
2790
2962
|
formats: g,
|
|
2791
2963
|
colorValues: C,
|
|
2792
2964
|
openSheet: x,
|
|
@@ -2804,24 +2976,24 @@ var Wn = (e) => {
|
|
|
2804
2976
|
/* @__PURE__ */ p(Je, {}),
|
|
2805
2977
|
/* @__PURE__ */ p(Xe, {}),
|
|
2806
2978
|
/* @__PURE__ */ p(Ye, {}),
|
|
2807
|
-
/* @__PURE__ */ p(or, {}),
|
|
2808
2979
|
/* @__PURE__ */ p(fr, {}),
|
|
2809
|
-
/* @__PURE__ */ p(
|
|
2810
|
-
/* @__PURE__ */ p(
|
|
2811
|
-
/* @__PURE__ */ p(
|
|
2812
|
-
/* @__PURE__ */ p(
|
|
2980
|
+
/* @__PURE__ */ p(vr, {}),
|
|
2981
|
+
/* @__PURE__ */ p(mr, {}),
|
|
2982
|
+
/* @__PURE__ */ p(gr, {}),
|
|
2983
|
+
/* @__PURE__ */ p(Vi, {}),
|
|
2984
|
+
/* @__PURE__ */ p(Hi, {}),
|
|
2813
2985
|
/* @__PURE__ */ p(Ze, {
|
|
2814
|
-
onChange:
|
|
2986
|
+
onChange: oe,
|
|
2815
2987
|
ignoreSelectionChange: !0
|
|
2816
2988
|
}),
|
|
2817
2989
|
/* @__PURE__ */ p("input", {
|
|
2818
|
-
ref:
|
|
2990
|
+
ref: te,
|
|
2819
2991
|
type: "file",
|
|
2820
2992
|
accept: ht,
|
|
2821
2993
|
hidden: !0,
|
|
2822
|
-
onChange:
|
|
2994
|
+
onChange: ie
|
|
2823
2995
|
}),
|
|
2824
|
-
/* @__PURE__ */ p(
|
|
2996
|
+
/* @__PURE__ */ p(zr, {
|
|
2825
2997
|
sheet: x,
|
|
2826
2998
|
onClose: () => {
|
|
2827
2999
|
if (T.current) {
|
|
@@ -2830,11 +3002,11 @@ var Wn = (e) => {
|
|
|
2830
3002
|
}
|
|
2831
3003
|
S(null), window.requestAnimationFrame(() => f.focus());
|
|
2832
3004
|
},
|
|
2833
|
-
onTypeset:
|
|
3005
|
+
onTypeset: de,
|
|
2834
3006
|
onPolishMenu: () => {
|
|
2835
3007
|
T.current = !0, S("aiPreset");
|
|
2836
3008
|
},
|
|
2837
|
-
onPickPreset:
|
|
3009
|
+
onPickPreset: fe,
|
|
2838
3010
|
savedSelectionRef: O,
|
|
2839
3011
|
committedColors: C,
|
|
2840
3012
|
onColorCommit: (e, t) => w((n) => ({
|
|
@@ -2843,7 +3015,7 @@ var Wn = (e) => {
|
|
|
2843
3015
|
})),
|
|
2844
3016
|
onPicture: (e) => {
|
|
2845
3017
|
if (k(), e === "upload") {
|
|
2846
|
-
|
|
3018
|
+
te.current?.click();
|
|
2847
3019
|
return;
|
|
2848
3020
|
}
|
|
2849
3021
|
T.current = !0, S(null), D(!0);
|
|
@@ -2851,38 +3023,38 @@ var Wn = (e) => {
|
|
|
2851
3023
|
canTypeset: !!l?.typeset,
|
|
2852
3024
|
canPolish: !!l?.polish
|
|
2853
3025
|
}),
|
|
2854
|
-
/* @__PURE__ */ p(
|
|
3026
|
+
/* @__PURE__ */ p(Vr, {
|
|
2855
3027
|
open: A !== null,
|
|
2856
3028
|
seed: A,
|
|
2857
3029
|
onClose: M,
|
|
2858
3030
|
onConfirm: ee
|
|
2859
3031
|
}),
|
|
2860
|
-
/* @__PURE__ */ p(
|
|
3032
|
+
/* @__PURE__ */ p(Ur, {
|
|
2861
3033
|
open: E,
|
|
2862
3034
|
onClose: () => D(!1),
|
|
2863
3035
|
onConfirm: (e) => {
|
|
2864
|
-
|
|
3036
|
+
re(e, "", e), D(!1);
|
|
2865
3037
|
}
|
|
2866
3038
|
}),
|
|
2867
|
-
/* @__PURE__ */ p(
|
|
2868
|
-
open:
|
|
2869
|
-
mode:
|
|
2870
|
-
originalHtml:
|
|
2871
|
-
codeBlocks:
|
|
3039
|
+
/* @__PURE__ */ p(ti, {
|
|
3040
|
+
open: P.mode !== null,
|
|
3041
|
+
mode: P.mode,
|
|
3042
|
+
originalHtml: P.snapshot.html,
|
|
3043
|
+
codeBlocks: P.snapshot.codeBlocks,
|
|
2872
3044
|
ai: l,
|
|
2873
|
-
polishPreset:
|
|
2874
|
-
onClose:
|
|
2875
|
-
onApply:
|
|
2876
|
-
onPickPreset:
|
|
3045
|
+
polishPreset: P.preset,
|
|
3046
|
+
onClose: P.close,
|
|
3047
|
+
onApply: P.apply,
|
|
3048
|
+
onPickPreset: fe
|
|
2877
3049
|
})
|
|
2878
3050
|
]
|
|
2879
3051
|
})
|
|
2880
3052
|
})
|
|
2881
3053
|
});
|
|
2882
|
-
},
|
|
3054
|
+
}, Wi = "1px solid #d9d9d9", Gi = { export: new Map([[ce, (e, t) => {
|
|
2883
3055
|
let n = t.exportDOM(e);
|
|
2884
|
-
return Ge(n.element) && (n.element.style.border =
|
|
2885
|
-
}]]) },
|
|
3056
|
+
return Ge(n.element) && (n.element.style.border = Wi), n;
|
|
3057
|
+
}]]) }, Ki = class e extends x {
|
|
2886
3058
|
constructor(e = "", t = {}, n) {
|
|
2887
3059
|
super(e, t, n);
|
|
2888
3060
|
}
|
|
@@ -2897,12 +3069,12 @@ var Wn = (e) => {
|
|
|
2897
3069
|
}, t.__key);
|
|
2898
3070
|
}
|
|
2899
3071
|
static importJSON(e) {
|
|
2900
|
-
return
|
|
3072
|
+
return qi().updateFromJSON(e);
|
|
2901
3073
|
}
|
|
2902
3074
|
sanitizeUrl(e) {
|
|
2903
3075
|
return e.startsWith("@") ? e : super.sanitizeUrl(e);
|
|
2904
3076
|
}
|
|
2905
|
-
},
|
|
3077
|
+
}, qi = (e = "", t = {}) => he(new Ki(e, t)), Ji = {
|
|
2906
3078
|
namespace: "bsyLexicalEditor",
|
|
2907
3079
|
onError: (e) => {
|
|
2908
3080
|
console.error("Lexical error", e);
|
|
@@ -2935,28 +3107,28 @@ var Wn = (e) => {
|
|
|
2935
3107
|
tableRow: "editor-table-row",
|
|
2936
3108
|
tableScrollableWrapper: "editor-table-scrollable-wrapper"
|
|
2937
3109
|
},
|
|
2938
|
-
html:
|
|
3110
|
+
html: Gi,
|
|
2939
3111
|
nodes: [
|
|
2940
|
-
|
|
3112
|
+
Ki,
|
|
2941
3113
|
{
|
|
2942
3114
|
replace: x,
|
|
2943
|
-
with: (e) => new
|
|
3115
|
+
with: (e) => new Ki(e.__url, {
|
|
2944
3116
|
rel: e.__rel,
|
|
2945
3117
|
target: e.__target,
|
|
2946
3118
|
title: e.__title
|
|
2947
3119
|
}),
|
|
2948
|
-
withKlass:
|
|
3120
|
+
withKlass: Ki
|
|
2949
3121
|
},
|
|
2950
3122
|
b,
|
|
2951
3123
|
D,
|
|
2952
3124
|
E,
|
|
2953
|
-
|
|
2954
|
-
|
|
3125
|
+
ie,
|
|
3126
|
+
N,
|
|
2955
3127
|
M,
|
|
2956
|
-
ue,
|
|
2957
|
-
de,
|
|
2958
3128
|
le,
|
|
2959
|
-
|
|
3129
|
+
ue,
|
|
3130
|
+
ce,
|
|
3131
|
+
nr,
|
|
2960
3132
|
q,
|
|
2961
3133
|
{
|
|
2962
3134
|
replace: We,
|
|
@@ -2964,10 +3136,10 @@ var Wn = (e) => {
|
|
|
2964
3136
|
withKlass: q
|
|
2965
3137
|
}
|
|
2966
3138
|
]
|
|
2967
|
-
},
|
|
2968
|
-
initialConfig:
|
|
2969
|
-
children: /* @__PURE__ */ p(
|
|
3139
|
+
}, Yi = (e) => /* @__PURE__ */ p(g, {
|
|
3140
|
+
initialConfig: Ji,
|
|
3141
|
+
children: /* @__PURE__ */ p(Ui, { ...e })
|
|
2970
3142
|
});
|
|
2971
|
-
|
|
3143
|
+
Yi.displayName = "BsyMobileEditor";
|
|
2972
3144
|
//#endregion
|
|
2973
|
-
export {
|
|
3145
|
+
export { Gr as n, Yi as t };
|