@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
@@ -0,0 +1,618 @@
1
+ import { i as e, n as t, s as n } from "./preact.module-BBM36DnO.js";
2
+ import { c as r, i, r as a, s as o, t as s } from "./hooks.module-CG3gN83z.js";
3
+ import { t as c } from "./jsxRuntime.module-F6UFnpT-.js";
4
+ import { SvgIcon as l } from "../icons/icon.js";
5
+ import { l as u } from "./native-control-C_yok8_-.js";
6
+ import { RemoveButton as d } from "../buttons/remove-button.js";
7
+ import { t as f } from "./chevron-down-GbplLa6s.js";
8
+ import { D as p, M as m, l as h, m as g, n as _, o as v } from "./controls-DsNi8V8I.js";
9
+ import { createControlId as y } from "../core/control-id.js";
10
+ import { PopoverController as b } from "../surfaces.js";
11
+ import { t as x } from "./clock-BOhPNlW3.js";
12
+ //#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/circle-check.svg?raw
13
+ var S = "<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=\"M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zM374 145.7c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8L379.3 179.2c7.8-10.7 5.4-25.7-5.3-33.5z\"/></svg>", C = "<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=\"M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9z\"/></svg>", w = "<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=\"M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z\"/></svg>", T = /* @__PURE__ */ "AI chat,Clear chat,Conversation messages,Jump to latest,You,Assistant,System,Message actions,Start a conversation,Ask a question to get started.,Message,Type a message…,Working…,Reasoning summary,Pending,Running,Completed,Failed,Cancelled,{seconds}s,Data history,Review changes,Apply changes,Cancel changes,Undo data change,Redo data change,Ask AI to change this view,Filter or sort your data…,Send,Stop,Enter to send · Shift+Enter for a new line,Suggested requests,More,Activity,Collapse activity,Expand activity,AI view assistant,View steps,Clear all,Restore the starting view,Restore previous view,Reset view,The view changed manually. Start a new request to continue.,Remove request: {label},{count} step,{count} steps,{count} applied request,{count} applied requests,{count} matching rows".split(",");
14
+ function E(e, t = {}, n = {}) {
15
+ return (t[e] ?? e).replace(/\{(\w+)\}/g, (e, t) => Object.hasOwn(n, t) ? String(n[t]) : e);
16
+ }
17
+ //#endregion
18
+ //#region src/ai/translation-context.tsx
19
+ var D = n({});
20
+ function O({ translations: e, children: t }) {
21
+ return /* @__PURE__ */ c(D.Provider, {
22
+ value: e,
23
+ children: t
24
+ });
25
+ }
26
+ function k(e) {
27
+ let t = o(D), n = e ?? t;
28
+ return (e, t) => E(e, n, t);
29
+ }
30
+ //#endregion
31
+ //#region src/ai/prompt-history.ts
32
+ function A(e) {
33
+ if (!Array.isArray(e)) return [];
34
+ let t = e.slice(-20).filter((e) => typeof e == "string" && !!e.trim() && e.length <= 4e3).map((e) => e.trim()).filter((e, t, n) => !t || e !== n[t - 1]), n = [];
35
+ for (let e = t.length - 1; e >= 0; e--) new TextEncoder().encode(JSON.stringify([t[e], ...n])).byteLength <= 8192 && n.unshift(t[e]);
36
+ return n;
37
+ }
38
+ var j = class {
39
+ state;
40
+ reset() {
41
+ this.state = void 0;
42
+ }
43
+ move(e, t, n) {
44
+ let r = JSON.stringify(n);
45
+ if (this.state && (this.state.selected !== e || this.state.key !== r) && this.reset(), !n.length || !this.state && t === "down") return;
46
+ this.state ||= {
47
+ index: n.length,
48
+ draft: e,
49
+ selected: e,
50
+ key: r
51
+ };
52
+ let i = this.state.index + (t === "up" ? -1 : 1);
53
+ if (i >= n.length) {
54
+ let e = this.state.draft;
55
+ return this.reset(), e;
56
+ }
57
+ return this.state.index = Math.max(0, i), this.state.selected = n[this.state.index], this.state.selected;
58
+ }
59
+ }, M = "<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=\"M214.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 109.3 160 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-370.7 105.4 105.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z\"/></svg>", N = "<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=\"M64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32z\"/></svg>";
60
+ //#endregion
61
+ //#region src/ai/components.tsx
62
+ function P({ translations: e, value: t, onValueChange: n, onSubmit: r, onStop: i, busy: o = !1, disabled: l = !1, label: u = "Ask AI to change this view", placeholder: d = "Filter or sort your data…", submitLabel: f = "Send", stopLabel: p = "Stop", promptHistory: h, hint: _ = "", actions: v, footer: b, textareaProps: x }) {
63
+ let S = k(e), C = s(y("ai-prompt")), w = s(!1), T = s(new j()), E = s();
64
+ a(() => {
65
+ if (!E.current) return;
66
+ let { element: e, position: t } = E.current;
67
+ e.setSelectionRange(t, t), E.current = void 0;
68
+ });
69
+ let D = `${C.current}-hint`, O = !!_ && !t.length, P = o && !!i, F = () => {
70
+ !l && !o && t.trim() && r(t.trim());
71
+ };
72
+ return /* @__PURE__ */ c("form", {
73
+ class: "rv-ai-prompt",
74
+ "aria-busy": o || void 0,
75
+ onSubmit: (e) => {
76
+ e.preventDefault(), F();
77
+ },
78
+ children: [/* @__PURE__ */ c("label", {
79
+ for: C.current,
80
+ class: "rv-ai-prompt-label rv-visually-hidden",
81
+ children: S(u)
82
+ }), /* @__PURE__ */ c("div", {
83
+ class: "rv-ai-prompt-composer",
84
+ children: [
85
+ /* @__PURE__ */ c(m, {
86
+ rows: 1,
87
+ ...x,
88
+ id: C.current,
89
+ "aria-describedby": O ? D : void 0,
90
+ value: t,
91
+ onValueChange: (e) => {
92
+ T.current.reset(), E.current = void 0, n(e);
93
+ },
94
+ placeholder: S(d),
95
+ disabled: l || o,
96
+ maxLength: 4e3,
97
+ onCompositionStart: () => {
98
+ w.current = !0;
99
+ },
100
+ onCompositionEnd: () => {
101
+ w.current = !1;
102
+ },
103
+ onKeyDown: (e) => {
104
+ let r = e.currentTarget;
105
+ if (h && !o && !l && !w.current && !e.isComposing && e.keyCode !== 229 && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey && r.selectionStart === r.selectionEnd && (e.key === "ArrowUp" && !t.slice(0, r.selectionStart).includes("\n") || e.key === "ArrowDown" && !t.slice(r.selectionEnd).includes("\n"))) {
106
+ let i = T.current.move(t, e.key === "ArrowUp" ? "up" : "down", A(h));
107
+ if (i !== void 0) {
108
+ if (e.preventDefault(), i === t) return;
109
+ E.current = {
110
+ element: r,
111
+ position: i.length
112
+ }, n(i);
113
+ return;
114
+ }
115
+ }
116
+ e.key === "Enter" && !e.shiftKey && !e.isComposing && !w.current && e.keyCode !== 229 && (e.preventDefault(), F());
117
+ }
118
+ }),
119
+ b && /* @__PURE__ */ c("div", {
120
+ class: "rv-ai-prompt-footer",
121
+ children: b
122
+ }),
123
+ /* @__PURE__ */ c("div", {
124
+ class: "rv-ai-prompt-toolbar",
125
+ children: [/* @__PURE__ */ c("div", {
126
+ class: "rv-ai-prompt-tools",
127
+ children: [v, O && /* @__PURE__ */ c("span", {
128
+ id: D,
129
+ class: "rv-ai-prompt-hint",
130
+ children: S(_)
131
+ })]
132
+ }), /* @__PURE__ */ c(g, {
133
+ className: "rv-ai-prompt-submit",
134
+ type: P ? "button" : "submit",
135
+ label: S(P ? p : f),
136
+ icon: P ? N : M,
137
+ onClick: P ? (e) => {
138
+ e.preventDefault(), i?.();
139
+ } : void 0,
140
+ disabled: l || !P && !t.trim(),
141
+ busy: o && !P,
142
+ variant: "solid",
143
+ size: "compact"
144
+ })]
145
+ })
146
+ ]
147
+ })]
148
+ });
149
+ }
150
+ function F({ translations: e, items: t, onSelect: n, disabled: r, label: i = "Suggested requests" }) {
151
+ let a = k(e);
152
+ if (!t.length) return null;
153
+ let o = t.map((e) => typeof e == "string" ? {
154
+ label: e,
155
+ prompt: e
156
+ } : e);
157
+ return /* @__PURE__ */ c("div", {
158
+ class: "rv-ai-suggestions",
159
+ role: "group",
160
+ "aria-label": a(i),
161
+ children: [o.slice(0, 3).map((e, t) => /* @__PURE__ */ c(_, {
162
+ className: "rv-ai-suggestion",
163
+ size: "compact",
164
+ disabled: r,
165
+ onClick: () => n(e.prompt),
166
+ children: e.label
167
+ }, `${t}:${e.prompt}`)), o.length > 3 && /* @__PURE__ */ c(u, {
168
+ className: "rv-ai-examples",
169
+ source: o.slice(3).map((e) => ({
170
+ value: e.prompt,
171
+ label: e.label
172
+ })),
173
+ disabled: r,
174
+ placeholder: a("More"),
175
+ renderSelectedValue: () => /* @__PURE__ */ c(l, {
176
+ svg: "<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 256a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm168 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm224-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z\"/></svg>",
177
+ size: 14
178
+ }),
179
+ config: { ariaLabel: a("More") },
180
+ onChange: (e) => {
181
+ typeof e == "string" && n(e);
182
+ }
183
+ })]
184
+ });
185
+ }
186
+ function I({ translations: e, phase: t, message: n }) {
187
+ let r = k(e);
188
+ return /* @__PURE__ */ c("div", {
189
+ class: "rv-ai-status",
190
+ "data-state": t,
191
+ role: "status",
192
+ "aria-live": "polite",
193
+ "aria-atomic": "true",
194
+ children: [(t === "understanding" || t === "applying") && /* @__PURE__ */ c("span", {
195
+ "aria-hidden": "true",
196
+ children: /* @__PURE__ */ c(p, { label: "" })
197
+ }), /* @__PURE__ */ c("span", { children: r(n) })]
198
+ });
199
+ }
200
+ function L({ translations: e, summary: t, matchedRows: n, countLabel: r, actions: i, children: a }) {
201
+ let o = k(e);
202
+ return /* @__PURE__ */ c("div", {
203
+ class: "rv-ai-result",
204
+ role: "status",
205
+ "aria-live": "polite",
206
+ children: [
207
+ /* @__PURE__ */ c("p", {
208
+ class: "rv-ai-result-summary",
209
+ children: t
210
+ }),
211
+ n !== void 0 && /* @__PURE__ */ c("p", {
212
+ class: "rv-ai-result-count",
213
+ children: r ? r(n) : o("{count} matching rows", { count: n.toLocaleString() })
214
+ }),
215
+ a,
216
+ i && /* @__PURE__ */ c("div", {
217
+ class: "rv-ai-result-actions",
218
+ children: i
219
+ })
220
+ ]
221
+ });
222
+ }
223
+ function R({ translations: e = {}, label: t = "AI view assistant", children: n, footer: r, busy: i }) {
224
+ return /* @__PURE__ */ c(O, {
225
+ translations: e,
226
+ children: /* @__PURE__ */ c("section", {
227
+ class: "rv-ai-assistant",
228
+ "aria-label": ((t) => E(t, e))(t),
229
+ "aria-busy": i || void 0,
230
+ onKeyDown: (e) => e.stopPropagation(),
231
+ onKeyUp: (e) => e.stopPropagation(),
232
+ children: [n, r && /* @__PURE__ */ c("div", {
233
+ class: "rv-ai-assistant-footer",
234
+ children: r
235
+ })]
236
+ })
237
+ });
238
+ }
239
+ function z({ translations: t, summary: n, details: i, disabled: a, onApply: o, onCancel: l }) {
240
+ let u = k(t), d = s(null);
241
+ return r(() => {
242
+ d.current?.focus();
243
+ }, []), /* @__PURE__ */ c("section", {
244
+ class: "rv-ai-change-preview",
245
+ "aria-label": u("Review changes"),
246
+ onKeyDown: (e) => {
247
+ e.key === "Escape" && !a && (e.preventDefault(), l());
248
+ },
249
+ children: /* @__PURE__ */ c(L, {
250
+ summary: n,
251
+ actions: /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ c(_, {
252
+ ref: d,
253
+ disabled: a,
254
+ onClick: o,
255
+ children: u("Apply changes")
256
+ }), /* @__PURE__ */ c(_, {
257
+ disabled: a,
258
+ variant: "ghost",
259
+ onClick: l,
260
+ children: u("Cancel changes")
261
+ })] }),
262
+ children: i && /* @__PURE__ */ c("pre", {
263
+ class: "rv-ai-result-details",
264
+ children: i
265
+ })
266
+ })
267
+ });
268
+ }
269
+ //#endregion
270
+ //#region src/ai/chat.tsx
271
+ function B({ children: e, className: t = "", label: n = "AI chat", style: r, translations: i }) {
272
+ let a = k(i);
273
+ return /* @__PURE__ */ c("section", {
274
+ class: `rv-ai-chat ${t}`,
275
+ "aria-label": a(n),
276
+ style: r,
277
+ children: e
278
+ });
279
+ }
280
+ function V({ children: e, className: t = "", autoScroll: n = !0, busy: o = !1, label: l = "Conversation messages", jumpLabel: u = "Jump to latest", translations: d }) {
281
+ let f = k(d), p = s(null), m = s(null), h = s(n), [g, v] = i(!1), y = () => {
282
+ let e = p.current;
283
+ if (!e) return;
284
+ let t = e.scrollHeight - e.clientHeight - e.scrollTop <= 40;
285
+ h.current = t, v(!t);
286
+ }, b = () => {
287
+ let e = p.current;
288
+ e && (e.scrollTop = e.scrollHeight, h.current = !0, v(!1));
289
+ }, x = () => {
290
+ if (n && h.current) b();
291
+ else {
292
+ let e = p.current;
293
+ e && v(e.scrollHeight - e.clientHeight - e.scrollTop > 40);
294
+ }
295
+ };
296
+ return a(x, [e, n]), r(() => {
297
+ if (typeof ResizeObserver > "u") return;
298
+ let e = new ResizeObserver(x);
299
+ return p.current && e.observe(p.current), m.current && e.observe(m.current), () => e.disconnect();
300
+ }, [n]), /* @__PURE__ */ c("div", {
301
+ class: `rv-ai-chat-scroll ${t}`,
302
+ children: [/* @__PURE__ */ c("div", {
303
+ ref: p,
304
+ class: "rv-ai-chat-viewport",
305
+ role: "log",
306
+ "aria-label": f(l),
307
+ "aria-live": "polite",
308
+ "aria-relevant": "additions text",
309
+ "aria-busy": o || void 0,
310
+ tabIndex: 0,
311
+ onScroll: y,
312
+ children: /* @__PURE__ */ c("div", {
313
+ ref: m,
314
+ class: "rv-ai-chat-content",
315
+ children: e
316
+ })
317
+ }), g && /* @__PURE__ */ c(_, {
318
+ className: "rv-ai-chat-jump",
319
+ size: "compact",
320
+ onClick: b,
321
+ children: f(u)
322
+ })]
323
+ });
324
+ }
325
+ function H({ title: e = "Start a conversation", description: t = "Ask a question to get started.", children: n, className: r = "", translations: i }) {
326
+ let a = k(i);
327
+ return /* @__PURE__ */ c("div", {
328
+ class: `rv-ai-chat-empty ${r}`,
329
+ children: [
330
+ /* @__PURE__ */ c("strong", { children: a(e) }),
331
+ /* @__PURE__ */ c("p", { children: a(t) }),
332
+ n
333
+ ]
334
+ });
335
+ }
336
+ function U(e) {
337
+ return /* @__PURE__ */ c("div", {
338
+ class: "rv-ai-chat-composer",
339
+ children: /* @__PURE__ */ c(P, {
340
+ label: "Message",
341
+ placeholder: "Type a message…",
342
+ ...e
343
+ })
344
+ });
345
+ }
346
+ function W({ from: e, label: t, isStreaming: n = !1, children: r, className: i = "", translations: a }) {
347
+ let o = k(a);
348
+ return /* @__PURE__ */ c("article", {
349
+ class: `rv-ai-message rv-ai-message--${e} ${i}`,
350
+ "aria-label": o(t ?? {
351
+ user: "You",
352
+ assistant: "Assistant",
353
+ system: "System"
354
+ }[e]),
355
+ "aria-busy": n || void 0,
356
+ "data-streaming": n || void 0,
357
+ children: r
358
+ });
359
+ }
360
+ function G({ children: e, className: t = "" }) {
361
+ return /* @__PURE__ */ c("div", {
362
+ class: `rv-ai-message-content ${t}`,
363
+ children: e
364
+ });
365
+ }
366
+ function K({ children: e, className: t = "", label: n = "Message actions", translations: r }) {
367
+ let i = k(r);
368
+ return /* @__PURE__ */ c("div", {
369
+ class: `rv-ai-message-actions ${t}`,
370
+ role: "group",
371
+ "aria-label": i(n),
372
+ children: e
373
+ });
374
+ }
375
+ var q = {
376
+ pending: "Pending",
377
+ running: "Running",
378
+ completed: "Completed",
379
+ error: "Failed",
380
+ cancelled: "Cancelled"
381
+ };
382
+ function J({ status: e }) {
383
+ return /* @__PURE__ */ c("span", {
384
+ class: "rv-ai-task-icon",
385
+ "data-status": e,
386
+ "aria-hidden": "true",
387
+ children: e === "running" ? /* @__PURE__ */ c(p, { label: "" }) : /* @__PURE__ */ c(l, { svg: e === "completed" ? S : e === "error" ? C : e === "cancelled" ? w : x })
388
+ });
389
+ }
390
+ function Y({ title: e, status: n = "completed", open: r, defaultOpen: a, onOpenChange: o, children: u, className: d = "", translations: f }) {
391
+ let p = k(f), [m, g] = i(a), _ = r ?? m ?? n === "running", v = s({
392
+ expanded: _,
393
+ open: r,
394
+ onOpenChange: o
395
+ });
396
+ v.current = {
397
+ expanded: _,
398
+ open: r,
399
+ onOpenChange: o
400
+ };
401
+ let y = t(u).some((e) => typeof e != "string" || e.trim().length > 0), b = /* @__PURE__ */ c("span", {
402
+ class: "rv-ai-trace-heading",
403
+ children: [
404
+ /* @__PURE__ */ c(J, { status: n }),
405
+ /* @__PURE__ */ c("span", { children: e }),
406
+ /* @__PURE__ */ c("span", {
407
+ class: "rv-visually-hidden",
408
+ children: p(q[n])
409
+ }),
410
+ y && /* @__PURE__ */ c("span", {
411
+ class: "rv-ai-trace-chevron",
412
+ "aria-hidden": "true",
413
+ children: /* @__PURE__ */ c(l, {
414
+ svg: "<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=\"M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\"/></svg>",
415
+ size: 8
416
+ })
417
+ })
418
+ ]
419
+ });
420
+ return y ? /* @__PURE__ */ c(h, {
421
+ className: `rv-ai-trace ${d}`,
422
+ open: _,
423
+ onToggle: (e) => {
424
+ let t = e.currentTarget.open, n = v.current;
425
+ t !== n.expanded && (n.open === void 0 ? g(t) : e.currentTarget.open = n.expanded, n.onOpenChange?.(t));
426
+ },
427
+ summary: b,
428
+ children: /* @__PURE__ */ c("div", {
429
+ class: "rv-ai-trace-content",
430
+ children: u
431
+ })
432
+ }) : /* @__PURE__ */ c("div", {
433
+ class: `rv-ai-trace rv-ai-trace-line ${d}`,
434
+ children: b
435
+ });
436
+ }
437
+ function X(e) {
438
+ return /* @__PURE__ */ c(Y, { ...e });
439
+ }
440
+ function Z({ status: e = "completed", children: t, className: n = "", translations: r }) {
441
+ let i = k(r);
442
+ return /* @__PURE__ */ c("div", {
443
+ class: `rv-ai-task-item ${n}`,
444
+ children: [
445
+ /* @__PURE__ */ c(J, { status: e }),
446
+ /* @__PURE__ */ c("span", {
447
+ class: "rv-visually-hidden",
448
+ children: [i(q[e]), ": "]
449
+ }),
450
+ /* @__PURE__ */ c("div", { children: t })
451
+ ]
452
+ });
453
+ }
454
+ function Q({ title: e, isStreaming: t = !1, duration: n, children: r, translations: i, ...a }) {
455
+ let o = k(i), s = typeof n == "number" && Number.isFinite(n) && n >= 0 ? ` · ${o("{seconds}s", { seconds: Math.round(n) })}` : "";
456
+ return /* @__PURE__ */ c(Y, {
457
+ ...a,
458
+ translations: i,
459
+ status: t ? "running" : "completed",
460
+ title: `${o(e ?? (t ? "Working…" : "Reasoning summary"))}${s}`,
461
+ children: r
462
+ });
463
+ }
464
+ //#endregion
465
+ //#region src/ai/request-trail.tsx
466
+ function $({ translations: e, items: t, onRemove: n, onClear: r, onEmpty: o, disabled: u, removalsDisabled: p, label: m = "View steps", triggerLabel: h, clearLabel: g = "Clear all", clearDescription: x, removeLabel: S, countLabel: C, changedMessage: w }) {
467
+ let T = k(e), E = C ?? ((e) => T(e === 1 ? "{count} applied request" : "{count} applied requests", { count: e })), D = S ?? ((e) => T("Remove request: {label}", { label: e.label })), O = s(null), A = s(null), j = s(null), [M] = i(() => y("rv-ai-steps")), [N, P] = i(!1), F = t.length > 0;
468
+ a(() => {
469
+ if (F || P(!1), !N || !F || !O.current || !A.current || !j.current) return;
470
+ let e = j.current, t = new b(), n = !0;
471
+ return t.open({
472
+ anchor: A.current,
473
+ content: e,
474
+ appendTo: O.current,
475
+ onClose: () => {
476
+ n && P(!1);
477
+ }
478
+ }), e.focus({ preventScroll: !0 }), () => {
479
+ n = !1, t.destroy(), e.hidden = !0;
480
+ };
481
+ }, [N, F]);
482
+ let I = s();
483
+ if (a(() => {
484
+ let e = I.current;
485
+ if (!e) return;
486
+ if (u) {
487
+ e.sawBusy = !0;
488
+ return;
489
+ }
490
+ if (e.id ? t.some((t) => t.id === e.id) : t.length > 0) {
491
+ (e.sawBusy || e.id && p) && (I.current = void 0);
492
+ return;
493
+ }
494
+ I.current = void 0;
495
+ let n = e.button.ownerDocument.activeElement;
496
+ if (n !== e.button && n !== e.button.ownerDocument.body) return;
497
+ let r = O.current?.querySelectorAll(".rv-remove-button");
498
+ r?.length && N ? r[Math.min(e.index, r.length - 1)]?.focus() : t.length || o?.();
499
+ }, [
500
+ t,
501
+ o,
502
+ u,
503
+ p,
504
+ N
505
+ ]), !F) return null;
506
+ let L = 0, R = t.reduce((e, t) => e + (t.count ?? 1), 0);
507
+ return /* @__PURE__ */ c("div", {
508
+ class: "rv-ai-request-trail",
509
+ role: "group",
510
+ "aria-label": T(m),
511
+ ref: O,
512
+ onFocusOut: (e) => {
513
+ e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && P(!1);
514
+ },
515
+ children: [/* @__PURE__ */ c(_, {
516
+ ref: A,
517
+ className: "rv-ai-trail-trigger",
518
+ variant: "ghost",
519
+ size: "compact",
520
+ disabled: u,
521
+ "aria-haspopup": "dialog",
522
+ "aria-expanded": N,
523
+ "aria-controls": M,
524
+ onClick: () => P((e) => !e),
525
+ children: [h ? h(R) : T(R === 1 ? "{count} step" : "{count} steps", { count: R }), /* @__PURE__ */ c(l, {
526
+ svg: f,
527
+ size: 10
528
+ })]
529
+ }), /* @__PURE__ */ c("div", {
530
+ ref: j,
531
+ id: M,
532
+ class: "rv-popover rv-ai-trail-popover",
533
+ role: "dialog",
534
+ "aria-label": T(m),
535
+ tabIndex: -1,
536
+ hidden: !N,
537
+ children: [
538
+ /* @__PURE__ */ c("div", {
539
+ class: "rv-ai-trail-header",
540
+ children: /* @__PURE__ */ c("span", {
541
+ class: "rv-ai-trail-label",
542
+ children: [T(m), /* @__PURE__ */ c(v, {
543
+ count: R,
544
+ label: E(R)
545
+ })]
546
+ })
547
+ }),
548
+ /* @__PURE__ */ c("ol", {
549
+ class: "rv-ai-trail-steps",
550
+ "aria-label": E(R),
551
+ children: t.map((e, r) => {
552
+ let i = L + 1;
553
+ return L += e.count ?? 1, /* @__PURE__ */ c("li", {
554
+ class: "rv-ai-step",
555
+ "data-current": r === t.length - 1 || void 0,
556
+ onFocusCapture: (e) => e.currentTarget.scrollIntoView({
557
+ block: "nearest",
558
+ inline: "nearest"
559
+ }),
560
+ children: /* @__PURE__ */ c("span", {
561
+ class: "rv-ai-step-chip",
562
+ children: [
563
+ /* @__PURE__ */ c("span", {
564
+ class: "rv-ai-step-number",
565
+ "aria-hidden": "true",
566
+ children: i === L ? i : `${i}–${L}`
567
+ }),
568
+ /* @__PURE__ */ c("span", {
569
+ class: "rv-ai-step-label",
570
+ title: e.label,
571
+ children: e.label
572
+ }),
573
+ /* @__PURE__ */ c(d, {
574
+ compact: !0,
575
+ disabled: u || p,
576
+ locale: {
577
+ title: D(e),
578
+ ariaLabel: D(e)
579
+ },
580
+ onClick: (t) => {
581
+ t.preventDefault(), I.current = {
582
+ button: t.currentTarget,
583
+ index: r,
584
+ id: e.id
585
+ }, n(e.id);
586
+ }
587
+ })
588
+ ]
589
+ })
590
+ }, e.id);
591
+ })
592
+ }),
593
+ w && /* @__PURE__ */ c("p", {
594
+ class: "rv-ai-trail-message",
595
+ children: T(w)
596
+ }),
597
+ /* @__PURE__ */ c("div", {
598
+ class: "rv-ai-trail-footer",
599
+ children: /* @__PURE__ */ c(_, {
600
+ variant: "ghost",
601
+ size: "compact",
602
+ disabled: u,
603
+ title: x ? T(x) : void 0,
604
+ onClick: (e) => {
605
+ e.preventDefault(), I.current = {
606
+ button: e.currentTarget,
607
+ index: 0
608
+ }, r();
609
+ },
610
+ children: T(g)
611
+ })
612
+ })
613
+ ]
614
+ })]
615
+ });
616
+ }
617
+ //#endregion
618
+ export { F as _, H as a, T as b, G as c, Z as d, I as f, L as g, P as h, V as i, Q as l, z as m, B as n, W as o, R as p, U as r, K as s, $ as t, X as u, A as v, E as x, O as y };