@wpic/ui 0.9.24 → 0.9.25
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 +5 -0
- package/COMPONENTS.md +48 -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 +2 -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 +3980 -3528
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 0.9.25
|
|
2
|
+
|
|
3
|
+
- Add WChatComposer and WChatEditor with the Perform glass design and generic host events.
|
|
4
|
+
- Add optional attachment visibility to WChatPanel and WChatComposer, and history visibility to WChatComposer.
|
|
5
|
+
|
|
1
6
|
## 0.9.24
|
|
2
7
|
|
|
3
8
|
- Add accessible mobile bottom sheets with nested overlays, focus restoration and keyboard viewport support.
|
package/COMPONENTS.md
CHANGED
|
@@ -833,3 +833,51 @@ 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.
|
|
@@ -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;
|
|
@@ -257,6 +258,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
257
258
|
undockLabel: string;
|
|
258
259
|
helpfulLabel: string;
|
|
259
260
|
notHelpfulLabel: string;
|
|
261
|
+
showAttachments: boolean;
|
|
260
262
|
attachments: WChatAttachment[];
|
|
261
263
|
accept: string;
|
|
262
264
|
customAttachmentPicker: boolean;
|
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';
|