@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20240410-0405-8d7a6b79.1

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.
Files changed (158) hide show
  1. package/CHANGELOG.json +38 -0
  2. package/CHANGELOG.md +16 -0
  3. package/LICENSE +23 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +295 -0
  6. package/lib/BasicFunctionality.js +2 -0
  7. package/lib/BasicFunctionality.js.map +1 -0
  8. package/lib/ChatInputEntity.js +3 -0
  9. package/lib/ChatInputEntity.js.map +1 -0
  10. package/lib/ChatInputToken.js +2 -0
  11. package/lib/ChatInputToken.js.map +1 -0
  12. package/lib/GhostText.js +4 -0
  13. package/lib/GhostText.js.map +1 -0
  14. package/lib/ImperativeControl.js +2 -0
  15. package/lib/ImperativeControl.js.map +1 -0
  16. package/lib/components/ChatInputEntity/ChatInputEntity.js +12 -0
  17. package/lib/components/ChatInputEntity/ChatInputEntity.js.map +1 -0
  18. package/lib/components/ChatInputEntity/ChatInputEntity.types.js +3 -0
  19. package/lib/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -0
  20. package/lib/components/ChatInputEntity/index.js +6 -0
  21. package/lib/components/ChatInputEntity/index.js.map +1 -0
  22. package/lib/components/ChatInputEntity/renderChatInputEntity.js +12 -0
  23. package/lib/components/ChatInputEntity/renderChatInputEntity.js.map +1 -0
  24. package/lib/components/ChatInputEntity/useChatInputEntity.js +55 -0
  25. package/lib/components/ChatInputEntity/useChatInputEntity.js.map +1 -0
  26. package/lib/components/ChatInputEntity/useChatInputEntityStyles.js +44 -0
  27. package/lib/components/ChatInputEntity/useChatInputEntityStyles.js.map +1 -0
  28. package/lib/components/ChatInputToken/ChatInputToken.js +12 -0
  29. package/lib/components/ChatInputToken/ChatInputToken.js.map +1 -0
  30. package/lib/components/ChatInputToken/ChatInputToken.node.js +60 -0
  31. package/lib/components/ChatInputToken/ChatInputToken.node.js.map +1 -0
  32. package/lib/components/ChatInputToken/ChatInputToken.types.js +2 -0
  33. package/lib/components/ChatInputToken/ChatInputToken.types.js.map +1 -0
  34. package/lib/components/ChatInputToken/index.js +7 -0
  35. package/lib/components/ChatInputToken/index.js.map +1 -0
  36. package/lib/components/ChatInputToken/renderChatInputToken.js +10 -0
  37. package/lib/components/ChatInputToken/renderChatInputToken.js.map +1 -0
  38. package/lib/components/ChatInputToken/useChatInputToken.js +25 -0
  39. package/lib/components/ChatInputToken/useChatInputToken.js.map +1 -0
  40. package/lib/components/ChatInputToken/useChatInputTokenStyles.js +17 -0
  41. package/lib/components/ChatInputToken/useChatInputTokenStyles.js.map +1 -0
  42. package/lib/components/GhostText/GhostText.js +12 -0
  43. package/lib/components/GhostText/GhostText.js.map +1 -0
  44. package/lib/components/GhostText/GhostText.types.js +3 -0
  45. package/lib/components/GhostText/GhostText.types.js.map +1 -0
  46. package/lib/components/GhostText/index.js +6 -0
  47. package/lib/components/GhostText/index.js.map +1 -0
  48. package/lib/components/GhostText/renderGhostText.js +12 -0
  49. package/lib/components/GhostText/renderGhostText.js.map +1 -0
  50. package/lib/components/GhostText/useGhostText.js +29 -0
  51. package/lib/components/GhostText/useGhostText.js.map +1 -0
  52. package/lib/components/GhostText/useGhostTextStyles.js +48 -0
  53. package/lib/components/GhostText/useGhostTextStyles.js.map +1 -0
  54. package/lib/index.js +6 -0
  55. package/lib/index.js.map +1 -0
  56. package/lib/plugins/BasicFunctionality/BasicFunctionality.js +54 -0
  57. package/lib/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -0
  58. package/lib/plugins/BasicFunctionality/index.js +2 -0
  59. package/lib/plugins/BasicFunctionality/index.js.map +1 -0
  60. package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +79 -0
  61. package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -0
  62. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js +42 -0
  63. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -0
  64. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +2 -0
  65. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +1 -0
  66. package/lib/plugins/ChatInputEntity/index.js +4 -0
  67. package/lib/plugins/ChatInputEntity/index.js.map +1 -0
  68. package/lib/plugins/GhostText/GhostText.js +44 -0
  69. package/lib/plugins/GhostText/GhostText.js.map +1 -0
  70. package/lib/plugins/GhostText/GhostText.node.js +61 -0
  71. package/lib/plugins/GhostText/GhostText.node.js.map +1 -0
  72. package/lib/plugins/GhostText/index.js +3 -0
  73. package/lib/plugins/GhostText/index.js.map +1 -0
  74. package/lib/plugins/ImperativeControl/ImperativeControl.js +9 -0
  75. package/lib/plugins/ImperativeControl/ImperativeControl.js.map +1 -0
  76. package/lib/plugins/ImperativeControl/index.js +2 -0
  77. package/lib/plugins/ImperativeControl/index.js.map +1 -0
  78. package/lib/plugins/ManualGhostText/ManualGhostText.js +14 -0
  79. package/lib/plugins/ManualGhostText/ManualGhostText.js.map +1 -0
  80. package/lib/plugins/ManualGhostText/index.js +2 -0
  81. package/lib/plugins/ManualGhostText/index.js.map +1 -0
  82. package/lib-commonjs/BasicFunctionality.js +7 -0
  83. package/lib-commonjs/BasicFunctionality.js.map +1 -0
  84. package/lib-commonjs/ChatInputEntity.js +8 -0
  85. package/lib-commonjs/ChatInputEntity.js.map +1 -0
  86. package/lib-commonjs/ChatInputToken.js +7 -0
  87. package/lib-commonjs/ChatInputToken.js.map +1 -0
  88. package/lib-commonjs/GhostText.js +9 -0
  89. package/lib-commonjs/GhostText.js.map +1 -0
  90. package/lib-commonjs/ImperativeControl.js +7 -0
  91. package/lib-commonjs/ImperativeControl.js.map +1 -0
  92. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js +21 -0
  93. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js.map +1 -0
  94. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js +7 -0
  95. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -0
  96. package/lib-commonjs/components/ChatInputEntity/index.js +11 -0
  97. package/lib-commonjs/components/ChatInputEntity/index.js.map +1 -0
  98. package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js +21 -0
  99. package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js.map +1 -0
  100. package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js +52 -0
  101. package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js.map +1 -0
  102. package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.js +71 -0
  103. package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.js.map +1 -0
  104. package/lib-commonjs/components/ChatInputToken/ChatInputToken.js +21 -0
  105. package/lib-commonjs/components/ChatInputToken/ChatInputToken.js.map +1 -0
  106. package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js +81 -0
  107. package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js.map +1 -0
  108. package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js +5 -0
  109. package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js.map +1 -0
  110. package/lib-commonjs/components/ChatInputToken/index.js +12 -0
  111. package/lib-commonjs/components/ChatInputToken/index.js.map +1 -0
  112. package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js +16 -0
  113. package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js.map +1 -0
  114. package/lib-commonjs/components/ChatInputToken/useChatInputToken.js +24 -0
  115. package/lib-commonjs/components/ChatInputToken/useChatInputToken.js.map +1 -0
  116. package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.js +34 -0
  117. package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.js.map +1 -0
  118. package/lib-commonjs/components/GhostText/GhostText.js +21 -0
  119. package/lib-commonjs/components/GhostText/GhostText.js.map +1 -0
  120. package/lib-commonjs/components/GhostText/GhostText.types.js +7 -0
  121. package/lib-commonjs/components/GhostText/GhostText.types.js.map +1 -0
  122. package/lib-commonjs/components/GhostText/index.js +11 -0
  123. package/lib-commonjs/components/GhostText/index.js.map +1 -0
  124. package/lib-commonjs/components/GhostText/renderGhostText.js +21 -0
  125. package/lib-commonjs/components/GhostText/renderGhostText.js.map +1 -0
  126. package/lib-commonjs/components/GhostText/useGhostText.js +28 -0
  127. package/lib-commonjs/components/GhostText/useGhostText.js.map +1 -0
  128. package/lib-commonjs/components/GhostText/useGhostTextStyles.js +103 -0
  129. package/lib-commonjs/components/GhostText/useGhostTextStyles.js.map +1 -0
  130. package/lib-commonjs/index.js +102 -0
  131. package/lib-commonjs/index.js.map +1 -0
  132. package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js +70 -0
  133. package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -0
  134. package/lib-commonjs/plugins/BasicFunctionality/index.js +7 -0
  135. package/lib-commonjs/plugins/BasicFunctionality/index.js.map +1 -0
  136. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js +100 -0
  137. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -0
  138. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js +52 -0
  139. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -0
  140. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +5 -0
  141. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +1 -0
  142. package/lib-commonjs/plugins/ChatInputEntity/index.js +9 -0
  143. package/lib-commonjs/plugins/ChatInputEntity/index.js.map +1 -0
  144. package/lib-commonjs/plugins/GhostText/GhostText.js +58 -0
  145. package/lib-commonjs/plugins/GhostText/GhostText.js.map +1 -0
  146. package/lib-commonjs/plugins/GhostText/GhostText.node.js +82 -0
  147. package/lib-commonjs/plugins/GhostText/GhostText.node.js.map +1 -0
  148. package/lib-commonjs/plugins/GhostText/index.js +8 -0
  149. package/lib-commonjs/plugins/GhostText/index.js.map +1 -0
  150. package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js +21 -0
  151. package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js.map +1 -0
  152. package/lib-commonjs/plugins/ImperativeControl/index.js +7 -0
  153. package/lib-commonjs/plugins/ImperativeControl/index.js.map +1 -0
  154. package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js +25 -0
  155. package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js.map +1 -0
  156. package/lib-commonjs/plugins/ManualGhostText/index.js +7 -0
  157. package/lib-commonjs/plugins/ManualGhostText/index.js.map +1 -0
  158. package/package.json +39 -0
package/CHANGELOG.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@fluentui-copilot/react-chat-input-plugins",
3
+ "entries": [
4
+ {
5
+ "date": "Wed, 10 Apr 2024 04:10:39 GMT",
6
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20240410-0405-8d7a6b79.1",
7
+ "version": "0.0.0-nightly-20240410-0405-8d7a6b79.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "fluentui-internal@service.microsoft.com",
12
+ "package": "@fluentui-copilot/react-chat-input-plugins",
13
+ "commit": "not available",
14
+ "comment": "Release nightly"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-copilot/react-chat-input-plugins",
19
+ "comment": "Bump @fluentui-copilot/chat-input-plugins to v0.0.0-nightly-20240410-0405-8d7a6b79.1",
20
+ "commit": "3f79f89e6290755f808ad6fbd047d049b9ada38c"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui-copilot/react-chat-input-plugins",
25
+ "comment": "Bump @fluentui-copilot/react-text-editor to v0.0.0-nightly-20240410-0405-8d7a6b79.1",
26
+ "commit": "3f79f89e6290755f808ad6fbd047d049b9ada38c"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui-copilot/react-chat-input-plugins",
31
+ "comment": "Bump @fluentui-copilot/text-editor to v0.0.0-nightly-20240410-0405-8d7a6b79.1",
32
+ "commit": "3f79f89e6290755f808ad6fbd047d049b9ada38c"
33
+ }
34
+ ]
35
+ }
36
+ }
37
+ ]
38
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Change Log - @fluentui-copilot/react-chat-input-plugins
2
+
3
+ This log was last generated on Wed, 10 Apr 2024 04:10:39 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20240410-0405-8d7a6b79.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20240410-0405-8d7a6b79.1)
8
+
9
+ Wed, 10 Apr 2024 04:10:39 GMT
10
+
11
+ ### Changes
12
+
13
+ - Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
14
+ - Bump @fluentui-copilot/chat-input-plugins to v0.0.0-nightly-20240410-0405-8d7a6b79.1 ([commit](https://github.com/microsoft/fluentai/commit/3f79f89e6290755f808ad6fbd047d049b9ada38c) by beachball)
15
+ - Bump @fluentui-copilot/react-text-editor to v0.0.0-nightly-20240410-0405-8d7a6b79.1 ([commit](https://github.com/microsoft/fluentai/commit/3f79f89e6290755f808ad6fbd047d049b9ada38c) by beachball)
16
+ - Bump @fluentui-copilot/text-editor to v0.0.0-nightly-20240410-0405-8d7a6b79.1 ([commit](https://github.com/microsoft/fluentai/commit/3f79f89e6290755f808ad6fbd047d049b9ada38c) by beachball)
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ @fluentui-copilot/react-chat-input-plugins
2
+
3
+ MIT License
4
+
5
+ Copyright (c) Microsoft Corporation.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui-copilot/react-chat-input-plugins
2
+
3
+ **For internal use only. External use is not supported at this time.**
4
+
5
+ **React Chat Input Plugins components for [Fluent AI React](https://ai.fluentui.dev/)**
@@ -0,0 +1,295 @@
1
+ import type { ComponentProps } from '@fluentui/react-components';
2
+ import type { ComponentState } from '@fluentui/react-components';
3
+ import { DecoratorNode } from 'lexical';
4
+ import { EditorConfig } from 'lexical';
5
+ import { EditorState } from 'lexical';
6
+ import type { ForwardRefComponent } from '@fluentui/react-components';
7
+ import { LexicalEditor } from 'lexical';
8
+ import { LexicalNode } from 'lexical';
9
+ import { NodeKey } from 'lexical';
10
+ import * as React_2 from 'react';
11
+ import { SerializedLexicalNode } from 'lexical';
12
+ import type { Slot } from '@fluentui/react-components';
13
+ import type { SlotClassNames } from '@fluentui/react-components';
14
+ import { Spread } from 'lexical';
15
+
16
+ export declare function $createChatInputEntityNode<T>(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey): ChatInputEntityNode<T>;
17
+
18
+ export declare function $createChatInputTokenNode(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey): ChatInputTokenNode;
19
+
20
+ export declare function $createGhostTextNode(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps): GhostTextNode;
21
+
22
+ export declare function $isChatInputEntityNode<T>(node: LexicalNode | null | undefined): node is ChatInputEntityNode<T>;
23
+
24
+ export declare function $isChatInputTokenNode(node: LexicalNode | null | undefined): node is ChatInputTokenNode;
25
+
26
+ export declare function $isGhostTextNode(node: LexicalNode | null | undefined): node is GhostTextNode;
27
+
28
+ export declare const BasicFunctionalityPlugin: React_2.ForwardRefExoticComponent<BasicFunctionalityPluginProps & React_2.RefAttributes<BasicFunctionalityPluginRef>>;
29
+
30
+ export declare type BasicFunctionalityPluginProps = {
31
+ defaultValue?: string;
32
+ trimWhitespace?: boolean;
33
+ onCountChanged?: (count: number) => void;
34
+ onContentChange?: (value: string) => void;
35
+ };
36
+
37
+ export declare type BasicFunctionalityPluginRef = {
38
+ setIsDisabled: (isDisabled: boolean) => void;
39
+ };
40
+
41
+ export declare const ChatInputEntity: ForwardRefComponent<ChatInputEntityProps>;
42
+
43
+ export declare const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots>;
44
+
45
+ declare type ChatInputEntityData<ExtraDataType, NodePropsType> = {
46
+ text: string;
47
+ entityProps?: NodePropsType;
48
+ data?: ExtraDataType;
49
+ };
50
+
51
+ export declare class ChatInputEntityNode<T> extends DecoratorNode<JSX.Element | null> {
52
+ __pluginId: string;
53
+ __text: string;
54
+ __entityProps?: ChatInputEntityProps;
55
+ __data?: T;
56
+ static getType(): string;
57
+ static clone<T>(node: ChatInputEntityNode<T>): ChatInputEntityNode<T>;
58
+ static importJSON<T>(serializedNode: SerializedChatInputEntityNode<T>): ChatInputEntityNode<T>;
59
+ isIsolated(): boolean;
60
+ isInline(): boolean;
61
+ getTextContent(): string;
62
+ exportJSON(): SerializedChatInputEntityNode<T>;
63
+ constructor(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey);
64
+ createDOM(): HTMLElement;
65
+ updateDOM(): boolean;
66
+ decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element | null;
67
+ getEntityData(): ChatInputEntityData<T, ChatInputEntityProps>;
68
+ updateEntityData(data: ChatInputEntityData<T, ChatInputEntityProps>): void;
69
+ }
70
+
71
+ export declare const ChatInputEntityPlugin: <ExtraDataType>(props: ChatInputEntityPluginProps<ExtraDataType, ChatInputEntityProps> & {
72
+ controlRef: React_2.Ref<ChatInputEntityPluginRef<ExtraDataType>>;
73
+ }) => null;
74
+
75
+ declare type ChatInputEntityPluginProps<ExtraDataType, NodePropsType> = {
76
+ id: string;
77
+ onChatInputEntityAdded?: (entity: ChatInputEntityData<ExtraDataType, NodePropsType>) => void;
78
+ onChatInputEntityDeleted?: (entity: ChatInputEntityData<ExtraDataType, NodePropsType>) => void;
79
+ };
80
+
81
+ export declare type ChatInputEntityPluginRef<ExtraDataType = undefined> = {
82
+ insertChatInputEntity: (props: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>) => string | undefined;
83
+ removeChatInputEntity: (keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean)) => void;
84
+ updateChatInputEntityProps: (keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean), props: ChatInputEntityData<ExtraDataType, ChatInputEntityProps> | ((oldProps: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>) => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>)) => void;
85
+ getActiveEntities: () => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>[];
86
+ };
87
+
88
+ /**
89
+ * ChatInputEntity Props
90
+ */
91
+ export declare type ChatInputEntityProps = ComponentProps<Partial<ChatInputEntitySlots>, 'text'> & {};
92
+
93
+ export declare type ChatInputEntitySlots = {
94
+ root: NonNullable<Slot<'span'>>;
95
+ text: Slot<'span', 'a'>;
96
+ sensitivity?: Slot<'span'>;
97
+ };
98
+
99
+ /**
100
+ * State used in rendering ChatInputEntity
101
+ */
102
+ export declare type ChatInputEntityState = ComponentState<ChatInputEntitySlots>;
103
+
104
+ export declare const ChatInputToken: ForwardRefComponent<ChatInputTokenProps>;
105
+
106
+ export declare const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots>;
107
+
108
+ declare class ChatInputTokenNode extends DecoratorNode<JSX.Element | null> {
109
+ __text: string;
110
+ __componentProps?: ChatInputTokenProps;
111
+ static getType(): string;
112
+ static clone(node: ChatInputTokenNode): ChatInputTokenNode;
113
+ static importJSON(serializedNode: SerializedChatInputTokenNode): ChatInputTokenNode;
114
+ isIsolated(): boolean;
115
+ isInline(): boolean;
116
+ getTextContent(): string;
117
+ exportJSON(): SerializedChatInputTokenNode;
118
+ constructor(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey);
119
+ createDOM(): HTMLElement;
120
+ updateDOM(): boolean;
121
+ decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element | null;
122
+ }
123
+
124
+ /**
125
+ * ChatInputToken Props
126
+ */
127
+ export declare type ChatInputTokenProps = ComponentProps<ChatInputTokenSlots> & {};
128
+
129
+ export declare type ChatInputTokenSlots = {
130
+ root: Slot<'span'>;
131
+ };
132
+
133
+ /**
134
+ * State used in rendering ChatInputToken
135
+ */
136
+ export declare type ChatInputTokenState = ComponentState<ChatInputTokenSlots>;
137
+
138
+ export declare const GhostText: ForwardRefComponent<GhostTextProps>;
139
+
140
+ export declare const ghostTextClassNames: SlotClassNames<GhostTextSlots>;
141
+
142
+ export declare class GhostTextNode extends DecoratorNode<JSX.Element | null> {
143
+ __content: string;
144
+ __id: string;
145
+ __allowCommitting?: boolean;
146
+ __componentProps?: GhostTextProps;
147
+ __exposeText?: boolean;
148
+ static clone(node: GhostTextNode): GhostTextNode;
149
+ static getType(): 'ghosttext';
150
+ static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode;
151
+ exportJSON(): SerializedGhostTextNode;
152
+ constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey);
153
+ isInline(): boolean;
154
+ getTextContent(): string;
155
+ updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean;
156
+ createDOM(config: EditorConfig): HTMLElement;
157
+ decorate(): JSX.Element | null;
158
+ }
159
+
160
+ export declare function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null;
161
+
162
+ export declare type GhostTextPluginProps = {
163
+ id: string;
164
+ $getGhostText: (editor: LexicalEditor, editorState: EditorState, prevEditorState: EditorState) => Promise<string | undefined>;
165
+ ghostTextProps?: GhostTextProps;
166
+ exposeText?: boolean;
167
+ allowCompletion?: boolean;
168
+ };
169
+
170
+ /**
171
+ * GhostText Props
172
+ */
173
+ export declare type GhostTextProps = ComponentProps<GhostTextSlots> & {};
174
+
175
+ export declare type GhostTextSlots = {
176
+ root: Slot<'span'>;
177
+ indicator?: Slot<'span'>;
178
+ };
179
+
180
+ /**
181
+ * State used in rendering GhostText
182
+ */
183
+ export declare type GhostTextState = ComponentState<GhostTextSlots>;
184
+
185
+ declare interface IImperativeControlBase {
186
+ setInputText: (inputText: string) => void;
187
+ appendText: (text: string) => void;
188
+ prependText: (text: string) => void;
189
+ insertTextAtCursor: (text: string) => void;
190
+ getInputText: () => string;
191
+ scrollToBottom: () => void;
192
+ }
193
+
194
+ export declare const ImperativeControlPlugin: React_2.ForwardRefExoticComponent<React_2.RefAttributes<IImperativeControlBase>>;
195
+
196
+ export declare type ImperativeControlPluginProps = {};
197
+
198
+ export declare type ImperativeControlPluginRef = IImperativeControlBase;
199
+
200
+ export declare const ManualGhostTextPlugin: React_2.ForwardRefExoticComponent<ManualGhostTextProps & React_2.RefAttributes<ManualGhostTextRef>>;
201
+
202
+ export declare type ManualGhostTextProps = {
203
+ id: string;
204
+ };
205
+
206
+ export declare type ManualGhostTextRef = {
207
+ getGhostText: () => string | undefined;
208
+ setGhostText: (text: string, exposeText?: boolean, ghostTextProps?: GhostTextProps) => void;
209
+ commitGhostText: (finalText: string) => void;
210
+ cancelGhostText: () => void;
211
+ };
212
+
213
+ /**
214
+ * Render the final JSX of ChatInputEntity
215
+ */
216
+ export declare const renderChatInputEntity_unstable: (state: ChatInputEntityState) => JSX.Element;
217
+
218
+ /**
219
+ * Render the final JSX of ChatInputToken
220
+ */
221
+ export declare const renderChatInputToken_unstable: (state: ChatInputTokenState) => JSX.Element;
222
+
223
+ /**
224
+ * Render the final JSX of GhostText
225
+ */
226
+ export declare const renderGhostText_unstable: (state: GhostTextState) => JSX.Element;
227
+
228
+ export declare type SerializedChatInputEntityNode<T> = Spread<{
229
+ pluginId: string;
230
+ text: string;
231
+ data?: T;
232
+ entityProps?: ChatInputEntityProps;
233
+ }, SerializedLexicalNode>;
234
+
235
+ export declare type SerializedChatInputTokenNode = Spread<{
236
+ text: string;
237
+ componentProps?: ChatInputTokenProps;
238
+ }, SerializedLexicalNode>;
239
+
240
+ export declare type SerializedGhostTextNode = Spread<{
241
+ content: string;
242
+ id: string;
243
+ componentProps?: GhostTextProps;
244
+ exposeText?: boolean;
245
+ }, SerializedLexicalNode>;
246
+
247
+ /**
248
+ * Create the state required to render ChatInputEntity.
249
+ *
250
+ * The returned state can be modified with hooks such as useChatInputEntityStyles_unstable,
251
+ * before being passed to renderChatInputEntity_unstable.
252
+ *
253
+ * @param props - props from this instance of ChatInputEntity
254
+ * @param ref - reference to root HTMLElement of ChatInputEntity
255
+ */
256
+ export declare const useChatInputEntity_unstable: (props: ChatInputEntityProps, ref: React_2.Ref<HTMLSpanElement | HTMLAnchorElement>) => ChatInputEntityState;
257
+
258
+ /**
259
+ * Apply styling to the ChatInputEntity slots based on the state
260
+ */
261
+ export declare const useChatInputEntityStyles_unstable: (state: ChatInputEntityState) => ChatInputEntityState;
262
+
263
+ /**
264
+ * Create the state required to render ChatInputToken.
265
+ *
266
+ * The returned state can be modified with hooks such as useChatInputTokenStyles_unstable,
267
+ * before being passed to renderChatInputToken_unstable.
268
+ *
269
+ * @param props - props from this instance of ChatInputToken
270
+ * @param ref - reference to root HTMLElement of ChatInputToken
271
+ */
272
+ export declare const useChatInputToken_unstable: (props: ChatInputTokenProps, ref: React_2.Ref<HTMLElement>) => ChatInputTokenState;
273
+
274
+ /**
275
+ * Apply styling to the ChatInputToken slots based on the state
276
+ */
277
+ export declare const useChatInputTokenStyles_unstable: (state: ChatInputTokenState) => ChatInputTokenState;
278
+
279
+ /**
280
+ * Create the state required to render GhostText.
281
+ *
282
+ * The returned state can be modified with hooks such as useGhostTextStyles_unstable,
283
+ * before being passed to renderGhostText_unstable.
284
+ *
285
+ * @param props - props from this instance of GhostText
286
+ * @param ref - reference to root HTMLElement of GhostText
287
+ */
288
+ export declare const useGhostText_unstable: (props: GhostTextProps, ref: React_2.Ref<HTMLSpanElement>) => GhostTextState;
289
+
290
+ /**
291
+ * Apply styling to the GhostText slots based on the state
292
+ */
293
+ export declare const useGhostTextStyles_unstable: (state: GhostTextState) => GhostTextState;
294
+
295
+ export { }
@@ -0,0 +1,2 @@
1
+ export * from './plugins/BasicFunctionality/index';
2
+ //# sourceMappingURL=BasicFunctionality.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["BasicFunctionality.ts"],"sourcesContent":["export * from './plugins/BasicFunctionality/index';\n"],"names":[],"mappings":"AAAA,cAAc,qCAAqC"}
@@ -0,0 +1,3 @@
1
+ export * from './components/ChatInputEntity/index';
2
+ export * from './plugins/ChatInputEntity/index';
3
+ //# sourceMappingURL=ChatInputEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntity.ts"],"sourcesContent":["export * from './components/ChatInputEntity/index';\nexport * from './plugins/ChatInputEntity/index';\n"],"names":[],"mappings":"AAAA,cAAc,qCAAqC;AACnD,cAAc,kCAAkC"}
@@ -0,0 +1,2 @@
1
+ export * from './components/ChatInputToken/index';
2
+ //# sourceMappingURL=ChatInputToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputToken.ts"],"sourcesContent":["export * from './components/ChatInputToken/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -0,0 +1,4 @@
1
+ export * from './components/GhostText/index';
2
+ export * from './plugins/GhostText/index';
3
+ export * from './plugins/ManualGhostText/index';
4
+ //# sourceMappingURL=GhostText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["GhostText.ts"],"sourcesContent":["export * from './components/GhostText/index';\nexport * from './plugins/GhostText/index';\nexport * from './plugins/ManualGhostText/index';\n"],"names":[],"mappings":"AAAA,cAAc,+BAA+B;AAC7C,cAAc,4BAA4B;AAC1C,cAAc,kCAAkC"}
@@ -0,0 +1,2 @@
1
+ export * from './plugins/ImperativeControl/index';
2
+ //# sourceMappingURL=ImperativeControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ImperativeControl.ts"],"sourcesContent":["export * from './plugins/ImperativeControl/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { useChatInputEntity_unstable } from './useChatInputEntity';
3
+ import { renderChatInputEntity_unstable } from './renderChatInputEntity';
4
+ import { useChatInputEntityStyles_unstable } from './useChatInputEntityStyles';
5
+ // ChatInputEntity component - TODO: add more docs
6
+ export const ChatInputEntity = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const state = useChatInputEntity_unstable(props, ref);
8
+ useChatInputEntityStyles_unstable(state);
9
+ return renderChatInputEntity_unstable(state);
10
+ });
11
+ ChatInputEntity.displayName = 'ChatInputEntity';
12
+ //# sourceMappingURL=ChatInputEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntity.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useChatInputEntity_unstable } from './useChatInputEntity';\nimport { renderChatInputEntity_unstable } from './renderChatInputEntity';\nimport { useChatInputEntityStyles_unstable } from './useChatInputEntityStyles';\nimport type { ChatInputEntityProps } from './ChatInputEntity.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ChatInputEntity component - TODO: add more docs\nexport const ChatInputEntity: ForwardRefComponent<ChatInputEntityProps> = React.forwardRef((props, ref) => {\n const state = useChatInputEntity_unstable(props, ref);\n\n useChatInputEntityStyles_unstable(state);\n return renderChatInputEntity_unstable(state);\n});\n\nChatInputEntity.displayName = 'ChatInputEntity';\n"],"names":["React","useChatInputEntity_unstable","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","ChatInputEntity","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAI/E,kDAAkD;AAClD,OAAO,MAAMC,gCAA6DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQP,4BAA4BK,OAAOC;IAEjDJ,kCAAkCK;IAClC,OAAON,+BAA+BM;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
1
+ export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.
2
+ // & Required<Pick<ChatInputEntityProps, 'propName'>>
3
+ //# sourceMappingURL=ChatInputEntity.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntity.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ChatInputEntitySlots = {\n root: NonNullable<Slot<'span'>>;\n text: Slot<'span', 'a'>;\n sensitivity?: Slot<'span'>;\n};\n\n/**\n * ChatInputEntity Props\n */\nexport type ChatInputEntityProps = ComponentProps<Partial<ChatInputEntitySlots>, 'text'> & {};\n\n/**\n * State used in rendering ChatInputEntity\n */\nexport type ChatInputEntityState = ComponentState<ChatInputEntitySlots>;\n// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.\n// & Required<Pick<ChatInputEntityProps, 'propName'>>\n"],"names":[],"mappings":"AAAA,WAgBwE,CACxE,gIAAgI;CAChI,qDAAqD"}
@@ -0,0 +1,6 @@
1
+ export * from './ChatInputEntity';
2
+ export * from './ChatInputEntity.types';
3
+ export * from './renderChatInputEntity';
4
+ export * from './useChatInputEntity';
5
+ export * from './useChatInputEntityStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ChatInputEntity';\nexport * from './ChatInputEntity.types';\nexport * from './renderChatInputEntity';\nexport * from './useChatInputEntity';\nexport * from './useChatInputEntityStyles';\n"],"names":[],"mappings":"AAAA,cAAc,oBAAoB;AAClC,cAAc,0BAA0B;AACxC,cAAc,0BAA0B;AACxC,cAAc,uBAAuB;AACrC,cAAc,6BAA6B"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-components';
3
+ /**
4
+ * Render the final JSX of ChatInputEntity
5
+ */
6
+ export const renderChatInputEntity_unstable = state => {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/_jsxs(state.root, {
9
+ children: [/*#__PURE__*/_jsx(state.text, {}), state.sensitivity && /*#__PURE__*/_jsx(state.sensitivity, {})]
10
+ });
11
+ };
12
+ //# sourceMappingURL=renderChatInputEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderChatInputEntity.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ChatInputEntityState, ChatInputEntitySlots } from './ChatInputEntity.types';\n\n/**\n * Render the final JSX of ChatInputEntity\n */\nexport const renderChatInputEntity_unstable = (state: ChatInputEntityState) => {\n assertSlots<ChatInputEntitySlots>(state);\n\n return (\n <state.root>\n <state.text />\n {state.sensitivity && <state.sensitivity />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderChatInputEntity_unstable","state","root","text","sensitivity"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,IAAI;YACVF,MAAMG,WAAW,kBAAI,KAACH,MAAMG,WAAW;;;AAG9C,EAAE"}
@@ -0,0 +1,55 @@
1
+ import { getPartitionedNativeProps, slot } from '@fluentui/react-components';
2
+ // If you add JSX to this file, be sure to change the file type to .tsx
3
+ /**
4
+ * Create the state required to render ChatInputEntity.
5
+ *
6
+ * The returned state can be modified with hooks such as useChatInputEntityStyles_unstable,
7
+ * before being passed to renderChatInputEntity_unstable.
8
+ *
9
+ * @param props - props from this instance of ChatInputEntity
10
+ * @param ref - reference to root HTMLElement of ChatInputEntity
11
+ */
12
+ export const useChatInputEntity_unstable = (props, ref) => {
13
+ const {
14
+ as
15
+ } = props;
16
+ const elementType = as !== null && as !== void 0 ? as : 'span';
17
+ const nativeProps = getPartitionedNativeProps({
18
+ props,
19
+ primarySlotTagName: elementType
20
+ });
21
+ const defaultTextSlotProps = elementType === 'a' ? {
22
+ target: '_blank',
23
+ rel: 'noopener',
24
+ // We don't want to enable tab focus for components inside the ChatInput
25
+ tabIndex: -1,
26
+ ...nativeProps.primary,
27
+ as: 'a',
28
+ // This cast is safe to do at this point because we know the type of element we are rendering is an anchor
29
+ ref: ref
30
+ } : {
31
+ ...nativeProps.primary,
32
+ as: 'span',
33
+ ref
34
+ };
35
+ return {
36
+ components: {
37
+ root: 'span',
38
+ sensitivity: 'span',
39
+ text: elementType
40
+ },
41
+ root: slot.always(props.root, {
42
+ defaultProps: nativeProps.root,
43
+ elementType: 'span'
44
+ }),
45
+ sensitivity: slot.optional(props.sensitivity, {
46
+ elementType: 'span'
47
+ }),
48
+ text: slot.optional(props.text, {
49
+ defaultProps: defaultTextSlotProps,
50
+ renderByDefault: true,
51
+ elementType
52
+ })
53
+ };
54
+ };
55
+ //# sourceMappingURL=useChatInputEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useChatInputEntity.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getPartitionedNativeProps, slot } from '@fluentui/react-components';\nimport type { ChatInputEntityProps, ChatInputEntityState } from './ChatInputEntity.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render ChatInputEntity.\n *\n * The returned state can be modified with hooks such as useChatInputEntityStyles_unstable,\n * before being passed to renderChatInputEntity_unstable.\n *\n * @param props - props from this instance of ChatInputEntity\n * @param ref - reference to root HTMLElement of ChatInputEntity\n */\nexport const useChatInputEntity_unstable = (\n props: ChatInputEntityProps,\n ref: React.Ref<HTMLSpanElement | HTMLAnchorElement>,\n): ChatInputEntityState => {\n const { as } = props;\n\n const elementType = as ?? 'span';\n\n const nativeProps = getPartitionedNativeProps({ props, primarySlotTagName: elementType });\n\n const defaultTextSlotProps =\n elementType === 'a'\n ? {\n target: '_blank',\n rel: 'noopener',\n // We don't want to enable tab focus for components inside the ChatInput\n tabIndex: -1,\n ...nativeProps.primary,\n as: 'a' as const,\n // This cast is safe to do at this point because we know the type of element we are rendering is an anchor\n ref: ref as React.Ref<HTMLAnchorElement>,\n }\n : { ...nativeProps.primary, as: 'span' as const, ref };\n\n return {\n components: {\n root: 'span',\n sensitivity: 'span',\n text: elementType,\n },\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\n }),\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n text: slot.optional(props.text, {\n defaultProps: defaultTextSlotProps,\n renderByDefault: true,\n elementType,\n }),\n };\n};\n"],"names":["getPartitionedNativeProps","slot","useChatInputEntity_unstable","props","ref","as","elementType","nativeProps","primarySlotTagName","defaultTextSlotProps","target","rel","tabIndex","primary","components","root","sensitivity","text","always","defaultProps","optional","renderByDefault"],"mappings":"AACA,SAASA,yBAAyB,EAAEC,IAAI,QAAQ,6BAA6B;AAG7E,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,EAAE,EAAE,GAAGF;IAEf,MAAMG,cAAcD,eAAAA,gBAAAA,KAAM;IAE1B,MAAME,cAAcP,0BAA0B;QAAEG;QAAOK,oBAAoBF;IAAY;IAEvF,MAAMG,uBACJH,gBAAgB,MACZ;QACEI,QAAQ;QACRC,KAAK;QACL,wEAAwE;QACxEC,UAAU,CAAC;QACX,GAAGL,YAAYM,OAAO;QACtBR,IAAI;QACJ,0GAA0G;QAC1GD,KAAKA;IACP,IACA;QAAE,GAAGG,YAAYM,OAAO;QAAER,IAAI;QAAiBD;IAAI;IAEzD,OAAO;QACLU,YAAY;YACVC,MAAM;YACNC,aAAa;YACbC,MAAMX;QACR;QACAS,MAAMd,KAAKiB,MAAM,CAACf,MAAMY,IAAI,EAAE;YAC5BI,cAAcZ,YAAYQ,IAAI;YAC9BT,aAAa;QACf;QACAU,aAAaf,KAAKmB,QAAQ,CAACjB,MAAMa,WAAW,EAAE;YAAEV,aAAa;QAAO;QACpEW,MAAMhB,KAAKmB,QAAQ,CAACjB,MAAMc,IAAI,EAAE;YAC9BE,cAAcV;YACdY,iBAAiB;YACjBf;QACF;IACF;AACF,EAAE"}
@@ -0,0 +1,44 @@
1
+ import { __styles, mergeClasses, tokens } from '@fluentui/react-components';
2
+ export const chatInputEntityClassNames = {
3
+ root: 'fai-ChatInputEntity',
4
+ sensitivity: 'fai-ChatInputEntity__sensitivity',
5
+ text: 'fai-ChatInputEntity__text'
6
+ };
7
+ /**
8
+ * Styles for the root slot
9
+ */
10
+ const useStyles = __styles({
11
+ root: {},
12
+ text: {
13
+ sj55zd: "f16muhyy"
14
+ },
15
+ href: {
16
+ sj55zd: "fyind8e",
17
+ Bde5pd6: "f1tx3yz7",
18
+ Bi91k9c: "f1deo86v",
19
+ i089h6: "f1eh06m1",
20
+ lj723h: "f1iescvh"
21
+ },
22
+ sensitivity: {
23
+ uwmqm3: ["fgiv446", "ffczdla"]
24
+ }
25
+ }, {
26
+ d: [".f16muhyy{color:var(--colorBrandForeground1);}", ".fyind8e{color:var(--colorBrandForegroundLink);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}"],
27
+ h: [".f1tx3yz7:hover{text-decoration-line:underline;}", ".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}"],
28
+ a: [".f1eh06m1:active{text-decoration-line:underline;}", ".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}"]
29
+ });
30
+ /**
31
+ * Apply styling to the ChatInputEntity slots based on the state
32
+ */
33
+ export const useChatInputEntityStyles_unstable = state => {
34
+ const styles = useStyles();
35
+ state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);
36
+ if (state.text) {
37
+ state.text.className = mergeClasses(chatInputEntityClassNames.text, styles.text, state.text.as === 'a' && styles.href, state.text.className);
38
+ }
39
+ if (state.sensitivity) {
40
+ state.sensitivity.className = mergeClasses(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);
41
+ }
42
+ return state;
43
+ };
44
+ //# sourceMappingURL=useChatInputEntityStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useChatInputEntityStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","chatInputEntityClassNames","root","sensitivity","text","useStyles","color","colorBrandForeground1","href","colorBrandForegroundLink","textDecorationLine","colorBrandForegroundLinkHover","colorBrandForegroundLinkPressed","paddingLeft","spacingHorizontalXXS","useChatInputEntityStyles_unstable","state","styles","className","as"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAI9E,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,aAAa;IACbC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BI,MAAM,CAAC;IAEPE,MAAM;QACJE,OAAON,OAAOO,qBAAqB;IACrC;IAEAC,MAAM;QACJF,OAAON,OAAOS,wBAAwB;QAEtC,UAAU;YACRC,oBAAoB;YACpBJ,OAAON,OAAOW,6BAA6B;QAC7C;QAEA,WAAW;YACTD,oBAAoB;YACpBJ,OAAON,OAAOY,+BAA+B;QAC/C;IACF;IACAT,aAAa;QACXU,aAAab,OAAOc,oBAAoB;IAC1C;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,MAAMC,SAASZ;IAEfW,MAAMd,IAAI,CAACgB,SAAS,GAAGnB,aAAaE,0BAA0BC,IAAI,EAAEe,OAAOf,IAAI,EAAEc,MAAMd,IAAI,CAACgB,SAAS;IAErG,IAAIF,MAAMZ,IAAI,EAAE;QACdY,MAAMZ,IAAI,CAACc,SAAS,GAAGnB,aACrBE,0BAA0BG,IAAI,EAC9Ba,OAAOb,IAAI,EACXY,MAAMZ,IAAI,CAACe,EAAE,KAAK,OAAOF,OAAOT,IAAI,EACpCQ,MAAMZ,IAAI,CAACc,SAAS;IAExB;IAEA,IAAIF,MAAMb,WAAW,EAAE;QACrBa,MAAMb,WAAW,CAACe,SAAS,GAAGnB,aAC5BE,0BAA0BE,WAAW,EACrCc,OAAOd,WAAW,EAClBa,MAAMb,WAAW,CAACe,SAAS;IAE/B;IAEA,OAAOF;AACT,EAAE"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { useChatInputToken_unstable } from './useChatInputToken';
3
+ import { renderChatInputToken_unstable } from './renderChatInputToken';
4
+ import { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles';
5
+ // ChatInputToken component
6
+ export const ChatInputToken = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const state = useChatInputToken_unstable(props, ref);
8
+ useChatInputTokenStyles_unstable(state);
9
+ return renderChatInputToken_unstable(state);
10
+ });
11
+ ChatInputToken.displayName = 'ChatInputToken';
12
+ //# sourceMappingURL=ChatInputToken.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputToken.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useChatInputToken_unstable } from './useChatInputToken';\nimport { renderChatInputToken_unstable } from './renderChatInputToken';\nimport { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles';\nimport type { ChatInputTokenProps } from './ChatInputToken.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ChatInputToken component\nexport const ChatInputToken: ForwardRefComponent<ChatInputTokenProps> = React.forwardRef((props, ref) => {\n const state = useChatInputToken_unstable(props, ref);\n\n useChatInputTokenStyles_unstable(state);\n return renderChatInputToken_unstable(state);\n});\n\nChatInputToken.displayName = 'ChatInputToken';\n"],"names":["React","useChatInputToken_unstable","renderChatInputToken_unstable","useChatInputTokenStyles_unstable","ChatInputToken","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAI7E,2BAA2B;AAC3B,OAAO,MAAMC,+BAA2DJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQP,2BAA2BK,OAAOC;IAEhDJ,iCAAiCK;IACjC,OAAON,8BAA8BM;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}