@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20240527-0406-162a35f3.1 → 0.0.0-nightly-20240531-0407-49d6b52e.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 +9 -9
- package/CHANGELOG.md +7 -7
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js +2 -0
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +1 -1
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js +2 -0
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +1 -1
- package/lib/components/GhostText/useGhostTextStyles.styles.js +2 -0
- package/lib/components/GhostText/useGhostTextStyles.styles.js.map +1 -1
- package/lib/plugins/GhostText/GhostText.js +2 -0
- package/lib/plugins/GhostText/GhostText.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js +1 -0
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js +1 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js +1 -0
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.js.map +1 -1
- package/lib-commonjs/plugins/GhostText/GhostText.js +1 -0
- package/lib-commonjs/plugins/GhostText/GhostText.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-chat-input-plugins",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Fri, 31 May 2024 04:15:48 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
7
|
+
"version": "0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
19
|
-
"comment": "Bump @fluentui-copilot/chat-input-plugins to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui-copilot/chat-input-plugins to v0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
20
|
+
"commit": "9c3be0e96b259a17f931d3bbc23affaa0d137cea"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"author": "beachball",
|
|
24
24
|
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
25
|
-
"comment": "Bump @fluentui-copilot/react-text-editor to v0.0.0-nightly-
|
|
26
|
-
"commit": "
|
|
25
|
+
"comment": "Bump @fluentui-copilot/react-text-editor to v0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
26
|
+
"commit": "9c3be0e96b259a17f931d3bbc23affaa0d137cea"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"author": "beachball",
|
|
30
30
|
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
31
|
-
"comment": "Bump @fluentui-copilot/text-editor to v0.0.0-nightly-
|
|
32
|
-
"commit": "
|
|
31
|
+
"comment": "Bump @fluentui-copilot/text-editor to v0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
32
|
+
"commit": "9c3be0e96b259a17f931d3bbc23affaa0d137cea"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
35
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-chat-input-plugins
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 31 May 2024 04:15:48 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20240531-0407-49d6b52e.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20240531-0407-49d6b52e.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[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.0-nightly-
|
|
9
|
+
Fri, 31 May 2024 04:15:48 GMT
|
|
10
|
+
[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.0-nightly-20240531-0407-49d6b52e.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui-copilot/chat-input-plugins to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui-copilot/react-text-editor to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui-copilot/text-editor to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui-copilot/chat-input-plugins to v0.0.0-nightly-20240531-0407-49d6b52e.1 ([commit](https://github.com/microsoft/fluentai/commit/9c3be0e96b259a17f931d3bbc23affaa0d137cea) by beachball)
|
|
16
|
+
- Bump @fluentui-copilot/react-text-editor to v0.0.0-nightly-20240531-0407-49d6b52e.1 ([commit](https://github.com/microsoft/fluentai/commit/9c3be0e96b259a17f931d3bbc23affaa0d137cea) by beachball)
|
|
17
|
+
- Bump @fluentui-copilot/text-editor to v0.0.0-nightly-20240531-0407-49d6b52e.1 ([commit](https://github.com/microsoft/fluentai/commit/9c3be0e96b259a17f931d3bbc23affaa0d137cea) by beachball)
|
|
18
18
|
|
|
19
19
|
## [0.0.5](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.5)
|
|
20
20
|
|
|
@@ -31,6 +31,8 @@ const useStyles = __styles({
|
|
|
31
31
|
* Apply styling to the ChatInputEntity slots based on the state
|
|
32
32
|
*/
|
|
33
33
|
export const useChatInputEntityStyles_unstable = state => {
|
|
34
|
+
'use no memo';
|
|
35
|
+
|
|
34
36
|
const styles = useStyles();
|
|
35
37
|
state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);
|
|
36
38
|
if (state.text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","chatInputEntityClassNames","root","sensitivity","text","useStyles","color","colorBrandForeground1","href","colorBrandForegroundLink","textDecorationLine","colorBrandForegroundLinkHover","colorBrandForegroundLinkPressed","paddingLeft","spacingHorizontalXXS","useChatInputEntityStyles_unstable","state","styles","className","as"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","chatInputEntityClassNames","root","sensitivity","text","useStyles","color","colorBrandForeground1","href","colorBrandForegroundLink","textDecorationLine","colorBrandForegroundLinkHover","colorBrandForegroundLinkPressed","paddingLeft","spacingHorizontalXXS","useChatInputEntityStyles_unstable","state","styles","className","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAI9E,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,aAAa;IACbC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BI,MAAM,CAAC;IAEPE,MAAM;QACJE,OAAON,OAAOO,qBAAqB;IACrC;IAEAC,MAAM;QACJF,OAAON,OAAOS,wBAAwB;QAEtC,UAAU;YACRC,oBAAoB;YACpBJ,OAAON,OAAOW,6BAA6B;QAC7C;QAEA,WAAW;YACTD,oBAAoB;YACpBJ,OAAON,OAAOY,+BAA+B;QAC/C;IACF;IACAT,aAAa;QACXU,aAAab,OAAOc,oBAAoB;IAC1C;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD;IAEA,MAAMC,SAASZ;IAEfW,MAAMd,IAAI,CAACgB,SAAS,GAAGnB,aAAaE,0BAA0BC,IAAI,EAAEe,OAAOf,IAAI,EAAEc,MAAMd,IAAI,CAACgB,SAAS;IAErG,IAAIF,MAAMZ,IAAI,EAAE;QACdY,MAAMZ,IAAI,CAACc,SAAS,GAAGnB,aACrBE,0BAA0BG,IAAI,EAC9Ba,OAAOb,IAAI,EACXY,MAAMZ,IAAI,CAACe,EAAE,KAAK,OAAOF,OAAOT,IAAI,EACpCQ,MAAMZ,IAAI,CAACc,SAAS;IAExB;IAEA,IAAIF,MAAMb,WAAW,EAAE;QACrBa,MAAMb,WAAW,CAACe,SAAS,GAAGnB,aAC5BE,0BAA0BE,WAAW,EACrCc,OAAOd,WAAW,EAClBa,MAAMb,WAAW,CAACe,SAAS;IAE/B;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -10,6 +10,8 @@ const useBaseClassName = __resetStyles("rjbvsrk", "r1d7fxr6", [".rjbvsrk{font-fa
|
|
|
10
10
|
* Apply styling to the ChatInputToken slots based on the state
|
|
11
11
|
*/
|
|
12
12
|
export const useChatInputTokenStyles_unstable = state => {
|
|
13
|
+
'use no memo';
|
|
14
|
+
|
|
13
15
|
const baseClassName = useBaseClassName();
|
|
14
16
|
state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
15
17
|
return state;
|
|
@@ -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 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":"
|
|
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"}
|
|
@@ -38,6 +38,8 @@ const useStyles = __styles({
|
|
|
38
38
|
* Apply styling to the GhostText slots based on the state
|
|
39
39
|
*/
|
|
40
40
|
export const useGhostTextStyles_unstable = state => {
|
|
41
|
+
'use no memo';
|
|
42
|
+
|
|
41
43
|
const styles = useStyles();
|
|
42
44
|
state.root.className = mergeClasses(ghostTextClassNames.root, styles.root, state.root.className);
|
|
43
45
|
if (state.indicator) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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 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","shorthands","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":"
|
|
1
|
+
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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","shorthands","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,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAI5G,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,WAAW;AACb,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYR,WAAW;IAC3BM,MAAM;QACJG,OAAON,OAAOO,uBAAuB;QACrCC,YAAY;QACZ,GAAGT,WAAWU,GAAG,CAACT,OAAOU,mBAAmB,CAAC;IAC/C;IAEAN,WAAW;QACT,GAAGH,iBAAiBU,cAAc;QAClCL,OAAON,OAAOO,uBAAuB;QACrCK,iBAAiBZ,OAAOa,uBAAuB;QAC/C,GAAGd,WAAWe,OAAO,CAACd,OAAOe,mBAAmB,EAAEf,OAAOgB,uBAAuB,CAAC;QACjF,GAAGjB,WAAWkB,YAAY,CAACjB,OAAOkB,iBAAiB,CAAC;QACpDC,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,GAAG1B,aAAaI,oBAAoBC,IAAI,EAAEoB,OAAOpB,IAAI,EAAEmB,MAAMnB,IAAI,CAACqB,SAAS;IAE/F,IAAIF,MAAMlB,SAAS,EAAE;QACnBkB,MAAMlB,SAAS,CAACoB,SAAS,GAAG1B,aAC1BI,oBAAoBE,SAAS,EAC7BmB,OAAOnB,SAAS,EAChBkB,MAAMlB,SAAS,CAACoB,SAAS;IAE7B;IAEA,OAAOF;AACT,EAAE"}
|
|
@@ -4,6 +4,8 @@ import { $createGhostTextNode } from '../../GhostText';
|
|
|
4
4
|
import { GhostTextNode } from './GhostText.node';
|
|
5
5
|
import { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';
|
|
6
6
|
export function GhostTextPlugin(props) {
|
|
7
|
+
'use no memo';
|
|
8
|
+
|
|
7
9
|
const {
|
|
8
10
|
$getGhostText,
|
|
9
11
|
id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null {\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const ghostTextBase = React.useRef<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n ghostTextBase.current = new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n );\n\n return () => {\n ghostTextBase.current?.cleanup();\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase.current?.setAllowCompletion(allowCompletion);\n }, [allowCompletion]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setComponentProps(ghostTextProps);\n }, [ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setExposeText(exposeText);\n }, [exposeText]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setGetGhostText($getGhostText);\n }, [$getGhostText]);\n\n return null;\n}\n"],"names":["React","useLexicalComposerContext","$createGhostTextNode","GhostTextNode","GhostTextPluginBase","GhostTextPlugin","props","$getGhostText","id","ghostTextProps","exposeText","allowCompletion","editor","ghostTextBase","useRef","useEffect","current","cleanup","setAllowCompletion","setComponentProps","setExposeText","setGetGhostText"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null {\n 'use no memo';\n\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const ghostTextBase = React.useRef<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n ghostTextBase.current = new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n );\n\n return () => {\n ghostTextBase.current?.cleanup();\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase.current?.setAllowCompletion(allowCompletion);\n }, [allowCompletion]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setComponentProps(ghostTextProps);\n }, [ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setExposeText(exposeText);\n }, [exposeText]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setGetGhostText($getGhostText);\n }, [$getGhostText]);\n\n return null;\n}\n"],"names":["React","useLexicalComposerContext","$createGhostTextNode","GhostTextNode","GhostTextPluginBase","GhostTextPlugin","props","$getGhostText","id","ghostTextProps","exposeText","allowCompletion","editor","ghostTextBase","useRef","useEffect","current","cleanup","setAllowCompletion","setComponentProps","setExposeText","setGetGhostText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,sCAAsC;AAGhF,SAASC,oBAAoB,QAAQ,kBAAkB;AACvD,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,mBAAmB,QAAQ,uCAAuC;AAe3E,OAAO,SAASC,gBAAgBC,KAA2B;IACzD;IAEA,MAAM,EAAEC,aAAa,EAAEC,EAAE,EAAEC,cAAc,EAAEC,UAAU,EAAEC,eAAe,EAAE,GAAGL;IAC3E,MAAM,CAACM,OAAO,GAAGX;IAEjB,MAAMY,gBAAgBb,MAAMc,MAAM,CAA6C;IAE/Ed,MAAMe,SAAS,CACb;QACEF,cAAcG,OAAO,GAAG,IAAIZ,oBAC1BQ,QACAJ,IACAD,eACAJ,eACAD,sBACAO,gBACAC,YACAC;QAGF,OAAO;gBACLE;aAAAA,yBAAAA,cAAcG,OAAO,cAArBH,6CAAAA,uBAAuBI,OAAO;QAChC;IACF,GACA,wHAAwH;IACxH,uDAAuD;IACvD;QAACL;QAAQJ;KAAG;IAGdR,MAAMe,SAAS,CAAC;YACdF;SAAAA,yBAAAA,cAAcG,OAAO,cAArBH,6CAAAA,uBAAuBK,kBAAkB,CAACP;IAC5C,GAAG;QAACA;KAAgB;IAEpBX,MAAMe,SAAS,CAAC;YACdF;SAAAA,yBAAAA,cAAcG,OAAO,cAArBH,6CAAAA,uBAAuBM,iBAAiB,CAACV;IAC3C,GAAG;QAACA;KAAe;IAEnBT,MAAMe,SAAS,CAAC;YACdF;SAAAA,yBAAAA,cAAcG,OAAO,cAArBH,6CAAAA,uBAAuBO,aAAa,CAACV;IACvC,GAAG;QAACA;KAAW;IAEfV,MAAMe,SAAS,CAAC;YACdF;SAAAA,yBAAAA,cAAcG,OAAO,cAArBH,6CAAAA,uBAAuBQ,eAAe,CAACd;IACzC,GAAG;QAACA;KAAc;IAElB,OAAO;AACT"}
|
|
@@ -59,6 +59,7 @@ const chatInputEntityClassNames = {
|
|
|
59
59
|
]
|
|
60
60
|
});
|
|
61
61
|
const useChatInputEntityStyles_unstable = (state)=>{
|
|
62
|
+
'use no memo';
|
|
62
63
|
const styles = useStyles();
|
|
63
64
|
state.root.className = (0, _reactcomponents.mergeClasses)(chatInputEntityClassNames.root, styles.root, state.root.className);
|
|
64
65
|
if (state.text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["chatInputEntityClassNames","root","sensitivity","text","__styles","color","sj55zd","textDecorationLine","a","state","className","mergeClasses"
|
|
1
|
+
{"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { ChatInputEntitySlots, ChatInputEntityState } from './ChatInputEntity.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputEntityClassNames: SlotClassNames<ChatInputEntitySlots> = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {},\n\n text: {\n color: tokens.colorBrandForeground1,\n },\n\n href: {\n color: tokens.colorBrandForegroundLink,\n\n ':hover': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkHover,\n },\n\n ':active': {\n textDecorationLine: 'underline',\n color: tokens.colorBrandForegroundLinkPressed,\n },\n },\n sensitivity: {\n paddingLeft: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = (state: ChatInputEntityState): ChatInputEntityState => {\n 'use no memo';\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n\n if (state.text) {\n state.text.className = mergeClasses(\n chatInputEntityClassNames.text,\n styles.text,\n state.text.as === 'a' && styles.href,\n state.text.className,\n );\n }\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n chatInputEntityClassNames.sensitivity,\n styles.sensitivity,\n state.sensitivity.className,\n );\n }\n\n return state;\n};\n"],"names":["chatInputEntityClassNames","styles","useStyles","root","sensitivity","text","__styles","color","sj55zd","textDecorationLine","a","state","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,yBAAAA;eAAAA;;IAwCLC,iCAASC;eAATD;;;iCA5CiC;AAIlC,MAAMD,4BAAkE;UAC7EG;iBACAC;UACAC;AACF;AAEA;;CAEC,SAECF,YAAOG,IAAAA,yBAAA,EAAA;UAEPD,CAAAA;UACEE;QACFC,QAAA;;UAGED;gBAEA;iBACEE;iBACAF;gBACF;gBAEA;;iBAEEA;gBACF;YAAA;YAAA;SAAA;;;;;QAGwC;QAAA;QAAA;KAAA;OAC1C;QAAA;QAAA;KAAA;IACFG,GAAA;QAAA;QAAA;KAAA;AAEA;AAME,MAAMT,oCAASC,CAAAA;;UAKbS,SAAMN;UAMRF,IAAA,CAAAS,SAAA,GAAAC,IAAAA,6BAAA,EAAAb,0BAAAG,IAAA,EAAAF,OAAAE,IAAA,EAAAQ,MAAAR,IAAA,CAAAS,SAAA;QAEAD,MAAIA,IAAMP,EAAAA;cACRO,IAAMP,CAAAA,SAAAA,GAAYQ,IAAAA,6BAAYC,EAAAA,0BAC5Bb,IAAAA,EAAAA,OAA0BI,IAAAA,EAAAA,MAC1BH,IAAAA,CAAAA,EAAOG,KAAAA,OACPO,OAAMP,IAAAA,EAAAA,MAAYQ,IAAAA,CAAAA,SAAS;;QAI/BD,MAAOA,WAAAA,EAAAA;QACPA,MAAAP,WAAA,CAAAQ,SAAA,GAAAC,IAAAA,6BAAA,EAAAb,0BAAAI,WAAA,EAAAH,OAAAG,WAAA,EAAAO,MAAAP,WAAA,CAAAQ,SAAA"}
|
|
@@ -27,6 +27,7 @@ const chatInputTokenClassNames = {
|
|
|
27
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;}"
|
|
28
28
|
]);
|
|
29
29
|
const useChatInputTokenStyles_unstable = (state)=>{
|
|
30
|
+
'use no memo';
|
|
30
31
|
const baseClassName = useBaseClassName();
|
|
31
32
|
state.root.className = (0, _reactcomponents.mergeClasses)(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
32
33
|
return state;
|
|
@@ -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 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","
|
|
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"}
|
|
@@ -94,6 +94,7 @@ const ghostTextClassNames = {
|
|
|
94
94
|
]
|
|
95
95
|
});
|
|
96
96
|
const useGhostTextStyles_unstable = (state)=>{
|
|
97
|
+
'use no memo';
|
|
97
98
|
const styles = useStyles();
|
|
98
99
|
state.root.className = (0, _reactcomponents.mergeClasses)(ghostTextClassNames.root, styles.root, state.root.className);
|
|
99
100
|
if (state.indicator) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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 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","shorthands","i8kkvl","backgroundColor","marginLeft","merginRight","De3pzq","z8tnut","z189sj","uwmqm3","useGhostTextStyles_unstable","Bbmb7ep","styles","useStyles","state","mergeClasses","
|
|
1
|
+
{"version":3,"sources":["useGhostTextStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingHorizontalXS),\n },\n\n indicator: {\n ...typographyStyles.caption2Strong,\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground5,\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalSNudge),\n ...shorthands.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","shorthands","i8kkvl","backgroundColor","marginLeft","merginRight","De3pzq","z8tnut","z189sj","uwmqm3","useGhostTextStyles_unstable","Bbmb7ep","Beyfa6y","styles","useStyles","state","mergeClasses","Btl43ni","className","Cd5d3v"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,mBAAAA;eAAAA;;;;;;iCAJ0D;AAIhE,MAAMA,sBAAsD;UACjEC;eACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACGC;QACLC,QAAA;QAEAL,SAAAA;;eAEEE;iBACAI;iBACGF;iBACAA;iBACHG;gBACAC;QACFC,QAAA;QACFC,QAAA;QAEAC,QAAA;YAAA;YAAA;SAAA;;QAGAC,QAAO;YAAA;YAAMC;SAAAA;QACXC,SAAA;YAAA;YAAA;SAAA;QAEAC,SAAMC;YAAAA;YAASC;SAAAA;QACfC,SAAMnB;YAAI;YAAU;SAAGoB;QAEvBC,SAAIF;YAAMlB;YAAW;SAAA;gBACnBkB;YAAAA;YAAgBG;SAAS;QAK3BC,QAAA;;AAGF,GAAE"}
|
|
@@ -15,6 +15,7 @@ const _GhostText = require("../../GhostText");
|
|
|
15
15
|
const _GhostTextnode = require("./GhostText.node");
|
|
16
16
|
const _chatinputplugins = require("@fluentui-copilot/chat-input-plugins");
|
|
17
17
|
function GhostTextPlugin(props) {
|
|
18
|
+
'use no memo';
|
|
18
19
|
const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;
|
|
19
20
|
const [editor] = (0, _reacttexteditor.useLexicalComposerContext)();
|
|
20
21
|
const ghostTextBase = _react.useRef(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null {\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const ghostTextBase = React.useRef<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n ghostTextBase.current = new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n );\n\n return () => {\n ghostTextBase.current?.cleanup();\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase.current?.setAllowCompletion(allowCompletion);\n }, [allowCompletion]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setComponentProps(ghostTextProps);\n }, [ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setExposeText(exposeText);\n }, [exposeText]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setGetGhostText($getGhostText);\n }, [$getGhostText]);\n\n return null;\n}\n"],"names":["GhostTextPlugin","props","$getGhostText","
|
|
1
|
+
{"version":3,"sources":["GhostText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { LexicalEditor, EditorState } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode } from '../../GhostText';\nimport { GhostTextNode } from './GhostText.node';\nimport { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type GhostTextPluginProps = {\n id: string;\n $getGhostText: (\n editor: LexicalEditor,\n editorState: EditorState,\n prevEditorState: EditorState,\n ) => Promise<string | undefined>;\n ghostTextProps?: GhostTextProps;\n // Whether or not the ghost text should count as text inside the input for submitting and character count\n exposeText?: boolean;\n allowCompletion?: boolean;\n};\n\nexport function GhostTextPlugin(props: GhostTextPluginProps): JSX.Element | null {\n 'use no memo';\n\n const { $getGhostText, id, ghostTextProps, exposeText, allowCompletion } = props;\n const [editor] = useLexicalComposerContext();\n\n const ghostTextBase = React.useRef<GhostTextPluginBase<GhostTextProps> | null>(null);\n\n React.useEffect(\n () => {\n ghostTextBase.current = new GhostTextPluginBase(\n editor,\n id,\n $getGhostText,\n GhostTextNode,\n $createGhostTextNode,\n ghostTextProps,\n exposeText,\n allowCompletion,\n );\n\n return () => {\n ghostTextBase.current?.cleanup();\n };\n },\n // We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [editor, id],\n );\n\n React.useEffect(() => {\n ghostTextBase.current?.setAllowCompletion(allowCompletion);\n }, [allowCompletion]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setComponentProps(ghostTextProps);\n }, [ghostTextProps]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setExposeText(exposeText);\n }, [exposeText]);\n\n React.useEffect(() => {\n ghostTextBase.current?.setGetGhostText($getGhostText);\n }, [$getGhostText]);\n\n return null;\n}\n"],"names":["GhostTextPlugin","props","$getGhostText","ghostTextBase","React","editor","useLexicalComposerContext","useRef","useEffect","current","GhostTextPluginBase","id","GhostTextNode","$createGhostTextNode","ghostTextProps","exposeText","allowCompletion","_ghostTextBase_current","cleanup","setComponentProps","setExposeText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqBgBA;;;eAAAA;;;;iEArBO;iCACmB;2BAGL;+BACP;kCACM;AAe7B,SAASA,gBAAgBC,KAA2B;;UAIzD,EAEAC,aAAMC,EAENC,EAAAA,gBAEID,YAWA,iBACEA;UACF,CAAAE,OAAA,GAAAC,IAAAA,0CAAA;UAEFH,gBAAAC,OAAAG,MAAA,CAAA;WACAC,SAAA,CAAA;QACAL,cAAAM,OAAA,GAAA,IAAAC,qCAAA,CAAAL,QAAAM,IAAAT,eAAAU,4BAAA,EAAAC,+BAAA,EAAAC,gBAAAC,YAAAC;eAACX;gBAAQM;YAAGM,CAAAA,yBAAAd,cAAAM,OAAA,MAAA,QAAAQ,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAC,OAAA;QAGdd;+HACED;2DACC;;;QAACa;KAAAA;WAAgBR,SAAA,CAAA;QAEpBJ,IAAAA;kCACED,cAAAA,OAAAA,MAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAAA,kBAAAA,CAAAA;;;KAAAA;WACCK,SAAA,CAAA;YAACM;QAAeG,CAAAA,yBAAAd,cAAAM,OAAA,MAAA,QAAAQ,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAE,iBAAA,CAAAL;OAEnBV;QAAAA;KAAgB;oBACdD,CAAAA;;QACFc,CAAAA,yBAAGd,cAAAM,OAAA,MAAA,QAAAQ,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAG,aAAA,CAAAL;;;KAACA;WAAWP,SAAA,CAAA;QAEfJ,IAAAA;kCACED,cAAAA,OAAAA,MAAAA,QAAAA,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAAA,eAAAA,CAAAA;;;KAAAA;WACC;uCAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-chat-input-plugins",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240531-0407-49d6b52e.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,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/chat-input-plugins": "0.0.0-nightly-
|
|
16
|
-
"@fluentui-copilot/react-text-editor": "0.0.0-nightly-
|
|
17
|
-
"@fluentui-copilot/text-editor": "0.0.0-nightly-
|
|
15
|
+
"@fluentui-copilot/chat-input-plugins": "0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
16
|
+
"@fluentui-copilot/react-text-editor": "0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
17
|
+
"@fluentui-copilot/text-editor": "0.0.0-nightly-20240531-0407-49d6b52e.1",
|
|
18
18
|
"@swc/helpers": "^0.5.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|