@fluentui-copilot/react-chat-input-plugins 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,59 @@
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 31 May 2024 18:42:05 GMT",
5
+ "date": "Thu, 20 Jun 2024 23:05:26 GMT",
6
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.1.0",
7
+ "version": "0.1.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "owcampbe@microsoft.com",
12
+ "package": "@fluentui-copilot/react-chat-input-plugins",
13
+ "commit": "2f9626d2dca003ec62e70564b68b17917075296e",
14
+ "comment": "chore: Make $createEntityNode optional in PasteUnfurlingPlugin."
15
+ }
16
+ ],
17
+ "none": [
18
+ {
19
+ "author": "tristan.watanabe@gmail.com",
20
+ "package": "@fluentui-copilot/react-chat-input-plugins",
21
+ "commit": "b8a46e43b66fa17ed3cbb98a57171f9805ca5801",
22
+ "comment": "fix: failing e2e tests after playwright/test dependency update to v1.44.0."
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "date": "Thu, 13 Jun 2024 21:00:45 GMT",
29
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.9",
30
+ "version": "0.0.9",
31
+ "comments": {
32
+ "none": [
33
+ {
34
+ "author": "estebanmu@microsoft.com",
35
+ "package": "@fluentui-copilot/react-chat-input-plugins",
36
+ "commit": "1c5c1ff08365635187ce50982a0c9cfcfdd3cc65",
37
+ "comment": "fix: Add second wave of exludes to tsconfig files to avoid type-check errors."
38
+ }
39
+ ],
40
+ "patch": [
41
+ {
42
+ "author": "owcampbe@microsoft.com",
43
+ "package": "@fluentui-copilot/react-chat-input-plugins",
44
+ "commit": "2a74bcd688f65f34bc8230487d70dfa310a353eb",
45
+ "comment": "feat: Add PasteUnfurling plugin."
46
+ },
47
+ {
48
+ "author": "owcampbe@microsoft.com",
49
+ "package": "@fluentui-copilot/react-chat-input-plugins",
50
+ "commit": "d6084ea0d096a16043ecd2dddac3c08a31ffdbcb",
51
+ "comment": "fix: Set lineheight on ChatInputToken."
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ {
57
+ "date": "Fri, 31 May 2024 18:42:53 GMT",
6
58
  "tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.8",
7
59
  "version": "0.0.8",
8
60
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,31 @@
1
1
  # Change Log - @fluentui-copilot/react-chat-input-plugins
2
2
 
3
- This log was last generated on Fri, 31 May 2024 18:42:05 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 20 Jun 2024 23:05:26 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.1.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.1.0)
8
+
9
+ Thu, 20 Jun 2024 23:05:26 GMT
10
+ [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)
11
+
12
+ ### Patches
13
+
14
+ - chore: Make $createEntityNode optional in PasteUnfurlingPlugin. ([PR #1735](https://github.com/microsoft/fluentai/pull/1735) by owcampbe@microsoft.com)
15
+
16
+ ## [0.0.9](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.9)
17
+
18
+ Thu, 13 Jun 2024 21:00:45 GMT
19
+ [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)
20
+
21
+ ### Patches
22
+
23
+ - feat: Add PasteUnfurling plugin. ([PR #1696](https://github.com/microsoft/fluentai/pull/1696) by owcampbe@microsoft.com)
24
+ - fix: Set lineheight on ChatInputToken. ([PR #1709](https://github.com/microsoft/fluentai/pull/1709) by owcampbe@microsoft.com)
25
+
7
26
  ## [0.0.8](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.8)
8
27
 
9
- Fri, 31 May 2024 18:42:05 GMT
28
+ Fri, 31 May 2024 18:42:53 GMT
10
29
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.0.5..@fluentui-copilot/react-chat-input-plugins_v0.0.8)
11
30
 
12
31
  ### 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,6 +218,31 @@ export declare type ManualGhostTextRef = {
218
218
  cancelGhostText: () => void;
219
219
  };
220
220
 
221
+ export declare const PasteUnfurlingPlugin: <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType>) => null;
222
+
223
+ declare type PasteUnfurlingPluginBaseProps<ExtraDataType, NodePropsType> = {
224
+ entityPluginId: string;
225
+ transforms: PasteUnfurlingTransformFunction<ExtraDataType, NodePropsType>[];
226
+ $createEntityNode: (pluginId: string, text: string, data?: ExtraDataType, entityProps?: NodePropsType, key?: NodeKey) => LexicalNode;
227
+ };
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
+
221
246
  /**
222
247
  * Render the final JSX of ChatInputEntity
223
248
  */
@@ -0,0 +1,2 @@
1
+ export * from './plugins/PasteUnfurling/index';
2
+ //# sourceMappingURL=PasteUnfurling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["export * from './plugins/PasteUnfurling/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,iCAAiC"}
@@ -5,7 +5,7 @@ export const chatInputTokenClassNames = {
5
5
  /**
6
6
  * Styles for the root slot
7
7
  */
8
- const useBaseClassName = __resetStyles("rjbvsrk", "r1d7fxr6", [".rjbvsrk{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}", ".r1d7fxr6{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"]);
8
+ const useBaseClassName = __resetStyles("rfuwgnq", "r1934wcn", [".rfuwgnq{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:calc(var(--lineHeightBase200) + (2 * var(--spacingVerticalXXS)) + (2 * var(--strokeWidthThin)));background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}", ".r1934wcn{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:calc(var(--lineHeightBase200) + (2 * var(--spacingVerticalXXS)) + (2 * var(--strokeWidthThin)));background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"]);
9
9
  /**
10
10
  * Apply styling to the ChatInputToken slots based on the state
11
11
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["useChatInputTokenStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n lineHeight: 'inherit',\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n 'use no memo';\n\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","shorthands","tokens","typographyStyles","chatInputTokenClassNames","root","useBaseClassName","caption1","backgroundColor","colorNeutralBackground3","border","strokeWidthThin","colorTransparentStroke","borderRadius","borderRadiusMedium","boxDecorationBreak","color","colorNeutralForeground2","lineHeight","padding","spacingVerticalXXS","useChatInputTokenStyles_unstable","state","baseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIjH,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBP,gBAAgB;IACvC,GAAGI,iBAAiBI,QAAQ;IAC5BC,iBAAiBN,OAAOO,uBAAuB;IAC/CC,QAAQ,CAAC,EAAER,OAAOS,eAAe,CAAC,OAAO,EAAET,OAAOU,sBAAsB,CAAC,CAAC;IAC1EC,cAAcX,OAAOY,kBAAkB;IACvCC,oBAAoB;IACpBC,OAAOd,OAAOe,uBAAuB;IACrCC,YAAY;IACZ,GAAGjB,WAAWkB,OAAO,CAACjB,OAAOkB,kBAAkB,EAAE,EAAE;AACrD;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,gBAAgBjB;IACtBgB,MAAMjB,IAAI,CAACmB,SAAS,GAAGxB,aAAaI,yBAAyBC,IAAI,EAAEkB,eAAeD,MAAMjB,IAAI,CAACmB,SAAS;IAEtG,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["useChatInputTokenStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n lineHeight: `calc(${tokens.lineHeightBase200} + (2 * ${tokens.spacingVerticalXXS}) + (2 * ${tokens.strokeWidthThin}))`,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n 'use no memo';\n\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","shorthands","tokens","typographyStyles","chatInputTokenClassNames","root","useBaseClassName","caption1","lineHeight","lineHeightBase200","spacingVerticalXXS","strokeWidthThin","backgroundColor","colorNeutralBackground3","border","colorTransparentStroke","borderRadius","borderRadiusMedium","boxDecorationBreak","color","colorNeutralForeground2","padding","useChatInputTokenStyles_unstable","state","baseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIjH,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBP,gBAAgB;IACvC,GAAGI,iBAAiBI,QAAQ;IAC5BC,YAAY,CAAC,KAAK,EAAEN,OAAOO,iBAAiB,CAAC,QAAQ,EAAEP,OAAOQ,kBAAkB,CAAC,SAAS,EAAER,OAAOS,eAAe,CAAC,EAAE,CAAC;IACtHC,iBAAiBV,OAAOW,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEZ,OAAOS,eAAe,CAAC,OAAO,EAAET,OAAOa,sBAAsB,CAAC,CAAC;IAC1EC,cAAcd,OAAOe,kBAAkB;IACvCC,oBAAoB;IACpBC,OAAOjB,OAAOkB,uBAAuB;IACrC,GAAGnB,WAAWoB,OAAO,CAACnB,OAAOQ,kBAAkB,EAAE,EAAE;AACrD;AAEA;;CAEC,GACD,OAAO,MAAMY,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,gBAAgBlB;IACtBiB,MAAMlB,IAAI,CAACoB,SAAS,GAAGzB,aAAaI,yBAAyBC,IAAI,EAAEmB,eAAeD,MAAMlB,IAAI,CAACoB,SAAS;IAEtG,OAAOF;AACT,EAAE"}
package/lib/index.js CHANGED
@@ -3,4 +3,5 @@ export { GhostText, ghostTextClassNames, renderGhostText_unstable, useGhostTextS
3
3
  export { ChatInputToken, ChatInputTokenNode, chatInputTokenClassNames, renderChatInputToken_unstable, useChatInputTokenStyles_unstable, useChatInputToken_unstable, $createChatInputTokenNode, $isChatInputTokenNode } from './ChatInputToken';
4
4
  export { BasicFunctionalityPlugin } from './BasicFunctionality';
5
5
  export { ImperativeControlPlugin } from './ImperativeControl';
6
+ export { PasteUnfurlingPlugin } from './PasteUnfurling';
6
7
  //# sourceMappingURL=index.js.map
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"],"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"],"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"}
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"}
@@ -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 {
7
+ $createEntityNode = $createChatInputEntityNode,
8
+ ...rest
9
+ } = props;
10
+ const [editor] = useLexicalComposerContext();
11
+ React.useEffect(() => {
12
+ return registerPasteUnfurlingPlugin(editor, {
13
+ ...rest,
14
+ $createEntityNode
15
+ });
16
+ }, [$createEntityNode, editor, rest]);
17
+ return null;
18
+ };
19
+ //# sourceMappingURL=PasteUnfurling.js.map
@@ -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>) => {\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,2 @@
1
+ export * from './PasteUnfurling';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PasteUnfurling';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,mBAAmB"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./plugins/PasteUnfurling/index"), exports);
7
+ //# sourceMappingURL=PasteUnfurling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PasteUnfurling.ts"],"sourcesContent":["export * from './plugins/PasteUnfurling/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -22,9 +22,9 @@ const chatInputTokenClassNames = {
22
22
  };
23
23
  /**
24
24
  * Styles for the root slot
25
- */ const useBaseClassName = (0, _reactcomponents.__resetStyles)("rjbvsrk", "r1d7fxr6", [
26
- ".rjbvsrk{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}",
27
- ".r1d7fxr6{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:inherit;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"
25
+ */ const useBaseClassName = (0, _reactcomponents.__resetStyles)("rfuwgnq", "r1934wcn", [
26
+ ".rfuwgnq{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:calc(var(--lineHeightBase200) + (2 * var(--spacingVerticalXXS)) + (2 * var(--strokeWidthThin)));background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-right:0;padding-bottom:var(--spacingVerticalXXS);padding-left:0;}",
27
+ ".r1934wcn{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:calc(var(--lineHeightBase200) + (2 * var(--spacingVerticalXXS)) + (2 * var(--strokeWidthThin)));background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);-webkit-box-decoration-break:clone;box-decoration-break:clone;color:var(--colorNeutralForeground2);padding-top:var(--spacingVerticalXXS);padding-left:0;padding-bottom:var(--spacingVerticalXXS);padding-right:0;}"
28
28
  ]);
29
29
  const useChatInputTokenStyles_unstable = (state)=>{
30
30
  'use no memo';
@@ -1 +1 @@
1
- {"version":3,"sources":["useChatInputTokenStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n lineHeight: 'inherit',\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n 'use no memo';\n\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["chatInputTokenClassNames","boxDecorationBreak","root","useBaseClassName","caption1","state","shorthands","padding","className","mergeClasses","baseClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAYXC,gCAAoB;eAApBA;;;iCAhB0E;AAIrE,MAAMD,2BAAgE;UAC3EE;AACF;AAEA;;CAEC,SAECC,mBAAoBC,IAAAA,8BAAQ,EAAA,WAAA,YAAA;IAAA;IAAA;CAAA;AAI5BH,MAAAA,mCAAoBI,CAAAA;;UAGjBC,gBAAWC;IAChBF,MAAAH,IAAA,CAAAM,SAAA,GAAAC,IAAAA,6BAAA,EAAAT,yBAAAE,IAAA,EAAAQ,eAAAL,MAAAH,IAAA,CAAAM,SAAA;IAEA,OAAAH;6DAGiDA"}
1
+ {"version":3,"sources":["useChatInputTokenStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n lineHeight: `calc(${tokens.lineHeightBase200} + (2 * ${tokens.spacingVerticalXXS}) + (2 * ${tokens.strokeWidthThin}))`,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n ...shorthands.padding(tokens.spacingVerticalXXS, 0),\n});\n\n/**\n * Apply styling to the ChatInputToken slots based on the state\n */\nexport const useChatInputTokenStyles_unstable = (state: ChatInputTokenState): ChatInputTokenState => {\n 'use no memo';\n\n const baseClassName = useBaseClassName();\n state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);\n\n return state;\n};\n"],"names":["chatInputTokenClassNames","borderRadius","root","useBaseClassName","caption1","state","shorthands","padding","className","mergeClasses","baseClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAYXC,gCAAuC;eAAvCA;;;iCAhB0E;AAIrE,MAAMD,2BAAgE;UAC3EE;AACF;AAEA;;CAEC,SAECC,mBAAoBC,IAAAA,8BAAQ,EAAA,WAAA,YAAA;IAAA;IAAA;CAAA;AAI5BH,MAAAA,mCAAuCI,CAAAA;;UAGpCC,gBAAWC;IAChBF,MAAAH,IAAA,CAAAM,SAAA,GAAAC,IAAAA,6BAAA,EAAAT,yBAAAE,IAAA,EAAAQ,eAAAL,MAAAH,IAAA,CAAAM,SAAA;IAEA,OAAAH;6DAGiDA"}
@@ -60,6 +60,9 @@ _export(exports, {
60
60
  ManualGhostTextPlugin: function() {
61
61
  return _GhostText.ManualGhostTextPlugin;
62
62
  },
63
+ PasteUnfurlingPlugin: function() {
64
+ return _PasteUnfurling.PasteUnfurlingPlugin;
65
+ },
63
66
  chatInputEntityClassNames: function() {
64
67
  return _ChatInputEntity.chatInputEntityClassNames;
65
68
  },
@@ -102,4 +105,5 @@ const _GhostText = require("./GhostText");
102
105
  const _ChatInputToken = require("./ChatInputToken");
103
106
  const _BasicFunctionality = require("./BasicFunctionality");
104
107
  const _ImperativeControl = require("./ImperativeControl");
108
+ const _PasteUnfurling = require("./PasteUnfurling");
105
109
  //# sourceMappingURL=index.js.map
@@ -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"],"names":["$createChatInputEntityNode","$createChatInputTokenNode","$createGhostTextNode","$isChatInputEntityNode","$isChatInputTokenNode","$isGhostTextNode","BasicFunctionalityPlugin","ChatInputEntity","ChatInputEntityNode","ChatInputEntityPlugin","ChatInputToken","ChatInputTokenNode","GhostText","GhostTextNode","GhostTextPlugin","ImperativeControlPlugin","ManualGhostTextPlugin","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;;IA7BrBC,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"}
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"}
@@ -0,0 +1,30 @@
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 PasteUnfurlingPlugin;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _chatinputplugins = require("@fluentui-copilot/chat-input-plugins");
14
+ const _ChatInputEntity = require("../../ChatInputEntity");
15
+ const _reacttexteditor = require("@fluentui-copilot/react-text-editor");
16
+ const PasteUnfurlingPlugin = (props)=>{
17
+ const { $createEntityNode = _ChatInputEntity.$createChatInputEntityNode, ...rest } = props;
18
+ const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
19
+ _react.useEffect(()=>{
20
+ return (0, _chatinputplugins.registerPasteUnfurlingPlugin)(editor, {
21
+ ...rest,
22
+ $createEntityNode
23
+ });
24
+ }, [
25
+ $createEntityNode,
26
+ editor,
27
+ rest
28
+ ]);
29
+ return null;
30
+ }; //# sourceMappingURL=PasteUnfurling.js.map
@@ -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>) => {\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"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./PasteUnfurling"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PasteUnfurling';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
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,9 +12,9 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-copilot/chat-input-plugins": "^0.0.7",
16
- "@fluentui-copilot/react-text-editor": "^0.1.5",
17
- "@fluentui-copilot/text-editor": "^0.0.3",
15
+ "@fluentui-copilot/chat-input-plugins": "^0.1.0",
16
+ "@fluentui-copilot/react-text-editor": "^0.1.6",
17
+ "@fluentui-copilot/text-editor": "^0.0.4",
18
18
  "@swc/helpers": "^0.5.1"
19
19
  },
20
20
  "peerDependencies": {