@fluentui-copilot/react-chat-input-plugins 0.4.6 → 0.4.8-hotfix.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 +53 -0
- package/CHANGELOG.md +28 -1
- package/lib/BasicFunctionality.js +0 -1
- package/lib/ChatInputEntity.js +0 -1
- package/lib/ChatInputToken.js +0 -1
- package/lib/GhostText.js +0 -1
- package/lib/ImperativeControl.js +0 -1
- package/lib/PasteUnfurling.js +0 -1
- package/lib/components/ChatInputEntity/ChatInputEntity.js +4 -5
- package/lib/components/ChatInputEntity/ChatInputEntity.types.js +2 -3
- package/lib/components/ChatInputEntity/index.js +0 -1
- package/lib/components/ChatInputEntity/renderChatInputEntity.js +9 -8
- package/lib/components/ChatInputEntity/useChatInputEntity.js +40 -44
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js +43 -0
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +1 -0
- package/lib/components/ChatInputToken/ChatInputToken.js +4 -5
- package/lib/components/ChatInputToken/ChatInputToken.node.js +49 -50
- package/lib/components/ChatInputToken/ChatInputToken.types.js +1 -2
- package/lib/components/ChatInputToken/index.js +0 -1
- package/lib/components/ChatInputToken/renderChatInputToken.js +4 -6
- package/lib/components/ChatInputToken/useChatInputToken.js +12 -14
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js +25 -0
- package/lib/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +1 -0
- package/lib/components/GhostText/GhostText.js +4 -5
- package/lib/components/GhostText/GhostText.types.js +2 -3
- package/lib/components/GhostText/index.js +0 -1
- package/lib/components/GhostText/renderGhostText.js +9 -8
- package/lib/components/GhostText/useGhostText.js +36 -39
- package/lib/components/GhostText/useGhostTextStyles.styles.raw.js +35 -0
- package/lib/components/GhostText/useGhostTextStyles.styles.raw.js.map +1 -0
- package/lib/index.js +0 -1
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js +65 -50
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -1
- package/lib/plugins/BasicFunctionality/index.js +0 -1
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +67 -68
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js +37 -38
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +1 -2
- package/lib/plugins/ChatInputEntity/index.js +0 -1
- package/lib/plugins/GhostText/GhostText.js +43 -37
- package/lib/plugins/GhostText/GhostText.node.js +56 -57
- package/lib/plugins/GhostText/index.js +0 -1
- package/lib/plugins/ImperativeControl/ImperativeControl.js +6 -5
- package/lib/plugins/ImperativeControl/index.js +0 -1
- package/lib/plugins/ManualGhostText/ManualGhostText.js +8 -8
- package/lib/plugins/ManualGhostText/index.js +0 -1
- package/lib/plugins/PasteUnfurling/PasteUnfurling.js +14 -14
- package/lib/plugins/PasteUnfurling/index.js +0 -1
- package/lib-commonjs/BasicFunctionality.js +0 -1
- package/lib-commonjs/ChatInputEntity.js +0 -1
- package/lib-commonjs/ChatInputToken.js +0 -1
- package/lib-commonjs/GhostText.js +0 -1
- package/lib-commonjs/ImperativeControl.js +0 -1
- package/lib-commonjs/PasteUnfurling.js +0 -1
- 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 +0 -1
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -1
- package/lib-commonjs/components/ChatInputEntity/index.js +0 -1
- 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 +59 -0
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/ChatInputToken/index.js +0 -1
- 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 +41 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/GhostText/GhostText.types.js.map +1 -1
- package/lib-commonjs/components/GhostText/index.js +0 -1
- 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 +51 -0
- package/lib-commonjs/components/GhostText/useGhostTextStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/index.js +0 -1
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js +7 -4
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -1
- package/lib-commonjs/plugins/BasicFunctionality/index.js +0 -1
- 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 +0 -1
- package/lib-commonjs/plugins/ChatInputEntity/index.js +0 -1
- package/lib-commonjs/plugins/GhostText/GhostText.js +2 -3
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- 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 +0 -1
- package/package.json +9 -13
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-chat-input-plugins",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Wed, 06 Aug 2025 16:01:28 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.4.8-hotfix.1",
|
|
7
|
+
"version": "0.4.8-hotfix.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "hochelmartin@gmail.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
13
|
+
"commit": "cb43a5bd5258c678c965fddff7e7d5a95f9d0396",
|
|
14
|
+
"comment": "release: prepare hotfix 0.25.3-hotfix.1"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 30 Apr 2025 01:47:48 GMT",
|
|
21
|
+
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.4.8",
|
|
22
|
+
"version": "0.4.8",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "owcampbe@microsoft.com",
|
|
27
|
+
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
28
|
+
"commit": "5a9efb11481fbe2c9bd25c8825ec4a9b991050ab",
|
|
29
|
+
"comment": "chore: Bump @fluentui/react-components to 9.58.3."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"none": [
|
|
33
|
+
{
|
|
34
|
+
"author": "tristan.watanabe@gmail.com",
|
|
35
|
+
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
36
|
+
"commit": "1391e0a7243d050db30fcc27547fd3e91df0162c",
|
|
37
|
+
"comment": "chore: update tsconfig to remove allowSyntheticDefaultImports to enforce named imports."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"date": "Sat, 19 Apr 2025 00:05:39 GMT",
|
|
44
|
+
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.4.7",
|
|
45
|
+
"version": "0.4.7",
|
|
46
|
+
"comments": {
|
|
47
|
+
"patch": [
|
|
48
|
+
{
|
|
49
|
+
"author": "owcampbe@microsoft.com",
|
|
50
|
+
"package": "@fluentui-copilot/react-chat-input-plugins",
|
|
51
|
+
"commit": "1fd4ac524a1008675be8ae19574f36f6f2a95013",
|
|
52
|
+
"comment": "fix: Fix inserting defaultValue."
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
4
57
|
{
|
|
5
58
|
"date": "Thu, 20 Mar 2025 17:00:44 GMT",
|
|
6
59
|
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.4.3",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,36 @@
|
|
|
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 Wed, 06 Aug 2025 16:01:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.4.8-hotfix.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.4.8-hotfix.1)
|
|
8
|
+
|
|
9
|
+
Wed, 06 Aug 2025 16:01:28 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.4.8..@fluentui-copilot/react-chat-input-plugins_v0.4.8-hotfix.1)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- release: prepare hotfix 0.25.3-hotfix.1 ([PR #3280](https://github.com/microsoft/fluentai/pull/3280) by hochelmartin@gmail.com)
|
|
15
|
+
|
|
16
|
+
## [0.4.8](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.4.8)
|
|
17
|
+
|
|
18
|
+
Wed, 30 Apr 2025 01:47:48 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.4.7..@fluentui-copilot/react-chat-input-plugins_v0.4.8)
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- chore: Bump @fluentui/react-components to 9.58.3. ([PR #2963](https://github.com/microsoft/fluentai/pull/2963) by owcampbe@microsoft.com)
|
|
24
|
+
|
|
25
|
+
## [0.4.7](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.4.7)
|
|
26
|
+
|
|
27
|
+
Sat, 19 Apr 2025 00:05:39 GMT
|
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.4.3..@fluentui-copilot/react-chat-input-plugins_v0.4.7)
|
|
29
|
+
|
|
30
|
+
### Patches
|
|
31
|
+
|
|
32
|
+
- fix: Fix inserting defaultValue. ([PR #2847](https://github.com/microsoft/fluentai/pull/2847) by owcampbe@microsoft.com)
|
|
33
|
+
|
|
7
34
|
## [0.4.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.4.3)
|
|
8
35
|
|
|
9
36
|
Thu, 20 Mar 2025 17:00:44 GMT
|
package/lib/ChatInputEntity.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
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,2 +1 @@
|
|
|
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,4 +1,3 @@
|
|
|
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,10 +3,9 @@ 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__*/React.forwardRef((props, ref)
|
|
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,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State used in rendering ChatInputEntity
|
|
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
|
|
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'>>
|
|
@@ -2,4 +2,3 @@ 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,12 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
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
|
-
|
|
5
|
+
*/ export const renderChatInputEntity_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsxs(state.root, {
|
|
8
|
+
children: [
|
|
9
|
+
state.text && /*#__PURE__*/ _jsx(state.text, {}),
|
|
10
|
+
state.sensitivity && /*#__PURE__*/ _jsx(state.sensitivity, {})
|
|
11
|
+
]
|
|
12
|
+
});
|
|
11
13
|
};
|
|
12
|
-
//# sourceMappingURL=renderChatInputEntity.js.map
|
|
@@ -8,48 +8,44 @@ 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
|
-
|
|
51
|
-
elementType
|
|
52
|
-
})
|
|
53
|
-
};
|
|
11
|
+
*/ export const useChatInputEntity_unstable = (props, ref)=>{
|
|
12
|
+
const { as } = props;
|
|
13
|
+
const elementType = as !== null && as !== void 0 ? as : 'span';
|
|
14
|
+
const nativeProps = getPartitionedNativeProps({
|
|
15
|
+
props,
|
|
16
|
+
primarySlotTagName: elementType
|
|
17
|
+
});
|
|
18
|
+
const defaultTextSlotProps = elementType === 'a' ? {
|
|
19
|
+
target: '_blank',
|
|
20
|
+
rel: 'noopener',
|
|
21
|
+
// We don't want to enable tab focus for components inside the ChatInput
|
|
22
|
+
tabIndex: -1,
|
|
23
|
+
...nativeProps.primary,
|
|
24
|
+
as: 'a',
|
|
25
|
+
// This cast is safe to do at this point because we know the type of element we are rendering is an anchor
|
|
26
|
+
ref: ref
|
|
27
|
+
} : {
|
|
28
|
+
...nativeProps.primary,
|
|
29
|
+
as: 'span',
|
|
30
|
+
ref
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
components: {
|
|
34
|
+
root: 'span',
|
|
35
|
+
sensitivity: 'span',
|
|
36
|
+
text: elementType
|
|
37
|
+
},
|
|
38
|
+
root: slot.always(props.root, {
|
|
39
|
+
defaultProps: nativeProps.root,
|
|
40
|
+
elementType: 'span'
|
|
41
|
+
}),
|
|
42
|
+
sensitivity: slot.optional(props.sensitivity, {
|
|
43
|
+
elementType: 'span'
|
|
44
|
+
}),
|
|
45
|
+
text: slot.optional(props.text, {
|
|
46
|
+
defaultProps: defaultTextSlotProps,
|
|
47
|
+
renderByDefault: true,
|
|
48
|
+
elementType
|
|
49
|
+
})
|
|
50
|
+
};
|
|
54
51
|
};
|
|
55
|
-
//# sourceMappingURL=useChatInputEntity.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const chatInputEntityClassNames = {
|
|
4
|
+
root: 'fai-ChatInputEntity',
|
|
5
|
+
sensitivity: 'fai-ChatInputEntity__sensitivity',
|
|
6
|
+
text: 'fai-ChatInputEntity__text'
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Styles for the root slot
|
|
10
|
+
*/ const useStyles = makeStyles({
|
|
11
|
+
root: {},
|
|
12
|
+
text: {
|
|
13
|
+
color: tokens.colorBrandForeground1
|
|
14
|
+
},
|
|
15
|
+
href: {
|
|
16
|
+
color: tokens.colorBrandForegroundLink,
|
|
17
|
+
':hover': {
|
|
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
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Apply styling to the ChatInputEntity slots based on the state
|
|
32
|
+
*/ export const useChatInputEntityStyles_unstable = (state)=>{
|
|
33
|
+
'use no memo';
|
|
34
|
+
const styles = useStyles();
|
|
35
|
+
state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);
|
|
36
|
+
if (state.text) {
|
|
37
|
+
state.text.className = mergeClasses(chatInputEntityClassNames.text, styles.text, state.text.as === 'a' && styles.href, state.text.className);
|
|
38
|
+
}
|
|
39
|
+
if (state.sensitivity) {
|
|
40
|
+
state.sensitivity.className = mergeClasses(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);
|
|
41
|
+
}
|
|
42
|
+
return state;
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChatInputEntityStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\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,QAAQ,6BAA6B;AACtE,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,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"}
|
|
@@ -3,10 +3,9 @@ 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__*/React.forwardRef((props, ref)
|
|
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,58 +3,57 @@ 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,4 +3,3 @@ 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,10 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
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
|
-
|
|
8
|
-
return /*#__PURE__*/_jsx(state.root, {});
|
|
5
|
+
*/ export const renderChatInputToken_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsx(state.root, {});
|
|
9
8
|
};
|
|
10
|
-
//# sourceMappingURL=renderChatInputToken.js.map
|
|
@@ -8,18 +8,16 @@ 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
|
-
}
|
|
23
|
-
};
|
|
11
|
+
*/ export const useChatInputToken_unstable = (props, ref)=>{
|
|
12
|
+
return {
|
|
13
|
+
components: {
|
|
14
|
+
root: 'span'
|
|
15
|
+
},
|
|
16
|
+
root: slot.always(getIntrinsicElementProps('span', {
|
|
17
|
+
ref,
|
|
18
|
+
...props
|
|
19
|
+
}), {
|
|
20
|
+
elementType: 'span'
|
|
21
|
+
})
|
|
22
|
+
};
|
|
24
23
|
};
|
|
25
|
-
//# sourceMappingURL=useChatInputToken.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const chatInputTokenClassNames = {
|
|
4
|
+
root: 'fai-ChatInputToken'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Styles for the root slot
|
|
8
|
+
*/ const useBaseClassName = makeResetStyles({
|
|
9
|
+
...typographyStyles.caption1,
|
|
10
|
+
lineHeight: `calc(${tokens.lineHeightBase200} + (2 * ${tokens.spacingVerticalXXS}) + (2 * ${tokens.strokeWidthThin}))`,
|
|
11
|
+
backgroundColor: tokens.colorNeutralBackground3,
|
|
12
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
|
|
13
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
14
|
+
boxDecorationBreak: 'clone',
|
|
15
|
+
color: tokens.colorNeutralForeground2,
|
|
16
|
+
padding: `${tokens.spacingVerticalXXS} 0`
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Apply styling to the ChatInputToken slots based on the state
|
|
20
|
+
*/ export const useChatInputTokenStyles_unstable = (state)=>{
|
|
21
|
+
'use no memo';
|
|
22
|
+
const baseClassName = useBaseClassName();
|
|
23
|
+
state.root.className = mergeClasses(chatInputTokenClassNames.root, baseClassName, state.root.className);
|
|
24
|
+
return state;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChatInputTokenStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { ChatInputTokenSlots, ChatInputTokenState } from './ChatInputToken.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const chatInputTokenClassNames: SlotClassNames<ChatInputTokenSlots> = {\n root: 'fai-ChatInputToken',\n};\n\n/**\n * Styles for the root slot\n */\nconst useBaseClassName = makeResetStyles({\n ...typographyStyles.caption1,\n lineHeight: `calc(${tokens.lineHeightBase200} + (2 * ${tokens.spacingVerticalXXS}) + (2 * ${tokens.strokeWidthThin}))`,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n borderRadius: tokens.borderRadiusMedium,\n boxDecorationBreak: 'clone',\n color: tokens.colorNeutralForeground2,\n 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","typographyStyles","tokens","chatInputTokenClassNames","root","useBaseClassName","caption1","lineHeight","lineHeightBase200","spacingVerticalXXS","strokeWidthThin","backgroundColor","colorNeutralBackground3","border","colorTransparentStroke","borderRadius","borderRadiusMedium","boxDecorationBreak","color","colorNeutralForeground2","padding","useChatInputTokenStyles_unstable","state","baseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,6BAA6B;AAC7F,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,mBAAmBN,gBAAgB;IACvC,GAAGE,iBAAiBK,QAAQ;IAC5BC,YAAY,CAAC,KAAK,EAAEL,OAAOM,iBAAiB,CAAC,QAAQ,EAAEN,OAAOO,kBAAkB,CAAC,SAAS,EAAEP,OAAOQ,eAAe,CAAC,EAAE,CAAC;IACtHC,iBAAiBT,OAAOU,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEX,OAAOQ,eAAe,CAAC,OAAO,EAAER,OAAOY,sBAAsB,CAAC,CAAC;IAC1EC,cAAcb,OAAOc,kBAAkB;IACvCC,oBAAoB;IACpBC,OAAOhB,OAAOiB,uBAAuB;IACrCC,SAAS,CAAC,EAAElB,OAAOO,kBAAkB,CAAC,EAAE,CAAC;AAC3C;AAEA;;CAEC,GACD,OAAO,MAAMY,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,gBAAgBlB;IACtBiB,MAAMlB,IAAI,CAACoB,SAAS,GAAGxB,aAAaG,yBAAyBC,IAAI,EAAEmB,eAAeD,MAAMlB,IAAI,CAACoB,SAAS;IAEtG,OAAOF;AACT,EAAE"}
|
|
@@ -3,10 +3,9 @@ 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__*/React.forwardRef((props, ref)
|
|
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,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State used in rendering GhostText
|
|
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
|
|
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'>>
|
|
@@ -2,4 +2,3 @@ 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,12 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
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
|
-
|
|
5
|
+
*/ export const renderGhostText_unstable = (state)=>{
|
|
6
|
+
assertSlots(state);
|
|
7
|
+
return /*#__PURE__*/ _jsxs(state.root, {
|
|
8
|
+
children: [
|
|
9
|
+
state.root.children,
|
|
10
|
+
state.indicator && /*#__PURE__*/ _jsx(state.indicator, {})
|
|
11
|
+
]
|
|
12
|
+
});
|
|
11
13
|
};
|
|
12
|
-
//# sourceMappingURL=renderGhostText.js.map
|