@dxos/react-ui-chat 0.8.4-main.c1de068 → 0.8.4-main.c4373fc
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/lib/browser/index.mjs +79 -186
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +79 -186
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/ChatDialog/ChatDialog.d.ts +1 -1
- package/dist/types/src/components/ChatDialog/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog/ChatDialog.stories.d.ts +36 -5
- package/dist/types/src/components/ChatDialog/ChatDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/ChatEditor.d.ts +4 -4
- package/dist/types/src/components/ChatEditor/ChatEditor.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/ChatEditor.stories.d.ts +20 -5
- package/dist/types/src/components/ChatEditor/ChatEditor.stories.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -34
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -37
- package/src/components/ChatDialog/ChatDialog.stories.tsx +9 -9
- package/src/components/ChatDialog/ChatDialog.tsx +4 -4
- package/src/components/ChatEditor/ChatEditor.stories.tsx +7 -8
- package/src/components/ChatEditor/ChatEditor.tsx +34 -15
- package/src/components/ChatEditor/references.ts +1 -1
- package/src/index.ts +1 -0
- package/src/translations.ts +1 -40
- package/dist/types/src/components/ChatEditor/autocomplete.d.ts +0 -25
- package/dist/types/src/components/ChatEditor/autocomplete.d.ts.map +0 -1
- package/src/components/ChatEditor/autocomplete.ts +0 -218
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { type Extension } from '@codemirror/state';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
-
import { type BasicExtensionsOptions, type UseTextEditorProps } from '@dxos/react-ui-editor';
|
|
5
|
-
import { type AutocompleteOptions } from './autocomplete';
|
|
4
|
+
import { type AutocompleteOptions, type BasicExtensionsOptions, type UseTextEditorProps } from '@dxos/react-ui-editor';
|
|
6
5
|
import { type ReferencesOptions } from './references';
|
|
7
6
|
export interface ChatEditorController {
|
|
8
7
|
focus(): void;
|
|
8
|
+
getText(): string;
|
|
9
9
|
setText(text: string): void;
|
|
10
10
|
}
|
|
11
11
|
export type ChatEditorProps = ThemedClassName<{
|
|
12
12
|
extensions?: Extension;
|
|
13
13
|
references?: ReferencesOptions;
|
|
14
|
-
} & AutocompleteOptions & Pick<UseTextEditorProps, 'autoFocus'> & Pick<BasicExtensionsOptions, 'lineWrapping' | 'placeholder'>>;
|
|
14
|
+
} & AutocompleteOptions & Pick<UseTextEditorProps, 'id' | 'autoFocus'> & Pick<BasicExtensionsOptions, 'lineWrapping' | 'placeholder'>>;
|
|
15
15
|
export declare const ChatEditor: React.ForwardRefExoticComponent<Omit<{
|
|
16
16
|
extensions?: Extension;
|
|
17
17
|
references?: ReferencesOptions;
|
|
18
|
-
} & AutocompleteOptions & Pick<UseTextEditorProps, "autoFocus"> & Pick<BasicExtensionsOptions, "lineWrapping" | "placeholder">, "className"> & {
|
|
18
|
+
} & AutocompleteOptions & Pick<UseTextEditorProps, "autoFocus" | "id"> & Pick<BasicExtensionsOptions, "lineWrapping" | "placeholder">, "className"> & {
|
|
19
19
|
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
20
20
|
} & React.RefAttributes<ChatEditorController>>;
|
|
21
21
|
//# sourceMappingURL=ChatEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatEditor/ChatEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatEditor/ChatEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EAKxB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,KAAK,iBAAiB,EAAqC,MAAM,cAAc,CAAC;AAEzF,MAAM,WAAW,oBAAoB;IACnC,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,MAAM,CAAC;IAClB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,GAAG,mBAAmB,GACrB,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,WAAW,CAAC,GAC5C,IAAI,CAAC,sBAAsB,EAAE,cAAc,GAAG,aAAa,CAAC,CAC/D,CAAC;AAEF,eAAO,MAAM,UAAU;iBAPN,SAAS;iBACT,iBAAiB;;;8CAwEjC,CAAC"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Omit<{
|
|
5
|
+
extensions?: import("@codemirror/state").Extension;
|
|
6
|
+
references?: import("./references").ReferencesOptions;
|
|
7
|
+
} & import("@dxos/react-ui-editor").AutocompleteOptions & Pick<import("@dxos/react-ui-editor").UseTextEditorProps, "autoFocus" | "id"> & Pick<import("@dxos/react-ui-editor").BasicExtensionsOptions, "lineWrapping" | "placeholder">, "className"> & {
|
|
8
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
9
|
+
} & import("react").RefAttributes<import("./ChatEditor").ChatEditorController>>;
|
|
10
|
+
decorators: import("@storybook/react").Decorator[];
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: string;
|
|
13
|
+
translations: [{
|
|
14
|
+
readonly 'en-US': {
|
|
15
|
+
readonly "react-ui-chat": {};
|
|
16
|
+
};
|
|
17
|
+
}];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
5
20
|
export default meta;
|
|
6
|
-
type Story = StoryObj<typeof
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
7
22
|
export declare const Default: Story;
|
|
8
23
|
export declare const WithSuggestions: Story;
|
|
9
24
|
export declare const WithReferences: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatEditor/ChatEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatEditor/ChatEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAUjE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAQyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAIpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAuB7B,CAAC;AAiBF,eAAO,MAAM,cAAc,EAAE,KAkB5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,40 +1,7 @@
|
|
|
1
1
|
export declare const translationKey = "react-ui-chat";
|
|
2
2
|
export declare const translations: [{
|
|
3
3
|
readonly 'en-US': {
|
|
4
|
-
readonly "react-ui-chat": {
|
|
5
|
-
readonly 'templates label': "Templates";
|
|
6
|
-
readonly 'open ambient chat label': "Open Assistant";
|
|
7
|
-
readonly 'assistant chat label': "Assistant";
|
|
8
|
-
readonly 'plugin name': "Assistant";
|
|
9
|
-
readonly 'object placeholder': "New prompt";
|
|
10
|
-
readonly 'create object label': "Create prompt";
|
|
11
|
-
readonly 'create trigger label': "Create trigger";
|
|
12
|
-
readonly 'create stack section label': "Create prompt";
|
|
13
|
-
readonly 'command placeholder': "Enter slash command...";
|
|
14
|
-
readonly 'template placeholder': "Enter template...";
|
|
15
|
-
readonly 'value placeholder': "Enter value...";
|
|
16
|
-
readonly 'prompt rules label': "Prompt Rules";
|
|
17
|
-
readonly 'typename placeholder': "Enter typename of objects which this template is for";
|
|
18
|
-
readonly 'description placeholder': "Enter description of when this template should be used";
|
|
19
|
-
readonly 'select preset template placeholder': "Select preset";
|
|
20
|
-
readonly 'service registry label': "Service Registry";
|
|
21
|
-
readonly 'sequence logs label': "Logs";
|
|
22
|
-
readonly 'assistant dialog title': "Assistant";
|
|
23
|
-
readonly 'open assistant label': "Open assistant";
|
|
24
|
-
readonly 'search input placeholder': "Search...";
|
|
25
|
-
readonly 'chat input placeholder': "Ask a question...";
|
|
26
|
-
readonly 'chat stop': "Cancel request.";
|
|
27
|
-
readonly 'button save': "Save";
|
|
28
|
-
readonly 'button run': "Run";
|
|
29
|
-
readonly 'prompt placeholder': "Ask a question...";
|
|
30
|
-
readonly 'microphone button': "Click to speak";
|
|
31
|
-
readonly 'cancel processing button': "Stop processing";
|
|
32
|
-
readonly 'settings default label': "Default";
|
|
33
|
-
readonly 'settings custom prompts label': "Use custom prompts";
|
|
34
|
-
readonly 'settings llm provider label': "LLM provider";
|
|
35
|
-
readonly 'settings edge llm model label': "Remote language model";
|
|
36
|
-
readonly 'settings ollama llm model label': "Ollama language model";
|
|
37
|
-
};
|
|
4
|
+
readonly "react-ui-chat": {};
|
|
38
5
|
};
|
|
39
6
|
}];
|
|
40
7
|
//# sourceMappingURL=translations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,eAAO,MAAM,YAAY;;;;EAMM,CAAC"}
|