@revolist/ui 4.0.2-rc → 4.0.4-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 (161) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +345 -263
  3. package/_chunks/{calendar-CpaUK7w1.js → calendar-xpZ0v3xf.js} +39 -29
  4. package/_chunks/{chart-frame-BC99KjGa.js → chart-frame-Cmc7xU1i.js} +16 -13
  5. package/_chunks/{choice-chips-Cs4D-3nH.js → choice-chips-CHQTUdLs.js} +10 -10
  6. package/_chunks/clock-BOhPNlW3.js +4 -0
  7. package/_chunks/{color-palette-BBMFmUNA.js → color-palette-D8vyPfld.js} +1 -1
  8. package/_chunks/{color-picker-D90Jg-M8.js → color-picker-CudqPYZo.js} +10 -10
  9. package/_chunks/{component-YDcfoOLz.js → component-C_T2VN5u.js} +182 -178
  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-ztgmsG7H.js → control-tooltip-uscKfAnV.js} +15 -15
  13. package/_chunks/{controls-DIum-E66.js → controls-DsNi8V8I.js} +144 -129
  14. package/_chunks/{date-control-BJSzu79z.js → date-control-DrVFX13g.js} +1 -1
  15. package/_chunks/{date-time-BxPJusp9.js → date-time-qIhp5vaX.js} +143 -145
  16. package/_chunks/{delete-button-Bblyah10.js → delete-button-CW9vjLnk.js} +6 -6
  17. package/_chunks/{dialog.parts-DBqo3Qwb.js → dialog.parts-CKGkC5zP.js} +20 -20
  18. package/_chunks/{duration-87U2EoMS.js → duration-CL68Em0o.js} +16 -15
  19. package/_chunks/{editor-popup-D3JdS8l3.js → editor-popup-WDdtVDNA.js} +5 -5
  20. package/_chunks/field-context-D57PnBbH.js +5 -0
  21. package/_chunks/{framework-mount-C-Zwm44H.js → framework-mount--RTLIqE-.js} +1 -1
  22. package/_chunks/history-controls-B3u3INEK.js +27 -0
  23. package/_chunks/mount-DQ1cpppK.js +257 -0
  24. package/_chunks/native-control-C_yok8_-.js +605 -0
  25. package/_chunks/{number-input-BeIadZuL.js → number-input-BKwA5FnM.js} +2 -2
  26. package/_chunks/{picker-DpP7iQLA.js → picker-h1P5RUgp.js} +2 -2
  27. package/_chunks/popup-CT2uD3go.js +367 -0
  28. package/_chunks/{rating-choice-Ca8ZBty3.js → rating-choice-DZgmaic0.js} +1 -1
  29. package/_chunks/render-m5eMMwFR.js +83 -0
  30. package/_chunks/{reorder-list-Cc3KmfAN.js → reorder-list-CSlqAGHw.js} +1 -1
  31. package/_chunks/request-trail-DSlFix6i.js +618 -0
  32. package/_chunks/rich-text-CH7gIqOS.js +636 -0
  33. package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
  34. package/_form.scss +1 -1
  35. package/ai/_chat.scss +195 -0
  36. package/ai/_style.scss +105 -34
  37. package/ai/chat.d.ts +63 -0
  38. package/ai/components.d.ts +19 -3
  39. package/ai/index.d.ts +2 -0
  40. package/ai/index.js +3 -3
  41. package/ai/mount.d.ts +30 -1
  42. package/ai/prompt-history.d.ts +13 -0
  43. package/ai/transcript.d.ts +25 -0
  44. package/ai/translations.d.ts +1 -1
  45. package/angular/angular.js +0 -3
  46. package/assignee/index.js +34 -35
  47. package/buttons/delete-button.d.ts +2 -1
  48. package/buttons/delete-button.js +1 -1
  49. package/buttons/remove-button.js +1 -1
  50. package/buttons/svg-button.d.ts +1 -0
  51. package/buttons/svg-button.js +5 -5
  52. package/calendar/_calendar.scss +7 -2
  53. package/calendar/calendar.js +1 -1
  54. package/calendar/index.js +2 -2
  55. package/choice-chips/index.js +1 -1
  56. package/color-palette/color-palette.js +1 -1
  57. package/color-palette/color-picker.js +2 -2
  58. package/component-catalog.d.ts +16 -5
  59. package/control-attributes.js +7 -7
  60. package/controls.d.ts +8 -6
  61. package/controls.js +3 -3
  62. package/core/editor-popup.js +1 -1
  63. package/date-time/index.js +1 -1
  64. package/date-time/style.scss +4 -4
  65. package/dialog/dialog.dom.js +8 -8
  66. package/dialog/dialog.parts.js +1 -1
  67. package/distribution-chart/area-chart.js +1 -1
  68. package/distribution-chart/bar-chart.d.ts +5 -2
  69. package/distribution-chart/bar-chart.js +7 -3
  70. package/distribution-chart/chart-frame.d.ts +2 -1
  71. package/distribution-chart/line-chart.js +1 -1
  72. package/dropdown/content.d.ts +2 -1
  73. package/dropdown/content.js +1 -142
  74. package/dropdown/control.d.ts +14 -0
  75. package/dropdown/control.js +1 -0
  76. package/dropdown/control.view.d.ts +6 -0
  77. package/dropdown/dropdown.types.d.ts +4 -0
  78. package/dropdown/editor-dropdown.style.scss +37 -9
  79. package/dropdown/index.d.ts +1 -1
  80. package/dropdown/index.js +3 -4
  81. package/dropdown/lookup-field.js +1 -1
  82. package/dropdown/popup.js +1 -141
  83. package/duration/index.js +1 -1
  84. package/duration/style.scss +1 -1
  85. package/editor-actions.js +1 -1
  86. package/field-configurator.js +6 -6
  87. package/fieldset.d.ts +3 -0
  88. package/filter/filters/slider/single.js +1 -1
  89. package/filter-badge.js +1 -1
  90. package/filter-controls.js +7 -7
  91. package/form-controls/field-context.d.ts +5 -0
  92. package/form-controls/index.js +7 -12
  93. package/form-controls/index.view.d.ts +2 -4
  94. package/form-controls/presentation.js +51 -43
  95. package/formatting/index.js +25 -21
  96. package/framework.js +215 -207
  97. package/history-controls.d.ts +14 -0
  98. package/history-controls.js +1 -0
  99. package/masked-input/index.js +1 -1
  100. package/native-control.d.ts +6 -4
  101. package/native-control.js +3 -26
  102. package/native-styles.css +1 -1
  103. package/native.js +31 -30
  104. package/number-input/index.js +1 -1
  105. package/package.json +53 -14
  106. package/pagination.d.ts +3 -0
  107. package/pagination.js +43 -33
  108. package/pdf-viewer/index.js +1 -1
  109. package/pdf-viewer/style.scss +3 -4
  110. package/preact.d.ts +2 -0
  111. package/preact.js +62 -62
  112. package/rating-choice.js +1 -1
  113. package/react-control.d.ts +0 -1
  114. package/react-control.js +2 -2
  115. package/react.d.ts +13 -3
  116. package/react.js +71 -88
  117. package/reorder-list.js +1 -1
  118. package/resource-picker/resource-picker-popup.js +1 -1
  119. package/resource-picker/resource-picker.js +4 -4
  120. package/resource-picker/resource-picker.scss +6 -3
  121. package/rich-text/engine.d.ts +16 -19
  122. package/rich-text/index.d.ts +7 -7
  123. package/rich-text/index.js +1 -1
  124. package/rich-text/model.d.ts +4 -3
  125. package/rich-text/render-model.d.ts +4 -5
  126. package/rich-text/style.scss +3 -12
  127. package/rich-text/toolbar.d.ts +6 -6
  128. package/rich-text/translations.d.ts +3 -15
  129. package/select.d.ts +20 -0
  130. package/select.js +1 -0
  131. package/status-feedback/exit-snapshot.js +4 -4
  132. package/status-feedback/index.js +2 -2
  133. package/status-feedback/popover.js +10 -10
  134. package/status-feedback/render.js +3 -44
  135. package/status-feedback/status-feedback.scss +7 -0
  136. package/status-feedback/types.d.ts +4 -0
  137. package/status-feedback/use-auto-dismiss.d.ts +3 -0
  138. package/styles/_compositions.scss +3 -1
  139. package/styles/_control.scss +12 -4
  140. package/styles/_primitives.scss +9 -8
  141. package/styles.css +1 -1
  142. package/surfaces.js +45 -45
  143. package/svelte/UiComponent.server.js +1 -48
  144. package/svelte/UiComponent.svelte +0 -21
  145. package/svelte.js +33 -68
  146. package/time-grid.js +1 -1
  147. package/timeline-track/component.d.ts +5 -1
  148. package/timeline-track/index.js +71 -54
  149. package/timeline-track/model.d.ts +9 -0
  150. package/timeline-track/model.js +10 -1
  151. package/ui.css +1 -1
  152. package/vue.d.ts +24 -5
  153. package/vue.js +140 -164
  154. package/_chunks/compat.module-DDB2pm9O.js +0 -229
  155. package/_chunks/dropdown-voWqmwAe.js +0 -357
  156. package/_chunks/mount-DZe_6VtR.js +0 -90
  157. package/_chunks/request-trail-IdNiFvKH.js +0 -347
  158. package/_chunks/rich-text-BzI1DyfF.js +0 -477
  159. package/react-native-select.d.ts +0 -6
  160. package/rich-text/syntax.d.ts +0 -2
  161. package/vue-native-select.d.ts +0 -9
@@ -1,477 +0,0 @@
1
- import { c as e, i as t, t as n } from "./hooks.module-CG3gN83z.js";
2
- import { t as r } from "./jsxRuntime.module-F6UFnpT-.js";
3
- import { SvgIcon as i } from "../icons/icon.js";
4
- import { Input as a, TextArea as o } from "../native-control.js";
5
- import { F as s, I as c, L as l, R as u, n as d } from "./controls-DIum-E66.js";
6
- import { SegmentedSwitch as f } from "../segmented-switch/index.js";
7
- import { n as ee } from "./editor-commit-Bq3wSgvr.js";
8
- import { EditorActions as te } from "../editor-actions.js";
9
- import { $convertFromMarkdownString as p, $convertToMarkdownString as m, HIGHLIGHT as h, TRANSFORMERS as g, registerMarkdownShortcuts as _ } from "@lexical/markdown";
10
- import { $createParagraphNode as v, $getRoot as y, $getSelection as b, $isElementNode as x, $isRangeSelection as S, $isTextNode as C, $setSelection as w, COMMAND_PRIORITY_HIGH as T, FORMAT_TEXT_COMMAND as E, PASTE_COMMAND as D, createEditor as O } from "lexical";
11
- import { $createHeadingNode as k, $createQuoteNode as ne, $isHeadingNode as A, $isQuoteNode as j, HeadingNode as M, QuoteNode as N, registerRichText as re } from "@lexical/rich-text";
12
- import { $isListNode as P, INSERT_ORDERED_LIST_COMMAND as ie, INSERT_UNORDERED_LIST_COMMAND as ae, ListItemNode as F, ListNode as I, REMOVE_LIST_COMMAND as L, registerList as oe } from "@lexical/list";
13
- import { $isLinkNode as R, $toggleLink as se, LinkNode as z } from "@lexical/link";
14
- import { $createCodeNode as ce, $isCodeNode as B, CodeNode as V } from "@lexical/code";
15
- import { $setBlocksType as le } from "@lexical/selection";
16
- import { createEmptyHistoryState as H, registerHistory as U } from "@lexical/history";
17
- //#region src/rich-text/syntax.ts
18
- var W = g.filter((e) => e !== h);
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 J() {
45
- let e = b();
46
- if (!S(e)) return q;
47
- let t = e.anchor.getNode(), n = [t, ...t.getParents()], r = n.find((e) => A(e) || j(e) || B(e) || P(e));
48
- return {
49
- formats: [
50
- "bold",
51
- "italic",
52
- "strikethrough",
53
- "code"
54
- ].filter((t) => e.hasFormat(t)),
55
- block: A(r) ? r.getTag() : P(r) ? r.getListType() === "number" ? "ordered" : "bullet" : j(r) ? "quote" : B(r) ? "code" : "paragraph",
56
- link: n.some(R)
57
- };
58
- }
59
- function ue(e, t, n, r = () => {}) {
60
- let i = O({
61
- namespace: "RevoMarkdown",
62
- nodes: [
63
- M,
64
- N,
65
- I,
66
- F,
67
- z,
68
- V
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(E, (e) => ![
83
- "bold",
84
- "italic",
85
- "strikethrough",
86
- "code"
87
- ].includes(e), T),
88
- re(i),
89
- oe(i),
90
- U(i, H(), 300),
91
- _(i, W)
92
- ];
93
- a.push(i.registerCommand(D, (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 = b();
98
- return S(n) && n.insertRawText(t), !0;
99
- }, T));
100
- let o = null, s = (e) => i.update(() => {
101
- p(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(J())), !(a.has("markdown-source") || !t.size && !i.size) && e.read(() => {
108
- let e = y().getAllTextNodes().some((e) => {
109
- let t = e.getParent();
110
- return R(t) && !K(t.getURL());
111
- });
112
- n(m(W), e);
113
- });
114
- })), {
115
- editor: i,
116
- setMarkdown: s,
117
- format: (e) => {
118
- i.dispatchCommand(E, e), i.focus();
119
- },
120
- block: (e) => {
121
- e === "paragraph" && i.dispatchCommand(L, void 0), e === "bullet" || e === "ordered" ? i.dispatchCommand(e === "bullet" ? ae : ie, void 0) : i.update(() => le(b(), () => e === "paragraph" ? v() : e === "code" ? ce() : e === "quote" ? ne() : k(e))), i.focus();
122
- },
123
- captureSelection: () => i.getEditorState().read(() => {
124
- o = b()?.clone() ?? null;
125
- }),
126
- link: (e) => K(e) ? (i.update(() => {
127
- o && w(o.clone()), se(e, { rel: "noopener noreferrer" });
128
- }), i.focus(), !0) : !1,
129
- destroy: () => {
130
- a.forEach((e) => e()), i.setRootElement(null);
131
- }
132
- };
133
- }
134
- function Y(e) {
135
- let t = O({
136
- namespace: "RevoMarkdownValidation",
137
- nodes: [
138
- M,
139
- N,
140
- I,
141
- F,
142
- z,
143
- V
144
- ],
145
- onError: (e) => {
146
- throw e;
147
- }
148
- }), n = !1;
149
- return t.update(() => {
150
- p(e, W), n = y().getAllTextNodes().some((e) => {
151
- let t = e.getParent();
152
- return R(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 de = "<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>", fe = "<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>", pe = "<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>", me = "<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>", X = "<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>", he = "<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>", ge = "<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>", _e = "<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>", ve = "<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>", ye = "<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>", be = "<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>", xe = "<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 Se({ engine: e, selection: t, text: n, showLink: a, onLink: o }) {
162
- let d = (e, t, n, a, o) => /* @__PURE__ */ r(s, {
163
- size: "compact",
164
- className: "rv-markdown-editor__command",
165
- "aria-label": e,
166
- title: e,
167
- pressed: n,
168
- onMouseDown: (e) => e.preventDefault(),
169
- onPressedChange: a,
170
- children: [/* @__PURE__ */ r(i, { svg: t }), o && /* @__PURE__ */ r(i, {
171
- svg: o,
172
- className: "rv-svg-icon rv-markdown-editor__level"
173
- })]
174
- }), f = (n, r, i, a) => d(n, r, t.block === i, () => e()?.block(t.block === i ? "paragraph" : i), a);
175
- return /* @__PURE__ */ r(c, {
176
- className: "rv-markdown-editor__toolbar",
177
- label: n.formatting,
178
- children: [
179
- /* @__PURE__ */ r(l, {
180
- label: n.inlineFormatting,
181
- children: [
182
- d(n.bold, de, t.formats.includes("bold"), () => e()?.format("bold")),
183
- d(n.italic, fe, t.formats.includes("italic"), () => e()?.format("italic")),
184
- d(n.strike, pe, t.formats.includes("strikethrough"), () => e()?.format("strikethrough")),
185
- d(n.code, me, t.formats.includes("code"), () => e()?.format("code"))
186
- ]
187
- }),
188
- /* @__PURE__ */ r(u, {}),
189
- /* @__PURE__ */ r(l, {
190
- label: n.headings,
191
- children: [f(n.heading1, X, "h1", he), f(n.heading2, X, "h2", ge)]
192
- }),
193
- /* @__PURE__ */ r(u, {}),
194
- /* @__PURE__ */ r(l, {
195
- label: n.structure,
196
- children: [
197
- f(n.bullets, _e, "bullet"),
198
- f(n.numberedList, ve, "ordered"),
199
- f(n.quote, ye, "quote"),
200
- f(n.codeBlock, be, "code")
201
- ]
202
- }),
203
- /* @__PURE__ */ r(u, {}),
204
- /* @__PURE__ */ r(l, {
205
- label: n.links,
206
- children: d(n.link, xe, a || t.link, o)
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
- }, Ce = {
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[Ce[e]] ?? e).join(", ");
263
- }
264
- //#endregion
265
- //#region src/rich-text/render-model.ts
266
- var $ = /* @__PURE__ */ new Map();
267
- function we(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 = O({
274
- namespace: "RevoMarkdownRenderer",
275
- nodes: [
276
- M,
277
- N,
278
- I,
279
- F,
280
- z,
281
- V
282
- ],
283
- onError: (e) => {
284
- throw e;
285
- }
286
- }), r = (e) => {
287
- if (C(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 = x(e) ? e.getChildren().map(r) : [{ text: e.getTextContent() }];
302
- if (R(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 (A(e)) return {
314
- tag: e.getTag(),
315
- children: t
316
- };
317
- if (P(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
- p(e, W);
350
- }, { discrete: !0 }), n = t.getEditorState().read(() => y().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 Te(i) {
357
- let s = {
358
- ...Z,
359
- ...i.text
360
- }, [c, l] = t(i.value), [u] = t(() => !G(i.value).length && !Y(i.value)), [p, m] = t(u ? "visual" : "source"), [h, g] = t(""), [_, v] = t(q), [y, b] = t(""), [x, S] = t(!1), C = n(!1), w = n(null), T = n(), E = n(c);
361
- E.current = c, e(() => {
362
- if (w.current) return T.current = ue(w.current, u ? i.value : "", (e, t) => {
363
- C.current = !0, E.current = e, l(e), g(t ? s.unsafeLink : "");
364
- }, v), () => {
365
- T.current?.destroy(), T.current = void 0;
366
- };
367
- }, []);
368
- let D = () => {
369
- let e = C.current ? E.current : i.value;
370
- return Y(e) ? (g(s.unsafeLink), !1) : i.required && !e.trim() ? (g(s.requiredValue), !1) : i.maxLength !== void 0 && e.length > i.maxLength ? (g(s.tooLong), !1) : (i.onApply(e), !0);
371
- };
372
- ee(() => !C.current || E.current === i.value || D(), i.autoApply !== !1);
373
- let O = G(c), k = h === s.unsafeLink || !!i.required && !c.trim() || i.maxLength !== void 0 && c.length > i.maxLength;
374
- return /* @__PURE__ */ r("div", {
375
- class: "rv-markdown-editor",
376
- onKeyDown: (e) => {
377
- (e.ctrlKey || e.metaKey) && e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), D());
378
- },
379
- children: [
380
- /* @__PURE__ */ r(f, {
381
- value: p,
382
- ariaLabel: s.label,
383
- options: [{
384
- value: "visual",
385
- label: s.visual
386
- }, {
387
- value: "source",
388
- label: s.source
389
- }],
390
- onChange: (e) => {
391
- if (e === "visual") {
392
- if (O.length) {
393
- g(`${s.unsupported} ${Q(O, s)}`);
394
- return;
395
- }
396
- if (Y(c)) {
397
- g(s.unsafeLink);
398
- return;
399
- }
400
- T.current?.setMarkdown(c);
401
- }
402
- m(e), g("");
403
- }
404
- }),
405
- p === "visual" && /* @__PURE__ */ r(Se, {
406
- engine: () => T.current,
407
- selection: _,
408
- text: s,
409
- showLink: x,
410
- onLink: () => {
411
- T.current?.captureSelection(), S(!x);
412
- }
413
- }),
414
- x && p === "visual" && /* @__PURE__ */ r("div", {
415
- class: "rv-markdown-editor__link",
416
- children: [/* @__PURE__ */ r(a, {
417
- "aria-label": s.linkUrl,
418
- value: y,
419
- onInput: (e) => b(e.currentTarget.value)
420
- }), /* @__PURE__ */ r(d, {
421
- onMouseDown: (e) => e.preventDefault(),
422
- onClick: () => {
423
- T.current?.link(y) ? (S(!1), g("")) : g(s.unsafeLink);
424
- },
425
- children: s.link
426
- })]
427
- }),
428
- /* @__PURE__ */ r("div", {
429
- ref: w,
430
- hidden: p !== "visual",
431
- class: "rv-markdown-editor__visual",
432
- role: "textbox",
433
- "aria-label": s.label,
434
- "aria-multiline": "true",
435
- "aria-invalid": k || void 0,
436
- contentEditable: !0,
437
- onClick: (e) => {
438
- e.target.closest("a") && e.preventDefault();
439
- }
440
- }),
441
- p === "source" && /* @__PURE__ */ r(o, {
442
- class: "rv-markdown-editor__source",
443
- "aria-label": s.source,
444
- "aria-invalid": k || void 0,
445
- value: c,
446
- onInput: (e) => {
447
- C.current = !0, E.current = e.currentTarget.value, l(e.currentTarget.value), g("");
448
- }
449
- }),
450
- O.length > 0 && p === "source" && /* @__PURE__ */ r("p", {
451
- role: "status",
452
- children: [
453
- s.unsupported,
454
- " ",
455
- Q(O, s)
456
- ]
457
- }),
458
- h && /* @__PURE__ */ r("p", {
459
- class: "rv-editor-error",
460
- role: "alert",
461
- children: h
462
- }),
463
- /* @__PURE__ */ r(te, {
464
- showConfirm: i.showActions ?? i.autoApply === !1,
465
- text: i.actions,
466
- disabled: k,
467
- cancel: i.onCancel,
468
- apply: D,
469
- clear: i.required ? void 0 : () => {
470
- C.current = !0, E.current = "", l(""), T.current?.setMarkdown(""), g(""), i.autoApply !== !1 && D();
471
- }
472
- })
473
- ]
474
- });
475
- }
476
- //#endregion
477
- export { G as a, K as i, we as n, Z as r, Te 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
- }>;