@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20251010-0406-7df7c6d1.1 → 0.0.0-nightly-20251013-0406-7c7739c8.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 (180) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/dist/index.d.ts +283 -0
  4. package/lib/BasicFunctionality.js +1 -0
  5. package/lib/BasicFunctionality.js.map +1 -0
  6. package/lib/ChatInputEntity.js +2 -0
  7. package/lib/ChatInputEntity.js.map +1 -0
  8. package/lib/ChatInputToken.js +1 -0
  9. package/lib/ChatInputToken.js.map +1 -0
  10. package/lib/GhostText.js +3 -0
  11. package/lib/GhostText.js.map +1 -0
  12. package/lib/ImperativeControl.js +1 -0
  13. package/lib/ImperativeControl.js.map +1 -0
  14. package/lib/PasteUnfurling.js +1 -0
  15. package/lib/PasteUnfurling.js.map +1 -0
  16. package/lib/components/ChatInputEntity/ChatInputEntity.js +11 -0
  17. package/lib/components/ChatInputEntity/ChatInputEntity.js.map +1 -0
  18. package/lib/components/ChatInputEntity/ChatInputEntity.types.js +4 -0
  19. package/lib/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -0
  20. package/lib/components/ChatInputEntity/index.js +4 -0
  21. package/lib/components/ChatInputEntity/index.js.map +1 -0
  22. package/lib/components/ChatInputEntity/renderChatInputEntity.js +13 -0
  23. package/lib/components/ChatInputEntity/renderChatInputEntity.js.map +1 -0
  24. package/lib/components/ChatInputEntity/useChatInputEntity.js +51 -0
  25. package/lib/components/ChatInputEntity/useChatInputEntity.js.map +1 -0
  26. package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js +47 -0
  27. package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +1 -0
  28. package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +43 -0
  29. package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +1 -0
  30. package/lib/components/ChatInputToken/ChatInputToken.js +11 -0
  31. package/lib/components/ChatInputToken/ChatInputToken.js.map +1 -0
  32. package/lib/components/ChatInputToken/ChatInputToken.node.js +59 -0
  33. package/lib/components/ChatInputToken/ChatInputToken.node.js.map +1 -0
  34. package/lib/components/ChatInputToken/ChatInputToken.types.js +3 -0
  35. package/lib/components/ChatInputToken/ChatInputToken.types.js.map +1 -0
  36. package/lib/components/ChatInputToken/index.js +5 -0
  37. package/lib/components/ChatInputToken/index.js.map +1 -0
  38. package/lib/components/ChatInputToken/renderChatInputToken.js +8 -0
  39. package/lib/components/ChatInputToken/renderChatInputToken.js.map +1 -0
  40. package/lib/components/ChatInputToken/useChatInputToken.js +23 -0
  41. package/lib/components/ChatInputToken/useChatInputToken.js.map +1 -0
  42. package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js +20 -0
  43. package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +1 -0
  44. package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +25 -0
  45. package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +1 -0
  46. package/lib/components/GhostText/GhostText.js +11 -0
  47. package/lib/components/GhostText/GhostText.js.map +1 -0
  48. package/lib/components/GhostText/GhostText.types.js +4 -0
  49. package/lib/components/GhostText/GhostText.types.js.map +1 -0
  50. package/lib/components/GhostText/index.js +4 -0
  51. package/lib/components/GhostText/index.js.map +1 -0
  52. package/lib/components/GhostText/renderGhostText.js +13 -0
  53. package/lib/components/GhostText/renderGhostText.js.map +1 -0
  54. package/lib/components/GhostText/useGhostText.js +49 -0
  55. package/lib/components/GhostText/useGhostText.js.map +1 -0
  56. package/lib/components/GhostText/useGhostTextStyles.styles.js +60 -0
  57. package/lib/components/GhostText/useGhostTextStyles.styles.js.map +1 -0
  58. package/lib/components/GhostText/useGhostTextStyles.styles.raw.js +35 -0
  59. package/lib/components/GhostText/useGhostTextStyles.styles.raw.js.map +1 -0
  60. package/lib/index.js +6 -0
  61. package/lib/index.js.map +1 -0
  62. package/lib/plugins/BasicFunctionality/BasicFunctionality.js +58 -0
  63. package/lib/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -0
  64. package/lib/plugins/BasicFunctionality/index.js +1 -0
  65. package/lib/plugins/BasicFunctionality/index.js.map +1 -0
  66. package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +78 -0
  67. package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -0
  68. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js +42 -0
  69. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -0
  70. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +1 -0
  71. package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +1 -0
  72. package/lib/plugins/ChatInputEntity/index.js +2 -0
  73. package/lib/plugins/ChatInputEntity/index.js.map +1 -0
  74. package/lib/plugins/GhostText/GhostText.js +50 -0
  75. package/lib/plugins/GhostText/GhostText.js.map +1 -0
  76. package/lib/plugins/GhostText/GhostText.node.js +66 -0
  77. package/lib/plugins/GhostText/GhostText.node.js.map +1 -0
  78. package/lib/plugins/GhostText/index.js +2 -0
  79. package/lib/plugins/GhostText/index.js.map +1 -0
  80. package/lib/plugins/ImperativeControl/ImperativeControl.js +10 -0
  81. package/lib/plugins/ImperativeControl/ImperativeControl.js.map +1 -0
  82. package/lib/plugins/ImperativeControl/index.js +1 -0
  83. package/lib/plugins/ImperativeControl/index.js.map +1 -0
  84. package/lib/plugins/ManualGhostText/ManualGhostText.js +14 -0
  85. package/lib/plugins/ManualGhostText/ManualGhostText.js.map +1 -0
  86. package/lib/plugins/ManualGhostText/index.js +1 -0
  87. package/lib/plugins/ManualGhostText/index.js.map +1 -0
  88. package/lib/plugins/PasteUnfurling/PasteUnfurling.js +19 -0
  89. package/lib/plugins/PasteUnfurling/PasteUnfurling.js.map +1 -0
  90. package/lib/plugins/PasteUnfurling/index.js +1 -0
  91. package/lib/plugins/PasteUnfurling/index.js.map +1 -0
  92. package/lib-commonjs/BasicFunctionality.js +11 -0
  93. package/lib-commonjs/BasicFunctionality.js.map +1 -0
  94. package/lib-commonjs/ChatInputEntity.js +41 -0
  95. package/lib-commonjs/ChatInputEntity.js.map +1 -0
  96. package/lib-commonjs/ChatInputToken.js +37 -0
  97. package/lib-commonjs/ChatInputToken.js.map +1 -0
  98. package/lib-commonjs/GhostText.js +45 -0
  99. package/lib-commonjs/GhostText.js.map +1 -0
  100. package/lib-commonjs/ImperativeControl.js +11 -0
  101. package/lib-commonjs/ImperativeControl.js.map +1 -0
  102. package/lib-commonjs/PasteUnfurling.js +11 -0
  103. package/lib-commonjs/PasteUnfurling.js.map +1 -0
  104. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js +21 -0
  105. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js.map +1 -0
  106. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js +8 -0
  107. package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -0
  108. package/lib-commonjs/components/ChatInputEntity/index.js +31 -0
  109. package/lib-commonjs/components/ChatInputEntity/index.js.map +1 -0
  110. package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js +21 -0
  111. package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js.map +1 -0
  112. package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js +52 -0
  113. package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js.map +1 -0
  114. package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js +72 -0
  115. package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +1 -0
  116. package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +59 -0
  117. package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +1 -0
  118. package/lib-commonjs/components/ChatInputToken/ChatInputToken.js +21 -0
  119. package/lib-commonjs/components/ChatInputToken/ChatInputToken.js.map +1 -0
  120. package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js +81 -0
  121. package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js.map +1 -0
  122. package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js +6 -0
  123. package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js.map +1 -0
  124. package/lib-commonjs/components/ChatInputToken/index.js +41 -0
  125. package/lib-commonjs/components/ChatInputToken/index.js.map +1 -0
  126. package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js +16 -0
  127. package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js.map +1 -0
  128. package/lib-commonjs/components/ChatInputToken/useChatInputToken.js +24 -0
  129. package/lib-commonjs/components/ChatInputToken/useChatInputToken.js.map +1 -0
  130. package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js +33 -0
  131. package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +1 -0
  132. package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +41 -0
  133. package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +1 -0
  134. package/lib-commonjs/components/GhostText/GhostText.js +21 -0
  135. package/lib-commonjs/components/GhostText/GhostText.js.map +1 -0
  136. package/lib-commonjs/components/GhostText/GhostText.types.js +8 -0
  137. package/lib-commonjs/components/GhostText/GhostText.types.js.map +1 -0
  138. package/lib-commonjs/components/GhostText/index.js +31 -0
  139. package/lib-commonjs/components/GhostText/index.js.map +1 -0
  140. package/lib-commonjs/components/GhostText/renderGhostText.js +21 -0
  141. package/lib-commonjs/components/GhostText/renderGhostText.js.map +1 -0
  142. package/lib-commonjs/components/GhostText/useGhostText.js +51 -0
  143. package/lib-commonjs/components/GhostText/useGhostText.js.map +1 -0
  144. package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js +98 -0
  145. package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js.map +1 -0
  146. package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js +51 -0
  147. package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js.map +1 -0
  148. package/lib-commonjs/index.js +108 -0
  149. package/lib-commonjs/index.js.map +1 -0
  150. package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js +69 -0
  151. package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -0
  152. package/lib-commonjs/plugins/BasicFunctionality/index.js +11 -0
  153. package/lib-commonjs/plugins/BasicFunctionality/index.js.map +1 -0
  154. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js +100 -0
  155. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -0
  156. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js +53 -0
  157. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -0
  158. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +4 -0
  159. package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +1 -0
  160. package/lib-commonjs/plugins/ChatInputEntity/index.js +26 -0
  161. package/lib-commonjs/plugins/ChatInputEntity/index.js.map +1 -0
  162. package/lib-commonjs/plugins/GhostText/GhostText.js +60 -0
  163. package/lib-commonjs/plugins/GhostText/GhostText.js.map +1 -0
  164. package/lib-commonjs/plugins/GhostText/GhostText.node.js +88 -0
  165. package/lib-commonjs/plugins/GhostText/GhostText.node.js.map +1 -0
  166. package/lib-commonjs/plugins/GhostText/index.js +26 -0
  167. package/lib-commonjs/plugins/GhostText/index.js.map +1 -0
  168. package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js +21 -0
  169. package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js.map +1 -0
  170. package/lib-commonjs/plugins/ImperativeControl/index.js +11 -0
  171. package/lib-commonjs/plugins/ImperativeControl/index.js.map +1 -0
  172. package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js +25 -0
  173. package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js.map +1 -0
  174. package/lib-commonjs/plugins/ManualGhostText/index.js +11 -0
  175. package/lib-commonjs/plugins/ManualGhostText/index.js.map +1 -0
  176. package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js +30 -0
  177. package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js.map +1 -0
  178. package/lib-commonjs/plugins/PasteUnfurling/index.js +11 -0
  179. package/lib-commonjs/plugins/PasteUnfurling/index.js.map +1 -0
  180. package/package.json +5 -5
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 10 Oct 2025 04:08:17 GMT",
6
- "tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20251010-0406-7df7c6d1.1",
7
- "version": "0.0.0-nightly-20251010-0406-7df7c6d1.1",
5
+ "date": "Mon, 13 Oct 2025 04:14:19 GMT",
6
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20251013-0406-7c7739c8.1",
7
+ "version": "0.0.0-nightly-20251013-0406-7c7739c8.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
package/CHANGELOG.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Change Log - @fluentui-copilot/react-chat-input-plugins
2
2
 
3
- This log was last generated on Fri, 10 Oct 2025 04:08:17 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 13 Oct 2025 04:14:19 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20251010-0406-7df7c6d1.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20251010-0406-7df7c6d1.1)
7
+ ## [0.0.0-nightly-20251013-0406-7c7739c8.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20251013-0406-7c7739c8.1)
8
8
 
9
- Fri, 10 Oct 2025 04:08:17 GMT
10
- [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.5.5..@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20251010-0406-7df7c6d1.1)
9
+ Mon, 13 Oct 2025 04:14:19 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.5.5..@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20251013-0406-7c7739c8.1)
11
11
 
12
12
  ### Changes
13
13
 
@@ -0,0 +1,283 @@
1
+ import type { ChatInputEntityData } from '@fluentui-copilot/chat-input-plugins';
2
+ import type { ChatInputEntityPluginProps } from '@fluentui-copilot/chat-input-plugins';
3
+ import type { ComponentProps } from '@fluentui/react-components';
4
+ import type { ComponentState } from '@fluentui/react-components';
5
+ import { DecoratorNode } from '@fluentui-copilot/text-editor';
6
+ import type { EditorConfig } from '@fluentui-copilot/text-editor';
7
+ import type { EditorState } from '@fluentui-copilot/text-editor';
8
+ import type { ForwardRefComponent } from '@fluentui/react-components';
9
+ import type { IImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';
10
+ import type { IManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';
11
+ import type { JSXElement } from '@fluentui/react-components';
12
+ import type { LexicalEditor } from '@fluentui-copilot/text-editor';
13
+ import type { LexicalNode } from '@fluentui-copilot/text-editor';
14
+ import type { NodeKey } from '@fluentui-copilot/text-editor';
15
+ import { PasteUnfurlingPluginBaseProps } from '@fluentui-copilot/chat-input-plugins';
16
+ import * as React_2 from 'react';
17
+ import type { SerializedLexicalNode } from '@fluentui-copilot/text-editor';
18
+ import type { Slot } from '@fluentui/react-components';
19
+ import type { SlotClassNames } from '@fluentui/react-components';
20
+ import type { Spread } from '@fluentui-copilot/text-editor';
21
+
22
+ export declare function $createChatInputEntityNode<T>(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey): ChatInputEntityNode<T>;
23
+
24
+ export declare function $createChatInputTokenNode(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey): ChatInputTokenNode;
25
+
26
+ export declare function $createGhostTextNode(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps): GhostTextNode;
27
+
28
+ export declare function $isChatInputEntityNode<T>(node: LexicalNode | null | undefined): node is ChatInputEntityNode<T>;
29
+
30
+ export declare function $isChatInputTokenNode(node: LexicalNode | null | undefined): node is ChatInputTokenNode;
31
+
32
+ export declare function $isGhostTextNode(node: LexicalNode | null | undefined): node is GhostTextNode;
33
+
34
+ export declare const BasicFunctionalityPlugin: React_2.ForwardRefExoticComponent<BasicFunctionalityPluginProps & React_2.RefAttributes<BasicFunctionalityPluginRef>>;
35
+
36
+ export declare type BasicFunctionalityPluginProps = {
37
+ trimWhitespace?: boolean;
38
+ onCountChanged?: (count: number) => void;
39
+ onContentChange?: (value: string) => void;
40
+ onPaste?: (event: ClipboardEvent) => void;
41
+ isSentinelNodeEnabled?: boolean;
42
+ };
43
+
44
+ export declare type BasicFunctionalityPluginRef = {
45
+ setIsDisabled: (isDisabled: boolean) => void;
46
+ };
47
+
48
+ export declare const ChatInputEntity: ForwardRefComponent<ChatInputEntityProps>;
49
+
50
+ export declare const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots>;
51
+
52
+ export declare class ChatInputEntityNode<T> extends DecoratorNode<JSXElement | null> {
53
+ __pluginId: string;
54
+ __text: string;
55
+ __entityProps?: ChatInputEntityProps;
56
+ __data?: T;
57
+ static getType(): string;
58
+ static clone<T>(node: ChatInputEntityNode<T>): ChatInputEntityNode<T>;
59
+ static importJSON<T>(serializedNode: SerializedChatInputEntityNode<T>): ChatInputEntityNode<T>;
60
+ isIsolated(): boolean;
61
+ isInline(): boolean;
62
+ getTextContent(): string;
63
+ exportJSON(): SerializedChatInputEntityNode<T>;
64
+ constructor(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey);
65
+ createDOM(): HTMLElement;
66
+ updateDOM(): boolean;
67
+ decorate(_editor: LexicalEditor, config: EditorConfig): JSXElement | null;
68
+ getEntityData(): ChatInputEntityData<T, ChatInputEntityProps>;
69
+ updateEntityData(data: ChatInputEntityData<T, ChatInputEntityProps>): void;
70
+ }
71
+
72
+ export declare const ChatInputEntityPlugin: <ExtraDataType>(props: ChatInputEntityPluginProps<ExtraDataType, ChatInputEntityProps> & {
73
+ controlRef: React_2.Ref<ChatInputEntityPluginRef<ExtraDataType>>;
74
+ }) => null;
75
+
76
+ export declare type ChatInputEntityPluginRef<ExtraDataType = undefined> = {
77
+ insertChatInputEntity: (props: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>) => string | undefined;
78
+ removeChatInputEntity: (keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean)) => void;
79
+ updateChatInputEntityProps: (keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean), props: ChatInputEntityData<ExtraDataType, ChatInputEntityProps> | ((oldProps: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>) => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>)) => void;
80
+ getActiveEntities: () => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>[];
81
+ };
82
+
83
+ /**
84
+ * ChatInputEntity Props
85
+ */
86
+ export declare type ChatInputEntityProps = ComponentProps<Partial<ChatInputEntitySlots>, 'text'> & {};
87
+
88
+ export declare type ChatInputEntitySlots = {
89
+ root: NonNullable<Slot<'span'>>;
90
+ text: Slot<'span', 'a'>;
91
+ sensitivity?: Slot<'span'>;
92
+ };
93
+
94
+ /**
95
+ * State used in rendering ChatInputEntity
96
+ */
97
+ export declare type ChatInputEntityState = ComponentState<ChatInputEntitySlots>;
98
+
99
+ export declare const ChatInputToken: ForwardRefComponent<ChatInputTokenProps>;
100
+
101
+ export declare const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots>;
102
+
103
+ export declare class ChatInputTokenNode extends DecoratorNode<JSXElement | null> {
104
+ __text: string;
105
+ __componentProps?: ChatInputTokenProps;
106
+ static getType(): string;
107
+ static clone(node: ChatInputTokenNode): ChatInputTokenNode;
108
+ static importJSON(serializedNode: SerializedChatInputTokenNode): ChatInputTokenNode;
109
+ isIsolated(): boolean;
110
+ isInline(): boolean;
111
+ getTextContent(): string;
112
+ exportJSON(): SerializedChatInputTokenNode;
113
+ constructor(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey);
114
+ createDOM(): HTMLElement;
115
+ updateDOM(): boolean;
116
+ decorate(_editor: LexicalEditor, config: EditorConfig): JSXElement | null;
117
+ }
118
+
119
+ /**
120
+ * ChatInputToken Props
121
+ */
122
+ export declare type ChatInputTokenProps = ComponentProps<ChatInputTokenSlots> & {};
123
+
124
+ export declare type ChatInputTokenSlots = {
125
+ root: Slot<'span'>;
126
+ };
127
+
128
+ /**
129
+ * State used in rendering ChatInputToken
130
+ */
131
+ export declare type ChatInputTokenState = ComponentState<ChatInputTokenSlots>;
132
+
133
+ export declare const GhostText: ForwardRefComponent<GhostTextProps>;
134
+
135
+ export declare const ghostTextClassNames: SlotClassNames<GhostTextSlots>;
136
+
137
+ export declare class GhostTextNode extends DecoratorNode<JSXElement | null> {
138
+ __content: string;
139
+ __id: string;
140
+ __allowCommitting?: boolean;
141
+ __componentProps?: GhostTextProps;
142
+ __exposeText?: boolean;
143
+ static clone(node: GhostTextNode): GhostTextNode;
144
+ static getType(): 'ghosttext';
145
+ static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode;
146
+ exportJSON(): SerializedGhostTextNode;
147
+ constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey);
148
+ isInline(): boolean;
149
+ isIsolated(): boolean;
150
+ getTextContent(): string;
151
+ updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean;
152
+ createDOM(config: EditorConfig): HTMLElement;
153
+ decorate(): JSXElement | null;
154
+ }
155
+
156
+ export declare function GhostTextPlugin(props: GhostTextPluginProps): JSXElement | null;
157
+
158
+ export declare type GhostTextPluginProps = {
159
+ id: string;
160
+ $getGhostText: (editor: LexicalEditor, editorState: EditorState, prevEditorState: EditorState) => Promise<string | undefined>;
161
+ ghostTextProps?: GhostTextProps;
162
+ exposeText?: boolean;
163
+ allowCompletion?: boolean;
164
+ };
165
+
166
+ /**
167
+ * GhostText Props
168
+ */
169
+ export declare type GhostTextProps = ComponentProps<GhostTextSlots> & {
170
+ nodeKey?: string;
171
+ };
172
+
173
+ export declare type GhostTextSlots = {
174
+ root: Slot<'span'>;
175
+ indicator?: Slot<'span'>;
176
+ };
177
+
178
+ /**
179
+ * State used in rendering GhostText
180
+ */
181
+ export declare type GhostTextState = ComponentState<GhostTextSlots>;
182
+
183
+ export declare const ImperativeControlPlugin: React_2.ForwardRefExoticComponent<React_2.RefAttributes<IImperativeControlBase>>;
184
+
185
+ export declare type ImperativeControlPluginProps = {};
186
+
187
+ export declare type ImperativeControlPluginRef = IImperativeControlBase;
188
+
189
+ export declare const ManualGhostTextPlugin: React_2.ForwardRefExoticComponent<ManualGhostTextProps & React_2.RefAttributes<ManualGhostTextRef>>;
190
+
191
+ export declare type ManualGhostTextProps = {
192
+ id: string;
193
+ };
194
+
195
+ export declare type ManualGhostTextRef = IManualGhostTextBase<GhostTextProps>;
196
+
197
+ export declare const PasteUnfurlingPlugin: <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType>) => null;
198
+
199
+ export declare type PasteUnfurlingPluginProps<ExtraDataType> = Omit<PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>, '$createEntityNode'> & Pick<Partial<PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>>, '$createEntityNode'>;
200
+
201
+ /**
202
+ * Render the final JSX of ChatInputEntity
203
+ */
204
+ export declare const renderChatInputEntity_unstable: (state: ChatInputEntityState) => JSXElement;
205
+
206
+ /**
207
+ * Render the final JSX of ChatInputToken
208
+ */
209
+ export declare const renderChatInputToken_unstable: (state: ChatInputTokenState) => JSXElement;
210
+
211
+ /**
212
+ * Render the final JSX of GhostText
213
+ */
214
+ export declare const renderGhostText_unstable: (state: GhostTextState) => JSXElement;
215
+
216
+ export declare type SerializedChatInputEntityNode<T> = Spread<{
217
+ pluginId: string;
218
+ text: string;
219
+ data?: T;
220
+ entityProps?: ChatInputEntityProps;
221
+ }, SerializedLexicalNode>;
222
+
223
+ export declare type SerializedChatInputTokenNode = Spread<{
224
+ text: string;
225
+ componentProps?: ChatInputTokenProps;
226
+ }, SerializedLexicalNode>;
227
+
228
+ export declare type SerializedGhostTextNode = Spread<{
229
+ content: string;
230
+ id: string;
231
+ componentProps?: GhostTextProps;
232
+ exposeText?: boolean;
233
+ }, SerializedLexicalNode>;
234
+
235
+ /**
236
+ * Create the state required to render ChatInputEntity.
237
+ *
238
+ * The returned state can be modified with hooks such as useChatInputEntityStyles_unstable,
239
+ * before being passed to renderChatInputEntity_unstable.
240
+ *
241
+ * @param props - props from this instance of ChatInputEntity
242
+ * @param ref - reference to root HTMLElement of ChatInputEntity
243
+ */
244
+ export declare const useChatInputEntity_unstable: (props: ChatInputEntityProps, ref: React_2.Ref<HTMLSpanElement | HTMLAnchorElement>) => ChatInputEntityState;
245
+
246
+ /**
247
+ * Apply styling to the ChatInputEntity slots based on the state
248
+ */
249
+ export declare const useChatInputEntityStyles_unstable: (state: ChatInputEntityState) => ChatInputEntityState;
250
+
251
+ /**
252
+ * Create the state required to render ChatInputToken.
253
+ *
254
+ * The returned state can be modified with hooks such as useChatInputTokenStyles_unstable,
255
+ * before being passed to renderChatInputToken_unstable.
256
+ *
257
+ * @param props - props from this instance of ChatInputToken
258
+ * @param ref - reference to root HTMLElement of ChatInputToken
259
+ */
260
+ export declare const useChatInputToken_unstable: (props: ChatInputTokenProps, ref: React_2.Ref<HTMLElement>) => ChatInputTokenState;
261
+
262
+ /**
263
+ * Apply styling to the ChatInputToken slots based on the state
264
+ */
265
+ export declare const useChatInputTokenStyles_unstable: (state: ChatInputTokenState) => ChatInputTokenState;
266
+
267
+ /**
268
+ * Create the state required to render GhostText.
269
+ *
270
+ * The returned state can be modified with hooks such as useGhostTextStyles_unstable,
271
+ * before being passed to renderGhostText_unstable.
272
+ *
273
+ * @param props - props from this instance of GhostText
274
+ * @param ref - reference to root HTMLElement of GhostText
275
+ */
276
+ export declare const useGhostText_unstable: (props: GhostTextProps, ref: React_2.Ref<HTMLSpanElement>) => GhostTextState;
277
+
278
+ /**
279
+ * Apply styling to the GhostText slots based on the state
280
+ */
281
+ export declare const useGhostTextStyles_unstable: (state: GhostTextState) => GhostTextState;
282
+
283
+ export { }
@@ -0,0 +1 @@
1
+ export { BasicFunctionalityPlugin } from './plugins/BasicFunctionality/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["BasicFunctionality.ts"],"sourcesContent":["export type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './plugins/BasicFunctionality/index';\nexport { BasicFunctionalityPlugin } from './plugins/BasicFunctionality/index';\n"],"names":["BasicFunctionalityPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,wBAAwB,QAAQ,qCAAqC"}
@@ -0,0 +1,2 @@
1
+ export { ChatInputEntity, chatInputEntityClassNames, renderChatInputEntity_unstable, useChatInputEntityStyles_unstable, useChatInputEntity_unstable } from './components/ChatInputEntity/index';
2
+ export { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode, ChatInputEntityPlugin } from './plugins/ChatInputEntity/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntity.ts"],"sourcesContent":["export type { ChatInputEntityProps, ChatInputEntitySlots, ChatInputEntityState } from './components/ChatInputEntity/index';\nexport { ChatInputEntity, chatInputEntityClassNames, renderChatInputEntity_unstable, useChatInputEntityStyles_unstable, useChatInputEntity_unstable } from './components/ChatInputEntity/index';\nexport type { ChatInputEntityPluginRef, SerializedChatInputEntityNode } from './plugins/ChatInputEntity/index';\nexport { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode, ChatInputEntityPlugin } from './plugins/ChatInputEntity/index';\n"],"names":["ChatInputEntity","chatInputEntityClassNames","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","ChatInputEntityPlugin"],"rangeMappings":";","mappings":"AACA,SAASA,eAAe,EAAEC,yBAAyB,EAAEC,8BAA8B,EAAEC,iCAAiC,EAAEC,2BAA2B,QAAQ,qCAAqC;AAEhM,SAASC,0BAA0B,EAAEC,sBAAsB,EAAEC,mBAAmB,EAAEC,qBAAqB,QAAQ,kCAAkC"}
@@ -0,0 +1 @@
1
+ export { $createChatInputTokenNode, $isChatInputTokenNode, ChatInputToken, ChatInputTokenNode, chatInputTokenClassNames, renderChatInputToken_unstable, useChatInputTokenStyles_unstable, useChatInputToken_unstable } from './components/ChatInputToken/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputToken.ts"],"sourcesContent":["export type { ChatInputTokenProps, ChatInputTokenSlots, ChatInputTokenState, SerializedChatInputTokenNode } from './components/ChatInputToken/index';\nexport { $createChatInputTokenNode, $isChatInputTokenNode, ChatInputToken, ChatInputTokenNode, chatInputTokenClassNames, renderChatInputToken_unstable, useChatInputTokenStyles_unstable, useChatInputToken_unstable } from './components/ChatInputToken/index';\n"],"names":["$createChatInputTokenNode","$isChatInputTokenNode","ChatInputToken","ChatInputTokenNode","chatInputTokenClassNames","renderChatInputToken_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable"],"rangeMappings":"","mappings":"AACA,SAASA,yBAAyB,EAAEC,qBAAqB,EAAEC,cAAc,EAAEC,kBAAkB,EAAEC,wBAAwB,EAAEC,6BAA6B,EAAEC,gCAAgC,EAAEC,0BAA0B,QAAQ,oCAAoC"}
@@ -0,0 +1,3 @@
1
+ export { GhostText, ghostTextClassNames, renderGhostText_unstable, useGhostTextStyles_unstable, useGhostText_unstable } from './components/GhostText/index';
2
+ export { $createGhostTextNode, $isGhostTextNode, GhostTextNode, GhostTextPlugin } from './plugins/GhostText/index';
3
+ export { ManualGhostTextPlugin } from './plugins/ManualGhostText/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["GhostText.ts"],"sourcesContent":["export type { GhostTextProps, GhostTextSlots, GhostTextState } from './components/GhostText/index';\nexport { GhostText, ghostTextClassNames, renderGhostText_unstable, useGhostTextStyles_unstable, useGhostText_unstable } from './components/GhostText/index';\nexport type { GhostTextPluginProps, SerializedGhostTextNode } from './plugins/GhostText/index';\nexport { $createGhostTextNode, $isGhostTextNode, GhostTextNode, GhostTextPlugin } from './plugins/GhostText/index';\nexport type { ManualGhostTextProps, ManualGhostTextRef } from './plugins/ManualGhostText/index';\nexport { ManualGhostTextPlugin } from './plugins/ManualGhostText/index';\n"],"names":["GhostText","ghostTextClassNames","renderGhostText_unstable","useGhostTextStyles_unstable","useGhostText_unstable","$createGhostTextNode","$isGhostTextNode","GhostTextNode","GhostTextPlugin","ManualGhostTextPlugin"],"rangeMappings":";;","mappings":"AACA,SAASA,SAAS,EAAEC,mBAAmB,EAAEC,wBAAwB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,+BAA+B;AAE5J,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,aAAa,EAAEC,eAAe,QAAQ,4BAA4B;AAEnH,SAASC,qBAAqB,QAAQ,kCAAkC"}
@@ -0,0 +1 @@
1
+ export { ImperativeControlPlugin } from './plugins/ImperativeControl/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ImperativeControl.ts"],"sourcesContent":["export type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './plugins/ImperativeControl/index';\nexport { ImperativeControlPlugin } from './plugins/ImperativeControl/index';\n"],"names":["ImperativeControlPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,uBAAuB,QAAQ,oCAAoC"}
@@ -0,0 +1 @@
1
+ export { PasteUnfurlingPlugin } from './plugins/PasteUnfurling/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["export type { PasteUnfurlingPluginProps } from './plugins/PasteUnfurling/index';\nexport { PasteUnfurlingPlugin } from './plugins/PasteUnfurling/index';\n"],"names":["PasteUnfurlingPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,oBAAoB,QAAQ,iCAAiC"}
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { useChatInputEntity_unstable } from './useChatInputEntity';
3
+ import { renderChatInputEntity_unstable } from './renderChatInputEntity';
4
+ import { useChatInputEntityStyles_unstable } from './useChatInputEntityStyles.styles';
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';
@@ -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.styles';\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"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AAItF,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,4 @@
1
+ /**
2
+ * State used in rendering ChatInputEntity
3
+ */ export { }; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.
4
+ // & Required<Pick<ChatInputEntityProps, 'propName'>>
@@ -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":[],"rangeMappings":";;;","mappings":"AAaA;;CAEC,GACD,WAAwE,CACxE,gIAAgI;CAChI,qDAAqD"}
@@ -0,0 +1,4 @@
1
+ export { ChatInputEntity } from './ChatInputEntity';
2
+ export { renderChatInputEntity_unstable } from './renderChatInputEntity';
3
+ export { useChatInputEntity_unstable } from './useChatInputEntity';
4
+ export { chatInputEntityClassNames, useChatInputEntityStyles_unstable } from './useChatInputEntityStyles.styles';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { ChatInputEntity } from './ChatInputEntity';\nexport type { ChatInputEntityProps, ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nexport { renderChatInputEntity_unstable } from './renderChatInputEntity';\nexport { useChatInputEntity_unstable } from './useChatInputEntity';\nexport { chatInputEntityClassNames, useChatInputEntityStyles_unstable } from './useChatInputEntityStyles.styles';\n"],"names":["ChatInputEntity","renderChatInputEntity_unstable","useChatInputEntity_unstable","chatInputEntityClassNames","useChatInputEntityStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,oCAAoC"}
@@ -0,0 +1,13 @@
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
+ */ export const renderChatInputEntity_unstable = (state)=>{
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ _jsxs(state.root, {
8
+ children: [
9
+ state.text && /*#__PURE__*/ _jsx(state.text, {}),
10
+ state.sensitivity && /*#__PURE__*/ _jsx(state.sensitivity, {})
11
+ ]
12
+ });
13
+ };
@@ -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 { JSXElement } 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): JSXElement => {\n assertSlots<ChatInputEntitySlots>(state);\n\n return (\n <state.root>\n {state.text && <state.text />}\n {state.sensitivity && <state.sensitivity />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderChatInputEntity_unstable","state","root","text","sensitivity"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAIzD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,WAAW,kBAAI,KAACH,MAAMG,WAAW;;;AAG9C,EAAE"}
@@ -0,0 +1,51 @@
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
+ */ export const useChatInputEntity_unstable = (props, ref)=>{
12
+ const { as } = props;
13
+ const elementType = as !== null && as !== void 0 ? as : 'span';
14
+ const nativeProps = getPartitionedNativeProps({
15
+ props,
16
+ primarySlotTagName: elementType
17
+ });
18
+ const defaultTextSlotProps = elementType === 'a' ? {
19
+ target: '_blank',
20
+ rel: 'noopener',
21
+ // We don't want to enable tab focus for components inside the ChatInput
22
+ tabIndex: -1,
23
+ ...nativeProps.primary,
24
+ as: 'a',
25
+ // This cast is safe to do at this point because we know the type of element we are rendering is an anchor
26
+ ref: ref
27
+ } : {
28
+ ...nativeProps.primary,
29
+ as: 'span',
30
+ ref
31
+ };
32
+ return {
33
+ components: {
34
+ root: 'span',
35
+ sensitivity: 'span',
36
+ text: elementType
37
+ },
38
+ root: slot.always(props.root, {
39
+ defaultProps: nativeProps.root,
40
+ elementType: 'span'
41
+ }),
42
+ sensitivity: slot.optional(props.sensitivity, {
43
+ elementType: 'span'
44
+ }),
45
+ text: slot.optional(props.text, {
46
+ defaultProps: defaultTextSlotProps,
47
+ renderByDefault: true,
48
+ elementType
49
+ })
50
+ };
51
+ };
@@ -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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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,47 @@
1
+ import { __styles, mergeClasses } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const chatInputEntityClassNames = {
4
+ root: 'fai-ChatInputEntity',
5
+ sensitivity: 'fai-ChatInputEntity__sensitivity',
6
+ text: 'fai-ChatInputEntity__text'
7
+ };
8
+ /**
9
+ * Styles for the root slot
10
+ */
11
+ const useStyles = __styles({
12
+ root: {},
13
+ text: {
14
+ sj55zd: "f16muhyy"
15
+ },
16
+ href: {
17
+ sj55zd: "fyind8e",
18
+ Bde5pd6: "f1tx3yz7",
19
+ Bi91k9c: "f1deo86v",
20
+ i089h6: "f1eh06m1",
21
+ lj723h: "f1iescvh"
22
+ },
23
+ sensitivity: {
24
+ uwmqm3: ["fgiv446", "ffczdla"]
25
+ }
26
+ }, {
27
+ d: [".f16muhyy{color:var(--colorBrandForeground1);}", ".fyind8e{color:var(--colorBrandForegroundLink);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}"],
28
+ h: [".f1tx3yz7:hover{text-decoration-line:underline;}", ".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}"],
29
+ a: [".f1eh06m1:active{text-decoration-line:underline;}", ".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}"]
30
+ });
31
+ /**
32
+ * Apply styling to the ChatInputEntity slots based on the state
33
+ */
34
+ export const useChatInputEntityStyles_unstable = state => {
35
+ 'use no memo';
36
+
37
+ const styles = useStyles();
38
+ state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);
39
+ if (state.text) {
40
+ state.text.className = mergeClasses(chatInputEntityClassNames.text, styles.text, state.text.as === 'a' && styles.href, state.text.className);
41
+ }
42
+ if (state.sensitivity) {
43
+ state.sensitivity.className = mergeClasses(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);
44
+ }
45
+ return state;
46
+ };
47
+ //# sourceMappingURL=useChatInputEntityStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\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 'use no memo';\n\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AACtE,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,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;IAEA,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,43 @@
1
+ import { makeStyles, mergeClasses } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const chatInputEntityClassNames = {
4
+ root: 'fai-ChatInputEntity',
5
+ sensitivity: 'fai-ChatInputEntity__sensitivity',
6
+ text: 'fai-ChatInputEntity__text'
7
+ };
8
+ /**
9
+ * Styles for the root slot
10
+ */ const useStyles = makeStyles({
11
+ root: {},
12
+ text: {
13
+ color: tokens.colorBrandForeground1
14
+ },
15
+ href: {
16
+ color: tokens.colorBrandForegroundLink,
17
+ ':hover': {
18
+ textDecorationLine: 'underline',
19
+ color: tokens.colorBrandForegroundLinkHover
20
+ },
21
+ ':active': {
22
+ textDecorationLine: 'underline',
23
+ color: tokens.colorBrandForegroundLinkPressed
24
+ }
25
+ },
26
+ sensitivity: {
27
+ paddingLeft: tokens.spacingHorizontalXXS
28
+ }
29
+ });
30
+ /**
31
+ * Apply styling to the ChatInputEntity slots based on the state
32
+ */ export const useChatInputEntityStyles_unstable = (state)=>{
33
+ 'use no memo';
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
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\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 'use no memo';\n\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AACtE,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,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;IAEA,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,11 @@
1
+ import * as React from 'react';
2
+ import { useChatInputToken_unstable } from './useChatInputToken';
3
+ import { renderChatInputToken_unstable } from './renderChatInputToken';
4
+ import { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles.styles';
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';
@@ -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.styles';\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"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AAIpF,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"}