@revolist/ui 4.0.1-rc → 4.0.3-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +345 -262
  3. package/_chunks/calendar-xpZ0v3xf.js +258 -0
  4. package/_chunks/chart-frame-Cmc7xU1i.js +130 -0
  5. package/_chunks/choice-chips-CHQTUdLs.js +110 -0
  6. package/_chunks/clock-BOhPNlW3.js +4 -0
  7. package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-D8vyPfld.js} +41 -41
  8. package/_chunks/color-picker-CudqPYZo.js +138 -0
  9. package/_chunks/component-C_T2VN5u.js +863 -0
  10. package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BMOOmqx5.js} +0 -4
  11. package/_chunks/control-AHKXD5Eu.js +93 -0
  12. package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-uscKfAnV.js} +29 -29
  13. package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
  14. package/_chunks/{controls-NEL5tDaz.js → controls-DsNi8V8I.js} +229 -214
  15. package/_chunks/{date-control-CYCkb1aQ.js → date-control-DrVFX13g.js} +21 -21
  16. package/_chunks/date-time-qIhp5vaX.js +768 -0
  17. package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
  18. package/_chunks/dialog.parts-CKGkC5zP.js +134 -0
  19. package/_chunks/duration-CL68Em0o.js +272 -0
  20. package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
  21. package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-WDdtVDNA.js} +8 -8
  22. package/_chunks/field-context-D57PnBbH.js +5 -0
  23. package/_chunks/framework-mount--RTLIqE-.js +54 -0
  24. package/_chunks/history-controls-B3u3INEK.js +27 -0
  25. package/_chunks/hooks.module-CG3gN83z.js +157 -0
  26. package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
  27. package/_chunks/mount-DQ1cpppK.js +257 -0
  28. package/_chunks/native-control-C_yok8_-.js +605 -0
  29. package/_chunks/native.view-ByyZ1CT5.js +32 -0
  30. package/_chunks/{number-input-NnH57J4j.js → number-input-BKwA5FnM.js} +89 -89
  31. package/_chunks/picker-h1P5RUgp.js +122 -0
  32. package/_chunks/popup-CT2uD3go.js +367 -0
  33. package/_chunks/preact.module-BBM36DnO.js +290 -0
  34. package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-DZgmaic0.js} +10 -10
  35. package/_chunks/render-m5eMMwFR.js +83 -0
  36. package/_chunks/reorder-list-CSlqAGHw.js +59 -0
  37. package/_chunks/request-trail-DSlFix6i.js +618 -0
  38. package/_chunks/rich-text-CH7gIqOS.js +636 -0
  39. package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
  40. package/_form.scss +1 -1
  41. package/_vendor/preact/LICENSE +21 -0
  42. package/_vendor/preact/compat/src/index.d.ts +353 -0
  43. package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
  44. package/_vendor/preact/compat/src/suspense.d.ts +19 -0
  45. package/_vendor/preact/hooks/src/index.d.ts +145 -0
  46. package/_vendor/preact/src/dom.d.ts +2548 -0
  47. package/_vendor/preact/src/index.d.ts +373 -0
  48. package/_vendor/preact/src/jsx.d.ts +2958 -0
  49. package/activity-message.d.ts +1 -1
  50. package/activity-message.js +16 -16
  51. package/ai/_chat.scss +195 -0
  52. package/ai/_style.scss +105 -34
  53. package/ai/chat.d.ts +63 -0
  54. package/ai/components.d.ts +20 -4
  55. package/ai/index.d.ts +2 -0
  56. package/ai/index.js +3 -3
  57. package/ai/mount.d.ts +30 -1
  58. package/ai/prompt-history.d.ts +13 -0
  59. package/ai/request-trail.d.ts +1 -1
  60. package/ai/transcript.d.ts +25 -0
  61. package/ai/translation-context.d.ts +1 -1
  62. package/ai/translations.d.ts +1 -1
  63. package/alert.d.ts +2 -2
  64. package/angular/angular.js +0 -3
  65. package/assignee/field.d.ts +2 -2
  66. package/assignee/index.js +86 -87
  67. package/assignee/layout.d.ts +2 -2
  68. package/assignee/picker.d.ts +1 -1
  69. package/avatar/index.js +25 -25
  70. package/avatar/index.view.d.ts +1 -1
  71. package/brush-range/component.d.ts +1 -1
  72. package/brush-range/component.js +30 -30
  73. package/buttons/delete-button.d.ts +2 -1
  74. package/buttons/delete-button.js +1 -1
  75. package/buttons/remove-button.d.ts +1 -1
  76. package/buttons/remove-button.js +3 -3
  77. package/buttons/svg-button.d.ts +2 -1
  78. package/buttons/svg-button.js +35 -35
  79. package/calendar/_calendar.scss +7 -2
  80. package/calendar/calendar.d.ts +1 -1
  81. package/calendar/calendar.js +1 -1
  82. package/calendar/caption.d.ts +1 -1
  83. package/calendar/day.d.ts +1 -1
  84. package/calendar/day.js +4 -4
  85. package/calendar/header.d.ts +1 -1
  86. package/calendar/header.js +35 -35
  87. package/calendar/index.js +2 -2
  88. package/calendar/month-grid.d.ts +1 -1
  89. package/calendar/month-grid.js +37 -37
  90. package/calendar/picker.d.ts +1 -1
  91. package/calendar/types.d.ts +1 -1
  92. package/calendar/year-grid.d.ts +1 -1
  93. package/calendar/year-grid.js +12 -12
  94. package/checkbox/index.d.ts +2 -2
  95. package/checkbox/index.js +9 -9
  96. package/choice-chips/index.d.ts +1 -1
  97. package/choice-chips/index.js +1 -1
  98. package/color-palette/color-palette.d.ts +1 -1
  99. package/color-palette/color-palette.js +1 -1
  100. package/color-palette/color-picker.d.ts +1 -1
  101. package/color-palette/color-picker.js +2 -2
  102. package/component-catalog.d.ts +34 -23
  103. package/control-attributes.js +7 -7
  104. package/control-presentation.js +18 -18
  105. package/controls.d.ts +12 -10
  106. package/controls.js +3 -3
  107. package/core/editor-commit.d.ts +1 -1
  108. package/core/editor-popup.d.ts +1 -1
  109. package/core/editor-popup.js +1 -1
  110. package/date-time/date-control.d.ts +1 -1
  111. package/date-time/field.d.ts +2 -2
  112. package/date-time/index.js +1 -1
  113. package/date-time/picker.d.ts +1 -1
  114. package/date-time/style.scss +4 -4
  115. package/date-time/time-control.d.ts +1 -1
  116. package/date-time/time-selection.d.ts +1 -1
  117. package/date-time/types.d.ts +1 -1
  118. package/dialog/dialog-action-footer.view.d.ts +1 -1
  119. package/dialog/dialog.dom.js +52 -52
  120. package/dialog/dialog.parts.d.ts +18 -18
  121. package/dialog/dialog.parts.js +1 -1
  122. package/dialog/dialog.preact.d.ts +1 -1
  123. package/dialog/dialog.preact.js +6 -6
  124. package/distribution-chart/area-chart.d.ts +1 -1
  125. package/distribution-chart/area-chart.js +25 -25
  126. package/distribution-chart/bar-chart.d.ts +6 -3
  127. package/distribution-chart/bar-chart.js +10 -6
  128. package/distribution-chart/chart-frame.d.ts +3 -2
  129. package/distribution-chart/index.d.ts +1 -1
  130. package/distribution-chart/index.js +6 -6
  131. package/distribution-chart/line-chart.d.ts +1 -1
  132. package/distribution-chart/line-chart.js +9 -9
  133. package/distribution-chart/types.d.ts +1 -1
  134. package/dropdown/content.d.ts +3 -2
  135. package/dropdown/content.js +1 -141
  136. package/dropdown/control.d.ts +14 -0
  137. package/dropdown/control.js +1 -0
  138. package/dropdown/control.view.d.ts +6 -0
  139. package/dropdown/dropdown.service.d.ts +1 -1
  140. package/dropdown/dropdown.service.js +9 -9
  141. package/dropdown/dropdown.types.d.ts +4 -0
  142. package/dropdown/editor-dropdown.style.scss +37 -9
  143. package/dropdown/index.d.ts +1 -1
  144. package/dropdown/index.js +3 -4
  145. package/dropdown/lookup-field.d.ts +1 -1
  146. package/dropdown/lookup-field.js +41 -41
  147. package/dropdown/popup.d.ts +1 -1
  148. package/dropdown/popup.js +1 -140
  149. package/duration/controls.d.ts +1 -1
  150. package/duration/index.d.ts +2 -2
  151. package/duration/index.js +1 -1
  152. package/duration/style.scss +1 -1
  153. package/editor-actions.d.ts +1 -1
  154. package/editor-actions.js +21 -20
  155. package/editor-layout/index.d.ts +1 -1
  156. package/editor-layout/index.js +27 -27
  157. package/field-configurator.d.ts +1 -1
  158. package/field-configurator.js +93 -93
  159. package/field-reorder.hook.js +32 -32
  160. package/fieldset.d.ts +3 -0
  161. package/filter/filters/slider/preact.js +3 -3
  162. package/filter/filters/slider/single.d.ts +1 -1
  163. package/filter/filters/slider/single.js +23 -23
  164. package/filter-badge.d.ts +1 -1
  165. package/filter-badge.js +23 -22
  166. package/filter-controls.d.ts +1 -1
  167. package/filter-controls.js +30 -30
  168. package/form-controls/field-context.d.ts +5 -0
  169. package/form-controls/index.js +16 -21
  170. package/form-controls/index.view.d.ts +2 -4
  171. package/form-controls/presentation.d.ts +1 -1
  172. package/form-controls/presentation.js +59 -51
  173. package/formatting/comparison-preview.d.ts +1 -1
  174. package/formatting/control-tooltip.d.ts +1 -1
  175. package/formatting/icon-controls.d.ts +1 -1
  176. package/formatting/index.js +105 -100
  177. package/formatting/inspector-section.d.ts +1 -1
  178. package/formatting/typography-controls.d.ts +1 -1
  179. package/framework-mount.d.ts +1 -1
  180. package/framework.js +215 -207
  181. package/history-controls.d.ts +14 -0
  182. package/history-controls.js +1 -0
  183. package/icons/icon.d.ts +1 -1
  184. package/icons/icon.js +1 -1
  185. package/legend.d.ts +1 -1
  186. package/legend.js +12 -12
  187. package/masked-input/index.d.ts +1 -1
  188. package/masked-input/index.js +109 -109
  189. package/native-control.d.ts +14 -12
  190. package/native-control.js +3 -26
  191. package/native-styles.css +1 -1
  192. package/native.js +40 -39
  193. package/number-input/index.d.ts +1 -1
  194. package/number-input/index.js +1 -1
  195. package/package.json +18 -14
  196. package/pagination.d.ts +3 -0
  197. package/pagination.js +43 -33
  198. package/pdf-viewer/component.d.ts +1 -1
  199. package/pdf-viewer/controller.js +1 -1
  200. package/pdf-viewer/header.d.ts +1 -1
  201. package/pdf-viewer/index.js +13 -13
  202. package/pdf-viewer/search-bar.d.ts +1 -1
  203. package/pdf-viewer/status.d.ts +1 -1
  204. package/pdf-viewer/style.scss +3 -4
  205. package/pdf-viewer/toolbar.d.ts +1 -1
  206. package/pickers.d.ts +1 -1
  207. package/preact-mount.d.ts +1 -1
  208. package/preact-mount.js +1 -1
  209. package/preact.d.ts +2 -0
  210. package/preact.js +62 -62
  211. package/rating-choice.d.ts +1 -1
  212. package/rating-choice.js +1 -1
  213. package/react-adapter.d.ts +1 -1
  214. package/react-control.d.ts +0 -1
  215. package/react-control.js +2 -2
  216. package/react.d.ts +13 -3
  217. package/react.js +71 -88
  218. package/reorder-list.d.ts +1 -1
  219. package/reorder-list.js +1 -1
  220. package/resource-picker/resource-picker-avatar.d.ts +1 -1
  221. package/resource-picker/resource-picker-avatar.js +14 -14
  222. package/resource-picker/resource-picker-option.d.ts +1 -1
  223. package/resource-picker/resource-picker-option.js +28 -28
  224. package/resource-picker/resource-picker-popup.d.ts +1 -1
  225. package/resource-picker/resource-picker-popup.js +3 -3
  226. package/resource-picker/resource-picker.d.ts +1 -1
  227. package/resource-picker/resource-picker.js +88 -88
  228. package/resource-picker/resource-picker.scss +6 -3
  229. package/rich-text/engine.d.ts +16 -19
  230. package/rich-text/index.d.ts +7 -7
  231. package/rich-text/index.js +1 -1
  232. package/rich-text/model.d.ts +4 -3
  233. package/rich-text/render-model.d.ts +4 -5
  234. package/rich-text/style.scss +3 -12
  235. package/rich-text/toolbar.d.ts +7 -7
  236. package/rich-text/translations.d.ts +3 -15
  237. package/search-input/index.js +12 -12
  238. package/segmented-switch/index.d.ts +1 -1
  239. package/segmented-switch/index.js +1 -1
  240. package/select.d.ts +20 -0
  241. package/select.js +1 -0
  242. package/status-feedback/exit-snapshot.js +4 -4
  243. package/status-feedback/index.js +2 -2
  244. package/status-feedback/popover.js +10 -10
  245. package/status-feedback/render.d.ts +2 -2
  246. package/status-feedback/render.js +3 -44
  247. package/status-feedback/status-feedback.scss +7 -0
  248. package/status-feedback/types.d.ts +4 -0
  249. package/status-feedback/use-auto-dismiss.d.ts +3 -0
  250. package/styles/_compositions.scss +3 -1
  251. package/styles/_control.scss +12 -4
  252. package/styles/_primitives.scss +9 -8
  253. package/styles.css +1 -1
  254. package/surfaces.js +49 -49
  255. package/svelte/UiComponent.server.js +1 -48
  256. package/svelte/UiComponent.svelte +0 -21
  257. package/svelte.js +33 -68
  258. package/switch/index.js +15 -15
  259. package/time-grid.d.ts +1 -1
  260. package/time-grid.js +58 -58
  261. package/timeline-track/component.d.ts +5 -1
  262. package/timeline-track/index.js +91 -74
  263. package/timeline-track/model.d.ts +9 -0
  264. package/timeline-track/model.js +10 -1
  265. package/ui.css +1 -1
  266. package/vue-adapter.d.ts +1 -1
  267. package/vue.d.ts +138 -119
  268. package/vue.js +150 -174
  269. package/_chunks/calendar-BsDxCYhI.js +0 -248
  270. package/_chunks/chart-frame-BvxbmEU9.js +0 -126
  271. package/_chunks/choice-chips-0HfOnK_4.js +0 -110
  272. package/_chunks/color-picker-BRv-__AM.js +0 -138
  273. package/_chunks/component-D4PH5UZT.js +0 -859
  274. package/_chunks/date-time-DjucJmbc.js +0 -769
  275. package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
  276. package/_chunks/dropdown-CkGQBm1Q.js +0 -357
  277. package/_chunks/duration-BCaktcvz.js +0 -270
  278. package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
  279. package/_chunks/framework-mount-BKIOsvY-.js +0 -54
  280. package/_chunks/mount-0-8opf1j.js +0 -90
  281. package/_chunks/native.view-8q_nwQ7x.js +0 -32
  282. package/_chunks/picker-oazJ7sO_.js +0 -121
  283. package/_chunks/reorder-list-BV3kZXso.js +0 -59
  284. package/_chunks/request-trail-D0oVzdRd.js +0 -347
  285. package/_chunks/rich-text-2Rla349o.js +0 -477
  286. package/react-native-select.d.ts +0 -6
  287. package/rich-text/syntax.d.ts +0 -2
  288. package/vue-native-select.d.ts +0 -9
@@ -1,477 +0,0 @@
1
- import { SvgIcon as e } from "../icons/icon.js";
2
- import { Input as t, TextArea as n } from "../native-control.js";
3
- import { F as r, I as i, L as a, R as o, n as s } from "./controls-NEL5tDaz.js";
4
- import { SegmentedSwitch as c } from "../segmented-switch/index.js";
5
- import { n as l } from "./editor-commit-D6Rf5rGz.js";
6
- import { EditorActions as u } from "../editor-actions.js";
7
- import { useEffect as d, useRef as f, useState as p } from "preact/hooks";
8
- import { jsx as m, jsxs as h } from "preact/jsx-runtime";
9
- import { $convertFromMarkdownString as g, $convertToMarkdownString as _, HIGHLIGHT as v, TRANSFORMERS as y, registerMarkdownShortcuts as b } from "@lexical/markdown";
10
- import { $createParagraphNode as x, $getRoot as S, $getSelection as C, $isElementNode as w, $isRangeSelection as T, $isTextNode as E, $setSelection as D, COMMAND_PRIORITY_HIGH as O, FORMAT_TEXT_COMMAND as k, PASTE_COMMAND as A, createEditor as j } from "lexical";
11
- import { $createHeadingNode as M, $createQuoteNode as ee, $isHeadingNode as N, $isQuoteNode as P, HeadingNode as F, QuoteNode as I, registerRichText as te } from "@lexical/rich-text";
12
- import { $isListNode as L, INSERT_ORDERED_LIST_COMMAND as ne, INSERT_UNORDERED_LIST_COMMAND as re, ListItemNode as R, ListNode as z, REMOVE_LIST_COMMAND as ie, registerList as ae } from "@lexical/list";
13
- import { $isLinkNode as B, $toggleLink as oe, LinkNode as V } from "@lexical/link";
14
- import { $createCodeNode as se, $isCodeNode as H, CodeNode as U } from "@lexical/code";
15
- import { $setBlocksType as ce } from "@lexical/selection";
16
- import { createEmptyHistoryState as le, registerHistory as ue } from "@lexical/history";
17
- //#region src/rich-text/syntax.ts
18
- var W = y.filter((e) => e !== v);
19
- //#endregion
20
- //#region src/rich-text/model.ts
21
- function G(e) {
22
- let t = e.replace(/^([`~])\1{2,}[^\n]*\n[\s\S]*?^\1{3,}[^\n]*$/gm, "").replace(/`[^`\n]+`/g, ""), n = [];
23
- return /!\[[^\]]*\](?:\(|\[)/.test(t) && n.push("Images"), /^\s*\|?.*\|.*\n\s*\|?\s*:?-{3,}:?\s*\|/m.test(t) && n.push("Tables"), /<\/?[A-Za-z][^>]*>/.test(t) && n.push("HTML"), (/^\s*\[[^\]]+\]:\s*\S+/m.test(t) || /\[[^\]]+\]\[[^\]]*\]/.test(t)) && n.push("Reference links"), /^\s*[-*+] \[[ xX]\]/m.test(t) && n.push("Task lists"), /^ {0,3}(?:(?:\*\s*){3,}|(?:-\s*){3,}|(?:_\s*){3,})$/m.test(t) && n.push("Horizontal rules"), /^.+\n {0,3}(?:={3,}|-{3,})\s*$/m.test(t) && n.push("Alternate headings"), /(?:^|\n[ \t]*\n)(?: {4}|\t)\S/.test(t) && n.push("Indented code"), /==[^=\n]+==/.test(t) && n.push("Highlight"), /^\s*:::|\[\^[^\]]+\]/m.test(t) && n.push("Extensions"), n;
24
- }
25
- function K(e) {
26
- if (!e || /[\u0000-\u0020\u007f]/.test(e)) return !1;
27
- try {
28
- return [
29
- "https:",
30
- "http:",
31
- "mailto:"
32
- ].includes(new URL(e, "https://editor.invalid/").protocol);
33
- } catch {
34
- return !1;
35
- }
36
- }
37
- //#endregion
38
- //#region src/rich-text/engine.ts
39
- var q = {
40
- formats: [],
41
- block: null,
42
- link: !1
43
- };
44
- function de() {
45
- let e = C();
46
- if (!T(e)) return q;
47
- let t = e.anchor.getNode(), n = [t, ...t.getParents()], r = n.find((e) => N(e) || P(e) || H(e) || L(e));
48
- return {
49
- formats: [
50
- "bold",
51
- "italic",
52
- "strikethrough",
53
- "code"
54
- ].filter((t) => e.hasFormat(t)),
55
- block: N(r) ? r.getTag() : L(r) ? r.getListType() === "number" ? "ordered" : "bullet" : P(r) ? "quote" : H(r) ? "code" : "paragraph",
56
- link: n.some(B)
57
- };
58
- }
59
- function fe(e, t, n, r = () => {}) {
60
- let i = j({
61
- namespace: "RevoMarkdown",
62
- nodes: [
63
- F,
64
- I,
65
- z,
66
- R,
67
- V,
68
- U
69
- ],
70
- onError: (e) => {
71
- throw e;
72
- },
73
- theme: { text: {
74
- bold: "rv-markdown-bold",
75
- italic: "rv-markdown-italic",
76
- strikethrough: "rv-markdown-strike",
77
- code: "rv-markdown-inline-code"
78
- } }
79
- });
80
- i.setRootElement(e);
81
- let a = [
82
- i.registerCommand(k, (e) => ![
83
- "bold",
84
- "italic",
85
- "strikethrough",
86
- "code"
87
- ].includes(e), O),
88
- te(i),
89
- ae(i),
90
- ue(i, le(), 300),
91
- b(i, W)
92
- ];
93
- a.push(i.registerCommand(A, (e) => {
94
- if (!e || !("clipboardData" in e) || !e.clipboardData) return !1;
95
- let t = e.clipboardData.getData("text/plain");
96
- e.preventDefault();
97
- let n = C();
98
- return T(n) && n.insertRawText(t), !0;
99
- }, O));
100
- let o = null, s = (e) => i.update(() => {
101
- g(e, W);
102
- }, {
103
- tag: "markdown-source",
104
- discrete: !0
105
- });
106
- return s(t), a.push(i.registerUpdateListener(({ editorState: e, dirtyElements: t, dirtyLeaves: i, tags: a }) => {
107
- e.read(() => r(de())), !(a.has("markdown-source") || !t.size && !i.size) && e.read(() => {
108
- let e = S().getAllTextNodes().some((e) => {
109
- let t = e.getParent();
110
- return B(t) && !K(t.getURL());
111
- });
112
- n(_(W), e);
113
- });
114
- })), {
115
- editor: i,
116
- setMarkdown: s,
117
- format: (e) => {
118
- i.dispatchCommand(k, e), i.focus();
119
- },
120
- block: (e) => {
121
- e === "paragraph" && i.dispatchCommand(ie, void 0), e === "bullet" || e === "ordered" ? i.dispatchCommand(e === "bullet" ? re : ne, void 0) : i.update(() => ce(C(), () => e === "paragraph" ? x() : e === "code" ? se() : e === "quote" ? ee() : M(e))), i.focus();
122
- },
123
- captureSelection: () => i.getEditorState().read(() => {
124
- o = C()?.clone() ?? null;
125
- }),
126
- link: (e) => K(e) ? (i.update(() => {
127
- o && D(o.clone()), oe(e, { rel: "noopener noreferrer" });
128
- }), i.focus(), !0) : !1,
129
- destroy: () => {
130
- a.forEach((e) => e()), i.setRootElement(null);
131
- }
132
- };
133
- }
134
- function J(e) {
135
- let t = j({
136
- namespace: "RevoMarkdownValidation",
137
- nodes: [
138
- F,
139
- I,
140
- z,
141
- R,
142
- V,
143
- U
144
- ],
145
- onError: (e) => {
146
- throw e;
147
- }
148
- }), n = !1;
149
- return t.update(() => {
150
- g(e, W), n = S().getAllTextNodes().some((e) => {
151
- let t = e.getParent();
152
- return B(t) && !K(t.getURL());
153
- });
154
- }, { discrete: !0 }), n;
155
- }
156
- //#endregion
157
- //#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/bold.svg?raw
158
- var pe = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l32 0 0 320-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c70.7 0 128-57.3 128-128 0-46.5-24.8-87.3-62-109.7 18.7-22.3 30-51 30-82.3 0-70.7-57.3-128-128-128L32 32zM288 160c0 35.3-28.7 64-64 64l-96 0 0-128 96 0c35.3 0 64 28.7 64 64zM128 416l0-128 128 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-128 0z\"/></svg>", me = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M128 64c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-58.7 0-133.3 320 64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l58.7 0 133.3-320-64 0c-17.7 0-32-14.3-32-32z\"/></svg>", he = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M96 157.5C96 88.2 152.2 32 221.5 32L368 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L221.5 96c-34 0-61.5 27.5-61.5 61.5 0 31 23.1 57.2 53.9 61l44.1 5.5 222 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l83.1 0C103 204.6 96 181.8 96 157.5zM349.2 336l65.5 0c.9 6.1 1.4 12.2 1.4 18.5 0 69.3-56.2 125.5-125.5 125.5L144 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l146.5 0c34 0 61.5-27.5 61.5-61.5 0-6.4-1-12.7-2.8-18.5z\"/></svg>", ge = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M360.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm64.6 136.1c-12.5 12.5-12.5 32.8 0 45.3l73.4 73.4-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0zm-274.7 0c-12.5-12.5-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 150.6 182.6c12.5-12.5 12.5-32.8 0-45.3z\"/></svg>", Y = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 64C0 46.3 14.3 32 32 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 112 224 0 0-112-16 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-16 0 0 320 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-144-224 0 0 144 16 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-320-16 0C14.3 96 0 81.7 0 64z\"/></svg>", _e = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l64 0 0 320-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-352c0-17.7-14.3-32-32-32L32 32z\"/></svg>", ve = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M48 64c0-17.7 14.3-32 32-32l171 0c60.2 0 109 48.8 109 109 0 43.8-26.2 83.3-66.4 100.4l-139.1 59C119 315.4 96 350.2 96 388.7l0 27.3 224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32l0-59.3c0-64.2 38.4-122.2 97.5-147.3l139.1-59c16.6-7.1 27.4-23.4 27.4-41.4 0-24.9-20.2-45-45-45L80 96C62.3 96 48 81.7 48 64z\"/></svg>", ye = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M48 144a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM48 464a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM96 256a48 48 0 1 0 -96 0 48 48 0 1 0 96 0z\"/></svg>", be = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 72C0 58.8 10.7 48 24 48l48 0c13.3 0 24 10.7 24 24l0 104 24 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-80-24 0C10.7 96 0 85.3 0 72zM30.4 301.2C41.8 292.6 55.7 288 70 288l4.9 0c33.7 0 61.1 27.4 61.1 61.1 0 19.6-9.4 37.9-25.2 49.4l-24 17.5 33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-90.7 0C13.1 464 0 450.9 0 434.7 0 425.3 4.5 416.5 12.1 411l70.5-51.3c3.4-2.5 5.4-6.4 5.4-10.6 0-7.2-5.9-13.1-13.1-13.1L70 336c-3.9 0-7.7 1.3-10.8 3.6L38.4 355.2c-10.6 8-25.6 5.8-33.6-4.8S-1 324.8 9.6 316.8l20.8-15.6zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z\"/></svg>", xe = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 216C0 149.7 53.7 96 120 96l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64L0 216zm256 0c0-66.3 53.7-120 120-120l8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-8 0c-30.9 0-56 25.1-56 56l0 8 64 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64l-64 0c-35.3 0-64-28.7-64-64l0-136z\"/></svg>", Se = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 64C0 28.7 28.7 0 64 0L213.5 0c17 0 33.3 6.7 45.3 18.7L365.3 125.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm208-5.5l0 93.5c0 13.3 10.7 24 24 24L325.5 176 208 58.5zM154.2 295.6c8.6-10.1 7.5-25.2-2.6-33.8s-25.2-7.5-33.8 2.6l-48 56c-7.7 9-7.7 22.2 0 31.2l48 56c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8l-34.6-40.4 34.6-40.4zm112-31.2c-8.6-10.1-23.8-11.2-33.8-2.6s-11.2 23.8-2.6 33.8l34.6 40.4-34.6 40.4c-8.6 10.1-7.5 25.2 2.6 33.8s25.2 7.5 33.8-2.6l48-56c7.7-9 7.7-22.2 0-31.2l-48-56z\"/></svg>", Ce = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z\"/></svg>";
159
- //#endregion
160
- //#region src/rich-text/toolbar.tsx
161
- function X({ engine: t, selection: n, text: s, showLink: c, onLink: l }) {
162
- let u = (t, n, i, a, o) => /* @__PURE__ */ h(r, {
163
- size: "compact",
164
- className: "rv-markdown-editor__command",
165
- "aria-label": t,
166
- title: t,
167
- pressed: i,
168
- onMouseDown: (e) => e.preventDefault(),
169
- onPressedChange: a,
170
- children: [/* @__PURE__ */ m(e, { svg: n }), o && /* @__PURE__ */ m(e, {
171
- svg: o,
172
- className: "rv-svg-icon rv-markdown-editor__level"
173
- })]
174
- }), d = (e, r, i, a) => u(e, r, n.block === i, () => t()?.block(n.block === i ? "paragraph" : i), a);
175
- return /* @__PURE__ */ h(i, {
176
- className: "rv-markdown-editor__toolbar",
177
- label: s.formatting,
178
- children: [
179
- /* @__PURE__ */ h(a, {
180
- label: s.inlineFormatting,
181
- children: [
182
- u(s.bold, pe, n.formats.includes("bold"), () => t()?.format("bold")),
183
- u(s.italic, me, n.formats.includes("italic"), () => t()?.format("italic")),
184
- u(s.strike, he, n.formats.includes("strikethrough"), () => t()?.format("strikethrough")),
185
- u(s.code, ge, n.formats.includes("code"), () => t()?.format("code"))
186
- ]
187
- }),
188
- /* @__PURE__ */ m(o, {}),
189
- /* @__PURE__ */ h(a, {
190
- label: s.headings,
191
- children: [d(s.heading1, Y, "h1", _e), d(s.heading2, Y, "h2", ve)]
192
- }),
193
- /* @__PURE__ */ m(o, {}),
194
- /* @__PURE__ */ h(a, {
195
- label: s.structure,
196
- children: [
197
- d(s.bullets, ye, "bullet"),
198
- d(s.numberedList, be, "ordered"),
199
- d(s.quote, xe, "quote"),
200
- d(s.codeBlock, Se, "code")
201
- ]
202
- }),
203
- /* @__PURE__ */ m(o, {}),
204
- /* @__PURE__ */ m(a, {
205
- label: s.links,
206
- children: u(s.link, Ce, c || n.link, l)
207
- })
208
- ]
209
- });
210
- }
211
- //#endregion
212
- //#region src/rich-text/translations.ts
213
- var Z = {
214
- visual: "Visual",
215
- source: "Markdown",
216
- label: "Rich text",
217
- unsupported: "Keep this content in Markdown mode to preserve unsupported syntax:",
218
- unsafeLink: "Use an HTTP, HTTPS, mailto or relative link.",
219
- requiredValue: "Enter a value.",
220
- tooLong: "The value exceeds the maximum length.",
221
- link: "Add link",
222
- linkUrl: "Link URL",
223
- popupLabel: "Edit rich text",
224
- formatting: "Text formatting",
225
- inlineFormatting: "Inline formatting",
226
- headings: "Headings",
227
- structure: "Lists and blocks",
228
- links: "Links",
229
- bold: "Bold",
230
- italic: "Italic",
231
- strike: "Strike",
232
- code: "Code",
233
- heading1: "H1",
234
- heading2: "H2",
235
- bullets: "Bullets",
236
- numberedList: "Numbered list",
237
- quote: "Quote",
238
- codeBlock: "Code block",
239
- images: "Images",
240
- tables: "Tables",
241
- html: "HTML",
242
- referenceLinks: "Reference links",
243
- taskLists: "Task lists",
244
- horizontalRules: "Horizontal rules",
245
- alternateHeadings: "Alternate headings",
246
- highlight: "Highlight",
247
- extensions: "Extensions",
248
- indentedCode: "Indented code"
249
- }, we = {
250
- Images: "images",
251
- Tables: "tables",
252
- HTML: "html",
253
- "Reference links": "referenceLinks",
254
- "Task lists": "taskLists",
255
- "Horizontal rules": "horizontalRules",
256
- "Alternate headings": "alternateHeadings",
257
- Highlight: "highlight",
258
- Extensions: "extensions",
259
- "Indented code": "indentedCode"
260
- };
261
- function Q(e, t) {
262
- return e.map((e) => t[we[e]] ?? e).join(", ");
263
- }
264
- //#endregion
265
- //#region src/rich-text/render-model.ts
266
- var $ = /* @__PURE__ */ new Map();
267
- function Te(e) {
268
- let t = $.get(e);
269
- if (t) return t;
270
- let n;
271
- if (G(e).length) n = [{ text: e }];
272
- else {
273
- let t = j({
274
- namespace: "RevoMarkdownRenderer",
275
- nodes: [
276
- F,
277
- I,
278
- z,
279
- R,
280
- V,
281
- U
282
- ],
283
- onError: (e) => {
284
- throw e;
285
- }
286
- }), r = (e) => {
287
- if (E(e)) {
288
- let t = { text: e.getTextContent() };
289
- for (let [n, r] of [
290
- ["code", "code"],
291
- ["strikethrough", "s"],
292
- ["italic", "em"],
293
- ["bold", "strong"]
294
- ]) e.hasFormat(n) && (t = {
295
- tag: r,
296
- children: [t]
297
- });
298
- return t;
299
- }
300
- if (e.getType() === "linebreak") return { tag: "br" };
301
- let t = w(e) ? e.getChildren().map(r) : [{ text: e.getTextContent() }];
302
- if (B(e)) return K(e.getURL()) ? {
303
- tag: "a",
304
- attrs: {
305
- href: e.getURL(),
306
- rel: "noopener noreferrer"
307
- },
308
- children: t
309
- } : {
310
- tag: "span",
311
- children: t
312
- };
313
- if (N(e)) return {
314
- tag: e.getTag(),
315
- children: t
316
- };
317
- if (L(e)) return {
318
- tag: e.getListType() === "number" ? "ol" : "ul",
319
- attrs: e.getListType() === "number" ? { start: e.getStart() } : void 0,
320
- children: t
321
- };
322
- switch (e.getType()) {
323
- case "paragraph": return {
324
- tag: "p",
325
- children: t
326
- };
327
- case "quote": return {
328
- tag: "blockquote",
329
- children: t
330
- };
331
- case "listitem": return {
332
- tag: "li",
333
- children: t
334
- };
335
- case "code": return {
336
- tag: "pre",
337
- children: [{
338
- tag: "code",
339
- children: t
340
- }]
341
- };
342
- default: return {
343
- tag: "span",
344
- children: t
345
- };
346
- }
347
- };
348
- t.update(() => {
349
- g(e, W);
350
- }, { discrete: !0 }), n = t.getEditorState().read(() => S().getChildren().map(r));
351
- }
352
- return e.length <= 5e4 && ($.size >= 100 && $.delete($.keys().next().value), $.set(e, n)), n;
353
- }
354
- //#endregion
355
- //#region src/rich-text/index.tsx
356
- function Ee(e) {
357
- let r = {
358
- ...Z,
359
- ...e.text
360
- }, [i, a] = p(e.value), [o] = p(() => !G(e.value).length && !J(e.value)), [g, _] = p(o ? "visual" : "source"), [v, y] = p(""), [b, x] = p(q), [S, C] = p(""), [w, T] = p(!1), E = f(!1), D = f(null), O = f(), k = f(i);
361
- k.current = i, d(() => {
362
- if (D.current) return O.current = fe(D.current, o ? e.value : "", (e, t) => {
363
- E.current = !0, k.current = e, a(e), y(t ? r.unsafeLink : "");
364
- }, x), () => {
365
- O.current?.destroy(), O.current = void 0;
366
- };
367
- }, []);
368
- let A = () => {
369
- let t = E.current ? k.current : e.value;
370
- return J(t) ? (y(r.unsafeLink), !1) : e.required && !t.trim() ? (y(r.requiredValue), !1) : e.maxLength !== void 0 && t.length > e.maxLength ? (y(r.tooLong), !1) : (e.onApply(t), !0);
371
- };
372
- l(() => !E.current || k.current === e.value || A(), e.autoApply !== !1);
373
- let j = G(i), M = v === r.unsafeLink || !!e.required && !i.trim() || e.maxLength !== void 0 && i.length > e.maxLength;
374
- return /* @__PURE__ */ h("div", {
375
- class: "rv-markdown-editor",
376
- onKeyDown: (e) => {
377
- (e.ctrlKey || e.metaKey) && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), A());
378
- },
379
- children: [
380
- /* @__PURE__ */ m(c, {
381
- value: g,
382
- ariaLabel: r.label,
383
- options: [{
384
- value: "visual",
385
- label: r.visual
386
- }, {
387
- value: "source",
388
- label: r.source
389
- }],
390
- onChange: (e) => {
391
- if (e === "visual") {
392
- if (j.length) {
393
- y(`${r.unsupported} ${Q(j, r)}`);
394
- return;
395
- }
396
- if (J(i)) {
397
- y(r.unsafeLink);
398
- return;
399
- }
400
- O.current?.setMarkdown(i);
401
- }
402
- _(e), y("");
403
- }
404
- }),
405
- g === "visual" && /* @__PURE__ */ m(X, {
406
- engine: () => O.current,
407
- selection: b,
408
- text: r,
409
- showLink: w,
410
- onLink: () => {
411
- O.current?.captureSelection(), T(!w);
412
- }
413
- }),
414
- w && g === "visual" && /* @__PURE__ */ h("div", {
415
- class: "rv-markdown-editor__link",
416
- children: [/* @__PURE__ */ m(t, {
417
- "aria-label": r.linkUrl,
418
- value: S,
419
- onInput: (e) => C(e.currentTarget.value)
420
- }), /* @__PURE__ */ m(s, {
421
- onMouseDown: (e) => e.preventDefault(),
422
- onClick: () => {
423
- O.current?.link(S) ? (T(!1), y("")) : y(r.unsafeLink);
424
- },
425
- children: r.link
426
- })]
427
- }),
428
- /* @__PURE__ */ m("div", {
429
- ref: D,
430
- hidden: g !== "visual",
431
- class: "rv-markdown-editor__visual",
432
- role: "textbox",
433
- "aria-label": r.label,
434
- "aria-multiline": "true",
435
- "aria-invalid": M || void 0,
436
- contentEditable: !0,
437
- onClick: (e) => {
438
- e.target.closest("a") && e.preventDefault();
439
- }
440
- }),
441
- g === "source" && /* @__PURE__ */ m(n, {
442
- class: "rv-markdown-editor__source",
443
- "aria-label": r.source,
444
- "aria-invalid": M || void 0,
445
- value: i,
446
- onInput: (e) => {
447
- E.current = !0, k.current = e.currentTarget.value, a(e.currentTarget.value), y("");
448
- }
449
- }),
450
- j.length > 0 && g === "source" && /* @__PURE__ */ h("p", {
451
- role: "status",
452
- children: [
453
- r.unsupported,
454
- " ",
455
- Q(j, r)
456
- ]
457
- }),
458
- v && /* @__PURE__ */ m("p", {
459
- class: "rv-editor-error",
460
- role: "alert",
461
- children: v
462
- }),
463
- /* @__PURE__ */ m(u, {
464
- showConfirm: e.showActions ?? e.autoApply === !1,
465
- text: e.actions,
466
- disabled: M,
467
- cancel: e.onCancel,
468
- apply: A,
469
- clear: e.required ? void 0 : () => {
470
- E.current = !0, k.current = "", a(""), O.current?.setMarkdown(""), y(""), e.autoApply !== !1 && A();
471
- }
472
- })
473
- ]
474
- });
475
- }
476
- //#endregion
477
- export { G as a, K as i, Te as n, Z as r, Ee as t };
@@ -1,6 +0,0 @@
1
- import { SelectHTMLAttributes } from 'react';
2
- export interface ReactNativeSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
3
- onValueChange?: (value: string) => void;
4
- }
5
- /** Keep React option children directly inside their native select element. */
6
- export declare const NativeSelect: import('react').ForwardRefExoticComponent<ReactNativeSelectProps & import('react').RefAttributes<HTMLSelectElement>>;
@@ -1,2 +0,0 @@
1
- /** Keep import, export and keyboard shortcuts on the same deliberately small subset. */
2
- export declare const MARKDOWN_TRANSFORMERS: import('@lexical/markdown').Transformer[];
@@ -1,9 +0,0 @@
1
- import { NativeSelect as PreactNativeSelect } from './controls';
2
- import { VueUiComponent } from './vue-adapter';
3
- /** Options must remain native Vue children of select, without a slot host span. */
4
- export declare const NativeSelect: VueUiComponent<typeof PreactNativeSelect, {
5
- model: {
6
- prop: 'value';
7
- callback: 'onValueChange';
8
- };
9
- }>;