@fluentui-copilot/react-chat-input-plugins 0.0.9 → 0.1.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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,45 @@
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 13 Jun 2024 21:00:14 GMT",
5
+ "date": "Tue, 23 Jul 2024 00:55:17 GMT",
6
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.1.1",
7
+ "version": "0.1.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "jiangemma@microsoft.com",
12
+ "package": "@fluentui-copilot/react-chat-input-plugins",
13
+ "commit": "2ab6acda372c69b7fdc733d7f402c64a66f98a1a",
14
+ "comment": "Bump Fluent UI version to latest"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Thu, 20 Jun 2024 23:05:53 GMT",
21
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.1.0",
22
+ "version": "0.1.0",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "owcampbe@microsoft.com",
27
+ "package": "@fluentui-copilot/react-chat-input-plugins",
28
+ "commit": "2f9626d2dca003ec62e70564b68b17917075296e",
29
+ "comment": "chore: Make $createEntityNode optional in PasteUnfurlingPlugin."
30
+ }
31
+ ],
32
+ "none": [
33
+ {
34
+ "author": "tristan.watanabe@gmail.com",
35
+ "package": "@fluentui-copilot/react-chat-input-plugins",
36
+ "commit": "b8a46e43b66fa17ed3cbb98a57171f9805ca5801",
37
+ "comment": "fix: failing e2e tests after playwright/test dependency update to v1.44.0."
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ "date": "Thu, 13 Jun 2024 21:00:45 GMT",
6
44
  "tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.9",
7
45
  "version": "0.0.9",
8
46
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # Change Log - @fluentui-copilot/react-chat-input-plugins
2
2
 
3
- This log was last generated on Thu, 13 Jun 2024 21:00:14 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 23 Jul 2024 00:55:17 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.1.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.1.1)
8
+
9
+ Tue, 23 Jul 2024 00:55:17 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.1.0..@fluentui-copilot/react-chat-input-plugins_v0.1.1)
11
+
12
+ ### Patches
13
+
14
+ - Bump Fluent UI version to latest ([PR #1805](https://github.com/microsoft/fluentai/pull/1805) by jiangemma@microsoft.com)
15
+
16
+ ## [0.1.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.1.0)
17
+
18
+ Thu, 20 Jun 2024 23:05:53 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.0.9..@fluentui-copilot/react-chat-input-plugins_v0.1.0)
20
+
21
+ ### Patches
22
+
23
+ - chore: Make $createEntityNode optional in PasteUnfurlingPlugin. ([PR #1735](https://github.com/microsoft/fluentai/pull/1735) by owcampbe@microsoft.com)
24
+
7
25
  ## [0.0.9](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.9)
8
26
 
9
- Thu, 13 Jun 2024 21:00:14 GMT
27
+ Thu, 13 Jun 2024 21:00:45 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.0.8..@fluentui-copilot/react-chat-input-plugins_v0.0.9)
11
29
 
12
30
  ### Patches
package/dist/index.d.ts CHANGED
@@ -75,8 +75,8 @@ export declare const ChatInputEntityPlugin: <ExtraDataType>(props: ChatInputEnti
75
75
 
76
76
  declare type ChatInputEntityPluginProps<ExtraDataType, NodePropsType> = {
77
77
  id: string;
78
- onChatInputEntityAdded?: (entity: ChatInputEntityData<ExtraDataType, NodePropsType>) => void;
79
- onChatInputEntityDeleted?: (entity: ChatInputEntityData<ExtraDataType, NodePropsType>) => void;
78
+ onChatInputEntityAdded?: (entity: ChatInputEntityData<ExtraDataType, NodePropsType>, nodeKey: NodeKey) => void;
79
+ onChatInputEntityDeleted?: (entity: ChatInputEntityData<ExtraDataType, NodePropsType>, nodeKey: NodeKey) => void;
80
80
  };
81
81
 
82
82
  export declare type ChatInputEntityPluginRef<ExtraDataType = undefined> = {
@@ -218,14 +218,31 @@ export declare type ManualGhostTextRef = {
218
218
  cancelGhostText: () => void;
219
219
  };
220
220
 
221
- export declare const PasteUnfurlingPlugin: <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType, ChatInputEntityProps>) => null;
221
+ export declare const PasteUnfurlingPlugin: <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType>) => null;
222
222
 
223
- declare type PasteUnfurlingPluginProps<ExtraDataType, NodePropsType> = {
223
+ declare type PasteUnfurlingPluginBaseProps<ExtraDataType, NodePropsType> = {
224
224
  entityPluginId: string;
225
- transforms: TransformFunction<ExtraDataType, NodePropsType>[];
225
+ transforms: PasteUnfurlingTransformFunction<ExtraDataType, NodePropsType>[];
226
226
  $createEntityNode: (pluginId: string, text: string, data?: ExtraDataType, entityProps?: NodePropsType, key?: NodeKey) => LexicalNode;
227
227
  };
228
228
 
229
+ export declare type PasteUnfurlingPluginProps<ExtraDataType> = Omit<PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>, '$createEntityNode'> & Pick<Partial<PasteUnfurlingPluginBaseProps<ExtraDataType, ChatInputEntityProps>>, '$createEntityNode'>;
230
+
231
+ declare type PasteUnfurlingTransformedPart<ExtraDataType, NodePropsType> = {
232
+ type: 'text';
233
+ value: string;
234
+ } | {
235
+ type: 'entity';
236
+ value: ChatInputEntityData<ExtraDataType, NodePropsType>;
237
+ };
238
+
239
+ declare type PasteUnfurlingTransformFunction<ExtraDataType, NodePropsType> = (event: ClipboardEvent, editor: LexicalEditor) => PasteUnfurlingTransformResult<ExtraDataType, NodePropsType>;
240
+
241
+ declare type PasteUnfurlingTransformResult<ExtraDataType, NodePropsType> = {
242
+ handled: boolean;
243
+ transformedParts?: PasteUnfurlingTransformedPart<ExtraDataType, NodePropsType>[];
244
+ };
245
+
229
246
  /**
230
247
  * Render the final JSX of ChatInputEntity
231
248
  */
@@ -260,21 +277,6 @@ export declare type SerializedGhostTextNode = Spread<{
260
277
  exposeText?: boolean;
261
278
  }, SerializedLexicalNode>;
262
279
 
263
- declare type TransformedPart<ExtraDataType, NodePropsType> = {
264
- type: 'text';
265
- value: string;
266
- } | {
267
- type: 'entity';
268
- value: ChatInputEntityData<ExtraDataType, NodePropsType>;
269
- };
270
-
271
- declare type TransformFunction<ExtraDataType, NodePropsType> = (event: ClipboardEvent, editor: LexicalEditor) => TransformResult<ExtraDataType, NodePropsType>;
272
-
273
- declare type TransformResult<ExtraDataType, NodePropsType> = {
274
- handled: boolean;
275
- transformedParts?: TransformedPart<ExtraDataType, NodePropsType>[];
276
- };
277
-
278
280
  /**
279
281
  * Create the state required to render ChatInputEntity.
280
282
  *
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type {\n ChatInputEntityProps,\n ChatInputEntitySlots,\n ChatInputEntityState,\n ChatInputEntityPluginRef,\n SerializedChatInputEntityNode,\n} from './ChatInputEntity';\nexport {\n ChatInputEntity,\n chatInputEntityClassNames,\n renderChatInputEntity_unstable,\n useChatInputEntityStyles_unstable,\n useChatInputEntity_unstable,\n ChatInputEntityNode,\n ChatInputEntityPlugin,\n $isChatInputEntityNode,\n $createChatInputEntityNode,\n} from './ChatInputEntity';\n\nexport type {\n GhostTextProps,\n GhostTextSlots,\n GhostTextState,\n GhostTextPluginProps,\n SerializedGhostTextNode,\n ManualGhostTextRef,\n ManualGhostTextProps,\n} from './GhostText';\nexport {\n GhostText,\n ghostTextClassNames,\n renderGhostText_unstable,\n useGhostTextStyles_unstable,\n useGhostText_unstable,\n GhostTextNode,\n GhostTextPlugin,\n $isGhostTextNode,\n $createGhostTextNode,\n ManualGhostTextPlugin,\n} from './GhostText';\n\nexport type {\n ChatInputTokenProps,\n ChatInputTokenSlots,\n ChatInputTokenState,\n SerializedChatInputTokenNode,\n} from './ChatInputToken';\nexport {\n ChatInputToken,\n ChatInputTokenNode,\n chatInputTokenClassNames,\n renderChatInputToken_unstable,\n useChatInputTokenStyles_unstable,\n useChatInputToken_unstable,\n $createChatInputTokenNode,\n $isChatInputTokenNode,\n} from './ChatInputToken';\n\nexport type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './BasicFunctionality';\nexport { BasicFunctionalityPlugin } from './BasicFunctionality';\n\nexport type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["ChatInputEntity","chatInputEntityClassNames","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","ChatInputEntityNode","ChatInputEntityPlugin","$isChatInputEntityNode","$createChatInputEntityNode","GhostText","ghostTextClassNames","renderGhostText_unstable","useGhostTextStyles_unstable","useGhostText_unstable","GhostTextNode","GhostTextPlugin","$isGhostTextNode","$createGhostTextNode","ManualGhostTextPlugin","ChatInputToken","ChatInputTokenNode","chatInputTokenClassNames","renderChatInputToken_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable","$createChatInputTokenNode","$isChatInputTokenNode","BasicFunctionalityPlugin","ImperativeControlPlugin","PasteUnfurlingPlugin"],"rangeMappings":";;;;;","mappings":"AAOA,SACEA,eAAe,EACfC,yBAAyB,EACzBC,8BAA8B,EAC9BC,iCAAiC,EACjCC,2BAA2B,EAC3BC,mBAAmB,EACnBC,qBAAqB,EACrBC,sBAAsB,EACtBC,0BAA0B,QACrB,oBAAoB;AAW3B,SACEC,SAAS,EACTC,mBAAmB,EACnBC,wBAAwB,EACxBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,aAAa,EACbC,eAAe,EACfC,gBAAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAQrB,SACEC,cAAc,EACdC,kBAAkB,EAClBC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,EAC1BC,yBAAyB,EACzBC,qBAAqB,QAChB,mBAAmB;AAG1B,SAASC,wBAAwB,QAAQ,uBAAuB;AAGhE,SAASC,uBAAuB,QAAQ,sBAAsB;AAE9D,SAASC,oBAAoB,QAAQ,mBAAmB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type {\n ChatInputEntityProps,\n ChatInputEntitySlots,\n ChatInputEntityState,\n ChatInputEntityPluginRef,\n SerializedChatInputEntityNode,\n} from './ChatInputEntity';\nexport {\n ChatInputEntity,\n chatInputEntityClassNames,\n renderChatInputEntity_unstable,\n useChatInputEntityStyles_unstable,\n useChatInputEntity_unstable,\n ChatInputEntityNode,\n ChatInputEntityPlugin,\n $isChatInputEntityNode,\n $createChatInputEntityNode,\n} from './ChatInputEntity';\n\nexport type {\n GhostTextProps,\n GhostTextSlots,\n GhostTextState,\n GhostTextPluginProps,\n SerializedGhostTextNode,\n ManualGhostTextRef,\n ManualGhostTextProps,\n} from './GhostText';\nexport {\n GhostText,\n ghostTextClassNames,\n renderGhostText_unstable,\n useGhostTextStyles_unstable,\n useGhostText_unstable,\n GhostTextNode,\n GhostTextPlugin,\n $isGhostTextNode,\n $createGhostTextNode,\n ManualGhostTextPlugin,\n} from './GhostText';\n\nexport type {\n ChatInputTokenProps,\n ChatInputTokenSlots,\n ChatInputTokenState,\n SerializedChatInputTokenNode,\n} from './ChatInputToken';\nexport {\n ChatInputToken,\n ChatInputTokenNode,\n chatInputTokenClassNames,\n renderChatInputToken_unstable,\n useChatInputTokenStyles_unstable,\n useChatInputToken_unstable,\n $createChatInputTokenNode,\n $isChatInputTokenNode,\n} from './ChatInputToken';\n\nexport type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './BasicFunctionality';\nexport { BasicFunctionalityPlugin } from './BasicFunctionality';\n\nexport type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n\nexport type { PasteUnfurlingPluginProps } from './PasteUnfurling';\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["ChatInputEntity","chatInputEntityClassNames","renderChatInputEntity_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","ChatInputEntityNode","ChatInputEntityPlugin","$isChatInputEntityNode","$createChatInputEntityNode","GhostText","ghostTextClassNames","renderGhostText_unstable","useGhostTextStyles_unstable","useGhostText_unstable","GhostTextNode","GhostTextPlugin","$isGhostTextNode","$createGhostTextNode","ManualGhostTextPlugin","ChatInputToken","ChatInputTokenNode","chatInputTokenClassNames","renderChatInputToken_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable","$createChatInputTokenNode","$isChatInputTokenNode","BasicFunctionalityPlugin","ImperativeControlPlugin","PasteUnfurlingPlugin"],"rangeMappings":";;;;;","mappings":"AAOA,SACEA,eAAe,EACfC,yBAAyB,EACzBC,8BAA8B,EAC9BC,iCAAiC,EACjCC,2BAA2B,EAC3BC,mBAAmB,EACnBC,qBAAqB,EACrBC,sBAAsB,EACtBC,0BAA0B,QACrB,oBAAoB;AAW3B,SACEC,SAAS,EACTC,mBAAmB,EACnBC,wBAAwB,EACxBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,aAAa,EACbC,eAAe,EACfC,gBAAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAQrB,SACEC,cAAc,EACdC,kBAAkB,EAClBC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,EAC1BC,yBAAyB,EACzBC,qBAAqB,QAChB,mBAAmB;AAG1B,SAASC,wBAAwB,QAAQ,uBAAuB;AAGhE,SAASC,uBAAuB,QAAQ,sBAAsB;AAG9D,SAASC,oBAAoB,QAAQ,mBAAmB"}
@@ -1,11 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { registerPasteUnfurlingPlugin } from '@fluentui-copilot/chat-input-plugins';
3
+ import { $createChatInputEntityNode } from '../../ChatInputEntity';
3
4
  import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
4
5
  export const PasteUnfurlingPlugin = props => {
6
+ const {
7
+ $createEntityNode = $createChatInputEntityNode,
8
+ ...rest
9
+ } = props;
5
10
  const [editor] = useLexicalComposerContext();
6
11
  React.useEffect(() => {
7
- return registerPasteUnfurlingPlugin(editor, props);
8
- }, [editor, props]);
12
+ return registerPasteUnfurlingPlugin(editor, {
13
+ ...rest,
14
+ $createEntityNode
15
+ });
16
+ }, [$createEntityNode, editor, rest]);
9
17
  return null;
10
18
  };
11
19
  //# sourceMappingURL=PasteUnfurling.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["import * as React from 'react';\nimport { registerPasteUnfurlingPlugin, type PasteUnfurlingPluginProps } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nexport const PasteUnfurlingPlugin = <ExtraDataType>(\n props: PasteUnfurlingPluginProps<ExtraDataType, ChatInputEntityProps>,\n) => {\n const [editor] = useLexicalComposerContext();\n\n React.useEffect(() => {\n return registerPasteUnfurlingPlugin(editor, props);\n }, [editor, props]);\n\n return null;\n};\n"],"names":["React","registerPasteUnfurlingPlugin","useLexicalComposerContext","PasteUnfurlingPlugin","props","editor","useEffect"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAwC,uCAAuC;AAEpH,SAASC,yBAAyB,QAAQ,sCAAsC;AAChF,OAAO,MAAMC,uBAAuB,CAClCC;IAEA,MAAM,CAACC,OAAO,GAAGH;IAEjBF,MAAMM,SAAS,CAAC;QACd,OAAOL,6BAA6BI,QAAQD;IAC9C,GAAG;QAACC;QAAQD;KAAM;IAElB,OAAO;AACT,EAAE"}
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>) => {\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"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type {\n ChatInputEntityProps,\n ChatInputEntitySlots,\n ChatInputEntityState,\n ChatInputEntityPluginRef,\n SerializedChatInputEntityNode,\n} from './ChatInputEntity';\nexport {\n ChatInputEntity,\n chatInputEntityClassNames,\n renderChatInputEntity_unstable,\n useChatInputEntityStyles_unstable,\n useChatInputEntity_unstable,\n ChatInputEntityNode,\n ChatInputEntityPlugin,\n $isChatInputEntityNode,\n $createChatInputEntityNode,\n} from './ChatInputEntity';\n\nexport type {\n GhostTextProps,\n GhostTextSlots,\n GhostTextState,\n GhostTextPluginProps,\n SerializedGhostTextNode,\n ManualGhostTextRef,\n ManualGhostTextProps,\n} from './GhostText';\nexport {\n GhostText,\n ghostTextClassNames,\n renderGhostText_unstable,\n useGhostTextStyles_unstable,\n useGhostText_unstable,\n GhostTextNode,\n GhostTextPlugin,\n $isGhostTextNode,\n $createGhostTextNode,\n ManualGhostTextPlugin,\n} from './GhostText';\n\nexport type {\n ChatInputTokenProps,\n ChatInputTokenSlots,\n ChatInputTokenState,\n SerializedChatInputTokenNode,\n} from './ChatInputToken';\nexport {\n ChatInputToken,\n ChatInputTokenNode,\n chatInputTokenClassNames,\n renderChatInputToken_unstable,\n useChatInputTokenStyles_unstable,\n useChatInputToken_unstable,\n $createChatInputTokenNode,\n $isChatInputTokenNode,\n} from './ChatInputToken';\n\nexport type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './BasicFunctionality';\nexport { BasicFunctionalityPlugin } from './BasicFunctionality';\n\nexport type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["$createChatInputEntityNode","$createChatInputTokenNode","$createGhostTextNode","$isChatInputEntityNode","$isChatInputTokenNode","$isGhostTextNode","BasicFunctionalityPlugin","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","ChatInputToken","ChatInputTokenNode","GhostText","GhostTextNode","GhostTextPlugin","ImperativeControlPlugin","ManualGhostTextPlugin","PasteUnfurlingPlugin","chatInputEntityClassNames","chatInputTokenClassNames","ghostTextClassNames","renderChatInputEntity_unstable","renderChatInputToken_unstable","renderGhostText_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAgBEA,0BAA0B;eAA1BA,2CAA0B;;IAsC1BC,yBAAyB;eAAzBA,yCAAyB;;IAjBzBC,oBAAoB;eAApBA,+BAAoB;;IAtBpBC,sBAAsB;eAAtBA,uCAAsB;;IAwCtBC,qBAAqB;eAArBA,qCAAqB;;IAnBrBC,gBAAgB;eAAhBA,2BAAgB;;IAuBTC,wBAAwB;eAAxBA,4CAAwB;;IAnD/BC,eAAe;eAAfA,gCAAe;;IAKfC,mBAAmB;eAAnBA,oCAAmB;;IACnBC,qBAAqB;eAArBA,sCAAqB;;IAkCrBC,cAAc;eAAdA,8BAAc;;IACdC,kBAAkB;eAAlBA,kCAAkB;;IApBlBC,SAAS;eAATA,oBAAS;;IAKTC,aAAa;eAAbA,wBAAa;;IACbC,eAAe;eAAfA,0BAAe;;IA2BRC,uBAAuB;eAAvBA,0CAAuB;;IAxB9BC,qBAAqB;eAArBA,gCAAqB;;IA0BdC,oBAAoB;eAApBA,oCAAoB;;IAvD3BC,yBAAyB;eAAzBA,0CAAyB;;IAyCzBC,wBAAwB;eAAxBA,wCAAwB;;IApBxBC,mBAAmB;eAAnBA,8BAAmB;;IApBnBC,8BAA8B;eAA9BA,+CAA8B;;IAyC9BC,6BAA6B;eAA7BA,6CAA6B;;IApB7BC,wBAAwB;eAAxBA,mCAAwB;;IApBxBC,iCAAiC;eAAjCA,kDAAiC;;IACjCC,2BAA2B;eAA3BA,4CAA2B;;IAwC3BC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IArB1BC,2BAA2B;eAA3BA,sCAA2B;;IAC3BC,qBAAqB;eAArBA,gCAAqB;;;iCAhBhB;2BAsBA;gCAiBA;oCAGkC;mCAGD;gCAEH"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type {\n ChatInputEntityProps,\n ChatInputEntitySlots,\n ChatInputEntityState,\n ChatInputEntityPluginRef,\n SerializedChatInputEntityNode,\n} from './ChatInputEntity';\nexport {\n ChatInputEntity,\n chatInputEntityClassNames,\n renderChatInputEntity_unstable,\n useChatInputEntityStyles_unstable,\n useChatInputEntity_unstable,\n ChatInputEntityNode,\n ChatInputEntityPlugin,\n $isChatInputEntityNode,\n $createChatInputEntityNode,\n} from './ChatInputEntity';\n\nexport type {\n GhostTextProps,\n GhostTextSlots,\n GhostTextState,\n GhostTextPluginProps,\n SerializedGhostTextNode,\n ManualGhostTextRef,\n ManualGhostTextProps,\n} from './GhostText';\nexport {\n GhostText,\n ghostTextClassNames,\n renderGhostText_unstable,\n useGhostTextStyles_unstable,\n useGhostText_unstable,\n GhostTextNode,\n GhostTextPlugin,\n $isGhostTextNode,\n $createGhostTextNode,\n ManualGhostTextPlugin,\n} from './GhostText';\n\nexport type {\n ChatInputTokenProps,\n ChatInputTokenSlots,\n ChatInputTokenState,\n SerializedChatInputTokenNode,\n} from './ChatInputToken';\nexport {\n ChatInputToken,\n ChatInputTokenNode,\n chatInputTokenClassNames,\n renderChatInputToken_unstable,\n useChatInputTokenStyles_unstable,\n useChatInputToken_unstable,\n $createChatInputTokenNode,\n $isChatInputTokenNode,\n} from './ChatInputToken';\n\nexport type { BasicFunctionalityPluginProps, BasicFunctionalityPluginRef } from './BasicFunctionality';\nexport { BasicFunctionalityPlugin } from './BasicFunctionality';\n\nexport type { ImperativeControlPluginProps, ImperativeControlPluginRef } from './ImperativeControl';\nexport { ImperativeControlPlugin } from './ImperativeControl';\n\nexport type { PasteUnfurlingPluginProps } from './PasteUnfurling';\nexport { PasteUnfurlingPlugin } from './PasteUnfurling';\n"],"names":["$createChatInputEntityNode","$createChatInputTokenNode","$createGhostTextNode","$isChatInputEntityNode","$isChatInputTokenNode","$isGhostTextNode","BasicFunctionalityPlugin","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","ChatInputToken","ChatInputTokenNode","GhostText","GhostTextNode","GhostTextPlugin","ImperativeControlPlugin","ManualGhostTextPlugin","PasteUnfurlingPlugin","chatInputEntityClassNames","chatInputTokenClassNames","ghostTextClassNames","renderChatInputEntity_unstable","renderChatInputToken_unstable","renderGhostText_unstable","useChatInputEntityStyles_unstable","useChatInputEntity_unstable","useChatInputTokenStyles_unstable","useChatInputToken_unstable","useGhostTextStyles_unstable","useGhostText_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAgBEA,0BAA0B;eAA1BA,2CAA0B;;IAsC1BC,yBAAyB;eAAzBA,yCAAyB;;IAjBzBC,oBAAoB;eAApBA,+BAAoB;;IAtBpBC,sBAAsB;eAAtBA,uCAAsB;;IAwCtBC,qBAAqB;eAArBA,qCAAqB;;IAnBrBC,gBAAgB;eAAhBA,2BAAgB;;IAuBTC,wBAAwB;eAAxBA,4CAAwB;;IAnD/BC,eAAe;eAAfA,gCAAe;;IAKfC,mBAAmB;eAAnBA,oCAAmB;;IACnBC,qBAAqB;eAArBA,sCAAqB;;IAkCrBC,cAAc;eAAdA,8BAAc;;IACdC,kBAAkB;eAAlBA,kCAAkB;;IApBlBC,SAAS;eAATA,oBAAS;;IAKTC,aAAa;eAAbA,wBAAa;;IACbC,eAAe;eAAfA,0BAAe;;IA2BRC,uBAAuB;eAAvBA,0CAAuB;;IAxB9BC,qBAAqB;eAArBA,gCAAqB;;IA2BdC,oBAAoB;eAApBA,oCAAoB;;IAxD3BC,yBAAyB;eAAzBA,0CAAyB;;IAyCzBC,wBAAwB;eAAxBA,wCAAwB;;IApBxBC,mBAAmB;eAAnBA,8BAAmB;;IApBnBC,8BAA8B;eAA9BA,+CAA8B;;IAyC9BC,6BAA6B;eAA7BA,6CAA6B;;IApB7BC,wBAAwB;eAAxBA,mCAAwB;;IApBxBC,iCAAiC;eAAjCA,kDAAiC;;IACjCC,2BAA2B;eAA3BA,4CAA2B;;IAwC3BC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IArB1BC,2BAA2B;eAA3BA,sCAA2B;;IAC3BC,qBAAqB;eAArBA,gCAAqB;;;iCAhBhB;2BAsBA;gCAiBA;oCAGkC;mCAGD;gCAGH"}
@@ -11,14 +11,20 @@ Object.defineProperty(exports, "PasteUnfurlingPlugin", {
11
11
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
12
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
13
  const _chatinputplugins = require("@fluentui-copilot/chat-input-plugins");
14
+ const _ChatInputEntity = require("../../ChatInputEntity");
14
15
  const _reacttexteditor = require("@fluentui-copilot/react-text-editor");
15
16
  const PasteUnfurlingPlugin = (props)=>{
17
+ const { $createEntityNode = _ChatInputEntity.$createChatInputEntityNode, ...rest } = props;
16
18
  const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
17
19
  _react.useEffect(()=>{
18
- return (0, _chatinputplugins.registerPasteUnfurlingPlugin)(editor, props);
20
+ return (0, _chatinputplugins.registerPasteUnfurlingPlugin)(editor, {
21
+ ...rest,
22
+ $createEntityNode
23
+ });
19
24
  }, [
25
+ $createEntityNode,
20
26
  editor,
21
- props
27
+ rest
22
28
  ]);
23
29
  return null;
24
30
  }; //# sourceMappingURL=PasteUnfurling.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["import * as React from 'react';\nimport { registerPasteUnfurlingPlugin, type PasteUnfurlingPluginProps } from '@fluentui-copilot/chat-input-plugins';\nimport type { ChatInputEntityProps } from '../../ChatInputEntity';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nexport const PasteUnfurlingPlugin = <ExtraDataType>(\n props: PasteUnfurlingPluginProps<ExtraDataType, ChatInputEntityProps>,\n) => {\n const [editor] = useLexicalComposerContext();\n\n React.useEffect(() => {\n return registerPasteUnfurlingPlugin(editor, props);\n }, [editor, props]);\n\n return null;\n};\n"],"names":["PasteUnfurlingPlugin","props","editor","useLexicalComposerContext","React","useEffect","registerPasteUnfurlingPlugin"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;kCACsD;iCAEnC;AACnC,MAAMA,uBAAuBC,CAAAA;UAGlC,CAAAC,OAAOA,GAAOC,IAAAA,0CAAGA;WAEjBC,SAAMC,CAAAA;eACJC,IAAAA,8CAAOA,EAAAA,QAA6BJ;OACtC;QAAAA;QAAGD;KAAA;WAACC;6CAAc"}
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>) => {\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":["PasteUnfurlingPlugin","props","$createEntityNode","useLexicalComposerContext","React","rest","registerPasteUnfurlingPlugin","editor"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;kCAC0D;iCACX;iCAC5B;AAQnC,MAAMA,uBAAuBC,CAAAA;UAClC,EAEAC,oBAAiBC,2CAAAA,EAEjBC,GAAAA;kBACmDC,GAAIF,IAAAA,0CAAA;oBAAED,CAAAA;eAAkBI,IAAAA,8CAAA,EAAAC,QAAA;YAC3E,GAAGF,IAAA;;;;;QAA4BA;QAAAA;KAAAA;WAAK;GAGtC,0CAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
- "version": "0.0.9",
3
+ "version": "0.1.1",
4
4
  "description": "A Fluent AI package for React-based ChatInput plugins.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,15 +12,15 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-copilot/chat-input-plugins": "^0.0.8",
16
- "@fluentui-copilot/react-text-editor": "^0.1.6",
17
- "@fluentui-copilot/text-editor": "^0.0.4",
15
+ "@fluentui-copilot/chat-input-plugins": "^0.1.1",
16
+ "@fluentui-copilot/react-text-editor": "^0.1.7",
17
+ "@fluentui-copilot/text-editor": "^0.0.5",
18
18
  "@swc/helpers": "^0.5.1"
19
19
  },
20
20
  "peerDependencies": {
21
- "@fluentui/react-components": ">=9.52.0 <10.0.0",
22
- "@fluentui/react-jsx-runtime": ">=9.0.38 <10.0.0",
23
- "@fluentui/react-utilities": ">=9.18.9 <10.0.0",
21
+ "@fluentui/react-components": ">=9.54.4 <10.0.0",
22
+ "@fluentui/react-jsx-runtime": ">=9.0.40 <10.0.0",
23
+ "@fluentui/react-utilities": ">=9.18.11 <10.0.0",
24
24
  "@types/react": ">=16.14.0 <19.0.0",
25
25
  "@types/react-dom": ">=16.9.8 <19.0.0",
26
26
  "react": ">=16.14.0 <19.0.0",