@dxos/react-ui-chat 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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 +68 -272
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +68 -272
- 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 +1 -2
- package/dist/types/src/components/ChatDialog/ChatDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/ChatEditor.d.ts +5 -8
- package/dist/types/src/components/ChatEditor/ChatEditor.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/ChatEditor.stories.d.ts +1 -2
- package/dist/types/src/components/ChatEditor/ChatEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/references.d.ts +4 -0
- package/dist/types/src/components/ChatEditor/references.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -37
- package/src/components/ChatDialog/ChatDialog.stories.tsx +3 -5
- package/src/components/ChatDialog/ChatDialog.tsx +7 -7
- package/src/components/ChatEditor/ChatEditor.stories.tsx +18 -18
- package/src/components/ChatEditor/ChatEditor.tsx +32 -61
- package/src/components/ChatEditor/references.ts +17 -11
- package/dist/types/src/components/ChatEditor/autocomplete.d.ts +0 -26
- package/dist/types/src/components/ChatEditor/autocomplete.d.ts.map +0 -1
- package/src/components/ChatEditor/autocomplete.ts +0 -220
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDialog.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatDialog/ChatDialog.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatDialog.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatDialog/ChatDialog.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,22 +1,19 @@
|
|
|
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 BasicExtensionsOptions, type EditorController, type SubmitOptions, type UseTextEditorProps } from '@dxos/react-ui-editor';
|
|
6
5
|
import { type ReferencesOptions } from './references';
|
|
7
|
-
export interface ChatEditorController {
|
|
8
|
-
focus(): void;
|
|
9
|
-
getText(): string;
|
|
10
|
-
setText(text: string): void;
|
|
6
|
+
export interface ChatEditorController extends EditorController {
|
|
11
7
|
}
|
|
12
8
|
export type ChatEditorProps = ThemedClassName<{
|
|
13
9
|
extensions?: Extension;
|
|
14
10
|
references?: ReferencesOptions;
|
|
15
|
-
} &
|
|
11
|
+
} & (SubmitOptions & Pick<UseTextEditorProps, 'id' | 'autoFocus'> & Pick<BasicExtensionsOptions, 'lineWrapping' | 'placeholder'>)>;
|
|
12
|
+
export declare const useChatExtensions: ({ extensions, lineWrapping, placeholder, onSubmit }: ChatEditorProps) => Extension[];
|
|
16
13
|
export declare const ChatEditor: React.ForwardRefExoticComponent<Omit<{
|
|
17
14
|
extensions?: Extension;
|
|
18
15
|
references?: ReferencesOptions;
|
|
19
|
-
} &
|
|
16
|
+
} & SubmitOptions & Pick<UseTextEditorProps, "autoFocus" | "id"> & Pick<BasicExtensionsOptions, "lineWrapping" | "placeholder">, "className"> & {
|
|
20
17
|
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
21
18
|
} & React.RefAttributes<ChatEditorController>>;
|
|
22
19
|
//# 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;AACnD,OAAO,
|
|
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;AACnD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EACL,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAIxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;CAAG;AAEjE,MAAM,MAAM,eAAe,GAAG,eAAe,CAC3C;IACE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,GAAG,CAAC,aAAa,GAChB,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,WAAW,CAAC,GAC5C,IAAI,CAAC,sBAAsB,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAChE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,qDAA6D,eAAe,gBAY7G,CAAC;AAEF,eAAO,MAAM,UAAU;iBArBN,SAAS;iBACT,iBAAiB;;;8CA+BjC,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import '@dxos-theme';
|
|
2
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
3
2
|
declare const meta: {
|
|
4
3
|
title: string;
|
|
5
4
|
component: import("react").ForwardRefExoticComponent<Omit<{
|
|
6
5
|
extensions?: import("@codemirror/state").Extension;
|
|
7
6
|
references?: import("./references").ReferencesOptions;
|
|
8
|
-
} & import("
|
|
7
|
+
} & import("@dxos/react-ui-editor").SubmitOptions & Pick<import("@dxos/react-ui-editor").UseTextEditorProps, "autoFocus" | "id"> & Pick<import("@dxos/react-ui-editor").BasicExtensionsOptions, "lineWrapping" | "placeholder">, "className"> & {
|
|
9
8
|
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
10
9
|
} & import("react").RefAttributes<import("./ChatEditor").ChatEditorController>>;
|
|
11
10
|
decorators: import("@storybook/react").Decorator[];
|
|
@@ -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;AAGF,eAAO,MAAM,eAAe,EAAE,KAuB7B,CAAC;AAkBF,eAAO,MAAM,cAAc,EAAE,KAkB5B,CAAC"}
|
|
@@ -3,6 +3,9 @@ export type ReferenceData = {
|
|
|
3
3
|
uri: string;
|
|
4
4
|
label: string;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
6
9
|
export interface ReferencesProvider {
|
|
7
10
|
getReferences({ query }: {
|
|
8
11
|
query: string;
|
|
@@ -25,6 +28,7 @@ export type ReferencesOptions = {
|
|
|
25
28
|
};
|
|
26
29
|
/**
|
|
27
30
|
* Lookup object references.
|
|
31
|
+
* @deprecated
|
|
28
32
|
*/
|
|
29
33
|
export declare const references: ({ provider, triggerCharacter, debug }: ReferencesOptions) => Extension;
|
|
30
34
|
//# sourceMappingURL=references.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatEditor/references.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,mBAAmB,CAAC;AAe7D,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACtE,gBAAgB,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;CAC3E;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CAC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