@fluentui-copilot/react-chat-input-plugins 0.3.0 → 0.3.2

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,40 @@
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 25 Sep 2024 19:49:21 GMT",
5
+ "date": "Thu, 31 Oct 2024 17:41:08 GMT",
6
+ "tag": "@fluentui-copilot/react-chat-input-plugins_v0.3.1",
7
+ "version": "0.3.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "jiangemma@microsoft.com",
12
+ "package": "@fluentui-copilot/react-chat-input-plugins",
13
+ "commit": "2d4f0c3ab9fffdea3666fa50f2a16d9d7dbadddd",
14
+ "comment": "fix: Fix slots that are possibly null/undefined"
15
+ },
16
+ {
17
+ "author": "jiangemma@microsoft.com",
18
+ "package": "@fluentui-copilot/react-chat-input-plugins",
19
+ "commit": "81a90760f46654eacd8da2d67e867f5415c18db1",
20
+ "comment": "chore: bump @fluentui dependencies to latest 9.55.1."
21
+ },
22
+ {
23
+ "author": "ololubek@microsoft.com",
24
+ "package": "@fluentui-copilot/react-chat-input-plugins",
25
+ "commit": "680e350432f82aa96634cd7cb0acd93e07bea517",
26
+ "comment": "Update GhostText foreground color token to colorNeutralForeground4"
27
+ },
28
+ {
29
+ "author": "owcampbe@microsoft.com",
30
+ "package": "@fluentui-copilot/react-chat-input-plugins",
31
+ "commit": "2bdb166cd12430b68d776c012dbb574b88e47fc8",
32
+ "comment": "feat: Add discrete update options to ghost text functions."
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Wed, 25 Sep 2024 19:50:22 GMT",
6
39
  "tag": "@fluentui-copilot/react-chat-input-plugins_v0.3.0",
7
40
  "version": "0.3.0",
8
41
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,24 @@
1
1
  # Change Log - @fluentui-copilot/react-chat-input-plugins
2
2
 
3
- This log was last generated on Wed, 25 Sep 2024 19:49:21 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 31 Oct 2024 17:41:08 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.3.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.3.1)
8
+
9
+ Thu, 31 Oct 2024 17:41:08 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.3.0..@fluentui-copilot/react-chat-input-plugins_v0.3.1)
11
+
12
+ ### Patches
13
+
14
+ - fix: Fix slots that are possibly null/undefined ([PR #2246](https://github.com/microsoft/fluentai/pull/2246) by jiangemma@microsoft.com)
15
+ - chore: bump @fluentui dependencies to latest 9.55.1. ([PR #2243](https://github.com/microsoft/fluentai/pull/2243) by jiangemma@microsoft.com)
16
+ - Update GhostText foreground color token to colorNeutralForeground4 ([PR #2217](https://github.com/microsoft/fluentai/pull/2217) by ololubek@microsoft.com)
17
+ - feat: Add discrete update options to ghost text functions. ([PR #2251](https://github.com/microsoft/fluentai/pull/2251) by owcampbe@microsoft.com)
18
+
7
19
  ## [0.3.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.3.0)
8
20
 
9
- Wed, 25 Sep 2024 19:49:21 GMT
21
+ Wed, 25 Sep 2024 19:50:22 GMT
10
22
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.2.2..@fluentui-copilot/react-chat-input-plugins_v0.3.0)
11
23
 
12
24
  ### Patches
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import type { EditorConfig } from '@fluentui-copilot/text-editor';
7
7
  import type { EditorState } from '@fluentui-copilot/text-editor';
8
8
  import type { ForwardRefComponent } from '@fluentui/react-components';
9
9
  import type { IImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';
10
+ import type { IManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';
10
11
  import type { LexicalEditor } from '@fluentui-copilot/text-editor';
11
12
  import type { LexicalNode } from '@fluentui-copilot/text-editor';
12
13
  import type { NodeKey } from '@fluentui-copilot/text-editor';
@@ -190,12 +191,7 @@ export declare type ManualGhostTextProps = {
190
191
  id: string;
191
192
  };
192
193
 
193
- export declare type ManualGhostTextRef = {
194
- getGhostText: () => string | undefined;
195
- setGhostText: (text: string, exposeText?: boolean, ghostTextProps?: GhostTextProps) => void;
196
- commitGhostText: (finalText: string) => void;
197
- cancelGhostText: () => void;
198
- };
194
+ export declare type ManualGhostTextRef = IManualGhostTextBase<GhostTextProps>;
199
195
 
200
196
  export declare const PasteUnfurlingPlugin: <ExtraDataType>(props: PasteUnfurlingPluginProps<ExtraDataType>) => null;
201
197
 
@@ -6,7 +6,7 @@ import { assertSlots } from '@fluentui/react-components';
6
6
  export const renderChatInputEntity_unstable = state => {
7
7
  assertSlots(state);
8
8
  return /*#__PURE__*/_jsxs(state.root, {
9
- children: [/*#__PURE__*/_jsx(state.text, {}), state.sensitivity && /*#__PURE__*/_jsx(state.sensitivity, {})]
9
+ children: [state.text && /*#__PURE__*/_jsx(state.text, {}), state.sensitivity && /*#__PURE__*/_jsx(state.sensitivity, {})]
10
10
  });
11
11
  };
12
12
  //# sourceMappingURL=renderChatInputEntity.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderChatInputEntity.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ChatInputEntityState, ChatInputEntitySlots } from './ChatInputEntity.types';\n\n/**\n * Render the final JSX of ChatInputEntity\n */\nexport const renderChatInputEntity_unstable = (state: ChatInputEntityState) => {\n assertSlots<ChatInputEntitySlots>(state);\n\n return (\n <state.root>\n <state.text />\n {state.sensitivity && <state.sensitivity />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderChatInputEntity_unstable","state","root","text","sensitivity"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,IAAI;YACVF,MAAMG,WAAW,kBAAI,KAACH,MAAMG,WAAW;;;AAG9C,EAAE"}
1
+ {"version":3,"sources":["renderChatInputEntity.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ChatInputEntityState, ChatInputEntitySlots } from './ChatInputEntity.types';\n\n/**\n * Render the final JSX of ChatInputEntity\n */\nexport const renderChatInputEntity_unstable = (state: ChatInputEntityState) => {\n assertSlots<ChatInputEntitySlots>(state);\n\n return (\n <state.root>\n {state.text && <state.text />}\n {state.sensitivity && <state.sensitivity />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderChatInputEntity_unstable","state","root","text","sensitivity"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,kBAAI,KAACF,MAAME,IAAI;YACzBF,MAAMG,WAAW,kBAAI,KAACH,MAAMG,WAAW;;;AAG9C,EAAE"}
@@ -8,7 +8,7 @@ export const ghostTextClassNames = {
8
8
  */
9
9
  const useStyles = __styles({
10
10
  root: {
11
- sj55zd: "f11d4kpn",
11
+ sj55zd: "fxc4j92",
12
12
  Huce71: "fibxuh5",
13
13
  i8kkvl: 0,
14
14
  Belr9w4: 0,
@@ -35,9 +35,9 @@ const useStyles = __styles({
35
35
  Cd5d3v: "f1pc5kto"
36
36
  }
37
37
  }, {
38
- d: [".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fibxuh5{white-space:pre-wrap;}", [".fkln5zr{gap:var(--spacingHorizontalXS);}", {
38
+ d: [".fxc4j92{color:var(--colorNeutralForeground4);}", ".fibxuh5{white-space:pre-wrap;}", [".fkln5zr{gap:var(--spacingHorizontalXS);}", {
39
39
  p: -1
40
- }], ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".f3vzo32{background-color:var(--colorNeutralBackground5);}", [".f1vo1c1k{padding:var(--spacingVerticalNone) var(--spacingHorizontalSNudge);}", {
40
+ }], ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f3vzo32{background-color:var(--colorNeutralBackground5);}", [".f1vo1c1k{padding:var(--spacingVerticalNone) var(--spacingHorizontalSNudge);}", {
41
41
  p: -1
42
42
  }], [".fq9zq91{border-radius:var(--borderRadiusSmall);}", {
43
43
  p: -1
@@ -1 +1 @@
1
- {"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { GhostTextSlots, GhostTextState } from './GhostText.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const ghostTextClassNames: SlotClassNames<GhostTextSlots> = {\n root: 'fai-GhostText',\n indicator: 'fai-GhostText__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground3,\n whiteSpace: 'pre-wrap',\n gap: tokens.spacingHorizontalXS,\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalSNudge}`,\n borderRadius: tokens.borderRadiusSmall,\n marginLeft: tokens.spacingHorizontalXS,\n merginRight: tokens.spacingHorizontalXS,\n },\n});\n\n/**\n * Apply styling to the GhostText slots based on the state\n */\nexport const useGhostTextStyles_unstable = (state: GhostTextState): GhostTextState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n ghostTextClassNames.indicator,\n styles.indicator,\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","ghostTextClassNames","root","indicator","useStyles","color","colorNeutralForeground3","whiteSpace","gap","spacingHorizontalXS","caption2Strong","backgroundColor","colorNeutralBackground5","padding","spacingVerticalNone","spacingHorizontalSNudge","borderRadius","borderRadiusSmall","marginLeft","merginRight","useGhostTextStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIhG,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,OAAON,OAAOO,uBAAuB;QACrCC,YAAY;QACZC,KAAKT,OAAOU,mBAAmB;IACjC;IAEAN,WAAW;QACT,GAAGH,iBAAiBU,cAAc;QAClCL,OAAON,OAAOO,uBAAuB;QACrCK,iBAAiBZ,OAAOa,uBAAuB;QAC/CC,SAAS,CAAC,EAAEd,OAAOe,mBAAmB,CAAC,CAAC,EAAEf,OAAOgB,uBAAuB,CAAC,CAAC;QAC1EC,cAAcjB,OAAOkB,iBAAiB;QACtCC,YAAYnB,OAAOU,mBAAmB;QACtCU,aAAapB,OAAOU,mBAAmB;IACzC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMW,8BAA8B,CAACC;IAC1C;IAEA,MAAMC,SAASlB;IACfiB,MAAMnB,IAAI,CAACqB,SAAS,GAAGzB,aAAaG,oBAAoBC,IAAI,EAAEoB,OAAOpB,IAAI,EAAEmB,MAAMnB,IAAI,CAACqB,SAAS;IAE/F,IAAIF,MAAMlB,SAAS,EAAE;QACnBkB,MAAMlB,SAAS,CAACoB,SAAS,GAAGzB,aAC1BG,oBAAoBE,SAAS,EAC7BmB,OAAOnB,SAAS,EAChBkB,MAAMlB,SAAS,CAACoB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { GhostTextSlots, GhostTextState } from './GhostText.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const ghostTextClassNames: SlotClassNames<GhostTextSlots> = {\n root: 'fai-GhostText',\n indicator: 'fai-GhostText__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground4,\n whiteSpace: 'pre-wrap',\n gap: tokens.spacingHorizontalXS,\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalSNudge}`,\n borderRadius: tokens.borderRadiusSmall,\n marginLeft: tokens.spacingHorizontalXS,\n merginRight: tokens.spacingHorizontalXS,\n },\n});\n\n/**\n * Apply styling to the GhostText slots based on the state\n */\nexport const useGhostTextStyles_unstable = (state: GhostTextState): GhostTextState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n ghostTextClassNames.indicator,\n styles.indicator,\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","ghostTextClassNames","root","indicator","useStyles","color","colorNeutralForeground4","whiteSpace","gap","spacingHorizontalXS","caption2Strong","colorNeutralForeground3","backgroundColor","colorNeutralBackground5","padding","spacingVerticalNone","spacingHorizontalSNudge","borderRadius","borderRadiusSmall","marginLeft","merginRight","useGhostTextStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIhG,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BK,MAAM;QACJG,OAAON,OAAOO,uBAAuB;QACrCC,YAAY;QACZC,KAAKT,OAAOU,mBAAmB;IACjC;IAEAN,WAAW;QACT,GAAGH,iBAAiBU,cAAc;QAClCL,OAAON,OAAOY,uBAAuB;QACrCC,iBAAiBb,OAAOc,uBAAuB;QAC/CC,SAAS,CAAC,EAAEf,OAAOgB,mBAAmB,CAAC,CAAC,EAAEhB,OAAOiB,uBAAuB,CAAC,CAAC;QAC1EC,cAAclB,OAAOmB,iBAAiB;QACtCC,YAAYpB,OAAOU,mBAAmB;QACtCW,aAAarB,OAAOU,mBAAmB;IACzC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMY,8BAA8B,CAACC;IAC1C;IAEA,MAAMC,SAASnB;IACfkB,MAAMpB,IAAI,CAACsB,SAAS,GAAG1B,aAAaG,oBAAoBC,IAAI,EAAEqB,OAAOrB,IAAI,EAAEoB,MAAMpB,IAAI,CAACsB,SAAS;IAE/F,IAAIF,MAAMnB,SAAS,EAAE;QACnBmB,MAAMnB,SAAS,CAACqB,SAAS,GAAG1B,aAC1BG,oBAAoBE,SAAS,EAC7BoB,OAAOpB,SAAS,EAChBmB,MAAMnB,SAAS,CAACqB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
@@ -1 +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 { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type ManualGhostTextProps = {\n id: string;\n};\n\nexport type ManualGhostTextRef = {\n getGhostText: () => string | undefined;\n setGhostText: (text: string, exposeText?: boolean, ghostTextProps?: GhostTextProps) => void;\n commitGhostText: (finalText: string) => void;\n cancelGhostText: () => void;\n};\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;AACzE,SAASC,mBAAmB,QAAQ,uCAAuC;AAa3E,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"}
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"}
@@ -14,7 +14,7 @@ const renderChatInputEntity_unstable = (state)=>{
14
14
  (0, _reactcomponents.assertSlots)(state);
15
15
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
16
  children: [
17
- /*#__PURE__*/ (0, _jsxruntime.jsx)(state.text, {}),
17
+ state.text && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.text, {}),
18
18
  state.sensitivity && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.sensitivity, {})
19
19
  ]
20
20
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["renderChatInputEntity.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ChatInputEntityState, ChatInputEntitySlots } from './ChatInputEntity.types';\n\n/**\n * Render the final JSX of ChatInputEntity\n */\nexport const renderChatInputEntity_unstable = (state: ChatInputEntityState) => {\n assertSlots<ChatInputEntitySlots>(state);\n\n return (\n <state.root>\n <state.text />\n {state.sensitivity && <state.sensitivity />}\n </state.root>\n );\n};\n"],"names":["assertSlots","state","_jsx","text","sensitivity"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,iCAAkCC,CAAAA;oCAElC,EAAAA;;;uBAEI,GAAAC,IAAAA,eAACD,EAAAA,MAAME,IAAI,EAAA,CAAA;YAAAF,MAAAG,WAAA,IAAA,WAAA,GAAAF,IAAAA,eAAA,EAAAD,MAAAG,WAAA,EAAA,CAAA;SAAA"}
1
+ {"version":3,"sources":["renderChatInputEntity.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ChatInputEntityState, ChatInputEntitySlots } from './ChatInputEntity.types';\n\n/**\n * Render the final JSX of ChatInputEntity\n */\nexport const renderChatInputEntity_unstable = (state: ChatInputEntityState) => {\n assertSlots<ChatInputEntitySlots>(state);\n\n return (\n <state.root>\n {state.text && <state.text />}\n {state.sensitivity && <state.sensitivity />}\n </state.root>\n );\n};\n"],"names":["assertSlots","state","text","_jsx","sensitivity"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,iCAAkCC,CAAAA;oCAElC,EAAAA;;kBAEKA;YAAAA,MAAMC,IAAI,IAAA,WAAI,GAAAC,IAAAA,eAACF,EAAAA,MAAMC,IAAI,EAAA,CAAA;YAAAD,MAAAG,WAAA,IAAA,WAAA,GAAAD,IAAAA,eAAA,EAAAF,MAAAG,WAAA,EAAA,CAAA;SAAA"}
@@ -25,7 +25,7 @@ const ghostTextClassNames = {
25
25
  * Styles for the root slot
26
26
  */ const useStyles = (0, _reactcomponents.__styles)({
27
27
  root: {
28
- sj55zd: "f11d4kpn",
28
+ sj55zd: "fxc4j92",
29
29
  Huce71: "fibxuh5",
30
30
  i8kkvl: 0,
31
31
  Belr9w4: 0,
@@ -56,7 +56,7 @@ const ghostTextClassNames = {
56
56
  }
57
57
  }, {
58
58
  d: [
59
- ".f11d4kpn{color:var(--colorNeutralForeground3);}",
59
+ ".fxc4j92{color:var(--colorNeutralForeground4);}",
60
60
  ".fibxuh5{white-space:pre-wrap;}",
61
61
  [
62
62
  ".fkln5zr{gap:var(--spacingHorizontalXS);}",
@@ -68,6 +68,7 @@ const ghostTextClassNames = {
68
68
  ".f13mqy1h{font-size:var(--fontSizeBase100);}",
69
69
  ".fl43uef{font-weight:var(--fontWeightSemibold);}",
70
70
  ".fcpl73t{line-height:var(--lineHeightBase100);}",
71
+ ".f11d4kpn{color:var(--colorNeutralForeground3);}",
71
72
  ".f3vzo32{background-color:var(--colorNeutralBackground5);}",
72
73
  [
73
74
  ".f1vo1c1k{padding:var(--spacingVerticalNone) var(--spacingHorizontalSNudge);}",
@@ -1 +1 @@
1
- {"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { GhostTextSlots, GhostTextState } from './GhostText.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const ghostTextClassNames: SlotClassNames<GhostTextSlots> = {\n root: 'fai-GhostText',\n indicator: 'fai-GhostText__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground3,\n whiteSpace: 'pre-wrap',\n gap: tokens.spacingHorizontalXS,\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalSNudge}`,\n borderRadius: tokens.borderRadiusSmall,\n marginLeft: tokens.spacingHorizontalXS,\n merginRight: tokens.spacingHorizontalXS,\n },\n});\n\n/**\n * Apply styling to the GhostText slots based on the state\n */\nexport const useGhostTextStyles_unstable = (state: GhostTextState): GhostTextState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n ghostTextClassNames.indicator,\n styles.indicator,\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["ghostTextClassNames","root","indicator","__styles","color","whiteSpace","gap","i8kkvl","typographyStyles","backgroundColor","padding","borderRadius","marginLeft","merginRight","sj55zd","De3pzq","Byoj8tv","z189sj","z8tnut","B0ocmuz","styles","state","Bbmb7ep","B7oj6ja","Dimara","Frg6f3"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,mBAAAA;eAAAA;;;;;;iCAJ8C;AAIpD,MAAMA,sBAAsD;UACjEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;QACFC,QAAA;QAEAL,SAAAA;gBACKM;;eAEHC;iBACAC;iBACAC;iBACAC;iBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,SAAA;;QAGAC,QAAO;QACLC,QAAA;QAEAC,SAAMC;QACNC,SAAMpB;QAENqB,SAAID;iBACFA;QAKFE,SAAA;QAEAC,QAAOH;QACPI,QAAA;YAAA;YAAA;SAAA"}
1
+ {"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { GhostTextSlots, GhostTextState } from './GhostText.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const ghostTextClassNames: SlotClassNames<GhostTextSlots> = {\n root: 'fai-GhostText',\n indicator: 'fai-GhostText__indicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground4,\n whiteSpace: 'pre-wrap',\n gap: tokens.spacingHorizontalXS,\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalSNudge}`,\n borderRadius: tokens.borderRadiusSmall,\n marginLeft: tokens.spacingHorizontalXS,\n merginRight: tokens.spacingHorizontalXS,\n },\n});\n\n/**\n * Apply styling to the GhostText slots based on the state\n */\nexport const useGhostTextStyles_unstable = (state: GhostTextState): GhostTextState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);\n\n if (state.indicator) {\n state.indicator.className = mergeClasses(\n ghostTextClassNames.indicator,\n styles.indicator,\n state.indicator.className,\n );\n }\n\n return state;\n};\n"],"names":["ghostTextClassNames","root","indicator","__styles","color","whiteSpace","gap","i8kkvl","typographyStyles","backgroundColor","padding","borderRadius","marginLeft","merginRight","sj55zd","De3pzq","Byoj8tv","z189sj","z8tnut","B0ocmuz","styles","state","Bbmb7ep","B7oj6ja","Dimara","Frg6f3"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,mBAAAA;eAAAA;;;;;;iCAJ8C;AAIpD,MAAMA,sBAAsD;UACjEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;QACFC,QAAA;QAEAL,SAAAA;gBACKM;;eAEHC;iBACAC;iBACAC;iBACAC;iBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,SAAA;;QAGAC,QAAO;QACLC,QAAA;QAEAC,SAAMC;QACNC,SAAMpB;QAENqB,SAAID;iBACFA;QAKFE,SAAA;QAEAC,QAAOH;QACPI,QAAA;YAAA;YAAA;SAAA"}
@@ -1 +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 { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type ManualGhostTextProps = {\n id: string;\n};\n\nexport type ManualGhostTextRef = {\n getGhostText: () => string | undefined;\n setGhostText: (text: string, exposeText?: boolean, ghostTextProps?: GhostTextProps) => void;\n commitGhostText: (finalText: string) => void;\n cancelGhostText: () => void;\n};\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":["ManualGhostTextPlugin","React","forwardRef","props","ref","id","editor","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;iCACmB;2BAEa;kCACnB;AAa7B,MAAMA,sCAAwBC,OAAMC,UAAU,CAA2C,CAACC,OAAOC;UACtG,EACAC,EAAA,KAEAJ;UAGGK,CAAAA,OAAAA,GAAAA,IAAAA,0CAAAA;WAAQD,mBAAAA,CAAAA,KAAAA,IAAAA,IAAAA,qCAAAA,CAAAA,QAAAA,IAAAA,2BAAAA,EAAAA,+BAAAA,GAAAA;QAAAA;QAAAA;KAAAA;WAAG;;AAIhBL,sBAAGO,WAAA,GAAA,yBAEHP,2CAAoC"}
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":["ManualGhostTextPlugin","React","forwardRef","props","ref","id","editor","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;iCACmB;2BAEa;kCAEnB;AAQ7B,MAAMA,sCAAwBC,OAAMC,UAAU,CAA2C,CAACC,OAAOC;UACtG,EACAC,EAAA,KAEAJ;UAGGK,CAAAA,OAAAA,GAAAA,IAAAA,0CAAAA;WAAQD,mBAAAA,CAAAA,KAAAA,IAAAA,IAAAA,qCAAAA,CAAAA,QAAAA,IAAAA,2BAAAA,EAAAA,+BAAAA,GAAAA;QAAAA;QAAAA;KAAAA;WAAG;;AAIhBL,sBAAGO,WAAA,GAAA,yBAEHP,2CAAoC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-chat-input-plugins",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
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.3.0",
16
- "@fluentui-copilot/react-text-editor": "^0.3.0",
15
+ "@fluentui-copilot/chat-input-plugins": "^0.3.2",
16
+ "@fluentui-copilot/react-text-editor": "^0.3.1",
17
17
  "@fluentui-copilot/text-editor": "^0.2.0",
18
18
  "@swc/helpers": "^0.5.1"
19
19
  },
20
20
  "peerDependencies": {
21
- "@fluentui/react-components": ">=9.54.10 <10.0.0",
22
- "@fluentui/react-jsx-runtime": ">=9.0.42 <10.0.0",
23
- "@fluentui/react-utilities": ">=9.18.13 <10.0.0",
21
+ "@fluentui/react-components": ">=9.55.1 <10.0.0",
22
+ "@fluentui/react-jsx-runtime": ">=9.0.45 <10.0.0",
23
+ "@fluentui/react-utilities": ">=9.18.16 <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",