@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20250716-0405-895dbbbf.1 → 0.0.0-nightly-20250717-0405-eecbae35.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 +3 -3
- package/CHANGELOG.md +4 -4
- 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/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/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/index.js +0 -1
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js +53 -42
- 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/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/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/index.js +0 -1
- 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 +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 +5 -5
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": "Thu, 17 Jul 2025 04:13:01 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20250717-0405-eecbae35.1",
|
|
7
|
+
"version": "0.0.0-nightly-20250717-0405-eecbae35.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 Thu, 17 Jul 2025 04:13:01 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-20250717-0405-eecbae35.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20250717-0405-eecbae35.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.5.2..@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-
|
|
9
|
+
Thu, 17 Jul 2025 04:13:01 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-chat-input-plugins_v0.5.2..@fluentui-copilot/react-chat-input-plugins_v0.0.0-nightly-20250717-0405-eecbae35.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -10,43 +10,40 @@ import { $getNodeByKey, useLexicalComposerContext } from '@fluentui-copilot/reac
|
|
|
10
10
|
*
|
|
11
11
|
* @param props - props from this instance of GhostText
|
|
12
12
|
* @param ref - reference to root HTMLElement of GhostText
|
|
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
|
-
return state;
|
|
13
|
+
*/ export const useGhostText_unstable = (props, ref)=>{
|
|
14
|
+
const { nodeKey, onClick, ...rest } = props;
|
|
15
|
+
const [editor] = useLexicalComposerContext();
|
|
16
|
+
const handleClick = React.useCallback((_ev)=>{
|
|
17
|
+
if (!nodeKey) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
editor.update(()=>{
|
|
21
|
+
var _node_getPreviousSibling;
|
|
22
|
+
const node = $getNodeByKey(nodeKey);
|
|
23
|
+
node === null || node === void 0 ? void 0 : (_node_getPreviousSibling = node.getPreviousSibling()) === null || _node_getPreviousSibling === void 0 ? void 0 : _node_getPreviousSibling.selectEnd();
|
|
24
|
+
}, {
|
|
25
|
+
tag: 'historic'
|
|
26
|
+
});
|
|
27
|
+
}, [
|
|
28
|
+
editor,
|
|
29
|
+
nodeKey
|
|
30
|
+
]);
|
|
31
|
+
const mergedOnClick = mergeCallbacks(handleClick, onClick);
|
|
32
|
+
const state = {
|
|
33
|
+
components: {
|
|
34
|
+
root: 'span',
|
|
35
|
+
indicator: 'span'
|
|
36
|
+
},
|
|
37
|
+
root: slot.always(getIntrinsicElementProps('span', {
|
|
38
|
+
ref,
|
|
39
|
+
onClick: mergedOnClick,
|
|
40
|
+
...rest
|
|
41
|
+
}), {
|
|
42
|
+
elementType: 'span'
|
|
43
|
+
}),
|
|
44
|
+
indicator: slot.optional(props.indicator, {
|
|
45
|
+
elementType: 'span'
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
return state;
|
|
51
49
|
};
|
|
52
|
-
//# sourceMappingURL=useGhostText.js.map
|
package/lib/index.js
CHANGED
|
@@ -4,4 +4,3 @@ export { ChatInputToken, ChatInputTokenNode, chatInputTokenClassNames, renderCha
|
|
|
4
4
|
export { BasicFunctionalityPlugin } from './BasicFunctionality';
|
|
5
5
|
export { ImperativeControlPlugin } from './ImperativeControl';
|
|
6
6
|
export { PasteUnfurlingPlugin } from './PasteUnfurling';
|
|
7
|
-
//# sourceMappingURL=index.js.map
|