@revolist/ui 4.0.4-rc → 4.0.6-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.
- package/MIGRATION.md +36 -0
- package/OWNERSHIP.md +10 -10
- package/README.md +22 -4
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/badge.view-D30pMUfi.js +14 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-QWDyYzdo.js} +19 -19
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/check-BwI7iCAm.js +4 -0
- package/_chunks/choice-chips-A6WR-WJe.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/color-picker-BK4W1nd6.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-CMkF17YZ.js} +281 -265
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
- package/_chunks/configurator-actions-By8WSL2m.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/{control-AHKXD5Eu.js → control-mlH7l0Uq.js} +42 -17
- package/_chunks/{controls-DsNi8V8I.js → controls-FUU-MUKC.js} +171 -186
- package/_chunks/{date-control-DrVFX13g.js → date-control-Dup_P3w5.js} +1 -1
- package/_chunks/{date-time-qIhp5vaX.js → date-time-9z6pAG5T.js} +317 -278
- package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-D7oRjsmP.js} +5 -5
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-BCINdXpU.js +223 -0
- package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-Cw2zk58T.js +266 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
- package/_chunks/native-control-pFMuHf3G.js +644 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-DqXV6vgP.js} +7 -7
- package/_chunks/{picker-h1P5RUgp.js → picker-gEGTu1Ki.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-DbxdUJr-.js} +1 -1
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B0_13Sja.js} +1 -1
- package/_chunks/request-trail-CCSK6TJA.js +753 -0
- package/_chunks/rich-text-5rnc8lpI.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/_variables.scss +33 -32
- package/ai/_chat.scss +28 -3
- package/ai/_style.scss +55 -2
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +13 -2
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +17 -1
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +2 -0
- package/ai/translations.d.ts +1 -1
- package/assignee/assignee.scss +5 -1
- package/assignee/index.js +2 -2
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.view.d.ts +8 -0
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +27 -27
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +16 -16
- package/calendar/_calendar.scss +2 -2
- package/calendar/calendar.js +1 -1
- package/calendar/index.js +2 -2
- package/checkbox/checkbox.scss +1 -22
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/component-catalog.d.ts +9 -7
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +61 -0
- package/configurator-drop-zone.d.ts +38 -0
- package/configurator-drop-zone.js +64 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +1 -2
- package/controls.js +4 -3
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +4 -0
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/field.d.ts +3 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +64 -7
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +5 -1
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +9 -9
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +12 -54
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.js +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/editor-dropdown.style.scss +5 -0
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +2 -1
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +1 -1
- package/field-configurator.d.ts +27 -0
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/filter/filters/slider/_slider.scss +8 -25
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.js +1 -1
- package/filter-badge.js +1 -1
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +5 -6
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.js +12 -12
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +22 -21
- package/formatting/styles.scss +2 -47
- package/framework.js +226 -222
- package/history-controls.js +27 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native.js +46 -43
- package/number-input/index.js +1 -1
- package/package.json +36 -1
- package/pagination.js +11 -11
- package/pdf-viewer/index.js +1 -1
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +8 -6
- package/preact.js +71 -64
- package/rating-choice.js +1 -1
- package/react-control.d.ts +2 -0
- package/react-control.js +2 -2
- package/react.d.ts +5 -6
- package/react.js +68 -66
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +4 -4
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +165 -70
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/translations.d.ts +2 -0
- package/search-input/index.js +1 -1
- package/search-input/native.d.ts +21 -2
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/popover.js +4 -4
- package/styles/_alert.scss +18 -4
- package/styles/_compositions.scss +3 -3
- package/styles/_editor-slider.scss +0 -2
- package/styles/_field-configurator.scss +147 -0
- package/styles/_fields-grid.scss +37 -0
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +28 -19
- package/styles/configurator-actions.scss +141 -0
- package/styles/{legacy-pagination.css → pagination.css} +19 -2
- package/styles.css +1 -1
- package/styles.scss +2 -2
- package/surfaces.d.ts +36 -2
- package/surfaces.js +35 -132
- package/svelte.js +3 -3
- package/switch/index.js +15 -14
- package/time-grid.d.ts +0 -1
- package/time-grid.js +38 -37
- package/timeline-track/index.js +2 -2
- package/ui.css +1 -1
- package/vue.d.ts +26 -30
- package/vue.js +117 -121
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -10
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/search-input/native.view.d.ts +0 -21
- package/surfaces.view.d.ts +0 -63
- /package/styles/{legacy-rating.css → rating.css} +0 -0
|
@@ -1,618 +0,0 @@
|
|
|
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 };
|