@dxos/react-ui-chat 0.10.0 → 0.11.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/lib/index.mjs +414 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/translations.mjs +7 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/types/src/components/ChatEditor/ChatEditor.d.ts +4 -1
- package/dist/types/src/components/ChatEditor/ChatEditor.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/ChatEditor.stories.d.ts +6 -2
- package/dist/types/src/components/ChatEditor/ChatEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/commands.d.ts +15 -0
- package/dist/types/src/components/ChatEditor/commands.d.ts.map +1 -0
- package/dist/types/src/components/ChatEditor/commands.test.d.ts +2 -0
- package/dist/types/src/components/ChatEditor/commands.test.d.ts.map +1 -0
- package/dist/types/src/components/ChatEditor/index.d.ts +2 -0
- package/dist/types/src/components/ChatEditor/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatEditor/useChatExtensions.d.ts +4 -0
- package/dist/types/src/components/ChatEditor/useChatExtensions.d.ts.map +1 -0
- package/dist/types/src/components/ChatStatus/ChatStatus.d.ts +0 -8
- package/dist/types/src/components/ChatStatus/ChatStatus.d.ts.map +1 -1
- package/dist/types/src/components/ChatStatus/ChatStatus.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatStatus/ChatStatusContext.d.ts +10 -0
- package/dist/types/src/components/ChatStatus/ChatStatusContext.d.ts.map +1 -0
- package/dist/types/src/components/ChatStatus/index.d.ts +1 -0
- package/dist/types/src/components/ChatStatus/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatStatusIndicator/ChatStatusIndicator.d.ts +10 -0
- package/dist/types/src/components/ChatStatusIndicator/ChatStatusIndicator.d.ts.map +1 -0
- package/dist/types/src/components/ChatStatusIndicator/index.d.ts +2 -0
- package/dist/types/src/components/ChatStatusIndicator/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -31
- package/src/components/ChatEditor/ChatEditor.stories.tsx +83 -1
- package/src/components/ChatEditor/ChatEditor.tsx +19 -28
- package/src/components/ChatEditor/commands.test.ts +16 -0
- package/src/components/ChatEditor/commands.ts +59 -0
- package/src/components/ChatEditor/index.ts +3 -0
- package/src/components/ChatEditor/useChatExtensions.ts +51 -0
- package/src/components/ChatStatus/ChatStatus.stories.tsx +2 -1
- package/src/components/ChatStatus/ChatStatus.tsx +1 -16
- package/src/components/ChatStatus/ChatStatusContext.ts +21 -0
- package/src/components/ChatStatus/index.ts +2 -0
- package/src/components/ChatStatusIndicator/ChatStatusIndicator.tsx +45 -0
- package/src/components/ChatStatusIndicator/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/dist/lib/browser/index.mjs +0 -359
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/translations.mjs +0 -14
- package/dist/lib/browser/translations.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -361
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/translations.mjs +0 -16
- package/dist/lib/node-esm/translations.mjs.map +0 -7
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ChatStatusContextValue = {
|
|
2
|
+
/** Whole seconds elapsed since ChatStatus.Root mounted. Only advances while `running` is true. */
|
|
3
|
+
elapsed: number;
|
|
4
|
+
/** Whether the ChatStatus.Root tick is currently active. Toggled via the ChatStatusController. */
|
|
5
|
+
running: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const ChatStatusProvider: import("react").FC<ChatStatusContextValue & {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}>, useChatStatusContext: (consumerName: string) => ChatStatusContextValue;
|
|
10
|
+
//# sourceMappingURL=ChatStatusContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatStatusContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatStatus/ChatStatusContext.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,sBAAsB,GAAG;IACnC,kGAAkG;IAClG,OAAO,EAAE,MAAM,CAAC;IAChB,kGAAkG;IAClG,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAO,kBAAkB;;IAAE,oBAAoB,kDAAuD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatStatus/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatStatus/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type SpinnerProps } from '@dxos/react-ui-components/Spinner';
|
|
4
|
+
export type ChatStatusIndicatorProps = ThemedClassName<{
|
|
5
|
+
preset?: string;
|
|
6
|
+
processing?: boolean;
|
|
7
|
+
error?: Error;
|
|
8
|
+
} & Pick<SpinnerProps, 'size' | 'onClick'>>;
|
|
9
|
+
export declare const ChatStatusIndicator: ({ classNames, preset, processing, error, ...props }: ChatStatusIndicatorProps) => React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ChatStatusIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatStatusIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatStatusIndicator/ChatStatusIndicator.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,eAAe,EAAuB,MAAM,gBAAgB,CAAC;AAI3E,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAK/E,MAAM,MAAM,wBAAwB,GAAG,eAAe,CACpD;IACE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC,CAC3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,wDAAyD,wBAAwB,sBAqBhH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatStatusIndicator/index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
|