@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
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntity.node.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport type {\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n SerializedLexicalNode,\n Spread,\n} from '@fluentui-copilot/text-editor';\nimport type { JSXElement } from '@fluentui/react-components';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\nimport { ChatInputEntity } from '../../ChatInputEntity';\nimport type { ChatInputEntityData } from '@fluentui-copilot/chat-input-plugins';\n\nexport type SerializedChatInputEntityNode<T> = Spread<\n { pluginId: string; text: string; data?: T; entityProps?: ChatInputEntityProps },\n SerializedLexicalNode\n>;\n\nexport class ChatInputEntityNode<T> extends DecoratorNode<JSXElement | null> {\n __pluginId: string;\n __text: string;\n __entityProps?: ChatInputEntityProps;\n __data?: T;\n\n static getType(): string {\n return 'entity';\n }\n static clone<T>(node: ChatInputEntityNode<T>): ChatInputEntityNode<T> {\n return new ChatInputEntityNode(node.__pluginId, node.__text, node.__data, node.__entityProps, node.__key);\n }\n\n static importJSON<T>(serializedNode: SerializedChatInputEntityNode<T>): ChatInputEntityNode<T> {\n return $createChatInputEntityNode(\n serializedNode.pluginId,\n serializedNode.text,\n serializedNode.data,\n serializedNode.entityProps,\n );\n }\n\n isIsolated(): boolean {\n return true;\n }\n isInline(): boolean {\n return true;\n }\n\n getTextContent(): string {\n return this.__text;\n }\n\n exportJSON(): SerializedChatInputEntityNode<T> {\n return {\n pluginId: this.__pluginId,\n text: this.__text,\n data: this.__data,\n entityProps: this.__entityProps,\n type: ChatInputEntityNode.getType(),\n version: 1,\n };\n }\n\n constructor(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey) {\n super(key);\n this.__pluginId = pluginId;\n this.__text = text;\n this.__data = data;\n this.__entityProps = entityProps;\n }\n\n createDOM(): HTMLElement {\n // eslint-disable-next-line no-restricted-globals\n return document.createElement('span');\n }\n\n updateDOM(): boolean {\n return false;\n }\n\n decorate(_editor: LexicalEditor, config: EditorConfig): JSXElement | null {\n if (this.__entityProps?.children) {\n return <ChatInputEntity {...this.__entityProps} />;\n }\n return <ChatInputEntity {...this.__entityProps}>{this.__text}</ChatInputEntity>;\n }\n\n getEntityData(): ChatInputEntityData<T, ChatInputEntityProps> {\n return {\n text: this.__text,\n data: this.__data,\n entityProps: this.__entityProps,\n };\n }\n\n updateEntityData(data: ChatInputEntityData<T, ChatInputEntityProps>): void {\n const writable = this.getWritable();\n writable.__text = data.text;\n writable.__data = data.data;\n writable.__entityProps = data.entityProps;\n }\n}\n\nexport function $createChatInputEntityNode<T>(\n pluginId: string,\n text: string,\n data?: T,\n entityProps?: ChatInputEntityProps,\n key?: NodeKey,\n): ChatInputEntityNode<T> {\n return new ChatInputEntityNode(pluginId, text, data, entityProps, key);\n}\n\nexport function $isChatInputEntityNode<T>(node: LexicalNode | null | undefined): node is ChatInputEntityNode<T> {\n return node instanceof ChatInputEntityNode;\n}\n"],"names":["React","DecoratorNode","ChatInputEntity","ChatInputEntityNode","getType","clone","node","__pluginId","__text","__data","__entityProps","__key","importJSON","serializedNode","$createChatInputEntityNode","pluginId","text","data","entityProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","children","getEntityData","updateEntityData","writable","getWritable","constructor","key","$isChatInputEntityNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,aAAa,QAAQ,gCAAgC;AAW9D,SAASC,eAAe,QAAQ,wBAAwB;AAQxD,OAAO,MAAMC,4BAA+BF;IAM1C,OAAOG,UAAkB;QACvB,OAAO;IACT;IACA,OAAOC,MAASC,IAA4B,EAA0B;QACpE,OAAO,IAAIH,oBAAoBG,KAAKC,UAAU,EAAED,KAAKE,MAAM,EAAEF,KAAKG,MAAM,EAAEH,KAAKI,aAAa,EAAEJ,KAAKK,KAAK;IAC1G;IAEA,OAAOC,WAAcC,cAAgD,EAA0B;QAC7F,OAAOC,2BACLD,eAAeE,QAAQ,EACvBF,eAAeG,IAAI,EACnBH,eAAeI,IAAI,EACnBJ,eAAeK,WAAW;IAE9B;IAEAC,aAAsB;QACpB,OAAO;IACT;IACAC,WAAoB;QAClB,OAAO;IACT;IAEAC,iBAAyB;QACvB,OAAO,IAAI,CAACb,MAAM;IACpB;IAEAc,aAA+C;QAC7C,OAAO;YACLP,UAAU,IAAI,CAACR,UAAU;YACzBS,MAAM,IAAI,CAACR,MAAM;YACjBS,MAAM,IAAI,CAACR,MAAM;YACjBS,aAAa,IAAI,CAACR,aAAa;YAC/Ba,MAAMpB,oBAAoBC,OAAO;YACjCoB,SAAS;QACX;IACF;IAUAC,YAAyB;QACvB,iDAAiD;QACjD,OAAOC,SAASC,aAAa,CAAC;IAChC;IAEAC,YAAqB;QACnB,OAAO;IACT;IAEAC,SAASC,OAAsB,EAAEC,MAAoB,EAAqB;YACpE;QAAJ,KAAI,sBAAA,IAAI,CAACrB,aAAa,cAAlB,0CAAA,oBAAoBsB,QAAQ,EAAE;YAChC,qBAAO,oBAAC9B,iBAAoB,IAAI,CAACQ,aAAa;QAChD;QACA,qBAAO,oBAACR,iBAAoB,IAAI,CAACQ,aAAa,EAAG,IAAI,CAACF,MAAM;IAC9D;IAEAyB,gBAA8D;QAC5D,OAAO;YACLjB,MAAM,IAAI,CAACR,MAAM;YACjBS,MAAM,IAAI,CAACR,MAAM;YACjBS,aAAa,IAAI,CAACR,aAAa;QACjC;IACF;IAEAwB,iBAAiBjB,IAAkD,EAAQ;QACzE,MAAMkB,WAAW,IAAI,CAACC,WAAW;QACjCD,SAAS3B,MAAM,GAAGS,KAAKD,IAAI;QAC3BmB,SAAS1B,MAAM,GAAGQ,KAAKA,IAAI;QAC3BkB,SAASzB,aAAa,GAAGO,KAAKC,WAAW;IAC3C;IArCAmB,YAAYtB,QAAgB,EAAEC,IAAY,EAAEC,IAAQ,EAAEC,WAAkC,EAAEoB,GAAa,CAAE;QACvG,KAAK,CAACA;QA5CR/B,uBAAAA,cAAAA,KAAAA;QACAC,uBAAAA,UAAAA,KAAAA;QACAE,uBAAAA,iBAAAA,KAAAA;QACAD,uBAAAA,UAAAA,KAAAA;QA0CE,IAAI,CAACF,UAAU,GAAGQ;QAClB,IAAI,CAACP,MAAM,GAAGQ;QACd,IAAI,CAACP,MAAM,GAAGQ;QACd,IAAI,CAACP,aAAa,GAAGQ;IACvB;AAgCF;AAEA,OAAO,SAASJ,2BACdC,QAAgB,EAChBC,IAAY,EACZC,IAAQ,EACRC,WAAkC,EAClCoB,GAAa;IAEb,OAAO,IAAInC,oBAAoBY,UAAUC,MAAMC,MAAMC,aAAaoB;AACpE;AAEA,OAAO,SAASC,uBAA0BjC,IAAoC;IAC5E,OAAOA,gBAAgBH;AACzB"}
@@ -0,0 +1,42 @@
1
+ import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
2
+ import * as React from 'react';
3
+ import { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';
4
+ import { ChatInputEntityPluginBase } from '@fluentui-copilot/chat-input-plugins';
5
+ export const ChatInputEntityPlugin = (props)=>{
6
+ const { id, controlRef, onChatInputEntityAdded, onChatInputEntityDeleted, skipInitialization } = props;
7
+ const [editor] = useLexicalComposerContext();
8
+ const chatInputEntityPluginBase = React.useRef(null);
9
+ React.useEffect(()=>{
10
+ chatInputEntityPluginBase.current = new ChatInputEntityPluginBase(editor, id, ChatInputEntityNode, $createChatInputEntityNode, $isChatInputEntityNode, onChatInputEntityAdded, onChatInputEntityDeleted);
11
+ return ()=>{
12
+ var _chatInputEntityPluginBase_current;
13
+ return (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.cleanup();
14
+ };
15
+ }, [
16
+ editor,
17
+ id,
18
+ onChatInputEntityAdded,
19
+ onChatInputEntityDeleted,
20
+ skipInitialization
21
+ ]);
22
+ React.useImperativeHandle(controlRef, ()=>({
23
+ insertChatInputEntity (props) {
24
+ var _chatInputEntityPluginBase_current;
25
+ return (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.insertChatInputEntity(props);
26
+ },
27
+ getActiveEntities () {
28
+ var _chatInputEntityPluginBase_current;
29
+ var _chatInputEntityPluginBase_current_getActiveEntities;
30
+ return (_chatInputEntityPluginBase_current_getActiveEntities = (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.getActiveEntities()) !== null && _chatInputEntityPluginBase_current_getActiveEntities !== void 0 ? _chatInputEntityPluginBase_current_getActiveEntities : [];
31
+ },
32
+ removeChatInputEntity (keyOrPredicate) {
33
+ var _chatInputEntityPluginBase_current;
34
+ (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.removeChatInputEntity(keyOrPredicate);
35
+ },
36
+ updateChatInputEntityProps (keyOrPredicate, props) {
37
+ var _chatInputEntityPluginBase_current;
38
+ (_chatInputEntityPluginBase_current = chatInputEntityPluginBase.current) === null || _chatInputEntityPluginBase_current === void 0 ? void 0 : _chatInputEntityPluginBase_current.updateChatInputEntityProps(keyOrPredicate, props);
39
+ }
40
+ }), []);
41
+ return null;
42
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntityPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport * as React from 'react';\nimport { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';\nimport type { ChatInputEntityPluginRef } from './ChatInputEntityPlugin.types';\nimport type { ChatInputEntityPluginProps } from '@fluentui-copilot/chat-input-plugins';\nimport { ChatInputEntityPluginBase } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\n\nexport const ChatInputEntityPlugin = <ExtraDataType,>(\n props: ChatInputEntityPluginProps<ExtraDataType, ChatInputEntityProps> & {\n controlRef: React.Ref<ChatInputEntityPluginRef<ExtraDataType>>;\n },\n): null => {\n const { id, controlRef, onChatInputEntityAdded, onChatInputEntityDeleted, skipInitialization } = props;\n const [editor] = useLexicalComposerContext();\n\n const chatInputEntityPluginBase = React.useRef<ChatInputEntityPluginBase<\n ExtraDataType,\n ChatInputEntityProps,\n ChatInputEntityNode<ExtraDataType>\n > | null>(null);\n\n React.useEffect(() => {\n chatInputEntityPluginBase.current = new ChatInputEntityPluginBase<\n ExtraDataType,\n ChatInputEntityProps,\n ChatInputEntityNode<ExtraDataType>\n >(\n editor,\n id,\n ChatInputEntityNode,\n $createChatInputEntityNode,\n $isChatInputEntityNode,\n onChatInputEntityAdded,\n onChatInputEntityDeleted,\n );\n\n return () => chatInputEntityPluginBase.current?.cleanup();\n }, [editor, id, onChatInputEntityAdded, onChatInputEntityDeleted, skipInitialization]);\n\n React.useImperativeHandle(\n controlRef,\n () => ({\n insertChatInputEntity(props) {\n return chatInputEntityPluginBase.current?.insertChatInputEntity(props);\n },\n\n getActiveEntities() {\n return chatInputEntityPluginBase.current?.getActiveEntities() ?? [];\n },\n\n removeChatInputEntity(keyOrPredicate) {\n chatInputEntityPluginBase.current?.removeChatInputEntity(keyOrPredicate);\n },\n\n updateChatInputEntityProps(keyOrPredicate, props) {\n chatInputEntityPluginBase.current?.updateChatInputEntityProps(keyOrPredicate, props);\n },\n }),\n [],\n );\n return null;\n};\n"],"names":["useLexicalComposerContext","React","$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","ChatInputEntityPluginBase","ChatInputEntityPlugin","props","id","controlRef","onChatInputEntityAdded","onChatInputEntityDeleted","skipInitialization","editor","chatInputEntityPluginBase","useRef","useEffect","current","cleanup","useImperativeHandle","insertChatInputEntity","getActiveEntities","removeChatInputEntity","keyOrPredicate","updateChatInputEntityProps"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,yBAAyB,QAAQ,sCAAsC;AAChF,YAAYC,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,EAAEC,sBAAsB,EAAEC,mBAAmB,QAAQ,yBAAyB;AAGjH,SAASC,yBAAyB,QAAQ,uCAAuC;AAGjF,OAAO,MAAMC,wBAAwB,CACnCC;IAIA,MAAM,EAAEC,EAAE,EAAEC,UAAU,EAAEC,sBAAsB,EAAEC,wBAAwB,EAAEC,kBAAkB,EAAE,GAAGL;IACjG,MAAM,CAACM,OAAO,GAAGb;IAEjB,MAAMc,4BAA4Bb,MAAMc,MAAM,CAIpC;IAEVd,MAAMe,SAAS,CAAC;QACdF,0BAA0BG,OAAO,GAAG,IAAIZ,0BAKtCQ,QACAL,IACAJ,qBACAF,4BACAC,wBACAO,wBACAC;QAGF,OAAO;gBAAMG;oBAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCI,OAAO;;IACzD,GAAG;QAACL;QAAQL;QAAIE;QAAwBC;QAA0BC;KAAmB;IAErFX,MAAMkB,mBAAmB,CACvBV,YACA,IAAO,CAAA;YACLW,uBAAsBb,KAAK;oBAClBO;gBAAP,QAAOA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCM,qBAAqB,CAACb;YAClE;YAEAc;oBACSP;oBAAAA;gBAAP,OAAOA,CAAAA,wDAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCO,iBAAiB,gBAApDP,kEAAAA,uDAA0D,EAAE;YACrE;YAEAQ,uBAAsBC,cAAc;oBAClCT;iBAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCQ,qBAAqB,CAACC;YAC3D;YAEAC,4BAA2BD,cAAc,EAAEhB,KAAK;oBAC9CO;iBAAAA,qCAAAA,0BAA0BG,OAAO,cAAjCH,yDAAAA,mCAAmCU,0BAA0B,CAACD,gBAAgBhB;YAChF;QACF,CAAA,GACA,EAAE;IAEJ,OAAO;AACT,EAAE"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ChatInputEntityPlugin.types.ts"],"sourcesContent":["import type { ChatInputEntityData } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\n\nexport type ChatInputEntityPluginRef<ExtraDataType = undefined> = {\n // Inserts a new entity and returns its key, to be used by removeChatInputEntity or updateChatInputEntityProps\n insertChatInputEntity: (props: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>) => string | undefined;\n // Removes an entity by its key, or removes all entities that match a predicate function\n removeChatInputEntity: (\n keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean),\n ) => void;\n // Updates an entity by its key, or removes all entities that match a predicate function\n updateChatInputEntityProps: (\n keyOrPredicate: string | ((entity: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>, i: number) => boolean),\n props:\n | ChatInputEntityData<ExtraDataType, ChatInputEntityProps>\n | ((\n oldProps: ChatInputEntityData<ExtraDataType, ChatInputEntityProps>,\n ) => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>),\n ) => void;\n getActiveEntities: () => ChatInputEntityData<ExtraDataType, ChatInputEntityProps>[];\n};\n"],"names":[],"rangeMappings":"","mappings":"AAGA,WAiBE"}
@@ -0,0 +1,2 @@
1
+ export { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';
2
+ export { ChatInputEntityPlugin } from './ChatInputEntityPlugin';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { SerializedChatInputEntityNode } from './ChatInputEntity.node';\nexport { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode } from './ChatInputEntity.node';\nexport { ChatInputEntityPlugin } from './ChatInputEntityPlugin';\nexport type { ChatInputEntityPluginRef } from './ChatInputEntityPlugin.types';\n"],"names":["$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntityNode","ChatInputEntityPlugin"],"rangeMappings":";","mappings":"AACA,SAASA,0BAA0B,EAAEC,sBAAsB,EAAEC,mBAAmB,QAAQ,yBAAyB;AACjH,SAASC,qBAAqB,QAAQ,0BAA0B"}
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
3
+ import { $createGhostTextNode } from '../../GhostText';
4
+ import { GhostTextNode } from './GhostText.node';
5
+ import { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';
6
+ export function GhostTextPlugin(props) {
7
+ 'use no memo';
8
+ const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;
9
+ const [editor] = useLexicalComposerContext();
10
+ const [ghostTextBase, setGhostTextBase] = React.useState(null);
11
+ React.useEffect(()=>{
12
+ setGhostTextBase(new GhostTextPluginBase(editor, id, $getGhostText, GhostTextNode, $createGhostTextNode, ghostTextProps, exposeText, allowCompletion));
13
+ return ()=>{
14
+ setGhostTextBase((prev)=>{
15
+ prev === null || prev === void 0 ? void 0 : prev.cleanup();
16
+ return null;
17
+ });
18
+ };
19
+ }, // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting
20
+ // eslint-disable-next-line react-hooks/exhaustive-deps
21
+ [
22
+ editor,
23
+ id
24
+ ]);
25
+ React.useEffect(()=>{
26
+ ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setAllowCompletion(allowCompletion);
27
+ }, [
28
+ allowCompletion,
29
+ ghostTextBase
30
+ ]);
31
+ React.useEffect(()=>{
32
+ ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setComponentProps(ghostTextProps);
33
+ }, [
34
+ ghostTextBase,
35
+ ghostTextProps
36
+ ]);
37
+ React.useEffect(()=>{
38
+ ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setExposeText(exposeText);
39
+ }, [
40
+ exposeText,
41
+ ghostTextBase
42
+ ]);
43
+ React.useEffect(()=>{
44
+ ghostTextBase === null || ghostTextBase === void 0 ? void 0 : ghostTextBase.setGetGhostText($getGhostText);
45
+ }, [
46
+ $getGhostText,
47
+ ghostTextBase
48
+ ]);
49
+ return null;
50
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-components';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSXElement | null {\n 'use no memo';\n\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const [ghostTextBase, setGhostTextBase] = React.useState<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n setGhostTextBase(\n new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n ),\n );\n\n return () => {\n setGhostTextBase(prev => {\n prev?.cleanup();\n return null;\n });\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase?.setAllowCompletion(allowCompletion);\n }, [allowCompletion, ghostTextBase]);\n\n React.useEffect(() => {\n ghostTextBase?.setComponentProps(ghostTextProps);\n }, [ghostTextBase, ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase?.setExposeText(exposeText);\n }, [exposeText, ghostTextBase]);\n\n React.useEffect(() => {\n ghostTextBase?.setGetGhostText($getGhostText);\n }, [$getGhostText, ghostTextBase]);\n\n return null;\n}\n"],"names":["React","useLexicalComposerContext","$createGhostTextNode","GhostTextNode","GhostTextPluginBase","GhostTextPlugin","props","$getGhostText","id","ghostTextProps","exposeText","allowCompletion","editor","ghostTextBase","setGhostTextBase","useState","useEffect","prev","cleanup","setAllowCompletion","setComponentProps","setExposeText","setGetGhostText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,yBAAyB,QAAQ,sCAAsC;AAGhF,SAASC,oBAAoB,QAAQ,kBAAkB;AACvD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,mBAAmB,QAAQ,uCAAuC;AAe3E,OAAO,SAASC,gBAAgBC,KAA2B;IACzD;IAEA,MAAM,EAAEC,aAAa,EAAEC,EAAE,EAAEC,cAAc,EAAEC,UAAU,EAAEC,eAAe,EAAE,GAAGL;IAC3E,MAAM,CAACM,OAAO,GAAGX;IAEjB,MAAM,CAACY,eAAeC,iBAAiB,GAAGd,MAAMe,QAAQ,CAA6C;IAErGf,MAAMgB,SAAS,CACb;QACEF,iBACE,IAAIV,oBACFQ,QACAJ,IACAD,eACAJ,eACAD,sBACAO,gBACAC,YACAC;QAIJ,OAAO;YACLG,iBAAiBG,CAAAA;gBACfA,iBAAAA,2BAAAA,KAAMC,OAAO;gBACb,OAAO;YACT;QACF;IACF,GACA,wHAAwH;IACxH,uDAAuD;IACvD;QAACN;QAAQJ;KAAG;IAGdR,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeM,kBAAkB,CAACR;IACpC,GAAG;QAACA;QAAiBE;KAAc;IAEnCb,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeO,iBAAiB,CAACX;IACnC,GAAG;QAACI;QAAeJ;KAAe;IAElCT,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeQ,aAAa,CAACX;IAC/B,GAAG;QAACA;QAAYG;KAAc;IAE9Bb,MAAMgB,SAAS,CAAC;QACdH,0BAAAA,oCAAAA,cAAeS,eAAe,CAACf;IACjC,GAAG;QAACA;QAAeM;KAAc;IAEjC,OAAO;AACT"}
@@ -0,0 +1,66 @@
1
+ import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
+ import * as React from 'react';
3
+ import { DecoratorNode } from '@fluentui-copilot/text-editor';
4
+ import { GhostText } from '../../components/GhostText/GhostText';
5
+ export class GhostTextNode extends DecoratorNode {
6
+ static clone(node) {
7
+ return new GhostTextNode(node.__id, node.__content, node.__exposeText, node.__componentProps, node.__key);
8
+ }
9
+ static getType() {
10
+ return 'ghosttext';
11
+ }
12
+ static importJSON(serializedNode) {
13
+ const node = $createGhostTextNode(serializedNode.id, serializedNode.content, serializedNode.exposeText, serializedNode.componentProps);
14
+ return node;
15
+ }
16
+ exportJSON() {
17
+ return {
18
+ type: 'ghosttext',
19
+ id: this.__id,
20
+ content: this.__content,
21
+ componentProps: this.__componentProps,
22
+ exposeText: this.__exposeText,
23
+ version: 1
24
+ };
25
+ }
26
+ isInline() {
27
+ return true;
28
+ }
29
+ isIsolated() {
30
+ return true;
31
+ }
32
+ getTextContent() {
33
+ return this.__exposeText ? this.__content : '';
34
+ }
35
+ updateDOM(prevNode, dom, config) {
36
+ return false;
37
+ }
38
+ createDOM(config) {
39
+ // eslint-disable-next-line no-restricted-globals
40
+ return document.createElement('span');
41
+ }
42
+ decorate() {
43
+ return /*#__PURE__*/ React.createElement(GhostText, {
44
+ nodeKey: this.getKey(),
45
+ ...this.__componentProps
46
+ }, this.__content);
47
+ }
48
+ constructor(id, content, exposeText, componentProps, key){
49
+ super(key);
50
+ _define_property(this, "__content", void 0);
51
+ _define_property(this, "__id", void 0);
52
+ _define_property(this, "__allowCommitting", void 0);
53
+ _define_property(this, "__componentProps", void 0);
54
+ _define_property(this, "__exposeText", void 0);
55
+ this.__id = id;
56
+ this.__content = content;
57
+ this.__exposeText = exposeText;
58
+ this.__componentProps = componentProps;
59
+ }
60
+ }
61
+ export function $createGhostTextNode(id, content, exposeText, componentProps) {
62
+ return new GhostTextNode(id, content, exposeText, componentProps);
63
+ }
64
+ export function $isGhostTextNode(node) {
65
+ return node instanceof GhostTextNode;
66
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["GhostText.node.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-components';\n\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../components/GhostText/GhostText.types';\nimport { GhostText } from '../../components/GhostText/GhostText';\n\nexport type SerializedGhostTextNode = Spread<\n {\n content: string;\n id: string;\n componentProps?: GhostTextProps;\n exposeText?: boolean;\n },\n SerializedLexicalNode\n>;\n\nexport class GhostTextNode extends DecoratorNode<JSXElement | null> {\n __content: string;\n __id: string;\n __allowCommitting?: boolean;\n __componentProps?: GhostTextProps;\n __exposeText?: boolean;\n\n static clone(node: GhostTextNode): GhostTextNode {\n return new GhostTextNode(node.__id, node.__content, node.__exposeText, node.__componentProps, node.__key);\n }\n\n static getType(): 'ghosttext' {\n return 'ghosttext';\n }\n\n static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode {\n const node = $createGhostTextNode(\n serializedNode.id,\n serializedNode.content,\n serializedNode.exposeText,\n serializedNode.componentProps,\n );\n return node;\n }\n\n exportJSON(): SerializedGhostTextNode {\n return {\n type: 'ghosttext',\n id: this.__id,\n content: this.__content,\n componentProps: this.__componentProps,\n exposeText: this.__exposeText,\n version: 1,\n };\n }\n\n constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey) {\n super(key);\n this.__id = id;\n this.__content = content;\n this.__exposeText = exposeText;\n this.__componentProps = componentProps;\n }\n\n isInline(): boolean {\n return true;\n }\n\n isIsolated(): boolean {\n return true;\n }\n\n getTextContent(): string {\n return this.__exposeText ? this.__content : '';\n }\n\n updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean {\n return false;\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n // eslint-disable-next-line no-restricted-globals\n return document.createElement('span');\n }\n\n decorate(): JSXElement | null {\n return (\n <GhostText nodeKey={this.getKey()} {...this.__componentProps}>\n {this.__content}\n </GhostText>\n );\n }\n}\n\nexport function $createGhostTextNode(\n id: string,\n content: string,\n exposeText?: boolean,\n componentProps?: GhostTextProps,\n): GhostTextNode {\n return new GhostTextNode(id, content, exposeText, componentProps);\n}\n\nexport function $isGhostTextNode(node: LexicalNode | null | undefined): node is GhostTextNode {\n return node instanceof GhostTextNode;\n}\n"],"names":["React","DecoratorNode","GhostText","GhostTextNode","clone","node","__id","__content","__exposeText","__componentProps","__key","getType","importJSON","serializedNode","$createGhostTextNode","id","content","exposeText","componentProps","exportJSON","type","version","isInline","isIsolated","getTextContent","updateDOM","prevNode","dom","config","createDOM","document","createElement","decorate","nodeKey","getKey","constructor","key","__allowCommitting","$isGhostTextNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,aAAa,QAAQ,gCAAgC;AAG9D,SAASC,SAAS,QAAQ,uCAAuC;AAYjE,OAAO,MAAMC,sBAAsBF;IAOjC,OAAOG,MAAMC,IAAmB,EAAiB;QAC/C,OAAO,IAAIF,cAAcE,KAAKC,IAAI,EAAED,KAAKE,SAAS,EAAEF,KAAKG,YAAY,EAAEH,KAAKI,gBAAgB,EAAEJ,KAAKK,KAAK;IAC1G;IAEA,OAAOC,UAAuB;QAC5B,OAAO;IACT;IAEA,OAAOC,WAAWC,cAAuC,EAAiB;QACxE,MAAMR,OAAOS,qBACXD,eAAeE,EAAE,EACjBF,eAAeG,OAAO,EACtBH,eAAeI,UAAU,EACzBJ,eAAeK,cAAc;QAE/B,OAAOb;IACT;IAEAc,aAAsC;QACpC,OAAO;YACLC,MAAM;YACNL,IAAI,IAAI,CAACT,IAAI;YACbU,SAAS,IAAI,CAACT,SAAS;YACvBW,gBAAgB,IAAI,CAACT,gBAAgB;YACrCQ,YAAY,IAAI,CAACT,YAAY;YAC7Ba,SAAS;QACX;IACF;IAUAC,WAAoB;QAClB,OAAO;IACT;IAEAC,aAAsB;QACpB,OAAO;IACT;IAEAC,iBAAyB;QACvB,OAAO,IAAI,CAAChB,YAAY,GAAG,IAAI,CAACD,SAAS,GAAG;IAC9C;IAEAkB,UAAUC,QAAiB,EAAEC,GAAgB,EAAEC,MAAoB,EAAW;QAC5E,OAAO;IACT;IAEAC,UAAUD,MAAoB,EAAe;QAC3C,iDAAiD;QACjD,OAAOE,SAASC,aAAa,CAAC;IAChC;IAEAC,WAA8B;QAC5B,qBACE,oBAAC9B;YAAU+B,SAAS,IAAI,CAACC,MAAM;YAAK,GAAG,IAAI,CAACzB,gBAAgB;WACzD,IAAI,CAACF,SAAS;IAGrB;IAnCA4B,YAAYpB,EAAU,EAAEC,OAAe,EAAEC,UAAoB,EAAEC,cAA+B,EAAEkB,GAAa,CAAE;QAC7G,KAAK,CAACA;QApCR7B,uBAAAA,aAAAA,KAAAA;QACAD,uBAAAA,QAAAA,KAAAA;QACA+B,uBAAAA,qBAAAA,KAAAA;QACA5B,uBAAAA,oBAAAA,KAAAA;QACAD,uBAAAA,gBAAAA,KAAAA;QAiCE,IAAI,CAACF,IAAI,GAAGS;QACZ,IAAI,CAACR,SAAS,GAAGS;QACjB,IAAI,CAACR,YAAY,GAAGS;QACpB,IAAI,CAACR,gBAAgB,GAAGS;IAC1B;AA8BF;AAEA,OAAO,SAASJ,qBACdC,EAAU,EACVC,OAAe,EACfC,UAAoB,EACpBC,cAA+B;IAE/B,OAAO,IAAIf,cAAcY,IAAIC,SAASC,YAAYC;AACpD;AAEA,OAAO,SAASoB,iBAAiBjC,IAAoC;IACnE,OAAOA,gBAAgBF;AACzB"}
@@ -0,0 +1,2 @@
1
+ export { GhostTextPlugin } from './GhostText';
2
+ export { $createGhostTextNode, $isGhostTextNode, GhostTextNode } from './GhostText.node';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { GhostTextPluginProps } from './GhostText';\nexport { GhostTextPlugin } from './GhostText';\nexport type { SerializedGhostTextNode } from './GhostText.node';\nexport { $createGhostTextNode, $isGhostTextNode, GhostTextNode } from './GhostText.node';\n"],"names":["GhostTextPlugin","$createGhostTextNode","$isGhostTextNode","GhostTextNode"],"rangeMappings":";","mappings":"AACA,SAASA,eAAe,QAAQ,cAAc;AAE9C,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,mBAAmB"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { ImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';
3
+ import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
4
+ export const ImperativeControlPlugin = /*#__PURE__*/ React.forwardRef((_props, ref)=>{
5
+ const [editor] = useLexicalComposerContext();
6
+ React.useImperativeHandle(ref, ()=>new ImperativeControlBase(editor), [
7
+ editor
8
+ ]);
9
+ return null;
10
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ImperativeControl.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { IImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';\nimport { ImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\n\nexport type ImperativeControlPluginRef = IImperativeControlBase;\nexport type ImperativeControlPluginProps = {};\n\nexport const ImperativeControlPlugin = React.forwardRef<ImperativeControlPluginRef, ImperativeControlPluginProps>(\n (_props, ref) => {\n const [editor] = useLexicalComposerContext();\n\n React.useImperativeHandle(ref, () => new ImperativeControlBase(editor), [editor]);\n\n return null;\n },\n);\n"],"names":["React","ImperativeControlBase","useLexicalComposerContext","ImperativeControlPlugin","forwardRef","_props","ref","editor","useImperativeHandle"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,uCAAuC;AAC7E,SAASC,yBAAyB,QAAQ,sCAAsC;AAKhF,OAAO,MAAMC,wCAA0BH,MAAMI,UAAU,CACrD,CAACC,QAAQC;IACP,MAAM,CAACC,OAAO,GAAGL;IAEjBF,MAAMQ,mBAAmB,CAACF,KAAK,IAAM,IAAIL,sBAAsBM,SAAS;QAACA;KAAO;IAEhF,OAAO;AACT,GACA"}
@@ -0,0 +1 @@
1
+ export { ImperativeControlPlugin } from './ImperativeControl';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n"],"names":["ImperativeControlPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,uBAAuB,QAAQ,sBAAsB"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
3
+ import { $createGhostTextNode, $isGhostTextNode } from '../../GhostText';
4
+ import { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';
5
+ export const ManualGhostTextPlugin = React.forwardRef((props, ref)=>{
6
+ const { id } = props;
7
+ const [editor] = useLexicalComposerContext();
8
+ React.useImperativeHandle(ref, ()=>new ManualGhostTextBase(editor, id, $isGhostTextNode, $createGhostTextNode), [
9
+ editor,
10
+ id
11
+ ]);
12
+ return null;
13
+ });
14
+ ManualGhostTextPlugin.displayName = 'ManualGhostTextPlugin';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ManualGhostText.ts"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode, $isGhostTextNode } from '../../GhostText';\nimport type { IManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\nimport { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type ManualGhostTextProps = {\n id: string;\n};\n\nexport type ManualGhostTextRef = IManualGhostTextBase<GhostTextProps>;\n\nexport const ManualGhostTextPlugin = React.forwardRef<ManualGhostTextRef, ManualGhostTextProps>((props, ref) => {\n const { id } = props;\n const [editor] = useLexicalComposerContext();\n\n React.useImperativeHandle<ManualGhostTextRef, ManualGhostTextRef>(\n ref,\n () => new ManualGhostTextBase(editor, id, $isGhostTextNode, $createGhostTextNode),\n [editor, id],\n );\n\n return null;\n});\n\nManualGhostTextPlugin.displayName = 'ManualGhostTextPlugin';\n"],"names":["React","useLexicalComposerContext","$createGhostTextNode","$isGhostTextNode","ManualGhostTextBase","ManualGhostTextPlugin","forwardRef","props","ref","id","editor","useImperativeHandle","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,sCAAsC;AAEhF,SAASC,oBAAoB,EAAEC,gBAAgB,QAAQ,kBAAkB;AAEzE,SAASC,mBAAmB,QAAQ,uCAAuC;AAQ3E,OAAO,MAAMC,wBAAwBL,MAAMM,UAAU,CAA2C,CAACC,OAAOC;IACtG,MAAM,EAAEC,EAAE,EAAE,GAAGF;IACf,MAAM,CAACG,OAAO,GAAGT;IAEjBD,MAAMW,mBAAmB,CACvBH,KACA,IAAM,IAAIJ,oBAAoBM,QAAQD,IAAIN,kBAAkBD,uBAC5D;QAACQ;QAAQD;KAAG;IAGd,OAAO;AACT,GAAG;AAEHJ,sBAAsBO,WAAW,GAAG"}
@@ -0,0 +1 @@
1
+ export { ManualGhostTextPlugin } from './ManualGhostText';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { ManualGhostTextProps, ManualGhostTextRef } from './ManualGhostText';\nexport { ManualGhostTextPlugin } from './ManualGhostText';\n"],"names":["ManualGhostTextPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,qBAAqB,QAAQ,oBAAoB"}
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import { registerPasteUnfurlingPlugin } from '@fluentui-copilot/chat-input-plugins';
3
+ import { $createChatInputEntityNode } from '../../ChatInputEntity';
4
+ import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
5
+ export const PasteUnfurlingPlugin = (props)=>{
6
+ const { $createEntityNode = $createChatInputEntityNode, ...rest } = props;
7
+ const [editor] = useLexicalComposerContext();
8
+ React.useEffect(()=>{
9
+ return registerPasteUnfurlingPlugin(editor, {
10
+ ...rest,
11
+ $createEntityNode
12
+ });
13
+ }, [
14
+ $createEntityNode,
15
+ editor,
16
+ rest
17
+ ]);
18
+ return null;
19
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["import * as React from 'react';\nimport { registerPasteUnfurlingPlugin, type PasteUnfurlingPluginBaseProps } from '@fluentui-copilot/chat-input-plugins';\nimport { $createChatInputEntityNode, type ChatInputEntityProps } from '../../ChatInputEntity';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\n\nexport type PasteUnfurlingPluginProps<ExtraDataType> = Omit<\n PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>,\n '$createEntityNode'\n> &\n Pick<Partial<PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>>, '$createEntityNode'>;\n\nexport const PasteUnfurlingPlugin = <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType>): null => {\n const { $createEntityNode = $createChatInputEntityNode, ...rest } = props;\n\n const [editor] = useLexicalComposerContext();\n\n React.useEffect(() => {\n return registerPasteUnfurlingPlugin(editor, { ...rest, $createEntityNode });\n }, [$createEntityNode, editor, rest]);\n\n return null;\n};\n"],"names":["React","registerPasteUnfurlingPlugin","$createChatInputEntityNode","useLexicalComposerContext","PasteUnfurlingPlugin","props","$createEntityNode","rest","editor","useEffect"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAA4C,uCAAuC;AACxH,SAASC,0BAA0B,QAAmC,wBAAwB;AAC9F,SAASC,yBAAyB,QAAQ,sCAAsC;AAQhF,OAAO,MAAMC,uBAAuB,CAAgBC;IAClD,MAAM,EAAEC,oBAAoBJ,0BAA0B,EAAE,GAAGK,MAAM,GAAGF;IAEpE,MAAM,CAACG,OAAO,GAAGL;IAEjBH,MAAMS,SAAS,CAAC;QACd,OAAOR,6BAA6BO,QAAQ;YAAE,GAAGD,IAAI;YAAED;QAAkB;IAC3E,GAAG;QAACA;QAAmBE;QAAQD;KAAK;IAEpC,OAAO;AACT,EAAE"}
@@ -0,0 +1 @@
1
+ export { PasteUnfurlingPlugin } from './PasteUnfurling';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { PasteUnfurlingPluginProps } from './PasteUnfurling';\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["PasteUnfurlingPlugin"],"rangeMappings":"","mappings":"AACA,SAASA,oBAAoB,QAAQ,mBAAmB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "BasicFunctionalityPlugin", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _index.BasicFunctionalityPlugin;
9
+ }
10
+ });
11
+ const _index = require("./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":";;;;+BACSA;;;eAAAA,+BAAwB;;;uBAAQ"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ $createChatInputEntityNode: function() {
13
+ return _index1.$createChatInputEntityNode;
14
+ },
15
+ $isChatInputEntityNode: function() {
16
+ return _index1.$isChatInputEntityNode;
17
+ },
18
+ ChatInputEntity: function() {
19
+ return _index.ChatInputEntity;
20
+ },
21
+ ChatInputEntityNode: function() {
22
+ return _index1.ChatInputEntityNode;
23
+ },
24
+ ChatInputEntityPlugin: function() {
25
+ return _index1.ChatInputEntityPlugin;
26
+ },
27
+ chatInputEntityClassNames: function() {
28
+ return _index.chatInputEntityClassNames;
29
+ },
30
+ renderChatInputEntity_unstable: function() {
31
+ return _index.renderChatInputEntity_unstable;
32
+ },
33
+ useChatInputEntityStyles_unstable: function() {
34
+ return _index.useChatInputEntityStyles_unstable;
35
+ },
36
+ useChatInputEntity_unstable: function() {
37
+ return _index.useChatInputEntity_unstable;
38
+ }
39
+ });
40
+ const _index = require("./components/ChatInputEntity/index");
41
+ const _index1 = require("./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":["$createChatInputEntityNode","$isChatInputEntityNode","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","chatInputEntityClassNames","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGSA,0BAA0B;eAA1BA,kCAA0B;;IAAEC,sBAAsB;eAAtBA,8BAAsB;;IAFlDC,eAAe;eAAfA,sBAAe;;IAEqCC,mBAAmB;eAAnBA,2BAAmB;;IAAEC,qBAAqB;eAArBA,6BAAqB;;IAF7EC,yBAAyB;eAAzBA,gCAAyB;;IAAEC,8BAA8B;eAA9BA,qCAA8B;;IAAEC,iCAAiC;eAAjCA,wCAAiC;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;;uBAAQ;wBAE5C"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ $createChatInputTokenNode: function() {
13
+ return _index.$createChatInputTokenNode;
14
+ },
15
+ $isChatInputTokenNode: function() {
16
+ return _index.$isChatInputTokenNode;
17
+ },
18
+ ChatInputToken: function() {
19
+ return _index.ChatInputToken;
20
+ },
21
+ ChatInputTokenNode: function() {
22
+ return _index.ChatInputTokenNode;
23
+ },
24
+ chatInputTokenClassNames: function() {
25
+ return _index.chatInputTokenClassNames;
26
+ },
27
+ renderChatInputToken_unstable: function() {
28
+ return _index.renderChatInputToken_unstable;
29
+ },
30
+ useChatInputTokenStyles_unstable: function() {
31
+ return _index.useChatInputTokenStyles_unstable;
32
+ },
33
+ useChatInputToken_unstable: function() {
34
+ return _index.useChatInputToken_unstable;
35
+ }
36
+ });
37
+ const _index = require("./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":";;;;;;;;;;;IACSA,yBAAyB;eAAzBA,gCAAyB;;IAAEC,qBAAqB;eAArBA,4BAAqB;;IAAEC,cAAc;eAAdA,qBAAc;;IAAEC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,gCAAgC;eAAhCA,uCAAgC;;IAAEC,0BAA0B;eAA1BA,iCAA0B;;;uBAAQ"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ $createGhostTextNode: function() {
13
+ return _index1.$createGhostTextNode;
14
+ },
15
+ $isGhostTextNode: function() {
16
+ return _index1.$isGhostTextNode;
17
+ },
18
+ GhostText: function() {
19
+ return _index.GhostText;
20
+ },
21
+ GhostTextNode: function() {
22
+ return _index1.GhostTextNode;
23
+ },
24
+ GhostTextPlugin: function() {
25
+ return _index1.GhostTextPlugin;
26
+ },
27
+ ManualGhostTextPlugin: function() {
28
+ return _index2.ManualGhostTextPlugin;
29
+ },
30
+ ghostTextClassNames: function() {
31
+ return _index.ghostTextClassNames;
32
+ },
33
+ renderGhostText_unstable: function() {
34
+ return _index.renderGhostText_unstable;
35
+ },
36
+ useGhostTextStyles_unstable: function() {
37
+ return _index.useGhostTextStyles_unstable;
38
+ },
39
+ useGhostText_unstable: function() {
40
+ return _index.useGhostText_unstable;
41
+ }
42
+ });
43
+ const _index = require("./components/GhostText/index");
44
+ const _index1 = require("./plugins/GhostText/index");
45
+ const _index2 = require("./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":["$createGhostTextNode","$isGhostTextNode","GhostText","GhostTextNode","GhostTextPlugin","ManualGhostTextPlugin","ghostTextClassNames","renderGhostText_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGSA,oBAAoB;eAApBA,4BAAoB;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;IAFtCC,SAAS;eAATA,gBAAS;;IAE+BC,aAAa;eAAbA,qBAAa;;IAAEC,eAAe;eAAfA,uBAAe;;IAEtEC,qBAAqB;eAArBA,6BAAqB;;IAJVC,mBAAmB;eAAnBA,0BAAmB;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;IAAEC,qBAAqB;eAArBA,4BAAqB;;;uBAAQ;wBAEtC;wBAEjD"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ImperativeControlPlugin", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _index.ImperativeControlPlugin;
9
+ }
10
+ });
11
+ const _index = require("./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":";;;;+BACSA;;;eAAAA,8BAAuB;;;uBAAQ"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PasteUnfurlingPlugin", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _index.PasteUnfurlingPlugin;
9
+ }
10
+ });
11
+ const _index = require("./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":";;;;+BACSA;;;eAAAA,2BAAoB;;;uBAAQ"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ChatInputEntity", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return ChatInputEntity;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useChatInputEntity = require("./useChatInputEntity");
14
+ const _renderChatInputEntity = require("./renderChatInputEntity");
15
+ const _useChatInputEntityStylesstyles = require("./useChatInputEntityStyles.styles");
16
+ const ChatInputEntity = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useChatInputEntity.useChatInputEntity_unstable)(props, ref);
18
+ (0, _useChatInputEntityStylesstyles.useChatInputEntityStyles_unstable)(state);
19
+ return (0, _renderChatInputEntity.renderChatInputEntity_unstable)(state);
20
+ });
21
+ 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":["ChatInputEntity","React","forwardRef","props","ref","state","useChatInputEntity_unstable","useChatInputEntityStyles_unstable","renderChatInputEntity_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;oCACqB;uCACG;gDACG;AAK3C,MAAMA,kBAAAA,WAAAA,GAA6DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQC,IAAAA,+CAAAA,EAA4BH,OAAOC;IAEjDG,IAAAA,iEAAAA,EAAkCF;IAClC,OAAOG,IAAAA,qDAAAA,EAA+BH;AACxC;AAEAL,gBAAgBS,WAAW,GAAG"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * State used in rendering ChatInputEntity
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.
8
+ // & 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;;;;CAED,gIAAgI;CAChI,qDAAqD"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ChatInputEntity: function() {
13
+ return _ChatInputEntity.ChatInputEntity;
14
+ },
15
+ chatInputEntityClassNames: function() {
16
+ return _useChatInputEntityStylesstyles.chatInputEntityClassNames;
17
+ },
18
+ renderChatInputEntity_unstable: function() {
19
+ return _renderChatInputEntity.renderChatInputEntity_unstable;
20
+ },
21
+ useChatInputEntityStyles_unstable: function() {
22
+ return _useChatInputEntityStylesstyles.useChatInputEntityStyles_unstable;
23
+ },
24
+ useChatInputEntity_unstable: function() {
25
+ return _useChatInputEntity.useChatInputEntity_unstable;
26
+ }
27
+ });
28
+ const _ChatInputEntity = require("./ChatInputEntity");
29
+ const _renderChatInputEntity = require("./renderChatInputEntity");
30
+ const _useChatInputEntity = require("./useChatInputEntity");
31
+ const _useChatInputEntityStylesstyles = require("./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","chatInputEntityClassNames","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,eAAe;eAAfA,gCAAe;;IAIfC,yBAAyB;eAAzBA,yDAAyB;;IAFzBC,8BAA8B;eAA9BA,qDAA8B;;IAEHC,iCAAiC;eAAjCA,iEAAiC;;IAD5DC,2BAA2B;eAA3BA,+CAA2B;;;iCAHJ;uCAEe;oCACH;gDACiC"}