@revolist/ui 4.0.1-rc → 4.0.3-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +345 -262
  3. package/_chunks/calendar-xpZ0v3xf.js +258 -0
  4. package/_chunks/chart-frame-Cmc7xU1i.js +130 -0
  5. package/_chunks/choice-chips-CHQTUdLs.js +110 -0
  6. package/_chunks/clock-BOhPNlW3.js +4 -0
  7. package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-D8vyPfld.js} +41 -41
  8. package/_chunks/color-picker-CudqPYZo.js +138 -0
  9. package/_chunks/component-C_T2VN5u.js +863 -0
  10. package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BMOOmqx5.js} +0 -4
  11. package/_chunks/control-AHKXD5Eu.js +93 -0
  12. package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-uscKfAnV.js} +29 -29
  13. package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
  14. package/_chunks/{controls-NEL5tDaz.js → controls-DsNi8V8I.js} +229 -214
  15. package/_chunks/{date-control-CYCkb1aQ.js → date-control-DrVFX13g.js} +21 -21
  16. package/_chunks/date-time-qIhp5vaX.js +768 -0
  17. package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
  18. package/_chunks/dialog.parts-CKGkC5zP.js +134 -0
  19. package/_chunks/duration-CL68Em0o.js +272 -0
  20. package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
  21. package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-WDdtVDNA.js} +8 -8
  22. package/_chunks/field-context-D57PnBbH.js +5 -0
  23. package/_chunks/framework-mount--RTLIqE-.js +54 -0
  24. package/_chunks/history-controls-B3u3INEK.js +27 -0
  25. package/_chunks/hooks.module-CG3gN83z.js +157 -0
  26. package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
  27. package/_chunks/mount-DQ1cpppK.js +257 -0
  28. package/_chunks/native-control-C_yok8_-.js +605 -0
  29. package/_chunks/native.view-ByyZ1CT5.js +32 -0
  30. package/_chunks/{number-input-NnH57J4j.js → number-input-BKwA5FnM.js} +89 -89
  31. package/_chunks/picker-h1P5RUgp.js +122 -0
  32. package/_chunks/popup-CT2uD3go.js +367 -0
  33. package/_chunks/preact.module-BBM36DnO.js +290 -0
  34. package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-DZgmaic0.js} +10 -10
  35. package/_chunks/render-m5eMMwFR.js +83 -0
  36. package/_chunks/reorder-list-CSlqAGHw.js +59 -0
  37. package/_chunks/request-trail-DSlFix6i.js +618 -0
  38. package/_chunks/rich-text-CH7gIqOS.js +636 -0
  39. package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
  40. package/_form.scss +1 -1
  41. package/_vendor/preact/LICENSE +21 -0
  42. package/_vendor/preact/compat/src/index.d.ts +353 -0
  43. package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
  44. package/_vendor/preact/compat/src/suspense.d.ts +19 -0
  45. package/_vendor/preact/hooks/src/index.d.ts +145 -0
  46. package/_vendor/preact/src/dom.d.ts +2548 -0
  47. package/_vendor/preact/src/index.d.ts +373 -0
  48. package/_vendor/preact/src/jsx.d.ts +2958 -0
  49. package/activity-message.d.ts +1 -1
  50. package/activity-message.js +16 -16
  51. package/ai/_chat.scss +195 -0
  52. package/ai/_style.scss +105 -34
  53. package/ai/chat.d.ts +63 -0
  54. package/ai/components.d.ts +20 -4
  55. package/ai/index.d.ts +2 -0
  56. package/ai/index.js +3 -3
  57. package/ai/mount.d.ts +30 -1
  58. package/ai/prompt-history.d.ts +13 -0
  59. package/ai/request-trail.d.ts +1 -1
  60. package/ai/transcript.d.ts +25 -0
  61. package/ai/translation-context.d.ts +1 -1
  62. package/ai/translations.d.ts +1 -1
  63. package/alert.d.ts +2 -2
  64. package/angular/angular.js +0 -3
  65. package/assignee/field.d.ts +2 -2
  66. package/assignee/index.js +86 -87
  67. package/assignee/layout.d.ts +2 -2
  68. package/assignee/picker.d.ts +1 -1
  69. package/avatar/index.js +25 -25
  70. package/avatar/index.view.d.ts +1 -1
  71. package/brush-range/component.d.ts +1 -1
  72. package/brush-range/component.js +30 -30
  73. package/buttons/delete-button.d.ts +2 -1
  74. package/buttons/delete-button.js +1 -1
  75. package/buttons/remove-button.d.ts +1 -1
  76. package/buttons/remove-button.js +3 -3
  77. package/buttons/svg-button.d.ts +2 -1
  78. package/buttons/svg-button.js +35 -35
  79. package/calendar/_calendar.scss +7 -2
  80. package/calendar/calendar.d.ts +1 -1
  81. package/calendar/calendar.js +1 -1
  82. package/calendar/caption.d.ts +1 -1
  83. package/calendar/day.d.ts +1 -1
  84. package/calendar/day.js +4 -4
  85. package/calendar/header.d.ts +1 -1
  86. package/calendar/header.js +35 -35
  87. package/calendar/index.js +2 -2
  88. package/calendar/month-grid.d.ts +1 -1
  89. package/calendar/month-grid.js +37 -37
  90. package/calendar/picker.d.ts +1 -1
  91. package/calendar/types.d.ts +1 -1
  92. package/calendar/year-grid.d.ts +1 -1
  93. package/calendar/year-grid.js +12 -12
  94. package/checkbox/index.d.ts +2 -2
  95. package/checkbox/index.js +9 -9
  96. package/choice-chips/index.d.ts +1 -1
  97. package/choice-chips/index.js +1 -1
  98. package/color-palette/color-palette.d.ts +1 -1
  99. package/color-palette/color-palette.js +1 -1
  100. package/color-palette/color-picker.d.ts +1 -1
  101. package/color-palette/color-picker.js +2 -2
  102. package/component-catalog.d.ts +34 -23
  103. package/control-attributes.js +7 -7
  104. package/control-presentation.js +18 -18
  105. package/controls.d.ts +12 -10
  106. package/controls.js +3 -3
  107. package/core/editor-commit.d.ts +1 -1
  108. package/core/editor-popup.d.ts +1 -1
  109. package/core/editor-popup.js +1 -1
  110. package/date-time/date-control.d.ts +1 -1
  111. package/date-time/field.d.ts +2 -2
  112. package/date-time/index.js +1 -1
  113. package/date-time/picker.d.ts +1 -1
  114. package/date-time/style.scss +4 -4
  115. package/date-time/time-control.d.ts +1 -1
  116. package/date-time/time-selection.d.ts +1 -1
  117. package/date-time/types.d.ts +1 -1
  118. package/dialog/dialog-action-footer.view.d.ts +1 -1
  119. package/dialog/dialog.dom.js +52 -52
  120. package/dialog/dialog.parts.d.ts +18 -18
  121. package/dialog/dialog.parts.js +1 -1
  122. package/dialog/dialog.preact.d.ts +1 -1
  123. package/dialog/dialog.preact.js +6 -6
  124. package/distribution-chart/area-chart.d.ts +1 -1
  125. package/distribution-chart/area-chart.js +25 -25
  126. package/distribution-chart/bar-chart.d.ts +6 -3
  127. package/distribution-chart/bar-chart.js +10 -6
  128. package/distribution-chart/chart-frame.d.ts +3 -2
  129. package/distribution-chart/index.d.ts +1 -1
  130. package/distribution-chart/index.js +6 -6
  131. package/distribution-chart/line-chart.d.ts +1 -1
  132. package/distribution-chart/line-chart.js +9 -9
  133. package/distribution-chart/types.d.ts +1 -1
  134. package/dropdown/content.d.ts +3 -2
  135. package/dropdown/content.js +1 -141
  136. package/dropdown/control.d.ts +14 -0
  137. package/dropdown/control.js +1 -0
  138. package/dropdown/control.view.d.ts +6 -0
  139. package/dropdown/dropdown.service.d.ts +1 -1
  140. package/dropdown/dropdown.service.js +9 -9
  141. package/dropdown/dropdown.types.d.ts +4 -0
  142. package/dropdown/editor-dropdown.style.scss +37 -9
  143. package/dropdown/index.d.ts +1 -1
  144. package/dropdown/index.js +3 -4
  145. package/dropdown/lookup-field.d.ts +1 -1
  146. package/dropdown/lookup-field.js +41 -41
  147. package/dropdown/popup.d.ts +1 -1
  148. package/dropdown/popup.js +1 -140
  149. package/duration/controls.d.ts +1 -1
  150. package/duration/index.d.ts +2 -2
  151. package/duration/index.js +1 -1
  152. package/duration/style.scss +1 -1
  153. package/editor-actions.d.ts +1 -1
  154. package/editor-actions.js +21 -20
  155. package/editor-layout/index.d.ts +1 -1
  156. package/editor-layout/index.js +27 -27
  157. package/field-configurator.d.ts +1 -1
  158. package/field-configurator.js +93 -93
  159. package/field-reorder.hook.js +32 -32
  160. package/fieldset.d.ts +3 -0
  161. package/filter/filters/slider/preact.js +3 -3
  162. package/filter/filters/slider/single.d.ts +1 -1
  163. package/filter/filters/slider/single.js +23 -23
  164. package/filter-badge.d.ts +1 -1
  165. package/filter-badge.js +23 -22
  166. package/filter-controls.d.ts +1 -1
  167. package/filter-controls.js +30 -30
  168. package/form-controls/field-context.d.ts +5 -0
  169. package/form-controls/index.js +16 -21
  170. package/form-controls/index.view.d.ts +2 -4
  171. package/form-controls/presentation.d.ts +1 -1
  172. package/form-controls/presentation.js +59 -51
  173. package/formatting/comparison-preview.d.ts +1 -1
  174. package/formatting/control-tooltip.d.ts +1 -1
  175. package/formatting/icon-controls.d.ts +1 -1
  176. package/formatting/index.js +105 -100
  177. package/formatting/inspector-section.d.ts +1 -1
  178. package/formatting/typography-controls.d.ts +1 -1
  179. package/framework-mount.d.ts +1 -1
  180. package/framework.js +215 -207
  181. package/history-controls.d.ts +14 -0
  182. package/history-controls.js +1 -0
  183. package/icons/icon.d.ts +1 -1
  184. package/icons/icon.js +1 -1
  185. package/legend.d.ts +1 -1
  186. package/legend.js +12 -12
  187. package/masked-input/index.d.ts +1 -1
  188. package/masked-input/index.js +109 -109
  189. package/native-control.d.ts +14 -12
  190. package/native-control.js +3 -26
  191. package/native-styles.css +1 -1
  192. package/native.js +40 -39
  193. package/number-input/index.d.ts +1 -1
  194. package/number-input/index.js +1 -1
  195. package/package.json +18 -14
  196. package/pagination.d.ts +3 -0
  197. package/pagination.js +43 -33
  198. package/pdf-viewer/component.d.ts +1 -1
  199. package/pdf-viewer/controller.js +1 -1
  200. package/pdf-viewer/header.d.ts +1 -1
  201. package/pdf-viewer/index.js +13 -13
  202. package/pdf-viewer/search-bar.d.ts +1 -1
  203. package/pdf-viewer/status.d.ts +1 -1
  204. package/pdf-viewer/style.scss +3 -4
  205. package/pdf-viewer/toolbar.d.ts +1 -1
  206. package/pickers.d.ts +1 -1
  207. package/preact-mount.d.ts +1 -1
  208. package/preact-mount.js +1 -1
  209. package/preact.d.ts +2 -0
  210. package/preact.js +62 -62
  211. package/rating-choice.d.ts +1 -1
  212. package/rating-choice.js +1 -1
  213. package/react-adapter.d.ts +1 -1
  214. package/react-control.d.ts +0 -1
  215. package/react-control.js +2 -2
  216. package/react.d.ts +13 -3
  217. package/react.js +71 -88
  218. package/reorder-list.d.ts +1 -1
  219. package/reorder-list.js +1 -1
  220. package/resource-picker/resource-picker-avatar.d.ts +1 -1
  221. package/resource-picker/resource-picker-avatar.js +14 -14
  222. package/resource-picker/resource-picker-option.d.ts +1 -1
  223. package/resource-picker/resource-picker-option.js +28 -28
  224. package/resource-picker/resource-picker-popup.d.ts +1 -1
  225. package/resource-picker/resource-picker-popup.js +3 -3
  226. package/resource-picker/resource-picker.d.ts +1 -1
  227. package/resource-picker/resource-picker.js +88 -88
  228. package/resource-picker/resource-picker.scss +6 -3
  229. package/rich-text/engine.d.ts +16 -19
  230. package/rich-text/index.d.ts +7 -7
  231. package/rich-text/index.js +1 -1
  232. package/rich-text/model.d.ts +4 -3
  233. package/rich-text/render-model.d.ts +4 -5
  234. package/rich-text/style.scss +3 -12
  235. package/rich-text/toolbar.d.ts +7 -7
  236. package/rich-text/translations.d.ts +3 -15
  237. package/search-input/index.js +12 -12
  238. package/segmented-switch/index.d.ts +1 -1
  239. package/segmented-switch/index.js +1 -1
  240. package/select.d.ts +20 -0
  241. package/select.js +1 -0
  242. package/status-feedback/exit-snapshot.js +4 -4
  243. package/status-feedback/index.js +2 -2
  244. package/status-feedback/popover.js +10 -10
  245. package/status-feedback/render.d.ts +2 -2
  246. package/status-feedback/render.js +3 -44
  247. package/status-feedback/status-feedback.scss +7 -0
  248. package/status-feedback/types.d.ts +4 -0
  249. package/status-feedback/use-auto-dismiss.d.ts +3 -0
  250. package/styles/_compositions.scss +3 -1
  251. package/styles/_control.scss +12 -4
  252. package/styles/_primitives.scss +9 -8
  253. package/styles.css +1 -1
  254. package/surfaces.js +49 -49
  255. package/svelte/UiComponent.server.js +1 -48
  256. package/svelte/UiComponent.svelte +0 -21
  257. package/svelte.js +33 -68
  258. package/switch/index.js +15 -15
  259. package/time-grid.d.ts +1 -1
  260. package/time-grid.js +58 -58
  261. package/timeline-track/component.d.ts +5 -1
  262. package/timeline-track/index.js +91 -74
  263. package/timeline-track/model.d.ts +9 -0
  264. package/timeline-track/model.js +10 -1
  265. package/ui.css +1 -1
  266. package/vue-adapter.d.ts +1 -1
  267. package/vue.d.ts +138 -119
  268. package/vue.js +150 -174
  269. package/_chunks/calendar-BsDxCYhI.js +0 -248
  270. package/_chunks/chart-frame-BvxbmEU9.js +0 -126
  271. package/_chunks/choice-chips-0HfOnK_4.js +0 -110
  272. package/_chunks/color-picker-BRv-__AM.js +0 -138
  273. package/_chunks/component-D4PH5UZT.js +0 -859
  274. package/_chunks/date-time-DjucJmbc.js +0 -769
  275. package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
  276. package/_chunks/dropdown-CkGQBm1Q.js +0 -357
  277. package/_chunks/duration-BCaktcvz.js +0 -270
  278. package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
  279. package/_chunks/framework-mount-BKIOsvY-.js +0 -54
  280. package/_chunks/mount-0-8opf1j.js +0 -90
  281. package/_chunks/native.view-8q_nwQ7x.js +0 -32
  282. package/_chunks/picker-oazJ7sO_.js +0 -121
  283. package/_chunks/reorder-list-BV3kZXso.js +0 -59
  284. package/_chunks/request-trail-D0oVzdRd.js +0 -347
  285. package/_chunks/rich-text-2Rla349o.js +0 -477
  286. package/react-native-select.d.ts +0 -6
  287. package/rich-text/syntax.d.ts +0 -2
  288. package/vue-native-select.d.ts +0 -9
@@ -1,4 +1,4 @@
1
- import { h, ComponentChildren } from 'preact';
1
+ import { h, ComponentChildren } from './_vendor/preact/src/index';
2
2
  export interface ActivityMessageProps {
3
3
  className?: string;
4
4
  avatar: ComponentChildren;
@@ -1,40 +1,40 @@
1
- import { jsx as e, jsxs as t } from "preact/jsx-runtime";
1
+ import { t as e } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
2
2
  //#region src/activity-message.tsx
3
- function n({ className: n = "", avatar: r, timestamp: i, header: a, children: o, actions: s, details: c }) {
4
- return /* @__PURE__ */ t("article", {
5
- class: `rv-activity-message ${n}`,
3
+ function t({ className: t = "", avatar: n, timestamp: r, header: i, children: a, actions: o, details: s }) {
4
+ return /* @__PURE__ */ e("article", {
5
+ class: `rv-activity-message ${t}`,
6
6
  children: [
7
7
  /* @__PURE__ */ e("div", {
8
8
  class: "rv-activity-message-avatar",
9
- children: r
9
+ children: n
10
10
  }),
11
- /* @__PURE__ */ t("div", {
11
+ /* @__PURE__ */ e("div", {
12
12
  class: "rv-activity-message-card",
13
13
  children: [
14
- a && /* @__PURE__ */ e("div", {
14
+ i && /* @__PURE__ */ e("div", {
15
15
  class: "rv-activity-message-header",
16
- children: a
16
+ children: i
17
17
  }),
18
18
  /* @__PURE__ */ e("div", {
19
- class: `rv-activity-message-content${a ? " rv-activity-message-content--full" : ""}`,
20
- children: o
19
+ class: `rv-activity-message-content${i ? " rv-activity-message-content--full" : ""}`,
20
+ children: a
21
21
  }),
22
22
  /* @__PURE__ */ e("div", {
23
23
  class: "rv-activity-message-time",
24
- children: i
24
+ children: r
25
25
  }),
26
- s && /* @__PURE__ */ e("div", {
26
+ o && /* @__PURE__ */ e("div", {
27
27
  class: "rv-activity-message-actions",
28
- children: s
28
+ children: o
29
29
  })
30
30
  ]
31
31
  }),
32
- c && /* @__PURE__ */ e("div", {
32
+ s && /* @__PURE__ */ e("div", {
33
33
  class: "rv-activity-message-details",
34
- children: c
34
+ children: s
35
35
  })
36
36
  ]
37
37
  });
38
38
  }
39
39
  //#endregion
40
- export { n as ActivityMessage };
40
+ export { t as ActivityMessage };
package/ai/_chat.scss ADDED
@@ -0,0 +1,195 @@
1
+ .rv-ai-chat {
2
+ display: flex;
3
+ flex-direction: column;
4
+ min-width: 0;
5
+ min-height: 0;
6
+ width: 100%;
7
+ height: 100%;
8
+ color: var(--rv-ui-text);
9
+ background: var(--rv-ui-surface);
10
+ font: 400 0.875rem/1.55 var(--rv-ai-font, system-ui, sans-serif);
11
+ }
12
+ .rv-ai-chat-scroll {
13
+ position: relative;
14
+ display: flex;
15
+ flex: 1;
16
+ min-height: 0;
17
+ min-width: 0;
18
+ }
19
+ .rv-ai-chat-viewport {
20
+ flex: 1;
21
+ min-width: 0;
22
+ overflow: auto;
23
+ overscroll-behavior: contain;
24
+ overflow-anchor: none;
25
+ scrollbar-gutter: stable;
26
+ &:focus-visible {
27
+ outline: 2px solid var(--rv-ui-accent);
28
+ outline-offset: -2px;
29
+ }
30
+ }
31
+ .rv-ai-chat-content {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 1.5rem;
35
+ min-height: 100%;
36
+ padding: 1.25rem;
37
+ }
38
+ .rv-ai-chat-empty {
39
+ margin: auto;
40
+ text-align: center;
41
+ max-width: 24rem;
42
+ padding-block: 2rem;
43
+ }
44
+ .rv-ai-chat-empty p {
45
+ color: var(--rv-ui-text-muted);
46
+ margin-block: 0.5rem;
47
+ }
48
+ .rv-ai-chat-jump.rv-btn {
49
+ position: absolute;
50
+ inset-block-end: 0.75rem;
51
+ inset-inline-start: 50%;
52
+ transform: translateX(-50%);
53
+ box-shadow: 0 2px 12px var(--rv-ui-focus-ring);
54
+ white-space: nowrap;
55
+ }
56
+ .rv-ai-chat-composer {
57
+ flex: none;
58
+ padding: 0.75rem 1rem 1rem;
59
+ }
60
+ .rv-ai-message {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 0.625rem;
64
+ min-width: 0;
65
+ max-width: 100%;
66
+ align-self: flex-start;
67
+ }
68
+ .rv-ai-message-content {
69
+ white-space: pre-wrap;
70
+ overflow-wrap: anywhere;
71
+ min-width: 0;
72
+ }
73
+ .rv-ai-message--user {
74
+ align-self: flex-end;
75
+ max-width: 85%;
76
+ .rv-ai-message-content {
77
+ padding: 0.625rem 1rem;
78
+ border-radius: 1.125rem;
79
+ background: var(--rv-ui-surface-sunken);
80
+ }
81
+ .rv-ai-message-actions {
82
+ justify-content: flex-end;
83
+ }
84
+ }
85
+ .rv-ai-message--system {
86
+ color: var(--rv-ui-text-muted);
87
+ font-size: 0.8125rem;
88
+ align-self: center;
89
+ }
90
+ .rv-ai-message-actions {
91
+ display: flex;
92
+ align-items: center;
93
+ flex-wrap: wrap;
94
+ gap: 0.25rem;
95
+ }
96
+ .rv-ai-trace {
97
+ font-size: 0.8125rem;
98
+ min-width: 0;
99
+ }
100
+ .rv-ai-trace > .rv-disclosure-summary {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 0.5rem;
104
+ padding: 0.25rem 0;
105
+ color: var(--rv-ui-text-muted);
106
+ cursor: pointer;
107
+ }
108
+ .rv-ai-trace-heading {
109
+ display: inline-flex;
110
+ align-items: center;
111
+ gap: 0.5rem;
112
+ min-width: 0;
113
+ overflow-wrap: anywhere;
114
+ }
115
+ .rv-ai-trace-content {
116
+ padding: 0.625rem 0 0.25rem 1rem;
117
+ margin-inline-start: 0.5rem;
118
+ border-inline-start: 1px solid var(--rv-ui-border);
119
+ white-space: pre-wrap;
120
+ overflow-wrap: anywhere;
121
+ }
122
+ .rv-ai-task-item {
123
+ display: flex;
124
+ align-items: flex-start;
125
+ gap: 0.5rem;
126
+ padding-block: 0.3rem;
127
+ }
128
+ .rv-ai-task-icon {
129
+ display: inline-flex;
130
+ width: 1rem;
131
+ height: 1.25rem;
132
+ flex: none;
133
+ align-items: center;
134
+ justify-content: center;
135
+ svg {
136
+ width: 0.875rem;
137
+ height: 0.875rem;
138
+ }
139
+ &[data-status='error'] {
140
+ color: var(--rv-ui-danger);
141
+ }
142
+ &[data-status='running'] {
143
+ color: var(--rv-ui-accent);
144
+ }
145
+ }
146
+ @media (max-width: 480px) {
147
+ .rv-ai-chat-content {
148
+ padding: 1rem;
149
+ }
150
+ .rv-ai-message--user {
151
+ max-width: 95%;
152
+ }
153
+ }
154
+
155
+ .rv-ai-trace-chevron {
156
+ display: inline-flex;
157
+ align-items: center;
158
+ }
159
+ .rv-ai-trace[open] .rv-ai-trace-chevron {
160
+ transform: rotate(180deg);
161
+ }
162
+
163
+ .rv-ai-trace-line {
164
+ color: var(--rv-ui-text-muted);
165
+ padding-block: 0.25rem;
166
+ }
167
+
168
+ // Mounted assistants keep the composer in normal flow above the grid.
169
+ .rv-ai-mounted-chat {
170
+ height: auto;
171
+ .rv-ai-chat-viewport {
172
+ min-height: 0;
173
+ max-height: min(18rem, 40vh);
174
+ }
175
+ .rv-ai-chat-content {
176
+ min-height: 0;
177
+ padding: 0.75rem 0;
178
+ &:empty {
179
+ padding: 0;
180
+ }
181
+ }
182
+ .rv-ai-chat-composer {
183
+ padding: 0.75rem 0 0;
184
+ }
185
+ }
186
+ .rv-ai-chat-result {
187
+ max-width: 100%;
188
+ margin: 0;
189
+ padding: 0.625rem;
190
+ border-radius: 0.5rem;
191
+ background: var(--rv-ui-surface-sunken);
192
+ font: inherit;
193
+ white-space: pre-wrap;
194
+ overflow-wrap: anywhere;
195
+ }
package/ai/_style.scss CHANGED
@@ -1,3 +1,4 @@
1
+ @use './chat';
1
2
  .rv-ai-assistant {
2
3
  box-sizing: border-box;
3
4
  width: 100%;
@@ -18,11 +19,12 @@
18
19
  min-width: 0;
19
20
  }
20
21
  .rv-ai-prompt-composer {
21
- display: flex;
22
- flex-direction: column;
22
+ display: grid;
23
+ grid-template-columns: minmax(0, 1fr) auto;
24
+ align-items: end;
23
25
  min-width: 0;
24
26
  border: 1px solid var(--rv-ui-border);
25
- border-radius: calc(var(--rv-ui-radius, 6px) + 10px);
27
+ border-radius: 24px;
26
28
  background: var(--rv-ui-surface-sunken);
27
29
  transition:
28
30
  border-color var(--rv-ui-motion-fast, 120ms) var(--rv-ui-motion-ease, ease),
@@ -34,10 +36,12 @@
34
36
  }
35
37
  }
36
38
  .rv-ai-prompt-composer textarea.rv-control {
39
+ grid-column: 1;
40
+ grid-row: 1;
37
41
  display: block;
38
- min-height: 4.75rem;
42
+ min-height: 1.5rem;
39
43
  max-height: 12rem;
40
- padding: 0.875rem 1rem 0.5rem;
44
+ padding: 0.75rem 1rem;
41
45
  border: 0;
42
46
  border-radius: inherit;
43
47
  background: transparent;
@@ -52,25 +56,44 @@
52
56
  }
53
57
  }
54
58
  .rv-ai-prompt-toolbar {
59
+ grid-column: 2;
60
+ grid-row: 1;
55
61
  display: flex;
56
62
  gap: 0.75rem;
57
63
  align-items: center;
58
64
  justify-content: space-between;
59
65
  min-width: 0;
60
- padding: 0.375rem 0.625rem 0.625rem 1rem;
66
+ padding: 0.5rem 0.5rem 0.5rem 0;
61
67
  }
62
68
  .rv-ai-prompt-footer {
69
+ grid-column: 1 / -1;
70
+ grid-row: 2;
63
71
  min-width: 0;
64
72
  margin-inline: 1rem;
65
- padding-block: 0.625rem 0.25rem;
66
- border-block-start: 1px solid var(--rv-ui-border);
73
+ padding-block: 0.625rem;
67
74
  &:empty {
68
75
  display: none;
69
76
  }
70
77
  }
78
+ .rv-ai-prompt-composer:has(.rv-ai-prompt-hint) {
79
+ grid-template-columns: minmax(0, 1fr);
80
+ .rv-ai-prompt-toolbar {
81
+ grid-column: 1;
82
+ grid-row: 3;
83
+ padding-inline-start: 1rem;
84
+ }
85
+ }
71
86
  .rv-ai-request-trail {
72
87
  min-width: 0;
73
88
  }
89
+ .rv-ai-request-trail .rv-ai-trail-trigger {
90
+ color: var(--rv-ui-accent-text);
91
+ background: var(--rv-ui-selected-bg);
92
+ &:hover:not(:disabled), &:focus-visible {
93
+ color: var(--rv-ui-accent-text);
94
+ background: var(--rv-ui-selected-bg);
95
+ }
96
+ }
74
97
  .rv-ai-trail-trigger .rv-svg-icon {
75
98
  transition: transform var(--rv-ui-motion-fast, 120ms)
76
99
  var(--rv-ui-motion-ease, ease);
@@ -84,63 +107,86 @@
84
107
  max-width: calc(100% - 16px);
85
108
  max-height: min(30rem, calc(100dvh - 16px));
86
109
  padding: 0;
110
+ border-radius: 12px;
87
111
  font: inherit;
88
112
  &:focus {
89
113
  outline: none;
90
114
  }
91
115
  }
92
116
  .rv-ai-trail-header {
93
- padding: 0.75rem 0.875rem 0.5rem;
117
+ padding: 0.875rem 1rem 0.625rem;
94
118
  }
95
119
  .rv-ai-trail-label {
96
120
  display: flex;
97
121
  align-items: center;
98
122
  gap: 0.5rem;
99
- color: var(--rv-ui-text-muted);
123
+ color: var(--rv-ui-text);
100
124
  font-size: 0.75rem;
101
125
  font-weight: var(--rv-ui-font-weight-medium, 500);
102
126
  }
103
127
  .rv-ai-trail-steps {
104
128
  display: flex;
105
129
  flex-direction: column;
106
- gap: 0.375rem;
130
+ gap: 0.25rem;
107
131
  min-width: 0;
108
132
  margin: 0;
109
- padding: 0 0.5rem 0.5rem;
133
+ padding: 0 0.5rem 0.625rem;
110
134
  list-style: none;
111
135
  }
136
+ .rv-ai-step {
137
+ position: relative;
138
+ &:not(:last-child)::before {
139
+ content: '';
140
+ position: absolute;
141
+ left: 20px;
142
+ top: 32px;
143
+ bottom: -12px;
144
+ width: 1px;
145
+ background: var(--rv-ui-border);
146
+ }
147
+ }
112
148
  .rv-ai-step-chip {
113
149
  display: flex;
114
150
  align-items: flex-start;
115
151
  gap: 0.625rem;
116
152
  min-width: 0;
117
153
  padding: 0.5rem;
118
- border: 1px solid var(--rv-ui-border);
119
- border-radius: var(--rv-ui-radius, 6px);
120
- background: var(--rv-ui-surface);
154
+ border: 0;
155
+ border-radius: 8px;
156
+ background: transparent;
121
157
  color: var(--rv-ui-text);
122
158
  }
159
+ .rv-ai-step:hover .rv-ai-step-chip,
160
+ .rv-ai-step:focus-within .rv-ai-step-chip {
161
+ background: var(--rv-ui-surface-hover);
162
+ }
123
163
  .rv-ai-step[data-current] .rv-ai-step-chip {
124
- background: var(--rv-ui-selected-bg);
125
- border-color: color-mix(
126
- in srgb,
127
- var(--rv-ui-accent) 30%,
128
- var(--rv-ui-border)
129
- );
164
+ background: color-mix(in srgb, var(--rv-ui-selected-bg) 55%, var(--rv-ui-surface));
130
165
  }
131
166
  .rv-ai-step-number {
167
+ position: relative;
168
+ box-sizing: border-box;
132
169
  flex: none;
133
- min-width: 1.25rem;
134
- padding-block: 0.25rem;
170
+ min-width: 24px;
171
+ height: 24px;
172
+ margin-block: 2px;
173
+ padding: 0 4px;
174
+ border-radius: 999px;
175
+ background: var(--rv-ui-surface-sunken);
135
176
  color: var(--rv-ui-text-muted);
136
177
  font-size: 0.6875rem;
137
178
  font-variant-numeric: tabular-nums;
138
179
  text-align: center;
180
+ line-height: 24px;
181
+ }
182
+ .rv-ai-step[data-current] .rv-ai-step-number {
183
+ background: var(--rv-ui-accent);
184
+ color: var(--rv-ui-accent-contrast, #fff);
139
185
  }
140
186
  .rv-ai-step-label {
141
187
  flex: 1;
142
188
  min-width: 0;
143
- padding-block: 0.1875rem;
189
+ padding-block: 0.25rem;
144
190
  overflow-wrap: anywhere;
145
191
  white-space: pre-wrap;
146
192
  font-size: 0.75rem;
@@ -178,27 +224,43 @@
178
224
  overflow-wrap: anywhere;
179
225
  }
180
226
  .rv-ai-prompt-toolbar .rv-ai-prompt-submit {
181
- --rv-icon-button-size: 32px;
227
+ --rv-icon-button-size: 30px;
228
+ min-height: var(--rv-icon-button-size);
182
229
  flex: 0 0 auto;
183
- padding: 0.5rem;
230
+ padding: 0.25rem;
184
231
  border-radius: 50%;
185
232
  }
186
233
  .rv-ai-suggestions {
187
234
  display: flex;
188
- gap: 0.5rem;
235
+ flex-wrap: wrap;
236
+ align-items: center;
237
+ gap: 0.375rem;
189
238
  min-width: 0;
190
- overflow-x: auto;
191
- overscroll-behavior-x: contain;
192
- scroll-padding-inline: 4px;
193
- scrollbar-width: thin;
194
- // Give keyboard focus outlines room inside the scrolling row.
239
+ // Leave room for focus outlines.
195
240
  padding: 4px;
196
241
  margin: -4px;
197
242
  }
243
+ .rv-ai-suggestions .dropdown-container.rv-ai-examples {
244
+ flex: 0 0 28px;
245
+ width: 28px;
246
+ height: 28px;
247
+ }
248
+ .rv-ai-examples .dropdown-trigger {
249
+ justify-content: center;
250
+ width: 28px;
251
+ height: 28px;
252
+ padding: 0;
253
+ border: 0;
254
+ border-radius: var(--rv-ui-radius, 6px);
255
+ background: transparent;
256
+ color: var(--rv-ui-text);
257
+ font-size: 0.75rem;
258
+ line-height: 1.25;
259
+ }
198
260
  .rv-ai-suggestions .rv-ai-suggestion {
199
261
  flex: 0 0 auto;
200
- min-height: 32px;
201
- padding: 0.5rem 0.75rem;
262
+ min-height: 28px;
263
+ padding: 0.25rem 0.625rem;
202
264
  border-radius: 999px;
203
265
  font-size: 0.75rem;
204
266
  line-height: 1.25;
@@ -250,3 +312,12 @@
250
312
  outline-offset: 2px;
251
313
  }
252
314
  }
315
+
316
+ .rv-ai-result-details {
317
+ margin: 0;
318
+ max-height: 16rem;
319
+ overflow: auto;
320
+ white-space: pre-wrap;
321
+ overflow-wrap: anywhere;
322
+ font-size: 0.875em;
323
+ }
package/ai/chat.d.ts ADDED
@@ -0,0 +1,63 @@
1
+ import { h, ComponentChildren, JSX } from '../_vendor/preact/src/index';
2
+ import { AiPromptInputProps } from './components';
3
+ import { AiUiTranslations } from './translations';
4
+ export interface AiChatPartProps {
5
+ children?: ComponentChildren;
6
+ className?: string;
7
+ translations?: AiUiTranslations;
8
+ }
9
+ export interface AiChatProps extends AiChatPartProps {
10
+ label?: string;
11
+ style?: JSX.CSSProperties;
12
+ }
13
+ /** Presentation only. The host owns transcript, provider, actions and persistence. */
14
+ export declare function AiChat({ children, className, label, style, translations, }: AiChatProps): h.JSX.Element;
15
+ export interface AiChatContentProps extends AiChatPartProps {
16
+ label?: string;
17
+ /** Follow updates only while the reader remains at the live edge. */
18
+ autoScroll?: boolean;
19
+ busy?: boolean;
20
+ jumpLabel?: string;
21
+ }
22
+ /** Scroll measurement belongs to this visual viewport, never to a grid/data owner. */
23
+ export declare function AiChatContent({ children, className, autoScroll, busy, label, jumpLabel, translations, }: AiChatContentProps): h.JSX.Element;
24
+ export interface AiChatEmptyStateProps extends AiChatPartProps {
25
+ title?: string;
26
+ description?: string;
27
+ }
28
+ export declare function AiChatEmptyState({ title, description, children, className, translations, }: AiChatEmptyStateProps): h.JSX.Element;
29
+ /** Existing composer behavior, with chat-specific defaults. */
30
+ export declare function AiChatComposer(props: AiPromptInputProps): h.JSX.Element;
31
+ export interface AiMessageProps extends AiChatPartProps {
32
+ from: 'user' | 'assistant' | 'system';
33
+ label?: string;
34
+ isStreaming?: boolean;
35
+ }
36
+ export declare function AiMessage({ from, label, isStreaming, children, className, translations, }: AiMessageProps): h.JSX.Element;
37
+ /** Text stays text. Hosts can supply their own trusted Markdown renderer as children. */
38
+ export declare function AiMessageContent({ children, className, }: AiChatPartProps): h.JSX.Element;
39
+ export interface AiMessageActionsProps extends AiChatPartProps {
40
+ label?: string;
41
+ }
42
+ export declare function AiMessageActions({ children, className, label, translations, }: AiMessageActionsProps): h.JSX.Element;
43
+ export type AiTaskStatus = 'pending' | 'running' | 'completed' | 'error' | 'cancelled';
44
+ export interface AiTaskProps extends AiChatPartProps {
45
+ title: string;
46
+ status?: AiTaskStatus;
47
+ open?: boolean;
48
+ defaultOpen?: boolean;
49
+ onOpenChange?(open: boolean): void;
50
+ }
51
+ export declare function AiTask(props: AiTaskProps): h.JSX.Element;
52
+ export interface AiTaskItemProps extends AiChatPartProps {
53
+ status?: AiTaskStatus;
54
+ }
55
+ export declare function AiTaskItem({ status, children, className, translations, }: AiTaskItemProps): h.JSX.Element;
56
+ export interface AiReasoningProps extends Omit<AiTaskProps, 'title' | 'status'> {
57
+ title?: string;
58
+ isStreaming?: boolean;
59
+ /** Host-supplied elapsed seconds; no hidden timer or invented reasoning. */
60
+ duration?: number;
61
+ }
62
+ /** Render only reasoning/summary text explicitly supplied by the host or provider. */
63
+ export declare function AiReasoning({ title, isStreaming, duration, children, translations, ...props }: AiReasoningProps): h.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { AiUiTranslations } from './translations';
2
- import { h, ComponentChildren, ComponentProps } from 'preact';
2
+ import { h, ComponentChildren, ComponentProps } from '../_vendor/preact/src/index';
3
3
  import { Textarea } from '../controls';
4
- export type AiActionPhase = 'idle' | 'understanding' | 'applying' | 'completed' | 'clarification' | 'unsupported' | 'error' | 'cancelled';
4
+ export type AiActionPhase = 'idle' | 'understanding' | 'applying' | 'preview' | 'completed' | 'clarification' | 'unsupported' | 'error' | 'cancelled';
5
5
  export interface AiPromptInputProps {
6
6
  translations?: AiUiTranslations;
7
7
  value: string;
@@ -14,6 +14,8 @@ export interface AiPromptInputProps {
14
14
  placeholder?: string;
15
15
  submitLabel?: string;
16
16
  stopLabel?: string;
17
+ /** Opt-in local prompt recall. Arrow keys retain normal multiline behavior away from text edges. */
18
+ promptHistory?: readonly string[];
17
19
  /** Empty-draft keyboard guidance. An empty string lets toolbar context replace it. */
18
20
  hint?: string;
19
21
  /** Host-supported actions or context, displayed in the composer toolbar. */
@@ -24,10 +26,14 @@ export interface AiPromptInputProps {
24
26
  textareaProps?: Pick<ComponentProps<typeof Textarea>, 'className' | 'style' | 'rows'>;
25
27
  }
26
28
  /** Shared composer: Enter submits, Shift+Enter inserts a line; IME never submits. */
27
- export declare function AiPromptInput({ translations, value, onValueChange, onSubmit, onStop, busy, disabled, label, placeholder, submitLabel, stopLabel, hint, actions, footer, textareaProps, }: AiPromptInputProps): h.JSX.Element;
29
+ export declare function AiPromptInput({ translations, value, onValueChange, onSubmit, onStop, busy, disabled, label, placeholder, submitLabel, stopLabel, promptHistory, hint, actions, footer, textareaProps, }: AiPromptInputProps): h.JSX.Element;
30
+ export interface AiSuggestionChoice {
31
+ label: string;
32
+ prompt: string;
33
+ }
28
34
  export interface AiSuggestionsProps {
29
35
  translations?: AiUiTranslations;
30
- items: readonly string[];
36
+ items: readonly (string | AiSuggestionChoice)[];
31
37
  onSelect(value: string): void;
32
38
  disabled?: boolean;
33
39
  label?: string;
@@ -57,3 +63,13 @@ export interface AiAssistantProps {
57
63
  }
58
64
  /** Neutral composition; grid/model/query policy remains in the consuming product. */
59
65
  export declare function AiAssistant({ translations, label, children, footer, busy, }: AiAssistantProps): h.JSX.Element;
66
+ export interface AiChangePreviewProps {
67
+ translations?: AiUiTranslations;
68
+ summary: string;
69
+ details?: string;
70
+ disabled?: boolean;
71
+ onApply(): void;
72
+ onCancel(): void;
73
+ }
74
+ /** Generic approval surface; the host retains the prepared command and its mutation policy. */
75
+ export declare function AiChangePreview({ translations, summary, details, disabled, onApply, onCancel, }: AiChangePreviewProps): h.JSX.Element;
package/ai/index.d.ts CHANGED
@@ -2,4 +2,6 @@ export * from './components';
2
2
  export * from './mount';
3
3
  export * from './request-trail';
4
4
  export * from './translations';
5
+ export type { AiPromptHistoryOptions } from './prompt-history';
5
6
  export { AiTranslationProvider } from './translation-context';
7
+ export * from './chat';
package/ai/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../_chunks/request-trail-D0oVzdRd.js";
2
- import { t as l } from "../_chunks/mount-0-8opf1j.js";
3
- export { t as AI_UI_MESSAGES, i as AiActionStatus, o as AiAssistant, n as AiPromptInput, c as AiRequestTrail, e as AiResult, a as AiSuggestions, s as AiTranslationProvider, l as mountAiAssistant, r as translateAiText };
1
+ import { t as e } from "../_chunks/mount-DQ1cpppK.js";
2
+ import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, x as y, y as b } from "../_chunks/request-trail-DSlFix6i.js";
3
+ export { r as AI_UI_MESSAGES, o as AiActionStatus, m as AiAssistant, d as AiChangePreview, f as AiChat, h as AiChatComposer, l as AiChatContent, n as AiChatEmptyState, p as AiMessage, g as AiMessageActions, i as AiMessageContent, c as AiPromptInput, u as AiReasoning, _ as AiRequestTrail, s as AiResult, t as AiSuggestions, v as AiTask, a as AiTaskItem, b as AiTranslationProvider, e as mountAiAssistant, y as translateAiText };
package/ai/mount.d.ts CHANGED
@@ -1,17 +1,44 @@
1
1
  import { AiUiTranslations } from './translations';
2
- import { AiActionPhase, AiPromptInputProps } from './components';
2
+ import { AiActionPhase, AiPromptInputProps, AiSuggestionChoice } from './components';
3
3
  import { AiRequestTrailItem, AiRequestTrailProps } from './request-trail';
4
+ import { AiPromptHistoryOptions } from './prompt-history';
4
5
  export interface AiAssistantMountState {
5
6
  phase: AiActionPhase;
7
+ /** Accepted public user request only; never an internal model prompt. */
8
+ request?: {
9
+ id: string;
10
+ prompt: string;
11
+ };
12
+ /** Increment to clear the local chat transcript and composer. */
13
+ chatKey?: number;
6
14
  message: string;
15
+ /** Plain text from a bounded host-owned action result. */
16
+ resultDetails?: string;
17
+ pendingAction?: {
18
+ summary: string;
19
+ details?: string;
20
+ };
21
+ canUndoData?: boolean;
22
+ canRedoData?: boolean;
7
23
  matchedRows?: number;
8
24
  canRestore?: boolean;
9
25
  suggestions?: readonly string[];
26
+ choices?: readonly AiSuggestionChoice[];
10
27
  steps?: readonly AiRequestTrailItem[];
11
28
  canEditSteps?: boolean;
12
29
  }
13
30
  export interface AiAssistantMountOptions {
31
+ mode?: 'toolbar' | 'chat';
32
+ onClearChat?(): void;
33
+ /** Local input recall and optional host persistence; never sent to the model automatically. */
34
+ promptHistory?: AiPromptHistoryOptions;
35
+ /** Auto-dismiss settled activity messages; disabled unless configured. */
36
+ activityDurationMs?: number;
14
37
  translations?: AiUiTranslations;
38
+ onApplyAction?(): void;
39
+ onCancelAction?(): void;
40
+ onUndoData?(): void;
41
+ onRedoData?(): void;
15
42
  onSubmit(prompt: string): void;
16
43
  onStop(): void;
17
44
  onRestore(): void;
@@ -29,5 +56,7 @@ export interface AiAssistantMountOptions {
29
56
  /** Framework-independent mount of the same TSX used by the public components. */
30
57
  export declare function mountAiAssistant(host: HTMLElement, options: AiAssistantMountOptions): {
31
58
  update(state: AiAssistantMountState): void;
59
+ /** Update example choices without remounting the composer or losing its draft. */
60
+ setSuggestions(items: readonly string[]): void;
32
61
  destroy(): void;
33
62
  };