@fluentui-copilot/react-chat-input-plugins 0.4.10-hotfix.1 → 0.4.10-hotfix.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 +4 -4
- package/CHANGELOG.md +5 -5
- package/lib/BasicFunctionality.js +1 -0
- package/lib/ChatInputEntity.js +1 -0
- package/lib/ChatInputToken.js +1 -0
- package/lib/GhostText.js +1 -0
- package/lib/ImperativeControl.js +1 -0
- package/lib/PasteUnfurling.js +1 -0
- package/lib/components/ChatInputEntity/ChatInputEntity.js +5 -4
- package/lib/components/ChatInputEntity/ChatInputEntity.types.js +3 -2
- package/lib/components/ChatInputEntity/index.js +1 -0
- package/lib/components/ChatInputEntity/renderChatInputEntity.js +8 -9
- package/lib/components/ChatInputEntity/useChatInputEntity.js +44 -40
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +35 -31
- package/lib/components/ChatInputToken/ChatInputToken.js +5 -4
- package/lib/components/ChatInputToken/ChatInputToken.node.js +50 -49
- package/lib/components/ChatInputToken/ChatInputToken.types.js +2 -1
- package/lib/components/ChatInputToken/index.js +1 -0
- package/lib/components/ChatInputToken/renderChatInputToken.js +6 -4
- package/lib/components/ChatInputToken/useChatInputToken.js +14 -12
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +19 -15
- package/lib/components/GhostText/GhostText.js +5 -4
- package/lib/components/GhostText/GhostText.types.js +3 -2
- package/lib/components/GhostText/index.js +1 -0
- package/lib/components/GhostText/renderGhostText.js +8 -9
- package/lib/components/GhostText/useGhostText.js +39 -36
- package/lib/components/GhostText/useGhostTextStyles.styles.raw.js +29 -25
- package/lib/index.js +1 -0
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js +53 -67
- package/lib/plugins/BasicFunctionality/index.js +1 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +68 -67
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js +38 -37
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +2 -1
- package/lib/plugins/ChatInputEntity/index.js +1 -0
- package/lib/plugins/GhostText/GhostText.js +37 -43
- package/lib/plugins/GhostText/GhostText.node.js +57 -56
- package/lib/plugins/GhostText/index.js +1 -0
- package/lib/plugins/ImperativeControl/ImperativeControl.js +5 -6
- package/lib/plugins/ImperativeControl/index.js +1 -0
- package/lib/plugins/ManualGhostText/ManualGhostText.js +8 -8
- package/lib/plugins/ManualGhostText/index.js +1 -0
- package/lib/plugins/PasteUnfurling/PasteUnfurling.js +14 -14
- package/lib/plugins/PasteUnfurling/index.js +1 -0
- package/lib-commonjs/BasicFunctionality.js +1 -0
- package/lib-commonjs/ChatInputEntity.js +1 -0
- package/lib-commonjs/ChatInputToken.js +1 -0
- package/lib-commonjs/GhostText.js +1 -0
- package/lib-commonjs/ImperativeControl.js +1 -0
- package/lib-commonjs/PasteUnfurling.js +1 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js +1 -1
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js +1 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/index.js +1 -0
- package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js +1 -1
- package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js +1 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js +1 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js +1 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js +1 -0
- package/lib-commonjs/components/ChatInputToken/index.js +1 -0
- package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js +1 -1
- package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputToken.js +1 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputToken.js.map +1 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/GhostText/GhostText.js +1 -1
- package/lib-commonjs/components/GhostText/GhostText.js.map +1 -1
- package/lib-commonjs/components/GhostText/GhostText.types.js +1 -0
- package/lib-commonjs/components/GhostText/GhostText.types.js.map +1 -1
- package/lib-commonjs/components/GhostText/index.js +1 -0
- package/lib-commonjs/components/GhostText/renderGhostText.js +1 -1
- package/lib-commonjs/components/GhostText/renderGhostText.js.map +1 -1
- package/lib-commonjs/components/GhostText/useGhostText.js +1 -1
- package/lib-commonjs/components/GhostText/useGhostText.js.map +1 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js +1 -1
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -1
- package/lib-commonjs/plugins/BasicFunctionality/index.js +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js +1 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js +1 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -1
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/index.js +1 -0
- package/lib-commonjs/plugins/GhostText/GhostText.js +3 -2
- package/lib-commonjs/plugins/GhostText/GhostText.js.map +1 -1
- package/lib-commonjs/plugins/GhostText/GhostText.node.js +1 -1
- package/lib-commonjs/plugins/GhostText/GhostText.node.js.map +1 -1
- package/lib-commonjs/plugins/GhostText/index.js +1 -0
- package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js +1 -1
- package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js.map +1 -1
- package/lib-commonjs/plugins/ImperativeControl/index.js +1 -0
- package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js +1 -1
- package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js.map +1 -1
- package/lib-commonjs/plugins/ManualGhostText/index.js +1 -0
- package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js +1 -1
- package/lib-commonjs/plugins/PasteUnfurling/PasteUnfurling.js.map +1 -1
- package/lib-commonjs/plugins/PasteUnfurling/index.js +1 -0
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
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.4.10-hotfix.
|
|
7
|
-
"version": "0.4.10-hotfix.
|
|
5
|
+
"date": "Fri, 19 Sep 2025 15:10:19 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.4.10-hotfix.2",
|
|
7
|
+
"version": "0.4.10-hotfix.2",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
11
11
|
"author": "hochelmartin@gmail.com",
|
|
12
12
|
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
13
13
|
"commit": "3e4ebe676646c4c4346dbbab83511f963ffefd85",
|
|
14
|
-
"comment": "release: prepare hotfix 0.26.2-hotfix.
|
|
14
|
+
"comment": "release: prepare hotfix 0.26.2-hotfix.2"
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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, 19 Sep 2025 15:10:19 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.4.10-hotfix.
|
|
7
|
+
## [0.4.10-hotfix.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.4.10-hotfix.2)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.4.10..@fluentui-copilot/react-chat-input-plugins_v0.4.10-hotfix.
|
|
9
|
+
Fri, 19 Sep 2025 15:10:19 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.4.10..@fluentui-copilot/react-chat-input-plugins_v0.4.10-hotfix.2)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- release: prepare hotfix 0.26.2-hotfix.
|
|
14
|
+
- release: prepare hotfix 0.26.2-hotfix.2 ([PR #3284](https://github.com/microsoft/fluentai/pull/3284) by hochelmartin@gmail.com)
|
|
15
15
|
|
|
16
16
|
## [0.4.10](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.4.10)
|
|
17
17
|
|
package/lib/ChatInputEntity.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { ChatInputEntity, chatInputEntityClassNames, renderChatInputEntity_unstable, useChatInputEntityStyles_unstable, useChatInputEntity_unstable } from './components/ChatInputEntity/index';
|
|
2
2
|
export { $createChatInputEntityNode, $isChatInputEntityNode, ChatInputEntityNode, ChatInputEntityPlugin } from './plugins/ChatInputEntity/index';
|
|
3
|
+
//# sourceMappingURL=ChatInputEntity.js.map
|
package/lib/ChatInputToken.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { $createChatInputTokenNode, $isChatInputTokenNode, ChatInputToken, ChatInputTokenNode, chatInputTokenClassNames, renderChatInputToken_unstable, useChatInputTokenStyles_unstable, useChatInputToken_unstable } from './components/ChatInputToken/index';
|
|
2
|
+
//# sourceMappingURL=ChatInputToken.js.map
|
package/lib/GhostText.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { GhostText, ghostTextClassNames, renderGhostText_unstable, useGhostTextStyles_unstable, useGhostText_unstable } from './components/GhostText/index';
|
|
2
2
|
export { $createGhostTextNode, $isGhostTextNode, GhostTextNode, GhostTextPlugin } from './plugins/GhostText/index';
|
|
3
3
|
export { ManualGhostTextPlugin } from './plugins/ManualGhostText/index';
|
|
4
|
+
//# sourceMappingURL=GhostText.js.map
|
package/lib/ImperativeControl.js
CHANGED
package/lib/PasteUnfurling.js
CHANGED
|
@@ -3,9 +3,10 @@ import { useChatInputEntity_unstable } from './useChatInputEntity';
|
|
|
3
3
|
import { renderChatInputEntity_unstable } from './renderChatInputEntity';
|
|
4
4
|
import { useChatInputEntityStyles_unstable } from './useChatInputEntityStyles.styles';
|
|
5
5
|
// ChatInputEntity component - TODO: add more docs
|
|
6
|
-
export const ChatInputEntity = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export const ChatInputEntity = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = useChatInputEntity_unstable(props, ref);
|
|
8
|
+
useChatInputEntityStyles_unstable(state);
|
|
9
|
+
return renderChatInputEntity_unstable(state);
|
|
10
10
|
});
|
|
11
11
|
ChatInputEntity.displayName = 'ChatInputEntity';
|
|
12
|
+
//# sourceMappingURL=ChatInputEntity.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State used in rendering ChatInputEntity
|
|
3
|
-
*/
|
|
4
|
-
|
|
3
|
+
*/export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.
|
|
4
|
+
// & Required<Pick<ChatInputEntityProps, 'propName'>>
|
|
5
|
+
//# sourceMappingURL=ChatInputEntity.types.js.map
|
|
@@ -2,3 +2,4 @@ export { ChatInputEntity } from './ChatInputEntity';
|
|
|
2
2
|
export { renderChatInputEntity_unstable } from './renderChatInputEntity';
|
|
3
3
|
export { useChatInputEntity_unstable } from './useChatInputEntity';
|
|
4
4
|
export { chatInputEntityClassNames, useChatInputEntityStyles_unstable } from './useChatInputEntityStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of ChatInputEntity
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
});
|
|
5
|
+
*/
|
|
6
|
+
export const renderChatInputEntity_unstable = state => {
|
|
7
|
+
assertSlots(state);
|
|
8
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
9
|
+
children: [state.text && /*#__PURE__*/_jsx(state.text, {}), state.sensitivity && /*#__PURE__*/_jsx(state.sensitivity, {})]
|
|
10
|
+
});
|
|
13
11
|
};
|
|
12
|
+
//# sourceMappingURL=renderChatInputEntity.js.map
|
|
@@ -8,44 +8,48 @@ import { getPartitionedNativeProps, slot } from '@fluentui/react-components';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of ChatInputEntity
|
|
10
10
|
* @param ref - reference to root HTMLElement of ChatInputEntity
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
11
|
+
*/
|
|
12
|
+
export const useChatInputEntity_unstable = (props, ref) => {
|
|
13
|
+
const {
|
|
14
|
+
as
|
|
15
|
+
} = props;
|
|
16
|
+
const elementType = as !== null && as !== void 0 ? as : 'span';
|
|
17
|
+
const nativeProps = getPartitionedNativeProps({
|
|
18
|
+
props,
|
|
19
|
+
primarySlotTagName: elementType
|
|
20
|
+
});
|
|
21
|
+
const defaultTextSlotProps = elementType === 'a' ? {
|
|
22
|
+
target: '_blank',
|
|
23
|
+
rel: 'noopener',
|
|
24
|
+
// We don't want to enable tab focus for components inside the ChatInput
|
|
25
|
+
tabIndex: -1,
|
|
26
|
+
...nativeProps.primary,
|
|
27
|
+
as: 'a',
|
|
28
|
+
// This cast is safe to do at this point because we know the type of element we are rendering is an anchor
|
|
29
|
+
ref: ref
|
|
30
|
+
} : {
|
|
31
|
+
...nativeProps.primary,
|
|
32
|
+
as: 'span',
|
|
33
|
+
ref
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
components: {
|
|
37
|
+
root: 'span',
|
|
38
|
+
sensitivity: 'span',
|
|
39
|
+
text: elementType
|
|
40
|
+
},
|
|
41
|
+
root: slot.always(props.root, {
|
|
42
|
+
defaultProps: nativeProps.root,
|
|
43
|
+
elementType: 'span'
|
|
44
|
+
}),
|
|
45
|
+
sensitivity: slot.optional(props.sensitivity, {
|
|
46
|
+
elementType: 'span'
|
|
47
|
+
}),
|
|
48
|
+
text: slot.optional(props.text, {
|
|
49
|
+
defaultProps: defaultTextSlotProps,
|
|
50
|
+
renderByDefault: true,
|
|
51
|
+
elementType
|
|
52
|
+
})
|
|
53
|
+
};
|
|
51
54
|
};
|
|
55
|
+
//# sourceMappingURL=useChatInputEntity.js.map
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
import { makeStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
3
|
export const chatInputEntityClassNames = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
root: 'fai-ChatInputEntity',
|
|
5
|
+
sensitivity: 'fai-ChatInputEntity__sensitivity',
|
|
6
|
+
text: 'fai-ChatInputEntity__text'
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Styles for the root slot
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
*/
|
|
11
|
+
const useStyles = makeStyles({
|
|
12
|
+
root: {},
|
|
13
|
+
text: {
|
|
14
|
+
color: tokens.colorBrandForeground1
|
|
15
|
+
},
|
|
16
|
+
href: {
|
|
17
|
+
color: tokens.colorBrandForegroundLink,
|
|
18
|
+
':hover': {
|
|
19
|
+
textDecorationLine: 'underline',
|
|
20
|
+
color: tokens.colorBrandForegroundLinkHover
|
|
14
21
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
textDecorationLine: 'underline',
|
|
19
|
-
color: tokens.colorBrandForegroundLinkHover
|
|
20
|
-
},
|
|
21
|
-
':active': {
|
|
22
|
-
textDecorationLine: 'underline',
|
|
23
|
-
color: tokens.colorBrandForegroundLinkPressed
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
sensitivity: {
|
|
27
|
-
paddingLeft: tokens.spacingHorizontalXXS
|
|
22
|
+
':active': {
|
|
23
|
+
textDecorationLine: 'underline',
|
|
24
|
+
color: tokens.colorBrandForegroundLinkPressed
|
|
28
25
|
}
|
|
26
|
+
},
|
|
27
|
+
sensitivity: {
|
|
28
|
+
paddingLeft: tokens.spacingHorizontalXXS
|
|
29
|
+
}
|
|
29
30
|
});
|
|
30
31
|
/**
|
|
31
32
|
* Apply styling to the ChatInputEntity slots based on the state
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
*/
|
|
34
|
+
export const useChatInputEntityStyles_unstable = state => {
|
|
35
|
+
'use no memo';
|
|
36
|
+
|
|
37
|
+
const styles = useStyles();
|
|
38
|
+
state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);
|
|
39
|
+
if (state.text) {
|
|
40
|
+
state.text.className = mergeClasses(chatInputEntityClassNames.text, styles.text, state.text.as === 'a' && styles.href, state.text.className);
|
|
41
|
+
}
|
|
42
|
+
if (state.sensitivity) {
|
|
43
|
+
state.sensitivity.className = mergeClasses(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);
|
|
44
|
+
}
|
|
45
|
+
return state;
|
|
43
46
|
};
|
|
47
|
+
//# sourceMappingURL=useChatInputEntityStyles.styles.raw.js.map
|
|
@@ -3,9 +3,10 @@ import { useChatInputToken_unstable } from './useChatInputToken';
|
|
|
3
3
|
import { renderChatInputToken_unstable } from './renderChatInputToken';
|
|
4
4
|
import { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles.styles';
|
|
5
5
|
// ChatInputToken component
|
|
6
|
-
export const ChatInputToken = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export const ChatInputToken = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = useChatInputToken_unstable(props, ref);
|
|
8
|
+
useChatInputTokenStyles_unstable(state);
|
|
9
|
+
return renderChatInputToken_unstable(state);
|
|
10
10
|
});
|
|
11
11
|
ChatInputToken.displayName = 'ChatInputToken';
|
|
12
|
+
//# sourceMappingURL=ChatInputToken.js.map
|
|
@@ -3,57 +3,58 @@ import * as React from 'react';
|
|
|
3
3
|
import { DecoratorNode } from '@fluentui-copilot/text-editor';
|
|
4
4
|
import { ChatInputToken } from './ChatInputToken';
|
|
5
5
|
export class ChatInputTokenNode extends DecoratorNode {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
6
|
+
static getType() {
|
|
7
|
+
return 'token';
|
|
8
|
+
}
|
|
9
|
+
static clone(node) {
|
|
10
|
+
return new ChatInputTokenNode(node.__text, node.__componentProps, node.__key);
|
|
11
|
+
}
|
|
12
|
+
static importJSON(serializedNode) {
|
|
13
|
+
return $createChatInputTokenNode(serializedNode.text, serializedNode.componentProps);
|
|
14
|
+
}
|
|
15
|
+
isIsolated() {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
isInline() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
getTextContent() {
|
|
22
|
+
return this.__text;
|
|
23
|
+
}
|
|
24
|
+
exportJSON() {
|
|
25
|
+
return {
|
|
26
|
+
text: this.__text,
|
|
27
|
+
componentProps: this.__componentProps,
|
|
28
|
+
type: ChatInputTokenNode.getType(),
|
|
29
|
+
version: 1
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
createDOM() {
|
|
33
|
+
// eslint-disable-next-line no-restricted-globals
|
|
34
|
+
return document.createElement('span');
|
|
35
|
+
}
|
|
36
|
+
updateDOM() {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
decorate(_editor, config) {
|
|
40
|
+
var _this___componentProps;
|
|
41
|
+
if ((_this___componentProps = this.__componentProps) === null || _this___componentProps === void 0 ? void 0 : _this___componentProps.children) {
|
|
42
|
+
return /*#__PURE__*/React.createElement(ChatInputToken, this.__componentProps);
|
|
43
|
+
}
|
|
44
|
+
return /*#__PURE__*/React.createElement(ChatInputToken, this.__componentProps, this.__text);
|
|
45
|
+
}
|
|
46
|
+
constructor(text, componentProps, key) {
|
|
47
|
+
super(key);
|
|
48
|
+
_define_property(this, "__text", void 0);
|
|
49
|
+
_define_property(this, "__componentProps", void 0);
|
|
50
|
+
this.__text = text;
|
|
51
|
+
this.__componentProps = componentProps;
|
|
52
|
+
}
|
|
53
53
|
}
|
|
54
54
|
export function $createChatInputTokenNode(text, componentProps, key) {
|
|
55
|
-
|
|
55
|
+
return new ChatInputTokenNode(text, componentProps, key);
|
|
56
56
|
}
|
|
57
57
|
export function $isChatInputTokenNode(node) {
|
|
58
|
-
|
|
58
|
+
return node instanceof ChatInputTokenNode;
|
|
59
59
|
}
|
|
60
|
+
//# sourceMappingURL=ChatInputToken.node.js.map
|
|
@@ -3,3 +3,4 @@ export { renderChatInputToken_unstable } from './renderChatInputToken';
|
|
|
3
3
|
export { useChatInputToken_unstable } from './useChatInputToken';
|
|
4
4
|
export { chatInputTokenClassNames, useChatInputTokenStyles_unstable } from './useChatInputTokenStyles.styles';
|
|
5
5
|
export { $createChatInputTokenNode, $isChatInputTokenNode, ChatInputTokenNode } from './ChatInputToken.node';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of ChatInputToken
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
*/
|
|
6
|
+
export const renderChatInputToken_unstable = state => {
|
|
7
|
+
assertSlots(state);
|
|
8
|
+
return /*#__PURE__*/_jsx(state.root, {});
|
|
8
9
|
};
|
|
10
|
+
//# sourceMappingURL=renderChatInputToken.js.map
|
|
@@ -8,16 +8,18 @@ import { getIntrinsicElementProps, slot } from '@fluentui/react-components';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of ChatInputToken
|
|
10
10
|
* @param ref - reference to root HTMLElement of ChatInputToken
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
11
|
+
*/
|
|
12
|
+
export const useChatInputToken_unstable = (props, ref) => {
|
|
13
|
+
return {
|
|
14
|
+
components: {
|
|
15
|
+
root: 'span'
|
|
16
|
+
},
|
|
17
|
+
root: slot.always(getIntrinsicElementProps('span', {
|
|
18
|
+
ref,
|
|
19
|
+
...props
|
|
20
|
+
}), {
|
|
21
|
+
elementType: 'span'
|
|
22
|
+
})
|
|
23
|
+
};
|
|
23
24
|
};
|
|
25
|
+
//# sourceMappingURL=useChatInputToken.js.map
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
3
|
export const chatInputTokenClassNames = {
|
|
4
|
-
|
|
4
|
+
root: 'fai-ChatInputToken'
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* Styles for the root slot
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
*/
|
|
9
|
+
const useBaseClassName = makeResetStyles({
|
|
10
|
+
...typographyStyles.caption1,
|
|
11
|
+
lineHeight: `calc(${tokens.lineHeightBase200} + (2 * ${tokens.spacingVerticalXXS}) + (2 * ${tokens.strokeWidthThin}))`,
|
|
12
|
+
backgroundColor: tokens.colorNeutralBackground3,
|
|
13
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
|
|
14
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
15
|
+
boxDecorationBreak: 'clone',
|
|
16
|
+
color: tokens.colorNeutralForeground2,
|
|
17
|
+
padding: `${tokens.spacingVerticalXXS} 0`
|
|
17
18
|
});
|
|
18
19
|
/**
|
|
19
20
|
* Apply styling to the ChatInputToken slots based on the state
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
*/
|
|
22
|
+
export const useChatInputTokenStyles_unstable = state => {
|
|
23
|
+
'use no memo';
|
|
24
|
+
|
|
25
|
+
const baseClassName = useBaseClassName();
|
|
26
|
+
state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
27
|
+
return state;
|
|
25
28
|
};
|
|
29
|
+
//# sourceMappingURL=useChatInputTokenStyles.styles.raw.js.map
|
|
@@ -3,9 +3,10 @@ import { useGhostText_unstable } from './useGhostText';
|
|
|
3
3
|
import { renderGhostText_unstable } from './renderGhostText';
|
|
4
4
|
import { useGhostTextStyles_unstable } from './useGhostTextStyles.styles';
|
|
5
5
|
// GhostText component - TODO: add more docs
|
|
6
|
-
export const GhostText = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export const GhostText = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = useGhostText_unstable(props, ref);
|
|
8
|
+
useGhostTextStyles_unstable(state);
|
|
9
|
+
return renderGhostText_unstable(state);
|
|
10
10
|
});
|
|
11
11
|
GhostText.displayName = 'GhostText';
|
|
12
|
+
//# sourceMappingURL=GhostText.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State used in rendering GhostText
|
|
3
|
-
*/
|
|
4
|
-
|
|
3
|
+
*/export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from GhostTextProps.
|
|
4
|
+
// & Required<Pick<GhostTextProps, 'propName'>>
|
|
5
|
+
//# sourceMappingURL=GhostText.types.js.map
|
|
@@ -2,3 +2,4 @@ export { GhostText } from './GhostText';
|
|
|
2
2
|
export { renderGhostText_unstable } from './renderGhostText';
|
|
3
3
|
export { useGhostText_unstable } from './useGhostText';
|
|
4
4
|
export { ghostTextClassNames, useGhostTextStyles_unstable } from './useGhostTextStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of GhostText
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
});
|
|
5
|
+
*/
|
|
6
|
+
export const renderGhostText_unstable = state => {
|
|
7
|
+
assertSlots(state);
|
|
8
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
9
|
+
children: [state.root.children, state.indicator && /*#__PURE__*/_jsx(state.indicator, {})]
|
|
10
|
+
});
|
|
13
11
|
};
|
|
12
|
+
//# sourceMappingURL=renderGhostText.js.map
|