@nuxt/ui 4.5.1 → 4.6.0
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/dist/module.d.mts +7 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +78 -67
- package/dist/runtime/components/Avatar.vue +10 -12
- package/dist/runtime/components/Banner.vue +1 -1
- package/dist/runtime/components/BlogPost.vue +3 -2
- package/dist/runtime/components/Calendar.d.vue.ts +4 -4
- package/dist/runtime/components/Calendar.vue.d.ts +4 -4
- package/dist/runtime/components/ChangelogVersion.vue +3 -2
- package/dist/runtime/components/ChangelogVersions.vue +1 -1
- package/dist/runtime/components/ChatMessage.d.vue.ts +4 -1
- package/dist/runtime/components/ChatMessage.vue +5 -0
- package/dist/runtime/components/ChatMessage.vue.d.ts +4 -1
- package/dist/runtime/components/ChatReasoning.d.vue.ts +78 -0
- package/dist/runtime/components/ChatReasoning.vue +162 -0
- package/dist/runtime/components/ChatReasoning.vue.d.ts +78 -0
- package/dist/runtime/components/ChatShimmer.d.vue.ts +34 -0
- package/dist/runtime/components/ChatShimmer.vue +37 -0
- package/dist/runtime/components/ChatShimmer.vue.d.ts +34 -0
- package/dist/runtime/components/ChatTool.d.vue.ts +88 -0
- package/dist/runtime/components/ChatTool.vue +105 -0
- package/dist/runtime/components/ChatTool.vue.d.ts +88 -0
- package/dist/runtime/components/Checkbox.d.vue.ts +22 -19
- package/dist/runtime/components/Checkbox.vue +9 -8
- package/dist/runtime/components/Checkbox.vue.d.ts +22 -19
- package/dist/runtime/components/DashboardGroup.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardGroup.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSearchButton.vue +2 -2
- package/dist/runtime/components/Drawer.vue +1 -1
- package/dist/runtime/components/DropdownMenu.d.vue.ts +29 -3
- package/dist/runtime/components/DropdownMenu.vue +9 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +29 -3
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +9 -3
- package/dist/runtime/components/DropdownMenuContent.vue +62 -9
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +9 -3
- package/dist/runtime/components/EditorDragHandle.d.vue.ts +4 -4
- package/dist/runtime/components/EditorDragHandle.vue.d.ts +4 -4
- package/dist/runtime/components/Error.vue +5 -5
- package/dist/runtime/components/FileUpload.d.vue.ts +6 -0
- package/dist/runtime/components/FileUpload.vue +11 -7
- package/dist/runtime/components/FileUpload.vue.d.ts +6 -0
- package/dist/runtime/components/Icon.d.vue.ts +2 -1
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Icon.vue.d.ts +2 -1
- package/dist/runtime/components/InputDate.d.vue.ts +4 -4
- package/dist/runtime/components/InputDate.vue.d.ts +4 -4
- package/dist/runtime/components/InputMenu.d.vue.ts +7 -1
- package/dist/runtime/components/InputMenu.vue +67 -48
- package/dist/runtime/components/InputMenu.vue.d.ts +7 -1
- package/dist/runtime/components/InputTime.d.vue.ts +53 -27
- package/dist/runtime/components/InputTime.vue +52 -27
- package/dist/runtime/components/InputTime.vue.d.ts +53 -27
- package/dist/runtime/components/Kbd.vue +1 -1
- package/dist/runtime/components/Modal.vue +1 -1
- package/dist/runtime/components/NavigationMenu.vue +1 -0
- package/dist/runtime/components/Popover.vue +1 -1
- package/dist/runtime/components/Progress.d.vue.ts +1 -1
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/SelectMenu.d.vue.ts +1 -1
- package/dist/runtime/components/SelectMenu.vue +1 -1
- package/dist/runtime/components/SelectMenu.vue.d.ts +1 -1
- package/dist/runtime/components/Sidebar.d.vue.ts +131 -0
- package/dist/runtime/components/Sidebar.vue +222 -0
- package/dist/runtime/components/Sidebar.vue.d.ts +131 -0
- package/dist/runtime/components/Slideover.vue +1 -1
- package/dist/runtime/components/Switch.d.vue.ts +22 -19
- package/dist/runtime/components/Switch.vue +7 -6
- package/dist/runtime/components/Switch.vue.d.ts +22 -19
- package/dist/runtime/components/Table.d.vue.ts +1 -1
- package/dist/runtime/components/Table.vue +12 -4
- package/dist/runtime/components/Table.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.d.vue.ts +2 -0
- package/dist/runtime/components/Tooltip.vue +3 -2
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -0
- package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +3 -1
- package/dist/runtime/components/content/ContentNavigation.vue +9 -2
- package/dist/runtime/components/content/ContentSurround.vue +6 -2
- package/dist/runtime/components/content/ContentToc.d.vue.ts +5 -0
- package/dist/runtime/components/content/ContentToc.vue +57 -11
- package/dist/runtime/components/content/ContentToc.vue.d.ts +5 -0
- package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +1 -1
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Pre.vue +0 -4
- package/dist/runtime/composables/index.d.ts +11 -0
- package/dist/runtime/composables/index.js +11 -0
- package/dist/runtime/composables/useEditorMenu.js +1 -1
- package/dist/runtime/composables/useFileUpload.d.ts +2 -2
- package/dist/runtime/composables/useFileUpload.js +3 -3
- package/dist/runtime/composables/{internal/useFilter.js → useFilter.js} +1 -1
- package/dist/runtime/composables/useScrollShadow.d.ts +23 -0
- package/dist/runtime/composables/useScrollShadow.js +36 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/keyframes.css +1 -1
- package/dist/runtime/locale/ar.js +13 -0
- package/dist/runtime/locale/az.js +13 -0
- package/dist/runtime/locale/be.js +13 -0
- package/dist/runtime/locale/bg.js +13 -0
- package/dist/runtime/locale/bn.js +13 -0
- package/dist/runtime/locale/ca.js +13 -0
- package/dist/runtime/locale/ckb.js +13 -0
- package/dist/runtime/locale/cs.js +13 -0
- package/dist/runtime/locale/da.js +13 -0
- package/dist/runtime/locale/de.js +13 -0
- package/dist/runtime/locale/de_ch.js +13 -0
- package/dist/runtime/locale/el.js +13 -0
- package/dist/runtime/locale/en.js +13 -0
- package/dist/runtime/locale/es.js +13 -0
- package/dist/runtime/locale/et.js +13 -0
- package/dist/runtime/locale/eu.js +13 -0
- package/dist/runtime/locale/fa_ir.js +13 -0
- package/dist/runtime/locale/fi.js +13 -0
- package/dist/runtime/locale/fr.js +13 -0
- package/dist/runtime/locale/gl.js +13 -0
- package/dist/runtime/locale/he.js +13 -0
- package/dist/runtime/locale/hi.js +13 -0
- package/dist/runtime/locale/hr.js +13 -0
- package/dist/runtime/locale/hu.js +13 -0
- package/dist/runtime/locale/hy.js +13 -0
- package/dist/runtime/locale/id.js +13 -0
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.js +1 -0
- package/dist/runtime/locale/is.d.ts +3 -0
- package/dist/runtime/locale/is.js +142 -0
- package/dist/runtime/locale/it.js +13 -0
- package/dist/runtime/locale/ja.js +13 -0
- package/dist/runtime/locale/ka.js +13 -0
- package/dist/runtime/locale/kk.js +13 -0
- package/dist/runtime/locale/km.js +13 -0
- package/dist/runtime/locale/ko.js +13 -0
- package/dist/runtime/locale/ky.js +13 -0
- package/dist/runtime/locale/lb.js +13 -0
- package/dist/runtime/locale/lo.js +13 -0
- package/dist/runtime/locale/lt.js +13 -0
- package/dist/runtime/locale/mn.js +13 -0
- package/dist/runtime/locale/ms.js +13 -0
- package/dist/runtime/locale/nb_no.js +13 -0
- package/dist/runtime/locale/nl.js +13 -0
- package/dist/runtime/locale/pl.js +13 -0
- package/dist/runtime/locale/pt.js +13 -0
- package/dist/runtime/locale/pt_br.js +13 -0
- package/dist/runtime/locale/ro.js +13 -0
- package/dist/runtime/locale/ru.js +13 -0
- package/dist/runtime/locale/sk.js +13 -0
- package/dist/runtime/locale/sl.js +13 -0
- package/dist/runtime/locale/sq.js +13 -0
- package/dist/runtime/locale/sv.js +13 -0
- package/dist/runtime/locale/th.js +13 -0
- package/dist/runtime/locale/tj.js +13 -0
- package/dist/runtime/locale/tr.js +13 -0
- package/dist/runtime/locale/ug_cn.js +13 -0
- package/dist/runtime/locale/uk.js +13 -0
- package/dist/runtime/locale/ur.js +13 -0
- package/dist/runtime/locale/uz.js +13 -0
- package/dist/runtime/locale/vi.js +13 -0
- package/dist/runtime/locale/zh_cn.js +13 -0
- package/dist/runtime/locale/zh_tw.js +13 -0
- package/dist/runtime/types/index.d.ts +4 -0
- package/dist/runtime/types/index.js +4 -0
- package/dist/runtime/types/locale.d.ts +13 -0
- package/dist/runtime/utils/ai.d.ts +18 -0
- package/dist/runtime/utils/ai.js +13 -0
- package/dist/runtime/utils/editor.js +17 -5
- package/dist/runtime/vue/components/Icon.d.vue.ts +1 -4
- package/dist/runtime/vue/components/Icon.vue +28 -3
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -4
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +3 -1
- package/dist/shared/{ui.DI_ypO2T.mjs → ui.DJUbBpE2.mjs} +298 -39
- package/dist/unplugin.d.mts +15 -5
- package/dist/unplugin.mjs +53 -30
- package/dist/vite.d.mts +1 -0
- package/dist/vite.mjs +1 -1
- package/package.json +49 -46
- /package/dist/runtime/composables/{internal/useFilter.d.ts → useFilter.d.ts} +0 -0
|
@@ -7,3 +7,21 @@ import type { UIMessage } from 'ai';
|
|
|
7
7
|
* and only render assistant messages with MDC.
|
|
8
8
|
*/
|
|
9
9
|
export declare function getTextFromMessage(message: UIMessage): string;
|
|
10
|
+
/**
|
|
11
|
+
* Checks if a reasoning part is currently being streamed.
|
|
12
|
+
*
|
|
13
|
+
* Returns `true` when the chat is streaming, the message is the last one,
|
|
14
|
+
* and no parts of a different type follow the given part index.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isReasoningStreaming(message: UIMessage, partIndex: number, chat: {
|
|
17
|
+
status: string;
|
|
18
|
+
messages: UIMessage[];
|
|
19
|
+
}): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if a tool part is still streaming (hasn't reached a terminal state).
|
|
22
|
+
*
|
|
23
|
+
* Terminal states are `output-available`, `output-error`, and `output-denied`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isToolStreaming(part: {
|
|
26
|
+
state: string;
|
|
27
|
+
}): boolean;
|
package/dist/runtime/utils/ai.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
export function getTextFromMessage(message) {
|
|
2
2
|
return message.parts.filter((part) => part.type === "text").map((part) => part.text).join("");
|
|
3
3
|
}
|
|
4
|
+
export function isReasoningStreaming(message, partIndex, chat) {
|
|
5
|
+
if (chat.status !== "streaming") return false;
|
|
6
|
+
if (message.id !== chat.messages.at(-1)?.id) return false;
|
|
7
|
+
if (partIndex < 0 || partIndex >= message.parts.length) return false;
|
|
8
|
+
const partType = message.parts[partIndex].type;
|
|
9
|
+
for (let i = partIndex + 1; i < message.parts.length; i++) {
|
|
10
|
+
if (message.parts[i].type !== partType) return false;
|
|
11
|
+
}
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
export function isToolStreaming(part) {
|
|
15
|
+
return !["output-available", "output-error", "output-denied"].includes(part.state);
|
|
16
|
+
}
|
|
@@ -136,9 +136,10 @@ export function createListHandler(listType) {
|
|
|
136
136
|
};
|
|
137
137
|
const fnName = fnNameMap[listType];
|
|
138
138
|
const listItemType = listType === "taskList" ? "taskItem" : "listItem";
|
|
139
|
+
const allListTypes = ["bulletList", "orderedList", "taskList"];
|
|
139
140
|
return {
|
|
140
141
|
canExecute: (editor) => {
|
|
141
|
-
return editor.can()[fnName]() || editor.isActive("
|
|
142
|
+
return editor.can()[fnName]() || editor.isActive("listItem") || allListTypes.some((type) => isExtensionAvailable(editor, type) && editor.isActive(type));
|
|
142
143
|
},
|
|
143
144
|
execute: (editor) => {
|
|
144
145
|
const { state } = editor;
|
|
@@ -153,11 +154,22 @@ export function createListHandler(listType) {
|
|
|
153
154
|
chain = chain.setTextSelection({ from, to }).clearNodes();
|
|
154
155
|
}
|
|
155
156
|
if (editor.isActive(listType)) {
|
|
156
|
-
|
|
157
|
+
let result = chain.liftListItem(listItemType);
|
|
158
|
+
for (const type of allListTypes) {
|
|
159
|
+
if (isExtensionAvailable(editor, type)) {
|
|
160
|
+
result = result.lift(type);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return result.selectTextblockEnd();
|
|
157
164
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
if (allListTypes.some((type) => isExtensionAvailable(editor, type) && editor.isActive(type))) {
|
|
166
|
+
const currentListItemType = editor.isActive("taskList") ? "taskItem" : "listItem";
|
|
167
|
+
let unwrapped = chain.liftListItem(currentListItemType);
|
|
168
|
+
for (const type of allListTypes) {
|
|
169
|
+
if (isExtensionAvailable(editor, type)) {
|
|
170
|
+
unwrapped = unwrapped.lift(type);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
161
173
|
return unwrapped[fnName]().selectTextblockEnd();
|
|
162
174
|
}
|
|
163
175
|
return chain[fnName]().selectTextblockEnd();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type { IconProps
|
|
2
|
-
export interface IconProps {
|
|
3
|
-
name: NuxtIconProps['name'];
|
|
4
|
-
}
|
|
1
|
+
import type { IconProps } from '../../types';
|
|
5
2
|
declare const _default: typeof __VLS_export;
|
|
6
3
|
export default _default;
|
|
7
4
|
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,13 +3,38 @@
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
6
7
|
import { Icon as IconifyIcon } from "@iconify/vue";
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
name: { type: null, required: true },
|
|
11
|
+
mode: { type: String, required: false },
|
|
12
|
+
size: { type: [String, Number], required: false },
|
|
13
|
+
customize: { type: [Function, Boolean, null], required: false }
|
|
9
14
|
});
|
|
15
|
+
const appConfig = useAppConfig();
|
|
16
|
+
function resolveCustomizeFn(customize2, globalCustomize) {
|
|
17
|
+
if (customize2 === false) return void 0;
|
|
18
|
+
if (customize2 === true || customize2 === null) return globalCustomize;
|
|
19
|
+
return customize2;
|
|
20
|
+
}
|
|
21
|
+
const mode = computed(() => {
|
|
22
|
+
const mode2 = props.mode || appConfig.icon?.mode;
|
|
23
|
+
if (mode2 === "css") return "style";
|
|
24
|
+
return mode2;
|
|
25
|
+
});
|
|
26
|
+
const size = computed(() => props.size || appConfig.icon?.size);
|
|
27
|
+
const customize = computed(() => resolveCustomizeFn(props.customize, appConfig.icon?.customize));
|
|
10
28
|
</script>
|
|
11
29
|
|
|
12
30
|
<template>
|
|
13
|
-
<IconifyIcon
|
|
31
|
+
<IconifyIcon
|
|
32
|
+
v-if="typeof name === 'string'"
|
|
33
|
+
:icon="name.replace(/^i-/, '')"
|
|
34
|
+
:mode="mode"
|
|
35
|
+
:width="size"
|
|
36
|
+
:height="size"
|
|
37
|
+
:customise="customize"
|
|
38
|
+
/>
|
|
14
39
|
<component :is="name" v-else />
|
|
15
40
|
</template>
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type { IconProps
|
|
2
|
-
export interface IconProps {
|
|
3
|
-
name: NuxtIconProps['name'];
|
|
4
|
-
}
|
|
1
|
+
import type { IconProps } from '../../types';
|
|
5
2
|
declare const _default: typeof __VLS_export;
|
|
6
3
|
export default _default;
|
|
7
4
|
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -4,5 +4,5 @@ export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuIte
|
|
|
4
4
|
declare const _default: typeof __VLS_export;
|
|
5
5
|
export default _default;
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
|
|
7
|
-
searchInput: boolean | import("../../../types").InputProps
|
|
7
|
+
searchInput: boolean | Omit<import("../../../types").InputProps, "modelValue" | "defaultValue">;
|
|
8
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -4,5 +4,5 @@ export interface ColorModeSelectProps extends Omit<SelectMenuProps<SelectMenuIte
|
|
|
4
4
|
declare const _default: typeof __VLS_export;
|
|
5
5
|
export default _default;
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {
|
|
7
|
-
searchInput: boolean | import("../../../types").InputProps
|
|
7
|
+
searchInput: boolean | Omit<import("../../../types").InputProps, "modelValue" | "defaultValue">;
|
|
8
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -24,7 +24,9 @@ const props = defineProps({
|
|
|
24
24
|
name: { type: String, required: false },
|
|
25
25
|
required: { type: Boolean, required: false },
|
|
26
26
|
value: { type: String, required: false },
|
|
27
|
-
defaultValue: { type:
|
|
27
|
+
defaultValue: { type: null, required: false },
|
|
28
|
+
trueValue: { type: null, required: false },
|
|
29
|
+
falseValue: { type: null, required: false }
|
|
28
30
|
});
|
|
29
31
|
const { t } = useLocale();
|
|
30
32
|
const colorMode = useColorMode();
|