@wpic/ui 0.9.24 → 0.9.26
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 +11 -0
- package/COMPONENTS.md +52 -0
- package/dist/components/WChatComposer.vue.d.ts +64 -0
- package/dist/components/WChatEditor.vue.d.ts +17 -0
- package/dist/components/WChatPanel.vue.d.ts +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/wpic-ui.cjs +67 -66
- package/dist/wpic-ui.css +1 -1
- package/dist/wpic-ui.js +3761 -3322
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.9.26
|
|
2
|
+
|
|
3
|
+
- Keep the chat scroll viewport above the composer so its scrollbar and last message stay visible.
|
|
4
|
+
- Give docked chat a single rounded application surface with a subtle border and configurable dockedInset (8px by default).
|
|
5
|
+
- Open chat history on the robot click, including from the minimized launcher.
|
|
6
|
+
|
|
7
|
+
## 0.9.25
|
|
8
|
+
|
|
9
|
+
- Add WChatComposer and WChatEditor with the Perform glass design and generic host events.
|
|
10
|
+
- Add optional attachment visibility to WChatPanel and WChatComposer, and history visibility to WChatComposer.
|
|
11
|
+
|
|
1
12
|
## 0.9.24
|
|
2
13
|
|
|
3
14
|
- Add accessible mobile bottom sheets with nested overlays, focus restoration and keyboard viewport support.
|
package/COMPONENTS.md
CHANGED
|
@@ -833,3 +833,55 @@ Below 768px, `WSelect` and `WDateRangePicker` use bottom sheets. Their new `clos
|
|
|
833
833
|
and `closeLabel`. `WSlidePanel` uses a bottom sheet on mobile by default; set
|
|
834
834
|
`mobileBottom=false` to retain its side presentation. Header/footer slots are preserved.
|
|
835
835
|
Mobile controls and table pagination have larger touch targets; pagination wraps locally.
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
## WChatEditor and WChatComposer
|
|
839
|
+
|
|
840
|
+
`WChatEditor` is a plain-text chat editor backed by Tiptap. It accepts `v-model`,
|
|
841
|
+
`placeholder`, `disabled`, `minLines` and `maxLines`; emits `submit` on Enter
|
|
842
|
+
(Shift+Enter adds a line, IME confirmation does not submit); exposes `focus()`.
|
|
843
|
+
Placeholder changes preserve the draft. Model values are treated as text, not HTML.
|
|
844
|
+
|
|
845
|
+
`WChatComposer` provides the Perform glass launcher design, expanded input,
|
|
846
|
+
attachments and conversation/project history. It has no application store, API,
|
|
847
|
+
i18n plugin or localStorage dependency.
|
|
848
|
+
|
|
849
|
+
```vue
|
|
850
|
+
<WChatComposer
|
|
851
|
+
ref="composer"
|
|
852
|
+
v-model:minimized="minimized"
|
|
853
|
+
placeholder="Ask the analyst"
|
|
854
|
+
:disabled="sending"
|
|
855
|
+
:sessions="sessions"
|
|
856
|
+
:projects="projects"
|
|
857
|
+
:attachments="attachments"
|
|
858
|
+
:history-loading="historyLoading"
|
|
859
|
+
locale="en"
|
|
860
|
+
@submit="send"
|
|
861
|
+
@request-history="loadHistory"
|
|
862
|
+
@select-session="selectSession"
|
|
863
|
+
@files-selected="uploadFiles"
|
|
864
|
+
@remove-attachment="removeAttachment"
|
|
865
|
+
/>
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
- The host supplies `WChatAttachment[]`, `WChatProject[]` and
|
|
869
|
+
`WChatComposerSession[]` (extends `WChatSession` with optional `badge` and
|
|
870
|
+
`highlighted`). Use `subtitle` for domain context such as a client or date range.
|
|
871
|
+
- The host owns uploads, history loading, selection, persistence and LLM calls.
|
|
872
|
+
`request-history` fires whenever history opens; deduplicate loading in the host.
|
|
873
|
+
- Translate the label props: `conversationsLabel`, `removeAttachmentLabel`,
|
|
874
|
+
`minimizeLabel`, `sendLabel`, `attachFilesLabel`, `loadingLabel`,
|
|
875
|
+
`noConversationsLabel`, `projectsLabel`, `generalConversationLabel`.
|
|
876
|
+
- `accept` configures file selection; loading attachments prevent submission.
|
|
877
|
+
- `openWithPrompt(text)` expands and focuses the input with a draft.
|
|
878
|
+
- Set `--wpic-chat-composer-left` and `--wpic-chat-composer-bottom` to integrate
|
|
879
|
+
with application navigation. Defaults preserve mobile/desktop floating placement.
|
|
880
|
+
- Use `WChatEditor` in the `WChatPanel` composer slot for the same input in the panel.
|
|
881
|
+
- Import `@wpic/ui/style.css`; no host Tailwind scan is required.
|
|
882
|
+
|
|
883
|
+
`showAttachments` defaults to true on both chat components. `showHistory` defaults to true on WChatComposer. Disable these for a text-only chat without saved sessions.
|
|
884
|
+
|
|
885
|
+
### Chat panel layout (0.9.26)
|
|
886
|
+
|
|
887
|
+
`WChatPanel` keeps its composer in normal flex layout, outside the message scroll viewport. Remove any application CSS that adds a footer mask or extra footer-height padding to `.wpic-chat-panel__messages`. `dockedInset` sets the outer gap of the docked card (default 8px); the card uses the WPIC surface/border tokens, 12px corners and no outer gutter.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { WChatAttachment, WChatProject, WChatSession } from './WChatPanel.vue';
|
|
2
|
+
export interface WChatComposerSession extends WChatSession {
|
|
3
|
+
badge?: string;
|
|
4
|
+
highlighted?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
placeholder: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
showAttachments?: boolean;
|
|
10
|
+
showHistory?: boolean;
|
|
11
|
+
attachments?: WChatAttachment[];
|
|
12
|
+
projects?: WChatProject[];
|
|
13
|
+
sessions?: WChatComposerSession[];
|
|
14
|
+
historyLoading?: boolean;
|
|
15
|
+
locale?: string;
|
|
16
|
+
minimized?: boolean;
|
|
17
|
+
accept?: string;
|
|
18
|
+
conversationsLabel?: string;
|
|
19
|
+
removeAttachmentLabel?: string;
|
|
20
|
+
minimizeLabel?: string;
|
|
21
|
+
sendLabel?: string;
|
|
22
|
+
attachFilesLabel?: string;
|
|
23
|
+
loadingLabel?: string;
|
|
24
|
+
noConversationsLabel?: string;
|
|
25
|
+
projectsLabel?: string;
|
|
26
|
+
generalConversationLabel?: string;
|
|
27
|
+
};
|
|
28
|
+
declare function openWithPrompt(prompt: string): Promise<void>;
|
|
29
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
30
|
+
openWithPrompt: typeof openWithPrompt;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
submit: (value: string) => any;
|
|
33
|
+
"select-session": (sessionId: string) => any;
|
|
34
|
+
"files-selected": (files: File[]) => any;
|
|
35
|
+
"remove-attachment": (attachment: WChatAttachment) => any;
|
|
36
|
+
"request-history": () => any;
|
|
37
|
+
"update:minimized": (value: boolean) => any;
|
|
38
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
40
|
+
"onSelect-session"?: ((sessionId: string) => any) | undefined;
|
|
41
|
+
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
42
|
+
"onRemove-attachment"?: ((attachment: WChatAttachment) => any) | undefined;
|
|
43
|
+
"onRequest-history"?: (() => any) | undefined;
|
|
44
|
+
"onUpdate:minimized"?: ((value: boolean) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
projects: WChatProject[];
|
|
47
|
+
sessions: WChatComposerSession[];
|
|
48
|
+
noConversationsLabel: string;
|
|
49
|
+
projectsLabel: string;
|
|
50
|
+
conversationsLabel: string;
|
|
51
|
+
sendLabel: string;
|
|
52
|
+
attachFilesLabel: string;
|
|
53
|
+
removeAttachmentLabel: string;
|
|
54
|
+
showAttachments: boolean;
|
|
55
|
+
attachments: WChatAttachment[];
|
|
56
|
+
accept: string;
|
|
57
|
+
locale: string;
|
|
58
|
+
showHistory: boolean;
|
|
59
|
+
minimized: boolean;
|
|
60
|
+
minimizeLabel: string;
|
|
61
|
+
loadingLabel: string;
|
|
62
|
+
generalConversationLabel: string;
|
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
placeholder: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
minLines?: number;
|
|
6
|
+
maxLines?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
9
|
+
focus: () => boolean | undefined;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
|
+
submit: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
+
onSubmit?: (() => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -116,6 +116,7 @@ type __VLS_Props = {
|
|
|
116
116
|
closeLabel?: string;
|
|
117
117
|
helpfulLabel?: string;
|
|
118
118
|
notHelpfulLabel?: string;
|
|
119
|
+
showAttachments?: boolean;
|
|
119
120
|
attachments?: WChatAttachment[];
|
|
120
121
|
accept?: string;
|
|
121
122
|
customAttachmentPicker?: boolean;
|
|
@@ -125,6 +126,8 @@ type __VLS_Props = {
|
|
|
125
126
|
loading?: boolean;
|
|
126
127
|
cancellable?: boolean;
|
|
127
128
|
docked?: boolean;
|
|
129
|
+
/** Space around the docked panel, matching inset application layouts. */
|
|
130
|
+
dockedInset?: number;
|
|
128
131
|
maximized?: boolean;
|
|
129
132
|
maximizedMargin?: number;
|
|
130
133
|
width?: number;
|
|
@@ -257,6 +260,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
257
260
|
undockLabel: string;
|
|
258
261
|
helpfulLabel: string;
|
|
259
262
|
notHelpfulLabel: string;
|
|
263
|
+
showAttachments: boolean;
|
|
260
264
|
attachments: WChatAttachment[];
|
|
261
265
|
accept: string;
|
|
262
266
|
customAttachmentPicker: boolean;
|
|
@@ -265,6 +269,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
265
269
|
hideClear: boolean;
|
|
266
270
|
cancellable: boolean;
|
|
267
271
|
docked: boolean;
|
|
272
|
+
dockedInset: number;
|
|
268
273
|
maximized: boolean;
|
|
269
274
|
maximizedMargin: number;
|
|
270
275
|
topOffset: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -89,3 +89,6 @@ export type { WThemeMode, WThemeColors, WThemeOverrides } from './theme';
|
|
|
89
89
|
export { default as WTrendBadge } from './components/WTrendBadge.vue';
|
|
90
90
|
export { default as WEditableText } from './components/WEditableText.vue';
|
|
91
91
|
export { default as WBottomSheet } from './components/WBottomSheet.vue';
|
|
92
|
+
export { default as WChatEditor } from './components/WChatEditor.vue';
|
|
93
|
+
export { default as WChatComposer } from './components/WChatComposer.vue';
|
|
94
|
+
export type { WChatComposerSession } from './components/WChatComposer.vue';
|