@revolist/ui 4.0.4-rc → 4.0.4
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 +36 -36
- package/README.md +65 -392
- package/_button.scss +6 -2
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-BQYQLu8Q.js} +23 -23
- package/_chunks/{cell-visuals-E-2oEKHg.js → cell-visuals-r6DOOhGh.js} +7 -7
- package/_chunks/chart-frame-GprenwEg.js +145 -0
- package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
- package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
- package/_chunks/choice-chips-C5OxD0GV.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-7siNch__.js} +22 -24
- package/_chunks/color-picker-Cfc9eqZb.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-C3k_8uIq.js} +290 -275
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-DlVkpW3h.js} +1 -9
- package/_chunks/configurator-actions-vRnI54mO.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/control-BRfF5DWQ.js +118 -0
- package/_chunks/{controller-hRBm_Lfz.js → controller-BbiQuRt-.js} +5 -5
- package/_chunks/controls-B3EgM_DS.js +650 -0
- package/_chunks/{date-control-DrVFX13g.js → date-control-87dcA5br.js} +5 -5
- package/_chunks/{date-time-qIhp5vaX.js → date-time-CfiFYodx.js} +332 -293
- package/_chunks/{delete-button-CW9vjLnk.js → delete-button-jneO24wa.js} +1 -1
- package/_chunks/dialog.parts-NqEEVc9P.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-BGZ_qJ99.js} +10 -10
- package/_chunks/{editor-commit-Bq3wSgvr.js → editor-commit-Dyo-FMgD.js} +1 -1
- package/_chunks/editor-popup-NNP9Fh9U.js +82 -0
- package/_chunks/field-configurator-DPulsY3l.js +288 -0
- package/_chunks/{field-context-D57PnBbH.js → field-context-C4_WrO2z.js} +1 -1
- package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-D4I8HpVp.js} +2 -2
- package/_chunks/icon-toolbar-BAAdEvr9.js +134 -0
- package/_chunks/{icons-Ci5mADVc.js → icons-B4qN13Yj.js} +1 -1
- package/_chunks/{iso-B0YHBK7m.js → iso-CJQl2kmq.js} +1 -1
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/{model-mPO2tG2f.js → model-CFrBgRHm.js} +3 -3
- package/_chunks/mount-C8CnIW9k.js +267 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-CJm3eq3-.js} +1 -1
- package/_chunks/native-control-um1L1wgZ.js +649 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-CKiA4d1N.js} +9 -9
- package/_chunks/{picker-h1P5RUgp.js → picker-igNshTRC.js} +5 -5
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/{popup-CT2uD3go.js → popup-DECYM9FI.js} +116 -105
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-CepVfGUq.js} +2 -2
- package/_chunks/{render-m5eMMwFR.js → render-bTk3curw.js} +2 -2
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B4w3aARt.js} +2 -2
- package/_chunks/request-trail-B1zVRPEf.js +762 -0
- package/_chunks/rich-text-Ci4d6dHn.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/selection-list-tooltips-m00U3L6z.js +42 -0
- package/_chunks/title-tooltip-ncldbUwS.js +11 -0
- package/_chunks/tooltip-h-Z8yFBY.js +54 -0
- package/_chunks/tooltip-owner-BYho-vJl.js +19 -0
- package/_chunks/tooltip-session-CBtRMBPr.js +110 -0
- package/_chunks/tooltip-text-BN5WdGHn.js +12 -0
- package/_chunks/top-layer-popup-CKJ7VJOF.js +59 -0
- package/_dialog.scss +57 -22
- package/_form.scss +71 -21
- package/_legend.scss +25 -7
- package/_variables.scss +34 -32
- package/_view-switcher.scss +6 -0
- package/activity-message.d.ts +1 -1
- package/activity-message.js +1 -1
- package/ai/_chat.scss +35 -3
- package/ai/_style.scss +76 -16
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +16 -3
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +30 -6
- package/ai/request-trail.d.ts +9 -3
- 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/angular/angular.d.ts +1 -1
- package/angular/angular.js +13 -7
- package/assignee/assignee.scss +28 -6
- package/assignee/index.js +6 -6
- package/avatar/avatar.style.scss +23 -6
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.d.ts +1 -1
- package/badge.js +1 -1
- package/badge.view.d.ts +8 -0
- package/brush-range/_brush-range.scss +55 -49
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +28 -28
- package/buttons/delete-button.js +1 -1
- package/buttons/delete-button.style.scss +6 -2
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +2 -2
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +17 -17
- package/calendar/_calendar.scss +21 -25
- package/calendar/calendar.js +1 -1
- package/calendar/day.js +2 -2
- package/calendar/header.js +2 -3
- package/calendar/index.js +3 -3
- package/calendar/model.js +1 -1
- package/calendar/month-grid.js +2 -2
- package/calendar/translations.js +1 -1
- package/calendar/year-grid.js +2 -2
- package/cell-input.js +1 -1
- package/cell-input.scss +3 -7
- package/cell-visuals/badge.style.scss +6 -3
- package/cell-visuals/bar-chart.style.scss +2 -1
- package/cell-visuals/column-type.style.css +12 -0
- package/cell-visuals/index.js +1 -1
- package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
- package/cell-visuals/progress-line.style.scss +1 -4
- package/cell-visuals/sparkline.style.scss +2 -1
- package/cell-visuals/timeline.style.css +4 -2
- package/checkbox/checkbox.scss +6 -24
- package/checkbox/index.js +1 -1
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/built-in-palettes.js +1 -1
- package/color-palette/chart-palettes.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +88 -25
- package/color-palette/color-picker.constants.js +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/color-picker.style.scss +23 -10
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +2 -2
- package/color-palette/gantt-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/color-palette/palette.js +1 -1
- package/color-palette/pivot-palettes.js +1 -1
- package/color-palette/platform-palettes.js +1 -1
- package/color-palette/pro-palettes.js +1 -1
- package/color-palette/scheduler-palettes.js +1 -1
- 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 +63 -0
- package/configurator-drop-zone.d.ts +39 -0
- package/configurator-drop-zone.js +66 -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-attributes.js +1 -1
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +12 -2
- package/controls.js +4 -3
- package/core/anchored-popover.js +1 -1
- package/core/control-id.js +1 -1
- 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/motion.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popover-controller.js +102 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/selection-list-tooltips.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/date-control.d.ts +1 -1
- package/date-time/field.d.ts +4 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +239 -36
- 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.drag.js +1 -1
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.js +1 -1
- package/distribution-chart/_distribution-chart.scss +113 -77
- package/distribution-chart/area-chart.js +2 -2
- package/distribution-chart/bar-chart.js +2 -2
- package/distribution-chart/chart-frame.d.ts +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/index.js +1 -1
- package/distribution-chart/line-chart.js +2 -2
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/dropdown.service.js +1 -1
- package/dropdown/dropdown.types.d.ts +1 -1
- package/dropdown/editor-dropdown.style.scss +19 -9
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +4 -3
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +2 -2
- package/editor-layout/index.d.ts +4 -4
- package/editor-layout/index.js +40 -35
- package/editor-layout/style.scss +82 -18
- package/favicon.svg +9 -0
- package/field-configurator.d.ts +39 -1
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/field-reorder.hook.js +1 -1
- package/field-reorder.js +1 -1
- package/filter/filters/slider/_single-slider.scss +57 -38
- package/filter/filters/slider/_slider.scss +41 -33
- package/filter/filters/slider/component.js +1 -1
- package/filter/filters/slider/control.js +3 -1
- package/filter/filters/slider/inputs.js +1 -1
- package/filter/filters/slider/logic.js +1 -1
- package/filter/filters/slider/preact.js +1 -1
- package/filter/filters/slider/runtime.js +50 -23
- package/filter/filters/slider/single.js +2 -2
- package/filter-badge.js +2 -2
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +6 -7
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +13 -13
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +26 -25
- package/formatting/styles.scss +14 -57
- package/framework.js +228 -225
- package/history-controls.js +27 -1
- package/html-controls.js +1 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/icons/icon.js +1 -1
- package/legend.d.ts +1 -1
- package/legend.js +1 -1
- package/masked-input/index.js +4 -4
- 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-styles.scss +6 -2
- package/native.d.ts +3 -3
- package/native.js +48 -45
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +84 -1
- package/pagination.js +12 -12
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.d.ts +2 -2
- package/pdf-viewer/index.js +3 -3
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +203 -42
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +13 -10
- package/preact.js +109 -64
- package/progress/_bar.scss +9 -3
- package/progress/_circular.scss +2 -1
- package/progress/bar.js +1 -1
- package/progress/circular.js +1 -1
- package/progress/range.js +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +4 -2
- package/react-control.d.ts +2 -0
- package/react-control.js +3 -3
- package/react.d.ts +7 -8
- package/react.js +69 -68
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/reorder-list.scss +59 -17
- package/resource-picker/resource-picker-avatar.js +1 -1
- package/resource-picker/resource-picker-option.js +1 -1
- package/resource-picker/resource-picker-popup.js +2 -2
- package/resource-picker/resource-picker.js +75 -73
- package/resource-picker/resource-picker.scss +62 -34
- package/resource-picker/resource-picker.utils.js +1 -1
- 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 +293 -44
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/toolbar.d.ts +1 -1
- package/rich-text/translations.d.ts +2 -0
- package/robots.txt +4 -0
- package/search-input/index.js +2 -2
- package/search-input/native.d.ts +21 -2
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/selection-list.d.ts +1 -0
- package/selection-list.js +3 -1
- package/status-feedback/badge.js +2 -2
- package/status-feedback/exit-snapshot.js +5 -5
- package/status-feedback/header.js +2 -2
- package/status-feedback/icons.js +1 -1
- package/status-feedback/index.js +1 -1
- package/status-feedback/item.js +2 -2
- package/status-feedback/motion.js +1 -1
- package/status-feedback/placement.js +1 -1
- package/status-feedback/popover.js +5 -5
- package/status-feedback/render.js +1 -1
- package/status-feedback/status-feedback.scss +124 -35
- package/styles/_activity-message.scss +24 -7
- package/styles/_alert.scss +78 -17
- package/styles/_cell-editor-frame.scss +11 -0
- package/styles/_compositions.scss +400 -80
- package/styles/_control.scss +30 -8
- package/styles/_disclosure.scss +15 -5
- package/styles/_editor-counter.scss +16 -6
- package/styles/_editor-slider.scss +8 -4
- package/styles/_field-configurator.scss +321 -23
- package/styles/_fields-grid.scss +49 -0
- package/styles/_filter-controls.scss +10 -2
- package/styles/_icon-action.scss +48 -15
- package/styles/_loading.scss +12 -3
- package/styles/_motion.scss +32 -9
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +369 -110
- package/styles/_theme.scss +130 -86
- package/styles/_thresholds.scss +28 -25
- package/styles/_time-grid.scss +8 -3
- package/styles/_tokens.scss +6 -1
- package/styles/color-roles.js +1 -1
- package/styles/configurator-actions.scss +241 -0
- package/styles/pagination.css +213 -0
- package/styles/{legacy-rating.css → rating.css} +8 -3
- package/styles.css +1 -1
- package/styles.scss +3 -5
- package/surfaces.d.ts +38 -2
- package/surfaces.js +37 -134
- package/svelte/UiComponent.svelte +44 -11
- package/svelte-control.js +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +5 -5
- package/switch/index.js +16 -15
- package/time-grid.d.ts +0 -1
- package/time-grid.js +39 -38
- package/timeline-track/_style.scss +96 -24
- package/timeline-track/index.js +3 -3
- package/timeline-track/model.js +1 -1
- package/ui.css +1 -1
- package/view-switcher.d.ts +23 -0
- package/vue-badge.js +1 -1
- package/vue-control.js +1 -1
- package/vue-segmented-switch.js +1 -1
- package/vue.d.ts +29 -32
- package/vue.js +118 -123
- 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-AHKXD5Eu.js +0 -93
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/controls-DsNi8V8I.js +0 -630
- 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/_shared/data-query/binding.d.ts +0 -30
- package/_shared/data-query/blocks.d.ts +0 -30
- package/_shared/data-query/commands.d.ts +0 -47
- package/_shared/data-query/contracts.d.ts +0 -106
- package/_shared/data-query/cursor-reader.d.ts +0 -25
- package/_shared/data-query/direct-binding.d.ts +0 -3
- package/_shared/data-query/index.d.ts +0 -23
- package/_shared/data-query/infinite-binding.d.ts +0 -18
- package/_shared/data-query/keys.d.ts +0 -9
- package/_shared/data-query/limiter.d.ts +0 -12
- package/_shared/data-query/load-options.d.ts +0 -25
- package/_shared/data-query/materialize.d.ts +0 -2
- package/_shared/data-query/policy.d.ts +0 -14
- package/_shared/data-query/provider-queries.d.ts +0 -22
- package/_shared/data-query/reader.d.ts +0 -23
- package/_shared/data-query/remote-load.d.ts +0 -7
- package/_shared/data-query/source.d.ts +0 -40
- 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/styles/legacy-pagination.css +0 -112
- package/surfaces.view.d.ts +0 -63
|
@@ -0,0 +1,762 @@
|
|
|
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 { createControlId as l } from "../core/control-id.js";
|
|
5
|
+
import { PopoverController as u } from "../core/popover-controller.js";
|
|
6
|
+
import { SvgIcon as d } from "../icons/icon.js";
|
|
7
|
+
import { l as f } from "./native-control-um1L1wgZ.js";
|
|
8
|
+
import { RemoveButton as p } from "../buttons/remove-button.js";
|
|
9
|
+
import "./chevron-down-GbplLa6s.js";
|
|
10
|
+
import { D as m, M as h, c as g, p as _, t as v } from "./controls-B3EgM_DS.js";
|
|
11
|
+
import { t as y } from "./tooltip-text-BN5WdGHn.js";
|
|
12
|
+
import { t as b } from "./clock-BOhPNlW3.js";
|
|
13
|
+
import { t as x } from "./arrow-up-Cw8hW9vp.js";
|
|
14
|
+
//#region package/ai/translations.ts
|
|
15
|
+
var S = /* @__PURE__ */ "AI chat,No results,Clear chat,Restart conversation,New conversation,Request history,Clear chart,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,Proposed changes,Change,Current,Proposed,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,Search requests,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(",");
|
|
16
|
+
function C(e, t = {}, n = {}) {
|
|
17
|
+
return (t[e] ?? e).replace(/\{(\w+)\}/g, (e, t) => Object.hasOwn(n, t) ? String(n[t]) : e);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region package/ai/translation-context.tsx
|
|
21
|
+
var w = n({});
|
|
22
|
+
function T({ translations: e, children: t }) {
|
|
23
|
+
return /* @__PURE__ */ c(w.Provider, {
|
|
24
|
+
value: e,
|
|
25
|
+
children: t
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function E(e) {
|
|
29
|
+
let t = o(w), n = e ?? t;
|
|
30
|
+
return (e, t) => C(e, n, t);
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region package/ai/results/types.ts
|
|
34
|
+
function D(e) {
|
|
35
|
+
return e == null ? "—" : typeof e == "number" ? Number.isFinite(e) ? e.toLocaleString() : "—" : String(e);
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region package/ai/results/table.tsx
|
|
39
|
+
function O({ result: e }) {
|
|
40
|
+
let t = E();
|
|
41
|
+
return /* @__PURE__ */ c("section", {
|
|
42
|
+
class: "rv-ai-result-content",
|
|
43
|
+
"aria-label": e.title,
|
|
44
|
+
children: /* @__PURE__ */ c("div", {
|
|
45
|
+
class: "rv-ai-result-table-scroll",
|
|
46
|
+
tabIndex: 0,
|
|
47
|
+
role: "region",
|
|
48
|
+
"aria-label": e.title,
|
|
49
|
+
children: [/* @__PURE__ */ c("table", {
|
|
50
|
+
class: "rv-ai-result-table",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ c("caption", { children: [/* @__PURE__ */ c("strong", { children: e.title }), e.description && /* @__PURE__ */ c("span", { children: e.description })] }),
|
|
53
|
+
/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", { children: e.columns.map((e, t) => /* @__PURE__ */ c("th", {
|
|
54
|
+
scope: "col",
|
|
55
|
+
class: e.numeric ? "rv-ai-result-number" : void 0,
|
|
56
|
+
children: e.label
|
|
57
|
+
}, t)) }) }),
|
|
58
|
+
/* @__PURE__ */ c("tbody", { children: e.rows.map((t, n) => /* @__PURE__ */ c("tr", { children: e.columns.map((e, n) => /* @__PURE__ */ c("td", {
|
|
59
|
+
class: e.numeric ? "rv-ai-result-number" : void 0,
|
|
60
|
+
children: D(t[n])
|
|
61
|
+
}, n)) }, n)) })
|
|
62
|
+
]
|
|
63
|
+
}), !e.rows.length && /* @__PURE__ */ c("p", {
|
|
64
|
+
class: "rv-ai-result-empty",
|
|
65
|
+
children: t("No results")
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region package/ai/results/metrics.tsx
|
|
72
|
+
function k({ result: e }) {
|
|
73
|
+
return /* @__PURE__ */ c("section", {
|
|
74
|
+
class: "rv-ai-result-content",
|
|
75
|
+
"aria-label": e.title,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ c("strong", { children: e.title }),
|
|
78
|
+
e.description && /* @__PURE__ */ c("p", {
|
|
79
|
+
class: "rv-ai-result-description",
|
|
80
|
+
children: e.description
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ c("dl", {
|
|
83
|
+
class: "rv-ai-result-metrics",
|
|
84
|
+
children: e.items.map((e, t) => /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("dt", { children: e.label }), /* @__PURE__ */ c("dd", { children: D(e.value) })] }, t))
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region package/ai/results/text.tsx
|
|
91
|
+
function A({ result: e }) {
|
|
92
|
+
return /* @__PURE__ */ c("section", {
|
|
93
|
+
class: "rv-ai-result-content",
|
|
94
|
+
"aria-label": e.title,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ c("strong", { children: e.title }),
|
|
97
|
+
e.description && /* @__PURE__ */ c("p", {
|
|
98
|
+
class: "rv-ai-result-description",
|
|
99
|
+
children: e.description
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ c("p", {
|
|
102
|
+
class: "rv-ai-result-text",
|
|
103
|
+
children: e.text
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region package/ai/results/index.tsx
|
|
110
|
+
function j({ result: e, renderTable: t }) {
|
|
111
|
+
switch (e.kind) {
|
|
112
|
+
case "table": return t ? t(e) : /* @__PURE__ */ c(O, { result: e });
|
|
113
|
+
case "metrics": return /* @__PURE__ */ c(k, { result: e });
|
|
114
|
+
case "text": return /* @__PURE__ */ c(A, { result: e });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/circle-check.svg?raw
|
|
119
|
+
var M = "<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>", N = "<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>", P = "<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>";
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region package/ai/prompt-history.ts
|
|
122
|
+
function F(e) {
|
|
123
|
+
if (!Array.isArray(e)) return [];
|
|
124
|
+
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 = [];
|
|
125
|
+
for (let e = t.length - 1; e >= 0; e--) new TextEncoder().encode(JSON.stringify([t[e], ...n])).byteLength <= 8192 && n.unshift(t[e]);
|
|
126
|
+
return n;
|
|
127
|
+
}
|
|
128
|
+
var I = class {
|
|
129
|
+
state;
|
|
130
|
+
reset() {
|
|
131
|
+
this.state = void 0;
|
|
132
|
+
}
|
|
133
|
+
move(e, t, n) {
|
|
134
|
+
let r = JSON.stringify(n);
|
|
135
|
+
if (this.state && (this.state.selected !== e || this.state.key !== r) && this.reset(), !n.length || !this.state && t === "down") return;
|
|
136
|
+
this.state ||= {
|
|
137
|
+
index: n.length,
|
|
138
|
+
draft: e,
|
|
139
|
+
selected: e,
|
|
140
|
+
key: r
|
|
141
|
+
};
|
|
142
|
+
let i = this.state.index + (t === "up" ? -1 : 1);
|
|
143
|
+
if (i >= n.length) {
|
|
144
|
+
let e = this.state.draft;
|
|
145
|
+
return this.reset(), e;
|
|
146
|
+
}
|
|
147
|
+
return this.state.index = Math.max(0, i), this.state.selected = n[this.state.index], this.state.selected;
|
|
148
|
+
}
|
|
149
|
+
}, L = "<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>";
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region package/ai/components.tsx
|
|
152
|
+
function R({ translations: e, value: t, onValueChange: n, onSubmit: r, onStop: i, busy: o = !1, disabled: u = !1, label: d = "Ask AI to change this view", placeholder: f = "Filter or sort your data…", submitLabel: p = "Send", stopLabel: m = "Stop", promptHistory: g, hint: v = "", actions: y, footer: b, textareaProps: S }) {
|
|
153
|
+
let C = E(e), w = s(l("ai-prompt")), T = s(!1), D = s(new I()), O = s();
|
|
154
|
+
a(() => {
|
|
155
|
+
if (!O.current) return;
|
|
156
|
+
let { element: e, position: t } = O.current;
|
|
157
|
+
e.setSelectionRange(t, t), O.current = void 0;
|
|
158
|
+
});
|
|
159
|
+
let k = `${w.current}-hint`, A = !!v && !t.length, j = o && !!i, M = () => {
|
|
160
|
+
!u && !o && t.trim() && r(t.trim());
|
|
161
|
+
};
|
|
162
|
+
return /* @__PURE__ */ c("form", {
|
|
163
|
+
class: "rv-ai-prompt",
|
|
164
|
+
"aria-busy": o || void 0,
|
|
165
|
+
onSubmit: (e) => {
|
|
166
|
+
e.preventDefault(), M();
|
|
167
|
+
},
|
|
168
|
+
children: [/* @__PURE__ */ c("label", {
|
|
169
|
+
for: w.current,
|
|
170
|
+
class: "rv-ai-prompt-label rv-visually-hidden",
|
|
171
|
+
children: C(d)
|
|
172
|
+
}), /* @__PURE__ */ c("div", {
|
|
173
|
+
class: "rv-ai-prompt-composer",
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ c(h, {
|
|
176
|
+
rows: 1,
|
|
177
|
+
...S,
|
|
178
|
+
id: w.current,
|
|
179
|
+
"aria-describedby": A ? k : void 0,
|
|
180
|
+
value: t,
|
|
181
|
+
onValueChange: (e) => {
|
|
182
|
+
D.current.reset(), O.current = void 0, n(e);
|
|
183
|
+
},
|
|
184
|
+
placeholder: C(f),
|
|
185
|
+
disabled: u || o,
|
|
186
|
+
maxLength: 4e3,
|
|
187
|
+
onCompositionStart: () => {
|
|
188
|
+
T.current = !0;
|
|
189
|
+
},
|
|
190
|
+
onCompositionEnd: () => {
|
|
191
|
+
T.current = !1;
|
|
192
|
+
},
|
|
193
|
+
onKeyDown: (e) => {
|
|
194
|
+
let r = e.currentTarget;
|
|
195
|
+
if (g && !o && !u && !T.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"))) {
|
|
196
|
+
let i = D.current.move(t, e.key === "ArrowUp" ? "up" : "down", F(g));
|
|
197
|
+
if (i !== void 0) {
|
|
198
|
+
if (e.preventDefault(), i === t) return;
|
|
199
|
+
O.current = {
|
|
200
|
+
element: r,
|
|
201
|
+
position: i.length
|
|
202
|
+
}, n(i);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
e.key === "Enter" && !e.shiftKey && !e.isComposing && !T.current && e.keyCode !== 229 && (e.preventDefault(), M());
|
|
207
|
+
}
|
|
208
|
+
}),
|
|
209
|
+
b && /* @__PURE__ */ c("div", {
|
|
210
|
+
class: "rv-ai-prompt-footer",
|
|
211
|
+
children: b
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ c("div", {
|
|
214
|
+
class: "rv-ai-prompt-toolbar",
|
|
215
|
+
children: [/* @__PURE__ */ c("div", {
|
|
216
|
+
class: "rv-ai-prompt-tools",
|
|
217
|
+
children: [y, A && /* @__PURE__ */ c("span", {
|
|
218
|
+
id: k,
|
|
219
|
+
class: "rv-ai-prompt-hint",
|
|
220
|
+
children: C(v)
|
|
221
|
+
})]
|
|
222
|
+
}), /* @__PURE__ */ c(_, {
|
|
223
|
+
className: "rv-ai-prompt-submit",
|
|
224
|
+
type: j ? "button" : "submit",
|
|
225
|
+
label: C(j ? m : p),
|
|
226
|
+
icon: j ? L : x,
|
|
227
|
+
onClick: j ? (e) => {
|
|
228
|
+
e.preventDefault(), i?.();
|
|
229
|
+
} : void 0,
|
|
230
|
+
disabled: u || !j && !t.trim(),
|
|
231
|
+
busy: o && !j,
|
|
232
|
+
variant: "solid",
|
|
233
|
+
size: "compact"
|
|
234
|
+
})]
|
|
235
|
+
})
|
|
236
|
+
]
|
|
237
|
+
})]
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function z({ translations: e, items: t, onSelect: n, disabled: r, label: i = "Suggested requests", maxVisible: a = 2 }) {
|
|
241
|
+
let o = E(e);
|
|
242
|
+
if (!t.length) return null;
|
|
243
|
+
let s = Number.isFinite(a) ? Math.max(0, Math.floor(a)) : 2, l = t.map((e) => typeof e == "string" ? {
|
|
244
|
+
label: e,
|
|
245
|
+
prompt: e
|
|
246
|
+
} : e);
|
|
247
|
+
return /* @__PURE__ */ c("div", {
|
|
248
|
+
class: "rv-ai-suggestions",
|
|
249
|
+
role: "group",
|
|
250
|
+
"aria-label": o(i),
|
|
251
|
+
children: [l.slice(0, s).map((e, t) => /* @__PURE__ */ c(v, {
|
|
252
|
+
className: "rv-ai-suggestion",
|
|
253
|
+
size: "compact",
|
|
254
|
+
disabled: r,
|
|
255
|
+
onClick: () => n(e.prompt),
|
|
256
|
+
children: e.label
|
|
257
|
+
}, `${t}:${e.prompt}`)), l.length > s && /* @__PURE__ */ c(f, {
|
|
258
|
+
className: "rv-ai-examples",
|
|
259
|
+
source: l.slice(s).map((e) => ({
|
|
260
|
+
value: e.prompt,
|
|
261
|
+
label: e.label
|
|
262
|
+
})),
|
|
263
|
+
disabled: r,
|
|
264
|
+
placeholder: o("More"),
|
|
265
|
+
renderSelectedValue: () => /* @__PURE__ */ c(d, {
|
|
266
|
+
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>",
|
|
267
|
+
size: 14
|
|
268
|
+
}),
|
|
269
|
+
config: {
|
|
270
|
+
ariaLabel: o("More"),
|
|
271
|
+
search: !0,
|
|
272
|
+
searchPlaceholder: o("Search requests"),
|
|
273
|
+
searchAriaLabel: o("Search requests"),
|
|
274
|
+
popupClassName: "rv-ai-examples-menu",
|
|
275
|
+
maxHeight: 480
|
|
276
|
+
},
|
|
277
|
+
onChange: (e) => {
|
|
278
|
+
typeof e == "string" && n(e);
|
|
279
|
+
}
|
|
280
|
+
})]
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
function B({ translations: e, phase: t, message: n }) {
|
|
284
|
+
let r = E(e);
|
|
285
|
+
return /* @__PURE__ */ c("div", {
|
|
286
|
+
class: "rv-ai-status",
|
|
287
|
+
"data-state": t,
|
|
288
|
+
role: "status",
|
|
289
|
+
"aria-live": "polite",
|
|
290
|
+
"aria-atomic": "true",
|
|
291
|
+
children: [(t === "understanding" || t === "applying") && /* @__PURE__ */ c("span", {
|
|
292
|
+
"aria-hidden": "true",
|
|
293
|
+
children: /* @__PURE__ */ c(m, { label: "" })
|
|
294
|
+
}), /* @__PURE__ */ c("span", { children: r(n) })]
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
function V({ translations: e, summary: t, matchedRows: n, countLabel: r, actions: i, children: a }) {
|
|
298
|
+
let o = E(e);
|
|
299
|
+
return /* @__PURE__ */ c("div", {
|
|
300
|
+
class: "rv-ai-result",
|
|
301
|
+
role: "status",
|
|
302
|
+
"aria-live": "polite",
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ c("p", {
|
|
305
|
+
class: "rv-ai-result-summary",
|
|
306
|
+
children: t
|
|
307
|
+
}),
|
|
308
|
+
n !== void 0 && /* @__PURE__ */ c("p", {
|
|
309
|
+
class: "rv-ai-result-count",
|
|
310
|
+
children: r ? r(n) : o("{count} matching rows", { count: n.toLocaleString() })
|
|
311
|
+
}),
|
|
312
|
+
a,
|
|
313
|
+
i && /* @__PURE__ */ c("div", {
|
|
314
|
+
class: "rv-ai-result-actions",
|
|
315
|
+
children: i
|
|
316
|
+
})
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function H({ layout: e = "flow", translations: t = {}, label: n = "AI view assistant", children: r, footer: i, busy: a }) {
|
|
321
|
+
return /* @__PURE__ */ c(T, {
|
|
322
|
+
translations: t,
|
|
323
|
+
children: /* @__PURE__ */ c("section", {
|
|
324
|
+
class: `rv-ai-assistant${e === "fill" ? " rv-ai-assistant--fill" : ""}`,
|
|
325
|
+
"aria-label": ((e) => C(e, t))(n),
|
|
326
|
+
"aria-busy": a || void 0,
|
|
327
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
328
|
+
onKeyUp: (e) => e.stopPropagation(),
|
|
329
|
+
children: [r, i && /* @__PURE__ */ c("div", {
|
|
330
|
+
class: "rv-ai-assistant-footer",
|
|
331
|
+
children: i
|
|
332
|
+
})]
|
|
333
|
+
})
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
function U({ translations: t, summary: n, details: i, changes: a, notice: o, disabled: l, onApply: u, onCancel: d }) {
|
|
337
|
+
let f = E(t), p = s(null);
|
|
338
|
+
return r(() => {
|
|
339
|
+
p.current?.focus();
|
|
340
|
+
}, []), /* @__PURE__ */ c("section", {
|
|
341
|
+
class: "rv-ai-change-preview",
|
|
342
|
+
"aria-label": f("Review changes"),
|
|
343
|
+
onKeyDown: (e) => {
|
|
344
|
+
e.key === "Escape" && !l && (e.preventDefault(), d());
|
|
345
|
+
},
|
|
346
|
+
children: /* @__PURE__ */ c(V, {
|
|
347
|
+
summary: n,
|
|
348
|
+
actions: /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ c(v, {
|
|
349
|
+
ref: p,
|
|
350
|
+
disabled: l,
|
|
351
|
+
onClick: u,
|
|
352
|
+
children: f("Apply changes")
|
|
353
|
+
}), /* @__PURE__ */ c(v, {
|
|
354
|
+
disabled: l,
|
|
355
|
+
variant: "ghost",
|
|
356
|
+
onClick: d,
|
|
357
|
+
children: f("Cancel changes")
|
|
358
|
+
})] }),
|
|
359
|
+
children: [o && /* @__PURE__ */ c("p", {
|
|
360
|
+
class: "rv-ai-preview-notice",
|
|
361
|
+
children: o
|
|
362
|
+
}), a?.length ? /* @__PURE__ */ c("div", {
|
|
363
|
+
class: "rv-ai-preview-changes",
|
|
364
|
+
role: "region",
|
|
365
|
+
"aria-label": f("Proposed changes"),
|
|
366
|
+
tabIndex: 0,
|
|
367
|
+
children: /* @__PURE__ */ c("table", { children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", { children: [
|
|
368
|
+
/* @__PURE__ */ c("th", {
|
|
369
|
+
scope: "col",
|
|
370
|
+
children: f("Change")
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ c("th", {
|
|
373
|
+
scope: "col",
|
|
374
|
+
children: f("Current")
|
|
375
|
+
}),
|
|
376
|
+
/* @__PURE__ */ c("th", {
|
|
377
|
+
scope: "col",
|
|
378
|
+
children: f("Proposed")
|
|
379
|
+
})
|
|
380
|
+
] }) }), /* @__PURE__ */ c("tbody", { children: a.map((e, t) => /* @__PURE__ */ c("tr", { children: [
|
|
381
|
+
/* @__PURE__ */ c("th", {
|
|
382
|
+
scope: "row",
|
|
383
|
+
children: [e.item && /* @__PURE__ */ c("span", {
|
|
384
|
+
class: "rv-ai-preview-item",
|
|
385
|
+
children: e.item
|
|
386
|
+
}), e.label]
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ c("td", { children: e.before ?? "—" }),
|
|
389
|
+
/* @__PURE__ */ c("td", { children: e.after ?? "—" })
|
|
390
|
+
] }, t)) })] })
|
|
391
|
+
}) : i && /* @__PURE__ */ c("pre", {
|
|
392
|
+
class: "rv-ai-result-details",
|
|
393
|
+
children: i
|
|
394
|
+
})]
|
|
395
|
+
})
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region package/ai/chat.tsx
|
|
400
|
+
function W({ children: e, className: t = "", label: n = "AI chat", style: r, translations: i }) {
|
|
401
|
+
let a = E(i);
|
|
402
|
+
return /* @__PURE__ */ c("section", {
|
|
403
|
+
class: `rv-ai-chat ${t}`,
|
|
404
|
+
"aria-label": a(n),
|
|
405
|
+
style: r,
|
|
406
|
+
children: e
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
function G({ children: e, className: t = "", autoScroll: n = !0, busy: o = !1, label: l = "Conversation messages", jumpLabel: u = "Jump to latest", translations: d }) {
|
|
410
|
+
let f = E(d), p = s(null), m = s(null), h = s(n), [g, v] = i(!1), y = () => {
|
|
411
|
+
let e = p.current;
|
|
412
|
+
if (!e) return;
|
|
413
|
+
let t = e.scrollHeight - e.clientHeight - e.scrollTop <= 40;
|
|
414
|
+
h.current = t, v(!t);
|
|
415
|
+
}, b = () => {
|
|
416
|
+
let e = p.current;
|
|
417
|
+
e && (e.scrollTop = e.scrollHeight, h.current = !0, v(!1));
|
|
418
|
+
}, x = () => {
|
|
419
|
+
if (n && h.current) b();
|
|
420
|
+
else {
|
|
421
|
+
let e = p.current;
|
|
422
|
+
e && v(e.scrollHeight - e.clientHeight - e.scrollTop > 40);
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
return a(x, [e, n]), r(() => {
|
|
426
|
+
if (typeof ResizeObserver > "u") return;
|
|
427
|
+
let e = new ResizeObserver(x);
|
|
428
|
+
return p.current && e.observe(p.current), m.current && e.observe(m.current), () => e.disconnect();
|
|
429
|
+
}, [n]), /* @__PURE__ */ c("div", {
|
|
430
|
+
class: `rv-ai-chat-scroll ${t}`,
|
|
431
|
+
children: [/* @__PURE__ */ c("div", {
|
|
432
|
+
ref: p,
|
|
433
|
+
class: "rv-ai-chat-viewport",
|
|
434
|
+
role: "log",
|
|
435
|
+
"aria-label": f(l),
|
|
436
|
+
"aria-live": "polite",
|
|
437
|
+
"aria-relevant": "additions text",
|
|
438
|
+
"aria-busy": o || void 0,
|
|
439
|
+
tabIndex: 0,
|
|
440
|
+
onScroll: y,
|
|
441
|
+
children: /* @__PURE__ */ c("div", {
|
|
442
|
+
ref: m,
|
|
443
|
+
class: "rv-ai-chat-content",
|
|
444
|
+
children: e
|
|
445
|
+
})
|
|
446
|
+
}), g && /* @__PURE__ */ c(_, {
|
|
447
|
+
className: "rv-ai-chat-jump",
|
|
448
|
+
label: f(u),
|
|
449
|
+
icon: "<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=\"M169.4 502.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 402.7 224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 370.7-105.4-105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"/></svg>",
|
|
450
|
+
variant: "default",
|
|
451
|
+
size: "compact",
|
|
452
|
+
onClick: b
|
|
453
|
+
})]
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
function K({ title: e = "Start a conversation", description: t = "Ask a question to get started.", children: n, className: r = "", translations: i, renderContent: o }) {
|
|
457
|
+
let l = E(i), u = s(null);
|
|
458
|
+
return a(() => {
|
|
459
|
+
let e = u.current;
|
|
460
|
+
if (!e || !o) return;
|
|
461
|
+
let t = o(e);
|
|
462
|
+
return () => {
|
|
463
|
+
t?.(), e.replaceChildren();
|
|
464
|
+
};
|
|
465
|
+
}, [o]), /* @__PURE__ */ c("div", {
|
|
466
|
+
class: `rv-ai-chat-empty ${r}`,
|
|
467
|
+
children: [
|
|
468
|
+
e && /* @__PURE__ */ c("strong", { children: l(e) }),
|
|
469
|
+
t && /* @__PURE__ */ c("p", { children: l(t) }),
|
|
470
|
+
n,
|
|
471
|
+
o && /* @__PURE__ */ c("div", {
|
|
472
|
+
ref: u,
|
|
473
|
+
class: "rv-ai-chat-empty-slot"
|
|
474
|
+
})
|
|
475
|
+
]
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
function q(e) {
|
|
479
|
+
return /* @__PURE__ */ c("div", {
|
|
480
|
+
class: "rv-ai-chat-composer",
|
|
481
|
+
children: /* @__PURE__ */ c(R, {
|
|
482
|
+
label: "Message",
|
|
483
|
+
placeholder: "Type a message…",
|
|
484
|
+
...e
|
|
485
|
+
})
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function J({ from: e, label: t, isStreaming: n = !1, children: r, className: i = "", translations: a }) {
|
|
489
|
+
let o = E(a);
|
|
490
|
+
return /* @__PURE__ */ c("article", {
|
|
491
|
+
class: `rv-ai-message rv-ai-message--${e} ${i}`,
|
|
492
|
+
"aria-label": o(t ?? {
|
|
493
|
+
user: "You",
|
|
494
|
+
assistant: "Assistant",
|
|
495
|
+
system: "System"
|
|
496
|
+
}[e]),
|
|
497
|
+
"aria-busy": n || void 0,
|
|
498
|
+
"data-streaming": n || void 0,
|
|
499
|
+
children: r
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
function Y({ children: e, className: t = "" }) {
|
|
503
|
+
return /* @__PURE__ */ c("div", {
|
|
504
|
+
class: `rv-ai-message-content ${t}`,
|
|
505
|
+
children: e
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
function X({ children: e, className: t = "", label: n = "Message actions", translations: r }) {
|
|
509
|
+
let i = E(r);
|
|
510
|
+
return /* @__PURE__ */ c("div", {
|
|
511
|
+
class: `rv-ai-message-actions ${t}`,
|
|
512
|
+
role: "group",
|
|
513
|
+
"aria-label": i(n),
|
|
514
|
+
children: e
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
var Z = {
|
|
518
|
+
pending: "Pending",
|
|
519
|
+
running: "Running",
|
|
520
|
+
completed: "Completed",
|
|
521
|
+
error: "Failed",
|
|
522
|
+
cancelled: "Cancelled"
|
|
523
|
+
};
|
|
524
|
+
function Q({ status: e }) {
|
|
525
|
+
return /* @__PURE__ */ c("span", {
|
|
526
|
+
class: "rv-ai-task-icon",
|
|
527
|
+
"data-status": e,
|
|
528
|
+
"aria-hidden": "true",
|
|
529
|
+
children: e === "running" ? /* @__PURE__ */ c(m, { label: "" }) : /* @__PURE__ */ c(d, { svg: e === "completed" ? M : e === "error" ? N : e === "cancelled" ? P : b })
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function $({ title: e, status: n = "completed", open: r, defaultOpen: a, onOpenChange: o, children: l, className: u = "", translations: f }) {
|
|
533
|
+
let p = E(f), [m, h] = i(a), _ = r ?? m ?? n === "running", v = s({
|
|
534
|
+
expanded: _,
|
|
535
|
+
open: r,
|
|
536
|
+
onOpenChange: o
|
|
537
|
+
});
|
|
538
|
+
v.current = {
|
|
539
|
+
expanded: _,
|
|
540
|
+
open: r,
|
|
541
|
+
onOpenChange: o
|
|
542
|
+
};
|
|
543
|
+
let y = t(l).some((e) => typeof e != "string" || e.trim().length > 0), b = /* @__PURE__ */ c("span", {
|
|
544
|
+
class: "rv-ai-trace-heading",
|
|
545
|
+
children: [
|
|
546
|
+
/* @__PURE__ */ c(Q, { status: n }),
|
|
547
|
+
/* @__PURE__ */ c("span", { children: e }),
|
|
548
|
+
/* @__PURE__ */ c("span", {
|
|
549
|
+
class: "rv-visually-hidden",
|
|
550
|
+
children: p(Z[n])
|
|
551
|
+
}),
|
|
552
|
+
y && /* @__PURE__ */ c("span", {
|
|
553
|
+
class: "rv-ai-trace-chevron",
|
|
554
|
+
"aria-hidden": "true",
|
|
555
|
+
children: /* @__PURE__ */ c(d, {
|
|
556
|
+
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>",
|
|
557
|
+
size: 8
|
|
558
|
+
})
|
|
559
|
+
})
|
|
560
|
+
]
|
|
561
|
+
});
|
|
562
|
+
return y ? /* @__PURE__ */ c(g, {
|
|
563
|
+
className: `rv-ai-trace ${u}`,
|
|
564
|
+
open: _,
|
|
565
|
+
onToggle: (e) => {
|
|
566
|
+
let t = e.currentTarget.open, n = v.current;
|
|
567
|
+
t !== n.expanded && (n.open === void 0 ? h(t) : e.currentTarget.open = n.expanded, n.onOpenChange?.(t));
|
|
568
|
+
},
|
|
569
|
+
summary: b,
|
|
570
|
+
children: /* @__PURE__ */ c("div", {
|
|
571
|
+
class: "rv-ai-trace-content",
|
|
572
|
+
children: l
|
|
573
|
+
})
|
|
574
|
+
}) : /* @__PURE__ */ c("div", {
|
|
575
|
+
class: `rv-ai-trace rv-ai-trace-line ${u}`,
|
|
576
|
+
children: b
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
function ee(e) {
|
|
580
|
+
return /* @__PURE__ */ c($, { ...e });
|
|
581
|
+
}
|
|
582
|
+
function te({ status: e = "completed", children: t, className: n = "", translations: r }) {
|
|
583
|
+
let i = E(r);
|
|
584
|
+
return /* @__PURE__ */ c("div", {
|
|
585
|
+
class: `rv-ai-task-item ${n}`,
|
|
586
|
+
children: [
|
|
587
|
+
/* @__PURE__ */ c(Q, { status: e }),
|
|
588
|
+
/* @__PURE__ */ c("span", {
|
|
589
|
+
class: "rv-visually-hidden",
|
|
590
|
+
children: [i(Z[e]), ": "]
|
|
591
|
+
}),
|
|
592
|
+
/* @__PURE__ */ c("div", { children: t })
|
|
593
|
+
]
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
function ne({ title: e, isStreaming: t = !1, duration: n, children: r, translations: i, ...a }) {
|
|
597
|
+
let o = E(i), s = typeof n == "number" && Number.isFinite(n) && n >= 0 ? ` · ${o("{seconds}s", { seconds: Math.round(n) })}` : "";
|
|
598
|
+
return /* @__PURE__ */ c($, {
|
|
599
|
+
...a,
|
|
600
|
+
translations: i,
|
|
601
|
+
status: t ? "running" : "completed",
|
|
602
|
+
title: `${o(e ?? (t ? "Working…" : "Reasoning summary"))}${s}`,
|
|
603
|
+
children: r
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
//#endregion
|
|
607
|
+
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/clock-rotate-left.svg?raw
|
|
608
|
+
var re = "<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=\"M288 64c106 0 192 86 192 192S394 448 288 448c-65.2 0-122.9-32.5-157.6-82.3-10.1-14.5-30.1-18-44.6-7.9s-18 30.1-7.9 44.6C124.1 468.6 201 512 288 512 429.4 512 544 397.4 544 256S429.4 0 288 0C202.3 0 126.5 42.1 80 106.7L80 80c0-17.7-14.3-32-32-32S16 62.3 16 80l0 112c0 17.7 14.3 32 32 32l24.6 0c.5 0 1 0 1.5 0l86 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-38.3 0C154.9 102.6 217 64 288 64zm24 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1z\"/></svg>";
|
|
609
|
+
//#endregion
|
|
610
|
+
//#region package/ai/request-trail.tsx
|
|
611
|
+
function ie({ translations: e, items: t, onRemove: n, onClear: r, onEmpty: o, footer: f, showClear: m = !0, disabled: h, removalsDisabled: g, label: _ = "Request history", triggerLabel: b, clearLabel: x = "Clear all", clearDescription: S, removeLabel: C, countLabel: w, changedMessage: T }) {
|
|
612
|
+
let D = E(e), O = w ?? ((e) => D(e === 1 ? "{count} applied request" : "{count} applied requests", { count: e })), k = C ?? ((e) => D("Remove request: {label}", { label: e.label })), A = s(null), j = s(null), M = s(null), [N] = i(() => l("rv-ai-steps")), [P, F] = i(!1), I = t.length > 0;
|
|
613
|
+
a(() => {
|
|
614
|
+
if (I || F(!1), !P || !I || !A.current || !j.current || !M.current) return;
|
|
615
|
+
let e = M.current, t = new u(), n = !0;
|
|
616
|
+
return t.open({
|
|
617
|
+
anchor: j.current,
|
|
618
|
+
content: e,
|
|
619
|
+
appendTo: A.current,
|
|
620
|
+
onClose: () => {
|
|
621
|
+
n && F(!1);
|
|
622
|
+
}
|
|
623
|
+
}), e.focus({ preventScroll: !0 }), () => {
|
|
624
|
+
n = !1, t.destroy(), e.hidden = !0;
|
|
625
|
+
};
|
|
626
|
+
}, [P, I]);
|
|
627
|
+
let L = s();
|
|
628
|
+
if (a(() => {
|
|
629
|
+
let e = L.current;
|
|
630
|
+
if (!e) return;
|
|
631
|
+
if (h) {
|
|
632
|
+
e.sawBusy = !0;
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
if (e.id ? t.some((t) => t.id === e.id) : t.length > 0) {
|
|
636
|
+
(e.sawBusy || e.id && g) && (L.current = void 0);
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
L.current = void 0;
|
|
640
|
+
let n = e.button.ownerDocument.activeElement;
|
|
641
|
+
if (n !== e.button && n !== e.button.ownerDocument.body) return;
|
|
642
|
+
let r = A.current?.querySelectorAll(".rv-remove-button");
|
|
643
|
+
r?.length && P ? r[Math.min(e.index, r.length - 1)]?.focus() : t.length ? P && j.current?.focus() : o?.();
|
|
644
|
+
}, [
|
|
645
|
+
t,
|
|
646
|
+
o,
|
|
647
|
+
h,
|
|
648
|
+
g,
|
|
649
|
+
P
|
|
650
|
+
]), !I) return null;
|
|
651
|
+
let R = 0, z = t.reduce((e, t) => e + (t.count ?? 1), 0);
|
|
652
|
+
return /* @__PURE__ */ c("div", {
|
|
653
|
+
class: "rv-ai-request-trail",
|
|
654
|
+
role: "group",
|
|
655
|
+
"aria-label": D(_),
|
|
656
|
+
ref: A,
|
|
657
|
+
onFocusOut: (e) => {
|
|
658
|
+
e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && F(!1);
|
|
659
|
+
},
|
|
660
|
+
children: [/* @__PURE__ */ c(v, {
|
|
661
|
+
ref: j,
|
|
662
|
+
className: "rv-ai-trail-trigger rv-btn-icon",
|
|
663
|
+
variant: "ghost",
|
|
664
|
+
size: "compact",
|
|
665
|
+
disabled: h,
|
|
666
|
+
"aria-label": D(_),
|
|
667
|
+
title: D(_),
|
|
668
|
+
"aria-haspopup": "dialog",
|
|
669
|
+
"aria-expanded": P,
|
|
670
|
+
"aria-controls": N,
|
|
671
|
+
onClick: () => F((e) => !e),
|
|
672
|
+
children: b ? b(z) : /* @__PURE__ */ c(d, {
|
|
673
|
+
svg: re,
|
|
674
|
+
size: 16
|
|
675
|
+
})
|
|
676
|
+
}), /* @__PURE__ */ c("div", {
|
|
677
|
+
ref: M,
|
|
678
|
+
id: N,
|
|
679
|
+
class: "rv-popover rv-ai-trail-popover",
|
|
680
|
+
role: "dialog",
|
|
681
|
+
"aria-label": D(_),
|
|
682
|
+
tabIndex: -1,
|
|
683
|
+
hidden: !P,
|
|
684
|
+
children: [
|
|
685
|
+
/* @__PURE__ */ c("div", {
|
|
686
|
+
class: "rv-ai-trail-header",
|
|
687
|
+
children: /* @__PURE__ */ c("span", {
|
|
688
|
+
class: "rv-ai-trail-label",
|
|
689
|
+
children: D(_)
|
|
690
|
+
})
|
|
691
|
+
}),
|
|
692
|
+
/* @__PURE__ */ c("ol", {
|
|
693
|
+
class: "rv-ai-trail-steps",
|
|
694
|
+
"aria-label": O(z),
|
|
695
|
+
children: t.map((e, r) => {
|
|
696
|
+
let i = R + 1;
|
|
697
|
+
return R += e.count ?? 1, /* @__PURE__ */ c("li", {
|
|
698
|
+
class: "rv-ai-step",
|
|
699
|
+
"data-current": r === t.length - 1 || void 0,
|
|
700
|
+
onFocusCapture: (e) => e.currentTarget.scrollIntoView({
|
|
701
|
+
block: "nearest",
|
|
702
|
+
inline: "nearest"
|
|
703
|
+
}),
|
|
704
|
+
children: /* @__PURE__ */ c("span", {
|
|
705
|
+
class: "rv-ai-step-chip",
|
|
706
|
+
children: [
|
|
707
|
+
/* @__PURE__ */ c("span", {
|
|
708
|
+
class: "rv-ai-step-number",
|
|
709
|
+
"aria-hidden": "true",
|
|
710
|
+
children: i === R ? i : `${i}–${R}`
|
|
711
|
+
}),
|
|
712
|
+
/* @__PURE__ */ c(y, {
|
|
713
|
+
class: "rv-ai-step-label",
|
|
714
|
+
title: e.label,
|
|
715
|
+
children: e.label
|
|
716
|
+
}),
|
|
717
|
+
e.removable !== !1 && /* @__PURE__ */ c(p, {
|
|
718
|
+
compact: !0,
|
|
719
|
+
disabled: h || g,
|
|
720
|
+
locale: {
|
|
721
|
+
title: k(e),
|
|
722
|
+
ariaLabel: k(e)
|
|
723
|
+
},
|
|
724
|
+
onClick: (t) => {
|
|
725
|
+
t.preventDefault(), L.current = {
|
|
726
|
+
button: t.currentTarget,
|
|
727
|
+
index: r,
|
|
728
|
+
id: e.id
|
|
729
|
+
}, n(e.id);
|
|
730
|
+
}
|
|
731
|
+
})
|
|
732
|
+
]
|
|
733
|
+
})
|
|
734
|
+
}, e.id);
|
|
735
|
+
})
|
|
736
|
+
}),
|
|
737
|
+
T && /* @__PURE__ */ c("p", {
|
|
738
|
+
class: "rv-ai-trail-message",
|
|
739
|
+
children: D(T)
|
|
740
|
+
}),
|
|
741
|
+
/* @__PURE__ */ c("div", {
|
|
742
|
+
class: "rv-ai-trail-footer",
|
|
743
|
+
children: [f, m && r && /* @__PURE__ */ c(v, {
|
|
744
|
+
variant: "ghost",
|
|
745
|
+
size: "compact",
|
|
746
|
+
disabled: h,
|
|
747
|
+
title: S ? D(S) : void 0,
|
|
748
|
+
onClick: (e) => {
|
|
749
|
+
e.preventDefault(), L.current = {
|
|
750
|
+
button: e.currentTarget,
|
|
751
|
+
index: 0
|
|
752
|
+
}, r?.();
|
|
753
|
+
},
|
|
754
|
+
children: D(x)
|
|
755
|
+
})]
|
|
756
|
+
})
|
|
757
|
+
]
|
|
758
|
+
})]
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
//#endregion
|
|
762
|
+
export { D as C, C as E, O as S, S as T, z as _, K as a, A as b, Y as c, te as d, B as f, V as g, R as h, G as i, ne as l, U as m, W as n, J as o, H as p, q as r, X as s, ie as t, ee as u, F as v, T as w, k as x, j as y };
|