@wpic/ui 0.9.83 → 0.9.146

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/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # Unreleased
2
2
 
3
+ - 0.9.146: WBanner adds opt-in `appearance="filled"`, accessible pastel colors for all four variants and both themes, 14px/600 titles, 14px/500 descriptions, first-line icon alignment, and inherited host typography.
4
+
5
+ - 0.9.143: WAutocomplete uses WInput for consistent controls; WInput supports inputAttrs on its native input.
6
+
7
+ - 0.9.142: WAutocomplete combines direct free-text input with all-options-on-focus suggestions, search and keyboard selection.
8
+
9
+ - 0.9.141: WSelect accepts a createLabel formatter for localized free-text creation.
10
+
11
+ - 0.9.140: free-text suggestions show all existing values when editing opens; filtering starts only when typing.
12
+
13
+ - 0.9.139: WTable columns support free text with row-scoped suggestions, filtered as you type. Select with mouse or arrows/Enter; Enter/blur saves free text and Escape cancels.
14
+
15
+ - WTable: single-line columns size to their headings and content instead of a uniform 180px, with a configurable maximum and preserved manual widths.
16
+
17
+ - WTable: text editors cover the entire cell, with a small inner text inset and no outer frame. Long values expand over adjacent cells.
18
+
19
+ - WTable: edit short text in place; show truncated text in a border-only textarea overlapping its cell. Enter/blur saves and Escape cancels.
20
+
21
+ - WTable: opt-in single-line cells with double-click/Enter/F2 full-text viewer, textarea/select editors, explicit save/cancel, per-row permissions and cell-change events. WTableCell is available for custom slots.
22
+
23
+ ## 0.9.129
24
+
25
+ - WTable: opt-in stickyHeader/maxHeight and synchronized topScrollbar, keyboard-accessible scroll areas, localized scroll labels.
26
+
27
+ - 0.9.128: `WSelect` and `WSplitButton` support arrow/Home/End navigation, disabled-option skipping, selection/Escape focus restoration and logical Tab order. `menuKeydown` exposes the shared keyboard handler for host menus.
28
+
29
+ - 0.9.127: text-specific positive/trend colors meet AA contrast in both themes. Select placeholders and pagination counts use readable secondary text. Badge backgrounds and chart palettes are unchanged.
30
+
31
+ - 0.9.126: `WDateRangePicker` supports inclusive `maxDays`/`maxDate` and exposes the full range as a title. `WPageHeader` wraps between words. Opt-in `WCard wrapHeader` preserves long titles and lets actions flow below them.
32
+
33
+ - 0.9.125: `WTable` supports unknown server counts (`serverTotal=null`, `serverHasNext`, `labels.counting`) and capped counts (`serverTotalCapped`). Pending counts display only the loaded range; capped counts include `+`. Disabled/loading `WButton` controls retain the not-allowed cursor without enabling activation.
34
+
35
+ - Segmented controls use a flat input-like border, option dividers and a pale neutral selection, with normal text weight and no shadows.
36
+
37
+ - `WTable bordered` encloses inset tables in a rounded frame. Header and summary boundaries now use 2px rules.
38
+
39
+ - `WTag` and `WBadge` accept `color`: a CSS hue or explicit `{ light: { background, text, border? }, dark: { background, text, border? } }` colors. Standard variants are unchanged; automatic and explicit themes are supported.
40
+ - `WTable` uses `text-base` for table content. Total rows now share the header's neutral background and `--wpic-table-header` override instead of the theme's raised surface.
41
+
42
+ - `WTable topDivider` adds a top rule using the same colour as its row dividers, including when the table is wrapped inside a card.
43
+
44
+ - `WSelect` adds a `trigger` slot to customize the selected value inside its existing button while keeping the usual popover, keyboard behavior and option list.
45
+ - When the `trigger` slot is used, `WSelect` leaves the trigger icon to the slot instead of showing its default chevron.
46
+
47
+ - Toast surface after Sonner and macOS notifications: a near-solid dark card with light blur, a thin highlight on the inner top edge, a dark hairline separating it from the page and a soft deep shadow, 12px corners; darker in dark mode. Descriptions are a readable grey (`#a1a1aa`). `type: 'message'` toasts show the chat robot without a ring. A clickable toast lightens on hover.
48
+ - Toasts: `useToastStore().notify({ title, description, type, duration, key, onClick, lines })` returns the toast id. A `key` replaces the toast with the same key instead of stacking; `onClick` makes the whole toast a button (the close button only closes it); `lines` clamps the description; `type: 'message'` shows a message icon. Hovering or focusing a toast pauses its countdown. On phones (under 768px) toasts sit at the top, full width, below `--wpic-toast-mobile-top`. `show`, `success`, `error` and `info` are unchanged.
49
+ - `WChatPanel` adds an `empty` slot for the content of a conversation without messages (centered in `.wpic-chat-panel__empty`); without it the panel keeps its icon, `emptyTitle` and `emptyDescription`.
50
+ - `WChatPanel feedbackMenu` shows one rating button under each answer instead of the two thumbs; a click opens a small menu to choose helpful or not helpful (`feedbackLabel` names the button). The button shows the current rating. Opt-in; the two thumbs stay the default. The rating button and the start-new-chat-from-message button carry `wpic-chat-panel__feedback` and `wpic-chat-panel__fork` so hosts can style or hide them.
51
+ - `WBanner` (and `WAlert`) titles are semi-bold, and banner text takes the host page's text size instead of `text-sm`, so a banner is no longer smaller than the page text around it.
52
+ - `overlaySubmitBusy` shows the Send spinner while the host completes an `overlay-submit`, for example while a dictation sent directly is being transcribed.
53
+ - `composerOverlay` now covers only the composer's text area: the text area keeps its size underneath (hidden), the toolbar stays in place, and Send keeps its exact position and style but emits `overlay-submit` instead of sending (`overlaySubmitDisabled`, `overlaySubmitLabel`). Composers expose their button geometry as `--wpic-composer-action-size`, `--wpic-composer-action-radius`, `--wpic-composer-toolbar-height` and `--wpic-composer-text-inset`, so hosts can add toolbar buttons identical to Send. `composer-trailing` controls sit 8px apart and 8px from Send.
54
+ - `WChatComposer` exposes `submit()`, which sends the current draft exactly like the Send button (same checks, same `submit` event), for hosts that send on the user's behalf, such as a dictation sent directly.
55
+ - `WChatEditor.insertText(text)` (also on `WChatComposer`) inserts plain text at the caret or over the selection, adds a space on either side only where the neighbouring text needs one (none between Chinese, Japanese or Korean characters), and leaves the caret after the inserted text.
56
+ - `WChatPanel` and `WChatComposer` add a `composer-trailing` slot just before the Send button, for controls such as a dictation microphone, and a `composer-overlay` slot shown over the whole composer while `composerOverlay` is true. The overlay takes the composer's own surface and radius, so the composer keeps its size; it fades in over 180 ms, without motion when reduced motion is preferred.
57
+
58
+ - `WTableColumn.editable` (`boolean` or `(row) => boolean`) gives editable body cells the WSpreadsheet fill: pale yellow, a yellow tint over the surface in dark mode, and an inset primary ring while a control inside has focus. The fill is opaque, so a fixed first column stays solid. Themes can override it with `--wpic-table-editable`.
59
+
60
+ - `installWpicScrollReveal()` makes every scrollbar on the page thin, shown while its element scrolls and faded out afterwards (or shown while the pointer is on the thumb). It adds a root class on `<html>` and one capturing scroll listener; the fade honours reduced motion. Hosts can recolor a scroller with `--wpic-scrollbar-rgb` and `--wpic-scrollbar-max`.
61
+
62
+ - `WChatPanel navigatorExternal` makes the top-left navigator button toggle `v-model:navigatorOpen` without rendering the built-in navigator, so the host can show its own conversation list, for example beside a docked panel. In this mode the button shows `PanelRightOpen`, or `PanelRightClose` while the list is open.
63
+
64
+ - `WChatPanel allowUndock=false` hides the undock action of a docked panel in `headerMode="dock-close"`, for hosts that only offer docked or full-screen chat.
65
+
66
+ - Chat responses can expose a Retry action for the latest answer; the message editor reports the original draft before replacing it.
67
+ - Chat scrolling follows streaming only while the reader is near the bottom and offers a jump-to-latest control.
68
+ - Ordinary chat messages render Markdown tables, lists, links and code fences with safe HTML escaping and code copying.
69
+
70
+ - Chat send waits for an attachment's OSS upload and requires failed attachments to be removed, while allowing send during server-side file processing.
71
+
72
+ - `WChatComposer` allows sending text while an attachment is uploading or processing; the host chat handles the file state after submission.
73
+
74
+ - Embedded chat now uses a full-height conversation flow with a centered thread and bottom composer, without the floating panel header or frame.
75
+
76
+ - Hide the chat panel's decorative corner SVG in the default variant, including embedded workspaces.
77
+
78
+ - `WChatPanel embedded` renders inside a workspace container, with viewport dragging and resizing disabled.
79
+
80
+ - `WTable` can resize columns like a spreadsheet: `resizableColumns` adds a handle on each header's right edge (drag, or Left/Right by 10px; minimum 72px). `v-model:columnWidths` keeps the widths across remounts; once set, the table takes their sum and scrolls horizontally.
81
+
82
+ - `WInput variant="bare"` removes the border, background, focus ring and horizontal padding, so an editable value reads like the surrounding table text.
83
+
84
+ - `WSpreadsheet` can resize header columns by dragging their right edge or using Left/Right on the resize handle. `resizableColumns` enables the handles; `v-model:columnWidths` preserves widths across remounts.
85
+
3
86
  - `WTable` accepts `summaryPosition="both"` to repeat the native total row above and below the data.
4
87
 
5
88
  - `WTable` supports `summaryPosition="bottom"` to display a gray, bold total after the data rows; the existing top placement remains the default.
package/COMPONENTS.md CHANGED
@@ -175,6 +175,8 @@ Light badges have stronger fills and normal-weight labels. Default tags and badg
175
175
 
176
176
  ```ts
177
177
  variant?: 'info' | 'warning' | 'error' | 'success' // default info
178
+ appearance?: 'default' | 'filled' // default default
179
+ description?: string
178
180
  icon?: Component
179
181
  title?: string
180
182
  lead?: string
@@ -183,6 +185,18 @@ dismissLabel?: string // default "Dismiss"; localize in the caller
183
185
  theme?: 'auto' | 'light' | 'dark'
184
186
  ```
185
187
 
188
+ `appearance="filled"` adds stronger pastel backgrounds without borders, 12px corners,
189
+ a 20px icon aligned to the first line, and an optional dismiss button. The title
190
+ is 14px/600; the description (prop or default slot) is 14px/500, both with 20px
191
+ line height. It inherits the host font. All four variants support explicit light,
192
+ explicit dark, or automatic `.dark` themes. Existing default banners are unchanged.
193
+
194
+ ```vue
195
+ <WBanner appearance="filled" variant="info" title="Forecast: Saved draft"
196
+ description="Targets: v1 — Pending (reference only)" dismissible
197
+ dismiss-label="Dismiss source information" @close="showSource = false" />
198
+ ```
199
+
186
200
  Slots: default (body or standalone message), `actions`. Emits `close`. Warnings and errors use `role="alert"`; information and success use `role="status"`. Existing slot-only content is supported.
187
201
 
188
202
  ---
@@ -703,6 +717,8 @@ subColor?: string
703
717
 
704
718
  ## WTable
705
719
 
720
+ Text editor columns can define `suggestions: string[] | ((row) => string[])`. The cell remains free text and shows matching values in WPopover/WSelectOption. Suggestions never constrain new values; keyboard arrows select a suggestion, Enter/blur saves, and Escape cancels.
721
+
706
722
  **Import:** `import { WTable } from '@wpic/ui'`
707
723
 
708
724
  **Props:**
@@ -720,6 +736,16 @@ columnDividers?: boolean // vertical rules between cells, in the row divider
720
736
  verticalAlign?: 'top' | 'middle' | 'bottom' // body cells; omitted uses browser default
721
737
  ```
722
738
 
739
+ **Single-line cells:** set `singleLine` to keep rows compact, left-aligned by default, with ellipsis and a native full-value `title` on hover. Double-click, Enter or F2 opens a larger read-only text viewer. Column slots retain their custom rendering and receive the cell title. Column widths are measured from headings and content, capped by `maxColumnWidth` (360px by default). Empty or short columns remain compact. Explicit pixel widths and manual resizing take precedence; automatic measurements never overwrite user resizing.
740
+
741
+ For editing, set a column's `editor: 'textarea'` or `editor: 'select'`, with `options: string[]` for selects, optional `maxLength`, and `editable: row => canEdit(row)`. The editor respects per-row rights. Text that fits edits inside the cell. Truncated text opens a border-only textarea overlapping the cell. Enter or blur saves, Shift+Enter inserts a newline, and Escape discards. Select changes emit immediately. Handle `cell-change({row,column,value})` to persist; the component never writes to your data source. Localize actions through `labels.save` and `labels.cancel`. Custom slots can use the exported `WTableCell` primitive.
742
+
743
+ **Editable cells:** a column with `editable: true`, or `editable: row => boolean` for per-row rights, marks its body cells as editable in place with the WSpreadsheet fill (`#fffbeb`; a 10% yellow tint over the surface in dark mode) and an inset `--wpic-primary` ring while a control inside has focus. Put the input in the column slot; `editable` only styles the cell unless `editor` is configured. Override the fill with `--wpic-table-editable`.
744
+
745
+ ```ts
746
+ { field: 'name_en', label: 'English name', editable: row => canEdit(row) }
747
+ ```
748
+
723
749
  **Emits:**
724
750
  ```ts
725
751
  'row-click': [row: Record<string, unknown>]
@@ -855,7 +881,7 @@ For a shorter metric card, use `compact`. Use `changePosition="label"` to align
855
881
 
856
882
  ### Localization options (0.6.6)
857
883
 
858
- WTable accepts `labels` (`loading`, `results`, `of`, `item`, `items`, `previous`, `next`) and `loadingSpinner=false` for plain loading text. Existing `emptyText` and `searchPlaceholder` remain available. WSelect accepts `searchPlaceholder`, `selectAllLabel`, `clearLabel` and `noResultsLabel`; WFilterBar forwards `selectLabels` to its selects. WDateRangePicker accepts `locale`, `applyLabel`, `previousMonthLabel`, `nextMonthLabel` in addition to translated `presets`, `ariaLabel`, `clearLabel` and `placeholder`.
884
+ WTable accepts `resizableColumns` to let people widen or narrow a column by dragging the right edge of its header, or with Left/Right on the focused handle (10px steps, 72px minimum). Bind `v-model:columnWidths` (pixels by field) to keep the widths when the table remounts, and `resizeColumnLabel` to translate the handle's accessible name. WTable accepts `labels` (`loading`, `results`, `of`, `item`, `items`, `previous`, `next`) and `loadingSpinner=false` for plain loading text. Existing `emptyText` and `searchPlaceholder` remain available. WSelect accepts `searchPlaceholder`, `selectAllLabel`, `clearLabel` and `noResultsLabel`; WFilterBar forwards `selectLabels` to its selects. WDateRangePicker accepts `locale`, `applyLabel`, `previousMonthLabel`, `nextMonthLabel` in addition to translated `presets`, `ariaLabel`, `clearLabel` and `placeholder`.
859
885
 
860
886
  WSelect popovers support `popoverAutoPlacement` to choose the side with the most room and `popoverMinHeight` for a viewport-clamped minimum height. Set `popoverWidth` for compact triggers with longer menu labels.
861
887
 
@@ -869,7 +895,9 @@ Inline plain-text editing with Tiptap, inheriting the surrounding typography. Pr
869
895
 
870
896
  ### Neutral spreadsheet editing
871
897
 
872
- Use `WSpreadsheet appearance="plain"` for a uniform white surface (dark in dark mode), preserving grid lines and header typography. Pair slotted controls with `WInput variant="plain"` and `WSelect variant="plain"` to avoid nested borders. The default spreadsheet appearance is unchanged.
898
+ Use `WSpreadsheet appearance="plain"` for a uniform white surface (dark in dark mode), preserving grid lines and header typography. Pair slotted controls with `WInput variant="plain"` and `WSelect variant="plain"` to avoid nested borders. Use `WInput variant="bare"` inside a `WTable` cell when the value must align with the column text: it has no border, background, focus ring or horizontal padding. The default spreadsheet appearance is unchanged.
899
+
900
+ Set `resizableColumns` to let users drag the right edge of a header cell. The focused handle also accepts Left and Right arrows in 10 px steps. Bind `v-model:columnWidths` to a `Record<string, number>` to keep widths when the spreadsheet remounts; pass `resizeColumnLabel` for a localized handle label.
873
901
 
874
902
  WModal supports `size="screen"` (12px viewport gutters) and `:body-scroll="false"` for content that owns its scroll container.
875
903
 
@@ -942,3 +970,32 @@ i18n plugin or localStorage dependency.
942
970
  WSelect defaults to content-sized dropdowns (at least trigger width, capped to viewport). `popoverWidth` remains an explicit width override. WPopover exposes opt-in `fitAnchorContent` alongside `matchAnchorWidth`; other popovers retain exact anchor matching.
943
971
 
944
972
  `WButton variant="text"` renders a background-free action in both resting and hover states. With `active`, icon and label use indigo in light/dark themes; other variants retain their existing active surfaces.
973
+
974
+ ### Custom tag and badge colors
975
+
976
+ Both `WTag` and `WBadge` accept `color` (exported type `WSemanticColor`). Existing variants are unchanged. A CSS hue produces themed tints; explicit pairs provide control over contrast in both modes:
977
+
978
+ ```vue
979
+ <WTag color="#b42318">Low stock</WTag>
980
+ <WBadge :color="{ light: { background: '#eaf5e1', text: '#3f6b1a' }, dark: { background: '#283e23', text: '#d6edc2' } }">Healthy</WBadge>
981
+ ```
982
+
983
+ `theme="auto"` follows the surrounding theme; `light` and `dark` force the matching pair. An unchecked checkable tag retains its neutral appearance. `WTable` total rows use the same neutral surface as its header (`--wpic-table-header`).
984
+
985
+ ### Server pagination counts
986
+
987
+ `WTable` accepts `serverTotal: number | null`. Pass `null` while counting and `serverHasNext` when a following page may exist. The footer shows the loaded range and a spinner (`labels.counting`), without inventing a total. Use `serverTotalCapped` for a lower-bound count displayed with `+`. Omit `serverTotal` for local pagination.
988
+
989
+ `WDateRangePicker maxDate` limits the last selectable ISO date. `maxDays` counts start and end dates inclusively; invalid presets and custom ranges cannot be applied. `WCard wrapHeader` lets long titles and actions wrap instead of truncating the title.
990
+
991
+ ### Menu keyboard navigation (0.9.128)
992
+
993
+ `WSelect` and `WSplitButton` move focus to an enabled option when opened from the keyboard and support ArrowUp/Down, Home/End, native Enter/Space activation, Escape and focus restoration. Desktop Tab continues from the trigger's document position. Search inputs retain normal typing/caret keys; mobile selects retain the sheet's Tab trap and touch-opening focus behavior.
994
+
995
+ `menuKeydown(event, enabledItems, trigger, close)` is available for host menus built with WPIC popovers/buttons. The host owns opening, initial focus, activation and Escape (normally handled by `WPopover`). Pass only enabled items in visual order.
996
+
997
+ WTable scrolling: `stickyHeader` pins column headers inside a bounded scroll area (`maxHeight`, default `60vh` when sticky). `topScrollbar` adds a synchronized scrollbar above overflowing columns. Localize `labels.horizontalScroll` and `labels.tableScroll`. All options are opt-in; pagination and expanded rows stay in the existing table.
998
+
999
+ ## WAutocomplete
1000
+
1001
+ Free-text input with WPopover/WSelectOption suggestions. Props: `modelValue`, `options: string[]`, `label` (accessible input name), `disabled`, `maxLength`. Emits `update:modelValue` on every input or selection. Focus shows all options; typing filters them without restricting new text. Arrow keys navigate, Enter selects, Escape closes, and blur retains the typed value.
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ modelValue?: string | null;
3
+ options?: string[];
4
+ label: string;
5
+ disabled?: boolean;
6
+ maxLength?: number;
7
+ };
8
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (value: string) => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -1,7 +1,9 @@
1
1
  import { Component } from 'vue';
2
- import { WTheme } from './semantic/styles';
2
+ import { WSemanticColor, WTheme } from './semantic/styles';
3
3
  type __VLS_Props = {
4
4
  variant?: 'default' | 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info';
5
+ /** Custom CSS hue or explicit light/dark color pairs. */
6
+ color?: WSemanticColor;
5
7
  size?: 'sm' | 'md';
6
8
  dot?: boolean;
7
9
  icon?: Component;
@@ -18,8 +20,8 @@ type __VLS_Slots = {} & {
18
20
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
21
  variant: "default" | "neutral" | "primary" | "success" | "warning" | "error" | "info";
20
22
  size: "sm" | "md";
21
- theme: WTheme;
22
23
  bordered: boolean;
24
+ theme: WTheme;
23
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
27
  declare const _default: typeof __VLS_export;
@@ -2,20 +2,26 @@ import { Component } from 'vue';
2
2
  import { WTheme } from './semantic/styles';
3
3
  type __VLS_Props = {
4
4
  variant?: 'info' | 'warning' | 'error' | 'success';
5
+ appearance?: 'default' | 'filled';
5
6
  icon?: Component;
6
7
  title?: string;
8
+ description?: string;
7
9
  lead?: string;
8
10
  dismissible?: boolean;
9
11
  dismissLabel?: string;
10
12
  theme?: WTheme;
11
13
  };
12
- declare var __VLS_6: {}, __VLS_13: {}, __VLS_15: {};
14
+ declare var __VLS_6: {}, __VLS_8: {}, __VLS_20: {}, __VLS_27: {}, __VLS_29: {};
13
15
  type __VLS_Slots = {} & {
14
16
  default?: (props: typeof __VLS_6) => any;
15
17
  } & {
16
- default?: (props: typeof __VLS_13) => any;
18
+ actions?: (props: typeof __VLS_8) => any;
17
19
  } & {
18
- actions?: (props: typeof __VLS_15) => any;
20
+ default?: (props: typeof __VLS_20) => any;
21
+ } & {
22
+ default?: (props: typeof __VLS_27) => any;
23
+ } & {
24
+ actions?: (props: typeof __VLS_29) => any;
19
25
  };
20
26
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
27
  close: () => any;
@@ -23,6 +29,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
23
29
  onClose?: (() => any) | undefined;
24
30
  }>, {
25
31
  variant: "info" | "warning" | "error" | "success";
32
+ appearance: "default" | "filled";
26
33
  theme: WTheme;
27
34
  dismissible: boolean;
28
35
  dismissLabel: string;
@@ -12,6 +12,8 @@ type __VLS_Props = {
12
12
  headerDivider?: boolean;
13
13
  padding?: 'sm' | 'md' | 'lg';
14
14
  /** Header title size; does not affect action buttons. */
15
+ /** Let header actions flow below a full, wrapping title. */
16
+ wrapHeader?: boolean;
15
17
  titleSize?: 'base' | 'lg';
16
18
  };
17
19
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {}, __VLS_21: {}, __VLS_23: {}, __VLS_25: {};
@@ -7,6 +7,12 @@ type __VLS_Props = {
7
7
  placeholder: string;
8
8
  disabled?: boolean;
9
9
  showAttachments?: boolean;
10
+ /** Shows the composer-overlay slot over the text area; Send then emits overlay-submit. */
11
+ composerOverlay?: boolean;
12
+ overlaySubmitDisabled?: boolean;
13
+ /** Send shows a spinner while the host finishes the overlay submission. */
14
+ overlaySubmitBusy?: boolean;
15
+ overlaySubmitLabel?: string;
10
16
  showHistory?: boolean;
11
17
  historyOnly?: boolean;
12
18
  historyAnchor?: HTMLElement | null;
@@ -28,16 +34,26 @@ type __VLS_Props = {
28
34
  generalConversationLabel?: string;
29
35
  };
30
36
  declare function toggleHistory(): void;
37
+ declare function submit(): void;
31
38
  declare function openWithPrompt(prompt: string): Promise<void>;
32
- declare var __VLS_57: {};
39
+ declare function appendPrompt(prompt: string): Promise<void>;
40
+ declare var __VLS_57: {}, __VLS_59: {}, __VLS_67: {};
33
41
  type __VLS_Slots = {} & {
34
42
  'composer-actions'?: (props: typeof __VLS_57) => any;
43
+ } & {
44
+ 'composer-trailing'?: (props: typeof __VLS_59) => any;
45
+ } & {
46
+ 'composer-overlay'?: (props: typeof __VLS_67) => any;
35
47
  };
36
48
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
37
49
  openWithPrompt: typeof openWithPrompt;
50
+ appendPrompt: typeof appendPrompt;
38
51
  toggleHistory: typeof toggleHistory;
52
+ submit: typeof submit;
53
+ insertText: (text: string) => boolean;
39
54
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
40
55
  submit: (value: string) => any;
56
+ "overlay-submit": () => any;
41
57
  "select-session": (sessionId: string) => any;
42
58
  "files-selected": (files: File[]) => any;
43
59
  "remove-attachment": (attachment: WChatAttachment) => any;
@@ -45,6 +61,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
45
61
  "update:minimized": (value: boolean) => any;
46
62
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
47
63
  onSubmit?: ((value: string) => any) | undefined;
64
+ "onOverlay-submit"?: (() => any) | undefined;
48
65
  "onSelect-session"?: ((sessionId: string) => any) | undefined;
49
66
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
50
67
  "onRemove-attachment"?: ((attachment: WChatAttachment) => any) | undefined;
@@ -60,6 +77,10 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
60
77
  attachFilesLabel: string;
61
78
  removeAttachmentLabel: string;
62
79
  showAttachments: boolean;
80
+ composerOverlay: boolean;
81
+ overlaySubmitDisabled: boolean;
82
+ overlaySubmitBusy: boolean;
83
+ overlaySubmitLabel: string;
63
84
  attachments: WChatAttachment[];
64
85
  accept: string;
65
86
  locale: string;
@@ -1,18 +1,35 @@
1
+ type ChatMention = {
2
+ label: string;
3
+ kind: 'client' | 'report' | 'file';
4
+ };
5
+ type MentionTrigger = {
6
+ query: string;
7
+ from: number;
8
+ to: number;
9
+ };
1
10
  type __VLS_Props = {
2
11
  modelValue: string;
3
12
  placeholder: string;
4
13
  disabled?: boolean;
5
14
  minLines?: number;
6
15
  maxLines?: number;
16
+ mentions?: ChatMention[];
7
17
  };
8
18
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
9
19
  focus: () => boolean | undefined;
20
+ /** Insert plain text at the caret (or replace the selection), adding a space on each side only
21
+ * where the neighbouring text needs one, then leave the caret after it. */
22
+ insertText: (text: string) => boolean;
23
+ focusAtSelection: () => boolean | undefined;
24
+ replaceMention: (label: string, kind: ChatMention["kind"]) => boolean;
10
25
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
26
  "update:modelValue": (value: string) => any;
12
27
  submit: () => any;
28
+ "mention-trigger": (trigger: MentionTrigger | null) => any;
13
29
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
30
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
15
31
  onSubmit?: (() => any) | undefined;
32
+ "onMention-trigger"?: ((trigger: MentionTrigger | null) => any) | undefined;
16
33
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
34
  declare const _default: typeof __VLS_export;
18
35
  export default _default;
@@ -23,6 +23,8 @@ export interface WChatAttachment {
23
23
  mimeType?: string | null;
24
24
  bytes?: number | null;
25
25
  status?: 'ready' | 'loading' | 'error';
26
+ progress?: number | null;
27
+ phase?: 'uploading' | 'processing' | 'ready' | 'failed' | null;
26
28
  error?: string;
27
29
  displayUrl?: string | null;
28
30
  publicUrl?: string | null;
@@ -104,8 +106,15 @@ type __VLS_Props = {
104
106
  copyLabel?: string;
105
107
  copiedLabel?: string;
106
108
  newChatFromMessageLabel?: string;
109
+ retryLabel?: string;
110
+ retryableMessageId?: string | null;
111
+ jumpToLatestLabel?: string;
107
112
  attachFilesLabel?: string;
108
113
  removeAttachmentLabel?: string;
114
+ uploadingLabel?: string;
115
+ processingLabel?: string;
116
+ readyLabel?: string;
117
+ failedLabel?: string;
109
118
  stopLabel?: string;
110
119
  applyPromptLabel?: string;
111
120
  applyAllLabel?: string;
@@ -116,7 +125,17 @@ type __VLS_Props = {
116
125
  closeLabel?: string;
117
126
  helpfulLabel?: string;
118
127
  notHelpfulLabel?: string;
128
+ /** One rating button under each answer; a click opens a choice between helpful and not helpful. */
129
+ feedbackMenu?: boolean;
130
+ feedbackLabel?: string;
119
131
  showAttachments?: boolean;
132
+ /** Shows the composer-overlay slot over the composer's text area, for example a dictation in
133
+ * progress. The toolbar stays; Send then emits overlay-submit instead of sending the draft. */
134
+ composerOverlay?: boolean;
135
+ overlaySubmitDisabled?: boolean;
136
+ /** Send shows a spinner while the host finishes the overlay submission. */
137
+ overlaySubmitBusy?: boolean;
138
+ overlaySubmitLabel?: string;
120
139
  attachments?: WChatAttachment[];
121
140
  accept?: string;
122
141
  customAttachmentPicker?: boolean;
@@ -125,9 +144,17 @@ type __VLS_Props = {
125
144
  showNavigator?: boolean;
126
145
  /** Match the simple dock/close title bar used by workspace panels. */
127
146
  headerMode?: 'default' | 'dock-close';
147
+ /** With headerMode="dock-close", false hides the undock action while the panel is docked. */
148
+ allowUndock?: boolean;
149
+ /** The navigator button only toggles v-model:navigatorOpen; the host renders the navigator. */
150
+ navigatorExternal?: boolean;
151
+ navigatorOpen?: boolean;
152
+ /** Render in the parent layout instead of a viewport overlay. */
153
+ embedded?: boolean;
128
154
  hideNewConversation?: boolean;
129
155
  hideClear?: boolean;
130
156
  loading?: boolean;
157
+ conversationLoading?: boolean;
131
158
  cancellable?: boolean;
132
159
  docked?: boolean;
133
160
  /** Space around the docked panel, matching inset application layouts. */
@@ -148,9 +175,19 @@ type __VLS_Props = {
148
175
  };
149
176
  type __VLS_Slots = {
150
177
  'composer-actions'?: () => any;
178
+ /** Controls placed just before the Send button, such as a dictation microphone. */
179
+ 'composer-trailing'?: () => any;
180
+ /** Content covering the composer's text area while composerOverlay is true; the toolbar stays. */
181
+ 'composer-overlay'?: () => any;
182
+ 'message-attachments'?: (props: {
183
+ message: WChatMessage;
184
+ attachments: WChatAttachment[];
185
+ }) => any;
151
186
  'message-extra'?: (props: {
152
187
  message: WChatMessage;
153
188
  }) => any;
189
+ /** Content of a conversation without messages; replaces the icon, emptyTitle and emptyDescription. */
190
+ empty?: () => any;
154
191
  composer?: (props: {
155
192
  modelValue: string;
156
193
  placeholder: string;
@@ -165,6 +202,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
165
202
  cancel: () => any;
166
203
  close: () => any;
167
204
  send: (value: string) => any;
205
+ "overlay-submit": () => any;
168
206
  new: () => any;
169
207
  "new-project": () => any;
170
208
  "new-conversation": (projectId: string | null) => any;
@@ -176,6 +214,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
176
214
  "delete-session": (session: WChatSession) => any;
177
215
  "move-session": (session: WChatSession, projectId: string | null) => any;
178
216
  "edit-message": (message: WChatMessage) => any;
217
+ "retry-message": (message: WChatMessage) => any;
179
218
  "new-chat-from-message": (message: WChatMessage) => any;
180
219
  "message-feedback": (message: WChatMessage, rating: 1 | -1) => any;
181
220
  "apply-message-proposal": (message: WChatMessage, proposal: WChatActionProposal) => any;
@@ -184,6 +223,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
184
223
  "files-selected": (files: File[]) => any;
185
224
  "remove-attachment": (attachment: WChatAttachment) => any;
186
225
  "update:docked": (value: boolean) => any;
226
+ "update:navigatorOpen": (value: boolean) => any;
187
227
  "update:maximized": (value: boolean) => any;
188
228
  "update:width": (value: number) => any;
189
229
  "update:height": (value: number) => any;
@@ -195,6 +235,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
195
235
  onCancel?: (() => any) | undefined;
196
236
  onClose?: (() => any) | undefined;
197
237
  onSend?: ((value: string) => any) | undefined;
238
+ "onOverlay-submit"?: (() => any) | undefined;
198
239
  onNew?: (() => any) | undefined;
199
240
  "onNew-project"?: (() => any) | undefined;
200
241
  "onNew-conversation"?: ((projectId: string | null) => any) | undefined;
@@ -206,6 +247,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
206
247
  "onDelete-session"?: ((session: WChatSession) => any) | undefined;
207
248
  "onMove-session"?: ((session: WChatSession, projectId: string | null) => any) | undefined;
208
249
  "onEdit-message"?: ((message: WChatMessage) => any) | undefined;
250
+ "onRetry-message"?: ((message: WChatMessage) => any) | undefined;
209
251
  "onNew-chat-from-message"?: ((message: WChatMessage) => any) | undefined;
210
252
  "onMessage-feedback"?: ((message: WChatMessage, rating: 1 | -1) => any) | undefined;
211
253
  "onApply-message-proposal"?: ((message: WChatMessage, proposal: WChatActionProposal) => any) | undefined;
@@ -214,6 +256,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
214
256
  "onFiles-selected"?: ((files: File[]) => any) | undefined;
215
257
  "onRemove-attachment"?: ((attachment: WChatAttachment) => any) | undefined;
216
258
  "onUpdate:docked"?: ((value: boolean) => any) | undefined;
259
+ "onUpdate:navigatorOpen"?: ((value: boolean) => any) | undefined;
217
260
  "onUpdate:maximized"?: ((value: boolean) => any) | undefined;
218
261
  "onUpdate:width"?: ((value: number) => any) | undefined;
219
262
  "onUpdate:height"?: ((value: number) => any) | undefined;
@@ -223,16 +266,16 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
223
266
  variant: "default" | "glass";
224
267
  loading: boolean;
225
268
  modelValue: string;
226
- placeholder: string;
227
269
  title: string;
228
- width: number;
229
- minWidth: number;
230
- x: number;
231
- y: number;
232
270
  closeLabel: string;
233
271
  height: number;
272
+ x: number;
273
+ y: number;
274
+ width: number;
275
+ minWidth: number;
234
276
  minHeight: number;
235
277
  zIndex: number;
278
+ placeholder: string;
236
279
  mentionItems: WChatMentionItem[];
237
280
  projects: WChatProject[];
238
281
  sessions: WChatSession[];
@@ -259,8 +302,15 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
259
302
  copyLabel: string;
260
303
  copiedLabel: string;
261
304
  newChatFromMessageLabel: string;
305
+ retryLabel: string;
306
+ retryableMessageId: string | null;
307
+ jumpToLatestLabel: string;
262
308
  attachFilesLabel: string;
263
309
  removeAttachmentLabel: string;
310
+ uploadingLabel: string;
311
+ processingLabel: string;
312
+ readyLabel: string;
313
+ failedLabel: string;
264
314
  stopLabel: string;
265
315
  applyPromptLabel: string;
266
316
  applyAllLabel: string;
@@ -270,7 +320,13 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
270
320
  undockLabel: string;
271
321
  helpfulLabel: string;
272
322
  notHelpfulLabel: string;
323
+ feedbackMenu: boolean;
324
+ feedbackLabel: string;
273
325
  showAttachments: boolean;
326
+ composerOverlay: boolean;
327
+ overlaySubmitDisabled: boolean;
328
+ overlaySubmitBusy: boolean;
329
+ overlaySubmitLabel: string;
274
330
  attachments: WChatAttachment[];
275
331
  accept: string;
276
332
  customAttachmentPicker: boolean;
@@ -278,8 +334,13 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
278
334
  questionRailLabel: string;
279
335
  showNavigator: boolean;
280
336
  headerMode: "default" | "dock-close";
337
+ allowUndock: boolean;
338
+ navigatorExternal: boolean;
339
+ navigatorOpen: boolean;
340
+ embedded: boolean;
281
341
  hideNewConversation: boolean;
282
342
  hideClear: boolean;
343
+ conversationLoading: boolean;
283
344
  cancellable: boolean;
284
345
  docked: boolean;
285
346
  dockedInset: number;
@@ -21,6 +21,10 @@ type __VLS_Props = {
21
21
  disabled?: boolean;
22
22
  ariaLabel?: string;
23
23
  clearLabel?: string;
24
+ /** Latest selectable ISO date, inclusive. */
25
+ maxDate?: string;
26
+ /** Maximum number of calendar days, counting both endpoints. */
27
+ maxDays?: number;
24
28
  /** Choose the side with the most room using Floating UI. */
25
29
  popoverAutoPlacement?: boolean;
26
30
  size?: 'sm' | 'md' | 'lg';
@@ -13,8 +13,8 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
13
13
  onCommit?: ((value: string) => any) | undefined;
14
14
  }>, {
15
15
  disabled: boolean;
16
- placeholder: string;
17
16
  maxLength: number;
17
+ placeholder: string;
18
18
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  export default _default;
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ inputAttrs?: Record<string, unknown>;
2
3
  icon?: object | Function;
3
4
  label?: string;
4
5
  placeholder?: string;
@@ -8,7 +9,8 @@ type __VLS_Props = {
8
9
  size?: 'sm' | 'md' | 'lg' | 'xl';
9
10
  clearable?: boolean;
10
11
  loading?: boolean;
11
- variant?: 'default' | 'subtle' | 'plain';
12
+ /** `bare`: no border, background, focus ring or horizontal padding, for text that reads as a table cell. */
13
+ variant?: 'default' | 'subtle' | 'plain' | 'bare';
12
14
  prepend?: string | number;
13
15
  append?: string | number;
14
16
  };
@@ -16,6 +16,7 @@ type __VLS_Props = {
16
16
  multiple?: boolean;
17
17
  searchable?: boolean;
18
18
  creatable?: boolean;
19
+ createLabel?: (value: string) => string;
19
20
  closeLabel?: string;
20
21
  searchPlaceholder?: string;
21
22
  selectAllLabel?: string;
@@ -42,12 +43,20 @@ type __VLS_Props = {
42
43
  popoverMinHeight?: string;
43
44
  popoverMaxHeight?: string;
44
45
  };
45
- declare var __VLS_53: {
46
+ declare var __VLS_7: {
47
+ label: string;
48
+ option: any;
49
+ value: any;
50
+ open: any;
51
+ disabled: any;
52
+ }, __VLS_55: {
46
53
  option: any;
47
54
  isSelected: any;
48
55
  };
49
56
  type __VLS_Slots = {} & {
50
- option?: (props: typeof __VLS_53) => any;
57
+ trigger?: (props: typeof __VLS_7) => any;
58
+ } & {
59
+ option?: (props: typeof __VLS_55) => any;
51
60
  };
52
61
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
53
62
  "update:modelValue": (v: any) => any;