@fluentui-copilot/react-chat-input-plugins 0.0.0-nightly-20240410-0405-8d7a6b79.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 +38 -0
- package/CHANGELOG.md +16 -0
- package/LICENSE +23 -0
- package/README.md +5 -0
- package/dist/index.d.ts +295 -0
- package/lib/BasicFunctionality.js +2 -0
- package/lib/BasicFunctionality.js.map +1 -0
- package/lib/ChatInputEntity.js +3 -0
- package/lib/ChatInputEntity.js.map +1 -0
- package/lib/ChatInputToken.js +2 -0
- package/lib/ChatInputToken.js.map +1 -0
- package/lib/GhostText.js +4 -0
- package/lib/GhostText.js.map +1 -0
- package/lib/ImperativeControl.js +2 -0
- package/lib/ImperativeControl.js.map +1 -0
- package/lib/components/ChatInputEntity/ChatInputEntity.js +12 -0
- package/lib/components/ChatInputEntity/ChatInputEntity.js.map +1 -0
- package/lib/components/ChatInputEntity/ChatInputEntity.types.js +3 -0
- package/lib/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -0
- package/lib/components/ChatInputEntity/index.js +6 -0
- package/lib/components/ChatInputEntity/index.js.map +1 -0
- package/lib/components/ChatInputEntity/renderChatInputEntity.js +12 -0
- package/lib/components/ChatInputEntity/renderChatInputEntity.js.map +1 -0
- package/lib/components/ChatInputEntity/useChatInputEntity.js +55 -0
- package/lib/components/ChatInputEntity/useChatInputEntity.js.map +1 -0
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.js +44 -0
- package/lib/components/ChatInputEntity/useChatInputEntityStyles.js.map +1 -0
- package/lib/components/ChatInputToken/ChatInputToken.js +12 -0
- package/lib/components/ChatInputToken/ChatInputToken.js.map +1 -0
- package/lib/components/ChatInputToken/ChatInputToken.node.js +60 -0
- package/lib/components/ChatInputToken/ChatInputToken.node.js.map +1 -0
- package/lib/components/ChatInputToken/ChatInputToken.types.js +2 -0
- package/lib/components/ChatInputToken/ChatInputToken.types.js.map +1 -0
- package/lib/components/ChatInputToken/index.js +7 -0
- package/lib/components/ChatInputToken/index.js.map +1 -0
- package/lib/components/ChatInputToken/renderChatInputToken.js +10 -0
- package/lib/components/ChatInputToken/renderChatInputToken.js.map +1 -0
- package/lib/components/ChatInputToken/useChatInputToken.js +25 -0
- package/lib/components/ChatInputToken/useChatInputToken.js.map +1 -0
- package/lib/components/ChatInputToken/useChatInputTokenStyles.js +17 -0
- package/lib/components/ChatInputToken/useChatInputTokenStyles.js.map +1 -0
- package/lib/components/GhostText/GhostText.js +12 -0
- package/lib/components/GhostText/GhostText.js.map +1 -0
- package/lib/components/GhostText/GhostText.types.js +3 -0
- package/lib/components/GhostText/GhostText.types.js.map +1 -0
- package/lib/components/GhostText/index.js +6 -0
- package/lib/components/GhostText/index.js.map +1 -0
- package/lib/components/GhostText/renderGhostText.js +12 -0
- package/lib/components/GhostText/renderGhostText.js.map +1 -0
- package/lib/components/GhostText/useGhostText.js +29 -0
- package/lib/components/GhostText/useGhostText.js.map +1 -0
- package/lib/components/GhostText/useGhostTextStyles.js +48 -0
- package/lib/components/GhostText/useGhostTextStyles.js.map +1 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -0
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js +54 -0
- package/lib/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -0
- package/lib/plugins/BasicFunctionality/index.js +2 -0
- package/lib/plugins/BasicFunctionality/index.js.map +1 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js +79 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js +42 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +2 -0
- package/lib/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +1 -0
- package/lib/plugins/ChatInputEntity/index.js +4 -0
- package/lib/plugins/ChatInputEntity/index.js.map +1 -0
- package/lib/plugins/GhostText/GhostText.js +44 -0
- package/lib/plugins/GhostText/GhostText.js.map +1 -0
- package/lib/plugins/GhostText/GhostText.node.js +61 -0
- package/lib/plugins/GhostText/GhostText.node.js.map +1 -0
- package/lib/plugins/GhostText/index.js +3 -0
- package/lib/plugins/GhostText/index.js.map +1 -0
- package/lib/plugins/ImperativeControl/ImperativeControl.js +9 -0
- package/lib/plugins/ImperativeControl/ImperativeControl.js.map +1 -0
- package/lib/plugins/ImperativeControl/index.js +2 -0
- package/lib/plugins/ImperativeControl/index.js.map +1 -0
- package/lib/plugins/ManualGhostText/ManualGhostText.js +14 -0
- package/lib/plugins/ManualGhostText/ManualGhostText.js.map +1 -0
- package/lib/plugins/ManualGhostText/index.js +2 -0
- package/lib/plugins/ManualGhostText/index.js.map +1 -0
- package/lib-commonjs/BasicFunctionality.js +7 -0
- package/lib-commonjs/BasicFunctionality.js.map +1 -0
- package/lib-commonjs/ChatInputEntity.js +8 -0
- package/lib-commonjs/ChatInputEntity.js.map +1 -0
- package/lib-commonjs/ChatInputToken.js +7 -0
- package/lib-commonjs/ChatInputToken.js.map +1 -0
- package/lib-commonjs/GhostText.js +9 -0
- package/lib-commonjs/GhostText.js.map +1 -0
- package/lib-commonjs/ImperativeControl.js +7 -0
- package/lib-commonjs/ImperativeControl.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js +21 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js +7 -0
- package/lib-commonjs/components/ChatInputEntity/ChatInputEntity.types.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/index.js +11 -0
- package/lib-commonjs/components/ChatInputEntity/index.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js +21 -0
- package/lib-commonjs/components/ChatInputEntity/renderChatInputEntity.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js +52 -0
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntity.js.map +1 -0
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.js +71 -0
- package/lib-commonjs/components/ChatInputEntity/useChatInputEntityStyles.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js +21 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js +81 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.node.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js +5 -0
- package/lib-commonjs/components/ChatInputToken/ChatInputToken.types.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/index.js +12 -0
- package/lib-commonjs/components/ChatInputToken/index.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js +16 -0
- package/lib-commonjs/components/ChatInputToken/renderChatInputToken.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputToken.js +24 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputToken.js.map +1 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.js +34 -0
- package/lib-commonjs/components/ChatInputToken/useChatInputTokenStyles.js.map +1 -0
- package/lib-commonjs/components/GhostText/GhostText.js +21 -0
- package/lib-commonjs/components/GhostText/GhostText.js.map +1 -0
- package/lib-commonjs/components/GhostText/GhostText.types.js +7 -0
- package/lib-commonjs/components/GhostText/GhostText.types.js.map +1 -0
- package/lib-commonjs/components/GhostText/index.js +11 -0
- package/lib-commonjs/components/GhostText/index.js.map +1 -0
- package/lib-commonjs/components/GhostText/renderGhostText.js +21 -0
- package/lib-commonjs/components/GhostText/renderGhostText.js.map +1 -0
- package/lib-commonjs/components/GhostText/useGhostText.js +28 -0
- package/lib-commonjs/components/GhostText/useGhostText.js.map +1 -0
- package/lib-commonjs/components/GhostText/useGhostTextStyles.js +103 -0
- package/lib-commonjs/components/GhostText/useGhostTextStyles.js.map +1 -0
- package/lib-commonjs/index.js +102 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js +70 -0
- package/lib-commonjs/plugins/BasicFunctionality/BasicFunctionality.js.map +1 -0
- package/lib-commonjs/plugins/BasicFunctionality/index.js +7 -0
- package/lib-commonjs/plugins/BasicFunctionality/index.js.map +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js +100 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntity.node.js.map +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js +52 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.js.map +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js +5 -0
- package/lib-commonjs/plugins/ChatInputEntity/ChatInputEntityPlugin.types.js.map +1 -0
- package/lib-commonjs/plugins/ChatInputEntity/index.js +9 -0
- package/lib-commonjs/plugins/ChatInputEntity/index.js.map +1 -0
- package/lib-commonjs/plugins/GhostText/GhostText.js +58 -0
- package/lib-commonjs/plugins/GhostText/GhostText.js.map +1 -0
- package/lib-commonjs/plugins/GhostText/GhostText.node.js +82 -0
- package/lib-commonjs/plugins/GhostText/GhostText.node.js.map +1 -0
- package/lib-commonjs/plugins/GhostText/index.js +8 -0
- package/lib-commonjs/plugins/GhostText/index.js.map +1 -0
- package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js +21 -0
- package/lib-commonjs/plugins/ImperativeControl/ImperativeControl.js.map +1 -0
- package/lib-commonjs/plugins/ImperativeControl/index.js +7 -0
- package/lib-commonjs/plugins/ImperativeControl/index.js.map +1 -0
- package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js +25 -0
- package/lib-commonjs/plugins/ManualGhostText/ManualGhostText.js.map +1 -0
- package/lib-commonjs/plugins/ManualGhostText/index.js +7 -0
- package/lib-commonjs/plugins/ManualGhostText/index.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
|
|
3
|
+
import { $createGhostTextNode } from '../../GhostText';
|
|
4
|
+
import { GhostTextNode } from './GhostText.node';
|
|
5
|
+
import { GhostTextPluginBase } from '@fluentui-copilot/chat-input-plugins';
|
|
6
|
+
export function GhostTextPlugin(props) {
|
|
7
|
+
const {
|
|
8
|
+
$getGhostText,
|
|
9
|
+
id,
|
|
10
|
+
ghostTextProps,
|
|
11
|
+
exposeText,
|
|
12
|
+
allowCompletion
|
|
13
|
+
} = props;
|
|
14
|
+
const [editor] = useLexicalComposerContext();
|
|
15
|
+
const ghostTextBase = React.useRef(null);
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
ghostTextBase.current = new GhostTextPluginBase(editor, id, $getGhostText, GhostTextNode, $createGhostTextNode, ghostTextProps, exposeText, allowCompletion);
|
|
18
|
+
return () => {
|
|
19
|
+
var _ghostTextBase_current;
|
|
20
|
+
(_ghostTextBase_current = ghostTextBase.current) === null || _ghostTextBase_current === void 0 ? void 0 : _ghostTextBase_current.cleanup();
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
// We can update $getGhostText, $createGhostTextNode, ghostTextProps, exposeText, and allowCompletion without remounting
|
|
24
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
|
+
[editor, id]);
|
|
26
|
+
React.useEffect(() => {
|
|
27
|
+
var _ghostTextBase_current;
|
|
28
|
+
(_ghostTextBase_current = ghostTextBase.current) === null || _ghostTextBase_current === void 0 ? void 0 : _ghostTextBase_current.setAllowCompletion(allowCompletion);
|
|
29
|
+
}, [allowCompletion]);
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
var _ghostTextBase_current;
|
|
32
|
+
(_ghostTextBase_current = ghostTextBase.current) === null || _ghostTextBase_current === void 0 ? void 0 : _ghostTextBase_current.setComponentProps(ghostTextProps);
|
|
33
|
+
}, [ghostTextProps]);
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
var _ghostTextBase_current;
|
|
36
|
+
(_ghostTextBase_current = ghostTextBase.current) === null || _ghostTextBase_current === void 0 ? void 0 : _ghostTextBase_current.setExposeText(exposeText);
|
|
37
|
+
}, [exposeText]);
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
var _ghostTextBase_current;
|
|
40
|
+
(_ghostTextBase_current = ghostTextBase.current) === null || _ghostTextBase_current === void 0 ? void 0 : _ghostTextBase_current.setGetGhostText($getGhostText);
|
|
41
|
+
}, [$getGhostText]);
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=GhostText.js.map
|
|
@@ -0,0 +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"],"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,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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { DecoratorNode } from '@fluentui-copilot/text-editor';
|
|
4
|
+
import { GhostText } from '../../components/GhostText/GhostText';
|
|
5
|
+
export class GhostTextNode extends DecoratorNode {
|
|
6
|
+
static clone(node) {
|
|
7
|
+
return new GhostTextNode(node.__id, node.__content, node.__exposeText, node.__componentProps, node.__key);
|
|
8
|
+
}
|
|
9
|
+
static getType() {
|
|
10
|
+
return 'ghosttext';
|
|
11
|
+
}
|
|
12
|
+
static importJSON(serializedNode) {
|
|
13
|
+
const node = $createGhostTextNode(serializedNode.id, serializedNode.content, serializedNode.exposeText, serializedNode.componentProps);
|
|
14
|
+
return node;
|
|
15
|
+
}
|
|
16
|
+
exportJSON() {
|
|
17
|
+
return {
|
|
18
|
+
...super.exportJSON(),
|
|
19
|
+
type: 'ghosttext',
|
|
20
|
+
id: this.__id,
|
|
21
|
+
content: this.__content,
|
|
22
|
+
componentProps: this.__componentProps,
|
|
23
|
+
exposeText: this.__exposeText,
|
|
24
|
+
version: 1
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
isInline() {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
getTextContent() {
|
|
31
|
+
return this.__exposeText ? this.__content : '';
|
|
32
|
+
}
|
|
33
|
+
updateDOM(prevNode, dom, config) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
createDOM(config) {
|
|
37
|
+
return document.createElement('span');
|
|
38
|
+
}
|
|
39
|
+
decorate() {
|
|
40
|
+
return /*#__PURE__*/React.createElement(GhostText, this.__componentProps, this.__content);
|
|
41
|
+
}
|
|
42
|
+
constructor(id, content, exposeText, componentProps, key) {
|
|
43
|
+
super(key);
|
|
44
|
+
_define_property(this, "__content", void 0);
|
|
45
|
+
_define_property(this, "__id", void 0);
|
|
46
|
+
_define_property(this, "__allowCommitting", void 0);
|
|
47
|
+
_define_property(this, "__componentProps", void 0);
|
|
48
|
+
_define_property(this, "__exposeText", void 0);
|
|
49
|
+
this.__id = id;
|
|
50
|
+
this.__content = content;
|
|
51
|
+
this.__exposeText = exposeText;
|
|
52
|
+
this.__componentProps = componentProps;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function $createGhostTextNode(id, content, exposeText, componentProps) {
|
|
56
|
+
return new GhostTextNode(id, content, exposeText, componentProps);
|
|
57
|
+
}
|
|
58
|
+
export function $isGhostTextNode(node) {
|
|
59
|
+
return node instanceof GhostTextNode;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=GhostText.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["GhostText.node.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport type { EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from '@fluentui-copilot/text-editor';\nimport type { GhostTextProps } from '../../components/GhostText/GhostText.types';\nimport { GhostText } from '../../components/GhostText/GhostText';\n\nexport type SerializedGhostTextNode = Spread<\n {\n content: string;\n id: string;\n componentProps?: GhostTextProps;\n exposeText?: boolean;\n },\n SerializedLexicalNode\n>;\n\nexport class GhostTextNode extends DecoratorNode<JSX.Element | null> {\n __content: string;\n __id: string;\n __allowCommitting?: boolean;\n __componentProps?: GhostTextProps;\n __exposeText?: boolean;\n\n static clone(node: GhostTextNode): GhostTextNode {\n return new GhostTextNode(node.__id, node.__content, node.__exposeText, node.__componentProps, node.__key);\n }\n\n static getType(): 'ghosttext' {\n return 'ghosttext';\n }\n\n static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode {\n const node = $createGhostTextNode(\n serializedNode.id,\n serializedNode.content,\n serializedNode.exposeText,\n serializedNode.componentProps,\n );\n return node;\n }\n\n exportJSON(): SerializedGhostTextNode {\n return {\n ...super.exportJSON(),\n type: 'ghosttext',\n id: this.__id,\n content: this.__content,\n componentProps: this.__componentProps,\n exposeText: this.__exposeText,\n version: 1,\n };\n }\n\n constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey) {\n super(key);\n this.__id = id;\n this.__content = content;\n this.__exposeText = exposeText;\n this.__componentProps = componentProps;\n }\n\n isInline() {\n return true;\n }\n\n getTextContent(): string {\n return this.__exposeText ? this.__content : '';\n }\n\n updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean {\n return false;\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n return document.createElement('span');\n }\n\n decorate(): JSX.Element | null {\n return <GhostText {...this.__componentProps}>{this.__content}</GhostText>;\n }\n}\n\nexport function $createGhostTextNode(\n id: string,\n content: string,\n exposeText?: boolean,\n componentProps?: GhostTextProps,\n): GhostTextNode {\n return new GhostTextNode(id, content, exposeText, componentProps);\n}\n\nexport function $isGhostTextNode(node: LexicalNode | null | undefined): node is GhostTextNode {\n return node instanceof GhostTextNode;\n}\n"],"names":["React","DecoratorNode","GhostText","GhostTextNode","clone","node","__id","__content","__exposeText","__componentProps","__key","getType","importJSON","serializedNode","$createGhostTextNode","id","content","exposeText","componentProps","exportJSON","type","version","isInline","getTextContent","updateDOM","prevNode","dom","config","createDOM","document","createElement","decorate","constructor","key","__allowCommitting","$isGhostTextNode"],"mappings":";AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,aAAa,QAAQ,gCAAgC;AAG9D,SAASC,SAAS,QAAQ,uCAAuC;AAYjE,OAAO,MAAMC,sBAAsBF;IAOjC,OAAOG,MAAMC,IAAmB,EAAiB;QAC/C,OAAO,IAAIF,cAAcE,KAAKC,IAAI,EAAED,KAAKE,SAAS,EAAEF,KAAKG,YAAY,EAAEH,KAAKI,gBAAgB,EAAEJ,KAAKK,KAAK;IAC1G;IAEA,OAAOC,UAAuB;QAC5B,OAAO;IACT;IAEA,OAAOC,WAAWC,cAAuC,EAAiB;QACxE,MAAMR,OAAOS,qBACXD,eAAeE,EAAE,EACjBF,eAAeG,OAAO,EACtBH,eAAeI,UAAU,EACzBJ,eAAeK,cAAc;QAE/B,OAAOb;IACT;IAEAc,aAAsC;QACpC,OAAO;YACL,GAAG,KAAK,CAACA,YAAY;YACrBC,MAAM;YACNL,IAAI,IAAI,CAACT,IAAI;YACbU,SAAS,IAAI,CAACT,SAAS;YACvBW,gBAAgB,IAAI,CAACT,gBAAgB;YACrCQ,YAAY,IAAI,CAACT,YAAY;YAC7Ba,SAAS;QACX;IACF;IAUAC,WAAW;QACT,OAAO;IACT;IAEAC,iBAAyB;QACvB,OAAO,IAAI,CAACf,YAAY,GAAG,IAAI,CAACD,SAAS,GAAG;IAC9C;IAEAiB,UAAUC,QAAiB,EAAEC,GAAgB,EAAEC,MAAoB,EAAW;QAC5E,OAAO;IACT;IAEAC,UAAUD,MAAoB,EAAe;QAC3C,OAAOE,SAASC,aAAa,CAAC;IAChC;IAEAC,WAA+B;QAC7B,qBAAO,oBAAC7B,WAAc,IAAI,CAACO,gBAAgB,EAAG,IAAI,CAACF,SAAS;IAC9D;IA1BAyB,YAAYjB,EAAU,EAAEC,OAAe,EAAEC,UAAoB,EAAEC,cAA+B,EAAEe,GAAa,CAAE;QAC7G,KAAK,CAACA;QArCR1B,uBAAAA,aAAAA,KAAAA;QACAD,uBAAAA,QAAAA,KAAAA;QACA4B,uBAAAA,qBAAAA,KAAAA;QACAzB,uBAAAA,oBAAAA,KAAAA;QACAD,uBAAAA,gBAAAA,KAAAA;QAkCE,IAAI,CAACF,IAAI,GAAGS;QACZ,IAAI,CAACR,SAAS,GAAGS;QACjB,IAAI,CAACR,YAAY,GAAGS;QACpB,IAAI,CAACR,gBAAgB,GAAGS;IAC1B;AAqBF;AAEA,OAAO,SAASJ,qBACdC,EAAU,EACVC,OAAe,EACfC,UAAoB,EACpBC,cAA+B;IAE/B,OAAO,IAAIf,cAAcY,IAAIC,SAASC,YAAYC;AACpD;AAEA,OAAO,SAASiB,iBAAiB9B,IAAoC;IACnE,OAAOA,gBAAgBF;AACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './GhostText';\nexport * from './GhostText.node';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,mBAAmB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';
|
|
3
|
+
import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
|
|
4
|
+
export const ImperativeControlPlugin = /*#__PURE__*/React.forwardRef((_props, ref) => {
|
|
5
|
+
const [editor] = useLexicalComposerContext();
|
|
6
|
+
React.useImperativeHandle(ref, () => new ImperativeControlBase(editor), [editor]);
|
|
7
|
+
return null;
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=ImperativeControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ImperativeControl.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { IImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';\nimport { ImperativeControlBase } from '@fluentui-copilot/chat-input-plugins';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\n\nexport type ImperativeControlPluginRef = IImperativeControlBase;\nexport type ImperativeControlPluginProps = {};\n\nexport const ImperativeControlPlugin = React.forwardRef<ImperativeControlPluginRef, ImperativeControlPluginProps>(\n (_props, ref) => {\n const [editor] = useLexicalComposerContext();\n\n React.useImperativeHandle(ref, () => new ImperativeControlBase(editor), [editor]);\n\n return null;\n },\n);\n"],"names":["React","ImperativeControlBase","useLexicalComposerContext","ImperativeControlPlugin","forwardRef","_props","ref","editor","useImperativeHandle"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,uCAAuC;AAC7E,SAASC,yBAAyB,QAAQ,sCAAsC;AAKhF,OAAO,MAAMC,wCAA0BH,MAAMI,UAAU,CACrD,CAACC,QAAQC;IACP,MAAM,CAACC,OAAO,GAAGL;IAEjBF,MAAMQ,mBAAmB,CAACF,KAAK,IAAM,IAAIL,sBAAsBM,SAAS;QAACA;KAAO;IAEhF,OAAO;AACT,GACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ImperativeControl';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';
|
|
3
|
+
import { $createGhostTextNode, $isGhostTextNode } from '../../GhostText';
|
|
4
|
+
import { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';
|
|
5
|
+
export const ManualGhostTextPlugin = React.forwardRef((props, ref) => {
|
|
6
|
+
const {
|
|
7
|
+
id
|
|
8
|
+
} = props;
|
|
9
|
+
const [editor] = useLexicalComposerContext();
|
|
10
|
+
React.useImperativeHandle(ref, () => new ManualGhostTextBase(editor, id, $isGhostTextNode, $createGhostTextNode), [editor, id]);
|
|
11
|
+
return null;
|
|
12
|
+
});
|
|
13
|
+
ManualGhostTextPlugin.displayName = 'ManualGhostTextPlugin';
|
|
14
|
+
//# sourceMappingURL=ManualGhostText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ManualGhostText.ts"],"sourcesContent":["import * as React from 'react';\nimport { useLexicalComposerContext } from '@fluentui-copilot/react-text-editor';\nimport type { GhostTextProps } from '../../GhostText';\nimport { $createGhostTextNode, $isGhostTextNode } from '../../GhostText';\nimport { ManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins';\n\nexport type ManualGhostTextProps = {\n id: string;\n};\n\nexport type ManualGhostTextRef = {\n getGhostText: () => string | undefined;\n setGhostText: (text: string, exposeText?: boolean, ghostTextProps?: GhostTextProps) => void;\n commitGhostText: (finalText: string) => void;\n cancelGhostText: () => void;\n};\n\nexport const ManualGhostTextPlugin = React.forwardRef<ManualGhostTextRef, ManualGhostTextProps>((props, ref) => {\n const { id } = props;\n const [editor] = useLexicalComposerContext();\n\n React.useImperativeHandle<ManualGhostTextRef, ManualGhostTextRef>(\n ref,\n () => new ManualGhostTextBase(editor, id, $isGhostTextNode, $createGhostTextNode),\n [editor, id],\n );\n\n return null;\n});\n\nManualGhostTextPlugin.displayName = 'ManualGhostTextPlugin';\n"],"names":["React","useLexicalComposerContext","$createGhostTextNode","$isGhostTextNode","ManualGhostTextBase","ManualGhostTextPlugin","forwardRef","props","ref","id","editor","useImperativeHandle","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,sCAAsC;AAEhF,SAASC,oBAAoB,EAAEC,gBAAgB,QAAQ,kBAAkB;AACzE,SAASC,mBAAmB,QAAQ,uCAAuC;AAa3E,OAAO,MAAMC,wBAAwBL,MAAMM,UAAU,CAA2C,CAACC,OAAOC;IACtG,MAAM,EAAEC,EAAE,EAAE,GAAGF;IACf,MAAM,CAACG,OAAO,GAAGT;IAEjBD,MAAMW,mBAAmB,CACvBH,KACA,IAAM,IAAIJ,oBAAoBM,QAAQD,IAAIN,kBAAkBD,uBAC5D;QAACQ;QAAQD;KAAG;IAGd,OAAO;AACT,GAAG;AAEHJ,sBAAsBO,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ManualGhostText';\n"],"names":[],"mappings":"AAAA,cAAc,oBAAoB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./plugins/BasicFunctionality/index"), exports);
|
|
7
|
+
//# sourceMappingURL=BasicFunctionality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["BasicFunctionality.js"],"sourcesContent":["export * from './plugins/BasicFunctionality/index';\n//# sourceMappingURL=BasicFunctionality.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,8CAA8C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./components/ChatInputEntity/index"), exports);
|
|
7
|
+
_export_star._(require("./plugins/ChatInputEntity/index"), exports);
|
|
8
|
+
//# sourceMappingURL=ChatInputEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputEntity.js"],"sourcesContent":["export * from './components/ChatInputEntity/index';\nexport * from './plugins/ChatInputEntity/index';\n//# sourceMappingURL=ChatInputEntity.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;CACd,2CAA2C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputToken.js"],"sourcesContent":["export * from './components/ChatInputToken/index';\n//# sourceMappingURL=ChatInputToken.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,0CAA0C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./components/GhostText/index"), exports);
|
|
7
|
+
_export_star._(require("./plugins/GhostText/index"), exports);
|
|
8
|
+
_export_star._(require("./plugins/ManualGhostText/index"), exports);
|
|
9
|
+
//# sourceMappingURL=GhostText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["GhostText.js"],"sourcesContent":["export * from './components/GhostText/index';\nexport * from './plugins/GhostText/index';\nexport * from './plugins/ManualGhostText/index';\n//# sourceMappingURL=GhostText.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;CACd,qCAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ImperativeControl.js"],"sourcesContent":["export * from './plugins/ImperativeControl/index';\n//# sourceMappingURL=ImperativeControl.js.map"],"names":[],"mappings":";;;;;uBAAc;CACd,6CAA6C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "ChatInputEntity", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return ChatInputEntity;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useChatInputEntity = require("./useChatInputEntity");
|
|
14
|
+
const _renderChatInputEntity = require("./renderChatInputEntity");
|
|
15
|
+
const _useChatInputEntityStyles = require("./useChatInputEntityStyles");
|
|
16
|
+
const ChatInputEntity = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
const state = (0, _useChatInputEntity.useChatInputEntity_unstable)(props, ref);
|
|
18
|
+
(0, _useChatInputEntityStyles.useChatInputEntityStyles_unstable)(state);
|
|
19
|
+
return (0, _renderChatInputEntity.renderChatInputEntity_unstable)(state);
|
|
20
|
+
});
|
|
21
|
+
ChatInputEntity.displayName = 'ChatInputEntity'; //# sourceMappingURL=ChatInputEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputEntity.js"],"sourcesContent":["import * as React from 'react';\nimport { useChatInputEntity_unstable } from './useChatInputEntity';\nimport { renderChatInputEntity_unstable } from './renderChatInputEntity';\nimport { useChatInputEntityStyles_unstable } from './useChatInputEntityStyles';\n// ChatInputEntity component - TODO: add more docs\nexport const ChatInputEntity = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useChatInputEntity_unstable(props, ref);\n useChatInputEntityStyles_unstable(state);\n return renderChatInputEntity_unstable(state);\n});\nChatInputEntity.displayName = 'ChatInputEntity';\n//# sourceMappingURL=ChatInputEntity.js.map"],"names":["ChatInputEntity","React","forwardRef","props","ref","state","useChatInputEntity_unstable","useChatInputEntityStyles_unstable","renderChatInputEntity_unstable","displayName"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;oCACqB;uCACG;0CACG;AAE3C,MAAMA,kBAAkB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnE,MAAMC,QAAQC,IAAAA,+CAA2B,EAACH,OAAOC;IACjDG,IAAAA,2DAAiC,EAACF;IAClC,OAAOG,IAAAA,qDAA8B,EAACH;AACxC;AACAL,gBAAgBS,WAAW,GAAG,mBAC9B,2CAA2C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.
|
|
6
|
+
// & Required<Pick<ChatInputEntityProps, 'propName'>>
|
|
7
|
+
//# sourceMappingURL=ChatInputEntity.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputEntity.types.js"],"sourcesContent":["export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from ChatInputEntityProps.\n// & Required<Pick<ChatInputEntityProps, 'propName'>>\n//# sourceMappingURL=ChatInputEntity.types.js.map"],"names":[],"mappings":";;;;CAAW,gIAAgI;CAC3I,qDAAqD;CACrD,iDAAiD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./ChatInputEntity"), exports);
|
|
7
|
+
_export_star._(require("./ChatInputEntity.types"), exports);
|
|
8
|
+
_export_star._(require("./renderChatInputEntity"), exports);
|
|
9
|
+
_export_star._(require("./useChatInputEntity"), exports);
|
|
10
|
+
_export_star._(require("./useChatInputEntityStyles"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './ChatInputEntity';\nexport * from './ChatInputEntity.types';\nexport * from './renderChatInputEntity';\nexport * from './useChatInputEntity';\nexport * from './useChatInputEntityStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderChatInputEntity_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderChatInputEntity_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const renderChatInputEntity_unstable = (state)=>{
|
|
14
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.text, {}),
|
|
18
|
+
state.sensitivity && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.sensitivity, {})
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
}; //# sourceMappingURL=renderChatInputEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderChatInputEntity.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-components';\n/**\n * Render the final JSX of ChatInputEntity\n */\nexport const renderChatInputEntity_unstable = state => {\n assertSlots(state);\n return /*#__PURE__*/_jsxs(state.root, {\n children: [/*#__PURE__*/_jsx(state.text, {}), state.sensitivity && /*#__PURE__*/_jsx(state.sensitivity, {})]\n });\n};\n//# sourceMappingURL=renderChatInputEntity.js.map"],"names":["renderChatInputEntity_unstable","state","assertSlots","_jsxs","root","children","_jsx","text","sensitivity"],"mappings":";;;;+BAKaA;;;eAAAA;;;4BAL8B;iCACf;AAIrB,MAAMA,iCAAiCC,CAAAA;IAC5CC,IAAAA,4BAAW,EAACD;IACZ,OAAO,WAAW,GAAEE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACpCC,UAAU;YAAC,WAAW,GAAEC,IAAAA,eAAI,EAACL,MAAMM,IAAI,EAAE,CAAC;YAAIN,MAAMO,WAAW,IAAI,WAAW,GAAEF,IAAAA,eAAI,EAACL,MAAMO,WAAW,EAAE,CAAC;SAAG;IAC9G;AACF,GACA,iDAAiD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useChatInputEntity_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useChatInputEntity_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const useChatInputEntity_unstable = (props, ref)=>{
|
|
13
|
+
const { as } = props;
|
|
14
|
+
const elementType = as !== null && as !== void 0 ? as : 'span';
|
|
15
|
+
const nativeProps = (0, _reactcomponents.getPartitionedNativeProps)({
|
|
16
|
+
props,
|
|
17
|
+
primarySlotTagName: elementType
|
|
18
|
+
});
|
|
19
|
+
const defaultTextSlotProps = elementType === 'a' ? {
|
|
20
|
+
target: '_blank',
|
|
21
|
+
rel: 'noopener',
|
|
22
|
+
// We don't want to enable tab focus for components inside the ChatInput
|
|
23
|
+
tabIndex: -1,
|
|
24
|
+
...nativeProps.primary,
|
|
25
|
+
as: 'a',
|
|
26
|
+
// This cast is safe to do at this point because we know the type of element we are rendering is an anchor
|
|
27
|
+
ref: ref
|
|
28
|
+
} : {
|
|
29
|
+
...nativeProps.primary,
|
|
30
|
+
as: 'span',
|
|
31
|
+
ref
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
components: {
|
|
35
|
+
root: 'span',
|
|
36
|
+
sensitivity: 'span',
|
|
37
|
+
text: elementType
|
|
38
|
+
},
|
|
39
|
+
root: _reactcomponents.slot.always(props.root, {
|
|
40
|
+
defaultProps: nativeProps.root,
|
|
41
|
+
elementType: 'span'
|
|
42
|
+
}),
|
|
43
|
+
sensitivity: _reactcomponents.slot.optional(props.sensitivity, {
|
|
44
|
+
elementType: 'span'
|
|
45
|
+
}),
|
|
46
|
+
text: _reactcomponents.slot.optional(props.text, {
|
|
47
|
+
defaultProps: defaultTextSlotProps,
|
|
48
|
+
renderByDefault: true,
|
|
49
|
+
elementType
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
}; //# sourceMappingURL=useChatInputEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChatInputEntity.js"],"sourcesContent":["import { getPartitionedNativeProps, slot } from '@fluentui/react-components';\n// If you add JSX to this file, be sure to change the file type to .tsx\n/**\n * Create the state required to render ChatInputEntity.\n *\n * The returned state can be modified with hooks such as useChatInputEntityStyles_unstable,\n * before being passed to renderChatInputEntity_unstable.\n *\n * @param props - props from this instance of ChatInputEntity\n * @param ref - reference to root HTMLElement of ChatInputEntity\n */\nexport const useChatInputEntity_unstable = (props, ref) => {\n const {\n as\n } = props;\n const elementType = as !== null && as !== void 0 ? as : 'span';\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: elementType\n });\n const defaultTextSlotProps = elementType === 'a' ? {\n target: '_blank',\n rel: 'noopener',\n // We don't want to enable tab focus for components inside the ChatInput\n tabIndex: -1,\n ...nativeProps.primary,\n as: 'a',\n // This cast is safe to do at this point because we know the type of element we are rendering is an anchor\n ref: ref\n } : {\n ...nativeProps.primary,\n as: 'span',\n ref\n };\n return {\n components: {\n root: 'span',\n sensitivity: 'span',\n text: elementType\n },\n root: slot.always(props.root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n }),\n sensitivity: slot.optional(props.sensitivity, {\n elementType: 'span'\n }),\n text: slot.optional(props.text, {\n defaultProps: defaultTextSlotProps,\n renderByDefault: true,\n elementType\n })\n };\n};\n//# sourceMappingURL=useChatInputEntity.js.map"],"names":["useChatInputEntity_unstable","props","ref","as","elementType","nativeProps","getPartitionedNativeProps","primarySlotTagName","defaultTextSlotProps","target","rel","tabIndex","primary","components","root","sensitivity","text","slot","always","defaultProps","optional","renderByDefault"],"mappings":";;;;+BAWaA;;;eAAAA;;;iCAXmC;AAWzC,MAAMA,8BAA8B,CAACC,OAAOC;IACjD,MAAM,EACJC,EAAE,EACH,GAAGF;IACJ,MAAMG,cAAcD,OAAO,QAAQA,OAAO,KAAK,IAAIA,KAAK;IACxD,MAAME,cAAcC,IAAAA,0CAAyB,EAAC;QAC5CL;QACAM,oBAAoBH;IACtB;IACA,MAAMI,uBAAuBJ,gBAAgB,MAAM;QACjDK,QAAQ;QACRC,KAAK;QACL,wEAAwE;QACxEC,UAAU,CAAC;QACX,GAAGN,YAAYO,OAAO;QACtBT,IAAI;QACJ,0GAA0G;QAC1GD,KAAKA;IACP,IAAI;QACF,GAAGG,YAAYO,OAAO;QACtBT,IAAI;QACJD;IACF;IACA,OAAO;QACLW,YAAY;YACVC,MAAM;YACNC,aAAa;YACbC,MAAMZ;QACR;QACAU,MAAMG,qBAAI,CAACC,MAAM,CAACjB,MAAMa,IAAI,EAAE;YAC5BK,cAAcd,YAAYS,IAAI;YAC9BV,aAAa;QACf;QACAW,aAAaE,qBAAI,CAACG,QAAQ,CAACnB,MAAMc,WAAW,EAAE;YAC5CX,aAAa;QACf;QACAY,MAAMC,qBAAI,CAACG,QAAQ,CAACnB,MAAMe,IAAI,EAAE;YAC9BG,cAAcX;YACda,iBAAiB;YACjBjB;QACF;IACF;AACF,GACA,8CAA8C"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
chatInputEntityClassNames: function() {
|
|
13
|
+
return chatInputEntityClassNames;
|
|
14
|
+
},
|
|
15
|
+
useChatInputEntityStyles_unstable: function() {
|
|
16
|
+
return useChatInputEntityStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const chatInputEntityClassNames = {
|
|
21
|
+
root: 'fai-ChatInputEntity',
|
|
22
|
+
sensitivity: 'fai-ChatInputEntity__sensitivity',
|
|
23
|
+
text: 'fai-ChatInputEntity__text'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Styles for the root slot
|
|
27
|
+
*/ const useStyles = (0, _reactcomponents.__styles)({
|
|
28
|
+
root: {},
|
|
29
|
+
text: {
|
|
30
|
+
sj55zd: "f16muhyy"
|
|
31
|
+
},
|
|
32
|
+
href: {
|
|
33
|
+
sj55zd: "fyind8e",
|
|
34
|
+
Bde5pd6: "f1tx3yz7",
|
|
35
|
+
Bi91k9c: "f1deo86v",
|
|
36
|
+
i089h6: "f1eh06m1",
|
|
37
|
+
lj723h: "f1iescvh"
|
|
38
|
+
},
|
|
39
|
+
sensitivity: {
|
|
40
|
+
uwmqm3: [
|
|
41
|
+
"fgiv446",
|
|
42
|
+
"ffczdla"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
d: [
|
|
47
|
+
".f16muhyy{color:var(--colorBrandForeground1);}",
|
|
48
|
+
".fyind8e{color:var(--colorBrandForegroundLink);}",
|
|
49
|
+
".fgiv446{padding-left:var(--spacingHorizontalXXS);}",
|
|
50
|
+
".ffczdla{padding-right:var(--spacingHorizontalXXS);}"
|
|
51
|
+
],
|
|
52
|
+
h: [
|
|
53
|
+
".f1tx3yz7:hover{text-decoration-line:underline;}",
|
|
54
|
+
".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}"
|
|
55
|
+
],
|
|
56
|
+
a: [
|
|
57
|
+
".f1eh06m1:active{text-decoration-line:underline;}",
|
|
58
|
+
".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}"
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
const useChatInputEntityStyles_unstable = (state)=>{
|
|
62
|
+
const styles = useStyles();
|
|
63
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(chatInputEntityClassNames.root, styles.root, state.root.className);
|
|
64
|
+
if (state.text) {
|
|
65
|
+
state.text.className = (0, _reactcomponents.mergeClasses)(chatInputEntityClassNames.text, styles.text, state.text.as === 'a' && styles.href, state.text.className);
|
|
66
|
+
}
|
|
67
|
+
if (state.sensitivity) {
|
|
68
|
+
state.sensitivity.className = (0, _reactcomponents.mergeClasses)(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);
|
|
69
|
+
}
|
|
70
|
+
return state;
|
|
71
|
+
}; //# sourceMappingURL=useChatInputEntityStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useChatInputEntityStyles.js"],"sourcesContent":["import { __styles, mergeClasses, tokens } from '@fluentui/react-components';\nexport const chatInputEntityClassNames = {\n root: 'fai-ChatInputEntity',\n sensitivity: 'fai-ChatInputEntity__sensitivity',\n text: 'fai-ChatInputEntity__text'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = __styles({\n root: {},\n text: {\n sj55zd: \"f16muhyy\"\n },\n href: {\n sj55zd: \"fyind8e\",\n Bde5pd6: \"f1tx3yz7\",\n Bi91k9c: \"f1deo86v\",\n i089h6: \"f1eh06m1\",\n lj723h: \"f1iescvh\"\n },\n sensitivity: {\n uwmqm3: [\"fgiv446\", \"ffczdla\"]\n }\n}, {\n d: [\".f16muhyy{color:var(--colorBrandForeground1);}\", \".fyind8e{color:var(--colorBrandForegroundLink);}\", \".fgiv446{padding-left:var(--spacingHorizontalXXS);}\", \".ffczdla{padding-right:var(--spacingHorizontalXXS);}\"],\n h: [\".f1tx3yz7:hover{text-decoration-line:underline;}\", \".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}\"],\n a: [\".f1eh06m1:active{text-decoration-line:underline;}\", \".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}\"]\n});\n/**\n * Apply styling to the ChatInputEntity slots based on the state\n */\nexport const useChatInputEntityStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(chatInputEntityClassNames.root, styles.root, state.root.className);\n if (state.text) {\n state.text.className = mergeClasses(chatInputEntityClassNames.text, styles.text, state.text.as === 'a' && styles.href, state.text.className);\n }\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(chatInputEntityClassNames.sensitivity, styles.sensitivity, state.sensitivity.className);\n }\n return state;\n};\n//# sourceMappingURL=useChatInputEntityStyles.js.map"],"names":["chatInputEntityClassNames","useChatInputEntityStyles_unstable","root","sensitivity","text","useStyles","__styles","sj55zd","href","Bde5pd6","Bi91k9c","i089h6","lj723h","uwmqm3","d","h","a","state","styles","className","mergeClasses","as"],"mappings":";;;;;;;;;;;IACaA,yBAAyB;eAAzBA;;IA+BAC,iCAAiC;eAAjCA;;;iCAhCkC;AACxC,MAAMD,4BAA4B;IACvCE,MAAM;IACNC,aAAa;IACbC,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,yBAAQ,EAAC;IACzBJ,MAAM,CAAC;IACPE,MAAM;QACJG,QAAQ;IACV;IACAC,MAAM;QACJD,QAAQ;QACRE,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;IACV;IACAT,aAAa;QACXU,QAAQ;YAAC;YAAW;SAAU;IAChC;AACF,GAAG;IACDC,GAAG;QAAC;QAAkD;QAAoD;QAAuD;KAAuD;IACxNC,GAAG;QAAC;QAAoD;KAA+D;IACvHC,GAAG;QAAC;QAAqD;KAAkE;AAC7H;AAIO,MAAMf,oCAAoCgB,CAAAA;IAC/C,MAAMC,SAASb;IACfY,MAAMf,IAAI,CAACiB,SAAS,GAAGC,IAAAA,6BAAY,EAACpB,0BAA0BE,IAAI,EAAEgB,OAAOhB,IAAI,EAAEe,MAAMf,IAAI,CAACiB,SAAS;IACrG,IAAIF,MAAMb,IAAI,EAAE;QACda,MAAMb,IAAI,CAACe,SAAS,GAAGC,IAAAA,6BAAY,EAACpB,0BAA0BI,IAAI,EAAEc,OAAOd,IAAI,EAAEa,MAAMb,IAAI,CAACiB,EAAE,KAAK,OAAOH,OAAOV,IAAI,EAAES,MAAMb,IAAI,CAACe,SAAS;IAC7I;IACA,IAAIF,MAAMd,WAAW,EAAE;QACrBc,MAAMd,WAAW,CAACgB,SAAS,GAAGC,IAAAA,6BAAY,EAACpB,0BAA0BG,WAAW,EAAEe,OAAOf,WAAW,EAAEc,MAAMd,WAAW,CAACgB,SAAS;IACnI;IACA,OAAOF;AACT,GACA,oDAAoD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "ChatInputToken", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return ChatInputToken;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useChatInputToken = require("./useChatInputToken");
|
|
14
|
+
const _renderChatInputToken = require("./renderChatInputToken");
|
|
15
|
+
const _useChatInputTokenStyles = require("./useChatInputTokenStyles");
|
|
16
|
+
const ChatInputToken = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
const state = (0, _useChatInputToken.useChatInputToken_unstable)(props, ref);
|
|
18
|
+
(0, _useChatInputTokenStyles.useChatInputTokenStyles_unstable)(state);
|
|
19
|
+
return (0, _renderChatInputToken.renderChatInputToken_unstable)(state);
|
|
20
|
+
});
|
|
21
|
+
ChatInputToken.displayName = 'ChatInputToken'; //# sourceMappingURL=ChatInputToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputToken.js"],"sourcesContent":["import * as React from 'react';\nimport { useChatInputToken_unstable } from './useChatInputToken';\nimport { renderChatInputToken_unstable } from './renderChatInputToken';\nimport { useChatInputTokenStyles_unstable } from './useChatInputTokenStyles';\n// ChatInputToken component\nexport const ChatInputToken = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useChatInputToken_unstable(props, ref);\n useChatInputTokenStyles_unstable(state);\n return renderChatInputToken_unstable(state);\n});\nChatInputToken.displayName = 'ChatInputToken';\n//# sourceMappingURL=ChatInputToken.js.map"],"names":["ChatInputToken","React","forwardRef","props","ref","state","useChatInputToken_unstable","useChatInputTokenStyles_unstable","renderChatInputToken_unstable","displayName"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;mCACoB;sCACG;yCACG;AAE1C,MAAMA,iBAAiB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAClE,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,yDAAgC,EAACF;IACjC,OAAOG,IAAAA,mDAA6B,EAACH;AACvC;AACAL,eAAeS,WAAW,GAAG,kBAC7B,0CAA0C"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
ChatInputTokenNode: function() {
|
|
13
|
+
return ChatInputTokenNode;
|
|
14
|
+
},
|
|
15
|
+
$createChatInputTokenNode: function() {
|
|
16
|
+
return $createChatInputTokenNode;
|
|
17
|
+
},
|
|
18
|
+
$isChatInputTokenNode: function() {
|
|
19
|
+
return $isChatInputTokenNode;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
23
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
24
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
25
|
+
const _texteditor = require("@fluentui-copilot/text-editor");
|
|
26
|
+
const _ChatInputToken = require("./ChatInputToken");
|
|
27
|
+
class ChatInputTokenNode extends _texteditor.DecoratorNode {
|
|
28
|
+
static getType() {
|
|
29
|
+
return 'token';
|
|
30
|
+
}
|
|
31
|
+
static clone(node) {
|
|
32
|
+
return new ChatInputTokenNode(node.__text, node.__componentProps, node.__key);
|
|
33
|
+
}
|
|
34
|
+
static importJSON(serializedNode) {
|
|
35
|
+
return $createChatInputTokenNode(serializedNode.text, serializedNode.componentProps);
|
|
36
|
+
}
|
|
37
|
+
isIsolated() {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
isInline() {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
getTextContent() {
|
|
44
|
+
return this.__text;
|
|
45
|
+
}
|
|
46
|
+
exportJSON() {
|
|
47
|
+
return {
|
|
48
|
+
...super.exportJSON(),
|
|
49
|
+
text: this.__text,
|
|
50
|
+
componentProps: this.__componentProps,
|
|
51
|
+
type: ChatInputTokenNode.getType(),
|
|
52
|
+
version: 1
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
createDOM() {
|
|
56
|
+
return document.createElement('span');
|
|
57
|
+
}
|
|
58
|
+
updateDOM() {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
decorate(_editor, config) {
|
|
62
|
+
var _this___componentProps;
|
|
63
|
+
if ((_this___componentProps = this.__componentProps) === null || _this___componentProps === void 0 ? void 0 : _this___componentProps.children) {
|
|
64
|
+
return /*#__PURE__*/ _react.createElement(_ChatInputToken.ChatInputToken, this.__componentProps);
|
|
65
|
+
}
|
|
66
|
+
return /*#__PURE__*/ _react.createElement(_ChatInputToken.ChatInputToken, this.__componentProps, this.__text);
|
|
67
|
+
}
|
|
68
|
+
constructor(text, componentProps, key){
|
|
69
|
+
super(key);
|
|
70
|
+
(0, _define_property._)(this, "__text", void 0);
|
|
71
|
+
(0, _define_property._)(this, "__componentProps", void 0);
|
|
72
|
+
this.__text = text;
|
|
73
|
+
this.__componentProps = componentProps;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function $createChatInputTokenNode(text, componentProps, key) {
|
|
77
|
+
return new ChatInputTokenNode(text, componentProps, key);
|
|
78
|
+
}
|
|
79
|
+
function $isChatInputTokenNode(node) {
|
|
80
|
+
return node instanceof ChatInputTokenNode;
|
|
81
|
+
} //# sourceMappingURL=ChatInputToken.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputToken.node.js"],"sourcesContent":["import { _ as _define_property } from \"@swc/helpers/_/_define_property\";\nimport * as React from 'react';\nimport { DecoratorNode } from '@fluentui-copilot/text-editor';\nimport { ChatInputToken } from './ChatInputToken';\nexport class ChatInputTokenNode extends DecoratorNode {\n static getType() {\n return 'token';\n }\n static clone(node) {\n return new ChatInputTokenNode(node.__text, node.__componentProps, node.__key);\n }\n static importJSON(serializedNode) {\n return $createChatInputTokenNode(serializedNode.text, serializedNode.componentProps);\n }\n isIsolated() {\n return true;\n }\n isInline() {\n return true;\n }\n getTextContent() {\n return this.__text;\n }\n exportJSON() {\n return {\n ...super.exportJSON(),\n text: this.__text,\n componentProps: this.__componentProps,\n type: ChatInputTokenNode.getType(),\n version: 1\n };\n }\n createDOM() {\n return document.createElement('span');\n }\n updateDOM() {\n return false;\n }\n decorate(_editor, config) {\n var _this___componentProps;\n if ((_this___componentProps = this.__componentProps) === null || _this___componentProps === void 0 ? void 0 : _this___componentProps.children) {\n return /*#__PURE__*/React.createElement(ChatInputToken, this.__componentProps);\n }\n return /*#__PURE__*/React.createElement(ChatInputToken, this.__componentProps, this.__text);\n }\n constructor(text, componentProps, key) {\n super(key);\n _define_property(this, \"__text\", void 0);\n _define_property(this, \"__componentProps\", void 0);\n this.__text = text;\n this.__componentProps = componentProps;\n }\n}\nexport function $createChatInputTokenNode(text, componentProps, key) {\n return new ChatInputTokenNode(text, componentProps, key);\n}\nexport function $isChatInputTokenNode(node) {\n return node instanceof ChatInputTokenNode;\n}\n//# sourceMappingURL=ChatInputToken.node.js.map"],"names":["ChatInputTokenNode","$createChatInputTokenNode","$isChatInputTokenNode","DecoratorNode","getType","clone","node","__text","__componentProps","__key","importJSON","serializedNode","text","componentProps","isIsolated","isInline","getTextContent","exportJSON","type","version","createDOM","document","createElement","updateDOM","decorate","_editor","config","_this___componentProps","children","React","ChatInputToken","constructor","key","_define_property"],"mappings":";;;;;;;;;;;IAIaA,kBAAkB;eAAlBA;;IAiDGC,yBAAyB;eAAzBA;;IAGAC,qBAAqB;eAArBA;;;;iCAxDsB;iEACf;4BACO;gCACC;AACxB,MAAMF,2BAA2BG,yBAAa;IACnD,OAAOC,UAAU;QACf,OAAO;IACT;IACA,OAAOC,MAAMC,IAAI,EAAE;QACjB,OAAO,IAAIN,mBAAmBM,KAAKC,MAAM,EAAED,KAAKE,gBAAgB,EAAEF,KAAKG,KAAK;IAC9E;IACA,OAAOC,WAAWC,cAAc,EAAE;QAChC,OAAOV,0BAA0BU,eAAeC,IAAI,EAAED,eAAeE,cAAc;IACrF;IACAC,aAAa;QACX,OAAO;IACT;IACAC,WAAW;QACT,OAAO;IACT;IACAC,iBAAiB;QACf,OAAO,IAAI,CAACT,MAAM;IACpB;IACAU,aAAa;QACX,OAAO;YACL,GAAG,KAAK,CAACA,YAAY;YACrBL,MAAM,IAAI,CAACL,MAAM;YACjBM,gBAAgB,IAAI,CAACL,gBAAgB;YACrCU,MAAMlB,mBAAmBI,OAAO;YAChCe,SAAS;QACX;IACF;IACAC,YAAY;QACV,OAAOC,SAASC,aAAa,CAAC;IAChC;IACAC,YAAY;QACV,OAAO;IACT;IACAC,SAASC,OAAO,EAAEC,MAAM,EAAE;QACxB,IAAIC;QACJ,IAAI,AAACA,CAAAA,yBAAyB,IAAI,CAACnB,gBAAgB,AAAD,MAAO,QAAQmB,2BAA2B,KAAK,IAAI,KAAK,IAAIA,uBAAuBC,QAAQ,EAAE;YAC7I,OAAO,WAAW,GAAEC,OAAMP,aAAa,CAACQ,8BAAc,EAAE,IAAI,CAACtB,gBAAgB;QAC/E;QACA,OAAO,WAAW,GAAEqB,OAAMP,aAAa,CAACQ,8BAAc,EAAE,IAAI,CAACtB,gBAAgB,EAAE,IAAI,CAACD,MAAM;IAC5F;IACAwB,YAAYnB,IAAI,EAAEC,cAAc,EAAEmB,GAAG,CAAE;QACrC,KAAK,CAACA;QACNC,IAAAA,kBAAgB,EAAC,IAAI,EAAE,UAAU,KAAK;QACtCA,IAAAA,kBAAgB,EAAC,IAAI,EAAE,oBAAoB,KAAK;QAChD,IAAI,CAAC1B,MAAM,GAAGK;QACd,IAAI,CAACJ,gBAAgB,GAAGK;IAC1B;AACF;AACO,SAASZ,0BAA0BW,IAAI,EAAEC,cAAc,EAAEmB,GAAG;IACjE,OAAO,IAAIhC,mBAAmBY,MAAMC,gBAAgBmB;AACtD;AACO,SAAS9B,sBAAsBI,IAAI;IACxC,OAAOA,gBAAgBN;AACzB,EACA,+CAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["ChatInputToken.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=ChatInputToken.types.js.map"],"names":[],"mappings":";;;;CACA,gDAAgD"}
|